From a4d9d6a0ed503efed84457727b05aedcbbde79a3 Mon Sep 17 00:00:00 2001 From: Shahid Hussain Khan Date: Tue, 23 Apr 2024 18:04:19 +0100 Subject: [PATCH 1/2] CP-2060 Add Python SDK generated from thousandeyes-python-generator --- README.md | 4 +- {admin_api => admin}/.gitignore | 0 .../.openapi-generator-ignore | 0 admin/.openapi-generator/FILES | 220 ++ admin/.openapi-generator/VERSION | 1 + admin/README.md | 210 ++ admin/admin/__init__.py | 101 + admin/admin/api/__init__.py | 9 + .../admin}/api/account_groups_api.py | 146 +- .../admin}/api/permissions_api.py | 48 +- .../admin}/api/roles_api.py | 142 +- .../admin}/api/user_events_api.py | 86 +- .../admin}/api/users_api.py | 180 +- admin/admin/api_client.py | 770 +++++++ admin/admin/api_response.py | 21 + admin/admin/configuration.py | 444 ++++ admin/admin/exceptions.py | 199 ++ admin/admin/models/__init__.py | 80 + admin/admin/models/account_group.py | 95 + admin/admin/models/account_group1.py | 89 + admin/admin/models/account_group_detail.py | 115 + admin/admin/models/account_group_id.py | 87 + .../models/account_group_request_body.py | 89 + admin/admin/models/account_group_roles.py | 95 + ...t_group_roles_account_group_roles_inner.py | 101 + .../account_group_roles_request_body_inner.py | 89 + admin/admin/models/account_groups.py | 95 + admin/admin/models/agent.py | 124 ++ admin/admin/models/agent_base.py | 97 + admin/admin/models/all_account_group_roles.py | 95 + admin/admin/models/base_role.py | 91 + .../models/cloud_enterprise_agent_type.py | 38 + admin/admin/models/cluster_member.py | 131 ++ .../create_account_group201_response.py | 111 + admin/admin/models/create_role201_response.py | 107 + admin/admin/models/create_user201_response.py | 126 ++ admin/admin/models/created_user.py | 120 ++ admin/admin/models/enterprise_agent.py | 199 ++ admin/admin/models/enterprise_agent_data.py | 160 ++ .../models/enterprise_agent_ipv6_policy.py | 38 + admin/admin/models/enterprise_agent_state.py | 38 + admin/admin/models/enterprise_agents.py | 95 + admin/admin/models/error.py | 95 + admin/admin/models/error_detail.py | 92 + admin/admin/models/error_detail_code.py | 43 + admin/admin/models/expand.py | 37 + admin/admin/models/extended_user.py | 102 + .../models/get_account_group200_response.py | 121 ++ .../models/get_account_groups200_response.py | 101 + .../models/get_permissions200_response.py | 101 + admin/admin/models/get_roles200_response.py | 101 + admin/admin/models/get_user200_response.py | 128 ++ .../models/get_user_events200_response.py | 110 + admin/admin/models/get_users200_response.py | 101 + admin/admin/models/interface_ip_mapping.py | 93 + admin/admin/models/link.py | 101 + admin/admin/models/login_account_group.py | 91 + .../models/new_account_group_response.py | 105 + admin/admin/models/pagination_links.py | 91 + admin/admin/models/pagination_links_links.py | 101 + admin/admin/models/permission.py | 93 + admin/admin/models/permissions.py | 95 + admin/admin/models/query_window.py | 94 + admin/admin/models/role.py | 93 + admin/admin/models/role_detail.py | 101 + admin/admin/models/role_request_body.py | 89 + admin/admin/models/roles.py | 95 + admin/admin/models/self_links.py | 91 + admin/admin/models/self_links_links.py | 91 + admin/admin/models/simple_agent.py | 121 ++ admin/admin/models/unauthorized_error.py | 89 + admin/admin/models/user.py | 100 + admin/admin/models/user_account_group.py | 106 + admin/admin/models/user_account_groups.py | 95 + admin/admin/models/user_detail.py | 122 ++ admin/admin/models/user_event.py | 110 + .../user_event_all_of_resources_inner.py | 89 + admin/admin/models/user_events.py | 95 + admin/admin/models/user_request_body.py | 103 + admin/admin/models/users.py | 95 + admin/admin/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + {admin_api/admin_api => admin/admin}/py.typed | 0 admin/admin/rest.py | 257 +++ admin/docs/AccountGroup.md | 33 + {admin_api => admin}/docs/AccountGroup1.md | 7 +- .../docs/AccountGroupDetail.md | 7 +- admin/docs/AccountGroupId.md | 29 + .../docs/AccountGroupRequestBody.md | 7 +- .../docs/AccountGroupRoles.md | 7 +- ...AccountGroupRolesAccountGroupRolesInner.md | 30 + .../docs/AccountGroupRolesRequestBodyInner.md | 7 +- {admin_api => admin}/docs/AccountGroups.md | 7 +- {admin_api => admin}/docs/AccountGroupsApi.md | 125 +- admin/docs/Agent.md | 39 + admin/docs/AgentBase.md | 31 + .../docs/AllAccountGroupRoles.md | 7 +- {admin_api => admin}/docs/BaseRole.md | 7 +- admin/docs/CloudEnterpriseAgentType.md | 12 + admin/docs/ClusterMember.md | 38 + .../docs/CreateAccountGroup201Response.md | 7 +- .../docs/CreateRole201Response.md | 7 +- .../docs/CreateUser201Response.md | 7 +- {admin_api => admin}/docs/CreatedUser.md | 7 +- admin/docs/EnterpriseAgent.md | 52 + admin/docs/EnterpriseAgentData.md | 41 + admin/docs/EnterpriseAgentIpv6Policy.md | 12 + admin/docs/EnterpriseAgentState.md | 12 + {admin_api => admin}/docs/EnterpriseAgents.md | 7 +- admin/docs/Error.md | 33 + admin/docs/ErrorDetail.md | 30 + admin/docs/ErrorDetailCode.md | 12 + admin/docs/Expand.md | 11 + {admin_api => admin}/docs/ExtendedUser.md | 7 +- .../docs/GetAccountGroup200Response.md | 7 +- .../docs/GetAccountGroups200Response.md | 7 +- .../docs/GetPermissions200Response.md | 7 +- .../docs/GetRoles200Response.md | 7 +- .../docs/GetUser200Response.md | 7 +- .../docs/GetUserEvents200Response.md | 9 +- .../docs/GetUsers200Response.md | 7 +- admin/docs/InterfaceIpMapping.md | 30 + admin/docs/Link.md | 37 + .../docs/LoginAccountGroup.md | 7 +- .../docs/NewAccountGroupResponse.md | 7 +- admin/docs/PaginationLinks.md | 30 + admin/docs/PaginationLinksLinks.md | 31 + {admin_api => admin}/docs/Permission.md | 7 +- {admin_api => admin}/docs/Permissions.md | 7 +- {admin_api => admin}/docs/PermissionsApi.md | 23 +- admin/docs/QueryWindow.md | 30 + {admin_api => admin}/docs/Role.md | 7 +- {admin_api => admin}/docs/RoleDetail.md | 7 +- {admin_api => admin}/docs/RoleRequestBody.md | 7 +- {admin_api => admin}/docs/Roles.md | 7 +- {admin_api => admin}/docs/RolesApi.md | 115 +- admin/docs/SelfLinks.md | 29 + admin/docs/SelfLinksLinks.md | 30 + admin/docs/SimpleAgent.md | 38 + admin/docs/UnauthorizedError.md | 30 + {admin_api => admin}/docs/User.md | 7 +- {admin_api => admin}/docs/UserAccountGroup.md | 7 +- .../docs/UserAccountGroups.md | 7 +- {admin_api => admin}/docs/UserDetail.md | 7 +- {admin_api => admin}/docs/UserEvent.md | 7 +- .../docs/UserEventAllOfResourcesInner.md | 7 +- {admin_api => admin}/docs/UserEvents.md | 7 +- {admin_api => admin}/docs/UserEventsApi.md | 35 +- {admin_api => admin}/docs/UserRequestBody.md | 7 +- {admin_api => admin}/docs/Users.md | 7 +- {admin_api => admin}/docs/UsersApi.md | 127 +- admin/docs/ValidationError.md | 34 + admin/docs/ValidationErrorAllOfErrors.md | 31 + admin/pyproject.toml | 71 + {admin_api => admin}/requirements.txt | 0 {admin_api => admin}/setup.cfg | 0 admin/setup.py | 49 + admin/test-requirements.txt | 5 + {admin_api => admin}/test/__init__.py | 0 admin/test/test_account_group.py | 55 + admin/test/test_account_group1.py | 52 + admin/test/test_account_group_detail.py | 69 + admin/test/test_account_group_id.py | 51 + admin/test/test_account_group_request_body.py | 53 + admin/test/test_account_group_roles.py | 57 + ...t_group_roles_account_group_roles_inner.py | 54 + ..._account_group_roles_request_body_inner.py | 52 + admin/test/test_account_groups.py | 53 + admin/test/test_agent.py | 62 + admin/test/test_agent_base.py | 53 + admin/test/test_all_account_group_roles.py | 53 + admin/test/test_base_role.py | 53 + .../test/test_cloud_enterprise_agent_type.py | 33 + admin/test/test_cluster_member.py | 64 + .../test_create_account_group201_response.py | 76 + admin/test/test_create_role201_response.py | 64 + admin/test/test_create_user201_response.py | 75 + admin/test/test_created_user.py | 65 + admin/test/test_enterprise_agent.py | 89 + admin/test/test_enterprise_agent_data.py | 77 + .../test/test_enterprise_agent_ipv6_policy.py | 33 + admin/test/test_enterprise_agent_state.py | 33 + admin/test/test_enterprise_agents.py | 53 + admin/test/test_error.py | 55 + admin/test/test_error_detail.py | 52 + admin/test/test_error_detail_code.py | 33 + admin/test/test_expand.py | 33 + admin/test/test_extended_user.py | 56 + .../test_get_account_group200_response.py | 79 + .../test_get_account_groups200_response.py | 63 + .../test/test_get_permissions200_response.py | 61 + admin/test/test_get_roles200_response.py | 63 + admin/test/test_get_user200_response.py | 76 + .../test/test_get_user_events200_response.py | 73 + admin/test/test_get_users200_response.py | 63 + admin/test/test_interface_ip_mapping.py | 52 + admin/test/test_link.py | 59 + admin/test/test_login_account_group.py | 51 + admin/test/test_new_account_group_response.py | 66 + admin/test/test_pagination_links.py | 70 + admin/test/test_pagination_links_links.py | 77 + admin/test/test_permission.py | 54 + admin/test/test_permissions.py | 51 + admin/test/test_query_window.py | 52 + admin/test/test_role.py | 54 + admin/test/test_role_detail.py | 54 + admin/test/test_role_request_body.py | 52 + admin/test/test_roles.py | 53 + admin/test/test_self_links.py | 60 + admin/test/test_self_links_links.py | 59 + admin/test/test_simple_agent.py | 60 + admin/test/test_unauthorized_error.py | 52 + admin/test/test_user.py | 55 + admin/test/test_user_account_group.py | 58 + admin/test/test_user_account_groups.py | 61 + admin/test/test_user_detail.py | 66 + admin/test/test_user_event.py | 62 + .../test_user_event_all_of_resources_inner.py | 52 + admin/test/test_user_events.py | 51 + admin/test/test_user_request_body.py | 59 + admin/test/test_users.py | 53 + admin/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + admin_api/.github/workflows/python.yml | 38 - admin_api/.gitlab-ci.yml | 31 - admin_api/.openapi-generator/FILES | 218 -- admin_api/.openapi-generator/VERSION | 1 - admin_api/.travis.yml | 17 - admin_api/README.md | 205 -- admin_api/admin_api/__init__.py | 97 - admin_api/admin_api/api/__init__.py | 9 - admin_api/admin_api/api_client.py | 741 ------- admin_api/admin_api/api_response.py | 21 - admin_api/admin_api/configuration.py | 434 ---- admin_api/admin_api/exceptions.py | 166 -- admin_api/admin_api/models/__init__.py | 76 - admin_api/admin_api/models/account_group.py | 96 - admin_api/admin_api/models/account_group1.py | 90 - .../admin_api/models/account_group_detail.py | 116 -- .../admin_api/models/account_group_id.py | 88 - .../models/account_group_request_body.py | 90 - .../admin_api/models/account_group_roles.py | 96 - ...t_group_roles_account_group_roles_inner.py | 102 - .../account_group_roles_request_body_inner.py | 90 - admin_api/admin_api/models/account_groups.py | 96 - admin_api/admin_api/models/agent.py | 121 -- admin_api/admin_api/models/agent_base.py | 98 - .../models/all_account_group_roles.py | 96 - admin_api/admin_api/models/base_role.py | 92 - .../models/cloud_enterprise_agent_type.py | 46 - admin_api/admin_api/models/cluster_member.py | 131 -- .../create_account_group201_response.py | 112 - .../models/create_role201_response.py | 108 - .../models/create_user201_response.py | 126 -- admin_api/admin_api/models/created_user.py | 120 -- .../admin_api/models/enterprise_agent.py | 199 -- .../models/enterprise_agent_ipv6_policy.py | 46 - .../models/enterprise_agent_state.py | 46 - .../admin_api/models/enterprise_agents.py | 95 - admin_api/admin_api/models/error.py | 96 - admin_api/admin_api/models/error_detail.py | 93 - .../admin_api/models/error_detail_code.py | 51 - admin_api/admin_api/models/expand.py | 45 - admin_api/admin_api/models/extended_user.py | 102 - .../models/get_account_group200_response.py | 122 -- .../models/get_account_groups200_response.py | 102 - .../models/get_permissions200_response.py | 102 - .../admin_api/models/get_roles200_response.py | 102 - .../admin_api/models/get_user200_response.py | 128 -- .../models/get_user_events200_response.py | 110 - .../admin_api/models/get_users200_response.py | 102 - .../admin_api/models/interface_ip_mapping.py | 94 - admin_api/admin_api/models/link.py | 102 - .../admin_api/models/login_account_group.py | 92 - .../models/new_account_group_response.py | 106 - .../admin_api/models/pagination_links.py | 92 - .../models/pagination_links_links.py | 96 - admin_api/admin_api/models/permission.py | 94 - admin_api/admin_api/models/permissions.py | 95 - admin_api/admin_api/models/query_window.py | 94 - admin_api/admin_api/models/role.py | 94 - admin_api/admin_api/models/role_detail.py | 102 - .../admin_api/models/role_request_body.py | 90 - admin_api/admin_api/models/roles.py | 95 - admin_api/admin_api/models/self_links.py | 92 - .../admin_api/models/self_links_links.py | 92 - .../admin_api/models/unauthorized_error.py | 89 - admin_api/admin_api/models/user.py | 100 - .../admin_api/models/user_account_group.py | 106 - .../admin_api/models/user_account_groups.py | 95 - admin_api/admin_api/models/user_detail.py | 122 -- admin_api/admin_api/models/user_event.py | 110 - .../user_event_all_of_resources_inner.py | 90 - admin_api/admin_api/models/user_events.py | 96 - .../admin_api/models/user_request_body.py | 104 - admin_api/admin_api/models/users.py | 95 - admin_api/admin_api/rest.py | 231 -- admin_api/docs/AccountGroup.md | 32 - admin_api/docs/AccountGroupId.md | 28 - ...AccountGroupRolesAccountGroupRolesInner.md | 29 - admin_api/docs/Agent.md | 37 - admin_api/docs/AgentBase.md | 30 - admin_api/docs/CloudEnterpriseAgentType.md | 11 - admin_api/docs/ClusterMember.md | 37 - admin_api/docs/EnterpriseAgent.md | 51 - admin_api/docs/EnterpriseAgentIpv6Policy.md | 11 - admin_api/docs/EnterpriseAgentState.md | 11 - admin_api/docs/Error.md | 32 - admin_api/docs/ErrorDetail.md | 29 - admin_api/docs/ErrorDetailCode.md | 11 - admin_api/docs/Expand.md | 10 - admin_api/docs/InterfaceIpMapping.md | 29 - admin_api/docs/Link.md | 36 - admin_api/docs/PaginationLinks.md | 29 - admin_api/docs/PaginationLinksLinks.md | 29 - admin_api/docs/QueryWindow.md | 29 - admin_api/docs/SelfLinks.md | 28 - admin_api/docs/SelfLinksLinks.md | 29 - admin_api/docs/UnauthorizedError.md | 29 - admin_api/git_push.sh | 57 - admin_api/pyproject.toml | 30 - admin_api/setup.py | 49 - admin_api/test-requirements.txt | 3 - admin_api/test/test_account_group.py | 56 - admin_api/test/test_account_group1.py | 53 - admin_api/test/test_account_group_detail.py | 70 - admin_api/test/test_account_group_id.py | 52 - .../test/test_account_group_request_body.py | 54 - admin_api/test/test_account_group_roles.py | 58 - ...t_group_roles_account_group_roles_inner.py | 55 - ..._account_group_roles_request_body_inner.py | 53 - admin_api/test/test_account_groups.py | 54 - admin_api/test/test_account_groups_api.py | 66 - admin_api/test/test_agent.py | 61 - admin_api/test/test_agent_base.py | 54 - .../test/test_all_account_group_roles.py | 54 - admin_api/test/test_base_role.py | 54 - .../test/test_cloud_enterprise_agent_type.py | 34 - admin_api/test/test_cluster_member.py | 65 - .../test_create_account_group201_response.py | 77 - .../test/test_create_role201_response.py | 65 - .../test/test_create_user201_response.py | 76 - admin_api/test/test_created_user.py | 66 - admin_api/test/test_enterprise_agent.py | 89 - .../test/test_enterprise_agent_ipv6_policy.py | 34 - admin_api/test/test_enterprise_agent_state.py | 34 - admin_api/test/test_enterprise_agents.py | 54 - admin_api/test/test_error.py | 56 - admin_api/test/test_error_detail.py | 53 - admin_api/test/test_error_detail_code.py | 34 - admin_api/test/test_expand.py | 34 - admin_api/test/test_extended_user.py | 57 - .../test_get_account_group200_response.py | 80 - .../test_get_account_groups200_response.py | 64 - .../test/test_get_permissions200_response.py | 62 - admin_api/test/test_get_roles200_response.py | 64 - admin_api/test/test_get_user200_response.py | 77 - .../test/test_get_user_events200_response.py | 64 - admin_api/test/test_get_users200_response.py | 64 - admin_api/test/test_interface_ip_mapping.py | 53 - admin_api/test/test_link.py | 60 - admin_api/test/test_login_account_group.py | 52 - .../test/test_new_account_group_response.py | 67 - admin_api/test/test_pagination_links.py | 70 - admin_api/test/test_pagination_links_links.py | 69 - admin_api/test/test_permission.py | 55 - admin_api/test/test_permissions.py | 52 - admin_api/test/test_permissions_api.py | 38 - admin_api/test/test_query_window.py | 53 - admin_api/test/test_role.py | 55 - admin_api/test/test_role_detail.py | 55 - admin_api/test/test_role_request_body.py | 53 - admin_api/test/test_roles.py | 54 - admin_api/test/test_roles_api.py | 66 - admin_api/test/test_self_links.py | 61 - admin_api/test/test_self_links_links.py | 60 - admin_api/test/test_unauthorized_error.py | 53 - admin_api/test/test_user.py | 56 - admin_api/test/test_user_account_group.py | 59 - admin_api/test/test_user_account_groups.py | 62 - admin_api/test/test_user_detail.py | 67 - admin_api/test/test_user_event.py | 63 - .../test_user_event_all_of_resources_inner.py | 53 - admin_api/test/test_user_events.py | 52 - admin_api/test/test_user_events_api.py | 38 - admin_api/test/test_user_request_body.py | 60 - admin_api/test/test_users.py | 54 - admin_api/test/test_users_api.py | 66 - admin_api/tox.ini | 9 - {agents_api => agents}/.gitignore | 0 .../.openapi-generator-ignore | 0 agents/.openapi-generator/FILES | 200 ++ agents/.openapi-generator/VERSION | 1 + agents/README.md | 188 ++ agents/agents/__init__.py | 94 + agents/agents/api/__init__.py | 8 + ...enterprise_agent_notification_rules_api.py | 50 +- .../api/cloud_and_enterprise_agents_api.py | 156 +- .../api/enterprise_agent_cluster_api.py | 78 +- .../agents}/api/proxies_api.py | 37 +- agents/agents/api_client.py | 770 +++++++ agents/agents/api_response.py | 21 + agents/agents/configuration.py | 444 ++++ agents/agents/exceptions.py | 199 ++ agents/agents/models/__init__.py | 74 + agents/agents/models/account_group.py | 89 + agents/agents/models/account_group_id.py | 87 + agents/agents/models/agent.py | 124 ++ agents/agents/models/agent_base.py | 97 + agents/agents/models/agent_details.py | 154 ++ .../agents}/models/agent_details_expand.py | 12 +- .../agents}/models/agent_ipv6_policy.py | 12 +- .../agents}/models/agent_list_expand.py | 12 +- .../agents}/models/agent_proxies.py | 35 +- .../agents}/models/agent_proxy.py | 34 +- agents/agents/models/agent_request_body.py | 102 + .../agents}/models/agents.py | 34 +- .../agents}/models/alert_email.py | 31 +- .../agents}/models/alert_integration_base.py | 33 +- .../agents}/models/alert_integration_type.py | 12 +- ...assign_enterprise_agent_cluster_request.py | 31 +- agents/agents/models/cloud_agent_detail.py | 159 ++ .../agents}/models/cloud_enterprise_agent.py | 38 +- .../models/cloud_enterprise_agent_type.py | 38 + .../agents}/models/cloud_enterprise_agents.py | 34 +- agents/agents/models/cluster_member.py | 131 ++ agents/agents/models/enterprise_agent.py | 199 ++ .../models/enterprise_agent_cluster_detail.py | 244 +++ agents/agents/models/enterprise_agent_data.py | 160 ++ .../agents}/models/enterprise_agent_detail.py | 121 +- .../models/enterprise_agent_ipv6_policy.py | 38 + .../enterprise_agent_response_expands.py | 117 ++ .../agents/models/enterprise_agent_state.py | 38 + agents/agents/models/error.py | 95 + agents/agents/models/error_detail.py | 92 + agents/agents/models/error_detail_code.py | 43 + .../models/get_agent_proxies200_response.py | 39 +- .../agents}/models/get_agents200_response.py | 39 +- ...et_agents_notification_rule200_response.py | 45 +- ...t_agents_notification_rules200_response.py | 39 +- agents/agents/models/interface_ip_mapping.py | 93 + agents/agents/models/labels.py | 89 + agents/agents/models/link.py | 101 + agents/agents/models/notification.py | 110 + .../agents}/models/notification_rule.py | 33 +- .../models/notification_rule_detail.py | 41 +- .../agents}/models/notification_rules.py | 35 +- .../agents}/models/notifications.py | 34 +- .../agents}/models/proxy_auth_type.py | 12 +- .../agents}/models/proxy_type.py | 12 +- agents/agents/models/self_links.py | 91 + agents/agents/models/self_links_links.py | 91 + agents/agents/models/simple_agent.py | 121 ++ .../agents/models/simple_enterprise_agent.py | 196 ++ agents/agents/models/simple_test.py | 147 ++ agents/agents/models/simple_test_links.py | 101 + .../agents/models/simple_test_links_self.py | 101 + agents/agents/models/test_interval.py | 42 + agents/agents/models/test_type.py | 47 + ...n_enterprise_agent_from_cluster_request.py | 31 +- agents/agents/models/unauthorized_error.py | 89 + agents/agents/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../agents_api => agents/agents}/py.typed | 0 agents/agents/rest.py | 257 +++ agents/docs/AccountGroup.md | 30 + agents/docs/AccountGroupId.md | 29 + agents/docs/Agent.md | 39 + agents/docs/AgentBase.md | 31 + {agents_api => agents}/docs/AgentDetails.md | 16 +- .../docs/AgentDetailsExpand.md | 1 + .../docs/AgentIpv6Policy.md | 1 + .../docs/AgentListExpand.md | 1 + {agents_api => agents}/docs/AgentProxies.md | 7 +- {agents_api => agents}/docs/AgentProxy.md | 7 +- agents/docs/AgentRequestBody.md | 36 + {agents_api => agents}/docs/Agents.md | 7 +- {agents_api => agents}/docs/AlertEmail.md | 7 +- .../docs/AlertIntegrationBase.md | 7 +- .../docs/AlertIntegrationType.md | 1 + .../AssignEnterpriseAgentClusterRequest.md | 7 +- agents/docs/CloudAgentDetail.md | 42 + ...dAndEnterpriseAgentNotificationRulesApi.md | 44 +- .../docs/CloudAndEnterpriseAgentsApi.md | 118 +- .../docs/CloudEnterpriseAgent.md | 11 +- agents/docs/CloudEnterpriseAgentType.md | 12 + .../docs/CloudEnterpriseAgents.md | 7 +- agents/docs/ClusterMember.md | 38 + agents/docs/EnterpriseAgent.md | 52 + .../docs/EnterpriseAgentClusterApi.md | 64 +- agents/docs/EnterpriseAgentClusterDetail.md | 56 + agents/docs/EnterpriseAgentData.md | 41 + .../docs/EnterpriseAgentDetail.md | 12 +- agents/docs/EnterpriseAgentIpv6Policy.md | 12 + agents/docs/EnterpriseAgentResponseExpands.md | 31 + agents/docs/EnterpriseAgentState.md | 12 + agents/docs/Error.md | 33 + agents/docs/ErrorDetail.md | 30 + agents/docs/ErrorDetailCode.md | 12 + .../docs/GetAgentProxies200Response.md | 7 +- .../docs/GetAgents200Response.md | 7 +- .../GetAgentsNotificationRule200Response.md | 7 +- .../GetAgentsNotificationRules200Response.md | 7 +- agents/docs/InterfaceIpMapping.md | 30 + agents/docs/Labels.md | 30 + agents/docs/Link.md | 37 + agents/docs/Notification.md | 32 + .../docs/NotificationRule.md | 7 +- .../docs/NotificationRuleDetail.md | 7 +- .../docs/NotificationRules.md | 7 +- {agents_api => agents}/docs/Notifications.md | 7 +- {agents_api => agents}/docs/ProxiesApi.md | 23 +- {agents_api => agents}/docs/ProxyAuthType.md | 1 + {agents_api => agents}/docs/ProxyType.md | 1 + agents/docs/SelfLinks.md | 29 + agents/docs/SelfLinksLinks.md | 30 + agents/docs/SimpleAgent.md | 38 + agents/docs/SimpleEnterpriseAgent.md | 51 + agents/docs/SimpleTest.md | 43 + agents/docs/SimpleTestLinks.md | 31 + agents/docs/SimpleTestLinksSelf.md | 36 + agents/docs/TestInterval.md | 12 + agents/docs/TestType.md | 12 + ...assignEnterpriseAgentFromClusterRequest.md | 29 + agents/docs/UnauthorizedError.md | 30 + agents/docs/ValidationError.md | 34 + agents/docs/ValidationErrorAllOfErrors.md | 31 + agents/pyproject.toml | 71 + {agents_api => agents}/requirements.txt | 0 {agents_api => agents}/setup.cfg | 0 agents/setup.py | 49 + agents/test-requirements.txt | 5 + {agents_api => agents}/test/__init__.py | 0 agents/test/test_account_group.py | 52 + agents/test/test_account_group_id.py | 51 + agents/test/test_agent.py | 62 + agents/test/test_agent_base.py | 53 + agents/test/test_agent_details.py | 111 + .../test/test_agent_details_expand.py | 5 +- .../test/test_agent_ipv6_policy.py | 5 +- .../test/test_agent_list_expand.py | 5 +- .../test/test_agent_proxies.py | 9 +- .../test/test_agent_proxy.py | 7 +- agents/test/test_agent_request_body.py | 58 + {agents_api => agents}/test/test_agents.py | 7 +- .../test/test_alert_email.py | 5 +- .../test/test_alert_integration_base.py | 5 +- .../test/test_alert_integration_type.py | 5 +- ...assign_enterprise_agent_cluster_request.py | 5 +- agents/test/test_cloud_agent_detail.py | 80 + .../test/test_cloud_enterprise_agent.py | 20 +- .../test/test_cloud_enterprise_agent_type.py | 33 + .../test/test_cloud_enterprise_agents.py | 5 +- agents/test/test_cluster_member.py | 64 + agents/test/test_enterprise_agent.py | 89 + .../test_enterprise_agent_cluster_detail.py | 111 + agents/test/test_enterprise_agent_data.py | 77 + agents/test/test_enterprise_agent_detail.py | 111 + .../test/test_enterprise_agent_ipv6_policy.py | 33 + .../test_enterprise_agent_response_expands.py | 62 + agents/test/test_enterprise_agent_state.py | 33 + agents/test/test_error.py | 55 + agents/test/test_error_detail.py | 52 + agents/test/test_error_detail_code.py | 33 + .../test_get_agent_proxies200_response.py | 13 +- .../test/test_get_agents200_response.py | 9 +- ...et_agents_notification_rule200_response.py | 19 +- ...t_agents_notification_rules200_response.py | 9 +- agents/test/test_interface_ip_mapping.py | 52 + agents/test/test_labels.py | 52 + agents/test/test_link.py | 59 + agents/test/test_notification.py | 75 + .../test/test_notification_rule.py | 5 +- .../test/test_notification_rule_detail.py | 15 +- .../test/test_notification_rules.py | 5 +- .../test/test_notifications.py | 13 +- .../test/test_proxy_auth_type.py | 5 +- .../test/test_proxy_type.py | 5 +- agents/test/test_self_links.py | 60 + agents/test/test_self_links_links.py | 59 + agents/test/test_simple_agent.py | 60 + agents/test/test_simple_enterprise_agent.py | 87 + agents/test/test_simple_test.py | 66 + agents/test/test_simple_test_links.py | 52 + agents/test/test_simple_test_links_self.py | 59 + agents/test/test_test_interval.py | 33 + agents/test/test_test_type.py | 33 + ...n_enterprise_agent_from_cluster_request.py | 5 +- agents/test/test_unauthorized_error.py | 52 + agents/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + agents_api/.github/workflows/python.yml | 38 - agents_api/.gitlab-ci.yml | 31 - agents_api/.openapi-generator/FILES | 203 -- agents_api/.openapi-generator/VERSION | 1 - agents_api/.travis.yml | 17 - agents_api/README.md | 186 -- agents_api/agents_api/__init__.py | 92 - agents_api/agents_api/api/__init__.py | 8 - agents_api/agents_api/api_client.py | 741 ------- agents_api/agents_api/api_response.py | 21 - agents_api/agents_api/configuration.py | 434 ---- agents_api/agents_api/exceptions.py | 166 -- agents_api/agents_api/models/__init__.py | 72 - agents_api/agents_api/models/account_group.py | 90 - .../agents_api/models/account_group_id.py | 88 - agents_api/agents_api/models/agent.py | 121 -- agents_api/agents_api/models/agent_base.py | 98 - agents_api/agents_api/models/agent_detail.py | 143 -- agents_api/agents_api/models/agent_details.py | 145 -- .../models/cloud_enterprise_agent_type.py | 46 - .../agents_api/models/cluster_member.py | 131 -- .../agents_api/models/enterprise_agent.py | 199 -- .../models/enterprise_agent_ipv6_policy.py | 46 - .../models/enterprise_agent_request_body.py | 103 - .../models/enterprise_agent_state.py | 46 - agents_api/agents_api/models/error.py | 96 - agents_api/agents_api/models/error_detail.py | 93 - .../agents_api/models/error_detail_code.py | 51 - .../models/get_agent_details200_response.py | 237 --- .../agents_api/models/interface_ip_mapping.py | 94 - agents_api/agents_api/models/labels.py | 90 - agents_api/agents_api/models/link.py | 102 - agents_api/agents_api/models/notification.py | 111 - agents_api/agents_api/models/self_links.py | 92 - .../agents_api/models/self_links_links.py | 92 - agents_api/agents_api/models/simple_test.py | 134 -- agents_api/agents_api/models/test_interval.py | 50 - agents_api/agents_api/models/test_type.py | 55 - .../agents_api/models/unauthorized_error.py | 89 - .../models/unexpanded_instant_test.py | 127 -- .../models/unexpanded_instant_test_links.py | 98 - .../unexpanded_instant_test_links_self.py | 102 - ...xpanded_instant_test_links_test_results.py | 149 -- .../agents_api/models/unexpanded_test.py | 93 - ...te_enterprise_agent_details200_response.py | 237 --- agents_api/agents_api/rest.py | 231 -- agents_api/docs/AccountGroup.md | 29 - agents_api/docs/AccountGroupId.md | 28 - agents_api/docs/Agent.md | 37 - agents_api/docs/AgentBase.md | 30 - agents_api/docs/AgentDetail.md | 39 - agents_api/docs/CloudEnterpriseAgentType.md | 11 - agents_api/docs/ClusterMember.md | 37 - agents_api/docs/EnterpriseAgent.md | 51 - agents_api/docs/EnterpriseAgentIpv6Policy.md | 11 - agents_api/docs/EnterpriseAgentRequestBody.md | 35 - agents_api/docs/EnterpriseAgentState.md | 11 - agents_api/docs/Error.md | 32 - agents_api/docs/ErrorDetail.md | 29 - agents_api/docs/ErrorDetailCode.md | 11 - agents_api/docs/GetAgentDetails200Response.md | 55 - agents_api/docs/InterfaceIpMapping.md | 29 - agents_api/docs/Labels.md | 29 - agents_api/docs/Link.md | 36 - agents_api/docs/Notification.md | 31 - agents_api/docs/SelfLinks.md | 28 - agents_api/docs/SelfLinksLinks.md | 29 - agents_api/docs/SimpleTest.md | 42 - agents_api/docs/TestInterval.md | 11 - agents_api/docs/TestType.md | 11 - ...assignEnterpriseAgentFromClusterRequest.md | 28 - agents_api/docs/UnauthorizedError.md | 29 - agents_api/docs/UnexpandedInstantTest.md | 38 - agents_api/docs/UnexpandedInstantTestLinks.md | 30 - .../docs/UnexpandedInstantTestLinksSelf.md | 35 - .../UnexpandedInstantTestLinksTestResults.md | 35 - agents_api/docs/UnexpandedTest.md | 30 - ...UpdateEnterpriseAgentDetails200Response.md | 55 - agents_api/git_push.sh | 57 - agents_api/pyproject.toml | 30 - agents_api/setup.py | 49 - agents_api/test-requirements.txt | 3 - agents_api/test/test_account_group.py | 53 - agents_api/test/test_account_group_id.py | 52 - agents_api/test/test_agent.py | 61 - agents_api/test/test_agent_base.py | 54 - agents_api/test/test_agent_detail.py | 69 - agents_api/test/test_agent_details.py | 101 - ...enterprise_agent_notification_rules_api.py | 45 - .../test_cloud_and_enterprise_agents_api.py | 59 - .../test/test_cloud_enterprise_agent_type.py | 34 - agents_api/test/test_cluster_member.py | 65 - agents_api/test/test_enterprise_agent.py | 89 - .../test/test_enterprise_agent_cluster_api.py | 45 - .../test/test_enterprise_agent_detail.py | 101 - .../test/test_enterprise_agent_ipv6_policy.py | 34 - .../test_enterprise_agent_request_body.py | 59 - .../test/test_enterprise_agent_state.py | 34 - agents_api/test/test_error.py | 56 - agents_api/test/test_error_detail.py | 53 - agents_api/test/test_error_detail_code.py | 34 - .../test_get_agent_details200_response.py | 111 - agents_api/test/test_interface_ip_mapping.py | 53 - agents_api/test/test_labels.py | 53 - agents_api/test/test_link.py | 60 - agents_api/test/test_notification.py | 76 - agents_api/test/test_proxies_api.py | 38 - agents_api/test/test_self_links.py | 61 - agents_api/test/test_self_links_links.py | 60 - agents_api/test/test_simple_test.py | 67 - agents_api/test/test_test_interval.py | 34 - agents_api/test/test_test_type.py | 34 - agents_api/test/test_unauthorized_error.py | 53 - .../test/test_unexpanded_instant_test.py | 64 - .../test_unexpanded_instant_test_links.py | 53 - ...test_unexpanded_instant_test_links_self.py | 60 - ...xpanded_instant_test_links_test_results.py | 60 - agents_api/test/test_unexpanded_test.py | 54 - ...te_enterprise_agent_details200_response.py | 111 - agents_api/tox.ini | 9 - {alerts_api => alerts}/.gitignore | 0 .../.openapi-generator-ignore | 0 alerts/.openapi-generator/FILES | 201 ++ alerts/.openapi-generator/VERSION | 1 + alerts/README.md | 199 ++ alerts/alerts/__init__.py | 94 + alerts/alerts/api/__init__.py | 7 + .../alerts}/api/alert_rules_api.py | 132 +- .../api/alert_suppression_windows_api.py | 132 +- .../alerts}/api/alerts_api.py | 61 +- alerts/alerts/api_client.py | 770 +++++++ alerts/alerts/api_response.py | 21 + alerts/alerts/configuration.py | 444 ++++ alerts/alerts/exceptions.py | 199 ++ alerts/alerts/models/__init__.py | 75 + alerts/alerts/models/alert.py | 175 ++ alerts/alerts/models/alert_detail.py | 135 ++ alerts/alerts/models/alert_direction.py | 38 + alerts/alerts/models/alert_links.py | 91 + alerts/alerts/models/alert_links_links.py | 106 + alerts/alerts/models/alert_metric_detail.py | 106 + .../alerts/models/alert_metric_detail_end.py | 87 + .../models/alert_metric_detail_start.py | 87 + alerts/alerts/models/alert_metrics.py | 87 + .../models/alert_rounds_violation_mode.py | 37 + alerts/alerts/models/alert_rule.py | 129 ++ .../alerts/models/alert_suppression_window.py | 113 + .../alert_suppression_window_request.py | 115 + .../models/alert_suppression_window_state.py | 38 + .../models/alert_suppression_windows.py | 95 + ...windows_alert_suppression_windows_inner.py | 119 ++ alerts/alerts/models/alert_type.py | 62 + alerts/alerts/models/alerts.py | 95 + alerts/alerts/models/base_alert.py | 119 ++ .../alerts/models/base_alert_all_of_meta.py | 87 + alerts/alerts/models/base_test.py | 102 + .../complete_alert_suppression_window.py | 123 ++ .../models/create_alert_rule201_response.py | 133 ++ .../create_suppression_windows201_response.py | 129 ++ alerts/alerts/models/days_of_week.py | 42 + alerts/alerts/models/end_repeat.py | 93 + alerts/alerts/models/end_repeat_type.py | 38 + alerts/alerts/models/error.py | 95 + alerts/alerts/models/expand.py | 36 + .../get_alert_rule_details200_response.py | 143 ++ .../alerts/models/get_alerts200_response.py | 101 + .../models/get_alerts_rules200_response.py | 101 + .../get_suppression_windows200_response.py | 101 + alerts/alerts/models/interval_type.py | 38 + alerts/alerts/models/legacy_alert.py | 131 ++ alerts/alerts/models/link.py | 101 + alerts/alerts/models/notification.py | 111 + alerts/alerts/models/notification_email.py | 89 + .../alerts/models/notification_third_party.py | 90 + alerts/alerts/models/notification_webhook.py | 90 + alerts/alerts/models/pagination_links.py | 91 + .../alerts/models/pagination_links_links.py | 101 + alerts/alerts/models/repeat.py | 96 + alerts/alerts/models/repeat_type.py | 39 + alerts/alerts/models/rule.py | 119 ++ alerts/alerts/models/rule_detail.py | 137 ++ alerts/alerts/models/rule_detail_update.py | 127 ++ alerts/alerts/models/rules.py | 95 + alerts/alerts/models/self_links.py | 91 + alerts/alerts/models/self_links_links.py | 91 + alerts/alerts/models/severity.py | 40 + alerts/alerts/models/state.py | 37 + alerts/alerts/models/test_interval.py | 42 + .../models/third_party_integration_type.py | 37 + alerts/alerts/models/unauthorized_error.py | 89 + alerts/alerts/models/unexpanded_test.py | 92 + alerts/alerts/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../alerts/models/webhook_integration_type.py | 36 + .../alerts_api => alerts/alerts}/py.typed | 0 alerts/alerts/rest.py | 257 +++ alerts/docs/Alert.md | 48 + {alerts_api => alerts}/docs/AlertDetail.md | 11 +- alerts/docs/AlertDirection.md | 12 + {alerts_api => alerts}/docs/AlertLinks.md | 9 +- alerts/docs/AlertLinksLinks.md | 33 + .../docs/AlertMetricDetail.md | 7 +- .../docs/AlertMetricDetailEnd.md | 7 +- .../docs/AlertMetricDetailStart.md | 7 +- {alerts_api => alerts}/docs/AlertMetrics.md | 7 +- alerts/docs/AlertRoundsViolationMode.md | 12 + alerts/docs/AlertRule.md | 40 + {alerts_api => alerts}/docs/AlertRulesApi.md | 115 +- .../docs/AlertSuppressionWindow.md | 7 +- .../docs/AlertSuppressionWindowRequest.md | 7 +- .../docs/AlertSuppressionWindowState.md | 1 + .../docs/AlertSuppressionWindows.md | 7 +- ...sionWindowsAlertSuppressionWindowsInner.md | 7 +- .../docs/AlertSuppressionWindowsApi.md | 127 +- alerts/docs/AlertType.md | 12 + {alerts_api => alerts}/docs/Alerts.md | 7 +- {alerts_api => alerts}/docs/AlertsApi.md | 46 +- {alerts_api => alerts}/docs/BaseAlert.md | 11 +- alerts/docs/BaseAlertAllOfMeta.md | 29 + alerts/docs/BaseTest.md | 32 + .../docs/CompleteAlertSuppressionWindow.md | 7 +- .../docs/CreateAlertRule201Response.md | 9 +- .../CreateSuppressionWindows201Response.md | 7 +- {alerts_api => alerts}/docs/DaysOfWeek.md | 1 + {alerts_api => alerts}/docs/EndRepeat.md | 7 +- {alerts_api => alerts}/docs/EndRepeatType.md | 1 + alerts/docs/Error.md | 33 + alerts/docs/Expand.md | 11 + .../docs/GetAlertRuleDetails200Response.md | 9 +- .../docs/GetAlerts200Response.md | 7 +- .../docs/GetAlertsRules200Response.md | 7 +- .../docs/GetSuppressionWindows200Response.md | 7 +- {alerts_api => alerts}/docs/IntervalType.md | 1 + alerts/docs/LegacyAlert.md | 36 + alerts/docs/Link.md | 37 + alerts/docs/Notification.md | 32 + .../docs/NotificationEmail.md | 7 +- .../docs/NotificationThirdParty.md | 7 +- .../docs/NotificationWebhook.md | 7 +- alerts/docs/PaginationLinks.md | 30 + alerts/docs/PaginationLinksLinks.md | 31 + {alerts_api => alerts}/docs/Repeat.md | 7 +- {alerts_api => alerts}/docs/RepeatType.md | 1 + {alerts_api => alerts}/docs/Rule.md | 9 +- {alerts_api => alerts}/docs/RuleDetail.md | 9 +- .../docs/RuleDetailUpdate.md | 9 +- {alerts_api => alerts}/docs/Rules.md | 7 +- alerts/docs/SelfLinks.md | 29 + alerts/docs/SelfLinksLinks.md | 30 + alerts/docs/Severity.md | 12 + {alerts_api => alerts}/docs/State.md | 1 + alerts/docs/TestInterval.md | 12 + .../docs/ThirdPartyIntegrationType.md | 1 + alerts/docs/UnauthorizedError.md | 30 + alerts/docs/UnexpandedTest.md | 31 + alerts/docs/ValidationError.md | 34 + alerts/docs/ValidationErrorAllOfErrors.md | 31 + .../docs/WebhookIntegrationType.md | 1 + alerts/pyproject.toml | 71 + {alerts_api => alerts}/requirements.txt | 0 {alerts_api => alerts}/setup.cfg | 0 alerts/setup.py | 49 + alerts/test-requirements.txt | 5 + {alerts_api => alerts}/test/__init__.py | 0 alerts/test/test_alert.py | 93 + alerts/test/test_alert_detail.py | 91 + alerts/test/test_alert_direction.py | 33 + alerts/test/test_alert_links.py | 71 + alerts/test/test_alert_links_links.py | 86 + alerts/test/test_alert_metric_detail.py | 56 + alerts/test/test_alert_metric_detail_end.py | 51 + alerts/test/test_alert_metric_detail_start.py | 51 + alerts/test/test_alert_metrics.py | 51 + .../test/test_alert_rounds_violation_mode.py | 33 + alerts/test/test_alert_rule.py | 62 + alerts/test/test_alert_suppression_window.py | 67 + .../test_alert_suppression_window_request.py | 70 + .../test_alert_suppression_window_state.py | 33 + alerts/test/test_alert_suppression_windows.py | 53 + ...windows_alert_suppression_windows_inner.py | 77 + alerts/test/test_alert_type.py | 33 + alerts/test/test_alerts.py | 53 + alerts/test/test_base_alert.py | 80 + alerts/test/test_base_alert_all_of_meta.py | 51 + alerts/test/test_base_test.py | 68 + .../test_complete_alert_suppression_window.py | 70 + .../test_create_alert_rule201_response.py | 93 + ..._create_suppression_windows201_response.py | 80 + alerts/test/test_days_of_week.py | 33 + alerts/test/test_end_repeat.py | 53 + alerts/test/test_end_repeat_type.py | 33 + alerts/test/test_error.py | 55 + alerts/test/test_expand.py | 33 + ...test_get_alert_rule_details200_response.py | 95 + alerts/test/test_get_alerts200_response.py | 73 + .../test/test_get_alerts_rules200_response.py | 77 + ...est_get_suppression_windows200_response.py | 63 + alerts/test/test_interval_type.py | 33 + alerts/test/test_legacy_alert.py | 60 + alerts/test/test_link.py | 59 + alerts/test/test_notification.py | 63 + alerts/test/test_notification_email.py | 52 + alerts/test/test_notification_third_party.py | 52 + alerts/test/test_notification_webhook.py | 52 + alerts/test/test_pagination_links.py | 70 + alerts/test/test_pagination_links_links.py | 77 + alerts/test/test_repeat.py | 56 + alerts/test/test_repeat_type.py | 33 + alerts/test/test_rule.py | 69 + alerts/test/test_rule_detail.py | 85 + alerts/test/test_rule_detail_update.py | 83 + alerts/test/test_rules.py | 67 + alerts/test/test_self_links.py | 60 + alerts/test/test_self_links_links.py | 59 + alerts/test/test_severity.py | 33 + alerts/test/test_state.py | 33 + alerts/test/test_test_interval.py | 33 + .../test/test_third_party_integration_type.py | 33 + alerts/test/test_unauthorized_error.py | 52 + alerts/test/test_unexpanded_test.py | 53 + alerts/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + alerts/test/test_webhook_integration_type.py | 33 + alerts_api/.github/workflows/python.yml | 38 - alerts_api/.gitlab-ci.yml | 31 - alerts_api/.openapi-generator/FILES | 206 -- alerts_api/.openapi-generator/VERSION | 1 - alerts_api/.travis.yml | 17 - alerts_api/README.md | 191 -- alerts_api/alerts_api/__init__.py | 93 - alerts_api/alerts_api/api/__init__.py | 7 - alerts_api/alerts_api/api_client.py | 741 ------- alerts_api/alerts_api/api_response.py | 21 - alerts_api/alerts_api/configuration.py | 434 ---- alerts_api/alerts_api/exceptions.py | 166 -- alerts_api/alerts_api/models/__init__.py | 74 - alerts_api/alerts_api/models/alert.py | 121 -- alerts_api/alerts_api/models/alert_detail.py | 127 -- alerts_api/alerts_api/models/alert_links.py | 92 - .../alerts_api/models/alert_metric_detail.py | 107 - .../models/alert_metric_detail_end.py | 87 - .../models/alert_metric_detail_start.py | 87 - alerts_api/alerts_api/models/alert_metrics.py | 87 - .../models/alert_rounds_violation_mode.py | 45 - alerts_api/alerts_api/models/alert_rule.py | 127 -- .../models/alert_suppression_window.py | 113 - .../alert_suppression_window_request.py | 115 - .../models/alert_suppression_window_state.py | 46 - .../models/alert_suppression_windows.py | 96 - ...windows_alert_suppression_windows_inner.py | 119 -- alerts_api/alerts_api/models/alert_type.py | 68 - alerts_api/alerts_api/models/alerts.py | 95 - alerts_api/alerts_api/models/app_links.py | 92 - .../alerts_api/models/app_links_links.py | 92 - alerts_api/alerts_api/models/base_alert.py | 111 - alerts_api/alerts_api/models/base_test.py | 103 - .../complete_alert_suppression_window.py | 123 -- .../models/create_alert_rule201_response.py | 134 -- .../create_suppression_windows201_response.py | 129 -- alerts_api/alerts_api/models/days_of_week.py | 50 - alerts_api/alerts_api/models/end_repeat.py | 93 - .../alerts_api/models/end_repeat_type.py | 46 - alerts_api/alerts_api/models/error.py | 96 - alerts_api/alerts_api/models/expand.py | 44 - .../get_alert_rule_details200_response.py | 144 -- .../models/get_alerts200_response.py | 102 - .../models/get_alerts_rules200_response.py | 102 - .../get_suppression_windows200_response.py | 102 - alerts_api/alerts_api/models/interval_type.py | 46 - alerts_api/alerts_api/models/link.py | 102 - alerts_api/alerts_api/models/notification.py | 112 - .../alerts_api/models/notification_email.py | 90 - .../models/notification_third_party.py | 91 - .../alerts_api/models/notification_webhook.py | 91 - .../alerts_api/models/pagination_links.py | 92 - .../models/pagination_links_links.py | 96 - alerts_api/alerts_api/models/repeat.py | 97 - alerts_api/alerts_api/models/repeat_type.py | 47 - alerts_api/alerts_api/models/rule.py | 120 -- alerts_api/alerts_api/models/rule_detail.py | 138 -- .../alerts_api/models/rule_detail_update.py | 128 -- alerts_api/alerts_api/models/rule_links.py | 92 - .../alerts_api/models/rule_links_links.py | 91 - alerts_api/alerts_api/models/rules.py | 96 - alerts_api/alerts_api/models/self_links.py | 92 - .../alerts_api/models/self_links_links.py | 92 - alerts_api/alerts_api/models/severity.py | 48 - alerts_api/alerts_api/models/state.py | 45 - .../alerts_api/models/test_direction.py | 46 - alerts_api/alerts_api/models/test_interval.py | 50 - .../models/third_party_integration_type.py | 45 - .../alerts_api/models/unauthorized_error.py | 89 - .../alerts_api/models/unexpanded_test.py | 93 - .../models/webhook_integration_type.py | 44 - alerts_api/alerts_api/rest.py | 231 -- alerts_api/docs/Alert.md | 37 - alerts_api/docs/AlertRoundsViolationMode.md | 11 - alerts_api/docs/AlertRule.md | 38 - alerts_api/docs/AlertType.md | 11 - alerts_api/docs/AppLinks.md | 28 - alerts_api/docs/AppLinksLinks.md | 29 - alerts_api/docs/BaseTest.md | 31 - alerts_api/docs/Error.md | 32 - alerts_api/docs/Expand.md | 10 - alerts_api/docs/Link.md | 36 - alerts_api/docs/Notification.md | 31 - alerts_api/docs/PaginationLinks.md | 29 - alerts_api/docs/PaginationLinksLinks.md | 29 - alerts_api/docs/RuleLinks.md | 28 - alerts_api/docs/RuleLinksLinks.md | 29 - alerts_api/docs/SelfLinks.md | 28 - alerts_api/docs/SelfLinksLinks.md | 29 - alerts_api/docs/Severity.md | 11 - alerts_api/docs/TestDirection.md | 11 - alerts_api/docs/TestInterval.md | 11 - alerts_api/docs/UnauthorizedError.md | 29 - alerts_api/docs/UnexpandedTest.md | 30 - alerts_api/git_push.sh | 57 - alerts_api/pyproject.toml | 30 - alerts_api/setup.py | 49 - alerts_api/test-requirements.txt | 3 - alerts_api/test/test_alert.py | 70 - alerts_api/test/test_alert_detail.py | 78 - alerts_api/test/test_alert_links.py | 61 - alerts_api/test/test_alert_metric_detail.py | 57 - .../test/test_alert_metric_detail_end.py | 52 - .../test/test_alert_metric_detail_start.py | 52 - alerts_api/test/test_alert_metrics.py | 52 - .../test/test_alert_rounds_violation_mode.py | 34 - alerts_api/test/test_alert_rule.py | 62 - alerts_api/test/test_alert_rules_api.py | 66 - .../test/test_alert_suppression_window.py | 68 - .../test_alert_suppression_window_request.py | 71 - .../test_alert_suppression_window_state.py | 34 - .../test/test_alert_suppression_windows.py | 54 - ...windows_alert_suppression_windows_inner.py | 78 - .../test_alert_suppression_windows_api.py | 66 - alerts_api/test/test_alert_type.py | 34 - alerts_api/test/test_alerts.py | 54 - alerts_api/test/test_alerts_api.py | 45 - alerts_api/test/test_app_links.py | 61 - alerts_api/test/test_app_links_links.py | 60 - alerts_api/test/test_base_alert.py | 67 - alerts_api/test/test_base_test.py | 68 - .../test_complete_alert_suppression_window.py | 71 - .../test_create_alert_rule201_response.py | 96 - ..._create_suppression_windows201_response.py | 81 - alerts_api/test/test_days_of_week.py | 34 - alerts_api/test/test_end_repeat.py | 54 - alerts_api/test/test_end_repeat_type.py | 34 - alerts_api/test/test_error.py | 56 - alerts_api/test/test_expand.py | 34 - ...test_get_alert_rule_details200_response.py | 96 - .../test/test_get_alerts200_response.py | 73 - .../test/test_get_alerts_rules200_response.py | 78 - ...est_get_suppression_windows200_response.py | 64 - alerts_api/test/test_interval_type.py | 34 - alerts_api/test/test_link.py | 60 - alerts_api/test/test_notification.py | 64 - alerts_api/test/test_notification_email.py | 53 - .../test/test_notification_third_party.py | 53 - alerts_api/test/test_notification_webhook.py | 53 - alerts_api/test/test_pagination_links.py | 70 - .../test/test_pagination_links_links.py | 69 - alerts_api/test/test_repeat.py | 57 - alerts_api/test/test_repeat_type.py | 34 - alerts_api/test/test_rule.py | 70 - alerts_api/test/test_rule_detail.py | 86 - alerts_api/test/test_rule_detail_update.py | 86 - alerts_api/test/test_rule_links.py | 61 - alerts_api/test/test_rule_links_links.py | 60 - alerts_api/test/test_rules.py | 68 - alerts_api/test/test_self_links.py | 61 - alerts_api/test/test_self_links_links.py | 60 - alerts_api/test/test_severity.py | 34 - alerts_api/test/test_state.py | 34 - alerts_api/test/test_test_direction.py | 34 - alerts_api/test/test_test_interval.py | 34 - .../test/test_third_party_integration_type.py | 34 - alerts_api/test/test_unauthorized_error.py | 53 - alerts_api/test/test_unexpanded_test.py | 54 - .../test/test_webhook_integration_type.py | 34 - alerts_api/tox.ini | 9 - {credentials_api => credentials}/.gitignore | 0 .../.openapi-generator-ignore | 0 credentials/.openapi-generator/FILES | 56 + credentials/.openapi-generator/VERSION | 1 + credentials/README.md | 146 ++ credentials/credentials/__init__.py | 45 + credentials/credentials/api/__init__.py | 5 + .../credentials}/api/credentials_api.py | 135 +- credentials/credentials/api_client.py | 770 +++++++ credentials/credentials/api_response.py | 21 + credentials/credentials/configuration.py | 444 ++++ credentials/credentials/exceptions.py | 199 ++ credentials/credentials/models/__init__.py | 28 + credentials/credentials/models/credential.py | 97 + .../credentials/models/credential_request.py | 89 + .../models/credential_without_value.py | 95 + credentials/credentials/models/credentials.py | 95 + credentials/credentials/models/error.py | 95 + ...tion_tests_credentials_list200_response.py | 101 + credentials/credentials/models/link.py | 101 + credentials/credentials/models/self_links.py | 91 + .../credentials/models/self_links_links.py | 91 + .../credentials/models/unauthorized_error.py | 89 + .../credentials/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../credentials}/py.typed | 0 credentials/credentials/rest.py | 257 +++ .../docs/Credential.md | 7 +- .../docs/CredentialRequest.md | 7 +- .../docs/CredentialWithoutValue.md | 7 +- .../docs/Credentials.md | 7 +- .../docs/CredentialsApi.md | 115 +- credentials/docs/Error.md | 33 + ...nsactionTestsCredentialsList200Response.md | 30 + credentials/docs/Link.md | 37 + credentials/docs/SelfLinks.md | 29 + credentials/docs/SelfLinksLinks.md | 30 + credentials/docs/UnauthorizedError.md | 30 + credentials/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + credentials/pyproject.toml | 71 + .../requirements.txt | 0 {credentials_api => credentials}/setup.cfg | 0 credentials/setup.py | 49 + credentials/test-requirements.txt | 5 + .../test/__init__.py | 0 credentials/test/test_credential.py | 63 + credentials/test/test_credential_request.py | 52 + .../test/test_credential_without_value.py | 62 + credentials/test/test_credentials.py | 53 + credentials/test/test_error.py | 55 + ...tion_tests_credentials_list200_response.py | 63 + credentials/test/test_link.py | 59 + credentials/test/test_self_links.py | 60 + credentials/test/test_self_links_links.py | 59 + credentials/test/test_unauthorized_error.py | 52 + credentials/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + credentials_api/.github/workflows/python.yml | 38 - credentials_api/.gitlab-ci.yml | 31 - credentials_api/.openapi-generator/FILES | 56 - credentials_api/.openapi-generator/VERSION | 1 - credentials_api/.travis.yml | 17 - credentials_api/README.md | 141 -- credentials_api/credentials_api/__init__.py | 43 - .../credentials_api/api/__init__.py | 5 - credentials_api/credentials_api/api_client.py | 741 ------- .../credentials_api/api_response.py | 21 - .../credentials_api/configuration.py | 434 ---- credentials_api/credentials_api/exceptions.py | 166 -- .../credentials_api/models/__init__.py | 26 - .../credentials_api/models/credential.py | 98 - .../models/credential_request.py | 90 - .../models/credential_without_value.py | 96 - .../credentials_api/models/credentials.py | 95 - .../credentials_api/models/error.py | 96 - ...tion_tests_credentials_list200_response.py | 102 - .../credentials_api/models/link.py | 102 - .../credentials_api/models/self_links.py | 92 - .../models/self_links_links.py | 92 - .../models/unauthorized_error.py | 89 - credentials_api/credentials_api/rest.py | 231 -- credentials_api/docs/Error.md | 32 - ...nsactionTestsCredentialsList200Response.md | 29 - credentials_api/docs/Link.md | 36 - credentials_api/docs/SelfLinks.md | 28 - credentials_api/docs/SelfLinksLinks.md | 29 - credentials_api/docs/UnauthorizedError.md | 29 - credentials_api/git_push.sh | 57 - credentials_api/pyproject.toml | 30 - credentials_api/setup.py | 49 - credentials_api/test-requirements.txt | 3 - credentials_api/test/test_credential.py | 64 - .../test/test_credential_request.py | 53 - .../test/test_credential_without_value.py | 63 - credentials_api/test/test_credentials.py | 54 - credentials_api/test/test_credentials_api.py | 66 - credentials_api/test/test_error.py | 56 - ...tion_tests_credentials_list200_response.py | 64 - credentials_api/test/test_link.py | 60 - credentials_api/test/test_self_links.py | 61 - credentials_api/test/test_self_links_links.py | 60 - .../test/test_unauthorized_error.py | 53 - credentials_api/tox.ini | 9 - {dashboards_api => dashboards}/.gitignore | 0 .../.openapi-generator-ignore | 0 dashboards/.openapi-generator/FILES | 381 ++++ dashboards/.openapi-generator/VERSION | 1 + dashboards/README.md | 255 +++ dashboards/dashboards/__init__.py | 154 ++ dashboards/dashboards/api/__init__.py | 7 + .../api/dashboard_snapshots_api.py | 199 +- .../dashboards}/api/dashboards_api.py | 252 ++- .../dashboards/api/dashboards_filters_api.py | 1553 ++++++++++++++ dashboards/dashboards/api_client.py | 770 +++++++ dashboards/dashboards/api_response.py | 21 + dashboards/dashboards/configuration.py | 444 ++++ dashboards/dashboards/exceptions.py | 199 ++ dashboards/dashboards/models/__init__.py | 135 ++ .../models/agent_status_datasource.py | 15 +- .../models/alert_list_alert_type.py | 58 + .../models/alert_list_datasource.py | 15 +- .../dashboards}/models/api_agent_location.py | 33 +- .../models/api_agent_status_agent.py | 104 + .../models/api_agent_status_ip_info.py | 33 +- .../models/api_agent_status_summary.py | 33 +- .../models/api_agent_status_widget.py | 154 ++ .../models/api_agent_widget_show.py | 37 + .../models/api_agent_widget_type.py | 37 + .../models/api_aggregate_property.py | 14 +- .../models/api_alert_list_alert.py | 36 +- .../models/api_alert_list_widget.py | 159 ++ ..._alert_list_widget_all_of_active_within.py | 37 +- .../models/api_box_and_whiskers_widget.py | 158 ++ .../models/api_color_grid_widget.py | 170 ++ .../models/api_context_filter_request.py | 99 + .../models/api_context_filter_response.py | 125 ++ .../models/api_context_filters_response.py | 95 + dashboards/dashboards/models/api_dashboard.py | 178 ++ .../dashboards}/models/api_dashboard_asw.py | 36 +- .../api_dashboard_filter_user_details.py | 89 + .../models/api_dashboard_snapshot.py | 138 ++ .../models/api_data_point_group.py | 33 +- .../models/api_data_source_filter.py | 91 + .../models/api_data_source_filters.py | 97 + .../models/api_default_timespan.py | 32 +- dashboards/dashboards/models/api_duration.py | 90 + .../dashboards/models/api_duration_unit.py | 38 + .../dashboards/models/api_geo_map_widget.py | 166 ++ .../dashboards}/models/api_graphlet_point.py | 33 +- .../models/api_grouped_barchart_widget.py | 165 ++ .../models/api_multi_metric_column.py | 107 + .../models/api_multi_metric_column_data.py | 41 +- .../models/api_multi_metric_table_widget.py | 171 ++ ...search_filter_api_test_table_filter_key.py | 34 +- .../dashboards/models/api_numbers_card.py | 126 ++ .../models/api_numbers_card_data.py | 36 +- .../models/api_numbers_card_widget.py | 158 ++ .../dashboards/models/api_pie_chart_widget.py | 151 ++ .../api_report_data_component_label_map.py | 37 +- ...i_report_data_component_label_map_entry.py | 33 +- .../models/api_report_snapshot_time_span.py | 92 + .../models/api_stacked_area_chart_widget.py | 158 ++ .../models/api_stacked_barchart_widget.py | 163 ++ .../dashboards/models/api_table_widget.py | 163 ++ .../dashboards}/models/api_test_table_data.py | 37 +- .../models/api_test_table_graphlets_data.py | 37 +- .../models/api_test_table_widget.py | 159 ++ .../models/api_timeseries_widget.py | 162 ++ .../dashboards}/models/api_widget.py | 64 +- .../models/api_widget_data_point.py | 37 +- .../models/api_widget_data_response.py | 103 + ...widget_filter_api_test_table_filter_key.py | 98 + .../models/api_widget_fixed_y_scale_prefix.py | 14 +- .../dashboards}/models/api_widget_measure.py | 35 +- .../models/api_widget_sort_direction.py | 37 + .../models/api_widget_sort_property.py | 37 + .../dashboards}/models/api_widgets_data_v2.py | 65 +- .../dashboards/models/app_and_self_links.py | 91 + .../models/app_and_self_links_links.py | 96 + .../dashboards}/models/asw_repeat.py | 14 +- .../dashboards/models/asw_repeat_unit.py | 38 + .../models/box_and_whiskers_datasource.py | 15 +- .../models/color_grid_datasource.py | 15 +- .../create_dashboard_snapshot201_response.py | 93 + dashboards/dashboards/models/dashboard.py | 154 ++ .../models/dashboard_global_filter_id.py | 87 + .../dashboards/models/dashboard_links.py | 91 + .../models/dashboard_links_links.py | 96 + .../dashboards}/models/dashboard_metric.py | 26 +- .../models/dashboard_metric_direction.py | 14 +- .../dashboards/models/dashboard_order.py | 37 + .../models/dashboard_snapshot_id.py | 87 + .../models/dashboard_snapshots200_response.py | 103 + .../models/dashboard_snapshots_page.py | 97 + .../dashboards/models/default_timespan.py | 98 + .../models/enterprise_agent_state.py | 38 + dashboards/dashboards/models/error.py | 95 + .../generate_dashboard_snapshot_request.py | 32 +- .../dashboards}/models/geo_map_datasource.py | 15 +- .../models/get_dashboard_data200_response.py | 118 ++ .../models/grouped_bar_chart_datasource.py | 15 +- .../models/legacy_agent_widget_show.py | 37 + .../models/legacy_agent_widget_type.py | 37 + .../models/legacy_alert_list_alert_type.py | 58 + .../dashboards/models/legacy_api_dashboard.py | 109 + .../models/legacy_dashboard_snapshot.py | 95 + .../models/legacy_default_timespan.py | 91 + .../dashboards/models/legacy_duration_unit.py | 38 + .../models/legacy_widget_sort_direction.py | 37 + .../models/legacy_widget_sort_property.py | 37 + dashboards/dashboards/models/link.py | 101 + .../dashboards}/models/metric_group.py | 17 +- .../models/multi_metrics_table_datasource.py | 15 +- .../models/numbers_card_datasource.py | 15 +- .../dashboards/models/pagination_links.py | 91 + .../models/pagination_links_links.py | 101 + .../models/pie_chart_datasource.py | 15 +- dashboards/dashboards/models/query_window.py | 94 + .../dashboards}/models/scalable_widget.py | 37 +- dashboards/dashboards/models/self_links.py | 91 + .../dashboards/models/self_links_links.py | 91 + .../snapshot_data_by_widget200_response.py | 118 ++ .../models/stacked_area_chart_datasource.py | 15 +- .../models/stacked_bar_chart_datasource.py | 15 +- .../dashboards}/models/table_datasource.py | 15 +- .../models/test_table_datasource.py | 48 + .../models/test_table_filter_key.py | 14 +- .../models/test_table_filter_type.py | 37 + .../models/timeseries_datasource.py | 15 +- .../dashboards/models/unauthorized_error.py | 89 + ...te_snapshot_expiration_date_api_request.py | 90 + .../dashboards/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + dashboards/dashboards/models/visual_mode.py | 37 + dashboards/dashboards/models/widget.py | 135 ++ .../dashboards}/models/widget_measure_type.py | 14 +- .../dashboards}/models/widget_type.py | 14 +- .../dashboards}/py.typed | 0 dashboards/dashboards/rest.py | 257 +++ .../docs/AgentStatusDatasource.md | 1 + dashboards/docs/AlertListAlertType.md | 12 + .../docs/AlertListDatasource.md | 1 + .../docs/ApiAgentLocation.md | 7 +- .../docs/ApiAgentStatusAgent.md | 7 +- .../docs/ApiAgentStatusIpInfo.md | 7 +- .../docs/ApiAgentStatusSummary.md | 7 +- dashboards/docs/ApiAgentStatusWidget.md | 46 + dashboards/docs/ApiAgentWidgetShow.md | 12 + dashboards/docs/ApiAgentWidgetType.md | 12 + .../docs/ApiAggregateProperty.md | 1 + .../docs/ApiAlertListAlert.md | 9 +- .../docs/ApiAlertListWidget.md | 15 +- .../ApiAlertListWidgetAllOfActiveWithin.md | 30 + .../docs/ApiBoxAndWhiskersWidget.md | 15 +- .../docs/ApiColorGridWidget.md | 19 +- dashboards/docs/ApiContextFilterRequest.md | 32 + dashboards/docs/ApiContextFilterResponse.md | 39 + dashboards/docs/ApiContextFiltersResponse.md | 30 + dashboards/docs/ApiDashboard.md | 53 + .../docs/ApiDashboardAsw.md | 7 +- .../docs/ApiDashboardFilterUserDetails.md | 31 + dashboards/docs/ApiDashboardSnapshot.md | 44 + .../docs/ApiDataPointGroup.md | 7 +- dashboards/docs/ApiDataSourceFilter.md | 32 + dashboards/docs/ApiDataSourceFilters.md | 31 + .../docs/ApiDefaultTimespan.md | 7 +- dashboards/docs/ApiDuration.md | 31 + dashboards/docs/ApiDurationUnit.md | 12 + .../docs/ApiGeoMapWidget.md | 19 +- .../docs/ApiGraphletPoint.md | 7 +- .../docs/ApiGroupedBarchartWidget.md | 17 +- dashboards/docs/ApiMultiMetricColumn.md | 36 + .../docs/ApiMultiMetricColumnData.md | 7 +- .../docs/ApiMultiMetricTableWidget.md | 17 +- ...iMultiSearchFilterApiTestTableFilterKey.md | 7 +- dashboards/docs/ApiNumbersCard.md | 43 + .../docs/ApiNumbersCardData.md | 7 +- .../docs/ApiNumbersCardWidget.md | 13 +- .../docs/ApiPieChartWidget.md | 13 +- .../docs/ApiReportDataComponentLabelMap.md | 7 +- .../ApiReportDataComponentLabelMapEntry.md | 7 +- .../docs/ApiReportSnapshotTimeSpan.md | 8 +- .../docs/ApiStackedAreaChartWidget.md | 15 +- .../docs/ApiStackedBarchartWidget.md | 17 +- .../docs/ApiTableWidget.md | 17 +- .../docs/ApiTestTableData.md | 7 +- .../docs/ApiTestTableGraphletsData.md | 7 +- .../docs/ApiTestTableWidget.md | 13 +- .../docs/ApiTimeseriesWidget.md | 15 +- .../docs/ApiWidget.md | 25 +- .../docs/ApiWidgetDataPoint.md | 7 +- .../docs/ApiWidgetDataResponse.md | 7 +- .../ApiWidgetFilterApiTestTableFilterKey.md | 7 +- .../docs/ApiWidgetFixedYScalePrefix.md | 1 + .../docs/ApiWidgetMeasure.md | 7 +- dashboards/docs/ApiWidgetSortDirection.md | 12 + dashboards/docs/ApiWidgetSortProperty.md | 12 + .../docs/ApiWidgetsDataV2.md | 7 +- dashboards/docs/AppAndSelfLinks.md | 29 + dashboards/docs/AppAndSelfLinksLinks.md | 31 + .../docs/AswRepeat.md | 1 + .../docs/AswRepeatUnit.md | 1 + .../docs/BoxAndWhiskersDatasource.md | 1 + .../docs/ColorGridDatasource.md | 1 + .../CreateDashboardSnapshot201Response.md | 30 + dashboards/docs/Dashboard.md | 46 + dashboards/docs/DashboardGlobalFilterId.md | 29 + .../docs/DashboardLinks.md | 7 +- .../docs/DashboardLinksLinks.md | 7 +- .../docs/DashboardMetric.md | 1 + .../docs/DashboardMetricDirection.md | 1 + .../docs/DashboardOrder.md | 1 + dashboards/docs/DashboardSnapshotId.md | 29 + .../docs/DashboardSnapshots200Response.md | 8 +- .../docs/DashboardSnapshotsApi.md | 144 +- .../docs/DashboardSnapshotsPage.md | 8 +- .../docs/DashboardsApi.md | 154 +- dashboards/docs/DashboardsFiltersApi.md | 444 ++++ dashboards/docs/DefaultTimespan.md | 34 + dashboards/docs/EnterpriseAgentState.md | 12 + dashboards/docs/Error.md | 33 + .../docs/GenerateDashboardSnapshotRequest.md | 7 +- .../docs/GeoMapDatasource.md | 1 + .../docs/GetDashboardData200Response.md | 9 +- .../docs/GroupedBarChartDatasource.md | 1 + dashboards/docs/LegacyAgentWidgetShow.md | 12 + dashboards/docs/LegacyAgentWidgetType.md | 12 + dashboards/docs/LegacyAlertListAlertType.md | 12 + dashboards/docs/LegacyApiDashboard.md | 35 + dashboards/docs/LegacyDashboardSnapshot.md | 33 + dashboards/docs/LegacyDefaultTimespan.md | 31 + dashboards/docs/LegacyDurationUnit.md | 12 + dashboards/docs/LegacyWidgetSortDirection.md | 12 + dashboards/docs/LegacyWidgetSortProperty.md | 12 + dashboards/docs/Link.md | 37 + .../docs/MetricGroup.md | 1 + .../docs/MultiMetricsTableDatasource.md | 1 + .../docs/NumbersCardDatasource.md | 1 + dashboards/docs/PaginationLinks.md | 30 + dashboards/docs/PaginationLinksLinks.md | 31 + .../docs/PieChartDatasource.md | 1 + dashboards/docs/QueryWindow.md | 30 + .../docs/ScalableWidget.md | 9 +- dashboards/docs/SelfLinks.md | 29 + dashboards/docs/SelfLinksLinks.md | 30 + .../docs/SnapshotDataByWidget200Response.md | 34 + .../docs/StackedAreaChartDatasource.md | 1 + .../docs/StackedBarChartDatasource.md | 1 + .../docs/TableDatasource.md | 1 + .../docs/TestTableDatasource.md | 1 + .../docs/TestTableFilterKey.md | 1 + .../docs/TestTableFilterType.md | 1 + .../docs/TimeseriesDatasource.md | 1 + dashboards/docs/UnauthorizedError.md | 30 + .../UpdateSnapshotExpirationDateApiRequest.md | 31 + dashboards/docs/ValidationError.md | 34 + dashboards/docs/ValidationErrorAllOfErrors.md | 31 + .../docs/VisualMode.md | 1 + {dashboards_api => dashboards}/docs/Widget.md | 12 +- .../docs/WidgetMeasureType.md | 1 + .../docs/WidgetType.md | 1 + dashboards/pyproject.toml | 71 + .../requirements.txt | 0 {dashboards_api => dashboards}/setup.cfg | 0 dashboards/setup.py | 49 + dashboards/test-requirements.txt | 5 + .../test/__init__.py | 0 .../test/test_agent_status_datasource.py | 33 + dashboards/test/test_alert_list_alert_type.py | 33 + dashboards/test/test_alert_list_datasource.py | 33 + .../test/test_api_agent_location.py | 7 +- .../test/test_api_agent_status_agent.py | 11 +- .../test/test_api_agent_status_ip_info.py | 7 +- .../test/test_api_agent_status_summary.py | 7 +- .../test/test_api_agent_status_widget.py | 80 + dashboards/test/test_api_agent_widget_show.py | 33 + dashboards/test/test_api_agent_widget_type.py | 33 + .../test/test_api_aggregate_property.py | 33 + .../test/test_api_alert_list_alert.py | 9 +- .../test/test_api_alert_list_widget.py | 22 +- ..._alert_list_widget_all_of_active_within.py | 9 +- .../test/test_api_box_and_whiskers_widget.py | 20 +- .../test/test_api_color_grid_widget.py | 20 +- .../test/test_api_context_filter_request.py | 73 + .../test/test_api_context_filter_response.py | 95 + .../test/test_api_context_filters_response.py | 53 + .../test/test_api_dashboard.py | 30 +- .../test/test_api_dashboard_asw.py | 7 +- .../test_api_dashboard_filter_user_details.py | 52 + .../test/test_api_dashboard_snapshot.py | 91 + .../test/test_api_data_point_group.py | 7 +- .../test/test_api_data_source_filter.py | 56 + .../test/test_api_data_source_filters.py | 64 + .../test/test_api_default_timespan.py | 7 +- .../test/test_api_duration.py | 9 +- dashboards/test/test_api_duration_unit.py | 33 + .../test/test_api_geo_map_widget.py | 20 +- .../test/test_api_graphlet_point.py | 7 +- .../test/test_api_grouped_barchart_widget.py | 22 +- .../test/test_api_multi_metric_column.py | 15 +- .../test/test_api_multi_metric_column_data.py | 13 +- .../test_api_multi_metric_table_widget.py | 93 + ...search_filter_api_test_table_filter_key.py | 7 +- .../test/test_api_numbers_card.py | 19 +- .../test/test_api_numbers_card_data.py | 9 +- .../test/test_api_numbers_card_widget.py | 24 +- .../test/test_api_pie_chart_widget.py | 22 +- ...est_api_report_data_component_label_map.py | 9 +- ...i_report_data_component_label_map_entry.py | 7 +- .../test_api_report_snapshot_time_span.py | 8 +- .../test_api_stacked_area_chart_widget.py | 22 +- .../test/test_api_stacked_barchart_widget.py | 22 +- .../test/test_api_table_widget.py | 22 +- .../test/test_api_test_table_data.py | 11 +- .../test_api_test_table_graphlets_data.py | 9 +- dashboards/test/test_api_test_table_widget.py | 92 + .../test/test_api_timeseries_widget.py | 20 +- dashboards/test/test_api_widget.py | 131 ++ .../test/test_api_widget_data_point.py | 9 +- .../test/test_api_widget_data_response.py | 43 +- ...widget_filter_api_test_table_filter_key.py | 9 +- .../test_api_widget_fixed_y_scale_prefix.py | 33 + .../test/test_api_widget_measure.py | 7 +- .../test/test_api_widget_sort_direction.py | 33 + .../test/test_api_widget_sort_property.py | 33 + .../test/test_api_widgets_data_v2.py | 43 +- dashboards/test/test_app_and_self_links.py | 69 + .../test/test_app_and_self_links_links.py | 68 + .../test/test_asw_repeat.py | 7 +- .../test/test_asw_repeat_unit.py | 7 +- .../test/test_box_and_whiskers_datasource.py | 33 + dashboards/test/test_color_grid_datasource.py | 33 + ...t_create_dashboard_snapshot201_response.py | 61 + dashboards/test/test_dashboard.py | 87 + .../test/test_dashboard_global_filter_id.py | 51 + .../test/test_dashboard_links.py | 13 +- .../test/test_dashboard_links_links.py | 11 +- .../test/test_dashboard_metric.py | 7 +- .../test/test_dashboard_metric_direction.py | 33 + .../test/test_dashboard_order.py | 7 +- dashboards/test/test_dashboard_snapshot_id.py | 51 + .../test_dashboard_snapshots200_response.py | 17 +- .../test/test_dashboard_snapshots_page.py | 8 +- dashboards/test/test_default_timespan.py | 56 + .../test/test_enterprise_agent_state.py | 33 + dashboards/test/test_error.py | 55 + ...est_generate_dashboard_snapshot_request.py | 7 +- .../test/test_geo_map_datasource.py | 7 +- .../test_get_dashboard_data200_response.py | 182 ++ .../test/test_grouped_bar_chart_datasource.py | 33 + .../test/test_legacy_agent_widget_show.py | 33 + .../test/test_legacy_agent_widget_type.py | 33 + .../test/test_legacy_alert_list_alert_type.py | 33 + dashboards/test/test_legacy_api_dashboard.py | 59 + .../test/test_legacy_dashboard_snapshot.py | 57 + .../test/test_legacy_default_timespan.py | 53 + dashboards/test/test_legacy_duration_unit.py | 33 + .../test/test_legacy_widget_sort_direction.py | 33 + .../test/test_legacy_widget_sort_property.py | 33 + dashboards/test/test_link.py | 59 + .../test/test_metric_group.py | 7 +- .../test_multi_metrics_table_datasource.py | 33 + .../test/test_numbers_card_datasource.py | 33 + dashboards/test/test_pagination_links.py | 70 + .../test/test_pagination_links_links.py | 77 + dashboards/test/test_pie_chart_datasource.py | 33 + dashboards/test/test_query_window.py | 52 + .../test/test_scalable_widget.py | 7 +- dashboards/test/test_self_links.py | 60 + dashboards/test/test_self_links_links.py | 59 + ...est_snapshot_data_by_widget200_response.py | 47 +- .../test_stacked_area_chart_datasource.py | 33 + .../test/test_stacked_bar_chart_datasource.py | 33 + dashboards/test/test_table_datasource.py | 33 + dashboards/test/test_test_table_datasource.py | 33 + dashboards/test/test_test_table_filter_key.py | 33 + .../test/test_test_table_filter_type.py | 33 + .../test/test_timeseries_datasource.py | 7 +- dashboards/test/test_unauthorized_error.py | 52 + ...te_snapshot_expiration_date_api_request.py | 10 +- dashboards/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + .../test/test_visual_mode.py | 7 +- .../test/test_widget.py | 18 +- .../test/test_widget_measure_type.py | 7 +- .../test/test_widget_type.py | 7 +- dashboards_api/.github/workflows/python.yml | 38 - dashboards_api/.gitlab-ci.yml | 31 - dashboards_api/.openapi-generator/FILES | 326 --- dashboards_api/.openapi-generator/VERSION | 1 - dashboards_api/.travis.yml | 17 - dashboards_api/README.md | 230 -- dashboards_api/dashboards_api/__init__.py | 133 -- dashboards_api/dashboards_api/api/__init__.py | 6 - dashboards_api/dashboards_api/api_client.py | 741 ------- dashboards_api/dashboards_api/api_response.py | 21 - .../dashboards_api/configuration.py | 434 ---- dashboards_api/dashboards_api/exceptions.py | 166 -- .../dashboards_api/models/__init__.py | 115 - .../models/agent_widget_show.py | 45 - .../models/agent_widget_type.py | 45 - .../models/api_agent_status_agent.py | 105 - .../models/api_agent_status_widget.py | 146 -- .../models/api_alert_list_alert_type.py | 89 - .../models/api_alert_list_widget.py | 151 -- .../models/api_box_and_whiskers_widget.py | 150 -- .../models/api_color_grid_widget.py | 162 -- .../dashboards_api/models/api_dashboard.py | 152 -- .../models/api_dashboard_snapshot.py | 128 -- ...api_dashboard_snapshot_all_of_dashboard.py | 152 -- .../dashboards_api/models/api_duration.py | 91 - .../models/api_geo_map_widget.py | 158 -- .../models/api_grouped_barchart_widget.py | 157 -- .../models/api_multi_metric_column.py | 108 - .../models/api_multi_metric_table_widget.py | 163 -- .../dashboards_api/models/api_numbers_card.py | 127 -- .../api_numbers_card_all_of_fixed_timespan.py | 91 - .../models/api_numbers_card_widget.py | 150 -- .../models/api_pie_chart_widget.py | 143 -- .../models/api_report_snapshot_time_span.py | 90 - .../models/api_stacked_area_chart_widget.py | 150 -- .../models/api_stacked_barchart_widget.py | 155 -- .../dashboards_api/models/api_table_widget.py | 155 -- .../models/api_test_table_widget.py | 151 -- .../models/api_timeseries_widget.py | 154 -- .../models/api_widget_data_response.py | 104 - ...widget_filter_api_test_table_filter_key.py | 98 - .../dashboards_api/models/asw_repeat_unit.py | 46 - .../dashboards_api/models/dashboard_links.py | 92 - .../models/dashboard_links_links.py | 97 - .../dashboards_api/models/dashboard_order.py | 45 - .../models/dashboard_snapshot_links.py | 92 - .../models/dashboard_snapshot_links_links.py | 97 - .../models/dashboard_snapshots200_response.py | 102 - .../models/dashboard_snapshots_page.py | 96 - .../dashboards_api/models/duration_unit.py | 46 - .../models/enterprise_agent_state.py | 46 - dashboards_api/dashboards_api/models/error.py | 96 - .../models/get_dashboard_data200_response.py | 118 -- dashboards_api/dashboards_api/models/link.py | 102 - .../dashboards_api/models/pagination_links.py | 92 - .../models/pagination_links_links.py | 96 - .../dashboards_api/models/query_window.py | 94 - .../dashboards_api/models/self_links.py | 92 - .../dashboards_api/models/self_links_links.py | 92 - .../snapshot_data_by_widget200_response.py | 110 - .../models/test_table_datasource.py | 55 - .../models/test_table_filter_type.py | 45 - .../models/unauthorized_error.py | 89 - ...te_snapshot_expiration_date_api_request.py | 88 - .../dashboards_api/models/visual_mode.py | 45 - .../dashboards_api/models/widget.py | 137 -- .../models/widget_sort_direction.py | 45 - .../models/widget_sort_property.py | 45 - dashboards_api/dashboards_api/rest.py | 231 -- dashboards_api/docs/AgentWidgetShow.md | 11 - dashboards_api/docs/AgentWidgetType.md | 11 - dashboards_api/docs/ApiAgentStatusWidget.md | 45 - dashboards_api/docs/ApiAlertListAlertType.md | 11 - .../ApiAlertListWidgetAllOfActiveWithin.md | 29 - dashboards_api/docs/ApiDashboard.md | 43 - dashboards_api/docs/ApiDashboardSnapshot.md | 38 - .../ApiDashboardSnapshotAllOfDashboard.md | 43 - dashboards_api/docs/ApiDuration.md | 29 - dashboards_api/docs/ApiMultiMetricColumn.md | 35 - dashboards_api/docs/ApiNumbersCard.md | 42 - .../docs/ApiNumbersCardAllOfFixedTimespan.md | 29 - dashboards_api/docs/DashboardSnapshotLinks.md | 29 - .../docs/DashboardSnapshotLinksLinks.md | 29 - dashboards_api/docs/DurationUnit.md | 11 - dashboards_api/docs/EnterpriseAgentState.md | 11 - dashboards_api/docs/Error.md | 32 - dashboards_api/docs/Link.md | 36 - dashboards_api/docs/PaginationLinks.md | 29 - dashboards_api/docs/PaginationLinksLinks.md | 29 - dashboards_api/docs/QueryWindow.md | 29 - dashboards_api/docs/SelfLinks.md | 28 - dashboards_api/docs/SelfLinksLinks.md | 29 - .../docs/SnapshotDataByWidget200Response.md | 31 - dashboards_api/docs/UnauthorizedError.md | 29 - .../UpdateSnapshotExpirationDateApiRequest.md | 29 - dashboards_api/docs/WidgetSortDirection.md | 11 - dashboards_api/docs/WidgetSortProperty.md | 11 - dashboards_api/git_push.sh | 57 - dashboards_api/pyproject.toml | 30 - dashboards_api/setup.py | 49 - dashboards_api/test-requirements.txt | 3 - .../test/test_agent_status_datasource.py | 34 - dashboards_api/test/test_agent_widget_show.py | 34 - dashboards_api/test/test_agent_widget_type.py | 34 - .../test/test_alert_list_datasource.py | 34 - .../test/test_api_agent_status_widget.py | 80 - .../test/test_api_aggregate_property.py | 34 - .../test/test_api_alert_list_alert_type.py | 34 - .../test/test_api_dashboard_snapshot.py | 84 - ...api_dashboard_snapshot_all_of_dashboard.py | 90 - .../test_api_multi_metric_table_widget.py | 97 - ..._api_numbers_card_all_of_fixed_timespan.py | 53 - .../test/test_api_test_table_widget.py | 92 - dashboards_api/test/test_api_widget.py | 135 -- .../test_api_widget_fixed_y_scale_prefix.py | 34 - .../test/test_box_and_whiskers_datasource.py | 34 - .../test/test_color_grid_datasource.py | 34 - .../test/test_dashboard_metric_direction.py | 34 - .../test/test_dashboard_snapshot_links.py | 70 - .../test_dashboard_snapshot_links_links.py | 69 - .../test/test_dashboard_snapshots_api.py | 73 - dashboards_api/test/test_dashboards_api.py | 73 - dashboards_api/test/test_duration_unit.py | 34 - .../test/test_enterprise_agent_state.py | 34 - dashboards_api/test/test_error.py | 56 - .../test_get_dashboard_data200_response.py | 173 -- .../test/test_grouped_bar_chart_datasource.py | 34 - dashboards_api/test/test_link.py | 60 - .../test_multi_metrics_table_datasource.py | 34 - .../test/test_numbers_card_datasource.py | 34 - dashboards_api/test/test_pagination_links.py | 70 - .../test/test_pagination_links_links.py | 69 - .../test/test_pie_chart_datasource.py | 34 - dashboards_api/test/test_query_window.py | 53 - dashboards_api/test/test_self_links.py | 61 - dashboards_api/test/test_self_links_links.py | 60 - .../test_stacked_area_chart_datasource.py | 34 - .../test/test_stacked_bar_chart_datasource.py | 34 - dashboards_api/test/test_table_datasource.py | 34 - .../test/test_test_table_datasource.py | 34 - .../test/test_test_table_filter_key.py | 34 - .../test/test_test_table_filter_type.py | 34 - .../test/test_unauthorized_error.py | 53 - .../test/test_widget_sort_direction.py | 34 - .../test/test_widget_sort_property.py | 34 - dashboards_api/tox.ini | 9 - .../agents_api/.github/workflows/python.yml | 38 - endpoint/agents_api/.gitlab-ci.yml | 31 - endpoint/agents_api/.openapi-generator/FILES | 158 -- .../agents_api/.openapi-generator/VERSION | 1 - endpoint/agents_api/.travis.yml | 17 - endpoint/agents_api/README.md | 170 -- endpoint/agents_api/agents_api/__init__.py | 77 - .../agents_api/agents_api/api/__init__.py | 7 - endpoint/agents_api/agents_api/api_client.py | 741 ------- .../agents_api/agents_api/api_response.py | 21 - .../agents_api/agents_api/configuration.py | 434 ---- endpoint/agents_api/agents_api/exceptions.py | 166 -- .../agents_api/agents_api/models/__init__.py | 58 - .../agents_api/models/account_group_id.py | 88 - .../agents_api/models/address_type.py | 48 - .../agents_api/models/agent_license_type.py | 46 - .../agents_api/models/agent_search_request.py | 92 - .../models/agent_transfer_request.py | 88 - .../agents_api/models/browser_type.py | 49 - .../agents_api/models/endpoint_agent_aid.py | 88 - ...ndpoint_agent_bulk_transfer207_response.py | 95 - .../endpoint_agent_bulk_transfer_request.py | 95 - .../models/endpoint_agent_location.py | 98 - .../models/endpoint_agent_update.py | 95 - .../agents_api/models/endpoint_agents.py | 98 - ...nt_agents_connection_string200_response.py | 94 - .../endpoint_agents_list200_response.py | 104 - .../endpoint_agents_search200_response.py | 104 - .../agents_api/models/endpoint_asn_details.py | 90 - .../agents_api/models/endpoint_client.py | 102 - .../models/endpoint_user_profile.py | 88 - .../agents_api/agents_api/models/error.py | 96 - .../agents_api/models/ethernet_profile.py | 88 - .../agents_api/agents_api/models/expand.py | 46 - .../models/interface_hardware_type.py | 50 - .../agents_api/models/interface_profile.py | 113 - endpoint/agents_api/agents_api/models/link.py | 102 - .../agents_api/models/pagination_next_link.py | 92 - .../models/pagination_next_link_links.py | 91 - .../agents_api/agents_api/models/platform.py | 46 - .../agents_api/models/self_links.py | 92 - .../agents_api/models/self_links_links.py | 92 - .../agents_api/agents_api/models/status.py | 45 - .../agents_api/models/unauthorized_error.py | 89 - .../agents_api/agents_api/models/vpn_type.py | 48 - .../agents_api/models/wireless_profile.py | 96 - endpoint/agents_api/agents_api/rest.py | 231 -- endpoint/agents_api/docs/AccountGroupId.md | 28 - .../agents_api/docs/AgentSearchRequest.md | 29 - endpoint/agents_api/docs/EndpointAgentAid.md | 28 - .../agents_api/docs/EndpointAgentUpdate.md | 30 - .../docs/EndpointAgentsList200Response.md | 30 - endpoint/agents_api/docs/Error.md | 32 - endpoint/agents_api/docs/EthernetProfile.md | 29 - endpoint/agents_api/docs/Expand.md | 10 - .../agents_api/docs/InterfaceHardwareType.md | 10 - endpoint/agents_api/docs/Link.md | 36 - .../agents_api/docs/PaginationNextLink.md | 29 - .../docs/PaginationNextLinkLinks.md | 28 - endpoint/agents_api/docs/Platform.md | 11 - endpoint/agents_api/docs/SelfLinks.md | 28 - endpoint/agents_api/docs/SelfLinksLinks.md | 29 - endpoint/agents_api/docs/UnauthorizedError.md | 29 - endpoint/agents_api/docs/VpnType.md | 11 - endpoint/agents_api/git_push.sh | 57 - endpoint/agents_api/pyproject.toml | 30 - endpoint/agents_api/setup.py | 49 - endpoint/agents_api/test-requirements.txt | 3 - .../agents_api/test/test_account_group_id.py | 52 - endpoint/agents_api/test/test_address_type.py | 34 - .../test/test_administrative_endpoints_api.py | 38 - .../test/test_agent_license_type.py | 34 - .../test/test_agent_search_request.py | 74 - endpoint/agents_api/test/test_browser_type.py | 34 - .../test/test_endpoint_agent_aid.py | 52 - ...ndpoint_agent_bulk_transfer207_response.py | 52 - .../test_endpoint_agents_list200_response.py | 65 - .../agents_api/test/test_endpoint_client.py | 62 - endpoint/agents_api/test/test_error.py | 56 - .../agents_api/test/test_ethernet_profile.py | 52 - endpoint/agents_api/test/test_expand.py | 34 - .../test/test_interface_hardware_type.py | 34 - endpoint/agents_api/test/test_link.py | 60 - .../agents_api/test/test_manage_agents_api.py | 80 - .../test/test_pagination_next_link.py | 61 - .../test/test_pagination_next_link_links.py | 60 - endpoint/agents_api/test/test_platform.py | 34 - endpoint/agents_api/test/test_self_links.py | 61 - .../agents_api/test/test_self_links_links.py | 60 - endpoint/agents_api/test/test_status.py | 34 - endpoint/agents_api/test/test_transfer_api.py | 45 - .../test/test_unauthorized_error.py | 53 - endpoint/agents_api/test/test_vpn_type.py | 34 - endpoint/agents_api/tox.ini | 9 - .../.github/workflows/python.yml | 38 - endpoint/instant_tests_api/.gitlab-ci.yml | 31 - .../.openapi-generator/FILES | 125 -- .../.openapi-generator/VERSION | 1 - endpoint/instant_tests_api/.travis.yml | 17 - endpoint/instant_tests_api/README.md | 165 -- .../instant_tests_api/docs/AccountGroupId.md | 28 - .../docs/AgentLabelsSelectorType.md | 10 - .../docs/AllAgentsSelectorType.md | 10 - .../docs/EndpointAgentLabelsSelectorConfig.md | 31 - .../docs/EndpointAgentSelectorConfig.md | 32 - .../docs/EndpointAgentToServerInstantTest.md | 36 - .../docs/EndpointAgentToServerTest.md | 43 - .../docs/EndpointAgentToServerType.md | 11 - .../docs/EndpointAllAgentsSelectorConfig.md | 30 - .../docs/EndpointHttpServerBaseTest.md | 36 - .../docs/EndpointHttpServerInstantTest.md | 46 - .../docs/EndpointHttpServerTest.md | 58 - .../docs/EndpointHttpServerType.md | 11 - .../docs/EndpointInstantTest.md | 35 - .../docs/EndpointScheduledTestType.md | 11 - .../EndpointSpecificAgentsSelectorConfig.md | 31 - .../instant_tests_api/docs/EndpointTest.md | 43 - .../docs/EndpointTestAgentSelectorType.md | 11 - .../instant_tests_api/docs/EndpointTestAid.md | 28 - .../docs/EndpointTestAuthType.md | 11 - .../docs/EndpointTestLinks.md | 30 - .../docs/EndpointTestLinksSelf.md | 35 - .../docs/EndpointTestLinksTestResults.md | 35 - .../docs/EndpointTestProtocol.md | 11 - endpoint/instant_tests_api/docs/Error.md | 32 - endpoint/instant_tests_api/docs/Link.md | 36 - .../docs/SpecificAgentsSelectorType.md | 10 - .../instant_tests_api/docs/TestInterval.md | 11 - .../instant_tests_api/docs/TestProbeMode.md | 11 - .../docs/TestSslVersionId.md | 11 - .../docs/UnauthorizedError.md | 29 - endpoint/instant_tests_api/git_push.sh | 57 - .../instant_tests_api/__init__.py | 66 - .../instant_tests_api/api/__init__.py | 7 - .../instant_tests_api/api_client.py | 741 ------- .../instant_tests_api/api_response.py | 21 - .../instant_tests_api/configuration.py | 434 ---- .../instant_tests_api/exceptions.py | 166 -- .../instant_tests_api/models/__init__.py | 47 - .../models/account_group_id.py | 88 - .../models/agent_labels_selector_type.py | 44 - .../models/all_agents_selector_type.py | 44 - .../endpoint_agent_labels_selector_config.py | 94 - .../models/endpoint_agent_selector_config.py | 162 -- .../endpoint_agent_to_server_instant_test.py | 106 - .../models/endpoint_agent_to_server_test.py | 143 -- .../models/endpoint_agent_to_server_type.py | 44 - .../endpoint_all_agents_selector_config.py | 92 - .../models/endpoint_http_server_base_test.py | 108 - .../endpoint_http_server_instant_test.py | 130 -- .../models/endpoint_http_server_test.py | 179 -- .../models/endpoint_http_server_type.py | 44 - .../models/endpoint_instant_test.py | 104 - .../models/endpoint_scheduled_test_type.py | 45 - ...ndpoint_specific_agents_selector_config.py | 94 - .../instant_tests_api/models/endpoint_test.py | 143 -- .../endpoint_test_agent_selector_type.py | 46 - .../models/endpoint_test_aid.py | 88 - .../models/endpoint_test_auth_type.py | 46 - .../models/endpoint_test_links.py | 98 - .../models/endpoint_test_links_self.py | 102 - .../endpoint_test_links_test_results.py | 149 -- .../models/endpoint_test_protocol.py | 49 - .../instant_tests_api/models/error.py | 96 - .../instant_tests_api/models/link.py | 102 - .../models/specific_agents_selector_type.py | 44 - .../instant_tests_api/models/test_interval.py | 50 - .../models/test_probe_mode.py | 46 - .../models/test_ssl_version_id.py | 48 - .../models/unauthorized_error.py | 89 - .../instant_tests_api/rest.py | 231 -- endpoint/instant_tests_api/pyproject.toml | 30 - endpoint/instant_tests_api/setup.py | 49 - .../instant_tests_api/test-requirements.txt | 3 - .../test/test_account_group_id.py | 52 - .../test/test_agent_labels_selector_type.py | 34 - ...nt_to_server_instant_scheduled_test_api.py | 38 - .../test/test_all_agents_selector_type.py | 34 - ...t_endpoint_agent_labels_selector_config.py | 54 - .../test_endpoint_agent_selector_config.py | 55 - ...t_endpoint_agent_to_server_instant_test.py | 64 - .../test_endpoint_agent_to_server_test.py | 69 - .../test_endpoint_agent_to_server_type.py | 34 - ...est_endpoint_all_agents_selector_config.py | 53 - .../test_endpoint_http_server_base_test.py | 60 - .../test_endpoint_http_server_instant_test.py | 78 - .../test/test_endpoint_http_server_test.py | 84 - .../test/test_endpoint_http_server_type.py | 34 - .../test/test_endpoint_instant_test.py | 62 - .../test/test_endpoint_scheduled_test_type.py | 34 - ...ndpoint_specific_agents_selector_config.py | 54 - .../test/test_endpoint_test.py | 69 - .../test_endpoint_test_agent_selector_type.py | 34 - .../test/test_endpoint_test_aid.py | 52 - .../test/test_endpoint_test_auth_type.py | 34 - .../test/test_endpoint_test_links.py | 53 - .../test/test_endpoint_test_links_self.py | 60 - .../test_endpoint_test_links_test_results.py | 60 - .../test/test_endpoint_test_protocol.py | 34 - endpoint/instant_tests_api/test/test_error.py | 56 - ..._http_server_instant_scheduled_test_api.py | 38 - endpoint/instant_tests_api/test/test_link.py | 60 - .../test/test_run_existing_test_api.py | 38 - .../test_specific_agents_selector_type.py | 34 - .../test/test_test_interval.py | 34 - .../test/test_test_probe_mode.py | 34 - .../test/test_test_ssl_version_id.py | 34 - .../test/test_unauthorized_error.py | 53 - endpoint/instant_tests_api/tox.ini | 9 - .../labels_api/.github/workflows/python.yml | 38 - endpoint/labels_api/.gitlab-ci.yml | 31 - endpoint/labels_api/.openapi-generator/FILES | 80 - .../labels_api/.openapi-generator/VERSION | 1 - endpoint/labels_api/.travis.yml | 17 - endpoint/labels_api/README.md | 140 -- .../docs/EndpointLabelsList200Response.md | 29 - endpoint/labels_api/docs/Error.md | 32 - endpoint/labels_api/docs/Expand.md | 10 - endpoint/labels_api/docs/Label.md | 33 - endpoint/labels_api/docs/Labels.md | 29 - endpoint/labels_api/docs/Link.md | 36 - endpoint/labels_api/docs/ManageLabelsApi.md | 421 ---- .../labels_api/docs/PaginationNextLink.md | 29 - .../docs/PaginationNextLinkLinks.md | 28 - endpoint/labels_api/docs/SelfLinks.md | 28 - endpoint/labels_api/docs/SelfLinksLinks.md | 29 - endpoint/labels_api/docs/UnauthorizedError.md | 29 - endpoint/labels_api/git_push.sh | 57 - endpoint/labels_api/labels_api/__init__.py | 51 - .../labels_api/labels_api/api/__init__.py | 5 - endpoint/labels_api/labels_api/api_client.py | 741 ------- .../labels_api/labels_api/api_response.py | 21 - .../labels_api/labels_api/configuration.py | 434 ---- endpoint/labels_api/labels_api/exceptions.py | 166 -- .../labels_api/labels_api/models/__init__.py | 34 - .../endpoint_labels_list200_response.py | 102 - .../labels_api/labels_api/models/error.py | 96 - .../labels_api/labels_api/models/expand.py | 44 - .../labels_api/labels_api/models/label.py | 107 - .../labels_api/labels_api/models/labels.py | 95 - endpoint/labels_api/labels_api/models/link.py | 102 - .../labels_api/models/pagination_next_link.py | 92 - .../models/pagination_next_link_links.py | 91 - .../labels_api/models/self_links.py | 92 - .../labels_api/models/self_links_links.py | 92 - .../labels_api/models/unauthorized_error.py | 89 - endpoint/labels_api/labels_api/rest.py | 231 -- endpoint/labels_api/pyproject.toml | 30 - endpoint/labels_api/setup.py | 49 - endpoint/labels_api/test-requirements.txt | 3 - .../test_endpoint_labels_list200_response.py | 64 - endpoint/labels_api/test/test_error.py | 56 - endpoint/labels_api/test/test_expand.py | 34 - endpoint/labels_api/test/test_label.py | 61 - endpoint/labels_api/test/test_labels.py | 54 - endpoint/labels_api/test/test_link.py | 60 - .../labels_api/test/test_manage_labels_api.py | 66 - .../test/test_pagination_next_link.py | 61 - .../test/test_pagination_next_link_links.py | 60 - endpoint/labels_api/test/test_self_links.py | 61 - .../labels_api/test/test_self_links_links.py | 60 - .../test/test_unauthorized_error.py | 53 - endpoint/labels_api/tox.ini | 9 - .../.github/workflows/python.yml | 38 - endpoint/test_results_api/.gitlab-ci.yml | 31 - .../test_results_api/.openapi-generator/FILES | 482 ----- .../.openapi-generator/VERSION | 1 - endpoint/test_results_api/.travis.yml | 17 - endpoint/test_results_api/README.md | 283 --- .../test_results_api/docs/AccountGroupId.md | 28 - .../docs/AgentLabelsSelectorType.md | 10 - .../docs/AllAgentsSelectorType.md | 10 - .../docs/ConditionalOperator.md | 10 - .../docs/DynamicBaseTestResult.md | 29 - .../docs/DynamicBaseTestResultWebex.md | 30 - endpoint/test_results_api/docs/DynamicTest.md | 43 - .../docs/DynamicTestApplication.md | 11 - .../test_results_api/docs/DynamicTestLinks.md | 30 - .../docs/DynamicTestLinksSelf.md | 35 - .../docs/DynamicTestLinksTestResults.md | 35 - .../docs/EndpointAgentLabelsSelectorConfig.md | 31 - .../docs/EndpointAgentSelectorConfig.md | 32 - .../docs/EndpointAgentToServerTest.md | 43 - .../docs/EndpointAgentToServerType.md | 11 - .../docs/EndpointAllAgentsSelectorConfig.md | 30 - .../docs/EndpointHttpServerBaseTest.md | 36 - .../docs/EndpointHttpServerTest.md | 58 - .../docs/EndpointHttpServerType.md | 11 - .../docs/EndpointScheduledTestType.md | 11 - .../EndpointSpecificAgentsSelectorConfig.md | 31 - .../test_results_api/docs/EndpointTest.md | 43 - .../test_results_api/docs/EndpointTestAid.md | 28 - .../docs/EndpointTestAuthType.md | 11 - .../docs/EndpointTestLinks.md | 30 - .../docs/EndpointTestLinksSelf.md | 35 - .../docs/EndpointTestLinksTestResults.md | 35 - .../docs/EndpointTestProtocol.md | 11 - endpoint/test_results_api/docs/Error.md | 32 - .../test_results_api/docs/EthernetProfile.md | 28 - endpoint/test_results_api/docs/Expand.md | 10 - ...cTestResultPathvisAgentRound200Response.md | 30 - ...tLocalNetworkTopologyDetails200Response.md | 29 - ...tEndpointLocalNetworksTopologiesRequest.md | 28 - ...tEndpointRealUserTestDetails200Response.md | 29 - ...ointRealUserTestPagesDetails200Response.md | 28 - .../GetTestResultHttpServer200Response.md | 32 - .../GetTestResultNetworkPathvis200Response.md | 32 - .../test_results_api/docs/HttpTestResult.md | 48 - .../docs/HttpTestResultHeaders.md | 30 - .../test_results_api/docs/HttpTestResults.md | 29 - .../docs/InterfaceHardwareType.md | 10 - endpoint/test_results_api/docs/Link.md | 36 - .../docs/MultiTestIdNetworkTestResults.md | 28 - .../docs/NetworkTestResult.md | 41 - .../docs/NetworkTestResults.md | 29 - .../docs/PaginationNextLink.md | 29 - .../docs/PaginationNextLinkLinks.md | 28 - .../docs/PathVisBaseTestResult.md | 37 - .../docs/PathVisDetailDynamicTestResult.md | 41 - .../docs/PathVisDetailTestResult.md | 39 - .../docs/PathVisDetailTestResults.md | 29 - .../docs/PathVisDynamicTestResult.md | 41 - .../test_results_api/docs/PathVisEndpoint.md | 31 - endpoint/test_results_api/docs/PathVisHop.md | 34 - .../test_results_api/docs/PathVisRoute.md | 29 - .../docs/PathVisTestResult.md | 39 - .../docs/PathVisTestResults.md | 29 - endpoint/test_results_api/docs/Platform.md | 11 - endpoint/test_results_api/docs/QueryWindow.md | 29 - endpoint/test_results_api/docs/SelfLinks.md | 28 - .../test_results_api/docs/SelfLinksLinks.md | 29 - endpoint/test_results_api/docs/SortOrder.md | 11 - .../docs/SpecificAgentsSelectorType.md | 10 - .../test_results_api/docs/TestInterval.md | 11 - .../test_results_api/docs/TestProbeMode.md | 11 - endpoint/test_results_api/docs/TestResult.md | 33 - .../test_results_api/docs/TestSslVersionId.md | 11 - .../docs/ThresholdFilterOperator.md | 10 - .../docs/UnauthorizedError.md | 29 - endpoint/test_results_api/docs/VpnType.md | 11 - endpoint/test_results_api/git_push.sh | 57 - endpoint/test_results_api/pyproject.toml | 30 - endpoint/test_results_api/setup.py | 49 - .../test_results_api/test-requirements.txt | 3 - .../test/test_account_group_id.py | 52 - .../test/test_agent_labels_selector_type.py | 34 - .../test/test_all_agents_selector_type.py | 34 - .../test/test_conditional_operator.py | 34 - .../test/test_dynamic_test.py | 69 - .../test/test_dynamic_test_application.py | 34 - .../test/test_dynamic_test_links.py | 53 - .../test/test_dynamic_test_links_self.py | 60 - .../test_dynamic_test_links_test_results.py | 60 - ...t_endpoint_agent_labels_selector_config.py | 54 - .../test_endpoint_agent_selector_config.py | 55 - .../test_endpoint_agent_to_server_test.py | 69 - .../test_endpoint_agent_to_server_type.py | 34 - ...est_endpoint_all_agents_selector_config.py | 53 - .../test_endpoint_http_server_base_test.py | 60 - .../test/test_endpoint_http_server_test.py | 84 - .../test/test_endpoint_http_server_type.py | 34 - .../test/test_endpoint_scheduled_test.py | 84 - .../test/test_endpoint_scheduled_test_type.py | 34 - ...ndpoint_specific_agents_selector_config.py | 54 - .../test/test_endpoint_test.py | 69 - .../test/test_endpoint_test_aid.py | 52 - .../test/test_endpoint_test_auth_type.py | 34 - .../test/test_endpoint_test_links.py | 53 - .../test/test_endpoint_test_links_self.py | 60 - .../test_endpoint_test_links_test_results.py | 60 - .../test/test_endpoint_test_protocol.py | 34 - endpoint/test_results_api/test/test_error.py | 56 - .../test/test_ethernet_profile.py | 52 - endpoint/test_results_api/test/test_expand.py | 34 - ...test_result_network_pathvis200_response.py | 85 - ..._result_pathvis_agent_round200_response.py | 83 - ...get_test_result_http_server200_response.py | 67 - ...test_result_network_pathvis200_response.py | 67 - .../test/test_http_test_result.py | 123 -- .../test/test_http_test_result_headers.py | 78 - .../test/test_http_test_results.py | 55 - .../test/test_interface_hardware_type.py | 34 - endpoint/test_results_api/test/test_link.py | 60 - .../test_local_network_tests_results_api.py | 52 - .../test/test_network_dynamic_test_results.py | 73 - .../test_network_dynamic_tests_results_api.py | 52 - ...est_network_scheduled_tests_results_api.py | 59 - .../test/test_network_test_result.py | 89 - .../test/test_network_test_results.py | 55 - .../test/test_pagination_next_link.py | 61 - .../test/test_pagination_next_link_links.py | 60 - .../test/test_path_vis_base_test_result.py | 87 - ...est_path_vis_detail_dynamic_test_result.py | 105 - ...st_path_vis_detail_dynamic_test_results.py | 73 - .../test/test_path_vis_detail_test_result.py | 101 - .../test/test_path_vis_detail_test_results.py | 55 - .../test/test_path_vis_dynamic_test_result.py | 99 - .../test_path_vis_dynamic_test_results.py | 73 - .../test/test_path_vis_endpoint.py | 55 - .../test/test_path_vis_hop.py | 58 - .../test/test_path_vis_route.py | 55 - .../test/test_path_vis_test_result.py | 95 - .../test/test_path_vis_test_results.py | 55 - .../test_results_api/test/test_platform.py | 34 - ...dynamic_test_result_metrics200_response.py | 85 - .../test/test_query_window.py | 53 - .../test/test_real_user_tests_results_api.py | 66 - .../test_results_api/test/test_self_links.py | 61 - .../test/test_self_links_links.py | 60 - .../test_results_api/test/test_sort_order.py | 34 - .../test_specific_agents_selector_type.py | 34 - .../test/test_test_interval.py | 34 - .../test/test_test_probe_mode.py | 34 - .../test_results_api/test/test_test_result.py | 81 - .../test/test_test_ssl_version_id.py | 34 - .../test/test_threshold_filter_operator.py | 34 - .../test/test_unauthorized_error.py | 53 - .../test_results_api/test/test_vpn_type.py | 34 - ..._http_server_scheduled_test_results_api.py | 38 - .../test_results_api/__init__.py | 185 -- .../test_results_api/api/__init__.py | 9 - .../test_results_api/api_client.py | 741 ------- .../test_results_api/api_response.py | 21 - .../test_results_api/configuration.py | 434 ---- .../test_results_api/exceptions.py | 166 -- .../test_results_api/models/__init__.py | 164 -- .../models/account_group_id.py | 88 - .../models/agent_labels_selector_type.py | 44 - .../models/all_agents_selector_type.py | 44 - .../models/conditional_operator.py | 45 - .../models/dynamic_base_test_result.py | 94 - .../models/dynamic_base_test_result_webex.py | 94 - .../test_results_api/models/dynamic_test.py | 148 -- .../models/dynamic_test_application.py | 46 - .../models/dynamic_test_links.py | 98 - .../models/dynamic_test_links_self.py | 102 - .../models/dynamic_test_links_test_results.py | 149 -- .../endpoint_agent_labels_selector_config.py | 94 - .../models/endpoint_agent_selector_config.py | 162 -- .../models/endpoint_agent_to_server_test.py | 143 -- .../models/endpoint_agent_to_server_type.py | 44 - .../endpoint_all_agents_selector_config.py | 92 - .../models/endpoint_http_server_base_test.py | 108 - .../models/endpoint_http_server_test.py | 179 -- .../models/endpoint_http_server_type.py | 44 - .../models/endpoint_scheduled_test_type.py | 45 - ...ndpoint_specific_agents_selector_config.py | 94 - .../test_results_api/models/endpoint_test.py | 143 -- .../models/endpoint_test_aid.py | 88 - .../models/endpoint_test_auth_type.py | 46 - .../models/endpoint_test_links.py | 98 - .../models/endpoint_test_links_self.py | 102 - .../endpoint_test_links_test_results.py | 149 -- .../models/endpoint_test_protocol.py | 49 - .../test_results_api/models/error.py | 96 - .../models/ethernet_profile.py | 90 - .../test_results_api/models/expand.py | 44 - ...test_result_network_pathvis200_response.py | 116 -- ..._result_pathvis_agent_round200_response.py | 108 - ...get_test_result_http_server200_response.py | 116 -- ...test_result_network_pathvis200_response.py | 116 -- ..._result_pathvis_agent_round200_response.py | 108 - .../models/http_test_result.py | 179 -- .../models/http_test_result_headers.py | 94 - .../models/http_test_results.py | 101 - .../models/interface_hardware_type.py | 50 - .../test_results_api/models/link.py | 102 - .../multi_test_id_network_test_results.py | 95 - .../models/network_dynamic_test_result.py | 159 -- .../models/network_test_result.py | 150 -- .../models/network_test_results.py | 101 - .../models/pagination_next_link.py | 92 - .../models/pagination_next_link_links.py | 91 - .../models/path_vis_base_test_result.py | 134 -- .../path_vis_detail_dynamic_test_result.py | 162 -- .../path_vis_detail_dynamic_test_results.py | 101 - .../models/path_vis_detail_test_result.py | 153 -- .../models/path_vis_detail_test_results.py | 101 - .../models/path_vis_dynamic_test_result.py | 157 -- .../models/path_vis_endpoint.py | 102 - .../test_results_api/models/path_vis_hop.py | 114 - .../test_results_api/models/path_vis_route.py | 100 - .../models/path_vis_test_result.py | 148 -- .../models/path_vis_test_results.py | 101 - .../test_results_api/models/platform.py | 46 - ...t_fetch_test_result_metrics200_response.py | 116 -- ...t_result_metrics_multi_test200_response.py | 110 - .../test_results_api/models/query_window.py | 94 - .../models/real_user_test_network.py | 140 -- .../test_results_api/models/self_links.py | 92 - .../models/self_links_links.py | 92 - .../test_results_api/models/sort_order.py | 45 - .../models/specific_agents_selector_type.py | 44 - .../test_results_api/models/test_interval.py | 50 - .../models/test_probe_mode.py | 46 - .../test_results_api/models/test_result.py | 116 -- .../models/test_ssl_version_id.py | 48 - .../models/threshold_filter_operator.py | 45 - .../models/unauthorized_error.py | 89 - .../test_results_api/models/vpn_type.py | 48 - .../test_results_api/test_results_api/rest.py | 231 -- endpoint/test_results_api/tox.ini | 9 - .../tests_api/.github/workflows/python.yml | 38 - endpoint/tests_api/.gitlab-ci.yml | 31 - endpoint/tests_api/.openapi-generator/FILES | 191 -- endpoint/tests_api/.openapi-generator/VERSION | 1 - endpoint/tests_api/.travis.yml | 17 - endpoint/tests_api/README.md | 183 -- endpoint/tests_api/docs/AccountGroupId.md | 28 - .../tests_api/docs/AgentLabelsSelectorType.md | 10 - .../tests_api/docs/AllAgentsSelectorType.md | 10 - endpoint/tests_api/docs/DynamicTest.md | 43 - .../tests_api/docs/DynamicTestApplication.md | 11 - endpoint/tests_api/docs/DynamicTestLinks.md | 30 - .../tests_api/docs/DynamicTestLinksSelf.md | 35 - .../docs/DynamicTestLinksTestResults.md | 35 - .../docs/DynamicTestsAgentToServerApi.md | 268 --- .../docs/EndpointAgentLabelsSelectorConfig.md | 31 - .../docs/EndpointAgentSelectorConfig.md | 32 - .../docs/EndpointAgentToServerInstantTest.md | 36 - .../docs/EndpointAgentToServerTest.md | 43 - .../docs/EndpointAgentToServerType.md | 11 - .../docs/EndpointAllAgentsSelectorConfig.md | 30 - .../docs/EndpointHttpServerBaseTest.md | 36 - .../docs/EndpointHttpServerInstantTest.md | 46 - .../tests_api/docs/EndpointHttpServerTest.md | 58 - .../tests_api/docs/EndpointHttpServerType.md | 11 - .../tests_api/docs/EndpointInstantTest.md | 35 - .../docs/EndpointScheduledTestType.md | 11 - .../EndpointSpecificAgentsSelectorConfig.md | 31 - endpoint/tests_api/docs/EndpointTest.md | 43 - .../docs/EndpointTestAgentSelectorType.md | 11 - endpoint/tests_api/docs/EndpointTestAid.md | 28 - .../tests_api/docs/EndpointTestAuthType.md | 11 - endpoint/tests_api/docs/EndpointTestLinks.md | 30 - .../tests_api/docs/EndpointTestLinksSelf.md | 35 - .../docs/EndpointTestLinksTestResults.md | 35 - .../tests_api/docs/EndpointTestProtocol.md | 11 - endpoint/tests_api/docs/Error.md | 32 - .../docs/GetDynamicTestDetail200Response.md | 43 - ...dpointAgentToserverTestsList200Response.md | 29 - ...EndpointHttpserverTestDetail200Response.md | 58 - endpoint/tests_api/docs/Link.md | 36 - ...ostEndpointAgentToServerTest201Response.md | 43 - .../docs/ScheduledTestsAgentToServerApi.md | 268 --- .../docs/ScheduledTestsHTTPServerApi.md | 268 --- endpoint/tests_api/docs/SelfLinks.md | 28 - endpoint/tests_api/docs/SelfLinksLinks.md | 29 - .../docs/SpecificAgentsSelectorType.md | 10 - endpoint/tests_api/docs/TestInterval.md | 11 - endpoint/tests_api/docs/TestProbeMode.md | 11 - endpoint/tests_api/docs/TestSslVersionId.md | 11 - endpoint/tests_api/docs/UnauthorizedError.md | 29 - endpoint/tests_api/git_push.sh | 57 - endpoint/tests_api/pyproject.toml | 30 - endpoint/tests_api/setup.py | 49 - endpoint/tests_api/test-requirements.txt | 3 - .../tests_api/test/test_account_group_id.py | 52 - .../test/test_agent_labels_selector_type.py | 34 - .../test/test_all_agents_selector_type.py | 34 - endpoint/tests_api/test/test_dynamic_test.py | 69 - .../test/test_dynamic_test_application.py | 34 - .../tests_api/test/test_dynamic_test_links.py | 53 - .../test/test_dynamic_test_links_self.py | 60 - .../test_dynamic_test_links_test_results.py | 60 - endpoint/tests_api/test/test_dynamic_tests.py | 72 - .../test_dynamic_tests_agent_to_server_api.py | 52 - ...t_endpoint_agent_labels_selector_config.py | 54 - .../test_endpoint_agent_selector_config.py | 55 - ...t_endpoint_agent_to_server_instant_test.py | 64 - .../test_endpoint_agent_to_server_test.py | 69 - .../test_endpoint_agent_to_server_type.py | 34 - ...est_endpoint_all_agents_selector_config.py | 53 - .../test_endpoint_http_server_base_test.py | 60 - .../test_endpoint_http_server_instant_test.py | 78 - .../test/test_endpoint_http_server_test.py | 84 - .../test/test_endpoint_http_server_type.py | 34 - .../test/test_endpoint_instant_test.py | 62 - .../test/test_endpoint_scheduled_test_type.py | 34 - ...ndpoint_specific_agents_selector_config.py | 54 - endpoint/tests_api/test/test_endpoint_test.py | 69 - .../test_endpoint_test_agent_selector_type.py | 34 - .../tests_api/test/test_endpoint_test_aid.py | 52 - .../test/test_endpoint_test_auth_type.py | 34 - .../test/test_endpoint_test_links.py | 53 - .../test/test_endpoint_test_links_self.py | 60 - .../test_endpoint_test_links_test_results.py | 60 - .../test/test_endpoint_test_protocol.py | 34 - .../tests_api/test/test_endpoint_tests.py | 72 - endpoint/tests_api/test/test_error.py | 56 - ...est_get_dynamic_test_detail200_response.py | 76 - ...test_get_dynamic_tests_list200_response.py | 82 - ...oint_httpserver_test_detail200_response.py | 91 - ...est_get_endpoint_tests_list200_response.py | 82 - endpoint/tests_api/test/test_link.py | 60 - .../test_list_endpoint_scheduled_tests_api.py | 38 - ...dpoint_agent_to_server_test201_response.py | 76 - ...est_scheduled_tests_agent_to_server_api.py | 52 - .../test_scheduled_tests_http_server_api.py | 52 - endpoint/tests_api/test/test_self_links.py | 61 - .../tests_api/test/test_self_links_links.py | 60 - .../test_specific_agents_selector_type.py | 34 - endpoint/tests_api/test/test_test_interval.py | 34 - .../tests_api/test/test_test_probe_mode.py | 34 - .../test/test_test_ssl_version_id.py | 34 - .../tests_api/test/test_unauthorized_error.py | 53 - endpoint/tests_api/tests_api/__init__.py | 88 - endpoint/tests_api/tests_api/api/__init__.py | 8 - .../api/dynamic_tests_agent_to_server_api.py | 953 --------- .../scheduled_tests_agent_to_server_api.py | 952 --------- .../api/scheduled_tests_http_server_api.py | 953 --------- endpoint/tests_api/tests_api/api_client.py | 741 ------- endpoint/tests_api/tests_api/api_response.py | 21 - endpoint/tests_api/tests_api/configuration.py | 434 ---- endpoint/tests_api/tests_api/exceptions.py | 166 -- .../tests_api/tests_api/models/__init__.py | 68 - .../tests_api/models/account_group_id.py | 88 - .../models/agent_labels_selector_type.py | 44 - .../models/all_agents_selector_type.py | 44 - .../tests_api/models/dynamic_test.py | 148 -- .../models/dynamic_test_application.py | 46 - .../tests_api/models/dynamic_test_links.py | 98 - .../models/dynamic_test_links_self.py | 102 - .../models/dynamic_test_links_test_results.py | 149 -- .../tests_api/models/dynamic_test_request.py | 158 -- .../endpoint_agent_labels_selector_config.py | 94 - .../models/endpoint_agent_selector_config.py | 162 -- .../endpoint_agent_to_server_instant_test.py | 106 - .../models/endpoint_agent_to_server_test.py | 143 -- .../models/endpoint_agent_to_server_tests.py | 95 - .../models/endpoint_agent_to_server_type.py | 44 - .../endpoint_all_agents_selector_config.py | 92 - .../models/endpoint_http_server_base_test.py | 108 - .../endpoint_http_server_instant_test.py | 130 -- .../models/endpoint_http_server_test.py | 179 -- .../models/endpoint_http_server_type.py | 44 - .../tests_api/models/endpoint_instant_test.py | 104 - .../models/endpoint_scheduled_test_type.py | 45 - ...ndpoint_specific_agents_selector_config.py | 94 - .../tests_api/models/endpoint_test.py | 143 -- .../endpoint_test_agent_selector_type.py | 46 - .../tests_api/models/endpoint_test_aid.py | 88 - .../models/endpoint_test_auth_type.py | 46 - .../tests_api/models/endpoint_test_links.py | 98 - .../models/endpoint_test_links_self.py | 102 - .../endpoint_test_links_test_results.py | 149 -- .../models/endpoint_test_protocol.py | 49 - endpoint/tests_api/tests_api/models/error.py | 96 - .../get_dynamic_test_detail200_response.py | 148 -- .../get_dynamic_tests_list200_response.py | 102 - ...t_agent_toserver_tests_list200_response.py | 102 - ...oint_httpserver_test_detail200_response.py | 179 -- ...point_httpserver_tests_list200_response.py | 102 - .../get_endpoint_tests_list200_response.py | 102 - endpoint/tests_api/tests_api/models/link.py | 102 - ...dpoint_agent_to_server_test201_response.py | 143 -- .../tests_api/tests_api/models/self_links.py | 92 - .../tests_api/models/self_links_links.py | 92 - .../models/specific_agents_selector_type.py | 44 - .../tests_api/models/test_interval.py | 50 - .../tests_api/models/test_probe_mode.py | 46 - .../tests_api/models/test_ssl_version_id.py | 48 - .../tests_api/models/unauthorized_error.py | 89 - endpoint/tests_api/tests_api/rest.py | 231 -- endpoint/tests_api/tox.ini | 9 - .../agents_api => endpoint_agents}/.gitignore | 0 .../.openapi-generator-ignore | 0 endpoint_agents/.openapi-generator/FILES | 177 ++ endpoint_agents/.openapi-generator/VERSION | 1 + endpoint_agents/README.md | 181 ++ .../docs/AddressProfile.md | 7 +- .../docs/AddressType.md | 1 + .../docs/AdministrativeEndpointsApi.md | 23 +- .../docs/AgentLicenseType.md | 1 + endpoint_agents/docs/AgentSearchRequest.md | 32 + .../docs/AgentSearchRequestSearchFilters.md | 8 +- endpoint_agents/docs/AgentSearchSort.md | 30 + endpoint_agents/docs/AgentSearchSortKey.md | 11 + endpoint_agents/docs/AgentThresholdFilter.md | 32 + endpoint_agents/docs/AgentThresholdFilters.md | 31 + .../docs/AgentTransfer.md | 7 +- .../docs/AgentTransferRequest.md | 7 +- .../docs/BrowserType.md | 1 + endpoint_agents/docs/ConditionalOperator.md | 11 + .../docs/EndpointAgent.md | 9 +- .../EndpointAgentBulkTransfer207Response.md | 7 +- ...tAgentBulkTransfer207ResponseItemsInner.md | 7 +- .../docs/EndpointAgentBulkTransferRequest.md | 7 +- .../docs/EndpointAgentGet200Response.md | 9 +- .../docs/EndpointAgentLocation.md | 7 +- endpoint_agents/docs/EndpointAgentUpdate.md | 31 + .../docs/EndpointAgents.md | 7 +- .../docs/EndpointAgentsAgentsInner.md | 9 +- ...dpointAgentsConnectionString200Response.md | 7 +- .../docs/EndpointAgentsList200Response.md | 31 + .../docs/EndpointAgentsSearch200Response.md | 7 +- .../docs/EndpointAsnDetails.md | 7 +- .../docs/EndpointBrowserExtension.md | 7 +- .../docs/EndpointClient.md | 7 +- .../docs/EndpointUserProfile.md | 7 +- .../docs/EndpointVpnProfile.md | 7 +- endpoint_agents/docs/Error.md | 33 + endpoint_agents/docs/EthernetProfile.md | 30 + endpoint_agents/docs/Expand.md | 11 + endpoint_agents/docs/InterfaceHardwareType.md | 11 + .../docs/InterfaceProfile.md | 7 +- endpoint_agents/docs/Link.md | 37 + .../docs/ManageAgentsApi.md | 185 +- .../docs/PaginationNextAndSelfLink.md | 30 + .../docs/PaginationNextAndSelfLinkLinks.md | 30 + endpoint_agents/docs/PaginationNextLink.md | 30 + .../docs/PaginationNextLinkLinks.md | 29 + endpoint_agents/docs/Platform.md | 12 + endpoint_agents/docs/SelfLinks.md | 29 + endpoint_agents/docs/SelfLinksLinks.md | 30 + endpoint_agents/docs/SortOrder.md | 12 + .../docs/Status.md | 1 + .../docs/ThresholdFilterOperator.md | 11 + .../docs/TransferApi.md | 50 +- endpoint_agents/docs/UnauthorizedError.md | 30 + endpoint_agents/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + endpoint_agents/docs/VpnType.md | 12 + .../docs/WirelessProfile.md | 7 +- endpoint_agents/endpoint_agents/__init__.py | 86 + .../endpoint_agents/api/__init__.py | 7 + .../api/administrative_endpoints_api.py | 42 +- .../endpoint_agents}/api/manage_agents_api.py | 176 +- .../endpoint_agents}/api/transfer_api.py | 75 +- endpoint_agents/endpoint_agents/api_client.py | 770 +++++++ .../endpoint_agents/api_response.py | 21 + .../endpoint_agents/configuration.py | 444 ++++ endpoint_agents/endpoint_agents/exceptions.py | 199 ++ .../endpoint_agents/models/__init__.py | 67 + .../models/address_profile.py | 35 +- .../endpoint_agents/models/address_type.py | 40 + .../models/agent_license_type.py | 38 + .../models/agent_search_request.py | 107 + .../agent_search_request_search_filters.py | 39 +- .../models/agent_search_sort.py | 91 + .../models/agent_search_sort_key.py | 40 + .../models/agent_threshold_filter.py | 102 + .../models/agent_threshold_filters.py | 98 + .../endpoint_agents}/models/agent_transfer.py | 35 +- .../models/agent_transfer_request.py | 87 + .../endpoint_agents/models/browser_type.py | 41 + .../models/conditional_operator.py | 37 + .../endpoint_agents}/models/endpoint_agent.py | 104 +- ...ndpoint_agent_bulk_transfer207_response.py | 95 + ...t_bulk_transfer207_response_items_inner.py | 37 +- .../endpoint_agent_bulk_transfer_request.py | 95 + .../models/endpoint_agent_get200_response.py | 109 +- .../models/endpoint_agent_location.py | 97 + .../models/endpoint_agent_update.py | 92 + .../endpoint_agents/models/endpoint_agents.py | 97 + .../models/endpoint_agents_agents_inner.py | 109 +- ...nt_agents_connection_string200_response.py | 93 + .../endpoint_agents_list200_response.py | 103 + .../endpoint_agents_search200_response.py | 103 + .../models/endpoint_asn_details.py | 89 + .../models/endpoint_browser_extension.py | 35 +- .../endpoint_agents/models/endpoint_client.py | 101 + .../models/endpoint_user_profile.py | 87 + .../models/endpoint_vpn_profile.py | 35 +- .../endpoint_agents/models/error.py | 95 + .../models/ethernet_profile.py | 87 + .../endpoint_agents/models/expand.py | 38 + .../models/interface_hardware_type.py | 42 + .../models/interface_profile.py | 112 + .../endpoint_agents/models/link.py | 101 + .../models/pagination_next_and_self_link.py | 91 + .../pagination_next_and_self_link_links.py | 96 + .../models/pagination_next_link.py | 91 + .../models/pagination_next_link_links.py | 91 + .../endpoint_agents/models/platform.py | 38 + .../endpoint_agents/models/self_links.py | 91 + .../models/self_links_links.py | 91 + .../endpoint_agents/models/sort_order.py | 37 + .../endpoint_agents/models/status.py | 37 + .../models/threshold_filter_operator.py | 37 + .../models/unauthorized_error.py | 89 + .../models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../endpoint_agents/models/vpn_type.py | 40 + .../models/wireless_profile.py | 95 + .../endpoint_agents}/py.typed | 0 endpoint_agents/endpoint_agents/rest.py | 257 +++ endpoint_agents/pyproject.toml | 71 + .../requirements.txt | 0 .../agents_api => endpoint_agents}/setup.cfg | 0 endpoint_agents/setup.py | 49 + endpoint_agents/test-requirements.txt | 5 + .../test/__init__.py | 0 .../test/test_address_profile.py | 7 +- endpoint_agents/test/test_address_type.py | 33 + .../test/test_agent_license_type.py | 33 + .../test/test_agent_search_request.py | 89 + ...est_agent_search_request_search_filters.py | 10 +- .../test/test_agent_search_sort.py | 52 + .../test/test_agent_search_sort_key.py | 33 + .../test/test_agent_threshold_filter.py | 53 + .../test/test_agent_threshold_filters.py | 57 + .../test/test_agent_transfer.py | 11 +- .../test/test_agent_transfer_request.py | 9 +- endpoint_agents/test/test_browser_type.py | 33 + .../test/test_conditional_operator.py | 33 + .../test/test_endpoint_agent.py | 27 +- ...ndpoint_agent_bulk_transfer207_response.py | 51 + ...t_bulk_transfer207_response_items_inner.py | 9 +- ...st_endpoint_agent_bulk_transfer_request.py | 9 +- .../test_endpoint_agent_get200_response.py | 31 +- .../test/test_endpoint_agent_location.py | 7 +- .../test/test_endpoint_agent_update.py | 9 +- .../test/test_endpoint_agents.py | 7 +- .../test/test_endpoint_agents_agents_inner.py | 31 +- ...nt_agents_connection_string200_response.py | 11 +- .../test_endpoint_agents_list200_response.py | 73 + ...test_endpoint_agents_search200_response.py | 11 +- .../test/test_endpoint_asn_details.py | 7 +- .../test/test_endpoint_browser_extension.py | 7 +- endpoint_agents/test/test_endpoint_client.py | 61 + .../test/test_endpoint_user_profile.py | 7 +- .../test/test_endpoint_vpn_profile.py | 7 +- endpoint_agents/test/test_error.py | 55 + endpoint_agents/test/test_ethernet_profile.py | 51 + endpoint_agents/test/test_expand.py | 33 + .../test/test_interface_hardware_type.py | 33 + .../test/test_interface_profile.py | 13 +- endpoint_agents/test/test_link.py | 59 + .../test_pagination_next_and_self_link.py | 69 + ...est_pagination_next_and_self_link_links.py | 68 + .../test/test_pagination_next_link.py | 60 + .../test/test_pagination_next_link_links.py | 59 + endpoint_agents/test/test_platform.py | 33 + endpoint_agents/test/test_self_links.py | 60 + endpoint_agents/test/test_self_links_links.py | 59 + endpoint_agents/test/test_sort_order.py | 33 + endpoint_agents/test/test_status.py | 33 + .../test/test_threshold_filter_operator.py | 33 + .../test/test_unauthorized_error.py | 52 + endpoint_agents/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + endpoint_agents/test/test_vpn_type.py | 33 + .../test/test_wireless_profile.py | 7 +- .../.gitignore | 0 .../.openapi-generator-ignore | 0 .../.openapi-generator/FILES | 120 ++ .../.openapi-generator/VERSION | 1 + endpoint_instant_tests/README.md | 164 ++ endpoint_instant_tests/docs/AccountGroupId.md | 29 + .../AgentToServerInstantScheduledTestApi.md | 27 +- endpoint_instant_tests/docs/AlertDirection.md | 12 + .../docs/AlertRoundsViolationMode.md | 12 + endpoint_instant_tests/docs/AlertRule.md | 40 + endpoint_instant_tests/docs/AlertType.md | 12 + .../docs/EndpointAgentLabelsSelectorConfig.md | 32 + .../docs/EndpointAgentSelectorConfig.md | 33 + .../docs/EndpointAgentToServerInstantTest.md | 37 + .../docs/EndpointAgentToServerTest.md | 47 + .../docs/EndpointAllAgentsSelectorConfig.md | 31 + .../docs/EndpointHttpServerBaseTest.md | 37 + .../docs/EndpointHttpServerInstantTest.md | 47 + .../docs/EndpointHttpServerTest.md | 61 + .../docs/EndpointInstantTest.md | 36 + .../docs/EndpointScheduledTestType.md | 12 + .../EndpointSpecificAgentsSelectorConfig.md | 32 + endpoint_instant_tests/docs/EndpointTest.md | 46 + .../docs/EndpointTestAgentSelectorType.md | 12 + .../docs/EndpointTestAuthType.md | 12 + .../docs/EndpointTestLinks.md | 31 + .../docs/EndpointTestLinksSelf.md | 36 + .../docs/EndpointTestProtocol.md | 12 + endpoint_instant_tests/docs/Error.md | 33 + .../docs/HttpServerInstantScheduledTestApi.md | 27 +- endpoint_instant_tests/docs/Link.md | 37 + .../docs/RunExistingTestApi.md | 21 +- endpoint_instant_tests/docs/Severity.md | 12 + endpoint_instant_tests/docs/TestInterval.md | 12 + .../docs/TestLabelsInner.md | 31 + .../docs/TestProbeModeResponse.md | 12 + .../docs/TestSslVersionId.md | 12 + .../docs/UnauthorizedError.md | 30 + .../docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + .../endpoint_instant_tests/__init__.py | 67 + .../endpoint_instant_tests/api/__init__.py | 7 + ...nt_to_server_instant_scheduled_test_api.py | 47 +- .../http_server_instant_scheduled_test_api.py | 47 +- .../api/run_existing_test_api.py | 55 +- .../endpoint_instant_tests/api_client.py | 770 +++++++ .../endpoint_instant_tests/api_response.py | 21 + .../endpoint_instant_tests/configuration.py | 444 ++++ .../endpoint_instant_tests/exceptions.py | 199 ++ .../endpoint_instant_tests/models/__init__.py | 48 + .../models/account_group_id.py | 87 + .../models/alert_direction.py | 38 + .../models/alert_rounds_violation_mode.py | 37 + .../models/alert_rule.py | 129 ++ .../models/alert_type.py | 62 + .../endpoint_agent_labels_selector_config.py | 99 + .../models/endpoint_agent_selector_config.py | 154 ++ .../endpoint_agent_to_server_instant_test.py | 105 + .../models/endpoint_agent_to_server_test.py | 171 ++ .../endpoint_all_agents_selector_config.py | 97 + .../models/endpoint_http_server_base_test.py | 107 + .../endpoint_http_server_instant_test.py | 129 ++ .../models/endpoint_http_server_test.py | 203 ++ .../models/endpoint_instant_test.py | 103 + .../models/endpoint_scheduled_test_type.py | 37 + ...ndpoint_specific_agents_selector_config.py | 99 + .../models/endpoint_test.py | 150 ++ .../endpoint_test_agent_selector_type.py | 38 + .../models/endpoint_test_auth_type.py | 38 + .../models/endpoint_test_links.py | 101 + .../models/endpoint_test_links_self.py | 101 + .../models/endpoint_test_protocol.py | 41 + .../endpoint_instant_tests/models/error.py | 95 + .../endpoint_instant_tests/models/link.py | 101 + .../endpoint_instant_tests/models/severity.py | 40 + .../models/test_interval.py | 42 + .../models/test_labels_inner.py | 91 + .../models/test_probe_mode_response.py | 39 + .../models/test_ssl_version_id.py | 40 + .../models/unauthorized_error.py | 89 + .../models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../endpoint_instant_tests}/py.typed | 0 .../endpoint_instant_tests/rest.py | 257 +++ endpoint_instant_tests/pyproject.toml | 71 + .../requirements.txt | 0 .../setup.cfg | 0 endpoint_instant_tests/setup.py | 49 + endpoint_instant_tests/test-requirements.txt | 5 + .../test/__init__.py | 0 .../test/test_account_group_id.py | 51 + .../test/test_alert_direction.py | 33 + .../test/test_alert_rounds_violation_mode.py | 33 + .../test/test_alert_rule.py | 62 + .../test/test_alert_type.py | 33 + ...t_endpoint_agent_labels_selector_config.py | 54 + .../test_endpoint_agent_selector_config.py | 55 + ...t_endpoint_agent_to_server_instant_test.py | 63 + .../test_endpoint_agent_to_server_test.py | 88 + ...est_endpoint_all_agents_selector_config.py | 53 + .../test_endpoint_http_server_base_test.py | 59 + .../test_endpoint_http_server_instant_test.py | 77 + .../test/test_endpoint_http_server_test.py | 102 + .../test/test_endpoint_instant_test.py | 61 + .../test/test_endpoint_scheduled_test_type.py | 33 + ...ndpoint_specific_agents_selector_config.py | 54 + .../test/test_endpoint_test.py | 85 + .../test_endpoint_test_agent_selector_type.py | 33 + .../test/test_endpoint_test_auth_type.py | 33 + .../test/test_endpoint_test_links.py | 52 + .../test/test_endpoint_test_links_self.py | 59 + .../test/test_endpoint_test_protocol.py | 33 + endpoint_instant_tests/test/test_error.py | 55 + endpoint_instant_tests/test/test_link.py | 59 + endpoint_instant_tests/test/test_severity.py | 33 + .../test/test_test_interval.py | 33 + .../test/test_test_labels_inner.py | 53 + .../test/test_test_probe_mode_response.py | 33 + .../test/test_test_ssl_version_id.py | 33 + .../test/test_unauthorized_error.py | 52 + .../test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + .../labels_api => endpoint_labels}/.gitignore | 0 .../.openapi-generator-ignore | 0 endpoint_labels/.openapi-generator/FILES | 80 + endpoint_labels/.openapi-generator/VERSION | 1 + endpoint_labels/README.md | 143 ++ .../docs/EndpointLabelsList200Response.md | 30 + endpoint_labels/docs/Error.md | 33 + endpoint_labels/docs/Expand.md | 11 + .../docs/Filter.md | 7 +- .../docs/FilterType.md | 3 +- endpoint_labels/docs/Label.md | 34 + .../docs/LabelFilterMode.md | 1 + endpoint_labels/docs/Labels.md | 30 + .../docs/LabelsLabelsInner.md | 7 +- endpoint_labels/docs/Link.md | 37 + endpoint_labels/docs/ManageLabelsApi.md | 442 ++++ .../docs/MatchType.md | 1 + .../docs/PaginationNextAndSelfLink.md | 30 + .../docs/PaginationNextAndSelfLinkLinks.md | 30 + endpoint_labels/docs/SelfLinks.md | 29 + endpoint_labels/docs/SelfLinksLinks.md | 30 + endpoint_labels/docs/UnauthorizedError.md | 30 + .../docs/V7EndpointLabelsPost201Response.md | 7 +- .../docs/V7EndpointLabelsPostRequest.md | 7 +- endpoint_labels/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + endpoint_labels/endpoint_labels/__init__.py | 53 + .../endpoint_labels/api/__init__.py | 5 + .../endpoint_labels}/api/manage_labels_api.py | 229 +- endpoint_labels/endpoint_labels/api_client.py | 770 +++++++ .../endpoint_labels/api_response.py | 21 + .../endpoint_labels/configuration.py | 444 ++++ endpoint_labels/endpoint_labels/exceptions.py | 199 ++ .../endpoint_labels/models/__init__.py | 36 + .../endpoint_labels_list200_response.py | 101 + .../endpoint_labels/models/error.py | 95 + .../endpoint_labels/models/expand.py | 36 + .../endpoint_labels}/models/filter.py | 34 +- .../endpoint_labels}/models/filter_type.py | 14 +- .../endpoint_labels/models/label.py | 106 + .../models/label_filter_mode.py | 12 +- .../endpoint_labels/models/labels.py | 95 + .../models/labels_labels_inner.py | 43 +- .../endpoint_labels/models/link.py | 101 + .../endpoint_labels}/models/match_type.py | 12 +- .../models/pagination_next_and_self_link.py | 91 + .../pagination_next_and_self_link_links.py | 96 + .../endpoint_labels/models/self_links.py | 91 + .../models/self_links_links.py | 91 + .../models/unauthorized_error.py | 89 + .../v7_endpoint_labels_post201_response.py | 43 +- .../models/v7_endpoint_labels_post_request.py | 39 +- .../models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../endpoint_labels}/py.typed | 0 endpoint_labels/endpoint_labels/rest.py | 257 +++ endpoint_labels/pyproject.toml | 71 + .../requirements.txt | 0 .../labels_api => endpoint_labels}/setup.cfg | 0 endpoint_labels/setup.py | 49 + endpoint_labels/test-requirements.txt | 5 + .../test/__init__.py | 0 .../test_endpoint_labels_list200_response.py | 72 + endpoint_labels/test/test_error.py | 55 + endpoint_labels/test/test_expand.py | 33 + .../test/test_filter.py | 5 +- .../test/test_filter_type.py | 5 +- endpoint_labels/test/test_label.py | 60 + .../test/test_label_filter_mode.py | 5 +- endpoint_labels/test/test_labels.py | 53 + .../test/test_labels_labels_inner.py | 11 +- endpoint_labels/test/test_link.py | 59 + .../test/test_match_type.py | 5 +- .../test_pagination_next_and_self_link.py | 69 + ...est_pagination_next_and_self_link_links.py | 68 + endpoint_labels/test/test_self_links.py | 60 + endpoint_labels/test/test_self_links_links.py | 59 + .../test/test_unauthorized_error.py | 52 + ...est_v7_endpoint_labels_post201_response.py | 11 +- .../test_v7_endpoint_labels_post_request.py | 9 +- endpoint_labels/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + .../.gitignore | 0 .../.openapi-generator-ignore | 0 .../.openapi-generator/FILES | 475 +++++ .../.openapi-generator/VERSION | 1 + endpoint_test_results/README.md | 284 +++ endpoint_test_results/docs/AccountGroupId.md | 29 + endpoint_test_results/docs/AlertDirection.md | 12 + .../docs/AlertRoundsViolationMode.md | 12 + endpoint_test_results/docs/AlertRule.md | 40 + endpoint_test_results/docs/AlertType.md | 12 + .../docs/ApplicationScoreQuality.md | 1 + .../docs/AsnDetails.md | 7 +- .../docs/ConditionalOperator.md | 11 + .../docs/CpuUtilization.md | 7 +- .../docs/DynamicBaseTestResult.md | 30 + .../docs/DynamicBaseTestResultWebex.md | 33 + endpoint_test_results/docs/DynamicTest.md | 45 + .../docs/DynamicTestLinks.md | 31 + .../docs/DynamicTestLinksSelf.md | 36 + .../docs/DynamicTestsDataRoundSearch.md | 7 +- .../docs/DynamicTestsDataSearchFilter.md | 7 +- .../docs/EndpointAgentLabelsSelectorConfig.md | 32 + .../docs/EndpointAgentSelectorConfig.md | 33 + .../docs/EndpointAgentToServerTest.md | 47 + .../docs/EndpointAllAgentsSelectorConfig.md | 31 + .../docs/EndpointBrowser.md | 7 +- .../docs/EndpointHttpDataPointScore.md | 7 +- .../docs/EndpointHttpServerBaseTest.md | 37 + .../docs/EndpointHttpServerTest.md | 61 + ...pointNetworkTopologyResultRequestFilter.md | 7 +- .../docs/EndpointPingDataPointScore.md | 7 +- .../docs/EndpointRealUserTest.md | 7 +- .../docs/EndpointRealUserTestBase.md | 7 +- .../docs/EndpointRealUserTestDetail.md | 7 +- .../docs/EndpointRealUserTestDetailResults.md | 7 +- ...EndpointRealUserTestResultRequestFilter.md | 7 +- .../docs/EndpointRealUserTestResults.md | 7 +- .../docs/EndpointResultRequestFilter.md | 7 +- .../docs/EndpointScheduledTest.md | 17 +- .../docs/EndpointScheduledTestType.md | 12 + .../EndpointSpecificAgentsSelectorConfig.md | 32 + endpoint_test_results/docs/EndpointTest.md | 46 + .../docs/EndpointTestAuthType.md | 12 + .../docs/EndpointTestLinks.md | 31 + .../docs/EndpointTestLinksSelf.md | 36 + .../docs/EndpointTestProtocol.md | 12 + endpoint_test_results/docs/Error.md | 33 + endpoint_test_results/docs/EthernetProfile.md | 29 + endpoint_test_results/docs/Expand.md | 11 + ...amicTestResultNetworkPathvis200Response.md | 9 +- ...cTestResultPathvisAgentRound200Response.md | 31 + ...tLocalNetworkTopologyDetails200Response.md | 30 + .../GetEndpointLocalNetworks200Response.md | 7 +- ...pointLocalNetworksTopologies200Response.md | 7 +- ...tEndpointLocalNetworksTopologiesRequest.md | 29 + ...tEndpointRealUserTestDetails200Response.md | 30 + ...ointRealUserTestPagesDetails200Response.md | 29 + .../GetEndpointRealUserTests200Response.md | 7 +- ...EndpointRealUserTestsNetwork200Response.md | 7 +- ...etEndpointRealUserTestsPages200Response.md | 7 +- .../docs/GetEndpointRealUserTestsRequest.md | 7 +- .../GetTestResultHttpServer200Response.md | 33 + .../GetTestResultNetworkPathvis200Response.md | 33 + ...tTestResultPathvisAgentRound200Response.md | 7 +- .../docs/Hop.md | 7 +- .../docs/HttpErrorType.md | 1 + endpoint_test_results/docs/HttpTestResult.md | 49 + .../docs/HttpTestResultHeaders.md | 31 + endpoint_test_results/docs/HttpTestResults.md | 30 + .../docs/InterfaceHardwareType.md | 11 + endpoint_test_results/docs/Link.md | 37 + .../docs/LocalNetworkResult.md | 7 +- .../docs/LocalNetworkResults.md | 7 +- .../docs/LocalNetworkTestsResultsApi.md | 73 +- .../docs/LocalNetworkTopologyDetailResults.md | 7 +- .../docs/LocalNetworkTopologyResult.md | 9 +- .../docs/LocalNetworkTopologyResultBase.md | 9 +- .../docs/LocalNetworkTopologyResults.md | 7 +- .../docs/MultiTestIdNetworkTestResults.md | 30 + .../docs/MultiTestIdTestsDataRoundsSearch.md | 7 +- .../docs/MultiTestIdTestsDataSearchFilter.md | 7 +- .../docs/NetworkDynamicTestResult.md | 13 +- .../docs/NetworkDynamicTestResults.md | 7 +- .../docs/NetworkDynamicTestsResultsApi.md | 89 +- .../docs/NetworkInterface.md | 9 +- .../docs/NetworkMetrics.md | 7 +- .../docs/NetworkPing.md | 7 +- .../docs/NetworkProfile.md | 9 +- .../docs/NetworkProxyProfile.md | 7 +- .../docs/NetworkProxyProfileProxiesInner.md | 7 +- .../docs/NetworkScheduledTestsResultsApi.md | 118 +- .../docs/NetworkTestResult.md | 42 + .../docs/NetworkTestResults.md | 31 + .../docs/NetworkTopologyType.md | 1 + .../docs/NetworkWirelessProfile.md | 7 +- .../docs/PaginationNextAndSelfLink.md | 30 + .../docs/PaginationNextAndSelfLinkLinks.md | 30 + .../docs/PaginationNextLink.md | 30 + .../docs/PaginationNextLinkLinks.md | 29 + .../docs/PathVisBaseTestResult.md | 39 + .../docs/PathVisDetailDynamicTestResult.md | 43 + .../docs/PathVisDetailDynamicTestResults.md | 7 +- .../docs/PathVisDetailTestResult.md | 41 + .../docs/PathVisDetailTestResults.md | 30 + .../docs/PathVisDynamicTestResult.md | 43 + .../docs/PathVisDynamicTestResults.md | 7 +- endpoint_test_results/docs/PathVisEndpoint.md | 32 + endpoint_test_results/docs/PathVisHop.md | 35 + endpoint_test_results/docs/PathVisRoute.md | 30 + .../docs/PathVisTestResult.md | 41 + .../docs/PathVisTestResults.md | 30 + .../docs/PhysicalMemoryUsedBytes.md | 7 +- endpoint_test_results/docs/Platform.md | 12 + ...etchDynamicTestResultMetrics200Response.md | 7 +- .../PostFetchTestResultMetrics200Response.md | 8 +- ...chTestResultMetricsMultiTest200Response.md | 8 +- endpoint_test_results/docs/QueryWindow.md | 30 + .../docs/RealUserTestCoordinates.md | 7 +- .../docs/RealUserTestNetwork.md | 7 +- .../docs/RealUserTestNetworkGatewayPing.md | 7 +- .../docs/RealUserTestNetworkPing.md | 7 +- .../docs/RealUserTestNetworkResult.md | 7 +- .../docs/RealUserTestNetworkResults.md | 7 +- .../docs/RealUserTestNetworkTraceroute.md | 7 +- .../docs/RealUserTestNetworkVpnPing.md | 7 +- .../docs/RealUserTestNetworkVpnTraceroute.md | 7 +- .../docs/RealUserTestPage.md | 7 +- .../docs/RealUserTestPagePageTimings.md | 7 +- .../docs/RealUserTestPageResult.md | 7 +- .../docs/RealUserTestPageResults.md | 7 +- .../docs/RealUserTestsResultsApi.md | 131 +- endpoint_test_results/docs/SelfLinks.md | 29 + endpoint_test_results/docs/SelfLinksLinks.md | 30 + endpoint_test_results/docs/Severity.md | 12 + endpoint_test_results/docs/SortOrder.md | 12 + .../docs/SystemMetrics.md | 7 +- .../docs/TcpConnect.md | 7 +- endpoint_test_results/docs/TestInterval.md | 12 + endpoint_test_results/docs/TestLabelsInner.md | 31 + .../docs/TestProbeModeResponse.md | 12 + endpoint_test_results/docs/TestResult.md | 35 + .../docs/TestSslVersionId.md | 12 + .../docs/TestsDataRoundsSearch.md | 7 +- .../docs/TestsDataSearchFilter.md | 7 +- .../docs/TestsDataSearchSort.md | 7 +- .../docs/TestsDataSearchSortKey.md | 1 + .../docs/TestsDataThresholdFilter.md | 7 +- .../docs/TestsDataThresholdFilters.md | 7 +- .../docs/ThresholdFilterName.md | 1 + .../docs/ThresholdFilterOperator.md | 11 + .../docs/Traceroute.md | 7 +- .../docs/TracerouteHop.md | 7 +- .../docs/Trigger.md | 1 + .../docs/UnauthorizedError.md | 30 + endpoint_test_results/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + .../docs/VpnProfile.md | 7 +- endpoint_test_results/docs/VpnType.md | 12 + .../WebHTTPServerScheduledTestResultsApi.md | 31 +- .../endpoint_test_results/__init__.py | 186 ++ .../endpoint_test_results/api/__init__.py | 9 + .../api/local_network_tests_results_api.py | 95 +- .../api/network_dynamic_tests_results_api.py | 123 +- .../network_scheduled_tests_results_api.py | 147 +- .../api/real_user_tests_results_api.py | 165 +- ..._http_server_scheduled_test_results_api.py | 57 +- .../endpoint_test_results/api_client.py | 770 +++++++ .../endpoint_test_results/api_response.py | 21 + .../endpoint_test_results/configuration.py | 444 ++++ .../endpoint_test_results/exceptions.py | 199 ++ .../endpoint_test_results/models/__init__.py | 165 ++ .../models/account_group_id.py | 87 + .../models/alert_direction.py | 38 + .../models/alert_rounds_violation_mode.py | 37 + .../models/alert_rule.py | 129 ++ .../models/alert_type.py | 62 + .../models/application_score_quality.py | 12 +- .../models/asn_details.py | 35 +- .../models/conditional_operator.py | 37 + .../models/cpu_utilization.py | 43 +- .../models/dynamic_base_test_result.py | 93 + .../models/dynamic_base_test_result_webex.py | 101 + .../models/dynamic_test.py | 147 ++ .../models/dynamic_test_links.py | 101 + .../models/dynamic_test_links_self.py | 101 + .../models/dynamic_tests_data_round_search.py | 43 +- .../dynamic_tests_data_search_filter.py | 31 +- .../endpoint_agent_labels_selector_config.py | 99 + .../models/endpoint_agent_selector_config.py | 154 ++ .../models/endpoint_agent_to_server_test.py | 171 ++ .../endpoint_all_agents_selector_config.py | 97 + .../models/endpoint_browser.py | 35 +- .../models/endpoint_http_data_point_score.py | 33 +- .../models/endpoint_http_server_base_test.py | 107 + .../models/endpoint_http_server_test.py | 203 ++ ..._network_topology_result_request_filter.py | 37 +- .../models/endpoint_ping_data_point_score.py | 33 +- .../models/endpoint_real_user_test.py | 56 +- .../models/endpoint_real_user_test_base.py | 54 +- .../models/endpoint_real_user_test_detail.py | 70 +- .../endpoint_real_user_test_detail_results.py | 34 +- ...nt_real_user_test_result_request_filter.py | 37 +- .../models/endpoint_real_user_test_results.py | 34 +- .../models/endpoint_result_request_filter.py | 35 +- .../models/endpoint_scheduled_test.py | 38 +- .../models/endpoint_scheduled_test_type.py | 37 + ...ndpoint_specific_agents_selector_config.py | 99 + .../models/endpoint_test.py | 150 ++ .../models/endpoint_test_auth_type.py | 38 + .../models/endpoint_test_links.py | 101 + .../models/endpoint_test_links_self.py | 101 + .../models/endpoint_test_protocol.py | 41 + .../endpoint_test_results/models/error.py | 95 + .../models/ethernet_profile.py | 89 + .../endpoint_test_results/models/expand.py | 36 + ...test_result_network_pathvis200_response.py | 116 ++ ..._result_pathvis_agent_round200_response.py | 107 + ...al_network_topology_details200_response.py | 39 +- ...get_endpoint_local_networks200_response.py | 39 +- ...t_local_networks_topologies200_response.py | 42 +- ...point_local_networks_topologies_request.py | 35 +- ...oint_real_user_test_details200_response.py | 39 +- ...eal_user_test_pages_details200_response.py | 35 +- ...et_endpoint_real_user_tests200_response.py | 42 +- ...int_real_user_tests_network200_response.py | 42 +- ...point_real_user_tests_pages200_response.py | 42 +- .../get_endpoint_real_user_tests_request.py | 35 +- ...get_test_result_http_server200_response.py | 116 ++ ...test_result_network_pathvis200_response.py | 116 ++ ..._result_pathvis_agent_round200_response.py | 107 + .../endpoint_test_results}/models/hop.py | 37 +- .../models/http_error_type.py | 12 +- .../models/http_test_result.py | 174 ++ .../models/http_test_result_headers.py | 93 + .../models/http_test_results.py | 101 + .../models/interface_hardware_type.py | 42 + .../endpoint_test_results/models/link.py | 101 + .../models/local_network_result.py | 39 +- .../models/local_network_results.py | 35 +- .../local_network_topology_detail_results.py | 34 +- .../models/local_network_topology_result.py | 74 +- .../local_network_topology_result_base.py | 60 +- .../models/local_network_topology_results.py | 34 +- .../multi_test_id_network_test_results.py | 97 + .../multi_test_id_tests_data_rounds_search.py | 43 +- .../multi_test_id_tests_data_search_filter.py | 31 +- .../models/network_dynamic_test_result.py | 153 ++ .../models/network_dynamic_test_results.py | 38 +- .../models/network_interface.py | 49 +- .../models/network_metrics.py | 39 +- .../models/network_ping.py | 47 +- .../models/network_profile.py | 69 +- .../models/network_proxy_profile.py | 37 +- .../network_proxy_profile_proxies_inner.py | 35 +- .../models/network_test_result.py | 145 ++ .../models/network_test_results.py | 103 + .../models/network_topology_type.py | 12 +- .../models/network_wireless_profile.py | 49 +- .../models/pagination_next_and_self_link.py | 91 + .../pagination_next_and_self_link_links.py | 96 + .../models/pagination_next_link.py | 91 + .../models/pagination_next_link_links.py | 91 + .../models/path_vis_base_test_result.py | 135 ++ .../path_vis_detail_dynamic_test_result.py | 162 ++ .../path_vis_detail_dynamic_test_results.py | 101 + .../models/path_vis_detail_test_result.py | 154 ++ .../models/path_vis_detail_test_results.py | 101 + .../models/path_vis_dynamic_test_result.py | 157 ++ .../models/path_vis_dynamic_test_results.py | 38 +- .../models/path_vis_endpoint.py | 101 + .../models/path_vis_hop.py | 113 + .../models/path_vis_route.py | 99 + .../models/path_vis_test_result.py | 149 ++ .../models/path_vis_test_results.py | 101 + .../models/physical_memory_used_bytes.py | 43 +- .../endpoint_test_results/models/platform.py | 38 + ...dynamic_test_result_metrics200_response.py | 46 +- ...t_fetch_test_result_metrics200_response.py | 118 ++ ...t_result_metrics_multi_test200_response.py | 112 + .../models/query_window.py | 94 + .../models/real_user_test_coordinates.py | 37 +- .../models/real_user_test_network.py | 139 ++ .../real_user_test_network_gateway_ping.py | 47 +- .../models/real_user_test_network_ping.py | 47 +- .../models/real_user_test_network_result.py | 50 +- .../models/real_user_test_network_results.py | 34 +- .../real_user_test_network_traceroute.py | 43 +- .../models/real_user_test_network_vpn_ping.py | 47 +- .../real_user_test_network_vpn_traceroute.py | 43 +- .../models/real_user_test_page.py | 44 +- .../real_user_test_page_page_timings.py | 35 +- .../models/real_user_test_page_result.py | 56 +- .../models/real_user_test_page_results.py | 34 +- .../models/self_links.py | 91 + .../models/self_links_links.py | 91 + .../endpoint_test_results/models/severity.py | 40 + .../models/sort_order.py | 37 + .../models/system_metrics.py | 45 +- .../models/tcp_connect.py | 39 +- .../models/test_interval.py | 42 + .../models/test_labels_inner.py | 91 + .../models/test_probe_mode_response.py | 39 + .../models/test_result.py | 117 ++ .../models/test_ssl_version_id.py | 40 + .../models/tests_data_rounds_search.py | 43 +- .../models/tests_data_search_filter.py | 31 +- .../models/tests_data_search_sort.py | 34 +- .../models/tests_data_search_sort_key.py | 12 +- .../models/tests_data_threshold_filter.py | 35 +- .../models/tests_data_threshold_filters.py | 37 +- .../models/threshold_filter_name.py | 12 +- .../models/threshold_filter_operator.py | 37 + .../models/traceroute.py | 43 +- .../models/traceroute_hop.py | 45 +- .../endpoint_test_results}/models/trigger.py | 12 +- .../models/unauthorized_error.py | 89 + .../models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../models/vpn_profile.py | 39 +- .../endpoint_test_results/models/vpn_type.py | 40 + .../endpoint_test_results}/py.typed | 0 .../endpoint_test_results/rest.py | 257 +++ endpoint_test_results/pyproject.toml | 71 + .../requirements.txt | 0 .../setup.cfg | 0 endpoint_test_results/setup.py | 49 + endpoint_test_results/test-requirements.txt | 5 + .../test/__init__.py | 0 .../test/test_account_group_id.py | 51 + .../test/test_alert_direction.py | 33 + .../test/test_alert_rounds_violation_mode.py | 33 + endpoint_test_results/test/test_alert_rule.py | 62 + endpoint_test_results/test/test_alert_type.py | 33 + .../test/test_application_score_quality.py | 5 +- .../test/test_asn_details.py | 5 +- .../test/test_conditional_operator.py | 33 + .../test/test_cpu_utilization.py | 5 +- .../test/test_dynamic_base_test_result.py | 11 +- .../test_dynamic_base_test_result_webex.py | 9 +- .../test/test_dynamic_test.py | 71 + .../test/test_dynamic_test_links.py | 52 + .../test/test_dynamic_test_links_self.py | 59 + .../test_dynamic_tests_data_round_search.py | 13 +- .../test_dynamic_tests_data_search_filter.py | 5 +- ...t_endpoint_agent_labels_selector_config.py | 54 + .../test_endpoint_agent_selector_config.py | 55 + .../test_endpoint_agent_to_server_test.py | 88 + ...est_endpoint_all_agents_selector_config.py | 53 + .../test/test_endpoint_browser.py | 5 +- .../test_endpoint_http_data_point_score.py | 5 +- .../test_endpoint_http_server_base_test.py | 59 + .../test/test_endpoint_http_server_test.py | 102 + ..._network_topology_result_request_filter.py | 5 +- .../test_endpoint_ping_data_point_score.py | 5 +- .../test/test_endpoint_real_user_test.py | 5 +- .../test/test_endpoint_real_user_test_base.py | 5 +- .../test_endpoint_real_user_test_detail.py | 21 +- ..._endpoint_real_user_test_detail_results.py | 5 +- ...nt_real_user_test_result_request_filter.py | 5 +- .../test_endpoint_real_user_test_results.py | 5 +- .../test_endpoint_result_request_filter.py | 5 +- .../test/test_endpoint_scheduled_test.py | 102 + .../test/test_endpoint_scheduled_test_type.py | 33 + ...ndpoint_specific_agents_selector_config.py | 54 + .../test/test_endpoint_test.py | 85 + .../test/test_endpoint_test_auth_type.py | 33 + .../test/test_endpoint_test_links.py | 52 + .../test/test_endpoint_test_links_self.py | 59 + .../test/test_endpoint_test_protocol.py | 33 + endpoint_test_results/test/test_error.py | 55 + .../test/test_ethernet_profile.py | 51 + endpoint_test_results/test/test_expand.py | 33 + ...test_result_network_pathvis200_response.py | 75 + ..._result_pathvis_agent_round200_response.py | 64 + ...al_network_topology_details200_response.py | 9 +- ...get_endpoint_local_networks200_response.py | 11 +- ...t_local_networks_topologies200_response.py | 23 +- ...point_local_networks_topologies_request.py | 5 +- ...oint_real_user_test_details200_response.py | 9 +- ...eal_user_test_pages_details200_response.py | 9 +- ...et_endpoint_real_user_tests200_response.py | 9 +- ...int_real_user_tests_network200_response.py | 21 +- ...point_real_user_tests_pages200_response.py | 9 +- ...st_get_endpoint_real_user_tests_request.py | 5 +- ...get_test_result_http_server200_response.py | 75 + ...test_result_network_pathvis200_response.py | 75 + ..._result_pathvis_agent_round200_response.py | 9 +- .../test/test_hop.py | 5 +- .../test/test_http_error_type.py | 5 +- .../test/test_http_test_result.py | 121 ++ .../test/test_http_test_result_headers.py | 77 + .../test/test_http_test_results.py | 54 + .../test/test_interface_hardware_type.py | 33 + endpoint_test_results/test/test_link.py | 59 + .../test/test_local_network_result.py | 5 +- .../test/test_local_network_results.py | 7 +- ...t_local_network_topology_detail_results.py | 5 +- .../test_local_network_topology_result.py | 21 +- ...test_local_network_topology_result_base.py | 15 +- .../test_local_network_topology_results.py | 19 +- ...test_multi_test_id_network_test_results.py | 8 +- ..._multi_test_id_tests_data_rounds_search.py | 13 +- ..._multi_test_id_tests_data_search_filter.py | 5 +- .../test/test_network_dynamic_test_result.py | 24 +- .../test/test_network_dynamic_test_results.py | 54 + .../test/test_network_interface.py | 5 +- .../test/test_network_metrics.py | 5 +- .../test/test_network_ping.py | 5 +- .../test/test_network_profile.py | 15 +- .../test/test_network_proxy_profile.py | 7 +- ...est_network_proxy_profile_proxies_inner.py | 5 +- .../test/test_network_test_result.py | 87 + .../test/test_network_test_results.py | 55 + .../test/test_network_topology_type.py | 5 +- .../test/test_network_wireless_profile.py | 5 +- .../test_pagination_next_and_self_link.py | 69 + ...est_pagination_next_and_self_link_links.py | 68 + .../test/test_pagination_next_link.py | 60 + .../test/test_pagination_next_link_links.py | 59 + .../test/test_path_vis_base_test_result.py | 86 + ...est_path_vis_detail_dynamic_test_result.py | 106 + ...st_path_vis_detail_dynamic_test_results.py | 54 + .../test/test_path_vis_detail_test_result.py | 100 + .../test/test_path_vis_detail_test_results.py | 54 + .../test/test_path_vis_dynamic_test_result.py | 100 + .../test_path_vis_dynamic_test_results.py | 54 + .../test/test_path_vis_endpoint.py | 54 + .../test/test_path_vis_hop.py | 57 + .../test/test_path_vis_route.py | 54 + .../test/test_path_vis_test_result.py | 94 + .../test/test_path_vis_test_results.py | 54 + .../test/test_physical_memory_used_bytes.py | 5 +- endpoint_test_results/test/test_platform.py | 33 + ...dynamic_test_result_metrics200_response.py | 66 + ...t_fetch_test_result_metrics200_response.py | 10 +- ...t_result_metrics_multi_test200_response.py | 10 +- .../test/test_query_window.py | 52 + .../test/test_real_user_test_coordinates.py | 5 +- .../test/test_real_user_test_network.py | 11 +- ...est_real_user_test_network_gateway_ping.py | 5 +- .../test/test_real_user_test_network_ping.py | 5 +- .../test_real_user_test_network_result.py | 17 +- .../test_real_user_test_network_results.py | 17 +- .../test_real_user_test_network_traceroute.py | 5 +- .../test_real_user_test_network_vpn_ping.py | 5 +- ...t_real_user_test_network_vpn_traceroute.py | 5 +- .../test/test_real_user_test_page.py | 7 +- .../test_real_user_test_page_page_timings.py | 5 +- .../test/test_real_user_test_page_result.py | 13 +- .../test/test_real_user_test_page_results.py | 5 +- endpoint_test_results/test/test_self_links.py | 60 + .../test/test_self_links_links.py | 59 + endpoint_test_results/test/test_severity.py | 33 + endpoint_test_results/test/test_sort_order.py | 33 + .../test/test_system_metrics.py | 9 +- .../test/test_tcp_connect.py | 5 +- .../test/test_test_interval.py | 33 + .../test/test_test_labels_inner.py | 53 + .../test/test_test_probe_mode_response.py | 33 + .../test/test_test_result.py | 80 + .../test/test_test_ssl_version_id.py | 33 + .../test/test_tests_data_rounds_search.py | 13 +- .../test/test_tests_data_search_filter.py | 5 +- .../test/test_tests_data_search_sort.py | 5 +- .../test/test_tests_data_search_sort_key.py | 5 +- .../test/test_tests_data_threshold_filter.py | 5 +- .../test/test_tests_data_threshold_filters.py | 7 +- .../test/test_threshold_filter_name.py | 5 +- .../test/test_threshold_filter_operator.py | 33 + .../test/test_traceroute.py | 5 +- .../test/test_traceroute_hop.py | 5 +- .../test/test_trigger.py | 5 +- .../test/test_unauthorized_error.py | 52 + .../test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + .../test/test_vpn_profile.py | 5 +- endpoint_test_results/test/test_vpn_type.py | 33 + .../tests_api => endpoint_tests}/.gitignore | 0 .../.openapi-generator-ignore | 0 endpoint_tests/.openapi-generator/FILES | 185 ++ endpoint_tests/.openapi-generator/VERSION | 1 + endpoint_tests/README.md | 188 ++ endpoint_tests/docs/AccountGroupId.md | 29 + endpoint_tests/docs/AlertDirection.md | 12 + .../docs/AlertRoundsViolationMode.md | 12 + endpoint_tests/docs/AlertRule.md | 40 + endpoint_tests/docs/AlertType.md | 12 + endpoint_tests/docs/DynamicTest.md | 45 + endpoint_tests/docs/DynamicTestLinks.md | 31 + endpoint_tests/docs/DynamicTestLinksSelf.md | 36 + .../docs/DynamicTestRequest.md | 20 +- .../docs/DynamicTests.md | 7 +- .../docs/DynamicTestsAgentToServerApi.md | 449 ++++ .../docs/EndpointAgentLabelsSelectorConfig.md | 32 + .../docs/EndpointAgentSelectorConfig.md | 33 + .../docs/EndpointAgentToServerInstantTest.md | 37 + .../docs/EndpointAgentToServerTest.md | 47 + .../docs/EndpointAgentToServerTestRequest.md | 7 +- .../docs/EndpointAgentToServerTests.md | 7 +- .../docs/EndpointAllAgentsSelectorConfig.md | 31 + .../docs/EndpointDynamicTestUpdate.md | 34 + .../docs/EndpointHttpServerBaseTest.md | 37 + .../docs/EndpointHttpServerInstantTest.md | 47 + endpoint_tests/docs/EndpointHttpServerTest.md | 61 + .../docs/EndpointHttpServerTestRequest.md | 9 +- .../docs/EndpointHttpServerTests.md | 7 +- endpoint_tests/docs/EndpointHttpTestUpdate.md | 34 + endpoint_tests/docs/EndpointInstantTest.md | 36 + .../docs/EndpointNetworkTestUpdate.md | 35 + .../docs/EndpointScheduledTestType.md | 12 + .../EndpointSpecificAgentsSelectorConfig.md | 32 + endpoint_tests/docs/EndpointTest.md | 46 + .../docs/EndpointTestAgentSelectorType.md | 12 + endpoint_tests/docs/EndpointTestAuthType.md | 12 + endpoint_tests/docs/EndpointTestLinks.md | 31 + endpoint_tests/docs/EndpointTestLinksSelf.md | 36 + endpoint_tests/docs/EndpointTestProtocol.md | 12 + .../docs/EndpointTests.md | 7 +- endpoint_tests/docs/Error.md | 33 + .../docs/GetDynamicTestsList200Response.md | 7 +- ...dpointAgentToserverTestsList200Response.md | 30 + ...tEndpointHttpserverTestsList200Response.md | 7 +- .../docs/GetEndpointTestsList200Response.md | 7 +- endpoint_tests/docs/Link.md | 37 + .../docs/ListEndpointScheduledTestsApi.md | 23 +- .../docs/ScheduledTestsAgentToServerApi.md | 449 ++++ .../docs/ScheduledTestsHTTPServerApi.md | 449 ++++ endpoint_tests/docs/SelfLinks.md | 29 + endpoint_tests/docs/SelfLinksLinks.md | 30 + endpoint_tests/docs/Severity.md | 12 + endpoint_tests/docs/TestInterval.md | 12 + endpoint_tests/docs/TestLabelsInner.md | 31 + endpoint_tests/docs/TestProbeMode.md | 12 + endpoint_tests/docs/TestProbeModeResponse.md | 12 + endpoint_tests/docs/TestSslVersionId.md | 12 + endpoint_tests/docs/TestUpdate.md | 33 + endpoint_tests/docs/UnauthorizedError.md | 30 + endpoint_tests/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + endpoint_tests/endpoint_tests/__init__.py | 89 + endpoint_tests/endpoint_tests/api/__init__.py | 8 + .../api/dynamic_tests_agent_to_server_api.py | 1543 ++++++++++++++ .../api/list_endpoint_scheduled_tests_api.py | 39 +- .../scheduled_tests_agent_to_server_api.py | 1543 ++++++++++++++ .../api/scheduled_tests_http_server_api.py | 1543 ++++++++++++++ endpoint_tests/endpoint_tests/api_client.py | 770 +++++++ endpoint_tests/endpoint_tests/api_response.py | 21 + .../endpoint_tests/configuration.py | 444 ++++ endpoint_tests/endpoint_tests/exceptions.py | 199 ++ .../endpoint_tests/models/__init__.py | 69 + .../endpoint_tests/models/account_group_id.py | 87 + .../endpoint_tests/models/alert_direction.py | 38 + .../models/alert_rounds_violation_mode.py | 37 + .../endpoint_tests/models/alert_rule.py | 129 ++ .../endpoint_tests/models/alert_type.py | 62 + .../endpoint_tests/models/dynamic_test.py | 147 ++ .../models/dynamic_test_links.py | 101 + .../models/dynamic_test_links_self.py | 101 + .../models/dynamic_test_request.py | 157 ++ .../endpoint_tests}/models/dynamic_tests.py | 36 +- .../endpoint_agent_labels_selector_config.py | 99 + .../models/endpoint_agent_selector_config.py | 154 ++ .../endpoint_agent_to_server_instant_test.py | 105 + .../models/endpoint_agent_to_server_test.py | 171 ++ .../endpoint_agent_to_server_test_request.py | 39 +- .../models/endpoint_agent_to_server_tests.py | 95 + .../endpoint_all_agents_selector_config.py | 97 + .../models/endpoint_dynamic_test_update.py | 100 + .../models/endpoint_http_server_base_test.py | 107 + .../endpoint_http_server_instant_test.py | 129 ++ .../models/endpoint_http_server_test.py | 203 ++ .../endpoint_http_server_test_request.py | 49 +- .../models/endpoint_http_server_tests.py | 36 +- .../models/endpoint_http_test_update.py | 100 + .../models/endpoint_instant_test.py | 103 + .../models/endpoint_network_test_update.py | 103 + .../models/endpoint_scheduled_test_type.py | 37 + ...ndpoint_specific_agents_selector_config.py | 99 + .../endpoint_tests/models/endpoint_test.py | 150 ++ .../endpoint_test_agent_selector_type.py | 38 + .../models/endpoint_test_auth_type.py | 38 + .../models/endpoint_test_links.py | 101 + .../models/endpoint_test_links_self.py | 101 + .../models/endpoint_test_protocol.py | 41 + .../endpoint_tests}/models/endpoint_tests.py | 36 +- endpoint_tests/endpoint_tests/models/error.py | 95 + .../get_dynamic_tests_list200_response.py | 101 + ...t_agent_toserver_tests_list200_response.py | 101 + ...point_httpserver_tests_list200_response.py | 101 + .../get_endpoint_tests_list200_response.py | 101 + endpoint_tests/endpoint_tests/models/link.py | 101 + .../endpoint_tests/models/self_links.py | 91 + .../endpoint_tests/models/self_links_links.py | 91 + .../endpoint_tests/models/severity.py | 40 + .../endpoint_tests/models/test_interval.py | 42 + .../models/test_labels_inner.py | 91 + .../endpoint_tests/models/test_probe_mode.py | 38 + .../models/test_probe_mode_response.py | 39 + .../models/test_ssl_version_id.py | 40 + .../endpoint_tests/models/test_update.py | 98 + .../models/unauthorized_error.py | 89 + .../endpoint_tests/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../endpoint_tests}/py.typed | 0 endpoint_tests/endpoint_tests/rest.py | 257 +++ endpoint_tests/pyproject.toml | 71 + .../requirements.txt | 0 .../tests_api => endpoint_tests}/setup.cfg | 0 endpoint_tests/setup.py | 49 + endpoint_tests/test-requirements.txt | 5 + .../test/__init__.py | 0 endpoint_tests/test/test_account_group_id.py | 51 + endpoint_tests/test/test_alert_direction.py | 33 + .../test/test_alert_rounds_violation_mode.py | 33 + endpoint_tests/test/test_alert_rule.py | 62 + endpoint_tests/test/test_alert_type.py | 33 + endpoint_tests/test/test_dynamic_test.py | 71 + .../test/test_dynamic_test_links.py | 52 + .../test/test_dynamic_test_links_self.py | 59 + .../test/test_dynamic_test_request.py | 16 +- endpoint_tests/test/test_dynamic_tests.py | 53 + ...t_endpoint_agent_labels_selector_config.py | 54 + .../test_endpoint_agent_selector_config.py | 55 + ...t_endpoint_agent_to_server_instant_test.py | 63 + .../test_endpoint_agent_to_server_test.py | 88 + ...t_endpoint_agent_to_server_test_request.py | 11 +- .../test_endpoint_agent_to_server_tests.py | 7 +- ...est_endpoint_all_agents_selector_config.py | 53 + .../test/test_endpoint_dynamic_test_update.py | 56 + .../test_endpoint_http_server_base_test.py | 59 + .../test_endpoint_http_server_instant_test.py | 77 + .../test/test_endpoint_http_server_test.py | 102 + .../test_endpoint_http_server_test_request.py | 7 +- .../test/test_endpoint_http_server_tests.py | 7 +- .../test/test_endpoint_http_test_update.py | 56 + .../test/test_endpoint_instant_test.py | 61 + .../test/test_endpoint_network_test_update.py | 57 + .../test/test_endpoint_scheduled_test_type.py | 33 + ...ndpoint_specific_agents_selector_config.py | 54 + endpoint_tests/test/test_endpoint_test.py | 85 + .../test_endpoint_test_agent_selector_type.py | 33 + .../test/test_endpoint_test_auth_type.py | 33 + .../test/test_endpoint_test_links.py | 52 + .../test/test_endpoint_test_links_self.py | 59 + .../test/test_endpoint_test_protocol.py | 33 + endpoint_tests/test/test_endpoint_tests.py | 53 + endpoint_tests/test/test_error.py | 55 + ...test_get_dynamic_tests_list200_response.py | 63 + ...t_agent_toserver_tests_list200_response.py | 11 +- ...point_httpserver_tests_list200_response.py | 11 +- ...est_get_endpoint_tests_list200_response.py | 63 + endpoint_tests/test/test_link.py | 59 + endpoint_tests/test/test_self_links.py | 60 + endpoint_tests/test/test_self_links_links.py | 59 + endpoint_tests/test/test_severity.py | 33 + endpoint_tests/test/test_test_interval.py | 33 + endpoint_tests/test/test_test_labels_inner.py | 53 + endpoint_tests/test/test_test_probe_mode.py | 33 + .../test/test_test_probe_mode_response.py | 33 + .../test/test_test_ssl_version_id.py | 33 + endpoint_tests/test/test_test_update.py | 55 + .../test/test_unauthorized_error.py | 52 + endpoint_tests/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + .../.gitignore | 0 .../.openapi-generator-ignore | 0 instant_tests/.openapi-generator/FILES | 258 +++ instant_tests/.openapi-generator/VERSION | 1 + instant_tests/README.md | 209 ++ instant_tests/docs/Agent.md | 39 + instant_tests/docs/AgentBase.md | 31 + instant_tests/docs/AgentToAgentApi.md | 101 + instant_tests/docs/AgentToAgentInstantTest.md | 55 + .../docs/AgentToAgentInstantTestRequest.md | 9 +- instant_tests/docs/AgentToAgentProperties.md | 42 + .../docs/AgentToAgentTestProtocol.md | 11 + instant_tests/docs/AgentToServerApi.md | 101 + .../docs/AgentToServerInstantTest.md | 57 + .../docs/AgentToServerInstantTestRequest.md | 9 +- instant_tests/docs/AgentToServerProperties.md | 44 + .../docs/CloudEnterpriseAgentType.md | 12 + .../docs/DNSSecurityApi.md | 31 +- instant_tests/docs/DNSServerApi.md | 101 + instant_tests/docs/DNSTraceApi.md | 101 + instant_tests/docs/DnsQueryClass.md | 12 + instant_tests/docs/DnsSecInstantTest.md | 44 + .../docs/DnsSecInstantTestRequest.md | 9 +- instant_tests/docs/DnsSecProperties.md | 31 + instant_tests/docs/DnsServerInstantTest.md | 56 + .../docs/DnsServerInstantTestRequest.md | 9 +- instant_tests/docs/DnsServerProperties.md | 43 + instant_tests/docs/DnsServersRequest.md | 29 + instant_tests/docs/DnsTraceInstantTest.md | 45 + .../docs/DnsTraceInstantTestRequest.md | 9 +- instant_tests/docs/DnsTraceProperties.md | 32 + instant_tests/docs/Error.md | 33 + instant_tests/docs/Expand.md | 11 + instant_tests/docs/FTPServerApi.md | 101 + instant_tests/docs/FtpServerInstantTest.md | 60 + instant_tests/docs/FtpServerProperties.md | 47 + instant_tests/docs/FtpServerRequestType.md | 12 + .../docs/HTTPPageLoadApi.md | 31 +- instant_tests/docs/HTTPServerApi.md | 101 + instant_tests/docs/HttpServerInstantTest.md | 74 + .../docs/HttpServerInstantTestRequest.md | 10 +- instant_tests/docs/HttpServerProperties.md | 61 + instant_tests/docs/InstantTest.md | 41 + .../docs/InstantTestRequest.md | 9 +- .../docs/InstantTestRequestAgentsInner.md | 7 +- instant_tests/docs/Link.md | 37 + instant_tests/docs/PageLoadInstantTest.md | 77 + .../docs/PageLoadInstantTestRequest.md | 11 +- instant_tests/docs/PageLoadProperties.md | 64 + .../docs/RunApi.md | 23 +- instant_tests/docs/SIPServerApi.md | 101 + .../docs/ServerInstantTestRequest.md | 9 +- instant_tests/docs/SimpleAgent.md | 38 + instant_tests/docs/SipServerInstantTest.md | 53 + .../docs/SipServerInstantTestRequest.md | 54 + .../docs/SipServerInstantTestRequest1.md | 54 + .../docs/SipServerInstantTestResponse.md | 59 + instant_tests/docs/SipServerProperties.md | 40 + instant_tests/docs/SipTestProtocol.md | 12 + instant_tests/docs/TestAuthType.md | 12 + instant_tests/docs/TestCustomHeaders.md | 31 + instant_tests/docs/TestDirection.md | 12 + instant_tests/docs/TestDnsServer.md | 30 + .../docs/TestDnsTransportProtocol.md | 12 + instant_tests/docs/TestDscpId.md | 12 + instant_tests/docs/TestIpv6Policy.md | 12 + instant_tests/docs/TestLabelsInner.md | 31 + instant_tests/docs/TestPageLoadingStrategy.md | 12 + instant_tests/docs/TestPathTraceMode.md | 12 + instant_tests/docs/TestProbeMode.md | 12 + instant_tests/docs/TestProtocol.md | 12 + instant_tests/docs/TestSharedAccountsInner.md | 30 + instant_tests/docs/TestSipCredentials.md | 34 + instant_tests/docs/TestSslVersionId.md | 12 + instant_tests/docs/TestType.md | 12 + instant_tests/docs/UnauthorizedError.md | 30 + instant_tests/docs/UnexpandedInstantTest.md | 39 + .../docs/UnexpandedInstantTestLinks.md | 31 + .../docs/UnexpandedInstantTestLinksSelf.md | 36 + instant_tests/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + instant_tests/docs/VoiceApi.md | 101 + instant_tests/docs/VoiceInstantTest.md | 51 + .../docs/VoiceInstantTestRequest.md | 9 +- instant_tests/docs/VoiceProperties.md | 38 + instant_tests/docs/WebTransactionApi.md | 101 + .../docs/WebTransactionInstantTest.md | 79 + .../docs/WebTransactionInstantTestRequest.md | 14 +- .../docs/WebTransactionProperties.md | 65 + instant_tests/instant_tests/__init__.py | 116 ++ instant_tests/instant_tests/api/__init__.py | 16 + .../instant_tests/api/agent_to_agent_api.py | 369 ++++ .../instant_tests/api/agent_to_server_api.py | 369 ++++ .../instant_tests}/api/dns_security_api.py | 49 +- .../instant_tests/api/dns_server_api.py | 369 ++++ .../instant_tests/api/dns_trace_api.py | 369 ++++ .../instant_tests/api/ftp_server_api.py | 369 ++++ .../instant_tests}/api/http_page_load_api.py | 49 +- .../instant_tests/api/http_server_api.py | 369 ++++ .../instant_tests}/api/run_api.py | 56 +- .../instant_tests/api/sip_server_api.py | 369 ++++ instant_tests/instant_tests/api/voice_api.py | 369 ++++ .../instant_tests/api/web_transaction_api.py | 369 ++++ instant_tests/instant_tests/api_client.py | 770 +++++++ instant_tests/instant_tests/api_response.py | 21 + instant_tests/instant_tests/configuration.py | 444 ++++ instant_tests/instant_tests/exceptions.py | 199 ++ .../instant_tests/models/__init__.py | 88 + instant_tests/instant_tests/models/agent.py | 124 ++ .../instant_tests/models/agent_base.py | 97 + .../models/agent_to_agent_instant_test.py | 197 ++ .../agent_to_agent_instant_test_request.py | 74 +- .../models/agent_to_agent_properties.py | 122 ++ .../models/agent_to_agent_test_protocol.py | 37 + .../models/agent_to_server_instant_test.py | 202 ++ .../agent_to_server_instant_test_request.py | 76 +- .../models/agent_to_server_properties.py | 127 ++ .../models/cloud_enterprise_agent_type.py | 38 + .../instant_tests/models/dns_query_class.py | 37 + .../models/dns_sec_instant_test.py | 169 ++ .../models/dns_sec_instant_test_request.py | 64 +- .../models/dns_sec_properties.py | 94 + .../models/dns_server_instant_test.py | 207 ++ .../models/dns_server_instant_test_request.py | 76 +- .../models/dns_server_properties.py | 132 ++ .../models/dns_servers_request.py | 87 + .../models/dns_trace_instant_test.py | 172 ++ .../models/dns_trace_instant_test_request.py | 66 +- .../models/dns_trace_properties.py | 97 + instant_tests/instant_tests/models/error.py | 95 + instant_tests/instant_tests/models/expand.py | 38 + .../models/ftp_server_instant_test.py | 206 ++ .../models/ftp_server_properties.py | 131 ++ .../models/ftp_server_request_type.py | 38 + .../models/http_server_instant_test.py | 241 +++ .../http_server_instant_test_request.py | 90 +- .../models/http_server_properties.py | 166 ++ .../instant_tests/models/instant_test.py | 151 ++ .../models/instant_test_request.py | 99 + .../instant_test_request_agents_inner.py | 89 + instant_tests/instant_tests/models/link.py | 101 + .../models/page_load_instant_test.py | 247 +++ .../models/page_load_instant_test_request.py | 92 +- .../models/page_load_properties.py | 172 ++ .../models/server_instant_test_request.py | 74 +- .../instant_tests/models/simple_agent.py | 121 ++ .../models/sip_server_instant_test.py | 190 ++ .../models/sip_server_instant_test_request.py | 174 ++ .../sip_server_instant_test_request1.py | 196 ++ .../sip_server_instant_test_response.py | 203 ++ .../models/sip_server_properties.py | 115 + .../instant_tests/models/sip_test_protocol.py | 38 + .../instant_tests/models/test_auth_type.py | 40 + .../models/test_custom_headers.py | 91 + .../instant_tests/models/test_direction.py | 38 + .../instant_tests/models/test_dns_server.py | 89 + .../models/test_dns_transport_protocol.py | 37 + .../instant_tests/models/test_dscp_id.py | 57 + .../instant_tests/models/test_ipv6_policy.py | 39 + .../instant_tests/models/test_labels_inner.py | 91 + .../models/test_page_loading_strategy.py | 38 + .../models/test_path_trace_mode.py | 37 + .../instant_tests/models/test_probe_mode.py | 38 + .../instant_tests/models/test_protocol.py | 37 + .../models/test_shared_accounts_inner.py | 89 + .../models/test_sip_credentials.py | 99 + .../models/test_ssl_version_id.py | 40 + .../instant_tests/models/test_type.py | 47 + .../models/unauthorized_error.py | 89 + .../models/unexpanded_instant_test.py | 127 ++ .../models/unexpanded_instant_test_links.py | 101 + .../unexpanded_instant_test_links_self.py | 101 + .../instant_tests/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../models/voice_instant_test.py | 188 ++ .../models/voice_instant_test_request.py | 70 +- .../instant_tests/models/voice_properties.py | 113 + .../models/web_transaction_instant_test.py | 251 +++ .../web_transaction_instant_test_request.py | 96 +- .../models/web_transaction_properties.py | 174 ++ .../instant_tests}/py.typed | 0 instant_tests/instant_tests/rest.py | 257 +++ instant_tests/pyproject.toml | 71 + .../requirements.txt | 0 .../setup.cfg | 0 instant_tests/setup.py | 49 + instant_tests/test-requirements.txt | 5 + .../test/__init__.py | 0 instant_tests/test/test_agent.py | 62 + instant_tests/test/test_agent_base.py | 53 + .../test/test_agent_to_agent_instant_test.py | 88 + ...est_agent_to_agent_instant_test_request.py | 85 + .../test/test_agent_to_agent_properties.py | 65 + .../test/test_agent_to_agent_test_protocol.py | 33 + .../test/test_agent_to_server_instant_test.py | 90 + ...st_agent_to_server_instant_test_request.py | 87 + .../test/test_agent_to_server_properties.py | 67 + .../test/test_cloud_enterprise_agent_type.py | 33 + instant_tests/test/test_dns_query_class.py | 33 + .../test/test_dns_sec_instant_test.py | 77 + .../test/test_dns_sec_instant_test_request.py | 74 + instant_tests/test/test_dns_sec_properties.py | 54 + .../test/test_dns_server_instant_test.py | 98 + .../test_dns_server_instant_test_request.py | 87 + .../test/test_dns_server_properties.py | 75 + .../test/test_dns_servers_request.py | 51 + .../test/test_dns_trace_instant_test.py | 78 + .../test_dns_trace_instant_test_request.py | 75 + .../test/test_dns_trace_properties.py | 55 + instant_tests/test/test_error.py | 55 + instant_tests/test/test_expand.py | 33 + .../test/test_ftp_server_instant_test.py | 96 + .../test/test_ftp_server_properties.py | 73 + .../test/test_ftp_server_request_type.py | 33 + .../test/test_http_server_instant_test.py | 113 + .../test_http_server_instant_test_request.py | 28 +- .../test/test_http_server_properties.py | 90 + instant_tests/test/test_instant_test.py | 71 + .../test/test_instant_test_request.py | 58 + .../test_instant_test_request_agents_inner.py | 52 + instant_tests/test/test_link.py | 59 + .../test/test_page_load_instant_test.py | 116 ++ .../test_page_load_instant_test_request.py | 27 +- .../test/test_page_load_properties.py | 93 + .../test/test_server_instant_test_request.py | 93 + instant_tests/test/test_simple_agent.py | 60 + .../test/test_sip_server_instant_test.py | 85 + .../test_sip_server_instant_test_request.py | 96 + .../test_sip_server_instant_test_request1.py | 99 + .../test_sip_server_instant_test_response.py | 92 + .../test/test_sip_server_properties.py | 62 + instant_tests/test/test_sip_test_protocol.py | 33 + instant_tests/test/test_test_auth_type.py | 33 + .../test/test_test_custom_headers.py | 61 + instant_tests/test/test_test_direction.py | 33 + instant_tests/test/test_test_dns_server.py | 52 + .../test/test_test_dns_transport_protocol.py | 33 + instant_tests/test/test_test_dscp_id.py | 33 + instant_tests/test/test_test_ipv6_policy.py | 33 + instant_tests/test/test_test_labels_inner.py | 53 + .../test/test_test_page_loading_strategy.py | 33 + .../test/test_test_path_trace_mode.py | 33 + instant_tests/test/test_test_probe_mode.py | 33 + instant_tests/test/test_test_protocol.py | 33 + .../test/test_test_shared_accounts_inner.py | 52 + .../test/test_test_sip_credentials.py | 57 + .../test/test_test_ssl_version_id.py | 33 + instant_tests/test/test_test_type.py | 33 + instant_tests/test/test_unauthorized_error.py | 52 + .../test/test_unexpanded_instant_test.py | 63 + .../test_unexpanded_instant_test_links.py | 52 + ...test_unexpanded_instant_test_links_self.py | 59 + instant_tests/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + instant_tests/test/test_voice_instant_test.py | 84 + .../test/test_voice_instant_test_request.py | 81 + instant_tests/test/test_voice_properties.py | 61 + .../test/test_web_transaction_instant_test.py | 119 ++ ...st_web_transaction_instant_test_request.py | 32 +- .../test/test_web_transaction_properties.py | 95 + .../.github/workflows/python.yml | 38 - instant_tests_api/.gitlab-ci.yml | 31 - instant_tests_api/.openapi-generator/FILES | 239 --- instant_tests_api/.openapi-generator/VERSION | 1 - instant_tests_api/.travis.yml | 17 - instant_tests_api/README.md | 198 -- instant_tests_api/docs/Agent.md | 37 - instant_tests_api/docs/AgentBase.md | 30 - instant_tests_api/docs/AgentToAgentApi.md | 100 - .../docs/AgentToAgentInstantTest.md | 54 - .../docs/AgentToAgentTestProtocol.md | 10 - instant_tests_api/docs/AgentToServerApi.md | 100 - .../docs/AgentToServerInstantTest.md | 56 - .../docs/CloudEnterpriseAgentType.md | 11 - instant_tests_api/docs/DNSServerApi.md | 100 - instant_tests_api/docs/DNSTraceApi.md | 100 - instant_tests_api/docs/DnsQueryClass.md | 11 - instant_tests_api/docs/DnsSecInstantTest.md | 43 - .../docs/DnsServerInstantTest.md | 55 - instant_tests_api/docs/DnsServersRequest.md | 28 - instant_tests_api/docs/DnsTraceInstantTest.md | 44 - instant_tests_api/docs/Error.md | 32 - instant_tests_api/docs/Expand.md | 10 - instant_tests_api/docs/FTPServerApi.md | 100 - .../docs/FtpServerInstantTest.md | 59 - .../docs/FtpServerRequestType.md | 11 - instant_tests_api/docs/HTTPServerApi.md | 100 - .../docs/HttpServerInstantTest.md | 72 - instant_tests_api/docs/InstantTest.md | 40 - instant_tests_api/docs/Link.md | 36 - instant_tests_api/docs/MapItem.md | 29 - instant_tests_api/docs/PageLoadInstantTest.md | 74 - instant_tests_api/docs/SIPServerApi.md | 100 - .../docs/SipServerInstantTest.md | 57 - .../docs/SipServerInstantTestRequest.md | 57 - instant_tests_api/docs/SipTestProtocol.md | 11 - instant_tests_api/docs/TestAuthType.md | 11 - instant_tests_api/docs/TestCustomHeaders.md | 30 - .../docs/TestCustomHeadersAll.md | 29 - .../docs/TestCustomHeadersRoot.md | 29 - instant_tests_api/docs/TestDirection.md | 11 - instant_tests_api/docs/TestDnsServer.md | 29 - .../docs/TestDnsTransportProtocol.md | 11 - instant_tests_api/docs/TestDscpId.md | 11 - instant_tests_api/docs/TestIpv6Policy.md | 11 - instant_tests_api/docs/TestLabelsInner.md | 30 - .../docs/TestPageLoadingStrategy.md | 11 - instant_tests_api/docs/TestPathTraceMode.md | 11 - instant_tests_api/docs/TestProbeMode.md | 11 - instant_tests_api/docs/TestProtocol.md | 11 - .../docs/TestSharedAccountsInner.md | 29 - instant_tests_api/docs/TestSipCredentials.md | 33 - instant_tests_api/docs/TestSslVersionId.md | 11 - instant_tests_api/docs/TestType.md | 11 - instant_tests_api/docs/UnauthorizedError.md | 29 - .../docs/UnexpandedInstantTest.md | 38 - .../docs/UnexpandedInstantTestLinks.md | 30 - .../docs/UnexpandedInstantTestLinksSelf.md | 35 - .../UnexpandedInstantTestLinksTestResults.md | 35 - instant_tests_api/docs/VoiceApi.md | 100 - instant_tests_api/docs/VoiceInstantTest.md | 50 - instant_tests_api/docs/WebTransactionApi.md | 100 - .../docs/WebTransactionInstantTest.md | 77 - instant_tests_api/git_push.sh | 57 - .../instant_tests_api/__init__.py | 104 - .../instant_tests_api/api/__init__.py | 16 - .../api/agent_to_agent_api.py | 386 ---- .../api/agent_to_server_api.py | 386 ---- .../instant_tests_api/api/dns_server_api.py | 386 ---- .../instant_tests_api/api/dns_trace_api.py | 386 ---- .../instant_tests_api/api/ftp_server_api.py | 386 ---- .../instant_tests_api/api/http_server_api.py | 386 ---- .../instant_tests_api/api/sip_server_api.py | 386 ---- .../instant_tests_api/api/voice_api.py | 386 ---- .../api/web_transaction_api.py | 386 ---- .../instant_tests_api/api_client.py | 741 ------- .../instant_tests_api/api_response.py | 21 - .../instant_tests_api/configuration.py | 434 ---- .../instant_tests_api/exceptions.py | 166 -- .../instant_tests_api/models/__init__.py | 76 - .../instant_tests_api/models/agent.py | 121 -- .../instant_tests_api/models/agent_base.py | 98 - .../models/agent_to_agent_instant_test.py | 197 -- .../models/agent_to_agent_test_protocol.py | 45 - .../models/agent_to_server_instant_test.py | 202 -- .../models/cloud_enterprise_agent_type.py | 46 - .../models/dns_query_class.py | 45 - .../models/dns_sec_instant_test.py | 169 -- .../models/dns_server_instant_test.py | 207 -- .../models/dns_servers_request.py | 88 - .../models/dns_trace_instant_test.py | 172 -- .../instant_tests_api/models/error.py | 96 - .../instant_tests_api/models/expand.py | 46 - .../models/ftp_server_instant_test.py | 206 -- .../models/ftp_server_request_type.py | 46 - .../models/http_server_instant_test.py | 239 --- .../instant_tests_api/models/instant_test.py | 151 -- .../models/instant_test_request.py | 100 - .../instant_test_request_agents_inner.py | 90 - .../instant_tests_api/models/link.py | 102 - .../instant_tests_api/models/map_item.py | 89 - .../models/page_load_instant_test.py | 243 --- .../models/sip_server_instant_test.py | 204 -- .../models/sip_server_instant_test_request.py | 182 -- .../models/sip_test_protocol.py | 46 - .../models/test_auth_type.py | 47 - .../models/test_custom_headers.py | 113 - .../models/test_custom_headers_all.py | 89 - .../models/test_custom_headers_root.py | 89 - .../models/test_direction.py | 46 - .../models/test_dns_server.py | 90 - .../models/test_dns_transport_protocol.py | 45 - .../instant_tests_api/models/test_dscp_id.py | 65 - .../models/test_ipv6_policy.py | 47 - .../models/test_labels_inner.py | 92 - .../models/test_page_loading_strategy.py | 46 - .../models/test_path_trace_mode.py | 45 - .../models/test_probe_mode.py | 46 - .../instant_tests_api/models/test_protocol.py | 45 - .../models/test_shared_accounts_inner.py | 90 - .../models/test_sip_credentials.py | 100 - .../models/test_ssl_version_id.py | 48 - .../instant_tests_api/models/test_type.py | 55 - .../models/unauthorized_error.py | 89 - .../models/unexpanded_instant_test.py | 127 -- .../models/unexpanded_instant_test_links.py | 98 - .../unexpanded_instant_test_links_self.py | 102 - ...xpanded_instant_test_links_test_results.py | 149 -- .../models/voice_instant_test.py | 188 -- .../models/web_transaction_instant_test.py | 249 --- instant_tests_api/instant_tests_api/rest.py | 231 -- instant_tests_api/pyproject.toml | 30 - instant_tests_api/setup.py | 49 - instant_tests_api/test-requirements.txt | 3 - instant_tests_api/test/test_agent.py | 61 - instant_tests_api/test/test_agent_base.py | 54 - .../test/test_agent_to_agent_api.py | 38 - .../test/test_agent_to_agent_instant_test.py | 92 - ...est_agent_to_agent_instant_test_request.py | 86 - .../test/test_agent_to_agent_test_protocol.py | 34 - .../test/test_agent_to_server_api.py | 38 - .../test/test_agent_to_server_instant_test.py | 94 - ...st_agent_to_server_instant_test_request.py | 88 - .../test/test_cloud_enterprise_agent_type.py | 34 - .../test/test_dns_query_class.py | 34 - .../test/test_dns_sec_instant_test.py | 81 - .../test/test_dns_sec_instant_test_request.py | 75 - .../test/test_dns_security_api.py | 38 - instant_tests_api/test/test_dns_server_api.py | 38 - .../test/test_dns_server_instant_test.py | 102 - .../test_dns_server_instant_test_request.py | 88 - .../test/test_dns_servers_request.py | 52 - instant_tests_api/test/test_dns_trace_api.py | 38 - .../test/test_dns_trace_instant_test.py | 82 - .../test_dns_trace_instant_test_request.py | 76 - instant_tests_api/test/test_error.py | 56 - instant_tests_api/test/test_expand.py | 34 - instant_tests_api/test/test_ftp_server_api.py | 38 - .../test/test_ftp_server_instant_test.py | 100 - .../test/test_ftp_server_request_type.py | 34 - .../test/test_http_page_load_api.py | 38 - .../test/test_http_server_api.py | 38 - .../test/test_http_server_instant_test.py | 116 -- instant_tests_api/test/test_instant_test.py | 72 - .../test/test_instant_test_request.py | 56 - .../test_instant_test_request_agents_inner.py | 53 - instant_tests_api/test/test_link.py | 60 - instant_tests_api/test/test_map_item.py | 53 - .../test/test_page_load_instant_test.py | 118 -- instant_tests_api/test/test_run_api.py | 38 - .../test/test_server_instant_test_request.py | 94 - instant_tests_api/test/test_sip_server_api.py | 38 - .../test/test_sip_server_instant_test.py | 108 - .../test_sip_server_instant_test_request.py | 102 - .../test/test_sip_test_protocol.py | 34 - instant_tests_api/test/test_test_auth_type.py | 34 - .../test/test_test_custom_headers.py | 58 - .../test/test_test_custom_headers_all.py | 53 - .../test/test_test_custom_headers_root.py | 53 - instant_tests_api/test/test_test_direction.py | 34 - .../test/test_test_dns_server.py | 53 - .../test/test_test_dns_transport_protocol.py | 34 - instant_tests_api/test/test_test_dscp_id.py | 34 - .../test/test_test_ipv6_policy.py | 34 - .../test/test_test_labels_inner.py | 54 - .../test/test_test_page_loading_strategy.py | 34 - .../test/test_test_path_trace_mode.py | 34 - .../test/test_test_probe_mode.py | 34 - instant_tests_api/test/test_test_protocol.py | 34 - .../test/test_test_shared_accounts_inner.py | 53 - .../test/test_test_sip_credentials.py | 58 - .../test/test_test_ssl_version_id.py | 34 - instant_tests_api/test/test_test_type.py | 34 - .../test/test_unauthorized_error.py | 53 - .../test/test_unexpanded_instant_test.py | 64 - .../test_unexpanded_instant_test_links.py | 53 - ...test_unexpanded_instant_test_links_self.py | 60 - ...xpanded_instant_test_links_test_results.py | 60 - instant_tests_api/test/test_voice_api.py | 38 - .../test/test_voice_instant_test.py | 88 - .../test/test_voice_instant_test_request.py | 82 - .../test/test_web_transaction_api.py | 38 - .../test/test_web_transaction_instant_test.py | 122 -- instant_tests_api/tox.ini | 9 - .../.gitignore | 0 .../.openapi-generator-ignore | 0 internet_insights/.openapi-generator/FILES | 109 + internet_insights/.openapi-generator/VERSION | 1 + internet_insights/README.md | 162 ++ .../docs/ApiAffectedAgent.md | 7 +- .../docs/ApiAffectedTest.md | 7 +- .../ApiApplicationOutageAffectedLocation.md | 7 +- .../ApiApplicationOutageAffectedServer.md | 30 + .../docs/ApiApplicationOutageDetails.md | 7 +- .../docs/ApiApplicationOutageResponse.md | 7 +- .../docs/ApiAsn.md | 7 +- .../docs/ApiCatalogProvider.md | 7 +- .../docs/ApiCatalogProviderDetails.md | 7 +- ...ApiCatalogProviderDetailsLocationsInner.md | 7 +- .../docs/ApiCatalogProviderDetailsResponse.md | 7 +- .../docs/ApiCatalogProviderFilter.md | 7 +- .../docs/ApiCatalogProviderResponse.md | 7 +- ...alogProviderResponseAllOfProvidersInner.md | 7 +- .../docs/ApiNetworkOutageAffectedLocation.md | 7 +- .../docs/ApiNetworkOutageDetails.md | 7 +- .../docs/ApiNetworkOutageResponse.md | 7 +- .../docs/ApiOutage.md | 11 +- .../docs/ApiOutageFilter.md | 7 +- .../docs/ApiOutagesResponse.md | 7 +- .../ApiOutagesResponseAllOfOutagesInner.md | 11 +- .../docs/CatalogProvidersApi.md | 48 +- internet_insights/docs/Error.md | 33 + internet_insights/docs/Link.md | 37 + .../docs/OutageScope.md | 1 + .../docs/OutagesAPIPublicApi.md | 69 +- internet_insights/docs/SelfLinks.md | 29 + internet_insights/docs/SelfLinksLinks.md | 30 + internet_insights/docs/UnauthorizedError.md | 30 + internet_insights/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + .../internet_insights/__init__.py | 63 + .../internet_insights/api/__init__.py | 6 + .../api/catalog_providers_api.py | 66 +- .../api/outages_api_public_api.py | 85 +- .../internet_insights/api_client.py | 770 +++++++ .../internet_insights/api_response.py | 21 + .../internet_insights/configuration.py | 444 ++++ .../internet_insights/exceptions.py | 199 ++ .../internet_insights/models/__init__.py | 45 + .../models/api_affected_agent.py | 89 + .../models/api_affected_test.py | 89 + ...pi_application_outage_affected_location.py | 97 + .../api_application_outage_affected_server.py | 89 + .../models/api_application_outage_details.py | 137 ++ .../models/api_application_outage_response.py | 143 ++ .../internet_insights/models/api_asn.py | 89 + .../models/api_catalog_provider.py | 105 + .../models/api_catalog_provider_details.py | 115 + ...atalog_provider_details_locations_inner.py | 89 + .../api_catalog_provider_details_response.py | 121 ++ .../models/api_catalog_provider_filter.py | 97 + .../models/api_catalog_provider_response.py | 101 + ...rovider_response_all_of_providers_inner.py | 111 + .../api_network_outage_affected_location.py | 89 + .../models/api_network_outage_details.py | 137 ++ .../models/api_network_outage_response.py | 143 ++ .../internet_insights/models/api_outage.py | 115 + .../models/api_outage_filter.py | 100 + .../models/api_outages_response.py | 101 + ...i_outages_response_all_of_outages_inner.py | 121 ++ .../internet_insights/models/error.py | 95 + .../internet_insights/models/link.py | 101 + .../internet_insights/models/outage_scope.py | 37 + .../internet_insights/models/self_links.py | 91 + .../models/self_links_links.py | 91 + .../models/unauthorized_error.py | 89 + .../models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../internet_insights}/py.typed | 0 internet_insights/internet_insights/rest.py | 257 +++ internet_insights/pyproject.toml | 71 + .../requirements.txt | 0 .../setup.cfg | 0 internet_insights/setup.py | 49 + internet_insights/test-requirements.txt | 5 + .../test/__init__.py | 0 .../test/test_api_affected_agent.py | 52 + .../test/test_api_affected_test.py | 52 + ...pi_application_outage_affected_location.py | 56 + ..._api_application_outage_affected_server.py | 52 + .../test_api_application_outage_details.py | 84 + .../test_api_application_outage_response.py | 94 + internet_insights/test/test_api_asn.py | 52 + .../test/test_api_catalog_provider.py | 60 + .../test/test_api_catalog_provider_details.py | 65 + ...atalog_provider_details_locations_inner.py | 52 + ...t_api_catalog_provider_details_response.py | 75 + .../test/test_api_catalog_provider_filter.py | 56 + .../test_api_catalog_provider_response.py | 63 + ...rovider_response_all_of_providers_inner.py | 70 + ...st_api_network_outage_affected_location.py | 54 + .../test/test_api_network_outage_details.py | 80 + .../test/test_api_network_outage_response.py | 90 + internet_insights/test/test_api_outage.py | 65 + .../test/test_api_outage_filter.py | 59 + .../test/test_api_outages_response.py | 63 + ...i_outages_response_all_of_outages_inner.py | 75 + internet_insights/test/test_error.py | 55 + internet_insights/test/test_link.py | 59 + internet_insights/test/test_outage_scope.py | 33 + internet_insights/test/test_self_links.py | 60 + .../test/test_self_links_links.py | 59 + .../test/test_unauthorized_error.py | 52 + .../test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + .../.github/workflows/python.yml | 38 - internet_insights_api/.gitlab-ci.yml | 31 - .../.openapi-generator/FILES | 110 - .../.openapi-generator/VERSION | 1 - internet_insights_api/.travis.yml | 17 - internet_insights_api/README.md | 160 -- .../ApiApplicationOutageAffectedServer.md | 29 - internet_insights_api/docs/Error.md | 32 - internet_insights_api/docs/Link.md | 36 - internet_insights_api/docs/SelfLinks.md | 28 - internet_insights_api/docs/SelfLinksLinks.md | 29 - .../docs/UnauthorizedError.md | 29 - internet_insights_api/git_push.sh | 57 - .../internet_insights_api/__init__.py | 61 - .../internet_insights_api/api/__init__.py | 6 - .../internet_insights_api/api_client.py | 741 ------- .../internet_insights_api/api_response.py | 21 - .../internet_insights_api/configuration.py | 434 ---- .../internet_insights_api/exceptions.py | 166 -- .../internet_insights_api/models/__init__.py | 43 - .../models/api_affected_agent.py | 89 - .../models/api_affected_test.py | 89 - ...pi_application_outage_affected_location.py | 98 - .../api_application_outage_affected_server.py | 89 - .../models/api_application_outage_details.py | 138 -- .../models/api_application_outage_response.py | 144 -- .../internet_insights_api/models/api_asn.py | 90 - .../models/api_catalog_provider.py | 106 - .../models/api_catalog_provider_details.py | 116 -- ...atalog_provider_details_locations_inner.py | 90 - .../api_catalog_provider_details_response.py | 122 -- .../models/api_catalog_provider_filter.py | 98 - .../models/api_catalog_provider_response.py | 102 - ...rovider_response_all_of_providers_inner.py | 112 - .../api_network_outage_affected_location.py | 90 - .../models/api_network_outage_details.py | 138 -- .../models/api_network_outage_response.py | 144 -- .../models/api_outage.py | 112 - .../models/api_outage_filter.py | 101 - .../models/api_outages_response.py | 102 - ...i_outages_response_all_of_outages_inner.py | 118 -- .../internet_insights_api/models/error.py | 96 - .../internet_insights_api/models/link.py | 102 - .../models/outage_scope.py | 45 - .../models/self_links.py | 92 - .../models/self_links_links.py | 92 - .../models/unauthorized_error.py | 89 - .../internet_insights_api/rest.py | 231 -- internet_insights_api/pyproject.toml | 30 - internet_insights_api/setup.py | 49 - internet_insights_api/test-requirements.txt | 3 - .../test/test_api_affected_agent.py | 53 - .../test/test_api_affected_test.py | 53 - ...pi_application_outage_affected_location.py | 57 - ..._api_application_outage_affected_server.py | 53 - .../test_api_application_outage_details.py | 85 - .../test_api_application_outage_response.py | 95 - internet_insights_api/test/test_api_asn.py | 53 - .../test/test_api_catalog_provider.py | 61 - .../test/test_api_catalog_provider_details.py | 66 - ...atalog_provider_details_locations_inner.py | 53 - ...t_api_catalog_provider_details_response.py | 76 - .../test/test_api_catalog_provider_filter.py | 57 - .../test_api_catalog_provider_response.py | 64 - ...rovider_response_all_of_providers_inner.py | 71 - ...st_api_network_outage_affected_location.py | 55 - .../test/test_api_network_outage_details.py | 81 - .../test/test_api_network_outage_response.py | 91 - internet_insights_api/test/test_api_outage.py | 64 - .../test/test_api_outage_filter.py | 60 - .../test/test_api_outages_response.py | 64 - ...i_outages_response_all_of_outages_inner.py | 74 - .../test/test_catalog_providers_api.py | 45 - internet_insights_api/test/test_error.py | 56 - internet_insights_api/test/test_link.py | 60 - .../test/test_outage_scope.py | 34 - .../test/test_outages_api_public_api.py | 52 - internet_insights_api/test/test_self_links.py | 61 - .../test/test_self_links_links.py | 60 - .../test/test_unauthorized_error.py | 53 - internet_insights_api/tox.ini | 9 - {labels_api => labels}/.gitignore | 0 .../.openapi-generator-ignore | 0 labels/.openapi-generator/FILES | 70 + labels/.openapi-generator/VERSION | 1 + labels/README.md | 155 ++ labels/docs/AgentApi.md | 436 ++++ {labels_api => labels}/docs/AllLabelsApi.md | 23 +- .../docs/CreateAgentLabel201Response.md | 7 +- labels/docs/DashboardApi.md | 436 ++++ labels/docs/EndpointTestApi.md | 436 ++++ labels/docs/Error.md | 33 + .../docs/GetLabels200Response.md | 7 +- labels/docs/Label.md | 32 + {labels_api => labels}/docs/LabelDetail.md | 7 +- {labels_api => labels}/docs/LabelRequest.md | 7 +- {labels_api => labels}/docs/LabelType.md | 1 + labels/docs/Labels.md | 29 + labels/docs/Link.md | 37 + labels/docs/SelfLinks.md | 29 + labels/docs/SelfLinksLinks.md | 30 + labels/docs/TestApi.md | 436 ++++ labels/docs/UnauthorizedError.md | 30 + labels/docs/ValidationError.md | 34 + labels/docs/ValidationErrorAllOfErrors.md | 31 + labels/labels/__init__.py | 51 + labels/labels/api/__init__.py | 9 + .../labels}/api/agent_api.py | 404 +++- .../labels}/api/all_labels_api.py | 46 +- .../labels}/api/dashboard_api.py | 398 +++- .../labels}/api/endpoint_test_api.py | 398 +++- .../labels}/api/test_api.py | 398 +++- labels/labels/api_client.py | 770 +++++++ labels/labels/api_response.py | 21 + labels/labels/configuration.py | 444 ++++ labels/labels/exceptions.py | 199 ++ labels/labels/models/__init__.py | 30 + .../models/create_agent_label201_response.py | 37 +- labels/labels/models/error.py | 95 + .../labels/models/get_labels200_response.py | 101 + labels/labels/models/label.py | 94 + .../labels}/models/label_detail.py | 33 +- .../labels}/models/label_request.py | 31 +- .../labels}/models/label_type.py | 12 +- labels/labels/models/labels.py | 95 + labels/labels/models/link.py | 101 + labels/labels/models/self_links.py | 91 + labels/labels/models/self_links_links.py | 91 + labels/labels/models/unauthorized_error.py | 89 + labels/labels/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../labels_api => labels/labels}/py.typed | 0 labels/labels/rest.py | 257 +++ labels/pyproject.toml | 71 + {labels_api => labels}/requirements.txt | 0 {labels_api => labels}/setup.cfg | 0 labels/setup.py | 49 + labels/test-requirements.txt | 5 + {labels_api => labels}/test/__init__.py | 0 .../test_create_agent_label201_response.py | 9 +- labels/test/test_error.py | 55 + .../test/test_get_labels200_response.py | 11 +- labels/test/test_label.py | 54 + .../test/test_label_detail.py | 5 +- .../test/test_label_request.py | 5 +- .../test/test_label_type.py | 5 +- labels/test/test_labels.py | 57 + labels/test/test_link.py | 59 + labels/test/test_self_links.py | 60 + labels/test/test_self_links_links.py | 59 + labels/test/test_unauthorized_error.py | 52 + labels/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + labels_api/.github/workflows/python.yml | 38 - labels_api/.gitlab-ci.yml | 31 - labels_api/.openapi-generator/FILES | 74 - labels_api/.openapi-generator/VERSION | 1 - labels_api/.travis.yml | 17 - labels_api/README.md | 149 -- labels_api/docs/AgentApi.md | 347 --- labels_api/docs/DashboardApi.md | 347 --- labels_api/docs/EndpointTestApi.md | 347 --- labels_api/docs/Error.md | 32 - labels_api/docs/Label.md | 31 - labels_api/docs/Labels.md | 28 - labels_api/docs/Link.md | 36 - labels_api/docs/SelfLinks.md | 28 - labels_api/docs/SelfLinksLinks.md | 29 - labels_api/docs/TestApi.md | 347 --- labels_api/docs/UnauthorizedError.md | 29 - labels_api/git_push.sh | 57 - labels_api/labels_api/__init__.py | 49 - labels_api/labels_api/api/__init__.py | 9 - labels_api/labels_api/api_client.py | 741 ------- labels_api/labels_api/api_response.py | 21 - labels_api/labels_api/configuration.py | 434 ---- labels_api/labels_api/exceptions.py | 166 -- labels_api/labels_api/models/__init__.py | 28 - labels_api/labels_api/models/error.py | 96 - .../models/get_labels200_response.py | 102 - labels_api/labels_api/models/label.py | 95 - labels_api/labels_api/models/labels.py | 95 - labels_api/labels_api/models/link.py | 102 - labels_api/labels_api/models/self_links.py | 92 - .../labels_api/models/self_links_links.py | 92 - .../labels_api/models/unauthorized_error.py | 89 - labels_api/labels_api/rest.py | 231 -- labels_api/pyproject.toml | 30 - labels_api/setup.py | 49 - labels_api/test-requirements.txt | 3 - labels_api/test/test_agent_api.py | 59 - labels_api/test/test_all_labels_api.py | 38 - labels_api/test/test_dashboard_api.py | 59 - labels_api/test/test_endpoint_test_api.py | 59 - labels_api/test/test_error.py | 56 - labels_api/test/test_label.py | 55 - labels_api/test/test_labels.py | 58 - labels_api/test/test_link.py | 60 - labels_api/test/test_self_links.py | 61 - labels_api/test/test_self_links_links.py | 60 - labels_api/test/test_test_api.py | 59 - labels_api/test/test_unauthorized_error.py | 53 - labels_api/tox.ini | 9 - {monitors_api => monitors}/.gitignore | 0 .../.openapi-generator-ignore | 0 monitors/.openapi-generator/FILES | 47 + monitors/.openapi-generator/VERSION | 1 + monitors/README.md | 134 ++ monitors/docs/Error.md | 33 + .../docs/GetBGPMonitors200Response.md | 7 +- monitors/docs/Link.md | 37 + .../docs/ListBGPMonitorsApi.md | 23 +- monitors/docs/Monitor.md | 34 + monitors/docs/MonitorType.md | 12 + {monitors_api => monitors}/docs/Monitors.md | 7 +- monitors/docs/SelfLinks.md | 29 + monitors/docs/SelfLinksLinks.md | 30 + monitors/docs/UnauthorizedError.md | 30 + monitors/monitors/__init__.py | 42 + monitors/monitors/api/__init__.py | 5 + .../monitors}/api/list_bgp_monitors_api.py | 44 +- monitors/monitors/api_client.py | 770 +++++++ monitors/monitors/api_response.py | 21 + monitors/monitors/configuration.py | 444 ++++ monitors/monitors/exceptions.py | 199 ++ monitors/monitors/models/__init__.py | 25 + monitors/monitors/models/error.py | 95 + .../models/get_bgp_monitors200_response.py | 101 + monitors/monitors/models/link.py | 101 + monitors/monitors/models/monitor.py | 102 + monitors/monitors/models/monitor_type.py | 37 + monitors/monitors/models/monitors.py | 95 + monitors/monitors/models/self_links.py | 91 + monitors/monitors/models/self_links_links.py | 91 + .../monitors/models/unauthorized_error.py | 89 + .../monitors}/py.typed | 0 monitors/monitors/rest.py | 257 +++ monitors/pyproject.toml | 71 + {monitors_api => monitors}/requirements.txt | 0 {monitors_api => monitors}/setup.cfg | 0 monitors/setup.py | 49 + monitors/test-requirements.txt | 5 + {monitors_api => monitors}/test/__init__.py | 0 monitors/test/test_error.py | 55 + .../test/test_get_bgp_monitors200_response.py | 69 + monitors/test/test_link.py | 59 + monitors/test/test_monitor.py | 56 + monitors/test/test_monitor_type.py | 33 + monitors/test/test_monitors.py | 59 + monitors/test/test_self_links.py | 60 + monitors/test/test_self_links_links.py | 59 + monitors/test/test_unauthorized_error.py | 52 + monitors_api/.github/workflows/python.yml | 38 - monitors_api/.gitlab-ci.yml | 31 - monitors_api/.openapi-generator/FILES | 53 - monitors_api/.openapi-generator/VERSION | 1 - monitors_api/.travis.yml | 17 - monitors_api/README.md | 130 -- monitors_api/docs/Error.md | 32 - monitors_api/docs/Link.md | 36 - monitors_api/docs/Monitor.md | 33 - monitors_api/docs/MonitorType.md | 11 - monitors_api/docs/SelfLinks.md | 28 - monitors_api/docs/SelfLinksLinks.md | 29 - monitors_api/docs/UnauthorizedError.md | 29 - monitors_api/git_push.sh | 57 - monitors_api/monitors_api/__init__.py | 42 - monitors_api/monitors_api/api/__init__.py | 5 - monitors_api/monitors_api/api_client.py | 741 ------- monitors_api/monitors_api/api_response.py | 21 - monitors_api/monitors_api/configuration.py | 434 ---- monitors_api/monitors_api/exceptions.py | 166 -- monitors_api/monitors_api/models/__init__.py | 25 - monitors_api/monitors_api/models/error.py | 96 - .../models/get_bgp_monitors200_response.py | 102 - monitors_api/monitors_api/models/link.py | 102 - monitors_api/monitors_api/models/monitor.py | 103 - .../monitors_api/models/monitor_type.py | 45 - monitors_api/monitors_api/models/monitors.py | 95 - .../monitors_api/models/self_links.py | 92 - .../monitors_api/models/self_links_links.py | 92 - .../monitors_api/models/unauthorized_error.py | 89 - monitors_api/monitors_api/rest.py | 231 -- monitors_api/pyproject.toml | 30 - monitors_api/setup.py | 49 - monitors_api/test-requirements.txt | 3 - monitors_api/test/test_error.py | 56 - .../test/test_get_bgp_monitors200_response.py | 70 - monitors_api/test/test_link.py | 60 - .../test/test_list_bgp_monitors_api.py | 38 - monitors_api/test/test_monitor.py | 57 - monitors_api/test/test_monitor_type.py | 34 - monitors_api/test/test_monitors.py | 60 - monitors_api/test/test_self_links.py | 61 - monitors_api/test/test_self_links_links.py | 60 - monitors_api/test/test_unauthorized_error.py | 53 - monitors_api/tox.ini | 9 - {snapshots_api => oauth2}/.gitignore | 0 .../.openapi-generator-ignore | 0 oauth2/.openapi-generator/FILES | 35 + oauth2/.openapi-generator/VERSION | 1 + oauth2/README.md | 134 ++ oauth2/docs/AccessToken.md | 32 + oauth2/docs/DefaultApi.md | 97 + oauth2/docs/Error.md | 33 + oauth2/docs/UnauthorizedError.md | 30 + oauth2/docs/ValidationError.md | 34 + oauth2/docs/ValidationErrorAllOfErrors.md | 31 + oauth2/oauth2/__init__.py | 38 + oauth2/oauth2/api/__init__.py | 5 + oauth2/oauth2/api/default_api.py | 395 ++++ oauth2/oauth2/api_client.py | 770 +++++++ oauth2/oauth2/api_response.py | 21 + oauth2/oauth2/configuration.py | 444 ++++ oauth2/oauth2/exceptions.py | 199 ++ oauth2/oauth2/models/__init__.py | 21 + oauth2/oauth2/models/access_token.py | 93 + oauth2/oauth2/models/error.py | 95 + oauth2/oauth2/models/unauthorized_error.py | 89 + oauth2/oauth2/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../snapshots_api => oauth2/oauth2}/py.typed | 0 oauth2/oauth2/rest.py | 257 +++ oauth2/pyproject.toml | 71 + {snapshots_api => oauth2}/requirements.txt | 0 {snapshots_api => oauth2}/setup.cfg | 0 oauth2/setup.py | 49 + oauth2/test-requirements.txt | 5 + {snapshots_api => oauth2}/test/__init__.py | 0 oauth2/test/test_access_token.py | 54 + oauth2/test/test_error.py | 55 + oauth2/test/test_unauthorized_error.py | 52 + oauth2/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + {streaming_api => snapshots}/.gitignore | 0 .../.openapi-generator-ignore | 0 snapshots/.openapi-generator/FILES | 71 + snapshots/.openapi-generator/VERSION | 1 + snapshots/README.md | 138 ++ snapshots/docs/AppAndSelfLinks.md | 29 + snapshots/docs/AppAndSelfLinksLinks.md | 31 + .../docs/CreateTestSnapshotApi.md | 27 +- snapshots/docs/Error.md | 33 + snapshots/docs/Link.md | 37 + .../docs/SnapshotLinks.md | 7 +- .../docs/SnapshotRequest.md | 7 +- .../docs/SnapshotResponse.md | 7 +- .../docs/SnapshotResponseAllOfTest.md | 7 +- snapshots/docs/TestInterval.md | 12 + snapshots/docs/TestType.md | 12 + snapshots/docs/UnauthorizedError.md | 30 + snapshots/docs/UnexpandedInstantTest.md | 39 + snapshots/docs/UnexpandedInstantTestLinks.md | 31 + .../docs/UnexpandedInstantTestLinksSelf.md | 36 + snapshots/docs/UnexpandedTest.md | 31 + snapshots/docs/ValidationError.md | 34 + snapshots/docs/ValidationErrorAllOfErrors.md | 31 + snapshots/pyproject.toml | 71 + {streaming_api => snapshots}/requirements.txt | 0 {streaming_api => snapshots}/setup.cfg | 0 snapshots/setup.py | 49 + snapshots/snapshots/__init__.py | 50 + snapshots/snapshots/api/__init__.py | 5 + .../api/create_test_snapshot_api.py | 47 +- snapshots/snapshots/api_client.py | 770 +++++++ snapshots/snapshots/api_response.py | 21 + snapshots/snapshots/configuration.py | 444 ++++ snapshots/snapshots/exceptions.py | 199 ++ snapshots/snapshots/models/__init__.py | 33 + .../snapshots/models/app_and_self_links.py | 91 + .../models/app_and_self_links_links.py | 96 + snapshots/snapshots/models/error.py | 95 + snapshots/snapshots/models/link.py | 101 + .../snapshots}/models/snapshot_links.py | 33 +- .../snapshots}/models/snapshot_request.py | 32 +- .../snapshots}/models/snapshot_response.py | 46 +- .../models/snapshot_response_all_of_test.py | 54 +- snapshots/snapshots/models/test_interval.py | 42 + snapshots/snapshots/models/test_type.py | 47 + .../snapshots/models/unauthorized_error.py | 89 + .../models/unexpanded_instant_test.py | 127 ++ .../models/unexpanded_instant_test_links.py | 101 + .../unexpanded_instant_test_links_self.py | 101 + snapshots/snapshots/models/unexpanded_test.py | 92 + .../snapshots/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../snapshots}/py.typed | 0 snapshots/snapshots/rest.py | 257 +++ snapshots/test-requirements.txt | 5 + {streaming_api => snapshots}/test/__init__.py | 0 snapshots/test/test_app_and_self_links.py | 69 + .../test/test_app_and_self_links_links.py | 68 + snapshots/test/test_error.py | 55 + snapshots/test/test_link.py | 59 + .../test/test_snapshot_links.py | 7 +- .../test/test_snapshot_request.py | 7 +- .../test/test_snapshot_response.py | 7 +- .../test_snapshot_response_all_of_test.py | 11 +- snapshots/test/test_test_interval.py | 33 + snapshots/test/test_test_type.py | 33 + snapshots/test/test_unauthorized_error.py | 52 + .../test/test_unexpanded_instant_test.py | 63 + .../test_unexpanded_instant_test_links.py | 52 + ...test_unexpanded_instant_test_links_self.py | 59 + snapshots/test/test_unexpanded_test.py | 53 + snapshots/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + snapshots_api/.github/workflows/python.yml | 38 - snapshots_api/.gitlab-ci.yml | 31 - snapshots_api/.openapi-generator/FILES | 80 - snapshots_api/.openapi-generator/VERSION | 1 - snapshots_api/.travis.yml | 17 - snapshots_api/README.md | 139 -- snapshots_api/docs/AppLinks.md | 28 - snapshots_api/docs/AppLinksLinks.md | 29 - snapshots_api/docs/Error.md | 32 - snapshots_api/docs/Link.md | 36 - snapshots_api/docs/SelfLinks.md | 28 - snapshots_api/docs/SelfLinksLinks.md | 29 - snapshots_api/docs/TestInterval.md | 11 - snapshots_api/docs/TestType.md | 11 - snapshots_api/docs/UnauthorizedError.md | 29 - snapshots_api/docs/UnexpandedInstantTest.md | 38 - .../docs/UnexpandedInstantTestLinks.md | 30 - .../docs/UnexpandedInstantTestLinksSelf.md | 35 - .../UnexpandedInstantTestLinksTestResults.md | 35 - snapshots_api/docs/UnexpandedTest.md | 30 - snapshots_api/git_push.sh | 57 - snapshots_api/pyproject.toml | 30 - snapshots_api/setup.py | 49 - snapshots_api/snapshots_api/__init__.py | 51 - snapshots_api/snapshots_api/api/__init__.py | 5 - snapshots_api/snapshots_api/api_client.py | 741 ------- snapshots_api/snapshots_api/api_response.py | 21 - snapshots_api/snapshots_api/configuration.py | 434 ---- snapshots_api/snapshots_api/exceptions.py | 166 -- .../snapshots_api/models/__init__.py | 34 - .../snapshots_api/models/app_links.py | 92 - .../snapshots_api/models/app_links_links.py | 92 - snapshots_api/snapshots_api/models/error.py | 96 - snapshots_api/snapshots_api/models/link.py | 102 - .../snapshots_api/models/self_links.py | 92 - .../snapshots_api/models/self_links_links.py | 92 - .../snapshots_api/models/test_interval.py | 50 - .../snapshots_api/models/test_type.py | 55 - .../models/unauthorized_error.py | 89 - .../models/unexpanded_instant_test.py | 127 -- .../models/unexpanded_instant_test_links.py | 98 - .../unexpanded_instant_test_links_self.py | 102 - ...xpanded_instant_test_links_test_results.py | 149 -- .../snapshots_api/models/unexpanded_test.py | 93 - snapshots_api/snapshots_api/rest.py | 231 -- snapshots_api/test-requirements.txt | 3 - snapshots_api/test/test_app_links.py | 61 - snapshots_api/test/test_app_links_links.py | 60 - .../test/test_create_test_snapshot_api.py | 38 - snapshots_api/test/test_error.py | 56 - snapshots_api/test/test_link.py | 60 - snapshots_api/test/test_self_links.py | 61 - snapshots_api/test/test_self_links_links.py | 60 - snapshots_api/test/test_test_interval.py | 34 - snapshots_api/test/test_test_type.py | 34 - snapshots_api/test/test_unauthorized_error.py | 53 - .../test/test_unexpanded_instant_test.py | 64 - .../test_unexpanded_instant_test_links.py | 53 - ...test_unexpanded_instant_test_links_self.py | 60 - ...xpanded_instant_test_links_test_results.py | 60 - snapshots_api/test/test_unexpanded_test.py | 54 - snapshots_api/tox.ini | 9 - {test_results_api => streaming}/.gitignore | 0 .../.openapi-generator-ignore | 0 streaming/.openapi-generator/FILES | 71 + streaming/.openapi-generator/VERSION | 1 + streaming/README.md | 153 ++ streaming/docs/ApiError.md | 32 + .../docs/ApiErrorIntegrationLimits.md | 7 +- .../docs/AuditOperation.md | 7 +- .../docs/AuditOperationWithUpdate.md | 7 +- streaming/docs/BadRequestError.md | 32 + .../docs/CreateStreamResponse.md | 7 +- .../docs/EndpointType.md | 1 + .../docs/GetStreamResponse.md | 7 +- .../docs/PutStream.md | 7 +- .../docs/PutStreamTagMatchInner.md | 7 +- {streaming_api => streaming}/docs/Stream.md | 7 +- .../docs/StreamResponse.md | 7 +- .../docs/StreamResponseLinks.md | 7 +- .../docs/StreamResponseLinksSelf.md | 7 +- .../docs/StreamType.md | 1 + .../docs/StreamingApi.md | 131 +- .../docs/TagMatchObjectType.md | 1 + streaming/docs/UnauthorizedError.md | 30 + streaming/pyproject.toml | 71 + .../requirements.txt | 0 {test_results_api => streaming}/setup.cfg | 0 streaming/setup.py | 49 + streaming/streaming/__init__.py | 50 + streaming/streaming/api/__init__.py | 5 + .../streaming}/api/streaming_api.py | 127 +- streaming/streaming/api_client.py | 770 +++++++ streaming/streaming/api_response.py | 21 + streaming/streaming/configuration.py | 444 ++++ streaming/streaming/exceptions.py | 199 ++ streaming/streaming/models/__init__.py | 33 + streaming/streaming/models/api_error.py | 93 + .../models/api_error_integration_limits.py | 93 + streaming/streaming/models/audit_operation.py | 89 + .../models/audit_operation_with_update.py | 103 + .../streaming/models/bad_request_error.py | 93 + .../models/create_stream_response.py | 123 ++ streaming/streaming/models/endpoint_type.py | 37 + .../streaming/models/get_stream_response.py | 123 ++ streaming/streaming/models/put_stream.py | 99 + .../models/put_stream_tag_match_inner.py | 92 + streaming/streaming/models/stream.py | 107 + streaming/streaming/models/stream_response.py | 99 + .../streaming/models/stream_response_links.py | 91 + .../models/stream_response_links_self.py | 87 + streaming/streaming/models/stream_type.py | 36 + .../streaming/models/tag_match_object_type.py | 36 + .../streaming/models/unauthorized_error.py | 89 + .../streaming}/py.typed | 0 streaming/streaming/rest.py | 257 +++ streaming/test-requirements.txt | 5 + .../test/__init__.py | 0 streaming/test/test_api_error.py | 54 + .../test/test_api_error_integration_limits.py | 56 + streaming/test/test_audit_operation.py | 52 + .../test/test_audit_operation_with_update.py | 54 + streaming/test/test_bad_request_error.py | 56 + streaming/test/test_create_stream_response.py | 63 + streaming/test/test_endpoint_type.py | 33 + streaming/test/test_get_stream_response.py | 61 + streaming/test/test_put_stream.py | 53 + .../test/test_put_stream_tag_match_inner.py | 53 + streaming/test/test_stream.py | 56 + streaming/test/test_stream_response.py | 55 + streaming/test/test_stream_response_links.py | 52 + .../test/test_stream_response_links_self.py | 51 + streaming/test/test_stream_type.py | 33 + streaming/test/test_tag_match_object_type.py | 33 + streaming/test/test_unauthorized_error.py | 52 + streaming_api/.github/workflows/python.yml | 38 - streaming_api/.gitlab-ci.yml | 31 - streaming_api/.openapi-generator/FILES | 77 - streaming_api/.openapi-generator/VERSION | 1 - streaming_api/.travis.yml | 17 - streaming_api/README.md | 143 -- streaming_api/docs/ApiError.md | 31 - streaming_api/docs/BadRequestError.md | 31 - streaming_api/docs/UnauthorizedError.md | 29 - streaming_api/git_push.sh | 57 - streaming_api/pyproject.toml | 30 - streaming_api/setup.py | 49 - streaming_api/streaming_api/__init__.py | 50 - streaming_api/streaming_api/api/__init__.py | 5 - streaming_api/streaming_api/api_client.py | 741 ------- streaming_api/streaming_api/api_response.py | 21 - streaming_api/streaming_api/configuration.py | 434 ---- streaming_api/streaming_api/exceptions.py | 166 -- .../streaming_api/models/__init__.py | 33 - .../streaming_api/models/api_error.py | 93 - .../models/api_error_integration_limits.py | 94 - .../streaming_api/models/audit_operation.py | 90 - .../models/audit_operation_with_update.py | 104 - .../streaming_api/models/bad_request_error.py | 94 - .../models/create_stream_response.py | 124 -- .../streaming_api/models/endpoint_type.py | 45 - .../models/get_stream_response.py | 124 -- .../streaming_api/models/put_stream.py | 100 - .../models/put_stream_tag_match_inner.py | 93 - streaming_api/streaming_api/models/stream.py | 108 - .../streaming_api/models/stream_response.py | 100 - .../models/stream_response_links.py | 92 - .../models/stream_response_links_self.py | 87 - .../streaming_api/models/stream_type.py | 44 - .../models/tag_match_object_type.py | 44 - .../models/unauthorized_error.py | 89 - streaming_api/streaming_api/rest.py | 231 -- streaming_api/test-requirements.txt | 3 - streaming_api/test/test_api_error.py | 55 - .../test/test_api_error_integration_limits.py | 57 - streaming_api/test/test_audit_operation.py | 53 - .../test/test_audit_operation_with_update.py | 55 - streaming_api/test/test_bad_request_error.py | 57 - .../test/test_create_stream_response.py | 64 - streaming_api/test/test_endpoint_type.py | 34 - .../test/test_get_stream_response.py | 62 - streaming_api/test/test_put_stream.py | 54 - .../test/test_put_stream_tag_match_inner.py | 54 - streaming_api/test/test_stream.py | 57 - streaming_api/test/test_stream_response.py | 56 - .../test/test_stream_response_links.py | 53 - .../test/test_stream_response_links_self.py | 52 - streaming_api/test/test_stream_type.py | 34 - streaming_api/test/test_streaming_api.py | 66 - .../test/test_tag_match_object_type.py | 34 - streaming_api/test/test_unauthorized_error.py | 53 - streaming_api/tox.ini | 9 - {test_templates_api => tags}/.gitignore | 0 .../.openapi-generator-ignore | 0 tags/.openapi-generator/FILES | 88 + tags/.openapi-generator/VERSION | 1 + tags/README.md | 165 ++ tags/docs/AccessType.md | 12 + tags/docs/ApiError.md | 32 + tags/docs/Assignment.md | 30 + tags/docs/AssignmentType.md | 11 + tags/docs/BulkTagAssignment.md | 30 + tags/docs/BulkTagAssignments.md | 29 + tags/docs/BulkTagResponse.md | 30 + tags/docs/Error.md | 33 + tags/docs/Expand.md | 11 + tags/docs/GetTag.md | 40 + tags/docs/GetTags200Response.md | 30 + tags/docs/Link.md | 37 + tags/docs/ObjectType.md | 12 + tags/docs/SelfLinks.md | 29 + tags/docs/SelfLinksLinks.md | 30 + tags/docs/Tag.md | 39 + tags/docs/TagAssignment.md | 29 + tags/docs/TagAssignmentApi.md | 355 ++++ tags/docs/TagBulkCreateError.md | 31 + tags/docs/TagCollection.md | 29 + tags/docs/TagsApi.md | 524 +++++ tags/docs/UnauthorizedError.md | 30 + tags/docs/ValidationError.md | 34 + tags/docs/ValidationErrorAllOfErrors.md | 31 + tags/pyproject.toml | 71 + {test_templates_api => tags}/requirements.txt | 0 {test_templates_api => tags}/setup.cfg | 0 tags/setup.py | 49 + tags/tags/__init__.py | 56 + tags/tags/api/__init__.py | 6 + tags/tags/api/tag_assignment_api.py | 1287 ++++++++++++ tags/tags/api/tags_api.py | 1855 +++++++++++++++++ tags/tags/api_client.py | 770 +++++++ tags/tags/api_response.py | 21 + tags/tags/configuration.py | 444 ++++ tags/tags/exceptions.py | 199 ++ tags/tags/models/__init__.py | 38 + tags/tags/models/access_type.py | 38 + tags/tags/models/api_error.py | 93 + tags/tags/models/assignment.py | 90 + tags/tags/models/assignment_type.py | 39 + tags/tags/models/bulk_tag_assignment.py | 97 + tags/tags/models/bulk_tag_assignments.py | 95 + tags/tags/models/bulk_tag_response.py | 107 + tags/tags/models/error.py | 95 + tags/tags/models/expand.py | 36 + tags/tags/models/get_tag.py | 143 ++ tags/tags/models/get_tags200_response.py | 101 + tags/tags/models/link.py | 101 + tags/tags/models/object_type.py | 39 + tags/tags/models/self_links.py | 91 + tags/tags/models/self_links_links.py | 91 + tags/tags/models/tag.py | 137 ++ tags/tags/models/tag_assignment.py | 95 + tags/tags/models/tag_bulk_create_error.py | 104 + tags/tags/models/tag_collection.py | 95 + tags/tags/models/unauthorized_error.py | 89 + tags/tags/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../test_templates_api => tags/tags}/py.typed | 0 tags/tags/rest.py | 257 +++ tags/test-requirements.txt | 5 + {test_templates_api => tags}/test/__init__.py | 0 tags/test/test_access_type.py | 33 + tags/test/test_api_error.py | 54 + tags/test/test_assignment.py | 52 + tags/test/test_assignment_type.py | 33 + tags/test/test_bulk_tag_assignment.py | 56 + tags/test/test_bulk_tag_assignments.py | 53 + tags/test/test_bulk_tag_response.py | 61 + tags/test/test_error.py | 55 + tags/test/test_expand.py | 33 + tags/test/test_get_tag.py | 75 + tags/test/test_get_tags200_response.py | 63 + tags/test/test_link.py | 59 + tags/test/test_object_type.py | 33 + tags/test/test_self_links.py | 60 + tags/test/test_self_links_links.py | 59 + tags/test/test_tag.py | 65 + tags/test/test_tag_assignment.py | 55 + tags/test/test_tag_bulk_create_error.py | 55 + tags/test/test_tag_collection.py | 53 + tags/test/test_unauthorized_error.py | 52 + tags/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + {tests_api => test_results}/.gitignore | 0 .../.openapi-generator-ignore | 0 test_results/.openapi-generator/FILES | 301 +++ test_results/.openapi-generator/VERSION | 1 + test_results/README.md | 228 ++ test_results/docs/Agent.md | 32 + test_results/docs/AppLinks.md | 29 + test_results/docs/AppLinksLinks.md | 30 + .../docs/BgpBasicTestResult.md | 7 +- .../docs/BgpHop.md | 7 +- .../docs/BgpTestResult.md | 9 +- .../docs/BgpTestResults.md | 7 +- .../docs/BgpTestRouteInformationResult.md | 7 +- .../docs/BgpTestRouteInformationResults.md | 7 +- .../docs/DNSSECTestMetricsApi.md | 27 +- .../docs/DNSServerTestMetricsApi.md | 52 +- .../docs/DNSTraceTestMetricsApi.md | 27 +- .../docs/DnsServerTestResult.md | 7 +- .../docs/DnsServerTestResults.md | 7 +- .../docs/DnsTraceTestResult.md | 7 +- .../docs/DnsTraceTestResults.md | 7 +- .../docs/DnssecTestResult.md | 7 +- .../docs/DnssecTestResults.md | 7 +- .../docs/EpochTimeWindow.md | 7 +- test_results/docs/Error.md | 33 + test_results/docs/Expand.md | 11 + .../docs/FtpServerTestResult.md | 9 +- .../docs/FtpServerTestResults.md | 7 +- .../GetTestPathvisAgentRound200Response.md | 7 +- .../docs/GetTestResultDnsServer200Response.md | 9 +- .../docs/GetTestResultDnsTrace200Response.md | 9 +- .../docs/GetTestResultDnssec200Response.md | 9 +- .../docs/GetTestResultFtpServer200Response.md | 9 +- .../GetTestResultHttpServer200Response.md | 33 + .../docs/GetTestResultMetrics200Response.md | 9 +- .../GetTestResultNetworkPathVis200Response.md | 33 + .../docs/GetTestResultPageLoad200Response.md | 9 +- ...esultPageLoadComponentDetail200Response.md | 31 + .../docs/GetTestResultRtpStream200Response.md | 9 +- .../docs/GetTestResultSipServer200Response.md | 9 +- ...GetTestResultWebTransactions200Response.md | 9 +- ...bTransactionsComponentDetail200Response.md | 31 + ...nsactionsComponentPageDetail200Response.md | 31 + .../docs/GetTestResultsBgp200Response.md | 33 + .../GetTestResultsBgpPrefix200Response.md | 7 +- test_results/docs/HttpTestResult.md | 53 + test_results/docs/HttpTestResultHeaders.md | 31 + test_results/docs/HttpTestResults.md | 30 + test_results/docs/Link.md | 37 + .../docs/Marker.md | 7 +- test_results/docs/Monitor.md | 31 + .../docs/NetworkBGPTestMetricsApi.md | 48 +- test_results/docs/NetworkTestMetricsApi.md | 304 +++ test_results/docs/NetworkTestResult.md | 46 + test_results/docs/NetworkTestResults.md | 30 + .../docs/Page.md | 7 +- .../docs/PageLoadDetailTestResult.md | 7 +- .../docs/PageLoadDetailTestResults.md | 7 +- .../docs/PageLoadTestResult.md | 7 +- .../docs/PageLoadTestResults.md | 7 +- test_results/docs/PaginationLinks.md | 30 + test_results/docs/PaginationLinksLinks.md | 31 + test_results/docs/PathVisBaseTestResult.md | 40 + test_results/docs/PathVisDetailTestResult.md | 41 + test_results/docs/PathVisDetailTestResults.md | 30 + test_results/docs/PathVisDirection.md | 12 + test_results/docs/PathVisEndpoint.md | 34 + test_results/docs/PathVisHop.md | 36 + test_results/docs/PathVisRoute.md | 30 + test_results/docs/PathVisTestResult.md | 41 + test_results/docs/PathVisTestResults.md | 30 + test_results/docs/QueryWindow.md | 30 + .../docs/RtpStreamTestResult.md | 9 +- .../docs/RtpStreamTestResults.md | 7 +- test_results/docs/SelfLinks.md | 29 + test_results/docs/SelfLinksLinks.md | 30 + test_results/docs/SimpleTest.md | 43 + test_results/docs/SimpleTestLinks.md | 31 + test_results/docs/SimpleTestLinksSelf.md | 36 + .../docs/SipServerErrorType.md | 1 + .../docs/SipServerTestResult.md | 9 +- .../docs/SipServerTestResults.md | 7 +- test_results/docs/SslCert.md | 36 + test_results/docs/TestDirection.md | 12 + test_results/docs/TestInterval.md | 12 + test_results/docs/TestResult.md | 31 + .../docs/TestResultAppLinks.md | 7 +- test_results/docs/TestType.md | 12 + test_results/docs/UnauthorizedError.md | 30 + test_results/docs/ValidationError.md | 34 + .../docs/ValidationErrorAllOfErrors.md | 31 + .../docs/VoiceRTPServerTestMetricsApi.md | 27 +- .../docs/VoiceSIPServerTestMetricsApi.md | 27 +- .../docs/WebFTPServerTestMetricsApi.md | 27 +- .../docs/WebHTTPServerTestMetricsApi.md | 31 +- .../docs/WebPageLoadTestMetricsApi.md | 48 +- .../docs/WebTransactionDetailTestResult.md | 7 +- .../docs/WebTransactionDetailTestResults.md | 7 +- .../WebTransactionPageDetailTestResult.md | 7 +- .../WebTransactionPageDetailTestResults.md | 7 +- .../docs/WebTransactionTestResult.md | 7 +- .../docs/WebTransactionTestResults.md | 7 +- .../docs/WebTransactionsTestMetricsApi.md | 69 +- test_results/pyproject.toml | 71 + {tests_api => test_results}/requirements.txt | 0 {tests_api => test_results}/setup.cfg | 0 test_results/setup.py | 49 + test_results/test-requirements.txt | 5 + {tests_api => test_results}/test/__init__.py | 0 test_results/test/test_agent.py | 54 + test_results/test/test_app_links.py | 60 + test_results/test/test_app_links_links.py | 59 + .../test/test_bgp_basic_test_result.py | 7 +- .../test/test_bgp_hop.py | 5 +- .../test/test_bgp_test_result.py | 9 +- .../test/test_bgp_test_results.py | 7 +- .../test_bgp_test_route_information_result.py | 9 +- ...test_bgp_test_route_information_results.py | 7 +- .../test/test_dns_server_test_result.py | 10 +- .../test/test_dns_server_test_results.py | 7 +- .../test/test_dns_trace_test_result.py | 10 +- .../test/test_dns_trace_test_results.py | 7 +- .../test/test_dnssec_test_result.py | 10 +- .../test/test_dnssec_test_results.py | 7 +- .../test/test_epoch_time_window.py | 5 +- test_results/test/test_error.py | 55 + test_results/test/test_expand.py | 33 + .../test/test_ftp_server_test_result.py | 12 +- .../test/test_ftp_server_test_results.py | 7 +- ...et_test_pathvis_agent_round200_response.py | 11 +- ..._get_test_result_dns_server200_response.py | 76 + ...t_get_test_result_dns_trace200_response.py | 76 + ...test_get_test_result_dnssec200_response.py | 76 + ..._get_test_result_ftp_server200_response.py | 76 + ...get_test_result_http_server200_response.py | 76 + ...est_get_test_result_metrics200_response.py | 76 + ...est_result_network_path_vis200_response.py | 76 + ...t_get_test_result_page_load200_response.py | 76 + ..._page_load_component_detail200_response.py | 74 + ..._get_test_result_rtp_stream200_response.py | 76 + ..._get_test_result_sip_server200_response.py | 76 + ...est_result_web_transactions200_response.py | 76 + ...ansactions_component_detail200_response.py | 74 + ...tions_component_page_detail200_response.py | 74 + .../test_get_test_results_bgp200_response.py | 76 + ...get_test_results_bgp_prefix200_response.py | 11 +- test_results/test/test_http_test_result.py | 116 ++ .../test/test_http_test_result_headers.py | 77 + test_results/test/test_http_test_results.py | 54 + test_results/test/test_link.py | 59 + .../test/test_marker.py | 5 +- test_results/test/test_monitor.py | 53 + test_results/test/test_network_test_result.py | 72 + .../test/test_network_test_results.py | 54 + .../test/test_page.py | 5 +- .../test/test_page_load_detail_test_result.py | 10 +- .../test_page_load_detail_test_results.py | 7 +- .../test/test_page_load_test_result.py | 10 +- .../test/test_page_load_test_results.py | 7 +- test_results/test/test_pagination_links.py | 70 + .../test/test_pagination_links_links.py | 77 + .../test/test_path_vis_base_test_result.py | 66 + .../test/test_path_vis_detail_test_result.py | 81 + .../test/test_path_vis_detail_test_results.py | 54 + test_results/test/test_path_vis_direction.py | 33 + test_results/test/test_path_vis_endpoint.py | 56 + test_results/test/test_path_vis_hop.py | 58 + test_results/test/test_path_vis_route.py | 62 + .../test/test_path_vis_test_result.py | 75 + .../test/test_path_vis_test_results.py | 54 + test_results/test/test_query_window.py | 52 + .../test/test_rtp_stream_test_result.py | 12 +- .../test/test_rtp_stream_test_results.py | 7 +- test_results/test/test_self_links.py | 60 + test_results/test/test_self_links_links.py | 59 + test_results/test/test_simple_test.py | 66 + test_results/test/test_simple_test_links.py | 52 + .../test/test_simple_test_links_self.py | 59 + .../test/test_sip_server_error_type.py | 5 +- .../test/test_sip_server_test_result.py | 12 +- .../test/test_sip_server_test_results.py | 7 +- .../test/test_ssl_cert.py | 9 +- test_results/test/test_test_direction.py | 33 + test_results/test/test_test_interval.py | 33 + test_results/test/test_test_result.py | 53 + .../test/test_test_result_app_links.py | 5 +- test_results/test/test_test_type.py | 33 + test_results/test/test_unauthorized_error.py | 52 + test_results/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + ...test_web_transaction_detail_test_result.py | 14 +- ...est_web_transaction_detail_test_results.py | 7 +- ...web_transaction_page_detail_test_result.py | 14 +- ...eb_transaction_page_detail_test_results.py | 7 +- .../test/test_web_transaction_test_result.py | 10 +- .../test/test_web_transaction_test_results.py | 7 +- test_results/test_results/__init__.py | 130 ++ test_results/test_results/api/__init__.py | 15 + .../api/dns_server_test_metrics_api.py | 87 +- .../api/dns_trace_test_metrics_api.py | 58 +- .../api/dnssec_test_metrics_api.py | 58 +- .../api/network_bgp_test_metrics_api.py | 77 +- .../api/network_test_metrics_api.py | 199 +- .../api/voice_rtp_server_test_metrics_api.py | 58 +- .../api/voice_sip_server_test_metrics_api.py | 58 +- .../api/web_ftp_server_test_metrics_api.py | 58 +- .../api/web_http_server_test_metrics_api.py | 60 +- .../api/web_page_load_test_metrics_api.py | 77 +- .../api/web_transactions_test_metrics_api.py | 96 +- test_results/test_results/api_client.py | 770 +++++++ test_results/test_results/api_response.py | 21 + test_results/test_results/configuration.py | 444 ++++ test_results/test_results/exceptions.py | 199 ++ test_results/test_results/models/__init__.py | 103 + test_results/test_results/models/agent.py | 101 + test_results/test_results/models/app_links.py | 91 + .../test_results/models/app_links_links.py | 91 + .../models/bgp_basic_test_result.py | 42 +- .../test_results}/models/bgp_hop.py | 35 +- .../test_results/models/bgp_test_result.py | 120 ++ .../test_results}/models/bgp_test_results.py | 38 +- .../bgp_test_route_information_result.py | 46 +- .../bgp_test_route_information_results.py | 38 +- .../models/dns_server_test_result.py | 56 +- .../models/dns_server_test_results.py | 38 +- .../models/dns_trace_test_result.py | 60 +- .../models/dns_trace_test_results.py | 38 +- .../models/dnssec_test_result.py | 50 +- .../models/dnssec_test_results.py | 38 +- .../test_results}/models/epoch_time_window.py | 35 +- test_results/test_results/models/error.py | 95 + test_results/test_results/models/expand.py | 37 + .../models/ftp_server_test_result.py | 76 +- .../models/ftp_server_test_results.py | 38 +- ...et_test_pathvis_agent_round200_response.py | 107 + .../get_test_result_dns_server200_response.py | 48 +- .../get_test_result_dns_trace200_response.py | 48 +- .../get_test_result_dnssec200_response.py | 48 +- .../get_test_result_ftp_server200_response.py | 48 +- ...get_test_result_http_server200_response.py | 116 ++ .../get_test_result_metrics200_response.py | 48 +- ...est_result_network_path_vis200_response.py | 116 ++ .../get_test_result_page_load200_response.py | 48 +- ..._page_load_component_detail200_response.py | 107 + .../get_test_result_rtp_stream200_response.py | 48 +- .../get_test_result_sip_server200_response.py | 48 +- ...est_result_web_transactions200_response.py | 48 +- ...ansactions_component_detail200_response.py | 107 + ...tions_component_page_detail200_response.py | 107 + .../get_test_results_bgp200_response.py | 116 ++ ...get_test_results_bgp_prefix200_response.py | 107 + .../test_results/models/http_test_result.py | 166 ++ .../models/http_test_result_headers.py | 89 + .../test_results/models/http_test_results.py | 101 + test_results/test_results/models/link.py | 101 + .../test_results}/models/marker.py | 35 +- test_results/test_results/models/monitor.py | 97 + .../models/network_test_result.py | 157 ++ .../models/network_test_results.py | 101 + .../test_results}/models/page.py | 41 +- .../models/page_load_detail_test_result.py | 56 +- .../models/page_load_detail_test_results.py | 38 +- .../models/page_load_test_result.py | 52 +- .../models/page_load_test_results.py | 38 +- .../test_results/models/pagination_links.py | 91 + .../models/pagination_links_links.py | 101 + .../models/path_vis_base_test_result.py | 133 ++ .../models/path_vis_detail_test_result.py | 143 ++ .../models/path_vis_detail_test_results.py | 101 + .../test_results/models/path_vis_direction.py | 37 + .../test_results/models/path_vis_endpoint.py | 109 + .../test_results/models/path_vis_hop.py | 117 ++ .../test_results/models/path_vis_route.py | 99 + .../models/path_vis_test_result.py | 143 ++ .../models/path_vis_test_results.py | 101 + .../test_results/models/query_window.py | 94 + .../models/rtp_stream_test_result.py | 154 ++ .../models/rtp_stream_test_results.py | 38 +- .../test_results/models/self_links.py | 91 + .../test_results/models/self_links_links.py | 91 + .../test_results/models/simple_test.py | 147 ++ .../test_results/models/simple_test_links.py | 101 + .../models/simple_test_links_self.py | 101 + .../models/sip_server_error_type.py | 12 +- .../models/sip_server_test_result.py | 173 ++ .../models/sip_server_test_results.py | 38 +- .../test_results}/models/ssl_cert.py | 34 +- .../test_results/models/test_direction.py | 38 + .../test_results/models/test_interval.py | 42 + .../test_results/models/test_result.py | 96 + .../models/test_result_app_links.py | 31 +- test_results/test_results/models/test_type.py | 47 + .../test_results/models/unauthorized_error.py | 89 + .../test_results/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + .../web_transaction_detail_test_result.py | 58 +- .../web_transaction_detail_test_results.py | 38 +- ...web_transaction_page_detail_test_result.py | 62 +- ...eb_transaction_page_detail_test_results.py | 38 +- .../models/web_transaction_test_result.py | 50 +- .../models/web_transaction_test_results.py | 38 +- .../test_results}/py.typed | 0 test_results/test_results/rest.py | 257 +++ test_results_api/.github/workflows/python.yml | 38 - test_results_api/.gitlab-ci.yml | 31 - test_results_api/.openapi-generator/FILES | 317 --- test_results_api/.openapi-generator/VERSION | 1 - test_results_api/.travis.yml | 17 - test_results_api/README.md | 228 -- test_results_api/docs/Agent.md | 30 - test_results_api/docs/AppLinks.md | 28 - test_results_api/docs/AppLinksLinks.md | 29 - test_results_api/docs/Error.md | 32 - test_results_api/docs/Expand.md | 10 - .../GetTestResultHttpServer200Response.md | 32 - .../GetTestResultNetworkPathvis200Response.md | 32 - ...esultPageLoadComponentDetail200Response.md | 30 - ...bTransactionsComponentDetail200Response.md | 30 - ...nsactionsComponentPageDetail200Response.md | 30 - .../docs/GetTestResultsBgp200Response.md | 30 - test_results_api/docs/HttpTestResult.md | 50 - .../docs/HttpTestResultHeaders.md | 30 - test_results_api/docs/HttpTestResults.md | 29 - test_results_api/docs/Link.md | 36 - test_results_api/docs/Monitor.md | 30 - .../docs/NetworkTestMetricsApi.md | 301 --- test_results_api/docs/NetworkTestResult.md | 44 - test_results_api/docs/NetworkTestResults.md | 29 - test_results_api/docs/PaginationLinks.md | 29 - test_results_api/docs/PaginationLinksLinks.md | 29 - .../docs/PathVisBaseTestResult.md | 39 - .../docs/PathVisDetailTestResult.md | 40 - .../docs/PathVisDetailTestResults.md | 29 - test_results_api/docs/PathVisEndpoint.md | 33 - test_results_api/docs/PathVisHop.md | 35 - test_results_api/docs/PathVisRoute.md | 29 - test_results_api/docs/PathVisTestResult.md | 40 - test_results_api/docs/PathVisTestResults.md | 29 - test_results_api/docs/QueryWindow.md | 29 - test_results_api/docs/SelfLinks.md | 28 - test_results_api/docs/SelfLinksLinks.md | 29 - test_results_api/docs/SimpleTest.md | 42 - test_results_api/docs/SslCert.md | 35 - test_results_api/docs/TestDirection.md | 11 - test_results_api/docs/TestInterval.md | 11 - test_results_api/docs/TestResult.md | 30 - test_results_api/docs/TestType.md | 11 - test_results_api/docs/UnauthorizedError.md | 29 - .../docs/UnexpandedInstantTest.md | 38 - .../docs/UnexpandedInstantTestLinks.md | 30 - .../docs/UnexpandedInstantTestLinksSelf.md | 35 - .../UnexpandedInstantTestLinksTestResults.md | 35 - test_results_api/docs/UnexpandedTest.md | 30 - test_results_api/git_push.sh | 57 - test_results_api/pyproject.toml | 30 - test_results_api/setup.py | 49 - test_results_api/test-requirements.txt | 3 - test_results_api/test/test_agent.py | 54 - test_results_api/test/test_app_links.py | 61 - test_results_api/test/test_app_links_links.py | 60 - .../test/test_dns_server_test_metrics_api.py | 45 - .../test/test_dns_trace_test_metrics_api.py | 38 - .../test/test_dnssec_test_metrics_api.py | 38 - test_results_api/test/test_error.py | 56 - test_results_api/test/test_expand.py | 34 - ..._get_test_result_dns_server200_response.py | 67 - ...t_get_test_result_dns_trace200_response.py | 67 - ...test_get_test_result_dnssec200_response.py | 67 - ..._get_test_result_ftp_server200_response.py | 67 - ...get_test_result_http_server200_response.py | 67 - ...est_get_test_result_metrics200_response.py | 67 - ...test_result_network_pathvis200_response.py | 67 - ...t_get_test_result_page_load200_response.py | 67 - ..._page_load_component_detail200_response.py | 65 - ..._get_test_result_rtp_stream200_response.py | 67 - ..._get_test_result_sip_server200_response.py | 67 - ...est_result_web_transactions200_response.py | 67 - ...ansactions_component_detail200_response.py | 65 - ...tions_component_page_detail200_response.py | 65 - .../test_get_test_results_bgp200_response.py | 65 - .../test/test_http_test_result.py | 114 - .../test/test_http_test_result_headers.py | 78 - .../test/test_http_test_results.py | 55 - test_results_api/test/test_link.py | 60 - test_results_api/test/test_monitor.py | 54 - .../test/test_network_bgp_test_metrics_api.py | 45 - .../test/test_network_test_metrics_api.py | 52 - .../test/test_network_test_result.py | 71 - .../test/test_network_test_results.py | 55 - .../test/test_pagination_links.py | 70 - .../test/test_pagination_links_links.py | 69 - .../test/test_path_vis_base_test_result.py | 66 - .../test/test_path_vis_detail_test_result.py | 81 - .../test/test_path_vis_detail_test_results.py | 55 - .../test/test_path_vis_endpoint.py | 57 - test_results_api/test/test_path_vis_hop.py | 59 - test_results_api/test/test_path_vis_route.py | 63 - .../test/test_path_vis_test_result.py | 75 - .../test/test_path_vis_test_results.py | 55 - test_results_api/test/test_query_window.py | 53 - test_results_api/test/test_self_links.py | 61 - .../test/test_self_links_links.py | 60 - test_results_api/test/test_simple_test.py | 67 - test_results_api/test/test_test_direction.py | 34 - test_results_api/test/test_test_interval.py | 34 - test_results_api/test/test_test_result.py | 54 - test_results_api/test/test_test_type.py | 34 - .../test/test_unauthorized_error.py | 53 - .../test/test_unexpanded_instant_test.py | 64 - .../test_unexpanded_instant_test_links.py | 53 - ...test_unexpanded_instant_test_links_self.py | 60 - ...xpanded_instant_test_links_test_results.py | 60 - test_results_api/test/test_unexpanded_test.py | 54 - .../test_voice_rtp_server_test_metrics_api.py | 38 - .../test_voice_sip_server_test_metrics_api.py | 38 - .../test_web_ftp_server_test_metrics_api.py | 38 - .../test_web_http_server_test_metrics_api.py | 38 - .../test_web_page_load_test_metrics_api.py | 45 - .../test_web_transactions_test_metrics_api.py | 52 - test_results_api/test_results_api/__init__.py | 130 -- .../test_results_api/api/__init__.py | 15 - .../test_results_api/api_client.py | 741 ------- .../test_results_api/api_response.py | 21 - .../test_results_api/configuration.py | 434 ---- .../test_results_api/exceptions.py | 166 -- .../test_results_api/models/__init__.py | 103 - .../test_results_api/models/agent.py | 98 - .../test_results_api/models/app_links.py | 92 - .../models/app_links_links.py | 92 - .../models/bgp_test_result.py | 112 - .../test_results_api/models/error.py | 96 - .../test_results_api/models/expand.py | 45 - ...et_test_pathvis_agent_round200_response.py | 108 - ...get_test_result_http_server200_response.py | 116 -- ...test_result_network_pathvis200_response.py | 116 -- ..._page_load_component_detail200_response.py | 108 - ...ansactions_component_detail200_response.py | 108 - ...tions_component_page_detail200_response.py | 108 - .../get_test_results_bgp200_response.py | 108 - ...get_test_results_bgp_prefix200_response.py | 108 - .../models/http_test_result.py | 158 -- .../models/http_test_result_headers.py | 90 - .../models/http_test_results.py | 101 - .../test_results_api/models/link.py | 102 - .../test_results_api/models/monitor.py | 98 - .../models/network_test_result.py | 153 -- .../models/network_test_results.py | 101 - .../models/pagination_links.py | 92 - .../models/pagination_links_links.py | 96 - .../models/path_vis_base_test_result.py | 133 -- .../models/path_vis_detail_test_result.py | 143 -- .../models/path_vis_detail_test_results.py | 101 - .../models/path_vis_endpoint.py | 110 - .../test_results_api/models/path_vis_hop.py | 118 -- .../test_results_api/models/path_vis_route.py | 100 - .../models/path_vis_test_result.py | 143 -- .../models/path_vis_test_results.py | 101 - .../test_results_api/models/query_window.py | 94 - .../models/rtp_stream_test_result.py | 146 -- .../test_results_api/models/self_links.py | 92 - .../models/self_links_links.py | 92 - .../test_results_api/models/simple_test.py | 134 -- .../models/sip_server_test_result.py | 165 -- .../test_results_api/models/test_direction.py | 46 - .../test_results_api/models/test_interval.py | 50 - .../test_results_api/models/test_result.py | 96 - .../test_results_api/models/test_type.py | 55 - .../models/unauthorized_error.py | 89 - .../models/unexpanded_instant_test.py | 127 -- .../models/unexpanded_instant_test_links.py | 98 - .../unexpanded_instant_test_links_self.py | 102 - ...xpanded_instant_test_links_test_results.py | 149 -- .../models/unexpanded_test.py | 93 - test_results_api/test_results_api/rest.py | 231 -- test_results_api/tox.ini | 9 - .../.github/workflows/python.yml | 38 - test_templates_api/.gitlab-ci.yml | 31 - test_templates_api/.openapi-generator/FILES | 77 - test_templates_api/.openapi-generator/VERSION | 1 - test_templates_api/.travis.yml | 17 - test_templates_api/README.md | 167 -- test_templates_api/docs/ApiError.md | 29 - test_templates_api/docs/BadRequestError.md | 31 - test_templates_api/docs/DeployTestTemplate.md | 30 - .../docs/DeployTestTemplateTests.md | 28 - .../docs/DeployTestTemplateUserInputValues.md | 31 - test_templates_api/docs/DeploymentStrategy.md | 11 - test_templates_api/docs/Link.md | 35 - test_templates_api/docs/NotFoundError.md | 28 - test_templates_api/docs/TestTemplate.md | 41 - .../docs/TestTemplateCollection.md | 29 - .../docs/TestTemplateCollectionLinks.md | 28 - .../docs/TestTemplateCollectionLinksSelf.md | 28 - .../docs/TestTemplateEndpointsApi.md | 517 ----- test_templates_api/docs/TestTemplateUpsert.md | 38 - test_templates_api/docs/UnauthorizedError.md | 29 - test_templates_api/docs/UserInput.md | 33 - .../docs/UserInputDefaultValue.md | 28 - test_templates_api/docs/UserInputType.md | 11 - test_templates_api/git_push.sh | 57 - test_templates_api/pyproject.toml | 30 - test_templates_api/setup.py | 49 - test_templates_api/test-requirements.txt | 3 - test_templates_api/test/test_api_error.py | 55 - .../test/test_bad_request_error.py | 55 - .../test/test_deploy_test_template.py | 59 - .../test/test_deploy_test_template_tests.py | 52 - ..._deploy_test_template_user_input_values.py | 55 - .../test/test_deployment_strategy.py | 34 - test_templates_api/test/test_link.py | 59 - .../test/test_not_found_error.py | 52 - test_templates_api/test/test_test_template.py | 75 - .../test/test_test_template_collection.py | 81 - .../test_test_template_collection_links.py | 53 - ...est_test_template_collection_links_self.py | 52 - .../test/test_test_template_endpoints_api.py | 73 - .../test/test_test_template_upsert.py | 64 - .../test/test_unauthorized_error.py | 53 - test_templates_api/test/test_user_input.py | 58 - .../test/test_user_input_default_value.py | 51 - .../test/test_user_input_type.py | 34 - .../test_templates_api/__init__.py | 50 - .../test_templates_api/api/__init__.py | 5 - .../api/test_template_endpoints_api.py | 1840 ---------------- .../test_templates_api/api_client.py | 741 ------- .../test_templates_api/api_response.py | 21 - .../test_templates_api/configuration.py | 434 ---- .../test_templates_api/exceptions.py | 166 -- .../test_templates_api/models/__init__.py | 33 - .../test_templates_api/models/api_error.py | 89 - .../models/bad_request_error.py | 93 - .../models/deploy_test_template.py | 100 - .../models/deploy_test_template_tests.py | 87 - .../deploy_test_template_user_input_values.py | 93 - .../models/deployment_strategy.py | 47 - .../test_templates_api/models/link.py | 101 - .../models/not_found_error.py | 87 - .../models/test_template.py | 141 -- .../models/test_template_collection.py | 102 - .../models/test_template_collection_links.py | 92 - .../test_template_collection_links_self.py | 87 - .../models/test_template_upsert.py | 120 -- .../models/unauthorized_error.py | 89 - .../test_templates_api/models/user_input.py | 101 - .../models/user_input_default_value.py | 151 -- .../models/user_input_type.py | 51 - test_templates_api/test_templates_api/rest.py | 231 -- test_templates_api/tox.ini | 9 - {usage_api => tests}/.gitignore | 0 .../.openapi-generator-ignore | 0 tests/.openapi-generator/FILES | 487 +++++ tests/.openapi-generator/VERSION | 1 + tests/README.md | 333 +++ tests/docs/Agent.md | 39 + tests/docs/AgentBase.md | 31 + tests/docs/AgentToAgentApi.md | 458 ++++ tests/docs/AgentToAgentInstantTest.md | 55 + tests/docs/AgentToAgentProperties.md | 42 + {tests_api => tests}/docs/AgentToAgentTest.md | 10 +- tests/docs/AgentToAgentTestProtocol.md | 11 + tests/docs/AgentToAgentTests.md | 29 + tests/docs/AgentToServerApi.md | 458 ++++ tests/docs/AgentToServerInstantTest.md | 57 + tests/docs/AgentToServerProperties.md | 44 + .../docs/AgentToServerTest.md | 10 +- tests/docs/AgentToServerTests.md | 29 + tests/docs/AlertDirection.md | 12 + tests/docs/AlertRoundsViolationMode.md | 12 + tests/docs/AlertRule.md | 40 + tests/docs/AlertType.md | 12 + {tests_api => tests}/docs/AllTestTypesApi.md | 23 +- {tests_api => tests}/docs/BGPApi.md | 139 +- tests/docs/BaseBgpTest.md | 47 + {tests_api => tests}/docs/BaseRequest.md | 7 +- tests/docs/BaseTest.md | 32 + {tests_api => tests}/docs/BgpTest.md | 12 +- {tests_api => tests}/docs/BgpTests.md | 9 +- tests/docs/CloudEnterpriseAgentType.md | 12 + {tests_api => tests}/docs/DNSSECApi.md | 143 +- tests/docs/DNSServerApi.md | 458 ++++ tests/docs/DNSTraceApi.md | 458 ++++ tests/docs/DnsQueryClass.md | 12 + tests/docs/DnsSecInstantTest.md | 44 + tests/docs/DnsSecProperties.md | 31 + {tests_api => tests}/docs/DnsSecTest.md | 9 +- tests/docs/DnsSecTests.md | 29 + tests/docs/DnsServerInstantTest.md | 56 + tests/docs/DnsServerProperties.md | 43 + {tests_api => tests}/docs/DnsServerTest.md | 10 +- tests/docs/DnsServerTests.md | 29 + tests/docs/DnsServersRequest.md | 29 + tests/docs/DnsTraceInstantTest.md | 45 + tests/docs/DnsTraceProperties.md | 32 + {tests_api => tests}/docs/DnsTraceTest.md | 9 +- tests/docs/DnsTraceTests.md | 29 + tests/docs/Error.md | 33 + tests/docs/Expand.md | 11 + tests/docs/FTPServerApi.md | 456 ++++ tests/docs/FtpServerInstantTest.md | 60 + tests/docs/FtpServerProperties.md | 47 + tests/docs/FtpServerRequestType.md | 12 + {tests_api => tests}/docs/FtpServerTest.md | 10 +- tests/docs/FtpServerTests.md | 29 + tests/docs/GetAgentToAgentTests200Response.md | 30 + .../docs/GetAgentToServerTests200Response.md | 30 + tests/docs/GetBgpTests200Response.md | 30 + tests/docs/GetDNSServerTests200Response.md | 30 + tests/docs/GetDnsSecTests200Response.md | 30 + tests/docs/GetDnsTraceTests200Response.md | 30 + tests/docs/GetFtpServerTests200Response.md | 30 + tests/docs/GetHttpServerTests200Response.md | 30 + tests/docs/GetPageLoadTests200Response.md | 30 + .../GetPathVisInterfaceGroups200Response.md | 7 +- tests/docs/GetSipServerTests200Response.md | 30 + .../docs/GetTests200Response.md | 7 +- tests/docs/GetVoiceTests200Response.md | 30 + .../GetWebTransactionsTests200Response.md | 30 + tests/docs/HTTPServerApi.md | 458 ++++ tests/docs/HttpServerInstantTest.md | 74 + tests/docs/HttpServerProperties.md | 61 + {tests_api => tests}/docs/HttpServerTest.md | 11 +- tests/docs/HttpServerTests.md | 29 + tests/docs/InstantTest.md | 41 + {tests_api => tests}/docs/InterfaceGroup.md | 7 +- {tests_api => tests}/docs/InterfaceGroups.md | 7 +- tests/docs/Link.md | 37 + tests/docs/Monitor.md | 34 + tests/docs/MonitorType.md | 12 + {tests_api => tests}/docs/MonitorsRequest.md | 7 +- {tests_api => tests}/docs/PageLoadApi.md | 135 +- tests/docs/PageLoadInstantTest.md | 77 + tests/docs/PageLoadProperties.md | 64 + {tests_api => tests}/docs/PageLoadTest.md | 14 +- tests/docs/PageLoadTests.md | 29 + .../PathVisualizationInterfaceGroupsApi.md | 95 +- tests/docs/SIPServerApi.md | 456 ++++ tests/docs/SelfLinks.md | 29 + tests/docs/SelfLinksLinks.md | 30 + tests/docs/Severity.md | 12 + tests/docs/SimpleAgent.md | 38 + tests/docs/SimpleTest.md | 43 + tests/docs/SipServerInstantTest.md | 53 + tests/docs/SipServerInstantTestRequest.md | 54 + tests/docs/SipServerInstantTestResponse.md | 59 + tests/docs/SipServerProperties.md | 40 + {tests_api => tests}/docs/SipServerTest.md | 26 +- tests/docs/SipServerTests.md | 29 + tests/docs/SipTestProtocol.md | 12 + tests/docs/TestAuthType.md | 12 + tests/docs/TestCustomHeaders.md | 31 + tests/docs/TestDirection.md | 12 + tests/docs/TestDnsServer.md | 30 + tests/docs/TestDnsTransportProtocol.md | 12 + tests/docs/TestDscpId.md | 12 + {tests_api => tests}/docs/TestHttpInterval.md | 1 + tests/docs/TestInterval.md | 12 + tests/docs/TestIpv6Policy.md | 12 + tests/docs/TestLabelsInner.md | 31 + tests/docs/TestMonitorsProperties.md | 31 + tests/docs/TestPageLoadingStrategy.md | 12 + tests/docs/TestPathTraceMode.md | 12 + tests/docs/TestProbeMode.md | 12 + tests/docs/TestProtocol.md | 12 + {tests_api => tests}/docs/TestRequest.md | 7 +- .../docs/TestRequestAllOfAgents.md | 7 +- tests/docs/TestSharedAccountsInner.md | 30 + tests/docs/TestSipCredentials.md | 34 + tests/docs/TestSslVersionId.md | 12 + {tests_api => tests}/docs/TestSubInterval.md | 1 + tests/docs/TestType.md | 12 + {tests_api => tests}/docs/Tests.md | 7 +- tests/docs/UnauthorizedError.md | 30 + tests/docs/UnexpandedAgentToAgentTest.md | 57 + tests/docs/UnexpandedAgentToServerTest.md | 59 + tests/docs/UnexpandedBgpTest.md | 44 + tests/docs/UnexpandedDnsSecTest.md | 44 + tests/docs/UnexpandedDnsServerTest.md | 58 + tests/docs/UnexpandedDnsTraceTest.md | 45 + tests/docs/UnexpandedFtpServerTest.md | 62 + tests/docs/UnexpandedHttpServerTest.md | 76 + tests/docs/UnexpandedInstantTest.md | 39 + tests/docs/UnexpandedInstantTestLinks.md | 31 + tests/docs/UnexpandedInstantTestLinksSelf.md | 36 + tests/docs/UnexpandedPageLoadTest.md | 81 + tests/docs/UnexpandedSipServerTest.md | 61 + tests/docs/UnexpandedTest.md | 31 + tests/docs/UnexpandedVoiceTest.md | 53 + tests/docs/UnexpandedWebTransactionTest.md | 81 + .../docs/UpdateAgentToAgentTest.md | 10 +- .../docs/UpdateAgentToServerTest.md | 10 +- {tests_api => tests}/docs/UpdateBgpTest.md | 12 +- tests/docs/UpdateBgpTestRequest.md | 47 + {tests_api => tests}/docs/UpdateDnsSecTest.md | 9 +- .../docs/UpdateDnsServerTest.md | 12 +- .../docs/UpdateDnsTraceTest.md | 9 +- .../docs/UpdateFtpServerTest.md | 10 +- .../docs/UpdateHttpServerTest.md | 11 +- .../docs/UpdatePageLoadTest.md | 14 +- .../docs/UpdateSipServerTest.md | 21 +- tests/docs/UpdateSipServerTest1.md | 61 + {tests_api => tests}/docs/UpdateVoiceTest.md | 11 +- .../docs/UpdateWebTransactionTest.md | 15 +- tests/docs/ValidationError.md | 34 + tests/docs/ValidationErrorAllOfErrors.md | 31 + tests/docs/VoiceApi.md | 458 ++++ tests/docs/VoiceInstantTest.md | 51 + tests/docs/VoiceProperties.md | 38 + {tests_api => tests}/docs/VoiceTest.md | 11 +- tests/docs/VoiceTests.md | 29 + tests/docs/WebTransactionApi.md | 458 ++++ tests/docs/WebTransactionInstantTest.md | 79 + tests/docs/WebTransactionProperties.md | 65 + .../docs/WebTransactionTest.md | 15 +- tests/docs/WebTransactionTests.md | 29 + tests/pyproject.toml | 71 + {usage_api => tests}/requirements.txt | 0 {usage_api => tests}/setup.cfg | 0 tests/setup.py | 49 + tests/test-requirements.txt | 5 + {usage_api => tests}/test/__init__.py | 0 tests/test/test_agent.py | 62 + tests/test/test_agent_base.py | 53 + .../test/test_agent_to_agent_instant_test.py | 88 + tests/test/test_agent_to_agent_properties.py | 65 + .../test/test_agent_to_agent_test.py | 34 +- .../test/test_agent_to_agent_test_protocol.py | 33 + .../test/test_agent_to_agent_tests.py | 7 +- .../test/test_agent_to_server_instant_test.py | 90 + tests/test/test_agent_to_server_properties.py | 67 + .../test/test_agent_to_server_test.py | 34 +- .../test/test_agent_to_server_tests.py | 7 +- tests/test/test_alert_direction.py | 33 + .../test/test_alert_rounds_violation_mode.py | 33 + tests/test/test_alert_rule.py | 62 + tests/test/test_alert_type.py | 33 + tests/test/test_base_bgp_test.py | 99 + .../test/test_base_request.py | 9 +- tests/test/test_base_test.py | 68 + {tests_api => tests}/test/test_bgp_test.py | 29 +- {tests_api => tests}/test/test_bgp_tests.py | 7 +- .../test/test_cloud_enterprise_agent_type.py | 33 + tests/test/test_dns_query_class.py | 33 + tests/test/test_dns_sec_instant_test.py | 77 + tests/test/test_dns_sec_properties.py | 54 + .../test/test_dns_sec_test.py | 31 +- .../test/test_dns_sec_tests.py | 7 +- tests/test/test_dns_server_instant_test.py | 98 + tests/test/test_dns_server_properties.py | 75 + .../test/test_dns_server_test.py | 38 +- .../test/test_dns_server_tests.py | 7 +- tests/test/test_dns_servers_request.py | 51 + tests/test/test_dns_trace_instant_test.py | 78 + tests/test/test_dns_trace_properties.py | 55 + .../test/test_dns_trace_test.py | 31 +- .../test/test_dns_trace_tests.py | 7 +- tests/test/test_error.py | 55 + tests/test/test_expand.py | 33 + tests/test/test_ftp_server_instant_test.py | 96 + tests/test/test_ftp_server_properties.py | 73 + tests/test/test_ftp_server_request_type.py | 33 + .../test/test_ftp_server_test.py | 34 +- .../test/test_ftp_server_tests.py | 7 +- ...st_get_agent_to_agent_tests200_response.py | 11 +- ...t_get_agent_to_server_tests200_response.py | 11 +- .../test/test_get_bgp_tests200_response.py | 11 +- .../test_get_dns_sec_tests200_response.py | 11 +- .../test_get_dns_server_tests200_response.py | 11 +- .../test_get_dns_trace_tests200_response.py | 11 +- .../test_get_ftp_server_tests200_response.py | 11 +- .../test_get_http_server_tests200_response.py | 11 +- .../test_get_page_load_tests200_response.py | 11 +- ...t_path_vis_interface_groups200_response.py | 15 +- .../test_get_sip_server_tests200_response.py | 11 +- .../test/test_get_tests200_response.py | 13 +- .../test/test_get_voice_tests200_response.py | 11 +- ..._get_web_transactions_tests200_response.py | 11 +- tests/test/test_http_server_instant_test.py | 113 + tests/test/test_http_server_properties.py | 90 + .../test/test_http_server_test.py | 37 +- .../test/test_http_server_tests.py | 7 +- tests/test/test_instant_test.py | 71 + .../test/test_interface_group.py | 9 +- .../test/test_interface_groups.py | 11 +- tests/test/test_link.py | 59 + tests/test/test_monitor.py | 56 + tests/test/test_monitor_type.py | 33 + .../test/test_monitors_request.py | 7 +- tests/test/test_page_load_instant_test.py | 116 ++ tests/test/test_page_load_properties.py | 93 + .../test/test_page_load_test.py | 37 +- .../test/test_page_load_tests.py | 7 +- tests/test/test_self_links.py | 60 + tests/test/test_self_links_links.py | 59 + tests/test/test_severity.py | 33 + tests/test/test_simple_agent.py | 60 + tests/test/test_simple_test.py | 66 + tests/test/test_sip_server_instant_test.py | 85 + .../test_sip_server_instant_test_request.py | 99 + .../test_sip_server_instant_test_response.py | 92 + tests/test/test_sip_server_properties.py | 62 + tests/test/test_sip_server_test.py | 122 ++ .../test/test_sip_server_tests.py | 7 +- tests/test/test_sip_test_protocol.py | 33 + tests/test/test_test_auth_type.py | 33 + tests/test/test_test_custom_headers.py | 61 + tests/test/test_test_direction.py | 33 + tests/test/test_test_dns_server.py | 52 + .../test/test_test_dns_transport_protocol.py | 33 + tests/test/test_test_dscp_id.py | 33 + tests/test/test_test_http_interval.py | 33 + tests/test/test_test_interval.py | 33 + tests/test/test_test_ipv6_policy.py | 33 + tests/test/test_test_labels_inner.py | 53 + tests/test/test_test_monitors_properties.py | 61 + tests/test/test_test_page_loading_strategy.py | 33 + tests/test/test_test_path_trace_mode.py | 33 + tests/test/test_test_probe_mode.py | 33 + tests/test/test_test_protocol.py | 33 + .../test/test_test_request.py | 9 +- .../test/test_test_request_all_of_agents.py | 7 +- tests/test/test_test_shared_accounts_inner.py | 52 + tests/test/test_test_sip_credentials.py | 57 + tests/test/test_test_ssl_version_id.py | 33 + tests/test/test_test_sub_interval.py | 33 + tests/test/test_test_type.py | 33 + {tests_api => tests}/test/test_tests.py | 9 +- tests/test/test_unauthorized_error.py | 52 + .../test_unexpanded_agent_to_agent_test.py | 83 + .../test_unexpanded_agent_to_server_test.py | 85 + tests/test/test_unexpanded_bgp_test.py | 69 + tests/test/test_unexpanded_dns_sec_test.py | 70 + tests/test/test_unexpanded_dns_server_test.py | 93 + tests/test/test_unexpanded_dns_trace_test.py | 71 + tests/test/test_unexpanded_ftp_server_test.py | 91 + .../test/test_unexpanded_http_server_test.py | 108 + tests/test/test_unexpanded_instant_test.py | 63 + .../test_unexpanded_instant_test_links.py | 52 + ...test_unexpanded_instant_test_links_self.py | 59 + tests/test/test_unexpanded_page_load_test.py | 113 + tests/test/test_unexpanded_sip_server_test.py | 87 + tests/test/test_unexpanded_test.py | 53 + tests/test/test_unexpanded_voice_test.py | 79 + .../test_unexpanded_web_transaction_test.py | 114 + .../test/test_update_agent_to_agent_test.py | 25 +- .../test/test_update_agent_to_server_test.py | 25 +- .../test/test_update_bgp_test.py | 20 +- tests/test/test_update_bgp_test_request.py | 71 + .../test/test_update_dns_sec_test.py | 22 +- tests/test/test_update_dns_server_test.py | 92 + .../test/test_update_dns_trace_test.py | 24 +- .../test/test_update_ftp_server_test.py | 25 +- .../test/test_update_http_server_test.py | 28 +- .../test/test_update_page_load_test.py | 28 +- tests/test/test_update_sip_server_test.py | 109 + tests/test/test_update_sip_server_test1.py | 129 ++ tests/test/test_update_voice_test.py | 94 + .../test/test_update_web_transaction_test.py | 28 +- tests/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + tests/test/test_voice_instant_test.py | 84 + tests/test/test_voice_properties.py | 61 + tests/test/test_voice_test.py | 114 + {tests_api => tests}/test/test_voice_tests.py | 7 +- .../test/test_web_transaction_instant_test.py | 119 ++ tests/test/test_web_transaction_properties.py | 95 + .../test/test_web_transaction_test.py | 37 +- .../test/test_web_transaction_tests.py | 7 +- tests/tests/__init__.py | 193 ++ tests/tests/api/__init__.py | 18 + tests/tests/api/agent_to_agent_api.py | 1597 ++++++++++++++ tests/tests/api/agent_to_server_api.py | 1597 ++++++++++++++ .../tests}/api/all_test_types_api.py | 39 +- .../tests_api => tests/tests}/api/bgp_api.py | 172 +- tests/tests/api/dns_server_api.py | 1597 ++++++++++++++ tests/tests/api/dns_trace_api.py | 1597 ++++++++++++++ .../tests}/api/dnssec_api.py | 153 +- tests/tests/api/ftp_server_api.py | 1594 ++++++++++++++ tests/tests/api/http_server_api.py | 1597 ++++++++++++++ .../tests}/api/page_load_api.py | 141 +- ...path_visualization_interface_groups_api.py | 116 +- tests/tests/api/sip_server_api.py | 1594 ++++++++++++++ tests/tests/api/voice_api.py | 1597 ++++++++++++++ tests/tests/api/web_transaction_api.py | 1597 ++++++++++++++ tests/tests/api_client.py | 770 +++++++ tests/tests/api_response.py | 21 + tests/tests/configuration.py | 444 ++++ tests/tests/exceptions.py | 199 ++ tests/tests/models/__init__.py | 163 ++ tests/tests/models/agent.py | 124 ++ tests/tests/models/agent_base.py | 97 + .../models/agent_to_agent_instant_test.py | 197 ++ .../tests/models/agent_to_agent_properties.py | 122 ++ .../tests}/models/agent_to_agent_test.py | 100 +- .../models/agent_to_agent_test_protocol.py | 37 + tests/tests/models/agent_to_agent_tests.py | 95 + .../models/agent_to_server_instant_test.py | 202 ++ .../models/agent_to_server_properties.py | 127 ++ .../tests}/models/agent_to_server_test.py | 102 +- tests/tests/models/agent_to_server_tests.py | 95 + tests/tests/models/alert_direction.py | 38 + .../models/alert_rounds_violation_mode.py | 37 + tests/tests/models/alert_rule.py | 129 ++ tests/tests/models/alert_type.py | 62 + tests/tests/models/base_bgp_test.py | 182 ++ .../tests}/models/base_request.py | 33 +- tests/tests/models/base_test.py | 102 + .../tests}/models/bgp_test.py | 86 +- tests/tests/models/bgp_tests.py | 95 + .../models/cloud_enterprise_agent_type.py | 38 + tests/tests/models/dns_query_class.py | 37 + tests/tests/models/dns_sec_instant_test.py | 169 ++ tests/tests/models/dns_sec_properties.py | 94 + .../tests}/models/dns_sec_test.py | 84 +- tests/tests/models/dns_sec_tests.py | 95 + tests/tests/models/dns_server_instant_test.py | 207 ++ tests/tests/models/dns_server_properties.py | 132 ++ .../tests}/models/dns_server_test.py | 120 +- tests/tests/models/dns_server_tests.py | 95 + tests/tests/models/dns_servers_request.py | 87 + tests/tests/models/dns_trace_instant_test.py | 172 ++ tests/tests/models/dns_trace_properties.py | 97 + .../tests}/models/dns_trace_test.py | 86 +- tests/tests/models/dns_trace_tests.py | 95 + tests/tests/models/error.py | 95 + tests/tests/models/expand.py | 40 + tests/tests/models/ftp_server_instant_test.py | 206 ++ tests/tests/models/ftp_server_properties.py | 131 ++ tests/tests/models/ftp_server_request_type.py | 38 + .../tests}/models/ftp_server_test.py | 100 +- tests/tests/models/ftp_server_tests.py | 95 + .../get_agent_to_agent_tests200_response.py | 101 + .../get_agent_to_server_tests200_response.py | 101 + .../tests/models/get_bgp_tests200_response.py | 101 + .../models/get_dns_sec_tests200_response.py | 101 + .../get_dns_server_tests200_response.py | 101 + .../models/get_dns_trace_tests200_response.py | 101 + .../get_ftp_server_tests200_response.py | 101 + .../get_http_server_tests200_response.py | 101 + .../models/get_page_load_tests200_response.py | 101 + ...t_path_vis_interface_groups200_response.py | 101 + .../get_sip_server_tests200_response.py | 101 + tests/tests/models/get_tests200_response.py | 101 + .../models/get_voice_tests200_response.py | 101 + .../get_web_transactions_tests200_response.py | 101 + .../tests/models/http_server_instant_test.py | 241 +++ tests/tests/models/http_server_properties.py | 166 ++ .../tests}/models/http_server_test.py | 116 +- tests/tests/models/http_server_tests.py | 95 + tests/tests/models/instant_test.py | 151 ++ .../tests}/models/interface_group.py | 39 +- tests/tests/models/interface_groups.py | 95 + tests/tests/models/link.py | 101 + tests/tests/models/monitor.py | 102 + tests/tests/models/monitor_type.py | 37 + .../tests}/models/monitors_request.py | 33 +- tests/tests/models/page_load_instant_test.py | 247 +++ tests/tests/models/page_load_properties.py | 172 ++ .../tests}/models/page_load_test.py | 124 +- tests/tests/models/page_load_tests.py | 95 + tests/tests/models/self_links.py | 91 + tests/tests/models/self_links_links.py | 91 + tests/tests/models/severity.py | 40 + tests/tests/models/simple_agent.py | 121 ++ tests/tests/models/simple_test.py | 147 ++ tests/tests/models/sip_server_instant_test.py | 190 ++ .../models/sip_server_instant_test_request.py | 196 ++ .../sip_server_instant_test_response.py | 203 ++ tests/tests/models/sip_server_properties.py | 115 + tests/tests/models/sip_server_test.py | 236 +++ tests/tests/models/sip_server_tests.py | 95 + tests/tests/models/sip_test_protocol.py | 38 + tests/tests/models/test_auth_type.py | 40 + tests/tests/models/test_custom_headers.py | 91 + tests/tests/models/test_direction.py | 38 + tests/tests/models/test_dns_server.py | 89 + .../models/test_dns_transport_protocol.py | 37 + tests/tests/models/test_dscp_id.py | 57 + tests/tests/models/test_http_interval.py | 42 + tests/tests/models/test_interval.py | 42 + tests/tests/models/test_ipv6_policy.py | 39 + tests/tests/models/test_labels_inner.py | 91 + .../tests/models/test_monitors_properties.py | 101 + .../models/test_page_loading_strategy.py | 38 + tests/tests/models/test_path_trace_mode.py | 37 + tests/tests/models/test_probe_mode.py | 38 + tests/tests/models/test_protocol.py | 37 + .../tests}/models/test_request.py | 37 +- .../models/test_request_all_of_agents.py | 33 +- .../models/test_shared_accounts_inner.py | 89 + tests/tests/models/test_sip_credentials.py | 99 + tests/tests/models/test_ssl_version_id.py | 40 + tests/tests/models/test_sub_interval.py | 43 + tests/tests/models/test_type.py | 47 + tests/tests/models/tests.py | 95 + tests/tests/models/unauthorized_error.py | 89 + .../models/unexpanded_agent_to_agent_test.py | 172 ++ .../models/unexpanded_agent_to_server_test.py | 177 ++ tests/tests/models/unexpanded_bgp_test.py | 138 ++ tests/tests/models/unexpanded_dns_sec_test.py | 140 ++ .../models/unexpanded_dns_server_test.py | 182 ++ .../tests/models/unexpanded_dns_trace_test.py | 143 ++ .../models/unexpanded_ftp_server_test.py | 181 ++ .../models/unexpanded_http_server_test.py | 216 ++ tests/tests/models/unexpanded_instant_test.py | 127 ++ .../models/unexpanded_instant_test_links.py | 101 + .../unexpanded_instant_test_links_self.py | 101 + .../tests/models/unexpanded_page_load_test.py | 228 ++ .../models/unexpanded_sip_server_test.py | 178 ++ tests/tests/models/unexpanded_test.py | 92 + tests/tests/models/unexpanded_voice_test.py | 163 ++ .../models/unexpanded_web_transaction_test.py | 227 ++ .../models/update_agent_to_agent_test.py | 76 +- .../models/update_agent_to_server_test.py | 78 +- .../tests}/models/update_bgp_test.py | 66 +- tests/tests/models/update_bgp_test_request.py | 144 ++ .../tests}/models/update_dns_sec_test.py | 66 +- .../tests}/models/update_dns_server_test.py | 90 +- .../tests}/models/update_dns_trace_test.py | 68 +- .../tests}/models/update_ftp_server_test.py | 76 +- .../tests}/models/update_http_server_test.py | 92 +- .../tests}/models/update_page_load_test.py | 100 +- tests/tests/models/update_sip_server_test.py | 199 ++ tests/tests/models/update_sip_server_test1.py | 229 ++ tests/tests/models/update_voice_test.py | 191 ++ .../models/update_web_transaction_test.py | 100 +- tests/tests/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + tests/tests/models/voice_instant_test.py | 188 ++ tests/tests/models/voice_properties.py | 113 + tests/tests/models/voice_test.py | 221 ++ tests/tests/models/voice_tests.py | 95 + .../models/web_transaction_instant_test.py | 251 +++ .../models/web_transaction_properties.py | 174 ++ .../tests}/models/web_transaction_test.py | 124 +- tests/tests/models/web_transaction_tests.py | 95 + {usage_api/usage_api => tests/tests}/py.typed | 0 tests/tests/rest.py | 257 +++ tests_api/.github/workflows/python.yml | 38 - tests_api/.gitlab-ci.yml | 31 - tests_api/.openapi-generator/FILES | 452 ---- tests_api/.openapi-generator/VERSION | 1 - tests_api/.travis.yml | 17 - tests_api/README.md | 316 --- tests_api/docs/Agent.md | 37 - tests_api/docs/AgentBase.md | 30 - tests_api/docs/AgentToAgentApi.md | 453 ---- tests_api/docs/AgentToAgentInstantTest.md | 54 - tests_api/docs/AgentToAgentTestProtocol.md | 10 - tests_api/docs/AgentToAgentTests.md | 28 - tests_api/docs/AgentToServerApi.md | 453 ---- tests_api/docs/AgentToServerInstantTest.md | 56 - tests_api/docs/AgentToServerTests.md | 28 - tests_api/docs/AlertRoundsViolationMode.md | 11 - tests_api/docs/AlertRule.md | 38 - tests_api/docs/AlertType.md | 11 - tests_api/docs/BaseTest.md | 31 - tests_api/docs/CloudEnterpriseAgentType.md | 11 - tests_api/docs/DNSServerApi.md | 453 ---- tests_api/docs/DNSTraceApi.md | 453 ---- tests_api/docs/DnsQueryClass.md | 11 - tests_api/docs/DnsSecInstantTest.md | 43 - tests_api/docs/DnsSecTests.md | 28 - tests_api/docs/DnsServerInstantTest.md | 55 - tests_api/docs/DnsServerTests.md | 28 - tests_api/docs/DnsTraceInstantTest.md | 44 - tests_api/docs/DnsTraceTests.md | 28 - tests_api/docs/Error.md | 32 - tests_api/docs/Expand.md | 10 - tests_api/docs/FTPServerApi.md | 451 ---- tests_api/docs/FtpServerInstantTest.md | 59 - tests_api/docs/FtpServerRequestType.md | 11 - tests_api/docs/FtpServerTests.md | 28 - .../docs/GetAgentToAgentTest200Response.md | 60 - .../docs/GetAgentToAgentTests200Response.md | 29 - .../docs/GetAgentToServerTest200Response.md | 62 - .../docs/GetAgentToServerTests200Response.md | 29 - tests_api/docs/GetBgpTest200Response.md | 46 - tests_api/docs/GetBgpTests200Response.md | 29 - tests_api/docs/GetDNSServerTest200Response.md | 61 - .../docs/GetDNSServerTests200Response.md | 29 - tests_api/docs/GetDnsSecTest200Response.md | 47 - tests_api/docs/GetDnsSecTests200Response.md | 29 - tests_api/docs/GetDnsTraceTest200Response.md | 48 - tests_api/docs/GetDnsTraceTests200Response.md | 29 - tests_api/docs/GetFtpServerTest200Response.md | 65 - .../docs/GetFtpServerTests200Response.md | 29 - .../docs/GetHttpServerTest200Response.md | 78 - .../docs/GetHttpServerTests200Response.md | 29 - tests_api/docs/GetPageLoadTest200Response.md | 82 - tests_api/docs/GetPageLoadTests200Response.md | 29 - tests_api/docs/GetSipServerTest200Response.md | 62 - .../docs/GetSipServerTests200Response.md | 29 - tests_api/docs/GetVoiceTest200Response.md | 55 - tests_api/docs/GetVoiceTests200Response.md | 29 - .../docs/GetWebTransactionsTest200Response.md | 84 - .../GetWebTransactionsTests200Response.md | 29 - tests_api/docs/HTTPServerApi.md | 453 ---- tests_api/docs/HttpServerInstantTest.md | 72 - tests_api/docs/HttpServerTests.md | 28 - tests_api/docs/InstantTest.md | 40 - tests_api/docs/Link.md | 36 - tests_api/docs/MapItem.md | 29 - tests_api/docs/Monitor.md | 33 - tests_api/docs/MonitorType.md | 11 - tests_api/docs/PageLoadInstantTest.md | 74 - tests_api/docs/PageLoadTests.md | 28 - tests_api/docs/SIPServerApi.md | 451 ---- tests_api/docs/SelfLinks.md | 28 - tests_api/docs/SelfLinksLinks.md | 29 - tests_api/docs/SimpleTest.md | 42 - tests_api/docs/SipServerInstantTest.md | 57 - tests_api/docs/SipServerTests.md | 28 - tests_api/docs/SipTestProtocol.md | 11 - tests_api/docs/TestAuthType.md | 11 - tests_api/docs/TestCustomHeaders.md | 30 - tests_api/docs/TestCustomHeadersAll.md | 29 - tests_api/docs/TestCustomHeadersRoot.md | 29 - tests_api/docs/TestDirection.md | 11 - tests_api/docs/TestDnsServer.md | 29 - tests_api/docs/TestDnsTransportProtocol.md | 11 - tests_api/docs/TestDscpId.md | 11 - tests_api/docs/TestInterval.md | 11 - tests_api/docs/TestIpv6Policy.md | 11 - tests_api/docs/TestLabelsInner.md | 30 - tests_api/docs/TestPageLoadingStrategy.md | 11 - tests_api/docs/TestPathTraceMode.md | 11 - tests_api/docs/TestProbeMode.md | 11 - tests_api/docs/TestProtocol.md | 11 - tests_api/docs/TestSharedAccountsInner.md | 29 - tests_api/docs/TestSipCredentials.md | 33 - tests_api/docs/TestSslVersionId.md | 11 - tests_api/docs/TestType.md | 11 - tests_api/docs/UnauthorizedError.md | 29 - tests_api/docs/UnexpandedInstantTest.md | 38 - tests_api/docs/UnexpandedInstantTestLinks.md | 30 - .../docs/UnexpandedInstantTestLinksSelf.md | 35 - .../UnexpandedInstantTestLinksTestResults.md | 35 - tests_api/docs/UnexpandedTest.md | 30 - .../UpdatePathVisInterfaceGroup200Response.md | 33 - tests_api/docs/VoiceApi.md | 453 ---- tests_api/docs/VoiceInstantTest.md | 50 - tests_api/docs/VoiceTests.md | 28 - tests_api/docs/WebTransactionApi.md | 453 ---- tests_api/docs/WebTransactionInstantTest.md | 77 - tests_api/docs/WebTransactionTests.md | 28 - tests_api/git_push.sh | 57 - tests_api/pyproject.toml | 30 - tests_api/setup.py | 49 - tests_api/test-requirements.txt | 3 - tests_api/test/test_agent.py | 61 - tests_api/test/test_agent_base.py | 54 - tests_api/test/test_agent_to_agent_api.py | 66 - .../test/test_agent_to_agent_instant_test.py | 92 - .../test/test_agent_to_agent_test_protocol.py | 34 - tests_api/test/test_agent_to_server_api.py | 66 - .../test/test_agent_to_server_instant_test.py | 94 - .../test/test_alert_rounds_violation_mode.py | 34 - tests_api/test/test_alert_rule.py | 62 - tests_api/test/test_alert_type.py | 34 - tests_api/test/test_all_test_types_api.py | 38 - tests_api/test/test_base_test.py | 68 - tests_api/test/test_bgp_api.py | 66 - .../test/test_cloud_enterprise_agent_type.py | 34 - tests_api/test/test_dns_query_class.py | 34 - tests_api/test/test_dns_sec_instant_test.py | 81 - tests_api/test/test_dns_server_api.py | 66 - .../test/test_dns_server_instant_test.py | 102 - tests_api/test/test_dns_trace_api.py | 66 - tests_api/test/test_dns_trace_instant_test.py | 82 - tests_api/test/test_dnssec_api.py | 66 - tests_api/test/test_error.py | 56 - tests_api/test/test_expand.py | 34 - tests_api/test/test_ftp_server_api.py | 66 - .../test/test_ftp_server_instant_test.py | 100 - .../test/test_ftp_server_request_type.py | 34 - ...est_get_agent_to_agent_test200_response.py | 127 -- ...st_get_agent_to_server_test200_response.py | 129 -- .../test/test_get_bgp_test200_response.py | 107 - .../test/test_get_dns_sec_test200_response.py | 106 - .../test_get_dns_server_test200_response.py | 137 -- .../test_get_dns_trace_test200_response.py | 107 - .../test_get_ftp_server_test200_response.py | 135 -- .../test_get_http_server_test200_response.py | 151 -- .../test_get_page_load_test200_response.py | 156 -- .../test_get_sip_server_test200_response.py | 134 -- .../test/test_get_voice_test200_response.py | 114 - ...t_get_web_transactions_test200_response.py | 158 -- tests_api/test/test_http_server_api.py | 66 - .../test/test_http_server_instant_test.py | 116 -- tests_api/test/test_instant_test.py | 72 - tests_api/test/test_link.py | 60 - tests_api/test/test_map_item.py | 53 - tests_api/test/test_monitor.py | 57 - tests_api/test/test_monitor_type.py | 34 - tests_api/test/test_page_load_api.py | 66 - tests_api/test/test_page_load_instant_test.py | 118 -- ...path_visualization_interface_groups_api.py | 59 - tests_api/test/test_self_links.py | 61 - tests_api/test/test_self_links_links.py | 60 - tests_api/test/test_simple_test.py | 67 - tests_api/test/test_sip_server_api.py | 66 - .../test/test_sip_server_instant_test.py | 108 - tests_api/test/test_sip_server_test.py | 127 -- tests_api/test/test_sip_test_protocol.py | 34 - tests_api/test/test_test_auth_type.py | 34 - tests_api/test/test_test_custom_headers.py | 58 - .../test/test_test_custom_headers_all.py | 53 - .../test/test_test_custom_headers_root.py | 53 - tests_api/test/test_test_direction.py | 34 - tests_api/test/test_test_dns_server.py | 53 - .../test/test_test_dns_transport_protocol.py | 34 - tests_api/test/test_test_dscp_id.py | 34 - tests_api/test/test_test_http_interval.py | 34 - tests_api/test/test_test_interval.py | 34 - tests_api/test/test_test_ipv6_policy.py | 34 - tests_api/test/test_test_labels_inner.py | 54 - .../test/test_test_page_loading_strategy.py | 34 - tests_api/test/test_test_path_trace_mode.py | 34 - tests_api/test/test_test_probe_mode.py | 34 - tests_api/test/test_test_protocol.py | 34 - .../test/test_test_shared_accounts_inner.py | 53 - tests_api/test/test_test_sip_credentials.py | 58 - tests_api/test/test_test_ssl_version_id.py | 34 - tests_api/test/test_test_sub_interval.py | 34 - tests_api/test/test_test_type.py | 34 - tests_api/test/test_unauthorized_error.py | 53 - .../test/test_unexpanded_instant_test.py | 64 - .../test_unexpanded_instant_test_links.py | 53 - ...test_unexpanded_instant_test_links_self.py | 60 - ...xpanded_instant_test_links_test_results.py | 60 - tests_api/test/test_unexpanded_test.py | 54 - tests_api/test/test_update_dns_server_test.py | 103 - ...te_path_vis_interface_group200_response.py | 66 - tests_api/test/test_update_sip_server_test.py | 108 - tests_api/test/test_update_voice_test.py | 88 - tests_api/test/test_voice_api.py | 66 - tests_api/test/test_voice_instant_test.py | 88 - tests_api/test/test_voice_test.py | 107 - tests_api/test/test_web_transaction_api.py | 66 - .../test/test_web_transaction_instant_test.py | 122 -- tests_api/tests_api/__init__.py | 175 -- tests_api/tests_api/api/__init__.py | 18 - tests_api/tests_api/api/agent_to_agent_api.py | 1620 -------------- .../tests_api/api/agent_to_server_api.py | 1620 -------------- tests_api/tests_api/api/dns_server_api.py | 1620 -------------- tests_api/tests_api/api/dns_trace_api.py | 1620 -------------- tests_api/tests_api/api/ftp_server_api.py | 1620 -------------- tests_api/tests_api/api/http_server_api.py | 1620 -------------- tests_api/tests_api/api/sip_server_api.py | 1620 -------------- tests_api/tests_api/api/voice_api.py | 1620 -------------- .../tests_api/api/web_transaction_api.py | 1620 -------------- tests_api/tests_api/api_client.py | 741 ------- tests_api/tests_api/api_response.py | 21 - tests_api/tests_api/configuration.py | 434 ---- tests_api/tests_api/exceptions.py | 166 -- tests_api/tests_api/models/__init__.py | 145 -- tests_api/tests_api/models/agent.py | 121 -- tests_api/tests_api/models/agent_base.py | 98 - .../models/agent_to_agent_instant_test.py | 197 -- .../models/agent_to_agent_test_protocol.py | 45 - .../tests_api/models/agent_to_agent_tests.py | 95 - .../models/agent_to_server_instant_test.py | 202 -- .../tests_api/models/agent_to_server_tests.py | 95 - .../models/alert_rounds_violation_mode.py | 45 - tests_api/tests_api/models/alert_rule.py | 127 -- tests_api/tests_api/models/alert_type.py | 68 - tests_api/tests_api/models/base_test.py | 103 - tests_api/tests_api/models/bgp_tests.py | 95 - .../models/cloud_enterprise_agent_type.py | 46 - tests_api/tests_api/models/dns_query_class.py | 45 - .../tests_api/models/dns_sec_instant_test.py | 169 -- tests_api/tests_api/models/dns_sec_tests.py | 95 - .../models/dns_server_instant_test.py | 207 -- .../tests_api/models/dns_server_tests.py | 95 - .../models/dns_trace_instant_test.py | 172 -- tests_api/tests_api/models/dns_trace_tests.py | 95 - tests_api/tests_api/models/error.py | 96 - tests_api/tests_api/models/expand.py | 48 - .../models/ftp_server_instant_test.py | 206 -- .../models/ftp_server_request_type.py | 46 - .../tests_api/models/ftp_server_tests.py | 95 - .../get_agent_to_agent_test200_response.py | 228 -- .../get_agent_to_agent_tests200_response.py | 102 - .../get_agent_to_server_test200_response.py | 233 --- .../get_agent_to_server_tests200_response.py | 102 - .../models/get_bgp_test200_response.py | 182 -- .../models/get_bgp_tests200_response.py | 102 - .../models/get_dns_sec_test200_response.py | 186 -- .../models/get_dns_sec_tests200_response.py | 102 - .../models/get_dns_server_test200_response.py | 238 --- .../get_dns_server_tests200_response.py | 102 - .../models/get_dns_trace_test200_response.py | 189 -- .../models/get_dns_trace_tests200_response.py | 102 - .../models/get_ftp_server_test200_response.py | 237 --- .../get_ftp_server_tests200_response.py | 102 - .../get_http_server_test200_response.py | 270 --- .../get_http_server_tests200_response.py | 102 - .../models/get_page_load_test200_response.py | 280 --- .../models/get_page_load_tests200_response.py | 102 - ...t_path_vis_interface_groups200_response.py | 102 - .../models/get_sip_server_test200_response.py | 223 -- .../get_sip_server_tests200_response.py | 102 - .../tests_api/models/get_tests200_response.py | 102 - .../models/get_voice_test200_response.py | 207 -- .../models/get_voice_tests200_response.py | 102 - .../get_web_transactions_test200_response.py | 283 --- .../get_web_transactions_tests200_response.py | 102 - .../models/http_server_instant_test.py | 239 --- .../tests_api/models/http_server_tests.py | 95 - tests_api/tests_api/models/instant_test.py | 151 -- .../tests_api/models/interface_groups.py | 96 - tests_api/tests_api/models/link.py | 102 - tests_api/tests_api/models/map_item.py | 89 - tests_api/tests_api/models/monitor.py | 103 - tests_api/tests_api/models/monitor_type.py | 45 - .../models/page_load_instant_test.py | 243 --- tests_api/tests_api/models/page_load_tests.py | 95 - tests_api/tests_api/models/self_links.py | 92 - .../tests_api/models/self_links_links.py | 92 - tests_api/tests_api/models/simple_test.py | 134 -- .../models/sip_server_instant_test.py | 204 -- tests_api/tests_api/models/sip_server_test.py | 223 -- .../tests_api/models/sip_server_tests.py | 95 - .../tests_api/models/sip_test_protocol.py | 46 - tests_api/tests_api/models/test_auth_type.py | 47 - .../tests_api/models/test_custom_headers.py | 113 - .../models/test_custom_headers_all.py | 89 - .../models/test_custom_headers_root.py | 89 - tests_api/tests_api/models/test_direction.py | 46 - tests_api/tests_api/models/test_dns_server.py | 90 - .../models/test_dns_transport_protocol.py | 45 - tests_api/tests_api/models/test_dscp_id.py | 65 - .../tests_api/models/test_http_interval.py | 50 - tests_api/tests_api/models/test_interval.py | 50 - .../tests_api/models/test_ipv6_policy.py | 47 - .../tests_api/models/test_labels_inner.py | 92 - .../models/test_page_loading_strategy.py | 46 - .../tests_api/models/test_path_trace_mode.py | 45 - tests_api/tests_api/models/test_probe_mode.py | 46 - tests_api/tests_api/models/test_protocol.py | 45 - .../models/test_shared_accounts_inner.py | 90 - .../tests_api/models/test_sip_credentials.py | 100 - .../tests_api/models/test_ssl_version_id.py | 48 - .../tests_api/models/test_sub_interval.py | 51 - tests_api/tests_api/models/test_type.py | 55 - tests_api/tests_api/models/tests.py | 95 - .../tests_api/models/unauthorized_error.py | 89 - .../models/unexpanded_instant_test.py | 127 -- .../models/unexpanded_instant_test_links.py | 98 - .../unexpanded_instant_test_links_self.py | 102 - ...xpanded_instant_test_links_test_results.py | 149 -- tests_api/tests_api/models/unexpanded_test.py | 93 - ...te_path_vis_interface_group200_response.py | 108 - .../models/update_sip_server_test.py | 193 -- .../tests_api/models/update_voice_test.py | 177 -- .../tests_api/models/voice_instant_test.py | 188 -- tests_api/tests_api/models/voice_test.py | 207 -- tests_api/tests_api/models/voice_tests.py | 95 - .../models/web_transaction_instant_test.py | 249 --- .../tests_api/models/web_transaction_tests.py | 95 - tests_api/tests_api/rest.py | 231 -- tests_api/tox.ini | 9 - usage/.gitignore | 66 + usage/.openapi-generator-ignore | 23 + usage/.openapi-generator/FILES | 142 ++ usage/.openapi-generator/VERSION | 1 + usage/README.md | 180 ++ usage/docs/AccountGroup.md | 30 + usage/docs/AccountGroupId.md | 29 + .../docs/AccountGroupQuota.md | 7 +- .../docs/EndpointAgentsEmbeddedInner.md | 7 +- .../docs/EndpointAgentsEssentialsInner.md | 7 +- .../docs/EndpointAgentsInner.md | 7 +- ...rpriseAgentUnitsByTestOwnerAccountGroup.md | 29 + ...sByTestOwnerAccountGroupBreakdownsInner.md | 35 + .../docs/EnterpriseAgentUnitsInner.md | 7 +- .../docs/EnterpriseAgentsInner.md | 7 +- usage/docs/Error.md | 33 + usage/docs/Expand.md | 11 + ...etEnterpriseAgentsUnitsUsage200Response.md | 30 + .../docs/GetQuotas200Response.md | 7 +- usage/docs/GetTestUnitsUsage200Response.md | 30 + .../docs/GetUsage200Response.md | 7 +- usage/docs/Link.md | 37 + .../docs/OrganizationQuota.md | 7 +- .../docs/OrganizationsQuotasAssign.md | 7 +- ...nizationsQuotasAssignOrganizationsInner.md | 7 +- .../docs/OrganizationsQuotasUnassign.md | 7 +- ...zationsQuotasUnassignOrganizationsInner.md | 30 + usage/docs/PaginationLinks.md | 30 + usage/docs/PaginationLinksLinks.md | 31 + {usage_api => usage}/docs/Quotas.md | 7 +- usage/docs/QuotasApi.md | 426 ++++ .../docs/QuotasAssignRequest.md | 7 +- .../docs/QuotasAssignResponse.md | 7 +- .../docs/QuotasQuotasInner.md | 7 +- {usage_api => usage}/docs/QuotasUnassign.md | 7 +- usage/docs/SelfLinks.md | 29 + usage/docs/SelfLinksLinks.md | 30 + {usage_api => usage}/docs/TestsInner.md | 11 +- usage/docs/UnauthorizedError.md | 30 + usage/docs/UnitsByTests.md | 29 + usage/docs/UnitsByTestsBreakdownsInner.md | 38 + {usage_api => usage}/docs/Usage.md | 7 +- usage/docs/UsageApi.md | 276 +++ {usage_api => usage}/docs/UsageUsage.md | 7 +- {usage_api => usage}/docs/UsageUsageQuota.md | 7 +- usage/docs/ValidationError.md | 34 + usage/docs/ValidationErrorAllOfErrors.md | 31 + usage/pyproject.toml | 71 + usage/requirements.txt | 5 + usage/setup.cfg | 2 + usage/setup.py | 49 + usage/test-requirements.txt | 5 + usage/test/__init__.py | 0 usage/test/test_account_group.py | 52 + usage/test/test_account_group_id.py | 51 + usage/test/test_account_group_quota.py | 52 + .../test_endpoint_agents_embedded_inner.py | 53 + .../test_endpoint_agents_essentials_inner.py | 53 + usage/test/test_endpoint_agents_inner.py | 53 + ...agent_units_by_test_owner_account_group.py | 53 + ...st_owner_account_group_breakdowns_inner.py | 57 + .../test/test_enterprise_agent_units_inner.py | 57 + usage/test/test_enterprise_agents_inner.py | 53 + usage/test/test_error.py | 55 + usage/test/test_expand.py | 33 + ...terprise_agents_units_usage200_response.py | 73 + usage/test/test_get_quotas200_response.py | 67 + .../test_get_test_units_usage200_response.py | 73 + usage/test/test_get_usage200_response.py | 85 + usage/test/test_link.py | 59 + usage/test/test_organization_quota.py | 53 + .../test/test_organizations_quotas_assign.py | 59 + ...tions_quotas_assign_organizations_inner.py | 56 + .../test_organizations_quotas_unassign.py | 55 + ...ons_quotas_unassign_organizations_inner.py | 52 + usage/test/test_pagination_links.py | 70 + usage/test/test_pagination_links_links.py | 77 + usage/test/test_quotas.py | 57 + usage/test/test_quotas_assign_request.py | 51 + usage/test/test_quotas_assign_response.py | 51 + usage/test/test_quotas_quotas_inner.py | 54 + usage/test/test_quotas_unassign.py | 51 + usage/test/test_self_links.py | 60 + usage/test/test_self_links_links.py | 59 + usage/test/test_tests_inner.py | 57 + usage/test/test_unauthorized_error.py | 52 + usage/test/test_units_by_tests.py | 53 + .../test_units_by_tests_breakdowns_inner.py | 60 + usage/test/test_usage.py | 75 + usage/test/test_usage_usage.py | 74 + usage/test/test_usage_usage_quota.py | 57 + usage/test/test_validation_error.py | 61 + .../test_validation_error_all_of_errors.py | 53 + usage/usage/__init__.py | 74 + usage/usage/api/__init__.py | 6 + .../usage}/api/quotas_api.py | 248 +-- usage/usage/api/usage_api.py | 1019 +++++++++ usage/usage/api_client.py | 770 +++++++ usage/usage/api_response.py | 21 + usage/usage/configuration.py | 444 ++++ usage/usage/exceptions.py | 199 ++ usage/usage/models/__init__.py | 56 + usage/usage/models/account_group.py | 89 + usage/usage/models/account_group_id.py | 87 + usage/usage/models/account_group_quota.py | 89 + .../models/endpoint_agents_embedded_inner.py | 101 + .../endpoint_agents_essentials_inner.py | 101 + usage/usage/models/endpoint_agents_inner.py | 101 + ...agent_units_by_test_owner_account_group.py | 95 + ...st_owner_account_group_breakdowns_inner.py | 99 + .../models/enterprise_agent_units_inner.py | 109 + usage/usage/models/enterprise_agents_inner.py | 101 + usage/usage/models/error.py | 95 + usage/usage/models/expand.py | 41 + ...terprise_agents_units_usage200_response.py | 101 + usage/usage/models/get_quotas200_response.py | 101 + .../get_test_units_usage200_response.py | 101 + usage/usage/models/get_usage200_response.py | 97 + usage/usage/models/link.py | 101 + usage/usage/models/organization_quota.py | 89 + .../models/organizations_quotas_assign.py | 95 + ...tions_quotas_assign_organizations_inner.py | 97 + .../models/organizations_quotas_unassign.py | 95 + ...ons_quotas_unassign_organizations_inner.py | 89 + usage/usage/models/pagination_links.py | 91 + usage/usage/models/pagination_links_links.py | 101 + usage/usage/models/quotas.py | 95 + usage/usage/models/quotas_assign_request.py | 95 + usage/usage/models/quotas_assign_response.py | 95 + usage/usage/models/quotas_quotas_inner.py | 101 + usage/usage/models/quotas_unassign.py | 87 + usage/usage/models/self_links.py | 91 + usage/usage/models/self_links_links.py | 91 + usage/usage/models/tests_inner.py | 99 + usage/usage/models/unauthorized_error.py | 89 + usage/usage/models/units_by_tests.py | 95 + .../models/units_by_tests_breakdowns_inner.py | 105 + usage/usage/models/usage.py | 91 + .../usage}/models/usage_usage.py | 61 +- usage/usage/models/usage_usage_quota.py | 100 + usage/usage/models/validation_error.py | 110 + .../models/validation_error_all_of_errors.py | 91 + usage/usage/py.typed | 0 usage/usage/rest.py | 257 +++ usage_api/.github/workflows/python.yml | 38 - usage_api/.gitlab-ci.yml | 31 - usage_api/.openapi-generator/FILES | 119 -- usage_api/.openapi-generator/VERSION | 1 - usage_api/.travis.yml | 17 - usage_api/README.md | 167 -- usage_api/docs/AccountGroup.md | 29 - usage_api/docs/AccountGroupId.md | 28 - usage_api/docs/Error.md | 32 - usage_api/docs/Expand.md | 10 - usage_api/docs/Link.md | 36 - ...zationsQuotasUnassignOrganizationsInner.md | 29 - usage_api/docs/QuotasApi.md | 429 ---- usage_api/docs/SelfLinks.md | 28 - usage_api/docs/SelfLinksLinks.md | 29 - usage_api/docs/UnauthorizedError.md | 29 - usage_api/docs/UsageApi.md | 95 - usage_api/git_push.sh | 57 - usage_api/pyproject.toml | 30 - usage_api/setup.py | 49 - usage_api/test-requirements.txt | 3 - usage_api/test/test_account_group.py | 53 - usage_api/test/test_account_group_id.py | 52 - usage_api/test/test_account_group_quota.py | 53 - .../test_endpoint_agents_embedded_inner.py | 54 - .../test_endpoint_agents_essentials_inner.py | 54 - usage_api/test/test_endpoint_agents_inner.py | 54 - .../test/test_enterprise_agent_units_inner.py | 58 - .../test/test_enterprise_agents_inner.py | 54 - usage_api/test/test_error.py | 56 - usage_api/test/test_expand.py | 34 - usage_api/test/test_get_quotas200_response.py | 68 - usage_api/test/test_get_usage200_response.py | 88 - usage_api/test/test_link.py | 60 - usage_api/test/test_organization_quota.py | 54 - .../test/test_organizations_quotas_assign.py | 60 - ...tions_quotas_assign_organizations_inner.py | 57 - .../test_organizations_quotas_unassign.py | 56 - ...ons_quotas_unassign_organizations_inner.py | 53 - usage_api/test/test_quotas.py | 58 - usage_api/test/test_quotas_api.py | 66 - usage_api/test/test_quotas_assign_request.py | 52 - usage_api/test/test_quotas_assign_response.py | 52 - usage_api/test/test_quotas_quotas_inner.py | 55 - usage_api/test/test_quotas_unassign.py | 52 - usage_api/test/test_self_links.py | 61 - usage_api/test/test_self_links_links.py | 60 - usage_api/test/test_tests_inner.py | 58 - usage_api/test/test_unauthorized_error.py | 53 - usage_api/test/test_usage.py | 78 - usage_api/test/test_usage_api.py | 38 - usage_api/test/test_usage_usage.py | 77 - usage_api/test/test_usage_usage_quota.py | 58 - usage_api/tox.ini | 9 - usage_api/usage_api/__init__.py | 64 - usage_api/usage_api/api/__init__.py | 6 - usage_api/usage_api/api/usage_api.py | 351 ---- usage_api/usage_api/api_client.py | 741 ------- usage_api/usage_api/api_response.py | 21 - usage_api/usage_api/configuration.py | 434 ---- usage_api/usage_api/exceptions.py | 166 -- usage_api/usage_api/models/__init__.py | 46 - usage_api/usage_api/models/account_group.py | 90 - .../usage_api/models/account_group_id.py | 88 - .../usage_api/models/account_group_quota.py | 90 - .../models/endpoint_agents_embedded_inner.py | 102 - .../endpoint_agents_essentials_inner.py | 102 - .../usage_api/models/endpoint_agents_inner.py | 102 - .../models/enterprise_agent_units_inner.py | 110 - .../models/enterprise_agents_inner.py | 102 - usage_api/usage_api/models/error.py | 96 - usage_api/usage_api/models/expand.py | 49 - .../models/get_quotas200_response.py | 102 - .../usage_api/models/get_usage200_response.py | 98 - usage_api/usage_api/models/link.py | 102 - .../usage_api/models/organization_quota.py | 90 - .../models/organizations_quotas_assign.py | 95 - ...tions_quotas_assign_organizations_inner.py | 98 - .../models/organizations_quotas_unassign.py | 95 - ...ons_quotas_unassign_organizations_inner.py | 90 - usage_api/usage_api/models/quotas.py | 95 - .../usage_api/models/quotas_assign_request.py | 95 - .../models/quotas_assign_response.py | 95 - .../usage_api/models/quotas_quotas_inner.py | 102 - usage_api/usage_api/models/quotas_unassign.py | 87 - usage_api/usage_api/models/self_links.py | 92 - .../usage_api/models/self_links_links.py | 92 - usage_api/usage_api/models/tests_inner.py | 110 - .../usage_api/models/unauthorized_error.py | 89 - usage_api/usage_api/models/usage.py | 91 - .../usage_api/models/usage_usage_quota.py | 100 - usage_api/usage_api/rest.py | 231 -- 6281 files changed, 250697 insertions(+), 227263 deletions(-) rename {admin_api => admin}/.gitignore (100%) rename {admin_api => admin}/.openapi-generator-ignore (100%) create mode 100644 admin/.openapi-generator/FILES create mode 100644 admin/.openapi-generator/VERSION create mode 100644 admin/README.md create mode 100644 admin/admin/__init__.py create mode 100644 admin/admin/api/__init__.py rename {admin_api/admin_api => admin/admin}/api/account_groups_api.py (95%) rename {admin_api/admin_api => admin/admin}/api/permissions_api.py (89%) rename {admin_api/admin_api => admin/admin}/api/roles_api.py (95%) rename {admin_api/admin_api => admin/admin}/api/user_events_api.py (82%) rename {admin_api/admin_api => admin/admin}/api/users_api.py (93%) create mode 100644 admin/admin/api_client.py create mode 100644 admin/admin/api_response.py create mode 100644 admin/admin/configuration.py create mode 100644 admin/admin/exceptions.py create mode 100644 admin/admin/models/__init__.py create mode 100644 admin/admin/models/account_group.py create mode 100644 admin/admin/models/account_group1.py create mode 100644 admin/admin/models/account_group_detail.py create mode 100644 admin/admin/models/account_group_id.py create mode 100644 admin/admin/models/account_group_request_body.py create mode 100644 admin/admin/models/account_group_roles.py create mode 100644 admin/admin/models/account_group_roles_account_group_roles_inner.py create mode 100644 admin/admin/models/account_group_roles_request_body_inner.py create mode 100644 admin/admin/models/account_groups.py create mode 100644 admin/admin/models/agent.py create mode 100644 admin/admin/models/agent_base.py create mode 100644 admin/admin/models/all_account_group_roles.py create mode 100644 admin/admin/models/base_role.py create mode 100644 admin/admin/models/cloud_enterprise_agent_type.py create mode 100644 admin/admin/models/cluster_member.py create mode 100644 admin/admin/models/create_account_group201_response.py create mode 100644 admin/admin/models/create_role201_response.py create mode 100644 admin/admin/models/create_user201_response.py create mode 100644 admin/admin/models/created_user.py create mode 100644 admin/admin/models/enterprise_agent.py create mode 100644 admin/admin/models/enterprise_agent_data.py create mode 100644 admin/admin/models/enterprise_agent_ipv6_policy.py create mode 100644 admin/admin/models/enterprise_agent_state.py create mode 100644 admin/admin/models/enterprise_agents.py create mode 100644 admin/admin/models/error.py create mode 100644 admin/admin/models/error_detail.py create mode 100644 admin/admin/models/error_detail_code.py create mode 100644 admin/admin/models/expand.py create mode 100644 admin/admin/models/extended_user.py create mode 100644 admin/admin/models/get_account_group200_response.py create mode 100644 admin/admin/models/get_account_groups200_response.py create mode 100644 admin/admin/models/get_permissions200_response.py create mode 100644 admin/admin/models/get_roles200_response.py create mode 100644 admin/admin/models/get_user200_response.py create mode 100644 admin/admin/models/get_user_events200_response.py create mode 100644 admin/admin/models/get_users200_response.py create mode 100644 admin/admin/models/interface_ip_mapping.py create mode 100644 admin/admin/models/link.py create mode 100644 admin/admin/models/login_account_group.py create mode 100644 admin/admin/models/new_account_group_response.py create mode 100644 admin/admin/models/pagination_links.py create mode 100644 admin/admin/models/pagination_links_links.py create mode 100644 admin/admin/models/permission.py create mode 100644 admin/admin/models/permissions.py create mode 100644 admin/admin/models/query_window.py create mode 100644 admin/admin/models/role.py create mode 100644 admin/admin/models/role_detail.py create mode 100644 admin/admin/models/role_request_body.py create mode 100644 admin/admin/models/roles.py create mode 100644 admin/admin/models/self_links.py create mode 100644 admin/admin/models/self_links_links.py create mode 100644 admin/admin/models/simple_agent.py create mode 100644 admin/admin/models/unauthorized_error.py create mode 100644 admin/admin/models/user.py create mode 100644 admin/admin/models/user_account_group.py create mode 100644 admin/admin/models/user_account_groups.py create mode 100644 admin/admin/models/user_detail.py create mode 100644 admin/admin/models/user_event.py create mode 100644 admin/admin/models/user_event_all_of_resources_inner.py create mode 100644 admin/admin/models/user_events.py create mode 100644 admin/admin/models/user_request_body.py create mode 100644 admin/admin/models/users.py create mode 100644 admin/admin/models/validation_error.py create mode 100644 admin/admin/models/validation_error_all_of_errors.py rename {admin_api/admin_api => admin/admin}/py.typed (100%) create mode 100644 admin/admin/rest.py create mode 100644 admin/docs/AccountGroup.md rename {admin_api => admin}/docs/AccountGroup1.md (85%) rename {admin_api => admin}/docs/AccountGroupDetail.md (88%) create mode 100644 admin/docs/AccountGroupId.md rename {admin_api => admin}/docs/AccountGroupRequestBody.md (81%) rename {admin_api => admin}/docs/AccountGroupRoles.md (81%) create mode 100644 admin/docs/AccountGroupRolesAccountGroupRolesInner.md rename {admin_api => admin}/docs/AccountGroupRolesRequestBodyInner.md (76%) rename {admin_api => admin}/docs/AccountGroups.md (82%) rename {admin_api => admin}/docs/AccountGroupsApi.md (80%) create mode 100644 admin/docs/Agent.md create mode 100644 admin/docs/AgentBase.md rename {admin_api => admin}/docs/AllAccountGroupRoles.md (79%) rename {admin_api => admin}/docs/BaseRole.md (87%) create mode 100644 admin/docs/CloudEnterpriseAgentType.md create mode 100644 admin/docs/ClusterMember.md rename {admin_api => admin}/docs/CreateAccountGroup201Response.md (85%) rename {admin_api => admin}/docs/CreateRole201Response.md (84%) rename {admin_api => admin}/docs/CreateUser201Response.md (86%) rename {admin_api => admin}/docs/CreatedUser.md (89%) create mode 100644 admin/docs/EnterpriseAgent.md create mode 100644 admin/docs/EnterpriseAgentData.md create mode 100644 admin/docs/EnterpriseAgentIpv6Policy.md create mode 100644 admin/docs/EnterpriseAgentState.md rename {admin_api => admin}/docs/EnterpriseAgents.md (81%) create mode 100644 admin/docs/Error.md create mode 100644 admin/docs/ErrorDetail.md create mode 100644 admin/docs/ErrorDetailCode.md create mode 100644 admin/docs/Expand.md rename {admin_api => admin}/docs/ExtendedUser.md (88%) rename {admin_api => admin}/docs/GetAccountGroup200Response.md (86%) rename {admin_api => admin}/docs/GetAccountGroups200Response.md (78%) rename {admin_api => admin}/docs/GetPermissions200Response.md (79%) rename {admin_api => admin}/docs/GetRoles200Response.md (80%) rename {admin_api => admin}/docs/GetUser200Response.md (88%) rename {admin_api => admin}/docs/GetUserEvents200Response.md (81%) rename {admin_api => admin}/docs/GetUsers200Response.md (81%) create mode 100644 admin/docs/InterfaceIpMapping.md create mode 100644 admin/docs/Link.md rename {admin_api => admin}/docs/LoginAccountGroup.md (80%) rename {admin_api => admin}/docs/NewAccountGroupResponse.md (86%) create mode 100644 admin/docs/PaginationLinks.md create mode 100644 admin/docs/PaginationLinksLinks.md rename {admin_api => admin}/docs/Permission.md (87%) rename {admin_api => admin}/docs/Permissions.md (83%) rename {admin_api => admin}/docs/PermissionsApi.md (87%) create mode 100644 admin/docs/QueryWindow.md rename {admin_api => admin}/docs/Role.md (90%) rename {admin_api => admin}/docs/RoleDetail.md (87%) rename {admin_api => admin}/docs/RoleRequestBody.md (83%) rename {admin_api => admin}/docs/Roles.md (85%) rename {admin_api => admin}/docs/RolesApi.md (86%) create mode 100644 admin/docs/SelfLinks.md create mode 100644 admin/docs/SelfLinksLinks.md create mode 100644 admin/docs/SimpleAgent.md create mode 100644 admin/docs/UnauthorizedError.md rename {admin_api => admin}/docs/User.md (90%) rename {admin_api => admin}/docs/UserAccountGroup.md (86%) rename {admin_api => admin}/docs/UserAccountGroups.md (80%) rename {admin_api => admin}/docs/UserDetail.md (90%) rename {admin_api => admin}/docs/UserEvent.md (90%) rename {admin_api => admin}/docs/UserEventAllOfResourcesInner.md (79%) rename {admin_api => admin}/docs/UserEvents.md (83%) rename {admin_api => admin}/docs/UserEventsApi.md (75%) rename {admin_api => admin}/docs/UserRequestBody.md (86%) rename {admin_api => admin}/docs/Users.md (86%) rename {admin_api => admin}/docs/UsersApi.md (85%) create mode 100644 admin/docs/ValidationError.md create mode 100644 admin/docs/ValidationErrorAllOfErrors.md create mode 100644 admin/pyproject.toml rename {admin_api => admin}/requirements.txt (100%) rename {admin_api => admin}/setup.cfg (100%) create mode 100644 admin/setup.py create mode 100644 admin/test-requirements.txt rename {admin_api => admin}/test/__init__.py (100%) create mode 100644 admin/test/test_account_group.py create mode 100644 admin/test/test_account_group1.py create mode 100644 admin/test/test_account_group_detail.py create mode 100644 admin/test/test_account_group_id.py create mode 100644 admin/test/test_account_group_request_body.py create mode 100644 admin/test/test_account_group_roles.py create mode 100644 admin/test/test_account_group_roles_account_group_roles_inner.py create mode 100644 admin/test/test_account_group_roles_request_body_inner.py create mode 100644 admin/test/test_account_groups.py create mode 100644 admin/test/test_agent.py create mode 100644 admin/test/test_agent_base.py create mode 100644 admin/test/test_all_account_group_roles.py create mode 100644 admin/test/test_base_role.py create mode 100644 admin/test/test_cloud_enterprise_agent_type.py create mode 100644 admin/test/test_cluster_member.py create mode 100644 admin/test/test_create_account_group201_response.py create mode 100644 admin/test/test_create_role201_response.py create mode 100644 admin/test/test_create_user201_response.py create mode 100644 admin/test/test_created_user.py create mode 100644 admin/test/test_enterprise_agent.py create mode 100644 admin/test/test_enterprise_agent_data.py create mode 100644 admin/test/test_enterprise_agent_ipv6_policy.py create mode 100644 admin/test/test_enterprise_agent_state.py create mode 100644 admin/test/test_enterprise_agents.py create mode 100644 admin/test/test_error.py create mode 100644 admin/test/test_error_detail.py create mode 100644 admin/test/test_error_detail_code.py create mode 100644 admin/test/test_expand.py create mode 100644 admin/test/test_extended_user.py create mode 100644 admin/test/test_get_account_group200_response.py create mode 100644 admin/test/test_get_account_groups200_response.py create mode 100644 admin/test/test_get_permissions200_response.py create mode 100644 admin/test/test_get_roles200_response.py create mode 100644 admin/test/test_get_user200_response.py create mode 100644 admin/test/test_get_user_events200_response.py create mode 100644 admin/test/test_get_users200_response.py create mode 100644 admin/test/test_interface_ip_mapping.py create mode 100644 admin/test/test_link.py create mode 100644 admin/test/test_login_account_group.py create mode 100644 admin/test/test_new_account_group_response.py create mode 100644 admin/test/test_pagination_links.py create mode 100644 admin/test/test_pagination_links_links.py create mode 100644 admin/test/test_permission.py create mode 100644 admin/test/test_permissions.py create mode 100644 admin/test/test_query_window.py create mode 100644 admin/test/test_role.py create mode 100644 admin/test/test_role_detail.py create mode 100644 admin/test/test_role_request_body.py create mode 100644 admin/test/test_roles.py create mode 100644 admin/test/test_self_links.py create mode 100644 admin/test/test_self_links_links.py create mode 100644 admin/test/test_simple_agent.py create mode 100644 admin/test/test_unauthorized_error.py create mode 100644 admin/test/test_user.py create mode 100644 admin/test/test_user_account_group.py create mode 100644 admin/test/test_user_account_groups.py create mode 100644 admin/test/test_user_detail.py create mode 100644 admin/test/test_user_event.py create mode 100644 admin/test/test_user_event_all_of_resources_inner.py create mode 100644 admin/test/test_user_events.py create mode 100644 admin/test/test_user_request_body.py create mode 100644 admin/test/test_users.py create mode 100644 admin/test/test_validation_error.py create mode 100644 admin/test/test_validation_error_all_of_errors.py delete mode 100644 admin_api/.github/workflows/python.yml delete mode 100644 admin_api/.gitlab-ci.yml delete mode 100644 admin_api/.openapi-generator/FILES delete mode 100644 admin_api/.openapi-generator/VERSION delete mode 100644 admin_api/.travis.yml delete mode 100644 admin_api/README.md delete mode 100644 admin_api/admin_api/__init__.py delete mode 100644 admin_api/admin_api/api/__init__.py delete mode 100644 admin_api/admin_api/api_client.py delete mode 100644 admin_api/admin_api/api_response.py delete mode 100644 admin_api/admin_api/configuration.py delete mode 100644 admin_api/admin_api/exceptions.py delete mode 100644 admin_api/admin_api/models/__init__.py delete mode 100644 admin_api/admin_api/models/account_group.py delete mode 100644 admin_api/admin_api/models/account_group1.py delete mode 100644 admin_api/admin_api/models/account_group_detail.py delete mode 100644 admin_api/admin_api/models/account_group_id.py delete mode 100644 admin_api/admin_api/models/account_group_request_body.py delete mode 100644 admin_api/admin_api/models/account_group_roles.py delete mode 100644 admin_api/admin_api/models/account_group_roles_account_group_roles_inner.py delete mode 100644 admin_api/admin_api/models/account_group_roles_request_body_inner.py delete mode 100644 admin_api/admin_api/models/account_groups.py delete mode 100644 admin_api/admin_api/models/agent.py delete mode 100644 admin_api/admin_api/models/agent_base.py delete mode 100644 admin_api/admin_api/models/all_account_group_roles.py delete mode 100644 admin_api/admin_api/models/base_role.py delete mode 100644 admin_api/admin_api/models/cloud_enterprise_agent_type.py delete mode 100644 admin_api/admin_api/models/cluster_member.py delete mode 100644 admin_api/admin_api/models/create_account_group201_response.py delete mode 100644 admin_api/admin_api/models/create_role201_response.py delete mode 100644 admin_api/admin_api/models/create_user201_response.py delete mode 100644 admin_api/admin_api/models/created_user.py delete mode 100644 admin_api/admin_api/models/enterprise_agent.py delete mode 100644 admin_api/admin_api/models/enterprise_agent_ipv6_policy.py delete mode 100644 admin_api/admin_api/models/enterprise_agent_state.py delete mode 100644 admin_api/admin_api/models/enterprise_agents.py delete mode 100644 admin_api/admin_api/models/error.py delete mode 100644 admin_api/admin_api/models/error_detail.py delete mode 100644 admin_api/admin_api/models/error_detail_code.py delete mode 100644 admin_api/admin_api/models/expand.py delete mode 100644 admin_api/admin_api/models/extended_user.py delete mode 100644 admin_api/admin_api/models/get_account_group200_response.py delete mode 100644 admin_api/admin_api/models/get_account_groups200_response.py delete mode 100644 admin_api/admin_api/models/get_permissions200_response.py delete mode 100644 admin_api/admin_api/models/get_roles200_response.py delete mode 100644 admin_api/admin_api/models/get_user200_response.py delete mode 100644 admin_api/admin_api/models/get_user_events200_response.py delete mode 100644 admin_api/admin_api/models/get_users200_response.py delete mode 100644 admin_api/admin_api/models/interface_ip_mapping.py delete mode 100644 admin_api/admin_api/models/link.py delete mode 100644 admin_api/admin_api/models/login_account_group.py delete mode 100644 admin_api/admin_api/models/new_account_group_response.py delete mode 100644 admin_api/admin_api/models/pagination_links.py delete mode 100644 admin_api/admin_api/models/pagination_links_links.py delete mode 100644 admin_api/admin_api/models/permission.py delete mode 100644 admin_api/admin_api/models/permissions.py delete mode 100644 admin_api/admin_api/models/query_window.py delete mode 100644 admin_api/admin_api/models/role.py delete mode 100644 admin_api/admin_api/models/role_detail.py delete mode 100644 admin_api/admin_api/models/role_request_body.py delete mode 100644 admin_api/admin_api/models/roles.py delete mode 100644 admin_api/admin_api/models/self_links.py delete mode 100644 admin_api/admin_api/models/self_links_links.py delete mode 100644 admin_api/admin_api/models/unauthorized_error.py delete mode 100644 admin_api/admin_api/models/user.py delete mode 100644 admin_api/admin_api/models/user_account_group.py delete mode 100644 admin_api/admin_api/models/user_account_groups.py delete mode 100644 admin_api/admin_api/models/user_detail.py delete mode 100644 admin_api/admin_api/models/user_event.py delete mode 100644 admin_api/admin_api/models/user_event_all_of_resources_inner.py delete mode 100644 admin_api/admin_api/models/user_events.py delete mode 100644 admin_api/admin_api/models/user_request_body.py delete mode 100644 admin_api/admin_api/models/users.py delete mode 100644 admin_api/admin_api/rest.py delete mode 100644 admin_api/docs/AccountGroup.md delete mode 100644 admin_api/docs/AccountGroupId.md delete mode 100644 admin_api/docs/AccountGroupRolesAccountGroupRolesInner.md delete mode 100644 admin_api/docs/Agent.md delete mode 100644 admin_api/docs/AgentBase.md delete mode 100644 admin_api/docs/CloudEnterpriseAgentType.md delete mode 100644 admin_api/docs/ClusterMember.md delete mode 100644 admin_api/docs/EnterpriseAgent.md delete mode 100644 admin_api/docs/EnterpriseAgentIpv6Policy.md delete mode 100644 admin_api/docs/EnterpriseAgentState.md delete mode 100644 admin_api/docs/Error.md delete mode 100644 admin_api/docs/ErrorDetail.md delete mode 100644 admin_api/docs/ErrorDetailCode.md delete mode 100644 admin_api/docs/Expand.md delete mode 100644 admin_api/docs/InterfaceIpMapping.md delete mode 100644 admin_api/docs/Link.md delete mode 100644 admin_api/docs/PaginationLinks.md delete mode 100644 admin_api/docs/PaginationLinksLinks.md delete mode 100644 admin_api/docs/QueryWindow.md delete mode 100644 admin_api/docs/SelfLinks.md delete mode 100644 admin_api/docs/SelfLinksLinks.md delete mode 100644 admin_api/docs/UnauthorizedError.md delete mode 100644 admin_api/git_push.sh delete mode 100644 admin_api/pyproject.toml delete mode 100644 admin_api/setup.py delete mode 100644 admin_api/test-requirements.txt delete mode 100644 admin_api/test/test_account_group.py delete mode 100644 admin_api/test/test_account_group1.py delete mode 100644 admin_api/test/test_account_group_detail.py delete mode 100644 admin_api/test/test_account_group_id.py delete mode 100644 admin_api/test/test_account_group_request_body.py delete mode 100644 admin_api/test/test_account_group_roles.py delete mode 100644 admin_api/test/test_account_group_roles_account_group_roles_inner.py delete mode 100644 admin_api/test/test_account_group_roles_request_body_inner.py delete mode 100644 admin_api/test/test_account_groups.py delete mode 100644 admin_api/test/test_account_groups_api.py delete mode 100644 admin_api/test/test_agent.py delete mode 100644 admin_api/test/test_agent_base.py delete mode 100644 admin_api/test/test_all_account_group_roles.py delete mode 100644 admin_api/test/test_base_role.py delete mode 100644 admin_api/test/test_cloud_enterprise_agent_type.py delete mode 100644 admin_api/test/test_cluster_member.py delete mode 100644 admin_api/test/test_create_account_group201_response.py delete mode 100644 admin_api/test/test_create_role201_response.py delete mode 100644 admin_api/test/test_create_user201_response.py delete mode 100644 admin_api/test/test_created_user.py delete mode 100644 admin_api/test/test_enterprise_agent.py delete mode 100644 admin_api/test/test_enterprise_agent_ipv6_policy.py delete mode 100644 admin_api/test/test_enterprise_agent_state.py delete mode 100644 admin_api/test/test_enterprise_agents.py delete mode 100644 admin_api/test/test_error.py delete mode 100644 admin_api/test/test_error_detail.py delete mode 100644 admin_api/test/test_error_detail_code.py delete mode 100644 admin_api/test/test_expand.py delete mode 100644 admin_api/test/test_extended_user.py delete mode 100644 admin_api/test/test_get_account_group200_response.py delete mode 100644 admin_api/test/test_get_account_groups200_response.py delete mode 100644 admin_api/test/test_get_permissions200_response.py delete mode 100644 admin_api/test/test_get_roles200_response.py delete mode 100644 admin_api/test/test_get_user200_response.py delete mode 100644 admin_api/test/test_get_user_events200_response.py delete mode 100644 admin_api/test/test_get_users200_response.py delete mode 100644 admin_api/test/test_interface_ip_mapping.py delete mode 100644 admin_api/test/test_link.py delete mode 100644 admin_api/test/test_login_account_group.py delete mode 100644 admin_api/test/test_new_account_group_response.py delete mode 100644 admin_api/test/test_pagination_links.py delete mode 100644 admin_api/test/test_pagination_links_links.py delete mode 100644 admin_api/test/test_permission.py delete mode 100644 admin_api/test/test_permissions.py delete mode 100644 admin_api/test/test_permissions_api.py delete mode 100644 admin_api/test/test_query_window.py delete mode 100644 admin_api/test/test_role.py delete mode 100644 admin_api/test/test_role_detail.py delete mode 100644 admin_api/test/test_role_request_body.py delete mode 100644 admin_api/test/test_roles.py delete mode 100644 admin_api/test/test_roles_api.py delete mode 100644 admin_api/test/test_self_links.py delete mode 100644 admin_api/test/test_self_links_links.py delete mode 100644 admin_api/test/test_unauthorized_error.py delete mode 100644 admin_api/test/test_user.py delete mode 100644 admin_api/test/test_user_account_group.py delete mode 100644 admin_api/test/test_user_account_groups.py delete mode 100644 admin_api/test/test_user_detail.py delete mode 100644 admin_api/test/test_user_event.py delete mode 100644 admin_api/test/test_user_event_all_of_resources_inner.py delete mode 100644 admin_api/test/test_user_events.py delete mode 100644 admin_api/test/test_user_events_api.py delete mode 100644 admin_api/test/test_user_request_body.py delete mode 100644 admin_api/test/test_users.py delete mode 100644 admin_api/test/test_users_api.py delete mode 100644 admin_api/tox.ini rename {agents_api => agents}/.gitignore (100%) rename {agents_api => agents}/.openapi-generator-ignore (100%) create mode 100644 agents/.openapi-generator/FILES create mode 100644 agents/.openapi-generator/VERSION create mode 100644 agents/README.md create mode 100644 agents/agents/__init__.py create mode 100644 agents/agents/api/__init__.py rename {agents_api/agents_api => agents/agents}/api/cloud_and_enterprise_agent_notification_rules_api.py (96%) rename {agents_api/agents_api => agents/agents}/api/cloud_and_enterprise_agents_api.py (95%) rename {agents_api/agents_api => agents/agents}/api/enterprise_agent_cluster_api.py (96%) rename {agents_api/agents_api => agents/agents}/api/proxies_api.py (95%) create mode 100644 agents/agents/api_client.py create mode 100644 agents/agents/api_response.py create mode 100644 agents/agents/configuration.py create mode 100644 agents/agents/exceptions.py create mode 100644 agents/agents/models/__init__.py create mode 100644 agents/agents/models/account_group.py create mode 100644 agents/agents/models/account_group_id.py create mode 100644 agents/agents/models/agent.py create mode 100644 agents/agents/models/agent_base.py create mode 100644 agents/agents/models/agent_details.py rename {agents_api/agents_api => agents/agents}/models/agent_details_expand.py (80%) rename {agents_api/agents_api => agents/agents}/models/agent_ipv6_policy.py (81%) rename {agents_api/agents_api => agents/agents}/models/agent_list_expand.py (79%) rename {agents_api/agents_api => agents/agents}/models/agent_proxies.py (78%) rename {agents_api/agents_api => agents/agents}/models/agent_proxy.py (86%) create mode 100644 agents/agents/models/agent_request_body.py rename {agents_api/agents_api => agents/agents}/models/agents.py (76%) rename {agents_api/agents_api => agents/agents}/models/alert_email.py (80%) rename {agents_api/agents_api => agents/agents}/models/alert_integration_base.py (85%) rename {agents_api/agents_api => agents/agents}/models/alert_integration_type.py (80%) rename {agents_api/agents_api => agents/agents}/models/assign_enterprise_agent_cluster_request.py (80%) create mode 100644 agents/agents/models/cloud_agent_detail.py rename {agents_api/agents_api => agents/agents}/models/cloud_enterprise_agent.py (80%) create mode 100644 agents/agents/models/cloud_enterprise_agent_type.py rename {agents_api/agents_api => agents/agents}/models/cloud_enterprise_agents.py (78%) create mode 100644 agents/agents/models/cluster_member.py create mode 100644 agents/agents/models/enterprise_agent.py create mode 100644 agents/agents/models/enterprise_agent_cluster_detail.py create mode 100644 agents/agents/models/enterprise_agent_data.py rename {agents_api/agents_api => agents/agents}/models/enterprise_agent_detail.py (75%) create mode 100644 agents/agents/models/enterprise_agent_ipv6_policy.py create mode 100644 agents/agents/models/enterprise_agent_response_expands.py create mode 100644 agents/agents/models/enterprise_agent_state.py create mode 100644 agents/agents/models/error.py create mode 100644 agents/agents/models/error_detail.py create mode 100644 agents/agents/models/error_detail_code.py rename {agents_api/agents_api => agents/agents}/models/get_agent_proxies200_response.py (76%) rename {agents_api/agents_api => agents/agents}/models/get_agents200_response.py (76%) rename {agents_api/agents_api => agents/agents}/models/get_agents_notification_rule200_response.py (78%) rename {agents_api/agents_api => agents/agents}/models/get_agents_notification_rules200_response.py (76%) create mode 100644 agents/agents/models/interface_ip_mapping.py create mode 100644 agents/agents/models/labels.py create mode 100644 agents/agents/models/link.py create mode 100644 agents/agents/models/notification.py rename {agents_api/agents_api => agents/agents}/models/notification_rule.py (83%) rename {agents_api/agents_api => agents/agents}/models/notification_rule_detail.py (79%) rename {agents_api/agents_api => agents/agents}/models/notification_rules.py (78%) rename {agents_api/agents_api => agents/agents}/models/notifications.py (75%) rename {agents_api/agents_api => agents/agents}/models/proxy_auth_type.py (80%) rename {agents_api/agents_api => agents/agents}/models/proxy_type.py (79%) create mode 100644 agents/agents/models/self_links.py create mode 100644 agents/agents/models/self_links_links.py create mode 100644 agents/agents/models/simple_agent.py create mode 100644 agents/agents/models/simple_enterprise_agent.py create mode 100644 agents/agents/models/simple_test.py create mode 100644 agents/agents/models/simple_test_links.py create mode 100644 agents/agents/models/simple_test_links_self.py create mode 100644 agents/agents/models/test_interval.py create mode 100644 agents/agents/models/test_type.py rename {agents_api/agents_api => agents/agents}/models/unassign_enterprise_agent_from_cluster_request.py (80%) create mode 100644 agents/agents/models/unauthorized_error.py create mode 100644 agents/agents/models/validation_error.py create mode 100644 agents/agents/models/validation_error_all_of_errors.py rename {agents_api/agents_api => agents/agents}/py.typed (100%) create mode 100644 agents/agents/rest.py create mode 100644 agents/docs/AccountGroup.md create mode 100644 agents/docs/AccountGroupId.md create mode 100644 agents/docs/Agent.md create mode 100644 agents/docs/AgentBase.md rename {agents_api => agents}/docs/AgentDetails.md (90%) rename {agents_api => agents}/docs/AgentDetailsExpand.md (99%) rename {agents_api => agents}/docs/AgentIpv6Policy.md (99%) rename {agents_api => agents}/docs/AgentListExpand.md (99%) rename {agents_api => agents}/docs/AgentProxies.md (82%) rename {agents_api => agents}/docs/AgentProxy.md (93%) create mode 100644 agents/docs/AgentRequestBody.md rename {agents_api => agents}/docs/Agents.md (85%) rename {agents_api => agents}/docs/AlertEmail.md (85%) rename {agents_api => agents}/docs/AlertIntegrationBase.md (86%) rename {agents_api => agents}/docs/AlertIntegrationType.md (99%) rename {agents_api => agents}/docs/AssignEnterpriseAgentClusterRequest.md (75%) create mode 100644 agents/docs/CloudAgentDetail.md rename {agents_api => agents}/docs/CloudAndEnterpriseAgentNotificationRulesApi.md (86%) rename {agents_api => agents}/docs/CloudAndEnterpriseAgentsApi.md (80%) rename {agents_api => agents}/docs/CloudEnterpriseAgent.md (93%) create mode 100644 agents/docs/CloudEnterpriseAgentType.md rename {agents_api => agents}/docs/CloudEnterpriseAgents.md (79%) create mode 100644 agents/docs/ClusterMember.md create mode 100644 agents/docs/EnterpriseAgent.md rename {agents_api => agents}/docs/EnterpriseAgentClusterApi.md (82%) create mode 100644 agents/docs/EnterpriseAgentClusterDetail.md create mode 100644 agents/docs/EnterpriseAgentData.md rename {agents_api => agents}/docs/EnterpriseAgentDetail.md (92%) create mode 100644 agents/docs/EnterpriseAgentIpv6Policy.md create mode 100644 agents/docs/EnterpriseAgentResponseExpands.md create mode 100644 agents/docs/EnterpriseAgentState.md create mode 100644 agents/docs/Error.md create mode 100644 agents/docs/ErrorDetail.md create mode 100644 agents/docs/ErrorDetailCode.md rename {agents_api => agents}/docs/GetAgentProxies200Response.md (78%) rename {agents_api => agents}/docs/GetAgents200Response.md (80%) rename {agents_api => agents}/docs/GetAgentsNotificationRule200Response.md (82%) rename {agents_api => agents}/docs/GetAgentsNotificationRules200Response.md (76%) create mode 100644 agents/docs/InterfaceIpMapping.md create mode 100644 agents/docs/Labels.md create mode 100644 agents/docs/Link.md create mode 100644 agents/docs/Notification.md rename {agents_api => agents}/docs/NotificationRule.md (86%) rename {agents_api => agents}/docs/NotificationRuleDetail.md (85%) rename {agents_api => agents}/docs/NotificationRules.md (80%) rename {agents_api => agents}/docs/Notifications.md (83%) rename {agents_api => agents}/docs/ProxiesApi.md (87%) rename {agents_api => agents}/docs/ProxyAuthType.md (99%) rename {agents_api => agents}/docs/ProxyType.md (99%) create mode 100644 agents/docs/SelfLinks.md create mode 100644 agents/docs/SelfLinksLinks.md create mode 100644 agents/docs/SimpleAgent.md create mode 100644 agents/docs/SimpleEnterpriseAgent.md create mode 100644 agents/docs/SimpleTest.md create mode 100644 agents/docs/SimpleTestLinks.md create mode 100644 agents/docs/SimpleTestLinksSelf.md create mode 100644 agents/docs/TestInterval.md create mode 100644 agents/docs/TestType.md create mode 100644 agents/docs/UnassignEnterpriseAgentFromClusterRequest.md create mode 100644 agents/docs/UnauthorizedError.md create mode 100644 agents/docs/ValidationError.md create mode 100644 agents/docs/ValidationErrorAllOfErrors.md create mode 100644 agents/pyproject.toml rename {agents_api => agents}/requirements.txt (100%) rename {agents_api => agents}/setup.cfg (100%) create mode 100644 agents/setup.py create mode 100644 agents/test-requirements.txt rename {agents_api => agents}/test/__init__.py (100%) create mode 100644 agents/test/test_account_group.py create mode 100644 agents/test/test_account_group_id.py create mode 100644 agents/test/test_agent.py create mode 100644 agents/test/test_agent_base.py create mode 100644 agents/test/test_agent_details.py rename {agents_api => agents}/test/test_agent_details_expand.py (82%) rename {agents_api => agents}/test/test_agent_ipv6_policy.py (82%) rename {agents_api => agents}/test/test_agent_list_expand.py (82%) rename {agents_api => agents}/test/test_agent_proxies.py (89%) rename {agents_api => agents}/test/test_agent_proxy.py (92%) create mode 100644 agents/test/test_agent_request_body.py rename {agents_api => agents}/test/test_agents.py (88%) rename {agents_api => agents}/test/test_alert_email.py (92%) rename {agents_api => agents}/test/test_alert_integration_base.py (92%) rename {agents_api => agents}/test/test_alert_integration_type.py (82%) rename {agents_api => agents}/test/test_assign_enterprise_agent_cluster_request.py (90%) create mode 100644 agents/test/test_cloud_agent_detail.py rename {agents_api => agents}/test/test_cloud_enterprise_agent.py (83%) create mode 100644 agents/test/test_cloud_enterprise_agent_type.py rename {agents_api => agents}/test/test_cloud_enterprise_agents.py (90%) create mode 100644 agents/test/test_cluster_member.py create mode 100644 agents/test/test_enterprise_agent.py create mode 100644 agents/test/test_enterprise_agent_cluster_detail.py create mode 100644 agents/test/test_enterprise_agent_data.py create mode 100644 agents/test/test_enterprise_agent_detail.py create mode 100644 agents/test/test_enterprise_agent_ipv6_policy.py create mode 100644 agents/test/test_enterprise_agent_response_expands.py create mode 100644 agents/test/test_enterprise_agent_state.py create mode 100644 agents/test/test_error.py create mode 100644 agents/test/test_error_detail.py create mode 100644 agents/test/test_error_detail_code.py rename {agents_api => agents}/test/test_get_agent_proxies200_response.py (85%) rename {agents_api => agents}/test/test_get_agents200_response.py (86%) rename {agents_api => agents}/test/test_get_agents_notification_rule200_response.py (83%) rename {agents_api => agents}/test/test_get_agents_notification_rules200_response.py (87%) create mode 100644 agents/test/test_interface_ip_mapping.py create mode 100644 agents/test/test_labels.py create mode 100644 agents/test/test_link.py create mode 100644 agents/test/test_notification.py rename {agents_api => agents}/test/test_notification_rule.py (92%) rename {agents_api => agents}/test/test_notification_rule_detail.py (84%) rename {agents_api => agents}/test/test_notification_rules.py (92%) rename {agents_api => agents}/test/test_notifications.py (85%) rename {agents_api => agents}/test/test_proxy_auth_type.py (83%) rename {agents_api => agents}/test/test_proxy_type.py (83%) create mode 100644 agents/test/test_self_links.py create mode 100644 agents/test/test_self_links_links.py create mode 100644 agents/test/test_simple_agent.py create mode 100644 agents/test/test_simple_enterprise_agent.py create mode 100644 agents/test/test_simple_test.py create mode 100644 agents/test/test_simple_test_links.py create mode 100644 agents/test/test_simple_test_links_self.py create mode 100644 agents/test/test_test_interval.py create mode 100644 agents/test/test_test_type.py rename {agents_api => agents}/test/test_unassign_enterprise_agent_from_cluster_request.py (89%) create mode 100644 agents/test/test_unauthorized_error.py create mode 100644 agents/test/test_validation_error.py create mode 100644 agents/test/test_validation_error_all_of_errors.py delete mode 100644 agents_api/.github/workflows/python.yml delete mode 100644 agents_api/.gitlab-ci.yml delete mode 100644 agents_api/.openapi-generator/FILES delete mode 100644 agents_api/.openapi-generator/VERSION delete mode 100644 agents_api/.travis.yml delete mode 100644 agents_api/README.md delete mode 100644 agents_api/agents_api/__init__.py delete mode 100644 agents_api/agents_api/api/__init__.py delete mode 100644 agents_api/agents_api/api_client.py delete mode 100644 agents_api/agents_api/api_response.py delete mode 100644 agents_api/agents_api/configuration.py delete mode 100644 agents_api/agents_api/exceptions.py delete mode 100644 agents_api/agents_api/models/__init__.py delete mode 100644 agents_api/agents_api/models/account_group.py delete mode 100644 agents_api/agents_api/models/account_group_id.py delete mode 100644 agents_api/agents_api/models/agent.py delete mode 100644 agents_api/agents_api/models/agent_base.py delete mode 100644 agents_api/agents_api/models/agent_detail.py delete mode 100644 agents_api/agents_api/models/agent_details.py delete mode 100644 agents_api/agents_api/models/cloud_enterprise_agent_type.py delete mode 100644 agents_api/agents_api/models/cluster_member.py delete mode 100644 agents_api/agents_api/models/enterprise_agent.py delete mode 100644 agents_api/agents_api/models/enterprise_agent_ipv6_policy.py delete mode 100644 agents_api/agents_api/models/enterprise_agent_request_body.py delete mode 100644 agents_api/agents_api/models/enterprise_agent_state.py delete mode 100644 agents_api/agents_api/models/error.py delete mode 100644 agents_api/agents_api/models/error_detail.py delete mode 100644 agents_api/agents_api/models/error_detail_code.py delete mode 100644 agents_api/agents_api/models/get_agent_details200_response.py delete mode 100644 agents_api/agents_api/models/interface_ip_mapping.py delete mode 100644 agents_api/agents_api/models/labels.py delete mode 100644 agents_api/agents_api/models/link.py delete mode 100644 agents_api/agents_api/models/notification.py delete mode 100644 agents_api/agents_api/models/self_links.py delete mode 100644 agents_api/agents_api/models/self_links_links.py delete mode 100644 agents_api/agents_api/models/simple_test.py delete mode 100644 agents_api/agents_api/models/test_interval.py delete mode 100644 agents_api/agents_api/models/test_type.py delete mode 100644 agents_api/agents_api/models/unauthorized_error.py delete mode 100644 agents_api/agents_api/models/unexpanded_instant_test.py delete mode 100644 agents_api/agents_api/models/unexpanded_instant_test_links.py delete mode 100644 agents_api/agents_api/models/unexpanded_instant_test_links_self.py delete mode 100644 agents_api/agents_api/models/unexpanded_instant_test_links_test_results.py delete mode 100644 agents_api/agents_api/models/unexpanded_test.py delete mode 100644 agents_api/agents_api/models/update_enterprise_agent_details200_response.py delete mode 100644 agents_api/agents_api/rest.py delete mode 100644 agents_api/docs/AccountGroup.md delete mode 100644 agents_api/docs/AccountGroupId.md delete mode 100644 agents_api/docs/Agent.md delete mode 100644 agents_api/docs/AgentBase.md delete mode 100644 agents_api/docs/AgentDetail.md delete mode 100644 agents_api/docs/CloudEnterpriseAgentType.md delete mode 100644 agents_api/docs/ClusterMember.md delete mode 100644 agents_api/docs/EnterpriseAgent.md delete mode 100644 agents_api/docs/EnterpriseAgentIpv6Policy.md delete mode 100644 agents_api/docs/EnterpriseAgentRequestBody.md delete mode 100644 agents_api/docs/EnterpriseAgentState.md delete mode 100644 agents_api/docs/Error.md delete mode 100644 agents_api/docs/ErrorDetail.md delete mode 100644 agents_api/docs/ErrorDetailCode.md delete mode 100644 agents_api/docs/GetAgentDetails200Response.md delete mode 100644 agents_api/docs/InterfaceIpMapping.md delete mode 100644 agents_api/docs/Labels.md delete mode 100644 agents_api/docs/Link.md delete mode 100644 agents_api/docs/Notification.md delete mode 100644 agents_api/docs/SelfLinks.md delete mode 100644 agents_api/docs/SelfLinksLinks.md delete mode 100644 agents_api/docs/SimpleTest.md delete mode 100644 agents_api/docs/TestInterval.md delete mode 100644 agents_api/docs/TestType.md delete mode 100644 agents_api/docs/UnassignEnterpriseAgentFromClusterRequest.md delete mode 100644 agents_api/docs/UnauthorizedError.md delete mode 100644 agents_api/docs/UnexpandedInstantTest.md delete mode 100644 agents_api/docs/UnexpandedInstantTestLinks.md delete mode 100644 agents_api/docs/UnexpandedInstantTestLinksSelf.md delete mode 100644 agents_api/docs/UnexpandedInstantTestLinksTestResults.md delete mode 100644 agents_api/docs/UnexpandedTest.md delete mode 100644 agents_api/docs/UpdateEnterpriseAgentDetails200Response.md delete mode 100644 agents_api/git_push.sh delete mode 100644 agents_api/pyproject.toml delete mode 100644 agents_api/setup.py delete mode 100644 agents_api/test-requirements.txt delete mode 100644 agents_api/test/test_account_group.py delete mode 100644 agents_api/test/test_account_group_id.py delete mode 100644 agents_api/test/test_agent.py delete mode 100644 agents_api/test/test_agent_base.py delete mode 100644 agents_api/test/test_agent_detail.py delete mode 100644 agents_api/test/test_agent_details.py delete mode 100644 agents_api/test/test_cloud_and_enterprise_agent_notification_rules_api.py delete mode 100644 agents_api/test/test_cloud_and_enterprise_agents_api.py delete mode 100644 agents_api/test/test_cloud_enterprise_agent_type.py delete mode 100644 agents_api/test/test_cluster_member.py delete mode 100644 agents_api/test/test_enterprise_agent.py delete mode 100644 agents_api/test/test_enterprise_agent_cluster_api.py delete mode 100644 agents_api/test/test_enterprise_agent_detail.py delete mode 100644 agents_api/test/test_enterprise_agent_ipv6_policy.py delete mode 100644 agents_api/test/test_enterprise_agent_request_body.py delete mode 100644 agents_api/test/test_enterprise_agent_state.py delete mode 100644 agents_api/test/test_error.py delete mode 100644 agents_api/test/test_error_detail.py delete mode 100644 agents_api/test/test_error_detail_code.py delete mode 100644 agents_api/test/test_get_agent_details200_response.py delete mode 100644 agents_api/test/test_interface_ip_mapping.py delete mode 100644 agents_api/test/test_labels.py delete mode 100644 agents_api/test/test_link.py delete mode 100644 agents_api/test/test_notification.py delete mode 100644 agents_api/test/test_proxies_api.py delete mode 100644 agents_api/test/test_self_links.py delete mode 100644 agents_api/test/test_self_links_links.py delete mode 100644 agents_api/test/test_simple_test.py delete mode 100644 agents_api/test/test_test_interval.py delete mode 100644 agents_api/test/test_test_type.py delete mode 100644 agents_api/test/test_unauthorized_error.py delete mode 100644 agents_api/test/test_unexpanded_instant_test.py delete mode 100644 agents_api/test/test_unexpanded_instant_test_links.py delete mode 100644 agents_api/test/test_unexpanded_instant_test_links_self.py delete mode 100644 agents_api/test/test_unexpanded_instant_test_links_test_results.py delete mode 100644 agents_api/test/test_unexpanded_test.py delete mode 100644 agents_api/test/test_update_enterprise_agent_details200_response.py delete mode 100644 agents_api/tox.ini rename {alerts_api => alerts}/.gitignore (100%) rename {alerts_api => alerts}/.openapi-generator-ignore (100%) create mode 100644 alerts/.openapi-generator/FILES create mode 100644 alerts/.openapi-generator/VERSION create mode 100644 alerts/README.md create mode 100644 alerts/alerts/__init__.py create mode 100644 alerts/alerts/api/__init__.py rename {alerts_api/alerts_api => alerts/alerts}/api/alert_rules_api.py (95%) rename {alerts_api/alerts_api => alerts/alerts}/api/alert_suppression_windows_api.py (95%) rename {alerts_api/alerts_api => alerts/alerts}/api/alerts_api.py (95%) create mode 100644 alerts/alerts/api_client.py create mode 100644 alerts/alerts/api_response.py create mode 100644 alerts/alerts/configuration.py create mode 100644 alerts/alerts/exceptions.py create mode 100644 alerts/alerts/models/__init__.py create mode 100644 alerts/alerts/models/alert.py create mode 100644 alerts/alerts/models/alert_detail.py create mode 100644 alerts/alerts/models/alert_direction.py create mode 100644 alerts/alerts/models/alert_links.py create mode 100644 alerts/alerts/models/alert_links_links.py create mode 100644 alerts/alerts/models/alert_metric_detail.py create mode 100644 alerts/alerts/models/alert_metric_detail_end.py create mode 100644 alerts/alerts/models/alert_metric_detail_start.py create mode 100644 alerts/alerts/models/alert_metrics.py create mode 100644 alerts/alerts/models/alert_rounds_violation_mode.py create mode 100644 alerts/alerts/models/alert_rule.py create mode 100644 alerts/alerts/models/alert_suppression_window.py create mode 100644 alerts/alerts/models/alert_suppression_window_request.py create mode 100644 alerts/alerts/models/alert_suppression_window_state.py create mode 100644 alerts/alerts/models/alert_suppression_windows.py create mode 100644 alerts/alerts/models/alert_suppression_windows_alert_suppression_windows_inner.py create mode 100644 alerts/alerts/models/alert_type.py create mode 100644 alerts/alerts/models/alerts.py create mode 100644 alerts/alerts/models/base_alert.py create mode 100644 alerts/alerts/models/base_alert_all_of_meta.py create mode 100644 alerts/alerts/models/base_test.py create mode 100644 alerts/alerts/models/complete_alert_suppression_window.py create mode 100644 alerts/alerts/models/create_alert_rule201_response.py create mode 100644 alerts/alerts/models/create_suppression_windows201_response.py create mode 100644 alerts/alerts/models/days_of_week.py create mode 100644 alerts/alerts/models/end_repeat.py create mode 100644 alerts/alerts/models/end_repeat_type.py create mode 100644 alerts/alerts/models/error.py create mode 100644 alerts/alerts/models/expand.py create mode 100644 alerts/alerts/models/get_alert_rule_details200_response.py create mode 100644 alerts/alerts/models/get_alerts200_response.py create mode 100644 alerts/alerts/models/get_alerts_rules200_response.py create mode 100644 alerts/alerts/models/get_suppression_windows200_response.py create mode 100644 alerts/alerts/models/interval_type.py create mode 100644 alerts/alerts/models/legacy_alert.py create mode 100644 alerts/alerts/models/link.py create mode 100644 alerts/alerts/models/notification.py create mode 100644 alerts/alerts/models/notification_email.py create mode 100644 alerts/alerts/models/notification_third_party.py create mode 100644 alerts/alerts/models/notification_webhook.py create mode 100644 alerts/alerts/models/pagination_links.py create mode 100644 alerts/alerts/models/pagination_links_links.py create mode 100644 alerts/alerts/models/repeat.py create mode 100644 alerts/alerts/models/repeat_type.py create mode 100644 alerts/alerts/models/rule.py create mode 100644 alerts/alerts/models/rule_detail.py create mode 100644 alerts/alerts/models/rule_detail_update.py create mode 100644 alerts/alerts/models/rules.py create mode 100644 alerts/alerts/models/self_links.py create mode 100644 alerts/alerts/models/self_links_links.py create mode 100644 alerts/alerts/models/severity.py create mode 100644 alerts/alerts/models/state.py create mode 100644 alerts/alerts/models/test_interval.py create mode 100644 alerts/alerts/models/third_party_integration_type.py create mode 100644 alerts/alerts/models/unauthorized_error.py create mode 100644 alerts/alerts/models/unexpanded_test.py create mode 100644 alerts/alerts/models/validation_error.py create mode 100644 alerts/alerts/models/validation_error_all_of_errors.py create mode 100644 alerts/alerts/models/webhook_integration_type.py rename {alerts_api/alerts_api => alerts/alerts}/py.typed (100%) create mode 100644 alerts/alerts/rest.py create mode 100644 alerts/docs/Alert.md rename {alerts_api => alerts}/docs/AlertDetail.md (77%) create mode 100644 alerts/docs/AlertDirection.md rename {alerts_api => alerts}/docs/AlertLinks.md (75%) create mode 100644 alerts/docs/AlertLinksLinks.md rename {alerts_api => alerts}/docs/AlertMetricDetail.md (85%) rename {alerts_api => alerts}/docs/AlertMetricDetailEnd.md (78%) rename {alerts_api => alerts}/docs/AlertMetricDetailStart.md (77%) rename {alerts_api => alerts}/docs/AlertMetrics.md (81%) create mode 100644 alerts/docs/AlertRoundsViolationMode.md create mode 100644 alerts/docs/AlertRule.md rename {alerts_api => alerts}/docs/AlertRulesApi.md (86%) rename {alerts_api => alerts}/docs/AlertSuppressionWindow.md (87%) rename {alerts_api => alerts}/docs/AlertSuppressionWindowRequest.md (86%) rename {alerts_api => alerts}/docs/AlertSuppressionWindowState.md (99%) rename {alerts_api => alerts}/docs/AlertSuppressionWindows.md (80%) rename {alerts_api => alerts}/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md (81%) rename {alerts_api => alerts}/docs/AlertSuppressionWindowsApi.md (82%) create mode 100644 alerts/docs/AlertType.md rename {alerts_api => alerts}/docs/Alerts.md (85%) rename {alerts_api => alerts}/docs/AlertsApi.md (89%) rename {alerts_api => alerts}/docs/BaseAlert.md (75%) create mode 100644 alerts/docs/BaseAlertAllOfMeta.md create mode 100644 alerts/docs/BaseTest.md rename {alerts_api => alerts}/docs/CompleteAlertSuppressionWindow.md (85%) rename {alerts_api => alerts}/docs/CreateAlertRule201Response.md (88%) rename {alerts_api => alerts}/docs/CreateSuppressionWindows201Response.md (85%) rename {alerts_api => alerts}/docs/DaysOfWeek.md (99%) rename {alerts_api => alerts}/docs/EndRepeat.md (87%) rename {alerts_api => alerts}/docs/EndRepeatType.md (99%) create mode 100644 alerts/docs/Error.md create mode 100644 alerts/docs/Expand.md rename {alerts_api => alerts}/docs/GetAlertRuleDetails200Response.md (87%) rename {alerts_api => alerts}/docs/GetAlerts200Response.md (80%) rename {alerts_api => alerts}/docs/GetAlertsRules200Response.md (78%) rename {alerts_api => alerts}/docs/GetSuppressionWindows200Response.md (78%) rename {alerts_api => alerts}/docs/IntervalType.md (99%) create mode 100644 alerts/docs/LegacyAlert.md create mode 100644 alerts/docs/Link.md create mode 100644 alerts/docs/Notification.md rename {alerts_api => alerts}/docs/NotificationEmail.md (83%) rename {alerts_api => alerts}/docs/NotificationThirdParty.md (80%) rename {alerts_api => alerts}/docs/NotificationWebhook.md (81%) create mode 100644 alerts/docs/PaginationLinks.md create mode 100644 alerts/docs/PaginationLinksLinks.md rename {alerts_api => alerts}/docs/Repeat.md (89%) rename {alerts_api => alerts}/docs/RepeatType.md (99%) rename {alerts_api => alerts}/docs/Rule.md (92%) rename {alerts_api => alerts}/docs/RuleDetail.md (91%) rename {alerts_api => alerts}/docs/RuleDetailUpdate.md (90%) rename {alerts_api => alerts}/docs/Rules.md (85%) create mode 100644 alerts/docs/SelfLinks.md create mode 100644 alerts/docs/SelfLinksLinks.md create mode 100644 alerts/docs/Severity.md rename {alerts_api => alerts}/docs/State.md (99%) create mode 100644 alerts/docs/TestInterval.md rename {alerts_api => alerts}/docs/ThirdPartyIntegrationType.md (99%) create mode 100644 alerts/docs/UnauthorizedError.md create mode 100644 alerts/docs/UnexpandedTest.md create mode 100644 alerts/docs/ValidationError.md create mode 100644 alerts/docs/ValidationErrorAllOfErrors.md rename {alerts_api => alerts}/docs/WebhookIntegrationType.md (99%) create mode 100644 alerts/pyproject.toml rename {alerts_api => alerts}/requirements.txt (100%) rename {alerts_api => alerts}/setup.cfg (100%) create mode 100644 alerts/setup.py create mode 100644 alerts/test-requirements.txt rename {alerts_api => alerts}/test/__init__.py (100%) create mode 100644 alerts/test/test_alert.py create mode 100644 alerts/test/test_alert_detail.py create mode 100644 alerts/test/test_alert_direction.py create mode 100644 alerts/test/test_alert_links.py create mode 100644 alerts/test/test_alert_links_links.py create mode 100644 alerts/test/test_alert_metric_detail.py create mode 100644 alerts/test/test_alert_metric_detail_end.py create mode 100644 alerts/test/test_alert_metric_detail_start.py create mode 100644 alerts/test/test_alert_metrics.py create mode 100644 alerts/test/test_alert_rounds_violation_mode.py create mode 100644 alerts/test/test_alert_rule.py create mode 100644 alerts/test/test_alert_suppression_window.py create mode 100644 alerts/test/test_alert_suppression_window_request.py create mode 100644 alerts/test/test_alert_suppression_window_state.py create mode 100644 alerts/test/test_alert_suppression_windows.py create mode 100644 alerts/test/test_alert_suppression_windows_alert_suppression_windows_inner.py create mode 100644 alerts/test/test_alert_type.py create mode 100644 alerts/test/test_alerts.py create mode 100644 alerts/test/test_base_alert.py create mode 100644 alerts/test/test_base_alert_all_of_meta.py create mode 100644 alerts/test/test_base_test.py create mode 100644 alerts/test/test_complete_alert_suppression_window.py create mode 100644 alerts/test/test_create_alert_rule201_response.py create mode 100644 alerts/test/test_create_suppression_windows201_response.py create mode 100644 alerts/test/test_days_of_week.py create mode 100644 alerts/test/test_end_repeat.py create mode 100644 alerts/test/test_end_repeat_type.py create mode 100644 alerts/test/test_error.py create mode 100644 alerts/test/test_expand.py create mode 100644 alerts/test/test_get_alert_rule_details200_response.py create mode 100644 alerts/test/test_get_alerts200_response.py create mode 100644 alerts/test/test_get_alerts_rules200_response.py create mode 100644 alerts/test/test_get_suppression_windows200_response.py create mode 100644 alerts/test/test_interval_type.py create mode 100644 alerts/test/test_legacy_alert.py create mode 100644 alerts/test/test_link.py create mode 100644 alerts/test/test_notification.py create mode 100644 alerts/test/test_notification_email.py create mode 100644 alerts/test/test_notification_third_party.py create mode 100644 alerts/test/test_notification_webhook.py create mode 100644 alerts/test/test_pagination_links.py create mode 100644 alerts/test/test_pagination_links_links.py create mode 100644 alerts/test/test_repeat.py create mode 100644 alerts/test/test_repeat_type.py create mode 100644 alerts/test/test_rule.py create mode 100644 alerts/test/test_rule_detail.py create mode 100644 alerts/test/test_rule_detail_update.py create mode 100644 alerts/test/test_rules.py create mode 100644 alerts/test/test_self_links.py create mode 100644 alerts/test/test_self_links_links.py create mode 100644 alerts/test/test_severity.py create mode 100644 alerts/test/test_state.py create mode 100644 alerts/test/test_test_interval.py create mode 100644 alerts/test/test_third_party_integration_type.py create mode 100644 alerts/test/test_unauthorized_error.py create mode 100644 alerts/test/test_unexpanded_test.py create mode 100644 alerts/test/test_validation_error.py create mode 100644 alerts/test/test_validation_error_all_of_errors.py create mode 100644 alerts/test/test_webhook_integration_type.py delete mode 100644 alerts_api/.github/workflows/python.yml delete mode 100644 alerts_api/.gitlab-ci.yml delete mode 100644 alerts_api/.openapi-generator/FILES delete mode 100644 alerts_api/.openapi-generator/VERSION delete mode 100644 alerts_api/.travis.yml delete mode 100644 alerts_api/README.md delete mode 100644 alerts_api/alerts_api/__init__.py delete mode 100644 alerts_api/alerts_api/api/__init__.py delete mode 100644 alerts_api/alerts_api/api_client.py delete mode 100644 alerts_api/alerts_api/api_response.py delete mode 100644 alerts_api/alerts_api/configuration.py delete mode 100644 alerts_api/alerts_api/exceptions.py delete mode 100644 alerts_api/alerts_api/models/__init__.py delete mode 100644 alerts_api/alerts_api/models/alert.py delete mode 100644 alerts_api/alerts_api/models/alert_detail.py delete mode 100644 alerts_api/alerts_api/models/alert_links.py delete mode 100644 alerts_api/alerts_api/models/alert_metric_detail.py delete mode 100644 alerts_api/alerts_api/models/alert_metric_detail_end.py delete mode 100644 alerts_api/alerts_api/models/alert_metric_detail_start.py delete mode 100644 alerts_api/alerts_api/models/alert_metrics.py delete mode 100644 alerts_api/alerts_api/models/alert_rounds_violation_mode.py delete mode 100644 alerts_api/alerts_api/models/alert_rule.py delete mode 100644 alerts_api/alerts_api/models/alert_suppression_window.py delete mode 100644 alerts_api/alerts_api/models/alert_suppression_window_request.py delete mode 100644 alerts_api/alerts_api/models/alert_suppression_window_state.py delete mode 100644 alerts_api/alerts_api/models/alert_suppression_windows.py delete mode 100644 alerts_api/alerts_api/models/alert_suppression_windows_alert_suppression_windows_inner.py delete mode 100644 alerts_api/alerts_api/models/alert_type.py delete mode 100644 alerts_api/alerts_api/models/alerts.py delete mode 100644 alerts_api/alerts_api/models/app_links.py delete mode 100644 alerts_api/alerts_api/models/app_links_links.py delete mode 100644 alerts_api/alerts_api/models/base_alert.py delete mode 100644 alerts_api/alerts_api/models/base_test.py delete mode 100644 alerts_api/alerts_api/models/complete_alert_suppression_window.py delete mode 100644 alerts_api/alerts_api/models/create_alert_rule201_response.py delete mode 100644 alerts_api/alerts_api/models/create_suppression_windows201_response.py delete mode 100644 alerts_api/alerts_api/models/days_of_week.py delete mode 100644 alerts_api/alerts_api/models/end_repeat.py delete mode 100644 alerts_api/alerts_api/models/end_repeat_type.py delete mode 100644 alerts_api/alerts_api/models/error.py delete mode 100644 alerts_api/alerts_api/models/expand.py delete mode 100644 alerts_api/alerts_api/models/get_alert_rule_details200_response.py delete mode 100644 alerts_api/alerts_api/models/get_alerts200_response.py delete mode 100644 alerts_api/alerts_api/models/get_alerts_rules200_response.py delete mode 100644 alerts_api/alerts_api/models/get_suppression_windows200_response.py delete mode 100644 alerts_api/alerts_api/models/interval_type.py delete mode 100644 alerts_api/alerts_api/models/link.py delete mode 100644 alerts_api/alerts_api/models/notification.py delete mode 100644 alerts_api/alerts_api/models/notification_email.py delete mode 100644 alerts_api/alerts_api/models/notification_third_party.py delete mode 100644 alerts_api/alerts_api/models/notification_webhook.py delete mode 100644 alerts_api/alerts_api/models/pagination_links.py delete mode 100644 alerts_api/alerts_api/models/pagination_links_links.py delete mode 100644 alerts_api/alerts_api/models/repeat.py delete mode 100644 alerts_api/alerts_api/models/repeat_type.py delete mode 100644 alerts_api/alerts_api/models/rule.py delete mode 100644 alerts_api/alerts_api/models/rule_detail.py delete mode 100644 alerts_api/alerts_api/models/rule_detail_update.py delete mode 100644 alerts_api/alerts_api/models/rule_links.py delete mode 100644 alerts_api/alerts_api/models/rule_links_links.py delete mode 100644 alerts_api/alerts_api/models/rules.py delete mode 100644 alerts_api/alerts_api/models/self_links.py delete mode 100644 alerts_api/alerts_api/models/self_links_links.py delete mode 100644 alerts_api/alerts_api/models/severity.py delete mode 100644 alerts_api/alerts_api/models/state.py delete mode 100644 alerts_api/alerts_api/models/test_direction.py delete mode 100644 alerts_api/alerts_api/models/test_interval.py delete mode 100644 alerts_api/alerts_api/models/third_party_integration_type.py delete mode 100644 alerts_api/alerts_api/models/unauthorized_error.py delete mode 100644 alerts_api/alerts_api/models/unexpanded_test.py delete mode 100644 alerts_api/alerts_api/models/webhook_integration_type.py delete mode 100644 alerts_api/alerts_api/rest.py delete mode 100644 alerts_api/docs/Alert.md delete mode 100644 alerts_api/docs/AlertRoundsViolationMode.md delete mode 100644 alerts_api/docs/AlertRule.md delete mode 100644 alerts_api/docs/AlertType.md delete mode 100644 alerts_api/docs/AppLinks.md delete mode 100644 alerts_api/docs/AppLinksLinks.md delete mode 100644 alerts_api/docs/BaseTest.md delete mode 100644 alerts_api/docs/Error.md delete mode 100644 alerts_api/docs/Expand.md delete mode 100644 alerts_api/docs/Link.md delete mode 100644 alerts_api/docs/Notification.md delete mode 100644 alerts_api/docs/PaginationLinks.md delete mode 100644 alerts_api/docs/PaginationLinksLinks.md delete mode 100644 alerts_api/docs/RuleLinks.md delete mode 100644 alerts_api/docs/RuleLinksLinks.md delete mode 100644 alerts_api/docs/SelfLinks.md delete mode 100644 alerts_api/docs/SelfLinksLinks.md delete mode 100644 alerts_api/docs/Severity.md delete mode 100644 alerts_api/docs/TestDirection.md delete mode 100644 alerts_api/docs/TestInterval.md delete mode 100644 alerts_api/docs/UnauthorizedError.md delete mode 100644 alerts_api/docs/UnexpandedTest.md delete mode 100644 alerts_api/git_push.sh delete mode 100644 alerts_api/pyproject.toml delete mode 100644 alerts_api/setup.py delete mode 100644 alerts_api/test-requirements.txt delete mode 100644 alerts_api/test/test_alert.py delete mode 100644 alerts_api/test/test_alert_detail.py delete mode 100644 alerts_api/test/test_alert_links.py delete mode 100644 alerts_api/test/test_alert_metric_detail.py delete mode 100644 alerts_api/test/test_alert_metric_detail_end.py delete mode 100644 alerts_api/test/test_alert_metric_detail_start.py delete mode 100644 alerts_api/test/test_alert_metrics.py delete mode 100644 alerts_api/test/test_alert_rounds_violation_mode.py delete mode 100644 alerts_api/test/test_alert_rule.py delete mode 100644 alerts_api/test/test_alert_rules_api.py delete mode 100644 alerts_api/test/test_alert_suppression_window.py delete mode 100644 alerts_api/test/test_alert_suppression_window_request.py delete mode 100644 alerts_api/test/test_alert_suppression_window_state.py delete mode 100644 alerts_api/test/test_alert_suppression_windows.py delete mode 100644 alerts_api/test/test_alert_suppression_windows_alert_suppression_windows_inner.py delete mode 100644 alerts_api/test/test_alert_suppression_windows_api.py delete mode 100644 alerts_api/test/test_alert_type.py delete mode 100644 alerts_api/test/test_alerts.py delete mode 100644 alerts_api/test/test_alerts_api.py delete mode 100644 alerts_api/test/test_app_links.py delete mode 100644 alerts_api/test/test_app_links_links.py delete mode 100644 alerts_api/test/test_base_alert.py delete mode 100644 alerts_api/test/test_base_test.py delete mode 100644 alerts_api/test/test_complete_alert_suppression_window.py delete mode 100644 alerts_api/test/test_create_alert_rule201_response.py delete mode 100644 alerts_api/test/test_create_suppression_windows201_response.py delete mode 100644 alerts_api/test/test_days_of_week.py delete mode 100644 alerts_api/test/test_end_repeat.py delete mode 100644 alerts_api/test/test_end_repeat_type.py delete mode 100644 alerts_api/test/test_error.py delete mode 100644 alerts_api/test/test_expand.py delete mode 100644 alerts_api/test/test_get_alert_rule_details200_response.py delete mode 100644 alerts_api/test/test_get_alerts200_response.py delete mode 100644 alerts_api/test/test_get_alerts_rules200_response.py delete mode 100644 alerts_api/test/test_get_suppression_windows200_response.py delete mode 100644 alerts_api/test/test_interval_type.py delete mode 100644 alerts_api/test/test_link.py delete mode 100644 alerts_api/test/test_notification.py delete mode 100644 alerts_api/test/test_notification_email.py delete mode 100644 alerts_api/test/test_notification_third_party.py delete mode 100644 alerts_api/test/test_notification_webhook.py delete mode 100644 alerts_api/test/test_pagination_links.py delete mode 100644 alerts_api/test/test_pagination_links_links.py delete mode 100644 alerts_api/test/test_repeat.py delete mode 100644 alerts_api/test/test_repeat_type.py delete mode 100644 alerts_api/test/test_rule.py delete mode 100644 alerts_api/test/test_rule_detail.py delete mode 100644 alerts_api/test/test_rule_detail_update.py delete mode 100644 alerts_api/test/test_rule_links.py delete mode 100644 alerts_api/test/test_rule_links_links.py delete mode 100644 alerts_api/test/test_rules.py delete mode 100644 alerts_api/test/test_self_links.py delete mode 100644 alerts_api/test/test_self_links_links.py delete mode 100644 alerts_api/test/test_severity.py delete mode 100644 alerts_api/test/test_state.py delete mode 100644 alerts_api/test/test_test_direction.py delete mode 100644 alerts_api/test/test_test_interval.py delete mode 100644 alerts_api/test/test_third_party_integration_type.py delete mode 100644 alerts_api/test/test_unauthorized_error.py delete mode 100644 alerts_api/test/test_unexpanded_test.py delete mode 100644 alerts_api/test/test_webhook_integration_type.py delete mode 100644 alerts_api/tox.ini rename {credentials_api => credentials}/.gitignore (100%) rename {credentials_api => credentials}/.openapi-generator-ignore (100%) create mode 100644 credentials/.openapi-generator/FILES create mode 100644 credentials/.openapi-generator/VERSION create mode 100644 credentials/README.md create mode 100644 credentials/credentials/__init__.py create mode 100644 credentials/credentials/api/__init__.py rename {credentials_api/credentials_api => credentials/credentials}/api/credentials_api.py (95%) create mode 100644 credentials/credentials/api_client.py create mode 100644 credentials/credentials/api_response.py create mode 100644 credentials/credentials/configuration.py create mode 100644 credentials/credentials/exceptions.py create mode 100644 credentials/credentials/models/__init__.py create mode 100644 credentials/credentials/models/credential.py create mode 100644 credentials/credentials/models/credential_request.py create mode 100644 credentials/credentials/models/credential_without_value.py create mode 100644 credentials/credentials/models/credentials.py create mode 100644 credentials/credentials/models/error.py create mode 100644 credentials/credentials/models/get_transaction_tests_credentials_list200_response.py create mode 100644 credentials/credentials/models/link.py create mode 100644 credentials/credentials/models/self_links.py create mode 100644 credentials/credentials/models/self_links_links.py create mode 100644 credentials/credentials/models/unauthorized_error.py create mode 100644 credentials/credentials/models/validation_error.py create mode 100644 credentials/credentials/models/validation_error_all_of_errors.py rename {credentials_api/credentials_api => credentials/credentials}/py.typed (100%) create mode 100644 credentials/credentials/rest.py rename {credentials_api => credentials}/docs/Credential.md (86%) rename {credentials_api => credentials}/docs/CredentialRequest.md (81%) rename {credentials_api => credentials}/docs/CredentialWithoutValue.md (80%) rename {credentials_api => credentials}/docs/Credentials.md (82%) rename {credentials_api => credentials}/docs/CredentialsApi.md (86%) create mode 100644 credentials/docs/Error.md create mode 100644 credentials/docs/GetTransactionTestsCredentialsList200Response.md create mode 100644 credentials/docs/Link.md create mode 100644 credentials/docs/SelfLinks.md create mode 100644 credentials/docs/SelfLinksLinks.md create mode 100644 credentials/docs/UnauthorizedError.md create mode 100644 credentials/docs/ValidationError.md create mode 100644 credentials/docs/ValidationErrorAllOfErrors.md create mode 100644 credentials/pyproject.toml rename {credentials_api => credentials}/requirements.txt (100%) rename {credentials_api => credentials}/setup.cfg (100%) create mode 100644 credentials/setup.py create mode 100644 credentials/test-requirements.txt rename {credentials_api => credentials}/test/__init__.py (100%) create mode 100644 credentials/test/test_credential.py create mode 100644 credentials/test/test_credential_request.py create mode 100644 credentials/test/test_credential_without_value.py create mode 100644 credentials/test/test_credentials.py create mode 100644 credentials/test/test_error.py create mode 100644 credentials/test/test_get_transaction_tests_credentials_list200_response.py create mode 100644 credentials/test/test_link.py create mode 100644 credentials/test/test_self_links.py create mode 100644 credentials/test/test_self_links_links.py create mode 100644 credentials/test/test_unauthorized_error.py create mode 100644 credentials/test/test_validation_error.py create mode 100644 credentials/test/test_validation_error_all_of_errors.py delete mode 100644 credentials_api/.github/workflows/python.yml delete mode 100644 credentials_api/.gitlab-ci.yml delete mode 100644 credentials_api/.openapi-generator/FILES delete mode 100644 credentials_api/.openapi-generator/VERSION delete mode 100644 credentials_api/.travis.yml delete mode 100644 credentials_api/README.md delete mode 100644 credentials_api/credentials_api/__init__.py delete mode 100644 credentials_api/credentials_api/api/__init__.py delete mode 100644 credentials_api/credentials_api/api_client.py delete mode 100644 credentials_api/credentials_api/api_response.py delete mode 100644 credentials_api/credentials_api/configuration.py delete mode 100644 credentials_api/credentials_api/exceptions.py delete mode 100644 credentials_api/credentials_api/models/__init__.py delete mode 100644 credentials_api/credentials_api/models/credential.py delete mode 100644 credentials_api/credentials_api/models/credential_request.py delete mode 100644 credentials_api/credentials_api/models/credential_without_value.py delete mode 100644 credentials_api/credentials_api/models/credentials.py delete mode 100644 credentials_api/credentials_api/models/error.py delete mode 100644 credentials_api/credentials_api/models/get_transaction_tests_credentials_list200_response.py delete mode 100644 credentials_api/credentials_api/models/link.py delete mode 100644 credentials_api/credentials_api/models/self_links.py delete mode 100644 credentials_api/credentials_api/models/self_links_links.py delete mode 100644 credentials_api/credentials_api/models/unauthorized_error.py delete mode 100644 credentials_api/credentials_api/rest.py delete mode 100644 credentials_api/docs/Error.md delete mode 100644 credentials_api/docs/GetTransactionTestsCredentialsList200Response.md delete mode 100644 credentials_api/docs/Link.md delete mode 100644 credentials_api/docs/SelfLinks.md delete mode 100644 credentials_api/docs/SelfLinksLinks.md delete mode 100644 credentials_api/docs/UnauthorizedError.md delete mode 100644 credentials_api/git_push.sh delete mode 100644 credentials_api/pyproject.toml delete mode 100644 credentials_api/setup.py delete mode 100644 credentials_api/test-requirements.txt delete mode 100644 credentials_api/test/test_credential.py delete mode 100644 credentials_api/test/test_credential_request.py delete mode 100644 credentials_api/test/test_credential_without_value.py delete mode 100644 credentials_api/test/test_credentials.py delete mode 100644 credentials_api/test/test_credentials_api.py delete mode 100644 credentials_api/test/test_error.py delete mode 100644 credentials_api/test/test_get_transaction_tests_credentials_list200_response.py delete mode 100644 credentials_api/test/test_link.py delete mode 100644 credentials_api/test/test_self_links.py delete mode 100644 credentials_api/test/test_self_links_links.py delete mode 100644 credentials_api/test/test_unauthorized_error.py delete mode 100644 credentials_api/tox.ini rename {dashboards_api => dashboards}/.gitignore (100%) rename {dashboards_api => dashboards}/.openapi-generator-ignore (100%) create mode 100644 dashboards/.openapi-generator/FILES create mode 100644 dashboards/.openapi-generator/VERSION create mode 100644 dashboards/README.md create mode 100644 dashboards/dashboards/__init__.py create mode 100644 dashboards/dashboards/api/__init__.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/api/dashboard_snapshots_api.py (95%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/api/dashboards_api.py (95%) create mode 100644 dashboards/dashboards/api/dashboards_filters_api.py create mode 100644 dashboards/dashboards/api_client.py create mode 100644 dashboards/dashboards/api_response.py create mode 100644 dashboards/dashboards/configuration.py create mode 100644 dashboards/dashboards/exceptions.py create mode 100644 dashboards/dashboards/models/__init__.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/agent_status_datasource.py (83%) create mode 100644 dashboards/dashboards/models/alert_list_alert_type.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/alert_list_datasource.py (83%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_agent_location.py (79%) create mode 100644 dashboards/dashboards/models/api_agent_status_agent.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_agent_status_ip_info.py (81%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_agent_status_summary.py (80%) create mode 100644 dashboards/dashboards/models/api_agent_status_widget.py create mode 100644 dashboards/dashboards/models/api_agent_widget_show.py create mode 100644 dashboards/dashboards/models/api_agent_widget_type.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_aggregate_property.py (94%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_alert_list_alert.py (82%) create mode 100644 dashboards/dashboards/models/api_alert_list_widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_alert_list_widget_all_of_active_within.py (75%) create mode 100644 dashboards/dashboards/models/api_box_and_whiskers_widget.py create mode 100644 dashboards/dashboards/models/api_color_grid_widget.py create mode 100644 dashboards/dashboards/models/api_context_filter_request.py create mode 100644 dashboards/dashboards/models/api_context_filter_response.py create mode 100644 dashboards/dashboards/models/api_context_filters_response.py create mode 100644 dashboards/dashboards/models/api_dashboard.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_dashboard_asw.py (81%) create mode 100644 dashboards/dashboards/models/api_dashboard_filter_user_details.py create mode 100644 dashboards/dashboards/models/api_dashboard_snapshot.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_data_point_group.py (79%) create mode 100644 dashboards/dashboards/models/api_data_source_filter.py create mode 100644 dashboards/dashboards/models/api_data_source_filters.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_default_timespan.py (80%) create mode 100644 dashboards/dashboards/models/api_duration.py create mode 100644 dashboards/dashboards/models/api_duration_unit.py create mode 100644 dashboards/dashboards/models/api_geo_map_widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_graphlet_point.py (78%) create mode 100644 dashboards/dashboards/models/api_grouped_barchart_widget.py create mode 100644 dashboards/dashboards/models/api_multi_metric_column.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_multi_metric_column_data.py (79%) create mode 100644 dashboards/dashboards/models/api_multi_metric_table_widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_multi_search_filter_api_test_table_filter_key.py (77%) create mode 100644 dashboards/dashboards/models/api_numbers_card.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_numbers_card_data.py (84%) create mode 100644 dashboards/dashboards/models/api_numbers_card_widget.py create mode 100644 dashboards/dashboards/models/api_pie_chart_widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_report_data_component_label_map.py (77%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_report_data_component_label_map_entry.py (79%) create mode 100644 dashboards/dashboards/models/api_report_snapshot_time_span.py create mode 100644 dashboards/dashboards/models/api_stacked_area_chart_widget.py create mode 100644 dashboards/dashboards/models/api_stacked_barchart_widget.py create mode 100644 dashboards/dashboards/models/api_table_widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_test_table_data.py (81%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_test_table_graphlets_data.py (78%) create mode 100644 dashboards/dashboards/models/api_test_table_widget.py create mode 100644 dashboards/dashboards/models/api_timeseries_widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_widget.py (84%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_widget_data_point.py (79%) create mode 100644 dashboards/dashboards/models/api_widget_data_response.py create mode 100644 dashboards/dashboards/models/api_widget_filter_api_test_table_filter_key.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_widget_fixed_y_scale_prefix.py (76%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_widget_measure.py (77%) create mode 100644 dashboards/dashboards/models/api_widget_sort_direction.py create mode 100644 dashboards/dashboards/models/api_widget_sort_property.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/api_widgets_data_v2.py (77%) create mode 100644 dashboards/dashboards/models/app_and_self_links.py create mode 100644 dashboards/dashboards/models/app_and_self_links_links.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/asw_repeat.py (79%) create mode 100644 dashboards/dashboards/models/asw_repeat_unit.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/box_and_whiskers_datasource.py (82%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/color_grid_datasource.py (83%) create mode 100644 dashboards/dashboards/models/create_dashboard_snapshot201_response.py create mode 100644 dashboards/dashboards/models/dashboard.py create mode 100644 dashboards/dashboards/models/dashboard_global_filter_id.py create mode 100644 dashboards/dashboards/models/dashboard_links.py create mode 100644 dashboards/dashboards/models/dashboard_links_links.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/dashboard_metric.py (93%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/dashboard_metric_direction.py (75%) create mode 100644 dashboards/dashboards/models/dashboard_order.py create mode 100644 dashboards/dashboards/models/dashboard_snapshot_id.py create mode 100644 dashboards/dashboards/models/dashboard_snapshots200_response.py create mode 100644 dashboards/dashboards/models/dashboard_snapshots_page.py create mode 100644 dashboards/dashboards/models/default_timespan.py create mode 100644 dashboards/dashboards/models/enterprise_agent_state.py create mode 100644 dashboards/dashboards/models/error.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/generate_dashboard_snapshot_request.py (85%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/geo_map_datasource.py (82%) create mode 100644 dashboards/dashboards/models/get_dashboard_data200_response.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/grouped_bar_chart_datasource.py (82%) create mode 100644 dashboards/dashboards/models/legacy_agent_widget_show.py create mode 100644 dashboards/dashboards/models/legacy_agent_widget_type.py create mode 100644 dashboards/dashboards/models/legacy_alert_list_alert_type.py create mode 100644 dashboards/dashboards/models/legacy_api_dashboard.py create mode 100644 dashboards/dashboards/models/legacy_dashboard_snapshot.py create mode 100644 dashboards/dashboards/models/legacy_default_timespan.py create mode 100644 dashboards/dashboards/models/legacy_duration_unit.py create mode 100644 dashboards/dashboards/models/legacy_widget_sort_direction.py create mode 100644 dashboards/dashboards/models/legacy_widget_sort_property.py create mode 100644 dashboards/dashboards/models/link.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/metric_group.py (88%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/multi_metrics_table_datasource.py (82%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/numbers_card_datasource.py (82%) create mode 100644 dashboards/dashboards/models/pagination_links.py create mode 100644 dashboards/dashboards/models/pagination_links_links.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/pie_chart_datasource.py (77%) create mode 100644 dashboards/dashboards/models/query_window.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/scalable_widget.py (75%) create mode 100644 dashboards/dashboards/models/self_links.py create mode 100644 dashboards/dashboards/models/self_links_links.py create mode 100644 dashboards/dashboards/models/snapshot_data_by_widget200_response.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/stacked_area_chart_datasource.py (77%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/stacked_bar_chart_datasource.py (77%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/table_datasource.py (82%) create mode 100644 dashboards/dashboards/models/test_table_datasource.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/test_table_filter_key.py (76%) create mode 100644 dashboards/dashboards/models/test_table_filter_type.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/timeseries_datasource.py (82%) create mode 100644 dashboards/dashboards/models/unauthorized_error.py create mode 100644 dashboards/dashboards/models/update_snapshot_expiration_date_api_request.py create mode 100644 dashboards/dashboards/models/validation_error.py create mode 100644 dashboards/dashboards/models/validation_error_all_of_errors.py create mode 100644 dashboards/dashboards/models/visual_mode.py create mode 100644 dashboards/dashboards/models/widget.py rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/widget_measure_type.py (79%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/models/widget_type.py (82%) rename {dashboards_api/dashboards_api => dashboards/dashboards}/py.typed (100%) create mode 100644 dashboards/dashboards/rest.py rename {dashboards_api => dashboards}/docs/AgentStatusDatasource.md (99%) create mode 100644 dashboards/docs/AlertListAlertType.md rename {dashboards_api => dashboards}/docs/AlertListDatasource.md (99%) rename {dashboards_api => dashboards}/docs/ApiAgentLocation.md (83%) rename {dashboards_api => dashboards}/docs/ApiAgentStatusAgent.md (84%) rename {dashboards_api => dashboards}/docs/ApiAgentStatusIpInfo.md (81%) rename {dashboards_api => dashboards}/docs/ApiAgentStatusSummary.md (82%) create mode 100644 dashboards/docs/ApiAgentStatusWidget.md create mode 100644 dashboards/docs/ApiAgentWidgetShow.md create mode 100644 dashboards/docs/ApiAgentWidgetType.md rename {dashboards_api => dashboards}/docs/ApiAggregateProperty.md (99%) rename {dashboards_api => dashboards}/docs/ApiAlertListAlert.md (83%) rename {dashboards_api => dashboards}/docs/ApiAlertListWidget.md (75%) create mode 100644 dashboards/docs/ApiAlertListWidgetAllOfActiveWithin.md rename {dashboards_api => dashboards}/docs/ApiBoxAndWhiskersWidget.md (79%) rename {dashboards_api => dashboards}/docs/ApiColorGridWidget.md (76%) create mode 100644 dashboards/docs/ApiContextFilterRequest.md create mode 100644 dashboards/docs/ApiContextFilterResponse.md create mode 100644 dashboards/docs/ApiContextFiltersResponse.md create mode 100644 dashboards/docs/ApiDashboard.md rename {dashboards_api => dashboards}/docs/ApiDashboardAsw.md (86%) create mode 100644 dashboards/docs/ApiDashboardFilterUserDetails.md create mode 100644 dashboards/docs/ApiDashboardSnapshot.md rename {dashboards_api => dashboards}/docs/ApiDataPointGroup.md (82%) create mode 100644 dashboards/docs/ApiDataSourceFilter.md create mode 100644 dashboards/docs/ApiDataSourceFilters.md rename {dashboards_api => dashboards}/docs/ApiDefaultTimespan.md (83%) create mode 100644 dashboards/docs/ApiDuration.md create mode 100644 dashboards/docs/ApiDurationUnit.md rename {dashboards_api => dashboards}/docs/ApiGeoMapWidget.md (76%) rename {dashboards_api => dashboards}/docs/ApiGraphletPoint.md (81%) rename {dashboards_api => dashboards}/docs/ApiGroupedBarchartWidget.md (77%) create mode 100644 dashboards/docs/ApiMultiMetricColumn.md rename {dashboards_api => dashboards}/docs/ApiMultiMetricColumnData.md (83%) rename {dashboards_api => dashboards}/docs/ApiMultiMetricTableWidget.md (77%) rename {dashboards_api => dashboards}/docs/ApiMultiSearchFilterApiTestTableFilterKey.md (75%) create mode 100644 dashboards/docs/ApiNumbersCard.md rename {dashboards_api => dashboards}/docs/ApiNumbersCardData.md (89%) rename {dashboards_api => dashboards}/docs/ApiNumbersCardWidget.md (80%) rename {dashboards_api => dashboards}/docs/ApiPieChartWidget.md (80%) rename {dashboards_api => dashboards}/docs/ApiReportDataComponentLabelMap.md (79%) rename {dashboards_api => dashboards}/docs/ApiReportDataComponentLabelMapEntry.md (76%) rename {dashboards_api => dashboards}/docs/ApiReportSnapshotTimeSpan.md (75%) rename {dashboards_api => dashboards}/docs/ApiStackedAreaChartWidget.md (80%) rename {dashboards_api => dashboards}/docs/ApiStackedBarchartWidget.md (75%) rename {dashboards_api => dashboards}/docs/ApiTableWidget.md (77%) rename {dashboards_api => dashboards}/docs/ApiTestTableData.md (87%) rename {dashboards_api => dashboards}/docs/ApiTestTableGraphletsData.md (80%) rename {dashboards_api => dashboards}/docs/ApiTestTableWidget.md (81%) rename {dashboards_api => dashboards}/docs/ApiTimeseriesWidget.md (81%) rename {dashboards_api => dashboards}/docs/ApiWidget.md (78%) rename {dashboards_api => dashboards}/docs/ApiWidgetDataPoint.md (84%) rename {dashboards_api => dashboards}/docs/ApiWidgetDataResponse.md (82%) rename {dashboards_api => dashboards}/docs/ApiWidgetFilterApiTestTableFilterKey.md (76%) rename {dashboards_api => dashboards}/docs/ApiWidgetFixedYScalePrefix.md (99%) rename {dashboards_api => dashboards}/docs/ApiWidgetMeasure.md (83%) create mode 100644 dashboards/docs/ApiWidgetSortDirection.md create mode 100644 dashboards/docs/ApiWidgetSortProperty.md rename {dashboards_api => dashboards}/docs/ApiWidgetsDataV2.md (90%) create mode 100644 dashboards/docs/AppAndSelfLinks.md create mode 100644 dashboards/docs/AppAndSelfLinksLinks.md rename {dashboards_api => dashboards}/docs/AswRepeat.md (99%) rename {dashboards_api => dashboards}/docs/AswRepeatUnit.md (99%) rename {dashboards_api => dashboards}/docs/BoxAndWhiskersDatasource.md (99%) rename {dashboards_api => dashboards}/docs/ColorGridDatasource.md (99%) create mode 100644 dashboards/docs/CreateDashboardSnapshot201Response.md create mode 100644 dashboards/docs/Dashboard.md create mode 100644 dashboards/docs/DashboardGlobalFilterId.md rename {dashboards_api => dashboards}/docs/DashboardLinks.md (82%) rename {dashboards_api => dashboards}/docs/DashboardLinksLinks.md (79%) rename {dashboards_api => dashboards}/docs/DashboardMetric.md (99%) rename {dashboards_api => dashboards}/docs/DashboardMetricDirection.md (99%) rename {dashboards_api => dashboards}/docs/DashboardOrder.md (99%) create mode 100644 dashboards/docs/DashboardSnapshotId.md rename {dashboards_api => dashboards}/docs/DashboardSnapshots200Response.md (75%) rename {dashboards_api => dashboards}/docs/DashboardSnapshotsApi.md (85%) rename {dashboards_api => dashboards}/docs/DashboardSnapshotsPage.md (76%) rename {dashboards_api => dashboards}/docs/DashboardsApi.md (86%) create mode 100644 dashboards/docs/DashboardsFiltersApi.md create mode 100644 dashboards/docs/DefaultTimespan.md create mode 100644 dashboards/docs/EnterpriseAgentState.md create mode 100644 dashboards/docs/Error.md rename {dashboards_api => dashboards}/docs/GenerateDashboardSnapshotRequest.md (85%) rename {dashboards_api => dashboards}/docs/GeoMapDatasource.md (99%) rename {dashboards_api => dashboards}/docs/GetDashboardData200Response.md (82%) rename {dashboards_api => dashboards}/docs/GroupedBarChartDatasource.md (99%) create mode 100644 dashboards/docs/LegacyAgentWidgetShow.md create mode 100644 dashboards/docs/LegacyAgentWidgetType.md create mode 100644 dashboards/docs/LegacyAlertListAlertType.md create mode 100644 dashboards/docs/LegacyApiDashboard.md create mode 100644 dashboards/docs/LegacyDashboardSnapshot.md create mode 100644 dashboards/docs/LegacyDefaultTimespan.md create mode 100644 dashboards/docs/LegacyDurationUnit.md create mode 100644 dashboards/docs/LegacyWidgetSortDirection.md create mode 100644 dashboards/docs/LegacyWidgetSortProperty.md create mode 100644 dashboards/docs/Link.md rename {dashboards_api => dashboards}/docs/MetricGroup.md (99%) rename {dashboards_api => dashboards}/docs/MultiMetricsTableDatasource.md (99%) rename {dashboards_api => dashboards}/docs/NumbersCardDatasource.md (99%) create mode 100644 dashboards/docs/PaginationLinks.md create mode 100644 dashboards/docs/PaginationLinksLinks.md rename {dashboards_api => dashboards}/docs/PieChartDatasource.md (99%) create mode 100644 dashboards/docs/QueryWindow.md rename {dashboards_api => dashboards}/docs/ScalableWidget.md (78%) create mode 100644 dashboards/docs/SelfLinks.md create mode 100644 dashboards/docs/SelfLinksLinks.md create mode 100644 dashboards/docs/SnapshotDataByWidget200Response.md rename {dashboards_api => dashboards}/docs/StackedAreaChartDatasource.md (99%) rename {dashboards_api => dashboards}/docs/StackedBarChartDatasource.md (99%) rename {dashboards_api => dashboards}/docs/TableDatasource.md (99%) rename {dashboards_api => dashboards}/docs/TestTableDatasource.md (99%) rename {dashboards_api => dashboards}/docs/TestTableFilterKey.md (99%) rename {dashboards_api => dashboards}/docs/TestTableFilterType.md (99%) rename {dashboards_api => dashboards}/docs/TimeseriesDatasource.md (99%) create mode 100644 dashboards/docs/UnauthorizedError.md create mode 100644 dashboards/docs/UpdateSnapshotExpirationDateApiRequest.md create mode 100644 dashboards/docs/ValidationError.md create mode 100644 dashboards/docs/ValidationErrorAllOfErrors.md rename {dashboards_api => dashboards}/docs/VisualMode.md (99%) rename {dashboards_api => dashboards}/docs/Widget.md (81%) rename {dashboards_api => dashboards}/docs/WidgetMeasureType.md (99%) rename {dashboards_api => dashboards}/docs/WidgetType.md (99%) create mode 100644 dashboards/pyproject.toml rename {dashboards_api => dashboards}/requirements.txt (100%) rename {dashboards_api => dashboards}/setup.cfg (100%) create mode 100644 dashboards/setup.py create mode 100644 dashboards/test-requirements.txt rename {dashboards_api => dashboards}/test/__init__.py (100%) create mode 100644 dashboards/test/test_agent_status_datasource.py create mode 100644 dashboards/test/test_alert_list_alert_type.py create mode 100644 dashboards/test/test_alert_list_datasource.py rename {dashboards_api => dashboards}/test/test_api_agent_location.py (88%) rename {dashboards_api => dashboards}/test/test_api_agent_status_agent.py (82%) rename {dashboards_api => dashboards}/test/test_api_agent_status_ip_info.py (88%) rename {dashboards_api => dashboards}/test/test_api_agent_status_summary.py (87%) create mode 100644 dashboards/test/test_api_agent_status_widget.py create mode 100644 dashboards/test/test_api_agent_widget_show.py create mode 100644 dashboards/test/test_api_agent_widget_type.py create mode 100644 dashboards/test/test_api_aggregate_property.py rename {dashboards_api => dashboards}/test/test_api_alert_list_alert.py (86%) rename {dashboards_api => dashboards}/test/test_api_alert_list_widget.py (78%) rename {dashboards_api => dashboards}/test/test_api_alert_list_widget_all_of_active_within.py (85%) rename {dashboards_api => dashboards}/test/test_api_box_and_whiskers_widget.py (79%) rename {dashboards_api => dashboards}/test/test_api_color_grid_widget.py (80%) create mode 100644 dashboards/test/test_api_context_filter_request.py create mode 100644 dashboards/test/test_api_context_filter_response.py create mode 100644 dashboards/test/test_api_context_filters_response.py rename {dashboards_api => dashboards}/test/test_api_dashboard.py (75%) rename {dashboards_api => dashboards}/test/test_api_dashboard_asw.py (89%) create mode 100644 dashboards/test/test_api_dashboard_filter_user_details.py create mode 100644 dashboards/test/test_api_dashboard_snapshot.py rename {dashboards_api => dashboards}/test/test_api_data_point_group.py (87%) create mode 100644 dashboards/test/test_api_data_source_filter.py create mode 100644 dashboards/test/test_api_data_source_filters.py rename {dashboards_api => dashboards}/test/test_api_default_timespan.py (88%) rename {dashboards_api => dashboards}/test/test_api_duration.py (85%) create mode 100644 dashboards/test/test_api_duration_unit.py rename {dashboards_api => dashboards}/test/test_api_geo_map_widget.py (80%) rename {dashboards_api => dashboards}/test/test_api_graphlet_point.py (87%) rename {dashboards_api => dashboards}/test/test_api_grouped_barchart_widget.py (78%) rename {dashboards_api => dashboards}/test/test_api_multi_metric_column.py (79%) rename {dashboards_api => dashboards}/test/test_api_multi_metric_column_data.py (83%) create mode 100644 dashboards/test/test_api_multi_metric_table_widget.py rename {dashboards_api => dashboards}/test/test_api_multi_search_filter_api_test_table_filter_key.py (86%) rename {dashboards_api => dashboards}/test/test_api_numbers_card.py (77%) rename {dashboards_api => dashboards}/test/test_api_numbers_card_data.py (88%) rename {dashboards_api => dashboards}/test/test_api_numbers_card_widget.py (75%) rename {dashboards_api => dashboards}/test/test_api_pie_chart_widget.py (78%) rename {dashboards_api => dashboards}/test/test_api_report_data_component_label_map.py (82%) rename {dashboards_api => dashboards}/test/test_api_report_data_component_label_map_entry.py (87%) rename {dashboards_api => dashboards}/test/test_api_report_snapshot_time_span.py (85%) rename {dashboards_api => dashboards}/test/test_api_stacked_area_chart_widget.py (77%) rename {dashboards_api => dashboards}/test/test_api_stacked_barchart_widget.py (78%) rename {dashboards_api => dashboards}/test/test_api_table_widget.py (78%) rename {dashboards_api => dashboards}/test/test_api_test_table_data.py (82%) rename {dashboards_api => dashboards}/test/test_api_test_table_graphlets_data.py (84%) create mode 100644 dashboards/test/test_api_test_table_widget.py rename {dashboards_api => dashboards}/test/test_api_timeseries_widget.py (80%) create mode 100644 dashboards/test/test_api_widget.py rename {dashboards_api => dashboards}/test/test_api_widget_data_point.py (84%) rename {dashboards_api => dashboards}/test/test_api_widget_data_response.py (76%) rename {dashboards_api => dashboards}/test/test_api_widget_filter_api_test_table_filter_key.py (81%) create mode 100644 dashboards/test/test_api_widget_fixed_y_scale_prefix.py rename {dashboards_api => dashboards}/test/test_api_widget_measure.py (87%) create mode 100644 dashboards/test/test_api_widget_sort_direction.py create mode 100644 dashboards/test/test_api_widget_sort_property.py rename {dashboards_api => dashboards}/test/test_api_widgets_data_v2.py (77%) create mode 100644 dashboards/test/test_app_and_self_links.py create mode 100644 dashboards/test/test_app_and_self_links_links.py rename {dashboards_api => dashboards}/test/test_asw_repeat.py (75%) rename {dashboards_api => dashboards}/test/test_asw_repeat_unit.py (75%) create mode 100644 dashboards/test/test_box_and_whiskers_datasource.py create mode 100644 dashboards/test/test_color_grid_datasource.py create mode 100644 dashboards/test/test_create_dashboard_snapshot201_response.py create mode 100644 dashboards/test/test_dashboard.py create mode 100644 dashboards/test/test_dashboard_global_filter_id.py rename {dashboards_api => dashboards}/test/test_dashboard_links.py (83%) rename {dashboards_api => dashboards}/test/test_dashboard_links_links.py (86%) rename {dashboards_api => dashboards}/test/test_dashboard_metric.py (75%) create mode 100644 dashboards/test/test_dashboard_metric_direction.py rename {dashboards_api => dashboards}/test/test_dashboard_order.py (75%) create mode 100644 dashboards/test/test_dashboard_snapshot_id.py rename {dashboards_api => dashboards}/test/test_dashboard_snapshots200_response.py (80%) rename {dashboards_api => dashboards}/test/test_dashboard_snapshots_page.py (87%) create mode 100644 dashboards/test/test_default_timespan.py create mode 100644 dashboards/test/test_enterprise_agent_state.py create mode 100644 dashboards/test/test_error.py rename {dashboards_api => dashboards}/test/test_generate_dashboard_snapshot_request.py (89%) rename {dashboards_api => dashboards}/test/test_geo_map_datasource.py (75%) create mode 100644 dashboards/test/test_get_dashboard_data200_response.py create mode 100644 dashboards/test/test_grouped_bar_chart_datasource.py create mode 100644 dashboards/test/test_legacy_agent_widget_show.py create mode 100644 dashboards/test/test_legacy_agent_widget_type.py create mode 100644 dashboards/test/test_legacy_alert_list_alert_type.py create mode 100644 dashboards/test/test_legacy_api_dashboard.py create mode 100644 dashboards/test/test_legacy_dashboard_snapshot.py create mode 100644 dashboards/test/test_legacy_default_timespan.py create mode 100644 dashboards/test/test_legacy_duration_unit.py create mode 100644 dashboards/test/test_legacy_widget_sort_direction.py create mode 100644 dashboards/test/test_legacy_widget_sort_property.py create mode 100644 dashboards/test/test_link.py rename {dashboards_api => dashboards}/test/test_metric_group.py (75%) create mode 100644 dashboards/test/test_multi_metrics_table_datasource.py create mode 100644 dashboards/test/test_numbers_card_datasource.py create mode 100644 dashboards/test/test_pagination_links.py create mode 100644 dashboards/test/test_pagination_links_links.py create mode 100644 dashboards/test/test_pie_chart_datasource.py create mode 100644 dashboards/test/test_query_window.py rename {dashboards_api => dashboards}/test/test_scalable_widget.py (88%) create mode 100644 dashboards/test/test_self_links.py create mode 100644 dashboards/test/test_self_links_links.py rename {dashboards_api => dashboards}/test/test_snapshot_data_by_widget200_response.py (76%) create mode 100644 dashboards/test/test_stacked_area_chart_datasource.py create mode 100644 dashboards/test/test_stacked_bar_chart_datasource.py create mode 100644 dashboards/test/test_table_datasource.py create mode 100644 dashboards/test/test_test_table_datasource.py create mode 100644 dashboards/test/test_test_table_filter_key.py create mode 100644 dashboards/test/test_test_table_filter_type.py rename {dashboards_api => dashboards}/test/test_timeseries_datasource.py (75%) create mode 100644 dashboards/test/test_unauthorized_error.py rename {dashboards_api => dashboards}/test/test_update_snapshot_expiration_date_api_request.py (84%) create mode 100644 dashboards/test/test_validation_error.py create mode 100644 dashboards/test/test_validation_error_all_of_errors.py rename {dashboards_api => dashboards}/test/test_visual_mode.py (75%) rename {dashboards_api => dashboards}/test/test_widget.py (80%) rename {dashboards_api => dashboards}/test/test_widget_measure_type.py (75%) rename {dashboards_api => dashboards}/test/test_widget_type.py (75%) delete mode 100644 dashboards_api/.github/workflows/python.yml delete mode 100644 dashboards_api/.gitlab-ci.yml delete mode 100644 dashboards_api/.openapi-generator/FILES delete mode 100644 dashboards_api/.openapi-generator/VERSION delete mode 100644 dashboards_api/.travis.yml delete mode 100644 dashboards_api/README.md delete mode 100644 dashboards_api/dashboards_api/__init__.py delete mode 100644 dashboards_api/dashboards_api/api/__init__.py delete mode 100644 dashboards_api/dashboards_api/api_client.py delete mode 100644 dashboards_api/dashboards_api/api_response.py delete mode 100644 dashboards_api/dashboards_api/configuration.py delete mode 100644 dashboards_api/dashboards_api/exceptions.py delete mode 100644 dashboards_api/dashboards_api/models/__init__.py delete mode 100644 dashboards_api/dashboards_api/models/agent_widget_show.py delete mode 100644 dashboards_api/dashboards_api/models/agent_widget_type.py delete mode 100644 dashboards_api/dashboards_api/models/api_agent_status_agent.py delete mode 100644 dashboards_api/dashboards_api/models/api_agent_status_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_alert_list_alert_type.py delete mode 100644 dashboards_api/dashboards_api/models/api_alert_list_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_box_and_whiskers_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_color_grid_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_dashboard.py delete mode 100644 dashboards_api/dashboards_api/models/api_dashboard_snapshot.py delete mode 100644 dashboards_api/dashboards_api/models/api_dashboard_snapshot_all_of_dashboard.py delete mode 100644 dashboards_api/dashboards_api/models/api_duration.py delete mode 100644 dashboards_api/dashboards_api/models/api_geo_map_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_grouped_barchart_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_multi_metric_column.py delete mode 100644 dashboards_api/dashboards_api/models/api_multi_metric_table_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_numbers_card.py delete mode 100644 dashboards_api/dashboards_api/models/api_numbers_card_all_of_fixed_timespan.py delete mode 100644 dashboards_api/dashboards_api/models/api_numbers_card_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_pie_chart_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_report_snapshot_time_span.py delete mode 100644 dashboards_api/dashboards_api/models/api_stacked_area_chart_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_stacked_barchart_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_table_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_test_table_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_timeseries_widget.py delete mode 100644 dashboards_api/dashboards_api/models/api_widget_data_response.py delete mode 100644 dashboards_api/dashboards_api/models/api_widget_filter_api_test_table_filter_key.py delete mode 100644 dashboards_api/dashboards_api/models/asw_repeat_unit.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_links.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_links_links.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_order.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_snapshot_links.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_snapshot_links_links.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_snapshots200_response.py delete mode 100644 dashboards_api/dashboards_api/models/dashboard_snapshots_page.py delete mode 100644 dashboards_api/dashboards_api/models/duration_unit.py delete mode 100644 dashboards_api/dashboards_api/models/enterprise_agent_state.py delete mode 100644 dashboards_api/dashboards_api/models/error.py delete mode 100644 dashboards_api/dashboards_api/models/get_dashboard_data200_response.py delete mode 100644 dashboards_api/dashboards_api/models/link.py delete mode 100644 dashboards_api/dashboards_api/models/pagination_links.py delete mode 100644 dashboards_api/dashboards_api/models/pagination_links_links.py delete mode 100644 dashboards_api/dashboards_api/models/query_window.py delete mode 100644 dashboards_api/dashboards_api/models/self_links.py delete mode 100644 dashboards_api/dashboards_api/models/self_links_links.py delete mode 100644 dashboards_api/dashboards_api/models/snapshot_data_by_widget200_response.py delete mode 100644 dashboards_api/dashboards_api/models/test_table_datasource.py delete mode 100644 dashboards_api/dashboards_api/models/test_table_filter_type.py delete mode 100644 dashboards_api/dashboards_api/models/unauthorized_error.py delete mode 100644 dashboards_api/dashboards_api/models/update_snapshot_expiration_date_api_request.py delete mode 100644 dashboards_api/dashboards_api/models/visual_mode.py delete mode 100644 dashboards_api/dashboards_api/models/widget.py delete mode 100644 dashboards_api/dashboards_api/models/widget_sort_direction.py delete mode 100644 dashboards_api/dashboards_api/models/widget_sort_property.py delete mode 100644 dashboards_api/dashboards_api/rest.py delete mode 100644 dashboards_api/docs/AgentWidgetShow.md delete mode 100644 dashboards_api/docs/AgentWidgetType.md delete mode 100644 dashboards_api/docs/ApiAgentStatusWidget.md delete mode 100644 dashboards_api/docs/ApiAlertListAlertType.md delete mode 100644 dashboards_api/docs/ApiAlertListWidgetAllOfActiveWithin.md delete mode 100644 dashboards_api/docs/ApiDashboard.md delete mode 100644 dashboards_api/docs/ApiDashboardSnapshot.md delete mode 100644 dashboards_api/docs/ApiDashboardSnapshotAllOfDashboard.md delete mode 100644 dashboards_api/docs/ApiDuration.md delete mode 100644 dashboards_api/docs/ApiMultiMetricColumn.md delete mode 100644 dashboards_api/docs/ApiNumbersCard.md delete mode 100644 dashboards_api/docs/ApiNumbersCardAllOfFixedTimespan.md delete mode 100644 dashboards_api/docs/DashboardSnapshotLinks.md delete mode 100644 dashboards_api/docs/DashboardSnapshotLinksLinks.md delete mode 100644 dashboards_api/docs/DurationUnit.md delete mode 100644 dashboards_api/docs/EnterpriseAgentState.md delete mode 100644 dashboards_api/docs/Error.md delete mode 100644 dashboards_api/docs/Link.md delete mode 100644 dashboards_api/docs/PaginationLinks.md delete mode 100644 dashboards_api/docs/PaginationLinksLinks.md delete mode 100644 dashboards_api/docs/QueryWindow.md delete mode 100644 dashboards_api/docs/SelfLinks.md delete mode 100644 dashboards_api/docs/SelfLinksLinks.md delete mode 100644 dashboards_api/docs/SnapshotDataByWidget200Response.md delete mode 100644 dashboards_api/docs/UnauthorizedError.md delete mode 100644 dashboards_api/docs/UpdateSnapshotExpirationDateApiRequest.md delete mode 100644 dashboards_api/docs/WidgetSortDirection.md delete mode 100644 dashboards_api/docs/WidgetSortProperty.md delete mode 100644 dashboards_api/git_push.sh delete mode 100644 dashboards_api/pyproject.toml delete mode 100644 dashboards_api/setup.py delete mode 100644 dashboards_api/test-requirements.txt delete mode 100644 dashboards_api/test/test_agent_status_datasource.py delete mode 100644 dashboards_api/test/test_agent_widget_show.py delete mode 100644 dashboards_api/test/test_agent_widget_type.py delete mode 100644 dashboards_api/test/test_alert_list_datasource.py delete mode 100644 dashboards_api/test/test_api_agent_status_widget.py delete mode 100644 dashboards_api/test/test_api_aggregate_property.py delete mode 100644 dashboards_api/test/test_api_alert_list_alert_type.py delete mode 100644 dashboards_api/test/test_api_dashboard_snapshot.py delete mode 100644 dashboards_api/test/test_api_dashboard_snapshot_all_of_dashboard.py delete mode 100644 dashboards_api/test/test_api_multi_metric_table_widget.py delete mode 100644 dashboards_api/test/test_api_numbers_card_all_of_fixed_timespan.py delete mode 100644 dashboards_api/test/test_api_test_table_widget.py delete mode 100644 dashboards_api/test/test_api_widget.py delete mode 100644 dashboards_api/test/test_api_widget_fixed_y_scale_prefix.py delete mode 100644 dashboards_api/test/test_box_and_whiskers_datasource.py delete mode 100644 dashboards_api/test/test_color_grid_datasource.py delete mode 100644 dashboards_api/test/test_dashboard_metric_direction.py delete mode 100644 dashboards_api/test/test_dashboard_snapshot_links.py delete mode 100644 dashboards_api/test/test_dashboard_snapshot_links_links.py delete mode 100644 dashboards_api/test/test_dashboard_snapshots_api.py delete mode 100644 dashboards_api/test/test_dashboards_api.py delete mode 100644 dashboards_api/test/test_duration_unit.py delete mode 100644 dashboards_api/test/test_enterprise_agent_state.py delete mode 100644 dashboards_api/test/test_error.py delete mode 100644 dashboards_api/test/test_get_dashboard_data200_response.py delete mode 100644 dashboards_api/test/test_grouped_bar_chart_datasource.py delete mode 100644 dashboards_api/test/test_link.py delete mode 100644 dashboards_api/test/test_multi_metrics_table_datasource.py delete mode 100644 dashboards_api/test/test_numbers_card_datasource.py delete mode 100644 dashboards_api/test/test_pagination_links.py delete mode 100644 dashboards_api/test/test_pagination_links_links.py delete mode 100644 dashboards_api/test/test_pie_chart_datasource.py delete mode 100644 dashboards_api/test/test_query_window.py delete mode 100644 dashboards_api/test/test_self_links.py delete mode 100644 dashboards_api/test/test_self_links_links.py delete mode 100644 dashboards_api/test/test_stacked_area_chart_datasource.py delete mode 100644 dashboards_api/test/test_stacked_bar_chart_datasource.py delete mode 100644 dashboards_api/test/test_table_datasource.py delete mode 100644 dashboards_api/test/test_test_table_datasource.py delete mode 100644 dashboards_api/test/test_test_table_filter_key.py delete mode 100644 dashboards_api/test/test_test_table_filter_type.py delete mode 100644 dashboards_api/test/test_unauthorized_error.py delete mode 100644 dashboards_api/test/test_widget_sort_direction.py delete mode 100644 dashboards_api/test/test_widget_sort_property.py delete mode 100644 dashboards_api/tox.ini delete mode 100644 endpoint/agents_api/.github/workflows/python.yml delete mode 100644 endpoint/agents_api/.gitlab-ci.yml delete mode 100644 endpoint/agents_api/.openapi-generator/FILES delete mode 100644 endpoint/agents_api/.openapi-generator/VERSION delete mode 100644 endpoint/agents_api/.travis.yml delete mode 100644 endpoint/agents_api/README.md delete mode 100644 endpoint/agents_api/agents_api/__init__.py delete mode 100644 endpoint/agents_api/agents_api/api/__init__.py delete mode 100644 endpoint/agents_api/agents_api/api_client.py delete mode 100644 endpoint/agents_api/agents_api/api_response.py delete mode 100644 endpoint/agents_api/agents_api/configuration.py delete mode 100644 endpoint/agents_api/agents_api/exceptions.py delete mode 100644 endpoint/agents_api/agents_api/models/__init__.py delete mode 100644 endpoint/agents_api/agents_api/models/account_group_id.py delete mode 100644 endpoint/agents_api/agents_api/models/address_type.py delete mode 100644 endpoint/agents_api/agents_api/models/agent_license_type.py delete mode 100644 endpoint/agents_api/agents_api/models/agent_search_request.py delete mode 100644 endpoint/agents_api/agents_api/models/agent_transfer_request.py delete mode 100644 endpoint/agents_api/agents_api/models/browser_type.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agent_aid.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer_request.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agent_location.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agent_update.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agents.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agents_connection_string200_response.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agents_list200_response.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_agents_search200_response.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_asn_details.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_client.py delete mode 100644 endpoint/agents_api/agents_api/models/endpoint_user_profile.py delete mode 100644 endpoint/agents_api/agents_api/models/error.py delete mode 100644 endpoint/agents_api/agents_api/models/ethernet_profile.py delete mode 100644 endpoint/agents_api/agents_api/models/expand.py delete mode 100644 endpoint/agents_api/agents_api/models/interface_hardware_type.py delete mode 100644 endpoint/agents_api/agents_api/models/interface_profile.py delete mode 100644 endpoint/agents_api/agents_api/models/link.py delete mode 100644 endpoint/agents_api/agents_api/models/pagination_next_link.py delete mode 100644 endpoint/agents_api/agents_api/models/pagination_next_link_links.py delete mode 100644 endpoint/agents_api/agents_api/models/platform.py delete mode 100644 endpoint/agents_api/agents_api/models/self_links.py delete mode 100644 endpoint/agents_api/agents_api/models/self_links_links.py delete mode 100644 endpoint/agents_api/agents_api/models/status.py delete mode 100644 endpoint/agents_api/agents_api/models/unauthorized_error.py delete mode 100644 endpoint/agents_api/agents_api/models/vpn_type.py delete mode 100644 endpoint/agents_api/agents_api/models/wireless_profile.py delete mode 100644 endpoint/agents_api/agents_api/rest.py delete mode 100644 endpoint/agents_api/docs/AccountGroupId.md delete mode 100644 endpoint/agents_api/docs/AgentSearchRequest.md delete mode 100644 endpoint/agents_api/docs/EndpointAgentAid.md delete mode 100644 endpoint/agents_api/docs/EndpointAgentUpdate.md delete mode 100644 endpoint/agents_api/docs/EndpointAgentsList200Response.md delete mode 100644 endpoint/agents_api/docs/Error.md delete mode 100644 endpoint/agents_api/docs/EthernetProfile.md delete mode 100644 endpoint/agents_api/docs/Expand.md delete mode 100644 endpoint/agents_api/docs/InterfaceHardwareType.md delete mode 100644 endpoint/agents_api/docs/Link.md delete mode 100644 endpoint/agents_api/docs/PaginationNextLink.md delete mode 100644 endpoint/agents_api/docs/PaginationNextLinkLinks.md delete mode 100644 endpoint/agents_api/docs/Platform.md delete mode 100644 endpoint/agents_api/docs/SelfLinks.md delete mode 100644 endpoint/agents_api/docs/SelfLinksLinks.md delete mode 100644 endpoint/agents_api/docs/UnauthorizedError.md delete mode 100644 endpoint/agents_api/docs/VpnType.md delete mode 100644 endpoint/agents_api/git_push.sh delete mode 100644 endpoint/agents_api/pyproject.toml delete mode 100644 endpoint/agents_api/setup.py delete mode 100644 endpoint/agents_api/test-requirements.txt delete mode 100644 endpoint/agents_api/test/test_account_group_id.py delete mode 100644 endpoint/agents_api/test/test_address_type.py delete mode 100644 endpoint/agents_api/test/test_administrative_endpoints_api.py delete mode 100644 endpoint/agents_api/test/test_agent_license_type.py delete mode 100644 endpoint/agents_api/test/test_agent_search_request.py delete mode 100644 endpoint/agents_api/test/test_browser_type.py delete mode 100644 endpoint/agents_api/test/test_endpoint_agent_aid.py delete mode 100644 endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response.py delete mode 100644 endpoint/agents_api/test/test_endpoint_agents_list200_response.py delete mode 100644 endpoint/agents_api/test/test_endpoint_client.py delete mode 100644 endpoint/agents_api/test/test_error.py delete mode 100644 endpoint/agents_api/test/test_ethernet_profile.py delete mode 100644 endpoint/agents_api/test/test_expand.py delete mode 100644 endpoint/agents_api/test/test_interface_hardware_type.py delete mode 100644 endpoint/agents_api/test/test_link.py delete mode 100644 endpoint/agents_api/test/test_manage_agents_api.py delete mode 100644 endpoint/agents_api/test/test_pagination_next_link.py delete mode 100644 endpoint/agents_api/test/test_pagination_next_link_links.py delete mode 100644 endpoint/agents_api/test/test_platform.py delete mode 100644 endpoint/agents_api/test/test_self_links.py delete mode 100644 endpoint/agents_api/test/test_self_links_links.py delete mode 100644 endpoint/agents_api/test/test_status.py delete mode 100644 endpoint/agents_api/test/test_transfer_api.py delete mode 100644 endpoint/agents_api/test/test_unauthorized_error.py delete mode 100644 endpoint/agents_api/test/test_vpn_type.py delete mode 100644 endpoint/agents_api/tox.ini delete mode 100644 endpoint/instant_tests_api/.github/workflows/python.yml delete mode 100644 endpoint/instant_tests_api/.gitlab-ci.yml delete mode 100644 endpoint/instant_tests_api/.openapi-generator/FILES delete mode 100644 endpoint/instant_tests_api/.openapi-generator/VERSION delete mode 100644 endpoint/instant_tests_api/.travis.yml delete mode 100644 endpoint/instant_tests_api/README.md delete mode 100644 endpoint/instant_tests_api/docs/AccountGroupId.md delete mode 100644 endpoint/instant_tests_api/docs/AgentLabelsSelectorType.md delete mode 100644 endpoint/instant_tests_api/docs/AllAgentsSelectorType.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointAgentLabelsSelectorConfig.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointAgentSelectorConfig.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointAgentToServerInstantTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointAgentToServerTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointAgentToServerType.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointAllAgentsSelectorConfig.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointHttpServerBaseTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointHttpServerInstantTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointHttpServerTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointHttpServerType.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointInstantTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointScheduledTestType.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointSpecificAgentsSelectorConfig.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTest.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestAgentSelectorType.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestAid.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestAuthType.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestLinks.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestLinksSelf.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestLinksTestResults.md delete mode 100644 endpoint/instant_tests_api/docs/EndpointTestProtocol.md delete mode 100644 endpoint/instant_tests_api/docs/Error.md delete mode 100644 endpoint/instant_tests_api/docs/Link.md delete mode 100644 endpoint/instant_tests_api/docs/SpecificAgentsSelectorType.md delete mode 100644 endpoint/instant_tests_api/docs/TestInterval.md delete mode 100644 endpoint/instant_tests_api/docs/TestProbeMode.md delete mode 100644 endpoint/instant_tests_api/docs/TestSslVersionId.md delete mode 100644 endpoint/instant_tests_api/docs/UnauthorizedError.md delete mode 100644 endpoint/instant_tests_api/git_push.sh delete mode 100644 endpoint/instant_tests_api/instant_tests_api/__init__.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/api/__init__.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/api_client.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/api_response.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/configuration.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/exceptions.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/__init__.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/account_group_id.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/agent_labels_selector_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/all_agents_selector_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_labels_selector_config.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_selector_config.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_instant_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_all_agents_selector_config.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_base_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_instant_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_instant_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_scheduled_test_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_specific_agents_selector_config.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_agent_selector_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_aid.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_auth_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_self.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_test_results.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_protocol.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/error.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/link.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/specific_agents_selector_type.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/test_interval.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/test_probe_mode.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/models/unauthorized_error.py delete mode 100644 endpoint/instant_tests_api/instant_tests_api/rest.py delete mode 100644 endpoint/instant_tests_api/pyproject.toml delete mode 100644 endpoint/instant_tests_api/setup.py delete mode 100644 endpoint/instant_tests_api/test-requirements.txt delete mode 100644 endpoint/instant_tests_api/test/test_account_group_id.py delete mode 100644 endpoint/instant_tests_api/test/test_agent_labels_selector_type.py delete mode 100644 endpoint/instant_tests_api/test/test_agent_to_server_instant_scheduled_test_api.py delete mode 100644 endpoint/instant_tests_api/test/test_all_agents_selector_type.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_agent_labels_selector_config.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_agent_selector_config.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_agent_to_server_instant_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_agent_to_server_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_agent_to_server_type.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_all_agents_selector_config.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_http_server_base_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_http_server_instant_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_http_server_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_http_server_type.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_instant_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_scheduled_test_type.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_specific_agents_selector_config.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_agent_selector_type.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_aid.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_auth_type.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_links.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_links_self.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_links_test_results.py delete mode 100644 endpoint/instant_tests_api/test/test_endpoint_test_protocol.py delete mode 100644 endpoint/instant_tests_api/test/test_error.py delete mode 100644 endpoint/instant_tests_api/test/test_http_server_instant_scheduled_test_api.py delete mode 100644 endpoint/instant_tests_api/test/test_link.py delete mode 100644 endpoint/instant_tests_api/test/test_run_existing_test_api.py delete mode 100644 endpoint/instant_tests_api/test/test_specific_agents_selector_type.py delete mode 100644 endpoint/instant_tests_api/test/test_test_interval.py delete mode 100644 endpoint/instant_tests_api/test/test_test_probe_mode.py delete mode 100644 endpoint/instant_tests_api/test/test_test_ssl_version_id.py delete mode 100644 endpoint/instant_tests_api/test/test_unauthorized_error.py delete mode 100644 endpoint/instant_tests_api/tox.ini delete mode 100644 endpoint/labels_api/.github/workflows/python.yml delete mode 100644 endpoint/labels_api/.gitlab-ci.yml delete mode 100644 endpoint/labels_api/.openapi-generator/FILES delete mode 100644 endpoint/labels_api/.openapi-generator/VERSION delete mode 100644 endpoint/labels_api/.travis.yml delete mode 100644 endpoint/labels_api/README.md delete mode 100644 endpoint/labels_api/docs/EndpointLabelsList200Response.md delete mode 100644 endpoint/labels_api/docs/Error.md delete mode 100644 endpoint/labels_api/docs/Expand.md delete mode 100644 endpoint/labels_api/docs/Label.md delete mode 100644 endpoint/labels_api/docs/Labels.md delete mode 100644 endpoint/labels_api/docs/Link.md delete mode 100644 endpoint/labels_api/docs/ManageLabelsApi.md delete mode 100644 endpoint/labels_api/docs/PaginationNextLink.md delete mode 100644 endpoint/labels_api/docs/PaginationNextLinkLinks.md delete mode 100644 endpoint/labels_api/docs/SelfLinks.md delete mode 100644 endpoint/labels_api/docs/SelfLinksLinks.md delete mode 100644 endpoint/labels_api/docs/UnauthorizedError.md delete mode 100644 endpoint/labels_api/git_push.sh delete mode 100644 endpoint/labels_api/labels_api/__init__.py delete mode 100644 endpoint/labels_api/labels_api/api/__init__.py delete mode 100644 endpoint/labels_api/labels_api/api_client.py delete mode 100644 endpoint/labels_api/labels_api/api_response.py delete mode 100644 endpoint/labels_api/labels_api/configuration.py delete mode 100644 endpoint/labels_api/labels_api/exceptions.py delete mode 100644 endpoint/labels_api/labels_api/models/__init__.py delete mode 100644 endpoint/labels_api/labels_api/models/endpoint_labels_list200_response.py delete mode 100644 endpoint/labels_api/labels_api/models/error.py delete mode 100644 endpoint/labels_api/labels_api/models/expand.py delete mode 100644 endpoint/labels_api/labels_api/models/label.py delete mode 100644 endpoint/labels_api/labels_api/models/labels.py delete mode 100644 endpoint/labels_api/labels_api/models/link.py delete mode 100644 endpoint/labels_api/labels_api/models/pagination_next_link.py delete mode 100644 endpoint/labels_api/labels_api/models/pagination_next_link_links.py delete mode 100644 endpoint/labels_api/labels_api/models/self_links.py delete mode 100644 endpoint/labels_api/labels_api/models/self_links_links.py delete mode 100644 endpoint/labels_api/labels_api/models/unauthorized_error.py delete mode 100644 endpoint/labels_api/labels_api/rest.py delete mode 100644 endpoint/labels_api/pyproject.toml delete mode 100644 endpoint/labels_api/setup.py delete mode 100644 endpoint/labels_api/test-requirements.txt delete mode 100644 endpoint/labels_api/test/test_endpoint_labels_list200_response.py delete mode 100644 endpoint/labels_api/test/test_error.py delete mode 100644 endpoint/labels_api/test/test_expand.py delete mode 100644 endpoint/labels_api/test/test_label.py delete mode 100644 endpoint/labels_api/test/test_labels.py delete mode 100644 endpoint/labels_api/test/test_link.py delete mode 100644 endpoint/labels_api/test/test_manage_labels_api.py delete mode 100644 endpoint/labels_api/test/test_pagination_next_link.py delete mode 100644 endpoint/labels_api/test/test_pagination_next_link_links.py delete mode 100644 endpoint/labels_api/test/test_self_links.py delete mode 100644 endpoint/labels_api/test/test_self_links_links.py delete mode 100644 endpoint/labels_api/test/test_unauthorized_error.py delete mode 100644 endpoint/labels_api/tox.ini delete mode 100644 endpoint/test_results_api/.github/workflows/python.yml delete mode 100644 endpoint/test_results_api/.gitlab-ci.yml delete mode 100644 endpoint/test_results_api/.openapi-generator/FILES delete mode 100644 endpoint/test_results_api/.openapi-generator/VERSION delete mode 100644 endpoint/test_results_api/.travis.yml delete mode 100644 endpoint/test_results_api/README.md delete mode 100644 endpoint/test_results_api/docs/AccountGroupId.md delete mode 100644 endpoint/test_results_api/docs/AgentLabelsSelectorType.md delete mode 100644 endpoint/test_results_api/docs/AllAgentsSelectorType.md delete mode 100644 endpoint/test_results_api/docs/ConditionalOperator.md delete mode 100644 endpoint/test_results_api/docs/DynamicBaseTestResult.md delete mode 100644 endpoint/test_results_api/docs/DynamicBaseTestResultWebex.md delete mode 100644 endpoint/test_results_api/docs/DynamicTest.md delete mode 100644 endpoint/test_results_api/docs/DynamicTestApplication.md delete mode 100644 endpoint/test_results_api/docs/DynamicTestLinks.md delete mode 100644 endpoint/test_results_api/docs/DynamicTestLinksSelf.md delete mode 100644 endpoint/test_results_api/docs/DynamicTestLinksTestResults.md delete mode 100644 endpoint/test_results_api/docs/EndpointAgentLabelsSelectorConfig.md delete mode 100644 endpoint/test_results_api/docs/EndpointAgentSelectorConfig.md delete mode 100644 endpoint/test_results_api/docs/EndpointAgentToServerTest.md delete mode 100644 endpoint/test_results_api/docs/EndpointAgentToServerType.md delete mode 100644 endpoint/test_results_api/docs/EndpointAllAgentsSelectorConfig.md delete mode 100644 endpoint/test_results_api/docs/EndpointHttpServerBaseTest.md delete mode 100644 endpoint/test_results_api/docs/EndpointHttpServerTest.md delete mode 100644 endpoint/test_results_api/docs/EndpointHttpServerType.md delete mode 100644 endpoint/test_results_api/docs/EndpointScheduledTestType.md delete mode 100644 endpoint/test_results_api/docs/EndpointSpecificAgentsSelectorConfig.md delete mode 100644 endpoint/test_results_api/docs/EndpointTest.md delete mode 100644 endpoint/test_results_api/docs/EndpointTestAid.md delete mode 100644 endpoint/test_results_api/docs/EndpointTestAuthType.md delete mode 100644 endpoint/test_results_api/docs/EndpointTestLinks.md delete mode 100644 endpoint/test_results_api/docs/EndpointTestLinksSelf.md delete mode 100644 endpoint/test_results_api/docs/EndpointTestLinksTestResults.md delete mode 100644 endpoint/test_results_api/docs/EndpointTestProtocol.md delete mode 100644 endpoint/test_results_api/docs/Error.md delete mode 100644 endpoint/test_results_api/docs/EthernetProfile.md delete mode 100644 endpoint/test_results_api/docs/Expand.md delete mode 100644 endpoint/test_results_api/docs/GetDynamicTestResultPathvisAgentRound200Response.md delete mode 100644 endpoint/test_results_api/docs/GetEndpointLocalNetworkTopologyDetails200Response.md delete mode 100644 endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologiesRequest.md delete mode 100644 endpoint/test_results_api/docs/GetEndpointRealUserTestDetails200Response.md delete mode 100644 endpoint/test_results_api/docs/GetEndpointRealUserTestPagesDetails200Response.md delete mode 100644 endpoint/test_results_api/docs/GetTestResultHttpServer200Response.md delete mode 100644 endpoint/test_results_api/docs/GetTestResultNetworkPathvis200Response.md delete mode 100644 endpoint/test_results_api/docs/HttpTestResult.md delete mode 100644 endpoint/test_results_api/docs/HttpTestResultHeaders.md delete mode 100644 endpoint/test_results_api/docs/HttpTestResults.md delete mode 100644 endpoint/test_results_api/docs/InterfaceHardwareType.md delete mode 100644 endpoint/test_results_api/docs/Link.md delete mode 100644 endpoint/test_results_api/docs/MultiTestIdNetworkTestResults.md delete mode 100644 endpoint/test_results_api/docs/NetworkTestResult.md delete mode 100644 endpoint/test_results_api/docs/NetworkTestResults.md delete mode 100644 endpoint/test_results_api/docs/PaginationNextLink.md delete mode 100644 endpoint/test_results_api/docs/PaginationNextLinkLinks.md delete mode 100644 endpoint/test_results_api/docs/PathVisBaseTestResult.md delete mode 100644 endpoint/test_results_api/docs/PathVisDetailDynamicTestResult.md delete mode 100644 endpoint/test_results_api/docs/PathVisDetailTestResult.md delete mode 100644 endpoint/test_results_api/docs/PathVisDetailTestResults.md delete mode 100644 endpoint/test_results_api/docs/PathVisDynamicTestResult.md delete mode 100644 endpoint/test_results_api/docs/PathVisEndpoint.md delete mode 100644 endpoint/test_results_api/docs/PathVisHop.md delete mode 100644 endpoint/test_results_api/docs/PathVisRoute.md delete mode 100644 endpoint/test_results_api/docs/PathVisTestResult.md delete mode 100644 endpoint/test_results_api/docs/PathVisTestResults.md delete mode 100644 endpoint/test_results_api/docs/Platform.md delete mode 100644 endpoint/test_results_api/docs/QueryWindow.md delete mode 100644 endpoint/test_results_api/docs/SelfLinks.md delete mode 100644 endpoint/test_results_api/docs/SelfLinksLinks.md delete mode 100644 endpoint/test_results_api/docs/SortOrder.md delete mode 100644 endpoint/test_results_api/docs/SpecificAgentsSelectorType.md delete mode 100644 endpoint/test_results_api/docs/TestInterval.md delete mode 100644 endpoint/test_results_api/docs/TestProbeMode.md delete mode 100644 endpoint/test_results_api/docs/TestResult.md delete mode 100644 endpoint/test_results_api/docs/TestSslVersionId.md delete mode 100644 endpoint/test_results_api/docs/ThresholdFilterOperator.md delete mode 100644 endpoint/test_results_api/docs/UnauthorizedError.md delete mode 100644 endpoint/test_results_api/docs/VpnType.md delete mode 100644 endpoint/test_results_api/git_push.sh delete mode 100644 endpoint/test_results_api/pyproject.toml delete mode 100644 endpoint/test_results_api/setup.py delete mode 100644 endpoint/test_results_api/test-requirements.txt delete mode 100644 endpoint/test_results_api/test/test_account_group_id.py delete mode 100644 endpoint/test_results_api/test/test_agent_labels_selector_type.py delete mode 100644 endpoint/test_results_api/test/test_all_agents_selector_type.py delete mode 100644 endpoint/test_results_api/test/test_conditional_operator.py delete mode 100644 endpoint/test_results_api/test/test_dynamic_test.py delete mode 100644 endpoint/test_results_api/test/test_dynamic_test_application.py delete mode 100644 endpoint/test_results_api/test/test_dynamic_test_links.py delete mode 100644 endpoint/test_results_api/test/test_dynamic_test_links_self.py delete mode 100644 endpoint/test_results_api/test/test_dynamic_test_links_test_results.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_agent_labels_selector_config.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_agent_selector_config.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_agent_to_server_test.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_agent_to_server_type.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_all_agents_selector_config.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_http_server_base_test.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_http_server_test.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_http_server_type.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_scheduled_test.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_scheduled_test_type.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_specific_agents_selector_config.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test_aid.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test_auth_type.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test_links.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test_links_self.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test_links_test_results.py delete mode 100644 endpoint/test_results_api/test/test_endpoint_test_protocol.py delete mode 100644 endpoint/test_results_api/test/test_error.py delete mode 100644 endpoint/test_results_api/test/test_ethernet_profile.py delete mode 100644 endpoint/test_results_api/test/test_expand.py delete mode 100644 endpoint/test_results_api/test/test_get_dynamic_test_result_network_pathvis200_response.py delete mode 100644 endpoint/test_results_api/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py delete mode 100644 endpoint/test_results_api/test/test_get_test_result_http_server200_response.py delete mode 100644 endpoint/test_results_api/test/test_get_test_result_network_pathvis200_response.py delete mode 100644 endpoint/test_results_api/test/test_http_test_result.py delete mode 100644 endpoint/test_results_api/test/test_http_test_result_headers.py delete mode 100644 endpoint/test_results_api/test/test_http_test_results.py delete mode 100644 endpoint/test_results_api/test/test_interface_hardware_type.py delete mode 100644 endpoint/test_results_api/test/test_link.py delete mode 100644 endpoint/test_results_api/test/test_local_network_tests_results_api.py delete mode 100644 endpoint/test_results_api/test/test_network_dynamic_test_results.py delete mode 100644 endpoint/test_results_api/test/test_network_dynamic_tests_results_api.py delete mode 100644 endpoint/test_results_api/test/test_network_scheduled_tests_results_api.py delete mode 100644 endpoint/test_results_api/test/test_network_test_result.py delete mode 100644 endpoint/test_results_api/test/test_network_test_results.py delete mode 100644 endpoint/test_results_api/test/test_pagination_next_link.py delete mode 100644 endpoint/test_results_api/test/test_pagination_next_link_links.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_base_test_result.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_result.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_results.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_detail_test_result.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_detail_test_results.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_dynamic_test_result.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_dynamic_test_results.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_endpoint.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_hop.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_route.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_test_result.py delete mode 100644 endpoint/test_results_api/test/test_path_vis_test_results.py delete mode 100644 endpoint/test_results_api/test/test_platform.py delete mode 100644 endpoint/test_results_api/test/test_post_fetch_dynamic_test_result_metrics200_response.py delete mode 100644 endpoint/test_results_api/test/test_query_window.py delete mode 100644 endpoint/test_results_api/test/test_real_user_tests_results_api.py delete mode 100644 endpoint/test_results_api/test/test_self_links.py delete mode 100644 endpoint/test_results_api/test/test_self_links_links.py delete mode 100644 endpoint/test_results_api/test/test_sort_order.py delete mode 100644 endpoint/test_results_api/test/test_specific_agents_selector_type.py delete mode 100644 endpoint/test_results_api/test/test_test_interval.py delete mode 100644 endpoint/test_results_api/test/test_test_probe_mode.py delete mode 100644 endpoint/test_results_api/test/test_test_result.py delete mode 100644 endpoint/test_results_api/test/test_test_ssl_version_id.py delete mode 100644 endpoint/test_results_api/test/test_threshold_filter_operator.py delete mode 100644 endpoint/test_results_api/test/test_unauthorized_error.py delete mode 100644 endpoint/test_results_api/test/test_vpn_type.py delete mode 100644 endpoint/test_results_api/test/test_web_http_server_scheduled_test_results_api.py delete mode 100644 endpoint/test_results_api/test_results_api/__init__.py delete mode 100644 endpoint/test_results_api/test_results_api/api/__init__.py delete mode 100644 endpoint/test_results_api/test_results_api/api_client.py delete mode 100644 endpoint/test_results_api/test_results_api/api_response.py delete mode 100644 endpoint/test_results_api/test_results_api/configuration.py delete mode 100644 endpoint/test_results_api/test_results_api/exceptions.py delete mode 100644 endpoint/test_results_api/test_results_api/models/__init__.py delete mode 100644 endpoint/test_results_api/test_results_api/models/account_group_id.py delete mode 100644 endpoint/test_results_api/test_results_api/models/agent_labels_selector_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/all_agents_selector_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/conditional_operator.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_base_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_base_test_result_webex.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_test.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_test_application.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_test_links.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_test_links_self.py delete mode 100644 endpoint/test_results_api/test_results_api/models/dynamic_test_links_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_agent_labels_selector_config.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_agent_selector_config.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_test.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_all_agents_selector_config.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_http_server_base_test.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_http_server_test.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_http_server_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_specific_agents_selector_config.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test_aid.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test_auth_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test_links.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test_links_self.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test_links_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/endpoint_test_protocol.py delete mode 100644 endpoint/test_results_api/test_results_api/models/error.py delete mode 100644 endpoint/test_results_api/test_results_api/models/ethernet_profile.py delete mode 100644 endpoint/test_results_api/test_results_api/models/expand.py delete mode 100644 endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_network_pathvis200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_pathvis_agent_round200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/get_test_result_http_server200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/get_test_result_pathvis_agent_round200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/http_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/http_test_result_headers.py delete mode 100644 endpoint/test_results_api/test_results_api/models/http_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/interface_hardware_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/link.py delete mode 100644 endpoint/test_results_api/test_results_api/models/multi_test_id_network_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/network_dynamic_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/network_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/network_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/pagination_next_link.py delete mode 100644 endpoint/test_results_api/test_results_api/models/pagination_next_link_links.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_base_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_detail_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_detail_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_endpoint.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_hop.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_route.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/path_vis_test_results.py delete mode 100644 endpoint/test_results_api/test_results_api/models/platform.py delete mode 100644 endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics_multi_test200_response.py delete mode 100644 endpoint/test_results_api/test_results_api/models/query_window.py delete mode 100644 endpoint/test_results_api/test_results_api/models/real_user_test_network.py delete mode 100644 endpoint/test_results_api/test_results_api/models/self_links.py delete mode 100644 endpoint/test_results_api/test_results_api/models/self_links_links.py delete mode 100644 endpoint/test_results_api/test_results_api/models/sort_order.py delete mode 100644 endpoint/test_results_api/test_results_api/models/specific_agents_selector_type.py delete mode 100644 endpoint/test_results_api/test_results_api/models/test_interval.py delete mode 100644 endpoint/test_results_api/test_results_api/models/test_probe_mode.py delete mode 100644 endpoint/test_results_api/test_results_api/models/test_result.py delete mode 100644 endpoint/test_results_api/test_results_api/models/test_ssl_version_id.py delete mode 100644 endpoint/test_results_api/test_results_api/models/threshold_filter_operator.py delete mode 100644 endpoint/test_results_api/test_results_api/models/unauthorized_error.py delete mode 100644 endpoint/test_results_api/test_results_api/models/vpn_type.py delete mode 100644 endpoint/test_results_api/test_results_api/rest.py delete mode 100644 endpoint/test_results_api/tox.ini delete mode 100644 endpoint/tests_api/.github/workflows/python.yml delete mode 100644 endpoint/tests_api/.gitlab-ci.yml delete mode 100644 endpoint/tests_api/.openapi-generator/FILES delete mode 100644 endpoint/tests_api/.openapi-generator/VERSION delete mode 100644 endpoint/tests_api/.travis.yml delete mode 100644 endpoint/tests_api/README.md delete mode 100644 endpoint/tests_api/docs/AccountGroupId.md delete mode 100644 endpoint/tests_api/docs/AgentLabelsSelectorType.md delete mode 100644 endpoint/tests_api/docs/AllAgentsSelectorType.md delete mode 100644 endpoint/tests_api/docs/DynamicTest.md delete mode 100644 endpoint/tests_api/docs/DynamicTestApplication.md delete mode 100644 endpoint/tests_api/docs/DynamicTestLinks.md delete mode 100644 endpoint/tests_api/docs/DynamicTestLinksSelf.md delete mode 100644 endpoint/tests_api/docs/DynamicTestLinksTestResults.md delete mode 100644 endpoint/tests_api/docs/DynamicTestsAgentToServerApi.md delete mode 100644 endpoint/tests_api/docs/EndpointAgentLabelsSelectorConfig.md delete mode 100644 endpoint/tests_api/docs/EndpointAgentSelectorConfig.md delete mode 100644 endpoint/tests_api/docs/EndpointAgentToServerInstantTest.md delete mode 100644 endpoint/tests_api/docs/EndpointAgentToServerTest.md delete mode 100644 endpoint/tests_api/docs/EndpointAgentToServerType.md delete mode 100644 endpoint/tests_api/docs/EndpointAllAgentsSelectorConfig.md delete mode 100644 endpoint/tests_api/docs/EndpointHttpServerBaseTest.md delete mode 100644 endpoint/tests_api/docs/EndpointHttpServerInstantTest.md delete mode 100644 endpoint/tests_api/docs/EndpointHttpServerTest.md delete mode 100644 endpoint/tests_api/docs/EndpointHttpServerType.md delete mode 100644 endpoint/tests_api/docs/EndpointInstantTest.md delete mode 100644 endpoint/tests_api/docs/EndpointScheduledTestType.md delete mode 100644 endpoint/tests_api/docs/EndpointSpecificAgentsSelectorConfig.md delete mode 100644 endpoint/tests_api/docs/EndpointTest.md delete mode 100644 endpoint/tests_api/docs/EndpointTestAgentSelectorType.md delete mode 100644 endpoint/tests_api/docs/EndpointTestAid.md delete mode 100644 endpoint/tests_api/docs/EndpointTestAuthType.md delete mode 100644 endpoint/tests_api/docs/EndpointTestLinks.md delete mode 100644 endpoint/tests_api/docs/EndpointTestLinksSelf.md delete mode 100644 endpoint/tests_api/docs/EndpointTestLinksTestResults.md delete mode 100644 endpoint/tests_api/docs/EndpointTestProtocol.md delete mode 100644 endpoint/tests_api/docs/Error.md delete mode 100644 endpoint/tests_api/docs/GetDynamicTestDetail200Response.md delete mode 100644 endpoint/tests_api/docs/GetEndpointAgentToserverTestsList200Response.md delete mode 100644 endpoint/tests_api/docs/GetEndpointHttpserverTestDetail200Response.md delete mode 100644 endpoint/tests_api/docs/Link.md delete mode 100644 endpoint/tests_api/docs/PostEndpointAgentToServerTest201Response.md delete mode 100644 endpoint/tests_api/docs/ScheduledTestsAgentToServerApi.md delete mode 100644 endpoint/tests_api/docs/ScheduledTestsHTTPServerApi.md delete mode 100644 endpoint/tests_api/docs/SelfLinks.md delete mode 100644 endpoint/tests_api/docs/SelfLinksLinks.md delete mode 100644 endpoint/tests_api/docs/SpecificAgentsSelectorType.md delete mode 100644 endpoint/tests_api/docs/TestInterval.md delete mode 100644 endpoint/tests_api/docs/TestProbeMode.md delete mode 100644 endpoint/tests_api/docs/TestSslVersionId.md delete mode 100644 endpoint/tests_api/docs/UnauthorizedError.md delete mode 100644 endpoint/tests_api/git_push.sh delete mode 100644 endpoint/tests_api/pyproject.toml delete mode 100644 endpoint/tests_api/setup.py delete mode 100644 endpoint/tests_api/test-requirements.txt delete mode 100644 endpoint/tests_api/test/test_account_group_id.py delete mode 100644 endpoint/tests_api/test/test_agent_labels_selector_type.py delete mode 100644 endpoint/tests_api/test/test_all_agents_selector_type.py delete mode 100644 endpoint/tests_api/test/test_dynamic_test.py delete mode 100644 endpoint/tests_api/test/test_dynamic_test_application.py delete mode 100644 endpoint/tests_api/test/test_dynamic_test_links.py delete mode 100644 endpoint/tests_api/test/test_dynamic_test_links_self.py delete mode 100644 endpoint/tests_api/test/test_dynamic_test_links_test_results.py delete mode 100644 endpoint/tests_api/test/test_dynamic_tests.py delete mode 100644 endpoint/tests_api/test/test_dynamic_tests_agent_to_server_api.py delete mode 100644 endpoint/tests_api/test/test_endpoint_agent_labels_selector_config.py delete mode 100644 endpoint/tests_api/test/test_endpoint_agent_selector_config.py delete mode 100644 endpoint/tests_api/test/test_endpoint_agent_to_server_instant_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_agent_to_server_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_agent_to_server_type.py delete mode 100644 endpoint/tests_api/test/test_endpoint_all_agents_selector_config.py delete mode 100644 endpoint/tests_api/test/test_endpoint_http_server_base_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_http_server_instant_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_http_server_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_http_server_type.py delete mode 100644 endpoint/tests_api/test/test_endpoint_instant_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_scheduled_test_type.py delete mode 100644 endpoint/tests_api/test/test_endpoint_specific_agents_selector_config.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_agent_selector_type.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_aid.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_auth_type.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_links.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_links_self.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_links_test_results.py delete mode 100644 endpoint/tests_api/test/test_endpoint_test_protocol.py delete mode 100644 endpoint/tests_api/test/test_endpoint_tests.py delete mode 100644 endpoint/tests_api/test/test_error.py delete mode 100644 endpoint/tests_api/test/test_get_dynamic_test_detail200_response.py delete mode 100644 endpoint/tests_api/test/test_get_dynamic_tests_list200_response.py delete mode 100644 endpoint/tests_api/test/test_get_endpoint_httpserver_test_detail200_response.py delete mode 100644 endpoint/tests_api/test/test_get_endpoint_tests_list200_response.py delete mode 100644 endpoint/tests_api/test/test_link.py delete mode 100644 endpoint/tests_api/test/test_list_endpoint_scheduled_tests_api.py delete mode 100644 endpoint/tests_api/test/test_post_endpoint_agent_to_server_test201_response.py delete mode 100644 endpoint/tests_api/test/test_scheduled_tests_agent_to_server_api.py delete mode 100644 endpoint/tests_api/test/test_scheduled_tests_http_server_api.py delete mode 100644 endpoint/tests_api/test/test_self_links.py delete mode 100644 endpoint/tests_api/test/test_self_links_links.py delete mode 100644 endpoint/tests_api/test/test_specific_agents_selector_type.py delete mode 100644 endpoint/tests_api/test/test_test_interval.py delete mode 100644 endpoint/tests_api/test/test_test_probe_mode.py delete mode 100644 endpoint/tests_api/test/test_test_ssl_version_id.py delete mode 100644 endpoint/tests_api/test/test_unauthorized_error.py delete mode 100644 endpoint/tests_api/tests_api/__init__.py delete mode 100644 endpoint/tests_api/tests_api/api/__init__.py delete mode 100644 endpoint/tests_api/tests_api/api/dynamic_tests_agent_to_server_api.py delete mode 100644 endpoint/tests_api/tests_api/api/scheduled_tests_agent_to_server_api.py delete mode 100644 endpoint/tests_api/tests_api/api/scheduled_tests_http_server_api.py delete mode 100644 endpoint/tests_api/tests_api/api_client.py delete mode 100644 endpoint/tests_api/tests_api/api_response.py delete mode 100644 endpoint/tests_api/tests_api/configuration.py delete mode 100644 endpoint/tests_api/tests_api/exceptions.py delete mode 100644 endpoint/tests_api/tests_api/models/__init__.py delete mode 100644 endpoint/tests_api/tests_api/models/account_group_id.py delete mode 100644 endpoint/tests_api/tests_api/models/agent_labels_selector_type.py delete mode 100644 endpoint/tests_api/tests_api/models/all_agents_selector_type.py delete mode 100644 endpoint/tests_api/tests_api/models/dynamic_test.py delete mode 100644 endpoint/tests_api/tests_api/models/dynamic_test_application.py delete mode 100644 endpoint/tests_api/tests_api/models/dynamic_test_links.py delete mode 100644 endpoint/tests_api/tests_api/models/dynamic_test_links_self.py delete mode 100644 endpoint/tests_api/tests_api/models/dynamic_test_links_test_results.py delete mode 100644 endpoint/tests_api/tests_api/models/dynamic_test_request.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_agent_labels_selector_config.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_agent_selector_config.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_agent_to_server_instant_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_agent_to_server_tests.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_agent_to_server_type.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_all_agents_selector_config.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_http_server_base_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_http_server_instant_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_http_server_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_http_server_type.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_instant_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_scheduled_test_type.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_specific_agents_selector_config.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_agent_selector_type.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_aid.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_auth_type.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_links.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_links_self.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_links_test_results.py delete mode 100644 endpoint/tests_api/tests_api/models/endpoint_test_protocol.py delete mode 100644 endpoint/tests_api/tests_api/models/error.py delete mode 100644 endpoint/tests_api/tests_api/models/get_dynamic_test_detail200_response.py delete mode 100644 endpoint/tests_api/tests_api/models/get_dynamic_tests_list200_response.py delete mode 100644 endpoint/tests_api/tests_api/models/get_endpoint_agent_toserver_tests_list200_response.py delete mode 100644 endpoint/tests_api/tests_api/models/get_endpoint_httpserver_test_detail200_response.py delete mode 100644 endpoint/tests_api/tests_api/models/get_endpoint_httpserver_tests_list200_response.py delete mode 100644 endpoint/tests_api/tests_api/models/get_endpoint_tests_list200_response.py delete mode 100644 endpoint/tests_api/tests_api/models/link.py delete mode 100644 endpoint/tests_api/tests_api/models/post_endpoint_agent_to_server_test201_response.py delete mode 100644 endpoint/tests_api/tests_api/models/self_links.py delete mode 100644 endpoint/tests_api/tests_api/models/self_links_links.py delete mode 100644 endpoint/tests_api/tests_api/models/specific_agents_selector_type.py delete mode 100644 endpoint/tests_api/tests_api/models/test_interval.py delete mode 100644 endpoint/tests_api/tests_api/models/test_probe_mode.py delete mode 100644 endpoint/tests_api/tests_api/models/test_ssl_version_id.py delete mode 100644 endpoint/tests_api/tests_api/models/unauthorized_error.py delete mode 100644 endpoint/tests_api/tests_api/rest.py delete mode 100644 endpoint/tests_api/tox.ini rename {endpoint/agents_api => endpoint_agents}/.gitignore (100%) rename {endpoint/agents_api => endpoint_agents}/.openapi-generator-ignore (100%) create mode 100644 endpoint_agents/.openapi-generator/FILES create mode 100644 endpoint_agents/.openapi-generator/VERSION create mode 100644 endpoint_agents/README.md rename {endpoint/agents_api => endpoint_agents}/docs/AddressProfile.md (87%) rename {endpoint/agents_api => endpoint_agents}/docs/AddressType.md (99%) rename {endpoint/agents_api => endpoint_agents}/docs/AdministrativeEndpointsApi.md (85%) rename {endpoint/agents_api => endpoint_agents}/docs/AgentLicenseType.md (99%) create mode 100644 endpoint_agents/docs/AgentSearchRequest.md rename {endpoint/agents_api => endpoint_agents}/docs/AgentSearchRequestSearchFilters.md (83%) create mode 100644 endpoint_agents/docs/AgentSearchSort.md create mode 100644 endpoint_agents/docs/AgentSearchSortKey.md create mode 100644 endpoint_agents/docs/AgentThresholdFilter.md create mode 100644 endpoint_agents/docs/AgentThresholdFilters.md rename {endpoint/agents_api => endpoint_agents}/docs/AgentTransfer.md (87%) rename {endpoint/agents_api => endpoint_agents}/docs/AgentTransferRequest.md (81%) rename {endpoint/agents_api => endpoint_agents}/docs/BrowserType.md (99%) create mode 100644 endpoint_agents/docs/ConditionalOperator.md rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgent.md (92%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentBulkTransfer207Response.md (75%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md (80%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentBulkTransferRequest.md (75%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentGet200Response.md (89%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentLocation.md (80%) create mode 100644 endpoint_agents/docs/EndpointAgentUpdate.md rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgents.md (83%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentsAgentsInner.md (90%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentsConnectionString200Response.md (75%) create mode 100644 endpoint_agents/docs/EndpointAgentsList200Response.md rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAgentsSearch200Response.md (79%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointAsnDetails.md (80%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointBrowserExtension.md (84%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointClient.md (84%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointUserProfile.md (78%) rename {endpoint/agents_api => endpoint_agents}/docs/EndpointVpnProfile.md (85%) create mode 100644 endpoint_agents/docs/Error.md create mode 100644 endpoint_agents/docs/EthernetProfile.md create mode 100644 endpoint_agents/docs/Expand.md create mode 100644 endpoint_agents/docs/InterfaceHardwareType.md rename {endpoint/agents_api => endpoint_agents}/docs/InterfaceProfile.md (85%) create mode 100644 endpoint_agents/docs/Link.md rename {endpoint/agents_api => endpoint_agents}/docs/ManageAgentsApi.md (78%) create mode 100644 endpoint_agents/docs/PaginationNextAndSelfLink.md create mode 100644 endpoint_agents/docs/PaginationNextAndSelfLinkLinks.md create mode 100644 endpoint_agents/docs/PaginationNextLink.md create mode 100644 endpoint_agents/docs/PaginationNextLinkLinks.md create mode 100644 endpoint_agents/docs/Platform.md create mode 100644 endpoint_agents/docs/SelfLinks.md create mode 100644 endpoint_agents/docs/SelfLinksLinks.md create mode 100644 endpoint_agents/docs/SortOrder.md rename {endpoint/agents_api => endpoint_agents}/docs/Status.md (99%) create mode 100644 endpoint_agents/docs/ThresholdFilterOperator.md rename {endpoint/agents_api => endpoint_agents}/docs/TransferApi.md (84%) create mode 100644 endpoint_agents/docs/UnauthorizedError.md create mode 100644 endpoint_agents/docs/ValidationError.md create mode 100644 endpoint_agents/docs/ValidationErrorAllOfErrors.md create mode 100644 endpoint_agents/docs/VpnType.md rename {endpoint/agents_api => endpoint_agents}/docs/WirelessProfile.md (82%) create mode 100644 endpoint_agents/endpoint_agents/__init__.py create mode 100644 endpoint_agents/endpoint_agents/api/__init__.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/api/administrative_endpoints_api.py (93%) rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/api/manage_agents_api.py (97%) rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/api/transfer_api.py (94%) create mode 100644 endpoint_agents/endpoint_agents/api_client.py create mode 100644 endpoint_agents/endpoint_agents/api_response.py create mode 100644 endpoint_agents/endpoint_agents/configuration.py create mode 100644 endpoint_agents/endpoint_agents/exceptions.py create mode 100644 endpoint_agents/endpoint_agents/models/__init__.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/address_profile.py (77%) create mode 100644 endpoint_agents/endpoint_agents/models/address_type.py create mode 100644 endpoint_agents/endpoint_agents/models/agent_license_type.py create mode 100644 endpoint_agents/endpoint_agents/models/agent_search_request.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/agent_search_request_search_filters.py (76%) create mode 100644 endpoint_agents/endpoint_agents/models/agent_search_sort.py create mode 100644 endpoint_agents/endpoint_agents/models/agent_search_sort_key.py create mode 100644 endpoint_agents/endpoint_agents/models/agent_threshold_filter.py create mode 100644 endpoint_agents/endpoint_agents/models/agent_threshold_filters.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/agent_transfer.py (76%) create mode 100644 endpoint_agents/endpoint_agents/models/agent_transfer_request.py create mode 100644 endpoint_agents/endpoint_agents/models/browser_type.py create mode 100644 endpoint_agents/endpoint_agents/models/conditional_operator.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/endpoint_agent.py (76%) create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/endpoint_agent_bulk_transfer207_response_items_inner.py (77%) create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer_request.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/endpoint_agent_get200_response.py (75%) create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agent_location.py create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agent_update.py create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agents.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/endpoint_agents_agents_inner.py (75%) create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agents_connection_string200_response.py create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agents_list200_response.py create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_agents_search200_response.py create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_asn_details.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/endpoint_browser_extension.py (77%) create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_client.py create mode 100644 endpoint_agents/endpoint_agents/models/endpoint_user_profile.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/models/endpoint_vpn_profile.py (78%) create mode 100644 endpoint_agents/endpoint_agents/models/error.py create mode 100644 endpoint_agents/endpoint_agents/models/ethernet_profile.py create mode 100644 endpoint_agents/endpoint_agents/models/expand.py create mode 100644 endpoint_agents/endpoint_agents/models/interface_hardware_type.py create mode 100644 endpoint_agents/endpoint_agents/models/interface_profile.py create mode 100644 endpoint_agents/endpoint_agents/models/link.py create mode 100644 endpoint_agents/endpoint_agents/models/pagination_next_and_self_link.py create mode 100644 endpoint_agents/endpoint_agents/models/pagination_next_and_self_link_links.py create mode 100644 endpoint_agents/endpoint_agents/models/pagination_next_link.py create mode 100644 endpoint_agents/endpoint_agents/models/pagination_next_link_links.py create mode 100644 endpoint_agents/endpoint_agents/models/platform.py create mode 100644 endpoint_agents/endpoint_agents/models/self_links.py create mode 100644 endpoint_agents/endpoint_agents/models/self_links_links.py create mode 100644 endpoint_agents/endpoint_agents/models/sort_order.py create mode 100644 endpoint_agents/endpoint_agents/models/status.py create mode 100644 endpoint_agents/endpoint_agents/models/threshold_filter_operator.py create mode 100644 endpoint_agents/endpoint_agents/models/unauthorized_error.py create mode 100644 endpoint_agents/endpoint_agents/models/validation_error.py create mode 100644 endpoint_agents/endpoint_agents/models/validation_error_all_of_errors.py create mode 100644 endpoint_agents/endpoint_agents/models/vpn_type.py create mode 100644 endpoint_agents/endpoint_agents/models/wireless_profile.py rename {endpoint/agents_api/agents_api => endpoint_agents/endpoint_agents}/py.typed (100%) create mode 100644 endpoint_agents/endpoint_agents/rest.py create mode 100644 endpoint_agents/pyproject.toml rename {endpoint/agents_api => endpoint_agents}/requirements.txt (100%) rename {endpoint/agents_api => endpoint_agents}/setup.cfg (100%) create mode 100644 endpoint_agents/setup.py create mode 100644 endpoint_agents/test-requirements.txt rename {endpoint/agents_api => endpoint_agents}/test/__init__.py (100%) rename {endpoint/agents_api => endpoint_agents}/test/test_address_profile.py (80%) create mode 100644 endpoint_agents/test/test_address_type.py create mode 100644 endpoint_agents/test/test_agent_license_type.py create mode 100644 endpoint_agents/test/test_agent_search_request.py rename {endpoint/agents_api => endpoint_agents}/test/test_agent_search_request_search_filters.py (80%) create mode 100644 endpoint_agents/test/test_agent_search_sort.py create mode 100644 endpoint_agents/test/test_agent_search_sort_key.py create mode 100644 endpoint_agents/test/test_agent_threshold_filter.py create mode 100644 endpoint_agents/test/test_agent_threshold_filters.py rename {endpoint/agents_api => endpoint_agents}/test/test_agent_transfer.py (75%) rename {endpoint/agents_api => endpoint_agents}/test/test_agent_transfer_request.py (76%) create mode 100644 endpoint_agents/test/test_browser_type.py create mode 100644 endpoint_agents/test/test_conditional_operator.py rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agent.py (76%) create mode 100644 endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response.py rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py (78%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agent_bulk_transfer_request.py (77%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agent_get200_response.py (76%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agent_location.py (79%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agent_update.py (76%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agents.py (79%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agents_agents_inner.py (75%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agents_connection_string200_response.py (77%) create mode 100644 endpoint_agents/test/test_endpoint_agents_list200_response.py rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_agents_search200_response.py (77%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_asn_details.py (79%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_browser_extension.py (80%) create mode 100644 endpoint_agents/test/test_endpoint_client.py rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_user_profile.py (78%) rename {endpoint/agents_api => endpoint_agents}/test/test_endpoint_vpn_profile.py (82%) create mode 100644 endpoint_agents/test/test_error.py create mode 100644 endpoint_agents/test/test_ethernet_profile.py create mode 100644 endpoint_agents/test/test_expand.py create mode 100644 endpoint_agents/test/test_interface_hardware_type.py rename {endpoint/agents_api => endpoint_agents}/test/test_interface_profile.py (75%) create mode 100644 endpoint_agents/test/test_link.py create mode 100644 endpoint_agents/test/test_pagination_next_and_self_link.py create mode 100644 endpoint_agents/test/test_pagination_next_and_self_link_links.py create mode 100644 endpoint_agents/test/test_pagination_next_link.py create mode 100644 endpoint_agents/test/test_pagination_next_link_links.py create mode 100644 endpoint_agents/test/test_platform.py create mode 100644 endpoint_agents/test/test_self_links.py create mode 100644 endpoint_agents/test/test_self_links_links.py create mode 100644 endpoint_agents/test/test_sort_order.py create mode 100644 endpoint_agents/test/test_status.py create mode 100644 endpoint_agents/test/test_threshold_filter_operator.py create mode 100644 endpoint_agents/test/test_unauthorized_error.py create mode 100644 endpoint_agents/test/test_validation_error.py create mode 100644 endpoint_agents/test/test_validation_error_all_of_errors.py create mode 100644 endpoint_agents/test/test_vpn_type.py rename {endpoint/agents_api => endpoint_agents}/test/test_wireless_profile.py (80%) rename {endpoint/instant_tests_api => endpoint_instant_tests}/.gitignore (100%) rename {endpoint/instant_tests_api => endpoint_instant_tests}/.openapi-generator-ignore (100%) create mode 100644 endpoint_instant_tests/.openapi-generator/FILES create mode 100644 endpoint_instant_tests/.openapi-generator/VERSION create mode 100644 endpoint_instant_tests/README.md create mode 100644 endpoint_instant_tests/docs/AccountGroupId.md rename {endpoint/instant_tests_api => endpoint_instant_tests}/docs/AgentToServerInstantScheduledTestApi.md (81%) create mode 100644 endpoint_instant_tests/docs/AlertDirection.md create mode 100644 endpoint_instant_tests/docs/AlertRoundsViolationMode.md create mode 100644 endpoint_instant_tests/docs/AlertRule.md create mode 100644 endpoint_instant_tests/docs/AlertType.md create mode 100644 endpoint_instant_tests/docs/EndpointAgentLabelsSelectorConfig.md create mode 100644 endpoint_instant_tests/docs/EndpointAgentSelectorConfig.md create mode 100644 endpoint_instant_tests/docs/EndpointAgentToServerInstantTest.md create mode 100644 endpoint_instant_tests/docs/EndpointAgentToServerTest.md create mode 100644 endpoint_instant_tests/docs/EndpointAllAgentsSelectorConfig.md create mode 100644 endpoint_instant_tests/docs/EndpointHttpServerBaseTest.md create mode 100644 endpoint_instant_tests/docs/EndpointHttpServerInstantTest.md create mode 100644 endpoint_instant_tests/docs/EndpointHttpServerTest.md create mode 100644 endpoint_instant_tests/docs/EndpointInstantTest.md create mode 100644 endpoint_instant_tests/docs/EndpointScheduledTestType.md create mode 100644 endpoint_instant_tests/docs/EndpointSpecificAgentsSelectorConfig.md create mode 100644 endpoint_instant_tests/docs/EndpointTest.md create mode 100644 endpoint_instant_tests/docs/EndpointTestAgentSelectorType.md create mode 100644 endpoint_instant_tests/docs/EndpointTestAuthType.md create mode 100644 endpoint_instant_tests/docs/EndpointTestLinks.md create mode 100644 endpoint_instant_tests/docs/EndpointTestLinksSelf.md create mode 100644 endpoint_instant_tests/docs/EndpointTestProtocol.md create mode 100644 endpoint_instant_tests/docs/Error.md rename {endpoint/instant_tests_api => endpoint_instant_tests}/docs/HttpServerInstantScheduledTestApi.md (81%) create mode 100644 endpoint_instant_tests/docs/Link.md rename {endpoint/instant_tests_api => endpoint_instant_tests}/docs/RunExistingTestApi.md (87%) create mode 100644 endpoint_instant_tests/docs/Severity.md create mode 100644 endpoint_instant_tests/docs/TestInterval.md create mode 100644 endpoint_instant_tests/docs/TestLabelsInner.md create mode 100644 endpoint_instant_tests/docs/TestProbeModeResponse.md create mode 100644 endpoint_instant_tests/docs/TestSslVersionId.md create mode 100644 endpoint_instant_tests/docs/UnauthorizedError.md create mode 100644 endpoint_instant_tests/docs/ValidationError.md create mode 100644 endpoint_instant_tests/docs/ValidationErrorAllOfErrors.md create mode 100644 endpoint_instant_tests/endpoint_instant_tests/__init__.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/api/__init__.py rename {endpoint/instant_tests_api/instant_tests_api => endpoint_instant_tests/endpoint_instant_tests}/api/agent_to_server_instant_scheduled_test_api.py (89%) rename {endpoint/instant_tests_api/instant_tests_api => endpoint_instant_tests/endpoint_instant_tests}/api/http_server_instant_scheduled_test_api.py (89%) rename {endpoint/instant_tests_api/instant_tests_api => endpoint_instant_tests/endpoint_instant_tests}/api/run_existing_test_api.py (87%) create mode 100644 endpoint_instant_tests/endpoint_instant_tests/api_client.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/api_response.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/configuration.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/exceptions.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/__init__.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/account_group_id.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/alert_direction.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/alert_rounds_violation_mode.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/alert_rule.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/alert_type.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_selector_config.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_base_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_instant_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_instant_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_scheduled_test_type.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_auth_type.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links_self.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_protocol.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/error.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/link.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/severity.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/test_interval.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/test_labels_inner.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/test_probe_mode_response.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/test_ssl_version_id.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/unauthorized_error.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/validation_error.py create mode 100644 endpoint_instant_tests/endpoint_instant_tests/models/validation_error_all_of_errors.py rename {endpoint/instant_tests_api/instant_tests_api => endpoint_instant_tests/endpoint_instant_tests}/py.typed (100%) create mode 100644 endpoint_instant_tests/endpoint_instant_tests/rest.py create mode 100644 endpoint_instant_tests/pyproject.toml rename {endpoint/instant_tests_api => endpoint_instant_tests}/requirements.txt (100%) rename {endpoint/instant_tests_api => endpoint_instant_tests}/setup.cfg (100%) create mode 100644 endpoint_instant_tests/setup.py create mode 100644 endpoint_instant_tests/test-requirements.txt rename {endpoint/instant_tests_api => endpoint_instant_tests}/test/__init__.py (100%) create mode 100644 endpoint_instant_tests/test/test_account_group_id.py create mode 100644 endpoint_instant_tests/test/test_alert_direction.py create mode 100644 endpoint_instant_tests/test/test_alert_rounds_violation_mode.py create mode 100644 endpoint_instant_tests/test/test_alert_rule.py create mode 100644 endpoint_instant_tests/test/test_alert_type.py create mode 100644 endpoint_instant_tests/test/test_endpoint_agent_labels_selector_config.py create mode 100644 endpoint_instant_tests/test/test_endpoint_agent_selector_config.py create mode 100644 endpoint_instant_tests/test/test_endpoint_agent_to_server_instant_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_agent_to_server_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_all_agents_selector_config.py create mode 100644 endpoint_instant_tests/test/test_endpoint_http_server_base_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_http_server_instant_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_http_server_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_instant_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_scheduled_test_type.py create mode 100644 endpoint_instant_tests/test/test_endpoint_specific_agents_selector_config.py create mode 100644 endpoint_instant_tests/test/test_endpoint_test.py create mode 100644 endpoint_instant_tests/test/test_endpoint_test_agent_selector_type.py create mode 100644 endpoint_instant_tests/test/test_endpoint_test_auth_type.py create mode 100644 endpoint_instant_tests/test/test_endpoint_test_links.py create mode 100644 endpoint_instant_tests/test/test_endpoint_test_links_self.py create mode 100644 endpoint_instant_tests/test/test_endpoint_test_protocol.py create mode 100644 endpoint_instant_tests/test/test_error.py create mode 100644 endpoint_instant_tests/test/test_link.py create mode 100644 endpoint_instant_tests/test/test_severity.py create mode 100644 endpoint_instant_tests/test/test_test_interval.py create mode 100644 endpoint_instant_tests/test/test_test_labels_inner.py create mode 100644 endpoint_instant_tests/test/test_test_probe_mode_response.py create mode 100644 endpoint_instant_tests/test/test_test_ssl_version_id.py create mode 100644 endpoint_instant_tests/test/test_unauthorized_error.py create mode 100644 endpoint_instant_tests/test/test_validation_error.py create mode 100644 endpoint_instant_tests/test/test_validation_error_all_of_errors.py rename {endpoint/labels_api => endpoint_labels}/.gitignore (100%) rename {endpoint/labels_api => endpoint_labels}/.openapi-generator-ignore (100%) create mode 100644 endpoint_labels/.openapi-generator/FILES create mode 100644 endpoint_labels/.openapi-generator/VERSION create mode 100644 endpoint_labels/README.md create mode 100644 endpoint_labels/docs/EndpointLabelsList200Response.md create mode 100644 endpoint_labels/docs/Error.md create mode 100644 endpoint_labels/docs/Expand.md rename {endpoint/labels_api => endpoint_labels}/docs/Filter.md (86%) rename {endpoint/labels_api => endpoint_labels}/docs/FilterType.md (83%) create mode 100644 endpoint_labels/docs/Label.md rename {endpoint/labels_api => endpoint_labels}/docs/LabelFilterMode.md (99%) create mode 100644 endpoint_labels/docs/Labels.md rename {endpoint/labels_api => endpoint_labels}/docs/LabelsLabelsInner.md (85%) create mode 100644 endpoint_labels/docs/Link.md create mode 100644 endpoint_labels/docs/ManageLabelsApi.md rename {endpoint/labels_api => endpoint_labels}/docs/MatchType.md (99%) create mode 100644 endpoint_labels/docs/PaginationNextAndSelfLink.md create mode 100644 endpoint_labels/docs/PaginationNextAndSelfLinkLinks.md create mode 100644 endpoint_labels/docs/SelfLinks.md create mode 100644 endpoint_labels/docs/SelfLinksLinks.md create mode 100644 endpoint_labels/docs/UnauthorizedError.md rename {endpoint/labels_api => endpoint_labels}/docs/V7EndpointLabelsPost201Response.md (81%) rename {endpoint/labels_api => endpoint_labels}/docs/V7EndpointLabelsPostRequest.md (80%) create mode 100644 endpoint_labels/docs/ValidationError.md create mode 100644 endpoint_labels/docs/ValidationErrorAllOfErrors.md create mode 100644 endpoint_labels/endpoint_labels/__init__.py create mode 100644 endpoint_labels/endpoint_labels/api/__init__.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/api/manage_labels_api.py (80%) create mode 100644 endpoint_labels/endpoint_labels/api_client.py create mode 100644 endpoint_labels/endpoint_labels/api_response.py create mode 100644 endpoint_labels/endpoint_labels/configuration.py create mode 100644 endpoint_labels/endpoint_labels/exceptions.py create mode 100644 endpoint_labels/endpoint_labels/models/__init__.py create mode 100644 endpoint_labels/endpoint_labels/models/endpoint_labels_list200_response.py create mode 100644 endpoint_labels/endpoint_labels/models/error.py create mode 100644 endpoint_labels/endpoint_labels/models/expand.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/filter.py (76%) rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/filter_type.py (83%) create mode 100644 endpoint_labels/endpoint_labels/models/label.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/label_filter_mode.py (82%) create mode 100644 endpoint_labels/endpoint_labels/models/labels.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/labels_labels_inner.py (78%) create mode 100644 endpoint_labels/endpoint_labels/models/link.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/match_type.py (80%) create mode 100644 endpoint_labels/endpoint_labels/models/pagination_next_and_self_link.py create mode 100644 endpoint_labels/endpoint_labels/models/pagination_next_and_self_link_links.py create mode 100644 endpoint_labels/endpoint_labels/models/self_links.py create mode 100644 endpoint_labels/endpoint_labels/models/self_links_links.py create mode 100644 endpoint_labels/endpoint_labels/models/unauthorized_error.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/v7_endpoint_labels_post201_response.py (78%) rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/models/v7_endpoint_labels_post_request.py (80%) create mode 100644 endpoint_labels/endpoint_labels/models/validation_error.py create mode 100644 endpoint_labels/endpoint_labels/models/validation_error_all_of_errors.py rename {endpoint/labels_api/labels_api => endpoint_labels/endpoint_labels}/py.typed (100%) create mode 100644 endpoint_labels/endpoint_labels/rest.py create mode 100644 endpoint_labels/pyproject.toml rename {endpoint/labels_api => endpoint_labels}/requirements.txt (100%) rename {endpoint/labels_api => endpoint_labels}/setup.cfg (100%) create mode 100644 endpoint_labels/setup.py create mode 100644 endpoint_labels/test-requirements.txt rename {endpoint/labels_api => endpoint_labels}/test/__init__.py (100%) create mode 100644 endpoint_labels/test/test_endpoint_labels_list200_response.py create mode 100644 endpoint_labels/test/test_error.py create mode 100644 endpoint_labels/test/test_expand.py rename {endpoint/labels_api => endpoint_labels}/test/test_filter.py (92%) rename {endpoint/labels_api => endpoint_labels}/test/test_filter_type.py (82%) create mode 100644 endpoint_labels/test/test_label.py rename {endpoint/labels_api => endpoint_labels}/test/test_label_filter_mode.py (81%) create mode 100644 endpoint_labels/test/test_labels.py rename {endpoint/labels_api => endpoint_labels}/test/test_labels_labels_inner.py (85%) create mode 100644 endpoint_labels/test/test_link.py rename {endpoint/labels_api => endpoint_labels}/test/test_match_type.py (82%) create mode 100644 endpoint_labels/test/test_pagination_next_and_self_link.py create mode 100644 endpoint_labels/test/test_pagination_next_and_self_link_links.py create mode 100644 endpoint_labels/test/test_self_links.py create mode 100644 endpoint_labels/test/test_self_links_links.py create mode 100644 endpoint_labels/test/test_unauthorized_error.py rename {endpoint/labels_api => endpoint_labels}/test/test_v7_endpoint_labels_post201_response.py (85%) rename {endpoint/labels_api => endpoint_labels}/test/test_v7_endpoint_labels_post_request.py (88%) create mode 100644 endpoint_labels/test/test_validation_error.py create mode 100644 endpoint_labels/test/test_validation_error_all_of_errors.py rename {endpoint/test_results_api => endpoint_test_results}/.gitignore (100%) rename {endpoint/test_results_api => endpoint_test_results}/.openapi-generator-ignore (100%) create mode 100644 endpoint_test_results/.openapi-generator/FILES create mode 100644 endpoint_test_results/.openapi-generator/VERSION create mode 100644 endpoint_test_results/README.md create mode 100644 endpoint_test_results/docs/AccountGroupId.md create mode 100644 endpoint_test_results/docs/AlertDirection.md create mode 100644 endpoint_test_results/docs/AlertRoundsViolationMode.md create mode 100644 endpoint_test_results/docs/AlertRule.md create mode 100644 endpoint_test_results/docs/AlertType.md rename {endpoint/test_results_api => endpoint_test_results}/docs/ApplicationScoreQuality.md (99%) rename {endpoint/test_results_api => endpoint_test_results}/docs/AsnDetails.md (84%) create mode 100644 endpoint_test_results/docs/ConditionalOperator.md rename {endpoint/test_results_api => endpoint_test_results}/docs/CpuUtilization.md (88%) create mode 100644 endpoint_test_results/docs/DynamicBaseTestResult.md create mode 100644 endpoint_test_results/docs/DynamicBaseTestResultWebex.md create mode 100644 endpoint_test_results/docs/DynamicTest.md create mode 100644 endpoint_test_results/docs/DynamicTestLinks.md create mode 100644 endpoint_test_results/docs/DynamicTestLinksSelf.md rename {endpoint/test_results_api => endpoint_test_results}/docs/DynamicTestsDataRoundSearch.md (80%) rename {endpoint/test_results_api => endpoint_test_results}/docs/DynamicTestsDataSearchFilter.md (78%) create mode 100644 endpoint_test_results/docs/EndpointAgentLabelsSelectorConfig.md create mode 100644 endpoint_test_results/docs/EndpointAgentSelectorConfig.md create mode 100644 endpoint_test_results/docs/EndpointAgentToServerTest.md create mode 100644 endpoint_test_results/docs/EndpointAllAgentsSelectorConfig.md rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointBrowser.md (81%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointHttpDataPointScore.md (79%) create mode 100644 endpoint_test_results/docs/EndpointHttpServerBaseTest.md create mode 100644 endpoint_test_results/docs/EndpointHttpServerTest.md rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointNetworkTopologyResultRequestFilter.md (82%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointPingDataPointScore.md (79%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointRealUserTest.md (91%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointRealUserTestBase.md (90%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointRealUserTestDetail.md (91%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointRealUserTestDetailResults.md (75%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointRealUserTestResultRequestFilter.md (84%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointRealUserTestResults.md (76%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointResultRequestFilter.md (85%) rename {endpoint/test_results_api => endpoint_test_results}/docs/EndpointScheduledTest.md (83%) create mode 100644 endpoint_test_results/docs/EndpointScheduledTestType.md create mode 100644 endpoint_test_results/docs/EndpointSpecificAgentsSelectorConfig.md create mode 100644 endpoint_test_results/docs/EndpointTest.md create mode 100644 endpoint_test_results/docs/EndpointTestAuthType.md create mode 100644 endpoint_test_results/docs/EndpointTestLinks.md create mode 100644 endpoint_test_results/docs/EndpointTestLinksSelf.md create mode 100644 endpoint_test_results/docs/EndpointTestProtocol.md create mode 100644 endpoint_test_results/docs/Error.md create mode 100644 endpoint_test_results/docs/EthernetProfile.md create mode 100644 endpoint_test_results/docs/Expand.md rename {endpoint/test_results_api => endpoint_test_results}/docs/GetDynamicTestResultNetworkPathvis200Response.md (77%) create mode 100644 endpoint_test_results/docs/GetDynamicTestResultPathvisAgentRound200Response.md create mode 100644 endpoint_test_results/docs/GetEndpointLocalNetworkTopologyDetails200Response.md rename {endpoint/test_results_api => endpoint_test_results}/docs/GetEndpointLocalNetworks200Response.md (75%) rename {endpoint/test_results_api => endpoint_test_results}/docs/GetEndpointLocalNetworksTopologies200Response.md (81%) create mode 100644 endpoint_test_results/docs/GetEndpointLocalNetworksTopologiesRequest.md create mode 100644 endpoint_test_results/docs/GetEndpointRealUserTestDetails200Response.md create mode 100644 endpoint_test_results/docs/GetEndpointRealUserTestPagesDetails200Response.md rename {endpoint/test_results_api => endpoint_test_results}/docs/GetEndpointRealUserTests200Response.md (83%) rename {endpoint/test_results_api => endpoint_test_results}/docs/GetEndpointRealUserTestsNetwork200Response.md (82%) rename {endpoint/test_results_api => endpoint_test_results}/docs/GetEndpointRealUserTestsPages200Response.md (82%) rename {endpoint/test_results_api => endpoint_test_results}/docs/GetEndpointRealUserTestsRequest.md (76%) create mode 100644 endpoint_test_results/docs/GetTestResultHttpServer200Response.md create mode 100644 endpoint_test_results/docs/GetTestResultNetworkPathvis200Response.md rename {endpoint/test_results_api => endpoint_test_results}/docs/GetTestResultPathvisAgentRound200Response.md (75%) rename {endpoint/test_results_api => endpoint_test_results}/docs/Hop.md (88%) rename {endpoint/test_results_api => endpoint_test_results}/docs/HttpErrorType.md (99%) create mode 100644 endpoint_test_results/docs/HttpTestResult.md create mode 100644 endpoint_test_results/docs/HttpTestResultHeaders.md create mode 100644 endpoint_test_results/docs/HttpTestResults.md create mode 100644 endpoint_test_results/docs/InterfaceHardwareType.md create mode 100644 endpoint_test_results/docs/Link.md rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkResult.md (83%) rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkResults.md (79%) rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkTestsResultsApi.md (87%) rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkTopologyDetailResults.md (75%) rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkTopologyResult.md (89%) rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkTopologyResultBase.md (86%) rename {endpoint/test_results_api => endpoint_test_results}/docs/LocalNetworkTopologyResults.md (77%) create mode 100644 endpoint_test_results/docs/MultiTestIdNetworkTestResults.md rename {endpoint/test_results_api => endpoint_test_results}/docs/MultiTestIdTestsDataRoundsSearch.md (78%) rename {endpoint/test_results_api => endpoint_test_results}/docs/MultiTestIdTestsDataSearchFilter.md (75%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkDynamicTestResult.md (77%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkDynamicTestResults.md (78%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkDynamicTestsResultsApi.md (84%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkInterface.md (81%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkMetrics.md (84%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkPing.md (88%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkProfile.md (86%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkProxyProfile.md (80%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkProxyProfileProxiesInner.md (76%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkScheduledTestsResultsApi.md (85%) create mode 100644 endpoint_test_results/docs/NetworkTestResult.md create mode 100644 endpoint_test_results/docs/NetworkTestResults.md rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkTopologyType.md (99%) rename {endpoint/test_results_api => endpoint_test_results}/docs/NetworkWirelessProfile.md (85%) create mode 100644 endpoint_test_results/docs/PaginationNextAndSelfLink.md create mode 100644 endpoint_test_results/docs/PaginationNextAndSelfLinkLinks.md create mode 100644 endpoint_test_results/docs/PaginationNextLink.md create mode 100644 endpoint_test_results/docs/PaginationNextLinkLinks.md create mode 100644 endpoint_test_results/docs/PathVisBaseTestResult.md create mode 100644 endpoint_test_results/docs/PathVisDetailDynamicTestResult.md rename {endpoint/test_results_api => endpoint_test_results}/docs/PathVisDetailDynamicTestResults.md (76%) create mode 100644 endpoint_test_results/docs/PathVisDetailTestResult.md create mode 100644 endpoint_test_results/docs/PathVisDetailTestResults.md create mode 100644 endpoint_test_results/docs/PathVisDynamicTestResult.md rename {endpoint/test_results_api => endpoint_test_results}/docs/PathVisDynamicTestResults.md (78%) create mode 100644 endpoint_test_results/docs/PathVisEndpoint.md create mode 100644 endpoint_test_results/docs/PathVisHop.md create mode 100644 endpoint_test_results/docs/PathVisRoute.md create mode 100644 endpoint_test_results/docs/PathVisTestResult.md create mode 100644 endpoint_test_results/docs/PathVisTestResults.md rename {endpoint/test_results_api => endpoint_test_results}/docs/PhysicalMemoryUsedBytes.md (86%) create mode 100644 endpoint_test_results/docs/Platform.md rename {endpoint/test_results_api => endpoint_test_results}/docs/PostFetchDynamicTestResultMetrics200Response.md (82%) rename {endpoint/test_results_api => endpoint_test_results}/docs/PostFetchTestResultMetrics200Response.md (79%) rename {endpoint/test_results_api => endpoint_test_results}/docs/PostFetchTestResultMetricsMultiTest200Response.md (77%) create mode 100644 endpoint_test_results/docs/QueryWindow.md rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestCoordinates.md (82%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetwork.md (89%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkGatewayPing.md (83%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkPing.md (84%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkResult.md (85%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkResults.md (76%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkTraceroute.md (80%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkVpnPing.md (84%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestNetworkVpnTraceroute.md (79%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestPage.md (86%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestPagePageTimings.md (77%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestPageResult.md (88%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestPageResults.md (77%) rename {endpoint/test_results_api => endpoint_test_results}/docs/RealUserTestsResultsApi.md (88%) create mode 100644 endpoint_test_results/docs/SelfLinks.md create mode 100644 endpoint_test_results/docs/SelfLinksLinks.md create mode 100644 endpoint_test_results/docs/Severity.md create mode 100644 endpoint_test_results/docs/SortOrder.md rename {endpoint/test_results_api => endpoint_test_results}/docs/SystemMetrics.md (87%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TcpConnect.md (86%) create mode 100644 endpoint_test_results/docs/TestInterval.md create mode 100644 endpoint_test_results/docs/TestLabelsInner.md create mode 100644 endpoint_test_results/docs/TestProbeModeResponse.md create mode 100644 endpoint_test_results/docs/TestResult.md create mode 100644 endpoint_test_results/docs/TestSslVersionId.md rename {endpoint/test_results_api => endpoint_test_results}/docs/TestsDataRoundsSearch.md (81%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TestsDataSearchFilter.md (78%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TestsDataSearchSort.md (80%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TestsDataSearchSortKey.md (99%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TestsDataThresholdFilter.md (81%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TestsDataThresholdFilters.md (80%) rename {endpoint/test_results_api => endpoint_test_results}/docs/ThresholdFilterName.md (99%) create mode 100644 endpoint_test_results/docs/ThresholdFilterOperator.md rename {endpoint/test_results_api => endpoint_test_results}/docs/Traceroute.md (86%) rename {endpoint/test_results_api => endpoint_test_results}/docs/TracerouteHop.md (87%) rename {endpoint/test_results_api => endpoint_test_results}/docs/Trigger.md (99%) create mode 100644 endpoint_test_results/docs/UnauthorizedError.md create mode 100644 endpoint_test_results/docs/ValidationError.md create mode 100644 endpoint_test_results/docs/ValidationErrorAllOfErrors.md rename {endpoint/test_results_api => endpoint_test_results}/docs/VpnProfile.md (87%) create mode 100644 endpoint_test_results/docs/VpnType.md rename {endpoint/test_results_api => endpoint_test_results}/docs/WebHTTPServerScheduledTestResultsApi.md (83%) create mode 100644 endpoint_test_results/endpoint_test_results/__init__.py create mode 100644 endpoint_test_results/endpoint_test_results/api/__init__.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/api/local_network_tests_results_api.py (96%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/api/network_dynamic_tests_results_api.py (95%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/api/network_scheduled_tests_results_api.py (95%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/api/real_user_tests_results_api.py (96%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/api/web_http_server_scheduled_test_results_api.py (95%) create mode 100644 endpoint_test_results/endpoint_test_results/api_client.py create mode 100644 endpoint_test_results/endpoint_test_results/api_response.py create mode 100644 endpoint_test_results/endpoint_test_results/configuration.py create mode 100644 endpoint_test_results/endpoint_test_results/exceptions.py create mode 100644 endpoint_test_results/endpoint_test_results/models/__init__.py create mode 100644 endpoint_test_results/endpoint_test_results/models/account_group_id.py create mode 100644 endpoint_test_results/endpoint_test_results/models/alert_direction.py create mode 100644 endpoint_test_results/endpoint_test_results/models/alert_rounds_violation_mode.py create mode 100644 endpoint_test_results/endpoint_test_results/models/alert_rule.py create mode 100644 endpoint_test_results/endpoint_test_results/models/alert_type.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/application_score_quality.py (79%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/asn_details.py (79%) create mode 100644 endpoint_test_results/endpoint_test_results/models/conditional_operator.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/cpu_utilization.py (85%) create mode 100644 endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result_webex.py create mode 100644 endpoint_test_results/endpoint_test_results/models/dynamic_test.py create mode 100644 endpoint_test_results/endpoint_test_results/models/dynamic_test_links.py create mode 100644 endpoint_test_results/endpoint_test_results/models/dynamic_test_links_self.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/dynamic_tests_data_round_search.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/dynamic_tests_data_search_filter.py (81%) create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_agent_labels_selector_config.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_agent_selector_config.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_agent_to_server_test.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_all_agents_selector_config.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_browser.py (79%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_http_data_point_score.py (78%) create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_http_server_base_test.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_http_server_test.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_network_topology_result_request_filter.py (83%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_ping_data_point_score.py (78%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_real_user_test.py (86%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_real_user_test_base.py (86%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_real_user_test_detail.py (81%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_real_user_test_detail_results.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_real_user_test_result_request_filter.py (85%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_real_user_test_results.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_result_request_filter.py (83%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/endpoint_scheduled_test.py (82%) create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_scheduled_test_type.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_specific_agents_selector_config.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_test.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_test_auth_type.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_test_links.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_test_links_self.py create mode 100644 endpoint_test_results/endpoint_test_results/models/endpoint_test_protocol.py create mode 100644 endpoint_test_results/endpoint_test_results/models/error.py create mode 100644 endpoint_test_results/endpoint_test_results/models/ethernet_profile.py create mode 100644 endpoint_test_results/endpoint_test_results/models/expand.py create mode 100644 endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_network_pathvis200_response.py create mode 100644 endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_pathvis_agent_round200_response.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_local_network_topology_details200_response.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_local_networks200_response.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_local_networks_topologies200_response.py (78%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_local_networks_topologies_request.py (76%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_real_user_test_details200_response.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_real_user_test_pages_details200_response.py (76%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_real_user_tests200_response.py (78%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_real_user_tests_network200_response.py (78%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_real_user_tests_pages200_response.py (78%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/get_endpoint_real_user_tests_request.py (76%) create mode 100644 endpoint_test_results/endpoint_test_results/models/get_test_result_http_server200_response.py create mode 100644 endpoint_test_results/endpoint_test_results/models/get_test_result_network_pathvis200_response.py create mode 100644 endpoint_test_results/endpoint_test_results/models/get_test_result_pathvis_agent_round200_response.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/hop.py (79%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/http_error_type.py (81%) create mode 100644 endpoint_test_results/endpoint_test_results/models/http_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/http_test_result_headers.py create mode 100644 endpoint_test_results/endpoint_test_results/models/http_test_results.py create mode 100644 endpoint_test_results/endpoint_test_results/models/interface_hardware_type.py create mode 100644 endpoint_test_results/endpoint_test_results/models/link.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/local_network_result.py (81%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/local_network_results.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/local_network_topology_detail_results.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/local_network_topology_result.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/local_network_topology_result_base.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/local_network_topology_results.py (77%) create mode 100644 endpoint_test_results/endpoint_test_results/models/multi_test_id_network_test_results.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/multi_test_id_tests_data_rounds_search.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/multi_test_id_tests_data_search_filter.py (80%) create mode 100644 endpoint_test_results/endpoint_test_results/models/network_dynamic_test_result.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_dynamic_test_results.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_interface.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_metrics.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_ping.py (82%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_profile.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_proxy_profile.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_proxy_profile_proxies_inner.py (80%) create mode 100644 endpoint_test_results/endpoint_test_results/models/network_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/network_test_results.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_topology_type.py (79%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/network_wireless_profile.py (83%) create mode 100644 endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link.py create mode 100644 endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link_links.py create mode 100644 endpoint_test_results/endpoint_test_results/models/pagination_next_link.py create mode 100644 endpoint_test_results/endpoint_test_results/models/pagination_next_link_links.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_base_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_results.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_dynamic_test_result.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/path_vis_dynamic_test_results.py (75%) create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_endpoint.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_hop.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_route.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/path_vis_test_results.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/physical_memory_used_bytes.py (83%) create mode 100644 endpoint_test_results/endpoint_test_results/models/platform.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/post_fetch_dynamic_test_result_metrics200_response.py (76%) create mode 100644 endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics200_response.py create mode 100644 endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics_multi_test200_response.py create mode 100644 endpoint_test_results/endpoint_test_results/models/query_window.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_coordinates.py (81%) create mode 100644 endpoint_test_results/endpoint_test_results/models/real_user_test_network.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_gateway_ping.py (83%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_ping.py (83%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_result.py (76%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_results.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_traceroute.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_vpn_ping.py (83%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_network_vpn_traceroute.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_page.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_page_page_timings.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_page_result.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/real_user_test_page_results.py (77%) create mode 100644 endpoint_test_results/endpoint_test_results/models/self_links.py create mode 100644 endpoint_test_results/endpoint_test_results/models/self_links_links.py create mode 100644 endpoint_test_results/endpoint_test_results/models/severity.py create mode 100644 endpoint_test_results/endpoint_test_results/models/sort_order.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/system_metrics.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tcp_connect.py (81%) create mode 100644 endpoint_test_results/endpoint_test_results/models/test_interval.py create mode 100644 endpoint_test_results/endpoint_test_results/models/test_labels_inner.py create mode 100644 endpoint_test_results/endpoint_test_results/models/test_probe_mode_response.py create mode 100644 endpoint_test_results/endpoint_test_results/models/test_result.py create mode 100644 endpoint_test_results/endpoint_test_results/models/test_ssl_version_id.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tests_data_rounds_search.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tests_data_search_filter.py (79%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tests_data_search_sort.py (75%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tests_data_search_sort_key.py (81%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tests_data_threshold_filter.py (76%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/tests_data_threshold_filters.py (77%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/threshold_filter_name.py (81%) create mode 100644 endpoint_test_results/endpoint_test_results/models/threshold_filter_operator.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/traceroute.py (80%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/traceroute_hop.py (82%) rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/trigger.py (77%) create mode 100644 endpoint_test_results/endpoint_test_results/models/unauthorized_error.py create mode 100644 endpoint_test_results/endpoint_test_results/models/validation_error.py create mode 100644 endpoint_test_results/endpoint_test_results/models/validation_error_all_of_errors.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/models/vpn_profile.py (80%) create mode 100644 endpoint_test_results/endpoint_test_results/models/vpn_type.py rename {endpoint/test_results_api/test_results_api => endpoint_test_results/endpoint_test_results}/py.typed (100%) create mode 100644 endpoint_test_results/endpoint_test_results/rest.py create mode 100644 endpoint_test_results/pyproject.toml rename {endpoint/test_results_api => endpoint_test_results}/requirements.txt (100%) rename {endpoint/test_results_api => endpoint_test_results}/setup.cfg (100%) create mode 100644 endpoint_test_results/setup.py create mode 100644 endpoint_test_results/test-requirements.txt rename {endpoint/test_results_api => endpoint_test_results}/test/__init__.py (100%) create mode 100644 endpoint_test_results/test/test_account_group_id.py create mode 100644 endpoint_test_results/test/test_alert_direction.py create mode 100644 endpoint_test_results/test/test_alert_rounds_violation_mode.py create mode 100644 endpoint_test_results/test/test_alert_rule.py create mode 100644 endpoint_test_results/test/test_alert_type.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_application_score_quality.py (80%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_asn_details.py (91%) create mode 100644 endpoint_test_results/test/test_conditional_operator.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_cpu_utilization.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_dynamic_base_test_result.py (75%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_dynamic_base_test_result_webex.py (81%) create mode 100644 endpoint_test_results/test/test_dynamic_test.py create mode 100644 endpoint_test_results/test/test_dynamic_test_links.py create mode 100644 endpoint_test_results/test/test_dynamic_test_links_self.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_dynamic_tests_data_round_search.py (77%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_dynamic_tests_data_search_filter.py (90%) create mode 100644 endpoint_test_results/test/test_endpoint_agent_labels_selector_config.py create mode 100644 endpoint_test_results/test/test_endpoint_agent_selector_config.py create mode 100644 endpoint_test_results/test/test_endpoint_agent_to_server_test.py create mode 100644 endpoint_test_results/test/test_endpoint_all_agents_selector_config.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_browser.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_http_data_point_score.py (90%) create mode 100644 endpoint_test_results/test/test_endpoint_http_server_base_test.py create mode 100644 endpoint_test_results/test/test_endpoint_http_server_test.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_network_topology_result_request_filter.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_ping_data_point_score.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_real_user_test.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_real_user_test_base.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_real_user_test_detail.py (78%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_real_user_test_detail_results.py (89%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_real_user_test_result_request_filter.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_real_user_test_results.py (89%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_endpoint_result_request_filter.py (92%) create mode 100644 endpoint_test_results/test/test_endpoint_scheduled_test.py create mode 100644 endpoint_test_results/test/test_endpoint_scheduled_test_type.py create mode 100644 endpoint_test_results/test/test_endpoint_specific_agents_selector_config.py create mode 100644 endpoint_test_results/test/test_endpoint_test.py create mode 100644 endpoint_test_results/test/test_endpoint_test_auth_type.py create mode 100644 endpoint_test_results/test/test_endpoint_test_links.py create mode 100644 endpoint_test_results/test/test_endpoint_test_links_self.py create mode 100644 endpoint_test_results/test/test_endpoint_test_protocol.py create mode 100644 endpoint_test_results/test/test_error.py create mode 100644 endpoint_test_results/test/test_ethernet_profile.py create mode 100644 endpoint_test_results/test/test_expand.py create mode 100644 endpoint_test_results/test/test_get_dynamic_test_result_network_pathvis200_response.py create mode 100644 endpoint_test_results/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_local_network_topology_details200_response.py (85%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_local_networks200_response.py (83%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_local_networks_topologies200_response.py (78%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_local_networks_topologies_request.py (89%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_real_user_test_details200_response.py (85%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_real_user_test_pages_details200_response.py (84%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_real_user_tests200_response.py (85%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_real_user_tests_network200_response.py (77%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_real_user_tests_pages200_response.py (85%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_endpoint_real_user_tests_request.py (89%) create mode 100644 endpoint_test_results/test/test_get_test_result_http_server200_response.py create mode 100644 endpoint_test_results/test/test_get_test_result_network_pathvis200_response.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_get_test_result_pathvis_agent_round200_response.py (85%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_hop.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_http_error_type.py (81%) create mode 100644 endpoint_test_results/test/test_http_test_result.py create mode 100644 endpoint_test_results/test/test_http_test_result_headers.py create mode 100644 endpoint_test_results/test/test_http_test_results.py create mode 100644 endpoint_test_results/test/test_interface_hardware_type.py create mode 100644 endpoint_test_results/test/test_link.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_local_network_result.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_local_network_results.py (87%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_local_network_topology_detail_results.py (89%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_local_network_topology_result.py (81%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_local_network_topology_result_base.py (82%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_local_network_topology_results.py (79%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_multi_test_id_network_test_results.py (87%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_multi_test_id_tests_data_rounds_search.py (76%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_multi_test_id_tests_data_search_filter.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_dynamic_test_result.py (76%) create mode 100644 endpoint_test_results/test/test_network_dynamic_test_results.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_interface.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_metrics.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_ping.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_profile.py (80%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_proxy_profile.py (85%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_proxy_profile_proxies_inner.py (89%) create mode 100644 endpoint_test_results/test/test_network_test_result.py create mode 100644 endpoint_test_results/test/test_network_test_results.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_topology_type.py (81%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_network_wireless_profile.py (91%) create mode 100644 endpoint_test_results/test/test_pagination_next_and_self_link.py create mode 100644 endpoint_test_results/test/test_pagination_next_and_self_link_links.py create mode 100644 endpoint_test_results/test/test_pagination_next_link.py create mode 100644 endpoint_test_results/test/test_pagination_next_link_links.py create mode 100644 endpoint_test_results/test/test_path_vis_base_test_result.py create mode 100644 endpoint_test_results/test/test_path_vis_detail_dynamic_test_result.py create mode 100644 endpoint_test_results/test/test_path_vis_detail_dynamic_test_results.py create mode 100644 endpoint_test_results/test/test_path_vis_detail_test_result.py create mode 100644 endpoint_test_results/test/test_path_vis_detail_test_results.py create mode 100644 endpoint_test_results/test/test_path_vis_dynamic_test_result.py create mode 100644 endpoint_test_results/test/test_path_vis_dynamic_test_results.py create mode 100644 endpoint_test_results/test/test_path_vis_endpoint.py create mode 100644 endpoint_test_results/test/test_path_vis_hop.py create mode 100644 endpoint_test_results/test/test_path_vis_route.py create mode 100644 endpoint_test_results/test/test_path_vis_test_result.py create mode 100644 endpoint_test_results/test/test_path_vis_test_results.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_physical_memory_used_bytes.py (90%) create mode 100644 endpoint_test_results/test/test_platform.py create mode 100644 endpoint_test_results/test/test_post_fetch_dynamic_test_result_metrics200_response.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_post_fetch_test_result_metrics200_response.py (84%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_post_fetch_test_result_metrics_multi_test200_response.py (84%) create mode 100644 endpoint_test_results/test/test_query_window.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_coordinates.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network.py (83%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_gateway_ping.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_ping.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_result.py (78%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_results.py (77%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_traceroute.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_vpn_ping.py (91%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_network_vpn_traceroute.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_page.py (86%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_page_page_timings.py (89%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_page_result.py (81%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_real_user_test_page_results.py (90%) create mode 100644 endpoint_test_results/test/test_self_links.py create mode 100644 endpoint_test_results/test/test_self_links_links.py create mode 100644 endpoint_test_results/test/test_severity.py create mode 100644 endpoint_test_results/test/test_sort_order.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_system_metrics.py (83%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_tcp_connect.py (91%) create mode 100644 endpoint_test_results/test/test_test_interval.py create mode 100644 endpoint_test_results/test/test_test_labels_inner.py create mode 100644 endpoint_test_results/test/test_test_probe_mode_response.py create mode 100644 endpoint_test_results/test/test_test_result.py create mode 100644 endpoint_test_results/test/test_test_ssl_version_id.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_tests_data_rounds_search.py (76%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_tests_data_search_filter.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_tests_data_search_sort.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_tests_data_search_sort_key.py (80%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_tests_data_threshold_filter.py (90%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_tests_data_threshold_filters.py (86%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_threshold_filter_name.py (81%) create mode 100644 endpoint_test_results/test/test_threshold_filter_operator.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_traceroute.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_traceroute_hop.py (92%) rename {endpoint/test_results_api => endpoint_test_results}/test/test_trigger.py (82%) create mode 100644 endpoint_test_results/test/test_unauthorized_error.py create mode 100644 endpoint_test_results/test/test_validation_error.py create mode 100644 endpoint_test_results/test/test_validation_error_all_of_errors.py rename {endpoint/test_results_api => endpoint_test_results}/test/test_vpn_profile.py (92%) create mode 100644 endpoint_test_results/test/test_vpn_type.py rename {endpoint/tests_api => endpoint_tests}/.gitignore (100%) rename {endpoint/tests_api => endpoint_tests}/.openapi-generator-ignore (100%) create mode 100644 endpoint_tests/.openapi-generator/FILES create mode 100644 endpoint_tests/.openapi-generator/VERSION create mode 100644 endpoint_tests/README.md create mode 100644 endpoint_tests/docs/AccountGroupId.md create mode 100644 endpoint_tests/docs/AlertDirection.md create mode 100644 endpoint_tests/docs/AlertRoundsViolationMode.md create mode 100644 endpoint_tests/docs/AlertRule.md create mode 100644 endpoint_tests/docs/AlertType.md create mode 100644 endpoint_tests/docs/DynamicTest.md create mode 100644 endpoint_tests/docs/DynamicTestLinks.md create mode 100644 endpoint_tests/docs/DynamicTestLinksSelf.md rename {endpoint/tests_api => endpoint_tests}/docs/DynamicTestRequest.md (76%) rename {endpoint/tests_api => endpoint_tests}/docs/DynamicTests.md (82%) create mode 100644 endpoint_tests/docs/DynamicTestsAgentToServerApi.md create mode 100644 endpoint_tests/docs/EndpointAgentLabelsSelectorConfig.md create mode 100644 endpoint_tests/docs/EndpointAgentSelectorConfig.md create mode 100644 endpoint_tests/docs/EndpointAgentToServerInstantTest.md create mode 100644 endpoint_tests/docs/EndpointAgentToServerTest.md rename {endpoint/tests_api => endpoint_tests}/docs/EndpointAgentToServerTestRequest.md (87%) rename {endpoint/tests_api => endpoint_tests}/docs/EndpointAgentToServerTests.md (77%) create mode 100644 endpoint_tests/docs/EndpointAllAgentsSelectorConfig.md create mode 100644 endpoint_tests/docs/EndpointDynamicTestUpdate.md create mode 100644 endpoint_tests/docs/EndpointHttpServerBaseTest.md create mode 100644 endpoint_tests/docs/EndpointHttpServerInstantTest.md create mode 100644 endpoint_tests/docs/EndpointHttpServerTest.md rename {endpoint/tests_api => endpoint_tests}/docs/EndpointHttpServerTestRequest.md (89%) rename {endpoint/tests_api => endpoint_tests}/docs/EndpointHttpServerTests.md (78%) create mode 100644 endpoint_tests/docs/EndpointHttpTestUpdate.md create mode 100644 endpoint_tests/docs/EndpointInstantTest.md create mode 100644 endpoint_tests/docs/EndpointNetworkTestUpdate.md create mode 100644 endpoint_tests/docs/EndpointScheduledTestType.md create mode 100644 endpoint_tests/docs/EndpointSpecificAgentsSelectorConfig.md create mode 100644 endpoint_tests/docs/EndpointTest.md create mode 100644 endpoint_tests/docs/EndpointTestAgentSelectorType.md create mode 100644 endpoint_tests/docs/EndpointTestAuthType.md create mode 100644 endpoint_tests/docs/EndpointTestLinks.md create mode 100644 endpoint_tests/docs/EndpointTestLinksSelf.md create mode 100644 endpoint_tests/docs/EndpointTestProtocol.md rename {endpoint/tests_api => endpoint_tests}/docs/EndpointTests.md (81%) create mode 100644 endpoint_tests/docs/Error.md rename {endpoint/tests_api => endpoint_tests}/docs/GetDynamicTestsList200Response.md (77%) create mode 100644 endpoint_tests/docs/GetEndpointAgentToserverTestsList200Response.md rename {endpoint/tests_api => endpoint_tests}/docs/GetEndpointHttpserverTestsList200Response.md (75%) rename {endpoint/tests_api => endpoint_tests}/docs/GetEndpointTestsList200Response.md (76%) create mode 100644 endpoint_tests/docs/Link.md rename {endpoint/tests_api => endpoint_tests}/docs/ListEndpointScheduledTestsApi.md (86%) create mode 100644 endpoint_tests/docs/ScheduledTestsAgentToServerApi.md create mode 100644 endpoint_tests/docs/ScheduledTestsHTTPServerApi.md create mode 100644 endpoint_tests/docs/SelfLinks.md create mode 100644 endpoint_tests/docs/SelfLinksLinks.md create mode 100644 endpoint_tests/docs/Severity.md create mode 100644 endpoint_tests/docs/TestInterval.md create mode 100644 endpoint_tests/docs/TestLabelsInner.md create mode 100644 endpoint_tests/docs/TestProbeMode.md create mode 100644 endpoint_tests/docs/TestProbeModeResponse.md create mode 100644 endpoint_tests/docs/TestSslVersionId.md create mode 100644 endpoint_tests/docs/TestUpdate.md create mode 100644 endpoint_tests/docs/UnauthorizedError.md create mode 100644 endpoint_tests/docs/ValidationError.md create mode 100644 endpoint_tests/docs/ValidationErrorAllOfErrors.md create mode 100644 endpoint_tests/endpoint_tests/__init__.py create mode 100644 endpoint_tests/endpoint_tests/api/__init__.py create mode 100644 endpoint_tests/endpoint_tests/api/dynamic_tests_agent_to_server_api.py rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/api/list_endpoint_scheduled_tests_api.py (94%) create mode 100644 endpoint_tests/endpoint_tests/api/scheduled_tests_agent_to_server_api.py create mode 100644 endpoint_tests/endpoint_tests/api/scheduled_tests_http_server_api.py create mode 100644 endpoint_tests/endpoint_tests/api_client.py create mode 100644 endpoint_tests/endpoint_tests/api_response.py create mode 100644 endpoint_tests/endpoint_tests/configuration.py create mode 100644 endpoint_tests/endpoint_tests/exceptions.py create mode 100644 endpoint_tests/endpoint_tests/models/__init__.py create mode 100644 endpoint_tests/endpoint_tests/models/account_group_id.py create mode 100644 endpoint_tests/endpoint_tests/models/alert_direction.py create mode 100644 endpoint_tests/endpoint_tests/models/alert_rounds_violation_mode.py create mode 100644 endpoint_tests/endpoint_tests/models/alert_rule.py create mode 100644 endpoint_tests/endpoint_tests/models/alert_type.py create mode 100644 endpoint_tests/endpoint_tests/models/dynamic_test.py create mode 100644 endpoint_tests/endpoint_tests/models/dynamic_test_links.py create mode 100644 endpoint_tests/endpoint_tests/models/dynamic_test_links_self.py create mode 100644 endpoint_tests/endpoint_tests/models/dynamic_test_request.py rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/models/dynamic_tests.py (75%) create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_agent_labels_selector_config.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_agent_selector_config.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_instant_test.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test.py rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/models/endpoint_agent_to_server_test_request.py (80%) create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_tests.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_all_agents_selector_config.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_dynamic_test_update.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_http_server_base_test.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_http_server_instant_test.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_http_server_test.py rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/models/endpoint_http_server_test_request.py (81%) rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/models/endpoint_http_server_tests.py (75%) create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_http_test_update.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_instant_test.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_network_test_update.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_scheduled_test_type.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_specific_agents_selector_config.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_test.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_test_agent_selector_type.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_test_auth_type.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_test_links.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_test_links_self.py create mode 100644 endpoint_tests/endpoint_tests/models/endpoint_test_protocol.py rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/models/endpoint_tests.py (75%) create mode 100644 endpoint_tests/endpoint_tests/models/error.py create mode 100644 endpoint_tests/endpoint_tests/models/get_dynamic_tests_list200_response.py create mode 100644 endpoint_tests/endpoint_tests/models/get_endpoint_agent_toserver_tests_list200_response.py create mode 100644 endpoint_tests/endpoint_tests/models/get_endpoint_httpserver_tests_list200_response.py create mode 100644 endpoint_tests/endpoint_tests/models/get_endpoint_tests_list200_response.py create mode 100644 endpoint_tests/endpoint_tests/models/link.py create mode 100644 endpoint_tests/endpoint_tests/models/self_links.py create mode 100644 endpoint_tests/endpoint_tests/models/self_links_links.py create mode 100644 endpoint_tests/endpoint_tests/models/severity.py create mode 100644 endpoint_tests/endpoint_tests/models/test_interval.py create mode 100644 endpoint_tests/endpoint_tests/models/test_labels_inner.py create mode 100644 endpoint_tests/endpoint_tests/models/test_probe_mode.py create mode 100644 endpoint_tests/endpoint_tests/models/test_probe_mode_response.py create mode 100644 endpoint_tests/endpoint_tests/models/test_ssl_version_id.py create mode 100644 endpoint_tests/endpoint_tests/models/test_update.py create mode 100644 endpoint_tests/endpoint_tests/models/unauthorized_error.py create mode 100644 endpoint_tests/endpoint_tests/models/validation_error.py create mode 100644 endpoint_tests/endpoint_tests/models/validation_error_all_of_errors.py rename {endpoint/tests_api/tests_api => endpoint_tests/endpoint_tests}/py.typed (100%) create mode 100644 endpoint_tests/endpoint_tests/rest.py create mode 100644 endpoint_tests/pyproject.toml rename {endpoint/tests_api => endpoint_tests}/requirements.txt (100%) rename {endpoint/tests_api => endpoint_tests}/setup.cfg (100%) create mode 100644 endpoint_tests/setup.py create mode 100644 endpoint_tests/test-requirements.txt rename {endpoint/tests_api => endpoint_tests}/test/__init__.py (100%) create mode 100644 endpoint_tests/test/test_account_group_id.py create mode 100644 endpoint_tests/test/test_alert_direction.py create mode 100644 endpoint_tests/test/test_alert_rounds_violation_mode.py create mode 100644 endpoint_tests/test/test_alert_rule.py create mode 100644 endpoint_tests/test/test_alert_type.py create mode 100644 endpoint_tests/test/test_dynamic_test.py create mode 100644 endpoint_tests/test/test_dynamic_test_links.py create mode 100644 endpoint_tests/test/test_dynamic_test_links_self.py rename {endpoint/tests_api => endpoint_tests}/test/test_dynamic_test_request.py (79%) create mode 100644 endpoint_tests/test/test_dynamic_tests.py create mode 100644 endpoint_tests/test/test_endpoint_agent_labels_selector_config.py create mode 100644 endpoint_tests/test/test_endpoint_agent_selector_config.py create mode 100644 endpoint_tests/test/test_endpoint_agent_to_server_instant_test.py create mode 100644 endpoint_tests/test/test_endpoint_agent_to_server_test.py rename {endpoint/tests_api => endpoint_tests}/test/test_endpoint_agent_to_server_test_request.py (81%) rename {endpoint/tests_api => endpoint_tests}/test/test_endpoint_agent_to_server_tests.py (84%) create mode 100644 endpoint_tests/test/test_endpoint_all_agents_selector_config.py create mode 100644 endpoint_tests/test/test_endpoint_dynamic_test_update.py create mode 100644 endpoint_tests/test/test_endpoint_http_server_base_test.py create mode 100644 endpoint_tests/test/test_endpoint_http_server_instant_test.py create mode 100644 endpoint_tests/test/test_endpoint_http_server_test.py rename {endpoint/tests_api => endpoint_tests}/test/test_endpoint_http_server_test_request.py (90%) rename {endpoint/tests_api => endpoint_tests}/test/test_endpoint_http_server_tests.py (84%) create mode 100644 endpoint_tests/test/test_endpoint_http_test_update.py create mode 100644 endpoint_tests/test/test_endpoint_instant_test.py create mode 100644 endpoint_tests/test/test_endpoint_network_test_update.py create mode 100644 endpoint_tests/test/test_endpoint_scheduled_test_type.py create mode 100644 endpoint_tests/test/test_endpoint_specific_agents_selector_config.py create mode 100644 endpoint_tests/test/test_endpoint_test.py create mode 100644 endpoint_tests/test/test_endpoint_test_agent_selector_type.py create mode 100644 endpoint_tests/test/test_endpoint_test_auth_type.py create mode 100644 endpoint_tests/test/test_endpoint_test_links.py create mode 100644 endpoint_tests/test/test_endpoint_test_links_self.py create mode 100644 endpoint_tests/test/test_endpoint_test_protocol.py create mode 100644 endpoint_tests/test/test_endpoint_tests.py create mode 100644 endpoint_tests/test/test_error.py create mode 100644 endpoint_tests/test/test_get_dynamic_tests_list200_response.py rename {endpoint/tests_api => endpoint_tests}/test/test_get_endpoint_agent_toserver_tests_list200_response.py (81%) rename {endpoint/tests_api => endpoint_tests}/test/test_get_endpoint_httpserver_tests_list200_response.py (81%) create mode 100644 endpoint_tests/test/test_get_endpoint_tests_list200_response.py create mode 100644 endpoint_tests/test/test_link.py create mode 100644 endpoint_tests/test/test_self_links.py create mode 100644 endpoint_tests/test/test_self_links_links.py create mode 100644 endpoint_tests/test/test_severity.py create mode 100644 endpoint_tests/test/test_test_interval.py create mode 100644 endpoint_tests/test/test_test_labels_inner.py create mode 100644 endpoint_tests/test/test_test_probe_mode.py create mode 100644 endpoint_tests/test/test_test_probe_mode_response.py create mode 100644 endpoint_tests/test/test_test_ssl_version_id.py create mode 100644 endpoint_tests/test/test_test_update.py create mode 100644 endpoint_tests/test/test_unauthorized_error.py create mode 100644 endpoint_tests/test/test_validation_error.py create mode 100644 endpoint_tests/test/test_validation_error_all_of_errors.py rename {instant_tests_api => instant_tests}/.gitignore (100%) rename {instant_tests_api => instant_tests}/.openapi-generator-ignore (100%) create mode 100644 instant_tests/.openapi-generator/FILES create mode 100644 instant_tests/.openapi-generator/VERSION create mode 100644 instant_tests/README.md create mode 100644 instant_tests/docs/Agent.md create mode 100644 instant_tests/docs/AgentBase.md create mode 100644 instant_tests/docs/AgentToAgentApi.md create mode 100644 instant_tests/docs/AgentToAgentInstantTest.md rename {instant_tests_api => instant_tests}/docs/AgentToAgentInstantTestRequest.md (92%) create mode 100644 instant_tests/docs/AgentToAgentProperties.md create mode 100644 instant_tests/docs/AgentToAgentTestProtocol.md create mode 100644 instant_tests/docs/AgentToServerApi.md create mode 100644 instant_tests/docs/AgentToServerInstantTest.md rename {instant_tests_api => instant_tests}/docs/AgentToServerInstantTestRequest.md (93%) create mode 100644 instant_tests/docs/AgentToServerProperties.md create mode 100644 instant_tests/docs/CloudEnterpriseAgentType.md rename {instant_tests_api => instant_tests}/docs/DNSSecurityApi.md (78%) create mode 100644 instant_tests/docs/DNSServerApi.md create mode 100644 instant_tests/docs/DNSTraceApi.md create mode 100644 instant_tests/docs/DnsQueryClass.md create mode 100644 instant_tests/docs/DnsSecInstantTest.md rename {instant_tests_api => instant_tests}/docs/DnsSecInstantTestRequest.md (91%) create mode 100644 instant_tests/docs/DnsSecProperties.md create mode 100644 instant_tests/docs/DnsServerInstantTest.md rename {instant_tests_api => instant_tests}/docs/DnsServerInstantTestRequest.md (93%) create mode 100644 instant_tests/docs/DnsServerProperties.md create mode 100644 instant_tests/docs/DnsServersRequest.md create mode 100644 instant_tests/docs/DnsTraceInstantTest.md rename {instant_tests_api => instant_tests}/docs/DnsTraceInstantTestRequest.md (91%) create mode 100644 instant_tests/docs/DnsTraceProperties.md create mode 100644 instant_tests/docs/Error.md create mode 100644 instant_tests/docs/Expand.md create mode 100644 instant_tests/docs/FTPServerApi.md create mode 100644 instant_tests/docs/FtpServerInstantTest.md create mode 100644 instant_tests/docs/FtpServerProperties.md create mode 100644 instant_tests/docs/FtpServerRequestType.md rename {instant_tests_api => instant_tests}/docs/HTTPPageLoadApi.md (78%) create mode 100644 instant_tests/docs/HTTPServerApi.md create mode 100644 instant_tests/docs/HttpServerInstantTest.md rename {instant_tests_api => instant_tests}/docs/HttpServerInstantTestRequest.md (92%) create mode 100644 instant_tests/docs/HttpServerProperties.md create mode 100644 instant_tests/docs/InstantTest.md rename {instant_tests_api => instant_tests}/docs/InstantTestRequest.md (80%) rename {instant_tests_api => instant_tests}/docs/InstantTestRequestAgentsInner.md (80%) create mode 100644 instant_tests/docs/Link.md create mode 100644 instant_tests/docs/PageLoadInstantTest.md rename {instant_tests_api => instant_tests}/docs/PageLoadInstantTestRequest.md (91%) create mode 100644 instant_tests/docs/PageLoadProperties.md rename {instant_tests_api => instant_tests}/docs/RunApi.md (86%) create mode 100644 instant_tests/docs/SIPServerApi.md rename {instant_tests_api => instant_tests}/docs/ServerInstantTestRequest.md (94%) create mode 100644 instant_tests/docs/SimpleAgent.md create mode 100644 instant_tests/docs/SipServerInstantTest.md create mode 100644 instant_tests/docs/SipServerInstantTestRequest.md create mode 100644 instant_tests/docs/SipServerInstantTestRequest1.md create mode 100644 instant_tests/docs/SipServerInstantTestResponse.md create mode 100644 instant_tests/docs/SipServerProperties.md create mode 100644 instant_tests/docs/SipTestProtocol.md create mode 100644 instant_tests/docs/TestAuthType.md create mode 100644 instant_tests/docs/TestCustomHeaders.md create mode 100644 instant_tests/docs/TestDirection.md create mode 100644 instant_tests/docs/TestDnsServer.md create mode 100644 instant_tests/docs/TestDnsTransportProtocol.md create mode 100644 instant_tests/docs/TestDscpId.md create mode 100644 instant_tests/docs/TestIpv6Policy.md create mode 100644 instant_tests/docs/TestLabelsInner.md create mode 100644 instant_tests/docs/TestPageLoadingStrategy.md create mode 100644 instant_tests/docs/TestPathTraceMode.md create mode 100644 instant_tests/docs/TestProbeMode.md create mode 100644 instant_tests/docs/TestProtocol.md create mode 100644 instant_tests/docs/TestSharedAccountsInner.md create mode 100644 instant_tests/docs/TestSipCredentials.md create mode 100644 instant_tests/docs/TestSslVersionId.md create mode 100644 instant_tests/docs/TestType.md create mode 100644 instant_tests/docs/UnauthorizedError.md create mode 100644 instant_tests/docs/UnexpandedInstantTest.md create mode 100644 instant_tests/docs/UnexpandedInstantTestLinks.md create mode 100644 instant_tests/docs/UnexpandedInstantTestLinksSelf.md create mode 100644 instant_tests/docs/ValidationError.md create mode 100644 instant_tests/docs/ValidationErrorAllOfErrors.md create mode 100644 instant_tests/docs/VoiceApi.md create mode 100644 instant_tests/docs/VoiceInstantTest.md rename {instant_tests_api => instant_tests}/docs/VoiceInstantTestRequest.md (92%) create mode 100644 instant_tests/docs/VoiceProperties.md create mode 100644 instant_tests/docs/WebTransactionApi.md create mode 100644 instant_tests/docs/WebTransactionInstantTest.md rename {instant_tests_api => instant_tests}/docs/WebTransactionInstantTestRequest.md (91%) create mode 100644 instant_tests/docs/WebTransactionProperties.md create mode 100644 instant_tests/instant_tests/__init__.py create mode 100644 instant_tests/instant_tests/api/__init__.py create mode 100644 instant_tests/instant_tests/api/agent_to_agent_api.py create mode 100644 instant_tests/instant_tests/api/agent_to_server_api.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/api/dns_security_api.py (92%) create mode 100644 instant_tests/instant_tests/api/dns_server_api.py create mode 100644 instant_tests/instant_tests/api/dns_trace_api.py create mode 100644 instant_tests/instant_tests/api/ftp_server_api.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/api/http_page_load_api.py (92%) create mode 100644 instant_tests/instant_tests/api/http_server_api.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/api/run_api.py (89%) create mode 100644 instant_tests/instant_tests/api/sip_server_api.py create mode 100644 instant_tests/instant_tests/api/voice_api.py create mode 100644 instant_tests/instant_tests/api/web_transaction_api.py create mode 100644 instant_tests/instant_tests/api_client.py create mode 100644 instant_tests/instant_tests/api_response.py create mode 100644 instant_tests/instant_tests/configuration.py create mode 100644 instant_tests/instant_tests/exceptions.py create mode 100644 instant_tests/instant_tests/models/__init__.py create mode 100644 instant_tests/instant_tests/models/agent.py create mode 100644 instant_tests/instant_tests/models/agent_base.py create mode 100644 instant_tests/instant_tests/models/agent_to_agent_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/agent_to_agent_instant_test_request.py (78%) create mode 100644 instant_tests/instant_tests/models/agent_to_agent_properties.py create mode 100644 instant_tests/instant_tests/models/agent_to_agent_test_protocol.py create mode 100644 instant_tests/instant_tests/models/agent_to_server_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/agent_to_server_instant_test_request.py (79%) create mode 100644 instant_tests/instant_tests/models/agent_to_server_properties.py create mode 100644 instant_tests/instant_tests/models/cloud_enterprise_agent_type.py create mode 100644 instant_tests/instant_tests/models/dns_query_class.py create mode 100644 instant_tests/instant_tests/models/dns_sec_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/dns_sec_instant_test_request.py (76%) create mode 100644 instant_tests/instant_tests/models/dns_sec_properties.py create mode 100644 instant_tests/instant_tests/models/dns_server_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/dns_server_instant_test_request.py (77%) create mode 100644 instant_tests/instant_tests/models/dns_server_properties.py create mode 100644 instant_tests/instant_tests/models/dns_servers_request.py create mode 100644 instant_tests/instant_tests/models/dns_trace_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/dns_trace_instant_test_request.py (75%) create mode 100644 instant_tests/instant_tests/models/dns_trace_properties.py create mode 100644 instant_tests/instant_tests/models/error.py create mode 100644 instant_tests/instant_tests/models/expand.py create mode 100644 instant_tests/instant_tests/models/ftp_server_instant_test.py create mode 100644 instant_tests/instant_tests/models/ftp_server_properties.py create mode 100644 instant_tests/instant_tests/models/ftp_server_request_type.py create mode 100644 instant_tests/instant_tests/models/http_server_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/http_server_instant_test_request.py (78%) create mode 100644 instant_tests/instant_tests/models/http_server_properties.py create mode 100644 instant_tests/instant_tests/models/instant_test.py create mode 100644 instant_tests/instant_tests/models/instant_test_request.py create mode 100644 instant_tests/instant_tests/models/instant_test_request_agents_inner.py create mode 100644 instant_tests/instant_tests/models/link.py create mode 100644 instant_tests/instant_tests/models/page_load_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/page_load_instant_test_request.py (77%) create mode 100644 instant_tests/instant_tests/models/page_load_properties.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/server_instant_test_request.py (79%) create mode 100644 instant_tests/instant_tests/models/simple_agent.py create mode 100644 instant_tests/instant_tests/models/sip_server_instant_test.py create mode 100644 instant_tests/instant_tests/models/sip_server_instant_test_request.py create mode 100644 instant_tests/instant_tests/models/sip_server_instant_test_request1.py create mode 100644 instant_tests/instant_tests/models/sip_server_instant_test_response.py create mode 100644 instant_tests/instant_tests/models/sip_server_properties.py create mode 100644 instant_tests/instant_tests/models/sip_test_protocol.py create mode 100644 instant_tests/instant_tests/models/test_auth_type.py create mode 100644 instant_tests/instant_tests/models/test_custom_headers.py create mode 100644 instant_tests/instant_tests/models/test_direction.py create mode 100644 instant_tests/instant_tests/models/test_dns_server.py create mode 100644 instant_tests/instant_tests/models/test_dns_transport_protocol.py create mode 100644 instant_tests/instant_tests/models/test_dscp_id.py create mode 100644 instant_tests/instant_tests/models/test_ipv6_policy.py create mode 100644 instant_tests/instant_tests/models/test_labels_inner.py create mode 100644 instant_tests/instant_tests/models/test_page_loading_strategy.py create mode 100644 instant_tests/instant_tests/models/test_path_trace_mode.py create mode 100644 instant_tests/instant_tests/models/test_probe_mode.py create mode 100644 instant_tests/instant_tests/models/test_protocol.py create mode 100644 instant_tests/instant_tests/models/test_shared_accounts_inner.py create mode 100644 instant_tests/instant_tests/models/test_sip_credentials.py create mode 100644 instant_tests/instant_tests/models/test_ssl_version_id.py create mode 100644 instant_tests/instant_tests/models/test_type.py create mode 100644 instant_tests/instant_tests/models/unauthorized_error.py create mode 100644 instant_tests/instant_tests/models/unexpanded_instant_test.py create mode 100644 instant_tests/instant_tests/models/unexpanded_instant_test_links.py create mode 100644 instant_tests/instant_tests/models/unexpanded_instant_test_links_self.py create mode 100644 instant_tests/instant_tests/models/validation_error.py create mode 100644 instant_tests/instant_tests/models/validation_error_all_of_errors.py create mode 100644 instant_tests/instant_tests/models/voice_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/voice_instant_test_request.py (78%) create mode 100644 instant_tests/instant_tests/models/voice_properties.py create mode 100644 instant_tests/instant_tests/models/web_transaction_instant_test.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/models/web_transaction_instant_test_request.py (78%) create mode 100644 instant_tests/instant_tests/models/web_transaction_properties.py rename {instant_tests_api/instant_tests_api => instant_tests/instant_tests}/py.typed (100%) create mode 100644 instant_tests/instant_tests/rest.py create mode 100644 instant_tests/pyproject.toml rename {instant_tests_api => instant_tests}/requirements.txt (100%) rename {instant_tests_api => instant_tests}/setup.cfg (100%) create mode 100644 instant_tests/setup.py create mode 100644 instant_tests/test-requirements.txt rename {instant_tests_api => instant_tests}/test/__init__.py (100%) create mode 100644 instant_tests/test/test_agent.py create mode 100644 instant_tests/test/test_agent_base.py create mode 100644 instant_tests/test/test_agent_to_agent_instant_test.py create mode 100644 instant_tests/test/test_agent_to_agent_instant_test_request.py create mode 100644 instant_tests/test/test_agent_to_agent_properties.py create mode 100644 instant_tests/test/test_agent_to_agent_test_protocol.py create mode 100644 instant_tests/test/test_agent_to_server_instant_test.py create mode 100644 instant_tests/test/test_agent_to_server_instant_test_request.py create mode 100644 instant_tests/test/test_agent_to_server_properties.py create mode 100644 instant_tests/test/test_cloud_enterprise_agent_type.py create mode 100644 instant_tests/test/test_dns_query_class.py create mode 100644 instant_tests/test/test_dns_sec_instant_test.py create mode 100644 instant_tests/test/test_dns_sec_instant_test_request.py create mode 100644 instant_tests/test/test_dns_sec_properties.py create mode 100644 instant_tests/test/test_dns_server_instant_test.py create mode 100644 instant_tests/test/test_dns_server_instant_test_request.py create mode 100644 instant_tests/test/test_dns_server_properties.py create mode 100644 instant_tests/test/test_dns_servers_request.py create mode 100644 instant_tests/test/test_dns_trace_instant_test.py create mode 100644 instant_tests/test/test_dns_trace_instant_test_request.py create mode 100644 instant_tests/test/test_dns_trace_properties.py create mode 100644 instant_tests/test/test_error.py create mode 100644 instant_tests/test/test_expand.py create mode 100644 instant_tests/test/test_ftp_server_instant_test.py create mode 100644 instant_tests/test/test_ftp_server_properties.py create mode 100644 instant_tests/test/test_ftp_server_request_type.py create mode 100644 instant_tests/test/test_http_server_instant_test.py rename {instant_tests_api => instant_tests}/test/test_http_server_instant_test_request.py (77%) create mode 100644 instant_tests/test/test_http_server_properties.py create mode 100644 instant_tests/test/test_instant_test.py create mode 100644 instant_tests/test/test_instant_test_request.py create mode 100644 instant_tests/test/test_instant_test_request_agents_inner.py create mode 100644 instant_tests/test/test_link.py create mode 100644 instant_tests/test/test_page_load_instant_test.py rename {instant_tests_api => instant_tests}/test/test_page_load_instant_test_request.py (78%) create mode 100644 instant_tests/test/test_page_load_properties.py create mode 100644 instant_tests/test/test_server_instant_test_request.py create mode 100644 instant_tests/test/test_simple_agent.py create mode 100644 instant_tests/test/test_sip_server_instant_test.py create mode 100644 instant_tests/test/test_sip_server_instant_test_request.py create mode 100644 instant_tests/test/test_sip_server_instant_test_request1.py create mode 100644 instant_tests/test/test_sip_server_instant_test_response.py create mode 100644 instant_tests/test/test_sip_server_properties.py create mode 100644 instant_tests/test/test_sip_test_protocol.py create mode 100644 instant_tests/test/test_test_auth_type.py create mode 100644 instant_tests/test/test_test_custom_headers.py create mode 100644 instant_tests/test/test_test_direction.py create mode 100644 instant_tests/test/test_test_dns_server.py create mode 100644 instant_tests/test/test_test_dns_transport_protocol.py create mode 100644 instant_tests/test/test_test_dscp_id.py create mode 100644 instant_tests/test/test_test_ipv6_policy.py create mode 100644 instant_tests/test/test_test_labels_inner.py create mode 100644 instant_tests/test/test_test_page_loading_strategy.py create mode 100644 instant_tests/test/test_test_path_trace_mode.py create mode 100644 instant_tests/test/test_test_probe_mode.py create mode 100644 instant_tests/test/test_test_protocol.py create mode 100644 instant_tests/test/test_test_shared_accounts_inner.py create mode 100644 instant_tests/test/test_test_sip_credentials.py create mode 100644 instant_tests/test/test_test_ssl_version_id.py create mode 100644 instant_tests/test/test_test_type.py create mode 100644 instant_tests/test/test_unauthorized_error.py create mode 100644 instant_tests/test/test_unexpanded_instant_test.py create mode 100644 instant_tests/test/test_unexpanded_instant_test_links.py create mode 100644 instant_tests/test/test_unexpanded_instant_test_links_self.py create mode 100644 instant_tests/test/test_validation_error.py create mode 100644 instant_tests/test/test_validation_error_all_of_errors.py create mode 100644 instant_tests/test/test_voice_instant_test.py create mode 100644 instant_tests/test/test_voice_instant_test_request.py create mode 100644 instant_tests/test/test_voice_properties.py create mode 100644 instant_tests/test/test_web_transaction_instant_test.py rename {instant_tests_api => instant_tests}/test/test_web_transaction_instant_test_request.py (79%) create mode 100644 instant_tests/test/test_web_transaction_properties.py delete mode 100644 instant_tests_api/.github/workflows/python.yml delete mode 100644 instant_tests_api/.gitlab-ci.yml delete mode 100644 instant_tests_api/.openapi-generator/FILES delete mode 100644 instant_tests_api/.openapi-generator/VERSION delete mode 100644 instant_tests_api/.travis.yml delete mode 100644 instant_tests_api/README.md delete mode 100644 instant_tests_api/docs/Agent.md delete mode 100644 instant_tests_api/docs/AgentBase.md delete mode 100644 instant_tests_api/docs/AgentToAgentApi.md delete mode 100644 instant_tests_api/docs/AgentToAgentInstantTest.md delete mode 100644 instant_tests_api/docs/AgentToAgentTestProtocol.md delete mode 100644 instant_tests_api/docs/AgentToServerApi.md delete mode 100644 instant_tests_api/docs/AgentToServerInstantTest.md delete mode 100644 instant_tests_api/docs/CloudEnterpriseAgentType.md delete mode 100644 instant_tests_api/docs/DNSServerApi.md delete mode 100644 instant_tests_api/docs/DNSTraceApi.md delete mode 100644 instant_tests_api/docs/DnsQueryClass.md delete mode 100644 instant_tests_api/docs/DnsSecInstantTest.md delete mode 100644 instant_tests_api/docs/DnsServerInstantTest.md delete mode 100644 instant_tests_api/docs/DnsServersRequest.md delete mode 100644 instant_tests_api/docs/DnsTraceInstantTest.md delete mode 100644 instant_tests_api/docs/Error.md delete mode 100644 instant_tests_api/docs/Expand.md delete mode 100644 instant_tests_api/docs/FTPServerApi.md delete mode 100644 instant_tests_api/docs/FtpServerInstantTest.md delete mode 100644 instant_tests_api/docs/FtpServerRequestType.md delete mode 100644 instant_tests_api/docs/HTTPServerApi.md delete mode 100644 instant_tests_api/docs/HttpServerInstantTest.md delete mode 100644 instant_tests_api/docs/InstantTest.md delete mode 100644 instant_tests_api/docs/Link.md delete mode 100644 instant_tests_api/docs/MapItem.md delete mode 100644 instant_tests_api/docs/PageLoadInstantTest.md delete mode 100644 instant_tests_api/docs/SIPServerApi.md delete mode 100644 instant_tests_api/docs/SipServerInstantTest.md delete mode 100644 instant_tests_api/docs/SipServerInstantTestRequest.md delete mode 100644 instant_tests_api/docs/SipTestProtocol.md delete mode 100644 instant_tests_api/docs/TestAuthType.md delete mode 100644 instant_tests_api/docs/TestCustomHeaders.md delete mode 100644 instant_tests_api/docs/TestCustomHeadersAll.md delete mode 100644 instant_tests_api/docs/TestCustomHeadersRoot.md delete mode 100644 instant_tests_api/docs/TestDirection.md delete mode 100644 instant_tests_api/docs/TestDnsServer.md delete mode 100644 instant_tests_api/docs/TestDnsTransportProtocol.md delete mode 100644 instant_tests_api/docs/TestDscpId.md delete mode 100644 instant_tests_api/docs/TestIpv6Policy.md delete mode 100644 instant_tests_api/docs/TestLabelsInner.md delete mode 100644 instant_tests_api/docs/TestPageLoadingStrategy.md delete mode 100644 instant_tests_api/docs/TestPathTraceMode.md delete mode 100644 instant_tests_api/docs/TestProbeMode.md delete mode 100644 instant_tests_api/docs/TestProtocol.md delete mode 100644 instant_tests_api/docs/TestSharedAccountsInner.md delete mode 100644 instant_tests_api/docs/TestSipCredentials.md delete mode 100644 instant_tests_api/docs/TestSslVersionId.md delete mode 100644 instant_tests_api/docs/TestType.md delete mode 100644 instant_tests_api/docs/UnauthorizedError.md delete mode 100644 instant_tests_api/docs/UnexpandedInstantTest.md delete mode 100644 instant_tests_api/docs/UnexpandedInstantTestLinks.md delete mode 100644 instant_tests_api/docs/UnexpandedInstantTestLinksSelf.md delete mode 100644 instant_tests_api/docs/UnexpandedInstantTestLinksTestResults.md delete mode 100644 instant_tests_api/docs/VoiceApi.md delete mode 100644 instant_tests_api/docs/VoiceInstantTest.md delete mode 100644 instant_tests_api/docs/WebTransactionApi.md delete mode 100644 instant_tests_api/docs/WebTransactionInstantTest.md delete mode 100644 instant_tests_api/git_push.sh delete mode 100644 instant_tests_api/instant_tests_api/__init__.py delete mode 100644 instant_tests_api/instant_tests_api/api/__init__.py delete mode 100644 instant_tests_api/instant_tests_api/api/agent_to_agent_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/agent_to_server_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/dns_server_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/dns_trace_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/ftp_server_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/http_server_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/sip_server_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/voice_api.py delete mode 100644 instant_tests_api/instant_tests_api/api/web_transaction_api.py delete mode 100644 instant_tests_api/instant_tests_api/api_client.py delete mode 100644 instant_tests_api/instant_tests_api/api_response.py delete mode 100644 instant_tests_api/instant_tests_api/configuration.py delete mode 100644 instant_tests_api/instant_tests_api/exceptions.py delete mode 100644 instant_tests_api/instant_tests_api/models/__init__.py delete mode 100644 instant_tests_api/instant_tests_api/models/agent.py delete mode 100644 instant_tests_api/instant_tests_api/models/agent_base.py delete mode 100644 instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/agent_to_agent_test_protocol.py delete mode 100644 instant_tests_api/instant_tests_api/models/agent_to_server_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/cloud_enterprise_agent_type.py delete mode 100644 instant_tests_api/instant_tests_api/models/dns_query_class.py delete mode 100644 instant_tests_api/instant_tests_api/models/dns_sec_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/dns_server_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/dns_servers_request.py delete mode 100644 instant_tests_api/instant_tests_api/models/dns_trace_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/error.py delete mode 100644 instant_tests_api/instant_tests_api/models/expand.py delete mode 100644 instant_tests_api/instant_tests_api/models/ftp_server_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/ftp_server_request_type.py delete mode 100644 instant_tests_api/instant_tests_api/models/http_server_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/instant_test_request.py delete mode 100644 instant_tests_api/instant_tests_api/models/instant_test_request_agents_inner.py delete mode 100644 instant_tests_api/instant_tests_api/models/link.py delete mode 100644 instant_tests_api/instant_tests_api/models/map_item.py delete mode 100644 instant_tests_api/instant_tests_api/models/page_load_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/sip_server_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/sip_server_instant_test_request.py delete mode 100644 instant_tests_api/instant_tests_api/models/sip_test_protocol.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_auth_type.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_custom_headers.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_custom_headers_all.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_custom_headers_root.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_direction.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_dns_server.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_dns_transport_protocol.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_dscp_id.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_ipv6_policy.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_labels_inner.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_page_loading_strategy.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_path_trace_mode.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_probe_mode.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_protocol.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_shared_accounts_inner.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_sip_credentials.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_ssl_version_id.py delete mode 100644 instant_tests_api/instant_tests_api/models/test_type.py delete mode 100644 instant_tests_api/instant_tests_api/models/unauthorized_error.py delete mode 100644 instant_tests_api/instant_tests_api/models/unexpanded_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links.py delete mode 100644 instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_self.py delete mode 100644 instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_test_results.py delete mode 100644 instant_tests_api/instant_tests_api/models/voice_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/models/web_transaction_instant_test.py delete mode 100644 instant_tests_api/instant_tests_api/rest.py delete mode 100644 instant_tests_api/pyproject.toml delete mode 100644 instant_tests_api/setup.py delete mode 100644 instant_tests_api/test-requirements.txt delete mode 100644 instant_tests_api/test/test_agent.py delete mode 100644 instant_tests_api/test/test_agent_base.py delete mode 100644 instant_tests_api/test/test_agent_to_agent_api.py delete mode 100644 instant_tests_api/test/test_agent_to_agent_instant_test.py delete mode 100644 instant_tests_api/test/test_agent_to_agent_instant_test_request.py delete mode 100644 instant_tests_api/test/test_agent_to_agent_test_protocol.py delete mode 100644 instant_tests_api/test/test_agent_to_server_api.py delete mode 100644 instant_tests_api/test/test_agent_to_server_instant_test.py delete mode 100644 instant_tests_api/test/test_agent_to_server_instant_test_request.py delete mode 100644 instant_tests_api/test/test_cloud_enterprise_agent_type.py delete mode 100644 instant_tests_api/test/test_dns_query_class.py delete mode 100644 instant_tests_api/test/test_dns_sec_instant_test.py delete mode 100644 instant_tests_api/test/test_dns_sec_instant_test_request.py delete mode 100644 instant_tests_api/test/test_dns_security_api.py delete mode 100644 instant_tests_api/test/test_dns_server_api.py delete mode 100644 instant_tests_api/test/test_dns_server_instant_test.py delete mode 100644 instant_tests_api/test/test_dns_server_instant_test_request.py delete mode 100644 instant_tests_api/test/test_dns_servers_request.py delete mode 100644 instant_tests_api/test/test_dns_trace_api.py delete mode 100644 instant_tests_api/test/test_dns_trace_instant_test.py delete mode 100644 instant_tests_api/test/test_dns_trace_instant_test_request.py delete mode 100644 instant_tests_api/test/test_error.py delete mode 100644 instant_tests_api/test/test_expand.py delete mode 100644 instant_tests_api/test/test_ftp_server_api.py delete mode 100644 instant_tests_api/test/test_ftp_server_instant_test.py delete mode 100644 instant_tests_api/test/test_ftp_server_request_type.py delete mode 100644 instant_tests_api/test/test_http_page_load_api.py delete mode 100644 instant_tests_api/test/test_http_server_api.py delete mode 100644 instant_tests_api/test/test_http_server_instant_test.py delete mode 100644 instant_tests_api/test/test_instant_test.py delete mode 100644 instant_tests_api/test/test_instant_test_request.py delete mode 100644 instant_tests_api/test/test_instant_test_request_agents_inner.py delete mode 100644 instant_tests_api/test/test_link.py delete mode 100644 instant_tests_api/test/test_map_item.py delete mode 100644 instant_tests_api/test/test_page_load_instant_test.py delete mode 100644 instant_tests_api/test/test_run_api.py delete mode 100644 instant_tests_api/test/test_server_instant_test_request.py delete mode 100644 instant_tests_api/test/test_sip_server_api.py delete mode 100644 instant_tests_api/test/test_sip_server_instant_test.py delete mode 100644 instant_tests_api/test/test_sip_server_instant_test_request.py delete mode 100644 instant_tests_api/test/test_sip_test_protocol.py delete mode 100644 instant_tests_api/test/test_test_auth_type.py delete mode 100644 instant_tests_api/test/test_test_custom_headers.py delete mode 100644 instant_tests_api/test/test_test_custom_headers_all.py delete mode 100644 instant_tests_api/test/test_test_custom_headers_root.py delete mode 100644 instant_tests_api/test/test_test_direction.py delete mode 100644 instant_tests_api/test/test_test_dns_server.py delete mode 100644 instant_tests_api/test/test_test_dns_transport_protocol.py delete mode 100644 instant_tests_api/test/test_test_dscp_id.py delete mode 100644 instant_tests_api/test/test_test_ipv6_policy.py delete mode 100644 instant_tests_api/test/test_test_labels_inner.py delete mode 100644 instant_tests_api/test/test_test_page_loading_strategy.py delete mode 100644 instant_tests_api/test/test_test_path_trace_mode.py delete mode 100644 instant_tests_api/test/test_test_probe_mode.py delete mode 100644 instant_tests_api/test/test_test_protocol.py delete mode 100644 instant_tests_api/test/test_test_shared_accounts_inner.py delete mode 100644 instant_tests_api/test/test_test_sip_credentials.py delete mode 100644 instant_tests_api/test/test_test_ssl_version_id.py delete mode 100644 instant_tests_api/test/test_test_type.py delete mode 100644 instant_tests_api/test/test_unauthorized_error.py delete mode 100644 instant_tests_api/test/test_unexpanded_instant_test.py delete mode 100644 instant_tests_api/test/test_unexpanded_instant_test_links.py delete mode 100644 instant_tests_api/test/test_unexpanded_instant_test_links_self.py delete mode 100644 instant_tests_api/test/test_unexpanded_instant_test_links_test_results.py delete mode 100644 instant_tests_api/test/test_voice_api.py delete mode 100644 instant_tests_api/test/test_voice_instant_test.py delete mode 100644 instant_tests_api/test/test_voice_instant_test_request.py delete mode 100644 instant_tests_api/test/test_web_transaction_api.py delete mode 100644 instant_tests_api/test/test_web_transaction_instant_test.py delete mode 100644 instant_tests_api/tox.ini rename {internet_insights_api => internet_insights}/.gitignore (100%) rename {internet_insights_api => internet_insights}/.openapi-generator-ignore (100%) create mode 100644 internet_insights/.openapi-generator/FILES create mode 100644 internet_insights/.openapi-generator/VERSION create mode 100644 internet_insights/README.md rename {internet_insights_api => internet_insights}/docs/ApiAffectedAgent.md (79%) rename {internet_insights_api => internet_insights}/docs/ApiAffectedTest.md (80%) rename {internet_insights_api => internet_insights}/docs/ApiApplicationOutageAffectedLocation.md (76%) create mode 100644 internet_insights/docs/ApiApplicationOutageAffectedServer.md rename {internet_insights_api => internet_insights}/docs/ApiApplicationOutageDetails.md (88%) rename {internet_insights_api => internet_insights}/docs/ApiApplicationOutageResponse.md (88%) rename {internet_insights_api => internet_insights}/docs/ApiAsn.md (85%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProvider.md (88%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProviderDetails.md (84%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProviderDetailsLocationsInner.md (75%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProviderDetailsResponse.md (83%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProviderFilter.md (86%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProviderResponse.md (79%) rename {internet_insights_api => internet_insights}/docs/ApiCatalogProviderResponseAllOfProvidersInner.md (82%) rename {internet_insights_api => internet_insights}/docs/ApiNetworkOutageAffectedLocation.md (76%) rename {internet_insights_api => internet_insights}/docs/ApiNetworkOutageDetails.md (88%) rename {internet_insights_api => internet_insights}/docs/ApiNetworkOutageResponse.md (89%) rename {internet_insights_api => internet_insights}/docs/ApiOutage.md (84%) rename {internet_insights_api => internet_insights}/docs/ApiOutageFilter.md (89%) rename {internet_insights_api => internet_insights}/docs/ApiOutagesResponse.md (81%) rename {internet_insights_api => internet_insights}/docs/ApiOutagesResponseAllOfOutagesInner.md (79%) rename {internet_insights_api => internet_insights}/docs/CatalogProvidersApi.md (83%) create mode 100644 internet_insights/docs/Error.md create mode 100644 internet_insights/docs/Link.md rename {internet_insights_api => internet_insights}/docs/OutageScope.md (99%) rename {internet_insights_api => internet_insights}/docs/OutagesAPIPublicApi.md (87%) create mode 100644 internet_insights/docs/SelfLinks.md create mode 100644 internet_insights/docs/SelfLinksLinks.md create mode 100644 internet_insights/docs/UnauthorizedError.md create mode 100644 internet_insights/docs/ValidationError.md create mode 100644 internet_insights/docs/ValidationErrorAllOfErrors.md create mode 100644 internet_insights/internet_insights/__init__.py create mode 100644 internet_insights/internet_insights/api/__init__.py rename {internet_insights_api/internet_insights_api => internet_insights/internet_insights}/api/catalog_providers_api.py (92%) rename {internet_insights_api/internet_insights_api => internet_insights/internet_insights}/api/outages_api_public_api.py (95%) create mode 100644 internet_insights/internet_insights/api_client.py create mode 100644 internet_insights/internet_insights/api_response.py create mode 100644 internet_insights/internet_insights/configuration.py create mode 100644 internet_insights/internet_insights/exceptions.py create mode 100644 internet_insights/internet_insights/models/__init__.py create mode 100644 internet_insights/internet_insights/models/api_affected_agent.py create mode 100644 internet_insights/internet_insights/models/api_affected_test.py create mode 100644 internet_insights/internet_insights/models/api_application_outage_affected_location.py create mode 100644 internet_insights/internet_insights/models/api_application_outage_affected_server.py create mode 100644 internet_insights/internet_insights/models/api_application_outage_details.py create mode 100644 internet_insights/internet_insights/models/api_application_outage_response.py create mode 100644 internet_insights/internet_insights/models/api_asn.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider_details.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider_details_locations_inner.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider_details_response.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider_filter.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider_response.py create mode 100644 internet_insights/internet_insights/models/api_catalog_provider_response_all_of_providers_inner.py create mode 100644 internet_insights/internet_insights/models/api_network_outage_affected_location.py create mode 100644 internet_insights/internet_insights/models/api_network_outage_details.py create mode 100644 internet_insights/internet_insights/models/api_network_outage_response.py create mode 100644 internet_insights/internet_insights/models/api_outage.py create mode 100644 internet_insights/internet_insights/models/api_outage_filter.py create mode 100644 internet_insights/internet_insights/models/api_outages_response.py create mode 100644 internet_insights/internet_insights/models/api_outages_response_all_of_outages_inner.py create mode 100644 internet_insights/internet_insights/models/error.py create mode 100644 internet_insights/internet_insights/models/link.py create mode 100644 internet_insights/internet_insights/models/outage_scope.py create mode 100644 internet_insights/internet_insights/models/self_links.py create mode 100644 internet_insights/internet_insights/models/self_links_links.py create mode 100644 internet_insights/internet_insights/models/unauthorized_error.py create mode 100644 internet_insights/internet_insights/models/validation_error.py create mode 100644 internet_insights/internet_insights/models/validation_error_all_of_errors.py rename {internet_insights_api/internet_insights_api => internet_insights/internet_insights}/py.typed (100%) create mode 100644 internet_insights/internet_insights/rest.py create mode 100644 internet_insights/pyproject.toml rename {internet_insights_api => internet_insights}/requirements.txt (100%) rename {internet_insights_api => internet_insights}/setup.cfg (100%) create mode 100644 internet_insights/setup.py create mode 100644 internet_insights/test-requirements.txt rename {internet_insights_api => internet_insights}/test/__init__.py (100%) create mode 100644 internet_insights/test/test_api_affected_agent.py create mode 100644 internet_insights/test/test_api_affected_test.py create mode 100644 internet_insights/test/test_api_application_outage_affected_location.py create mode 100644 internet_insights/test/test_api_application_outage_affected_server.py create mode 100644 internet_insights/test/test_api_application_outage_details.py create mode 100644 internet_insights/test/test_api_application_outage_response.py create mode 100644 internet_insights/test/test_api_asn.py create mode 100644 internet_insights/test/test_api_catalog_provider.py create mode 100644 internet_insights/test/test_api_catalog_provider_details.py create mode 100644 internet_insights/test/test_api_catalog_provider_details_locations_inner.py create mode 100644 internet_insights/test/test_api_catalog_provider_details_response.py create mode 100644 internet_insights/test/test_api_catalog_provider_filter.py create mode 100644 internet_insights/test/test_api_catalog_provider_response.py create mode 100644 internet_insights/test/test_api_catalog_provider_response_all_of_providers_inner.py create mode 100644 internet_insights/test/test_api_network_outage_affected_location.py create mode 100644 internet_insights/test/test_api_network_outage_details.py create mode 100644 internet_insights/test/test_api_network_outage_response.py create mode 100644 internet_insights/test/test_api_outage.py create mode 100644 internet_insights/test/test_api_outage_filter.py create mode 100644 internet_insights/test/test_api_outages_response.py create mode 100644 internet_insights/test/test_api_outages_response_all_of_outages_inner.py create mode 100644 internet_insights/test/test_error.py create mode 100644 internet_insights/test/test_link.py create mode 100644 internet_insights/test/test_outage_scope.py create mode 100644 internet_insights/test/test_self_links.py create mode 100644 internet_insights/test/test_self_links_links.py create mode 100644 internet_insights/test/test_unauthorized_error.py create mode 100644 internet_insights/test/test_validation_error.py create mode 100644 internet_insights/test/test_validation_error_all_of_errors.py delete mode 100644 internet_insights_api/.github/workflows/python.yml delete mode 100644 internet_insights_api/.gitlab-ci.yml delete mode 100644 internet_insights_api/.openapi-generator/FILES delete mode 100644 internet_insights_api/.openapi-generator/VERSION delete mode 100644 internet_insights_api/.travis.yml delete mode 100644 internet_insights_api/README.md delete mode 100644 internet_insights_api/docs/ApiApplicationOutageAffectedServer.md delete mode 100644 internet_insights_api/docs/Error.md delete mode 100644 internet_insights_api/docs/Link.md delete mode 100644 internet_insights_api/docs/SelfLinks.md delete mode 100644 internet_insights_api/docs/SelfLinksLinks.md delete mode 100644 internet_insights_api/docs/UnauthorizedError.md delete mode 100644 internet_insights_api/git_push.sh delete mode 100644 internet_insights_api/internet_insights_api/__init__.py delete mode 100644 internet_insights_api/internet_insights_api/api/__init__.py delete mode 100644 internet_insights_api/internet_insights_api/api_client.py delete mode 100644 internet_insights_api/internet_insights_api/api_response.py delete mode 100644 internet_insights_api/internet_insights_api/configuration.py delete mode 100644 internet_insights_api/internet_insights_api/exceptions.py delete mode 100644 internet_insights_api/internet_insights_api/models/__init__.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_affected_agent.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_affected_test.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_application_outage_affected_location.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_application_outage_affected_server.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_application_outage_details.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_application_outage_response.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_asn.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider_details.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider_details_locations_inner.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider_details_response.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider_filter.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider_response.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_catalog_provider_response_all_of_providers_inner.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_network_outage_affected_location.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_network_outage_details.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_network_outage_response.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_outage.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_outage_filter.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_outages_response.py delete mode 100644 internet_insights_api/internet_insights_api/models/api_outages_response_all_of_outages_inner.py delete mode 100644 internet_insights_api/internet_insights_api/models/error.py delete mode 100644 internet_insights_api/internet_insights_api/models/link.py delete mode 100644 internet_insights_api/internet_insights_api/models/outage_scope.py delete mode 100644 internet_insights_api/internet_insights_api/models/self_links.py delete mode 100644 internet_insights_api/internet_insights_api/models/self_links_links.py delete mode 100644 internet_insights_api/internet_insights_api/models/unauthorized_error.py delete mode 100644 internet_insights_api/internet_insights_api/rest.py delete mode 100644 internet_insights_api/pyproject.toml delete mode 100644 internet_insights_api/setup.py delete mode 100644 internet_insights_api/test-requirements.txt delete mode 100644 internet_insights_api/test/test_api_affected_agent.py delete mode 100644 internet_insights_api/test/test_api_affected_test.py delete mode 100644 internet_insights_api/test/test_api_application_outage_affected_location.py delete mode 100644 internet_insights_api/test/test_api_application_outage_affected_server.py delete mode 100644 internet_insights_api/test/test_api_application_outage_details.py delete mode 100644 internet_insights_api/test/test_api_application_outage_response.py delete mode 100644 internet_insights_api/test/test_api_asn.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider_details.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider_details_locations_inner.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider_details_response.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider_filter.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider_response.py delete mode 100644 internet_insights_api/test/test_api_catalog_provider_response_all_of_providers_inner.py delete mode 100644 internet_insights_api/test/test_api_network_outage_affected_location.py delete mode 100644 internet_insights_api/test/test_api_network_outage_details.py delete mode 100644 internet_insights_api/test/test_api_network_outage_response.py delete mode 100644 internet_insights_api/test/test_api_outage.py delete mode 100644 internet_insights_api/test/test_api_outage_filter.py delete mode 100644 internet_insights_api/test/test_api_outages_response.py delete mode 100644 internet_insights_api/test/test_api_outages_response_all_of_outages_inner.py delete mode 100644 internet_insights_api/test/test_catalog_providers_api.py delete mode 100644 internet_insights_api/test/test_error.py delete mode 100644 internet_insights_api/test/test_link.py delete mode 100644 internet_insights_api/test/test_outage_scope.py delete mode 100644 internet_insights_api/test/test_outages_api_public_api.py delete mode 100644 internet_insights_api/test/test_self_links.py delete mode 100644 internet_insights_api/test/test_self_links_links.py delete mode 100644 internet_insights_api/test/test_unauthorized_error.py delete mode 100644 internet_insights_api/tox.ini rename {labels_api => labels}/.gitignore (100%) rename {labels_api => labels}/.openapi-generator-ignore (100%) create mode 100644 labels/.openapi-generator/FILES create mode 100644 labels/.openapi-generator/VERSION create mode 100644 labels/README.md create mode 100644 labels/docs/AgentApi.md rename {labels_api => labels}/docs/AllLabelsApi.md (87%) rename {labels_api => labels}/docs/CreateAgentLabel201Response.md (85%) create mode 100644 labels/docs/DashboardApi.md create mode 100644 labels/docs/EndpointTestApi.md create mode 100644 labels/docs/Error.md rename {labels_api => labels}/docs/GetLabels200Response.md (80%) create mode 100644 labels/docs/Label.md rename {labels_api => labels}/docs/LabelDetail.md (89%) rename {labels_api => labels}/docs/LabelRequest.md (85%) rename {labels_api => labels}/docs/LabelType.md (99%) create mode 100644 labels/docs/Labels.md create mode 100644 labels/docs/Link.md create mode 100644 labels/docs/SelfLinks.md create mode 100644 labels/docs/SelfLinksLinks.md create mode 100644 labels/docs/TestApi.md create mode 100644 labels/docs/UnauthorizedError.md create mode 100644 labels/docs/ValidationError.md create mode 100644 labels/docs/ValidationErrorAllOfErrors.md create mode 100644 labels/labels/__init__.py create mode 100644 labels/labels/api/__init__.py rename {labels_api/labels_api => labels/labels}/api/agent_api.py (77%) rename {labels_api/labels_api => labels/labels}/api/all_labels_api.py (94%) rename {labels_api/labels_api => labels/labels}/api/dashboard_api.py (78%) rename {labels_api/labels_api => labels/labels}/api/endpoint_test_api.py (78%) rename {labels_api/labels_api => labels/labels}/api/test_api.py (78%) create mode 100644 labels/labels/api_client.py create mode 100644 labels/labels/api_response.py create mode 100644 labels/labels/configuration.py create mode 100644 labels/labels/exceptions.py create mode 100644 labels/labels/models/__init__.py rename {labels_api/labels_api => labels/labels}/models/create_agent_label201_response.py (80%) create mode 100644 labels/labels/models/error.py create mode 100644 labels/labels/models/get_labels200_response.py create mode 100644 labels/labels/models/label.py rename {labels_api/labels_api => labels/labels}/models/label_detail.py (82%) rename {labels_api/labels_api => labels/labels}/models/label_request.py (80%) rename {labels_api/labels_api => labels/labels}/models/label_type.py (82%) create mode 100644 labels/labels/models/labels.py create mode 100644 labels/labels/models/link.py create mode 100644 labels/labels/models/self_links.py create mode 100644 labels/labels/models/self_links_links.py create mode 100644 labels/labels/models/unauthorized_error.py create mode 100644 labels/labels/models/validation_error.py create mode 100644 labels/labels/models/validation_error_all_of_errors.py rename {labels_api/labels_api => labels/labels}/py.typed (100%) create mode 100644 labels/labels/rest.py create mode 100644 labels/pyproject.toml rename {labels_api => labels}/requirements.txt (100%) rename {labels_api => labels}/setup.cfg (100%) create mode 100644 labels/setup.py create mode 100644 labels/test-requirements.txt rename {labels_api => labels}/test/__init__.py (100%) rename {labels_api => labels}/test/test_create_agent_label201_response.py (87%) create mode 100644 labels/test/test_error.py rename {labels_api => labels}/test/test_get_labels200_response.py (85%) create mode 100644 labels/test/test_label.py rename {labels_api => labels}/test/test_label_detail.py (92%) rename {labels_api => labels}/test/test_label_request.py (91%) rename {labels_api => labels}/test/test_label_type.py (82%) create mode 100644 labels/test/test_labels.py create mode 100644 labels/test/test_link.py create mode 100644 labels/test/test_self_links.py create mode 100644 labels/test/test_self_links_links.py create mode 100644 labels/test/test_unauthorized_error.py create mode 100644 labels/test/test_validation_error.py create mode 100644 labels/test/test_validation_error_all_of_errors.py delete mode 100644 labels_api/.github/workflows/python.yml delete mode 100644 labels_api/.gitlab-ci.yml delete mode 100644 labels_api/.openapi-generator/FILES delete mode 100644 labels_api/.openapi-generator/VERSION delete mode 100644 labels_api/.travis.yml delete mode 100644 labels_api/README.md delete mode 100644 labels_api/docs/AgentApi.md delete mode 100644 labels_api/docs/DashboardApi.md delete mode 100644 labels_api/docs/EndpointTestApi.md delete mode 100644 labels_api/docs/Error.md delete mode 100644 labels_api/docs/Label.md delete mode 100644 labels_api/docs/Labels.md delete mode 100644 labels_api/docs/Link.md delete mode 100644 labels_api/docs/SelfLinks.md delete mode 100644 labels_api/docs/SelfLinksLinks.md delete mode 100644 labels_api/docs/TestApi.md delete mode 100644 labels_api/docs/UnauthorizedError.md delete mode 100644 labels_api/git_push.sh delete mode 100644 labels_api/labels_api/__init__.py delete mode 100644 labels_api/labels_api/api/__init__.py delete mode 100644 labels_api/labels_api/api_client.py delete mode 100644 labels_api/labels_api/api_response.py delete mode 100644 labels_api/labels_api/configuration.py delete mode 100644 labels_api/labels_api/exceptions.py delete mode 100644 labels_api/labels_api/models/__init__.py delete mode 100644 labels_api/labels_api/models/error.py delete mode 100644 labels_api/labels_api/models/get_labels200_response.py delete mode 100644 labels_api/labels_api/models/label.py delete mode 100644 labels_api/labels_api/models/labels.py delete mode 100644 labels_api/labels_api/models/link.py delete mode 100644 labels_api/labels_api/models/self_links.py delete mode 100644 labels_api/labels_api/models/self_links_links.py delete mode 100644 labels_api/labels_api/models/unauthorized_error.py delete mode 100644 labels_api/labels_api/rest.py delete mode 100644 labels_api/pyproject.toml delete mode 100644 labels_api/setup.py delete mode 100644 labels_api/test-requirements.txt delete mode 100644 labels_api/test/test_agent_api.py delete mode 100644 labels_api/test/test_all_labels_api.py delete mode 100644 labels_api/test/test_dashboard_api.py delete mode 100644 labels_api/test/test_endpoint_test_api.py delete mode 100644 labels_api/test/test_error.py delete mode 100644 labels_api/test/test_label.py delete mode 100644 labels_api/test/test_labels.py delete mode 100644 labels_api/test/test_link.py delete mode 100644 labels_api/test/test_self_links.py delete mode 100644 labels_api/test/test_self_links_links.py delete mode 100644 labels_api/test/test_test_api.py delete mode 100644 labels_api/test/test_unauthorized_error.py delete mode 100644 labels_api/tox.ini rename {monitors_api => monitors}/.gitignore (100%) rename {monitors_api => monitors}/.openapi-generator-ignore (100%) create mode 100644 monitors/.openapi-generator/FILES create mode 100644 monitors/.openapi-generator/VERSION create mode 100644 monitors/README.md create mode 100644 monitors/docs/Error.md rename {monitors_api => monitors}/docs/GetBGPMonitors200Response.md (78%) create mode 100644 monitors/docs/Link.md rename {monitors_api => monitors}/docs/ListBGPMonitorsApi.md (86%) create mode 100644 monitors/docs/Monitor.md create mode 100644 monitors/docs/MonitorType.md rename {monitors_api => monitors}/docs/Monitors.md (84%) create mode 100644 monitors/docs/SelfLinks.md create mode 100644 monitors/docs/SelfLinksLinks.md create mode 100644 monitors/docs/UnauthorizedError.md create mode 100644 monitors/monitors/__init__.py create mode 100644 monitors/monitors/api/__init__.py rename {monitors_api/monitors_api => monitors/monitors}/api/list_bgp_monitors_api.py (89%) create mode 100644 monitors/monitors/api_client.py create mode 100644 monitors/monitors/api_response.py create mode 100644 monitors/monitors/configuration.py create mode 100644 monitors/monitors/exceptions.py create mode 100644 monitors/monitors/models/__init__.py create mode 100644 monitors/monitors/models/error.py create mode 100644 monitors/monitors/models/get_bgp_monitors200_response.py create mode 100644 monitors/monitors/models/link.py create mode 100644 monitors/monitors/models/monitor.py create mode 100644 monitors/monitors/models/monitor_type.py create mode 100644 monitors/monitors/models/monitors.py create mode 100644 monitors/monitors/models/self_links.py create mode 100644 monitors/monitors/models/self_links_links.py create mode 100644 monitors/monitors/models/unauthorized_error.py rename {monitors_api/monitors_api => monitors/monitors}/py.typed (100%) create mode 100644 monitors/monitors/rest.py create mode 100644 monitors/pyproject.toml rename {monitors_api => monitors}/requirements.txt (100%) rename {monitors_api => monitors}/setup.cfg (100%) create mode 100644 monitors/setup.py create mode 100644 monitors/test-requirements.txt rename {monitors_api => monitors}/test/__init__.py (100%) create mode 100644 monitors/test/test_error.py create mode 100644 monitors/test/test_get_bgp_monitors200_response.py create mode 100644 monitors/test/test_link.py create mode 100644 monitors/test/test_monitor.py create mode 100644 monitors/test/test_monitor_type.py create mode 100644 monitors/test/test_monitors.py create mode 100644 monitors/test/test_self_links.py create mode 100644 monitors/test/test_self_links_links.py create mode 100644 monitors/test/test_unauthorized_error.py delete mode 100644 monitors_api/.github/workflows/python.yml delete mode 100644 monitors_api/.gitlab-ci.yml delete mode 100644 monitors_api/.openapi-generator/FILES delete mode 100644 monitors_api/.openapi-generator/VERSION delete mode 100644 monitors_api/.travis.yml delete mode 100644 monitors_api/README.md delete mode 100644 monitors_api/docs/Error.md delete mode 100644 monitors_api/docs/Link.md delete mode 100644 monitors_api/docs/Monitor.md delete mode 100644 monitors_api/docs/MonitorType.md delete mode 100644 monitors_api/docs/SelfLinks.md delete mode 100644 monitors_api/docs/SelfLinksLinks.md delete mode 100644 monitors_api/docs/UnauthorizedError.md delete mode 100644 monitors_api/git_push.sh delete mode 100644 monitors_api/monitors_api/__init__.py delete mode 100644 monitors_api/monitors_api/api/__init__.py delete mode 100644 monitors_api/monitors_api/api_client.py delete mode 100644 monitors_api/monitors_api/api_response.py delete mode 100644 monitors_api/monitors_api/configuration.py delete mode 100644 monitors_api/monitors_api/exceptions.py delete mode 100644 monitors_api/monitors_api/models/__init__.py delete mode 100644 monitors_api/monitors_api/models/error.py delete mode 100644 monitors_api/monitors_api/models/get_bgp_monitors200_response.py delete mode 100644 monitors_api/monitors_api/models/link.py delete mode 100644 monitors_api/monitors_api/models/monitor.py delete mode 100644 monitors_api/monitors_api/models/monitor_type.py delete mode 100644 monitors_api/monitors_api/models/monitors.py delete mode 100644 monitors_api/monitors_api/models/self_links.py delete mode 100644 monitors_api/monitors_api/models/self_links_links.py delete mode 100644 monitors_api/monitors_api/models/unauthorized_error.py delete mode 100644 monitors_api/monitors_api/rest.py delete mode 100644 monitors_api/pyproject.toml delete mode 100644 monitors_api/setup.py delete mode 100644 monitors_api/test-requirements.txt delete mode 100644 monitors_api/test/test_error.py delete mode 100644 monitors_api/test/test_get_bgp_monitors200_response.py delete mode 100644 monitors_api/test/test_link.py delete mode 100644 monitors_api/test/test_list_bgp_monitors_api.py delete mode 100644 monitors_api/test/test_monitor.py delete mode 100644 monitors_api/test/test_monitor_type.py delete mode 100644 monitors_api/test/test_monitors.py delete mode 100644 monitors_api/test/test_self_links.py delete mode 100644 monitors_api/test/test_self_links_links.py delete mode 100644 monitors_api/test/test_unauthorized_error.py delete mode 100644 monitors_api/tox.ini rename {snapshots_api => oauth2}/.gitignore (100%) rename {snapshots_api => oauth2}/.openapi-generator-ignore (100%) create mode 100644 oauth2/.openapi-generator/FILES create mode 100644 oauth2/.openapi-generator/VERSION create mode 100644 oauth2/README.md create mode 100644 oauth2/docs/AccessToken.md create mode 100644 oauth2/docs/DefaultApi.md create mode 100644 oauth2/docs/Error.md create mode 100644 oauth2/docs/UnauthorizedError.md create mode 100644 oauth2/docs/ValidationError.md create mode 100644 oauth2/docs/ValidationErrorAllOfErrors.md create mode 100644 oauth2/oauth2/__init__.py create mode 100644 oauth2/oauth2/api/__init__.py create mode 100644 oauth2/oauth2/api/default_api.py create mode 100644 oauth2/oauth2/api_client.py create mode 100644 oauth2/oauth2/api_response.py create mode 100644 oauth2/oauth2/configuration.py create mode 100644 oauth2/oauth2/exceptions.py create mode 100644 oauth2/oauth2/models/__init__.py create mode 100644 oauth2/oauth2/models/access_token.py create mode 100644 oauth2/oauth2/models/error.py create mode 100644 oauth2/oauth2/models/unauthorized_error.py create mode 100644 oauth2/oauth2/models/validation_error.py create mode 100644 oauth2/oauth2/models/validation_error_all_of_errors.py rename {snapshots_api/snapshots_api => oauth2/oauth2}/py.typed (100%) create mode 100644 oauth2/oauth2/rest.py create mode 100644 oauth2/pyproject.toml rename {snapshots_api => oauth2}/requirements.txt (100%) rename {snapshots_api => oauth2}/setup.cfg (100%) create mode 100644 oauth2/setup.py create mode 100644 oauth2/test-requirements.txt rename {snapshots_api => oauth2}/test/__init__.py (100%) create mode 100644 oauth2/test/test_access_token.py create mode 100644 oauth2/test/test_error.py create mode 100644 oauth2/test/test_unauthorized_error.py create mode 100644 oauth2/test/test_validation_error.py create mode 100644 oauth2/test/test_validation_error_all_of_errors.py rename {streaming_api => snapshots}/.gitignore (100%) rename {streaming_api => snapshots}/.openapi-generator-ignore (100%) create mode 100644 snapshots/.openapi-generator/FILES create mode 100644 snapshots/.openapi-generator/VERSION create mode 100644 snapshots/README.md create mode 100644 snapshots/docs/AppAndSelfLinks.md create mode 100644 snapshots/docs/AppAndSelfLinksLinks.md rename {snapshots_api => snapshots}/docs/CreateTestSnapshotApi.md (86%) create mode 100644 snapshots/docs/Error.md create mode 100644 snapshots/docs/Link.md rename {snapshots_api => snapshots}/docs/SnapshotLinks.md (81%) rename {snapshots_api => snapshots}/docs/SnapshotRequest.md (86%) rename {snapshots_api => snapshots}/docs/SnapshotResponse.md (90%) rename {snapshots_api => snapshots}/docs/SnapshotResponseAllOfTest.md (89%) create mode 100644 snapshots/docs/TestInterval.md create mode 100644 snapshots/docs/TestType.md create mode 100644 snapshots/docs/UnauthorizedError.md create mode 100644 snapshots/docs/UnexpandedInstantTest.md create mode 100644 snapshots/docs/UnexpandedInstantTestLinks.md create mode 100644 snapshots/docs/UnexpandedInstantTestLinksSelf.md create mode 100644 snapshots/docs/UnexpandedTest.md create mode 100644 snapshots/docs/ValidationError.md create mode 100644 snapshots/docs/ValidationErrorAllOfErrors.md create mode 100644 snapshots/pyproject.toml rename {streaming_api => snapshots}/requirements.txt (100%) rename {streaming_api => snapshots}/setup.cfg (100%) create mode 100644 snapshots/setup.py create mode 100644 snapshots/snapshots/__init__.py create mode 100644 snapshots/snapshots/api/__init__.py rename {snapshots_api/snapshots_api => snapshots/snapshots}/api/create_test_snapshot_api.py (95%) create mode 100644 snapshots/snapshots/api_client.py create mode 100644 snapshots/snapshots/api_response.py create mode 100644 snapshots/snapshots/configuration.py create mode 100644 snapshots/snapshots/exceptions.py create mode 100644 snapshots/snapshots/models/__init__.py create mode 100644 snapshots/snapshots/models/app_and_self_links.py create mode 100644 snapshots/snapshots/models/app_and_self_links_links.py create mode 100644 snapshots/snapshots/models/error.py create mode 100644 snapshots/snapshots/models/link.py rename {snapshots_api/snapshots_api => snapshots/snapshots}/models/snapshot_links.py (78%) rename {snapshots_api/snapshots_api => snapshots/snapshots}/models/snapshot_request.py (81%) rename {snapshots_api/snapshots_api => snapshots/snapshots}/models/snapshot_response.py (80%) rename {snapshots_api/snapshots_api => snapshots/snapshots}/models/snapshot_response_all_of_test.py (81%) create mode 100644 snapshots/snapshots/models/test_interval.py create mode 100644 snapshots/snapshots/models/test_type.py create mode 100644 snapshots/snapshots/models/unauthorized_error.py create mode 100644 snapshots/snapshots/models/unexpanded_instant_test.py create mode 100644 snapshots/snapshots/models/unexpanded_instant_test_links.py create mode 100644 snapshots/snapshots/models/unexpanded_instant_test_links_self.py create mode 100644 snapshots/snapshots/models/unexpanded_test.py create mode 100644 snapshots/snapshots/models/validation_error.py create mode 100644 snapshots/snapshots/models/validation_error_all_of_errors.py rename {streaming_api/streaming_api => snapshots/snapshots}/py.typed (100%) create mode 100644 snapshots/snapshots/rest.py create mode 100644 snapshots/test-requirements.txt rename {streaming_api => snapshots}/test/__init__.py (100%) create mode 100644 snapshots/test/test_app_and_self_links.py create mode 100644 snapshots/test/test_app_and_self_links_links.py create mode 100644 snapshots/test/test_error.py create mode 100644 snapshots/test/test_link.py rename {snapshots_api => snapshots}/test/test_snapshot_links.py (88%) rename {snapshots_api => snapshots}/test/test_snapshot_request.py (89%) rename {snapshots_api => snapshots}/test/test_snapshot_response.py (91%) rename {snapshots_api => snapshots}/test/test_snapshot_response_all_of_test.py (83%) create mode 100644 snapshots/test/test_test_interval.py create mode 100644 snapshots/test/test_test_type.py create mode 100644 snapshots/test/test_unauthorized_error.py create mode 100644 snapshots/test/test_unexpanded_instant_test.py create mode 100644 snapshots/test/test_unexpanded_instant_test_links.py create mode 100644 snapshots/test/test_unexpanded_instant_test_links_self.py create mode 100644 snapshots/test/test_unexpanded_test.py create mode 100644 snapshots/test/test_validation_error.py create mode 100644 snapshots/test/test_validation_error_all_of_errors.py delete mode 100644 snapshots_api/.github/workflows/python.yml delete mode 100644 snapshots_api/.gitlab-ci.yml delete mode 100644 snapshots_api/.openapi-generator/FILES delete mode 100644 snapshots_api/.openapi-generator/VERSION delete mode 100644 snapshots_api/.travis.yml delete mode 100644 snapshots_api/README.md delete mode 100644 snapshots_api/docs/AppLinks.md delete mode 100644 snapshots_api/docs/AppLinksLinks.md delete mode 100644 snapshots_api/docs/Error.md delete mode 100644 snapshots_api/docs/Link.md delete mode 100644 snapshots_api/docs/SelfLinks.md delete mode 100644 snapshots_api/docs/SelfLinksLinks.md delete mode 100644 snapshots_api/docs/TestInterval.md delete mode 100644 snapshots_api/docs/TestType.md delete mode 100644 snapshots_api/docs/UnauthorizedError.md delete mode 100644 snapshots_api/docs/UnexpandedInstantTest.md delete mode 100644 snapshots_api/docs/UnexpandedInstantTestLinks.md delete mode 100644 snapshots_api/docs/UnexpandedInstantTestLinksSelf.md delete mode 100644 snapshots_api/docs/UnexpandedInstantTestLinksTestResults.md delete mode 100644 snapshots_api/docs/UnexpandedTest.md delete mode 100644 snapshots_api/git_push.sh delete mode 100644 snapshots_api/pyproject.toml delete mode 100644 snapshots_api/setup.py delete mode 100644 snapshots_api/snapshots_api/__init__.py delete mode 100644 snapshots_api/snapshots_api/api/__init__.py delete mode 100644 snapshots_api/snapshots_api/api_client.py delete mode 100644 snapshots_api/snapshots_api/api_response.py delete mode 100644 snapshots_api/snapshots_api/configuration.py delete mode 100644 snapshots_api/snapshots_api/exceptions.py delete mode 100644 snapshots_api/snapshots_api/models/__init__.py delete mode 100644 snapshots_api/snapshots_api/models/app_links.py delete mode 100644 snapshots_api/snapshots_api/models/app_links_links.py delete mode 100644 snapshots_api/snapshots_api/models/error.py delete mode 100644 snapshots_api/snapshots_api/models/link.py delete mode 100644 snapshots_api/snapshots_api/models/self_links.py delete mode 100644 snapshots_api/snapshots_api/models/self_links_links.py delete mode 100644 snapshots_api/snapshots_api/models/test_interval.py delete mode 100644 snapshots_api/snapshots_api/models/test_type.py delete mode 100644 snapshots_api/snapshots_api/models/unauthorized_error.py delete mode 100644 snapshots_api/snapshots_api/models/unexpanded_instant_test.py delete mode 100644 snapshots_api/snapshots_api/models/unexpanded_instant_test_links.py delete mode 100644 snapshots_api/snapshots_api/models/unexpanded_instant_test_links_self.py delete mode 100644 snapshots_api/snapshots_api/models/unexpanded_instant_test_links_test_results.py delete mode 100644 snapshots_api/snapshots_api/models/unexpanded_test.py delete mode 100644 snapshots_api/snapshots_api/rest.py delete mode 100644 snapshots_api/test-requirements.txt delete mode 100644 snapshots_api/test/test_app_links.py delete mode 100644 snapshots_api/test/test_app_links_links.py delete mode 100644 snapshots_api/test/test_create_test_snapshot_api.py delete mode 100644 snapshots_api/test/test_error.py delete mode 100644 snapshots_api/test/test_link.py delete mode 100644 snapshots_api/test/test_self_links.py delete mode 100644 snapshots_api/test/test_self_links_links.py delete mode 100644 snapshots_api/test/test_test_interval.py delete mode 100644 snapshots_api/test/test_test_type.py delete mode 100644 snapshots_api/test/test_unauthorized_error.py delete mode 100644 snapshots_api/test/test_unexpanded_instant_test.py delete mode 100644 snapshots_api/test/test_unexpanded_instant_test_links.py delete mode 100644 snapshots_api/test/test_unexpanded_instant_test_links_self.py delete mode 100644 snapshots_api/test/test_unexpanded_instant_test_links_test_results.py delete mode 100644 snapshots_api/test/test_unexpanded_test.py delete mode 100644 snapshots_api/tox.ini rename {test_results_api => streaming}/.gitignore (100%) rename {test_results_api => streaming}/.openapi-generator-ignore (100%) create mode 100644 streaming/.openapi-generator/FILES create mode 100644 streaming/.openapi-generator/VERSION create mode 100644 streaming/README.md create mode 100644 streaming/docs/ApiError.md rename {streaming_api => streaming}/docs/ApiErrorIntegrationLimits.md (79%) rename {streaming_api => streaming}/docs/AuditOperation.md (83%) rename {streaming_api => streaming}/docs/AuditOperationWithUpdate.md (82%) create mode 100644 streaming/docs/BadRequestError.md rename {streaming_api => streaming}/docs/CreateStreamResponse.md (91%) rename {streaming_api => streaming}/docs/EndpointType.md (99%) rename {streaming_api => streaming}/docs/GetStreamResponse.md (92%) rename {streaming_api => streaming}/docs/PutStream.md (88%) rename {streaming_api => streaming}/docs/PutStreamTagMatchInner.md (80%) rename {streaming_api => streaming}/docs/Stream.md (94%) rename {streaming_api => streaming}/docs/StreamResponse.md (84%) rename {streaming_api => streaming}/docs/StreamResponseLinks.md (79%) rename {streaming_api => streaming}/docs/StreamResponseLinksSelf.md (77%) rename {streaming_api => streaming}/docs/StreamType.md (99%) rename {streaming_api => streaming}/docs/StreamingApi.md (82%) rename {streaming_api => streaming}/docs/TagMatchObjectType.md (99%) create mode 100644 streaming/docs/UnauthorizedError.md create mode 100644 streaming/pyproject.toml rename {test_results_api => streaming}/requirements.txt (100%) rename {test_results_api => streaming}/setup.cfg (100%) create mode 100644 streaming/setup.py create mode 100644 streaming/streaming/__init__.py create mode 100644 streaming/streaming/api/__init__.py rename {streaming_api/streaming_api => streaming/streaming}/api/streaming_api.py (95%) create mode 100644 streaming/streaming/api_client.py create mode 100644 streaming/streaming/api_response.py create mode 100644 streaming/streaming/configuration.py create mode 100644 streaming/streaming/exceptions.py create mode 100644 streaming/streaming/models/__init__.py create mode 100644 streaming/streaming/models/api_error.py create mode 100644 streaming/streaming/models/api_error_integration_limits.py create mode 100644 streaming/streaming/models/audit_operation.py create mode 100644 streaming/streaming/models/audit_operation_with_update.py create mode 100644 streaming/streaming/models/bad_request_error.py create mode 100644 streaming/streaming/models/create_stream_response.py create mode 100644 streaming/streaming/models/endpoint_type.py create mode 100644 streaming/streaming/models/get_stream_response.py create mode 100644 streaming/streaming/models/put_stream.py create mode 100644 streaming/streaming/models/put_stream_tag_match_inner.py create mode 100644 streaming/streaming/models/stream.py create mode 100644 streaming/streaming/models/stream_response.py create mode 100644 streaming/streaming/models/stream_response_links.py create mode 100644 streaming/streaming/models/stream_response_links_self.py create mode 100644 streaming/streaming/models/stream_type.py create mode 100644 streaming/streaming/models/tag_match_object_type.py create mode 100644 streaming/streaming/models/unauthorized_error.py rename {test_results_api/test_results_api => streaming/streaming}/py.typed (100%) create mode 100644 streaming/streaming/rest.py create mode 100644 streaming/test-requirements.txt rename {test_results_api => streaming}/test/__init__.py (100%) create mode 100644 streaming/test/test_api_error.py create mode 100644 streaming/test/test_api_error_integration_limits.py create mode 100644 streaming/test/test_audit_operation.py create mode 100644 streaming/test/test_audit_operation_with_update.py create mode 100644 streaming/test/test_bad_request_error.py create mode 100644 streaming/test/test_create_stream_response.py create mode 100644 streaming/test/test_endpoint_type.py create mode 100644 streaming/test/test_get_stream_response.py create mode 100644 streaming/test/test_put_stream.py create mode 100644 streaming/test/test_put_stream_tag_match_inner.py create mode 100644 streaming/test/test_stream.py create mode 100644 streaming/test/test_stream_response.py create mode 100644 streaming/test/test_stream_response_links.py create mode 100644 streaming/test/test_stream_response_links_self.py create mode 100644 streaming/test/test_stream_type.py create mode 100644 streaming/test/test_tag_match_object_type.py create mode 100644 streaming/test/test_unauthorized_error.py delete mode 100644 streaming_api/.github/workflows/python.yml delete mode 100644 streaming_api/.gitlab-ci.yml delete mode 100644 streaming_api/.openapi-generator/FILES delete mode 100644 streaming_api/.openapi-generator/VERSION delete mode 100644 streaming_api/.travis.yml delete mode 100644 streaming_api/README.md delete mode 100644 streaming_api/docs/ApiError.md delete mode 100644 streaming_api/docs/BadRequestError.md delete mode 100644 streaming_api/docs/UnauthorizedError.md delete mode 100644 streaming_api/git_push.sh delete mode 100644 streaming_api/pyproject.toml delete mode 100644 streaming_api/setup.py delete mode 100644 streaming_api/streaming_api/__init__.py delete mode 100644 streaming_api/streaming_api/api/__init__.py delete mode 100644 streaming_api/streaming_api/api_client.py delete mode 100644 streaming_api/streaming_api/api_response.py delete mode 100644 streaming_api/streaming_api/configuration.py delete mode 100644 streaming_api/streaming_api/exceptions.py delete mode 100644 streaming_api/streaming_api/models/__init__.py delete mode 100644 streaming_api/streaming_api/models/api_error.py delete mode 100644 streaming_api/streaming_api/models/api_error_integration_limits.py delete mode 100644 streaming_api/streaming_api/models/audit_operation.py delete mode 100644 streaming_api/streaming_api/models/audit_operation_with_update.py delete mode 100644 streaming_api/streaming_api/models/bad_request_error.py delete mode 100644 streaming_api/streaming_api/models/create_stream_response.py delete mode 100644 streaming_api/streaming_api/models/endpoint_type.py delete mode 100644 streaming_api/streaming_api/models/get_stream_response.py delete mode 100644 streaming_api/streaming_api/models/put_stream.py delete mode 100644 streaming_api/streaming_api/models/put_stream_tag_match_inner.py delete mode 100644 streaming_api/streaming_api/models/stream.py delete mode 100644 streaming_api/streaming_api/models/stream_response.py delete mode 100644 streaming_api/streaming_api/models/stream_response_links.py delete mode 100644 streaming_api/streaming_api/models/stream_response_links_self.py delete mode 100644 streaming_api/streaming_api/models/stream_type.py delete mode 100644 streaming_api/streaming_api/models/tag_match_object_type.py delete mode 100644 streaming_api/streaming_api/models/unauthorized_error.py delete mode 100644 streaming_api/streaming_api/rest.py delete mode 100644 streaming_api/test-requirements.txt delete mode 100644 streaming_api/test/test_api_error.py delete mode 100644 streaming_api/test/test_api_error_integration_limits.py delete mode 100644 streaming_api/test/test_audit_operation.py delete mode 100644 streaming_api/test/test_audit_operation_with_update.py delete mode 100644 streaming_api/test/test_bad_request_error.py delete mode 100644 streaming_api/test/test_create_stream_response.py delete mode 100644 streaming_api/test/test_endpoint_type.py delete mode 100644 streaming_api/test/test_get_stream_response.py delete mode 100644 streaming_api/test/test_put_stream.py delete mode 100644 streaming_api/test/test_put_stream_tag_match_inner.py delete mode 100644 streaming_api/test/test_stream.py delete mode 100644 streaming_api/test/test_stream_response.py delete mode 100644 streaming_api/test/test_stream_response_links.py delete mode 100644 streaming_api/test/test_stream_response_links_self.py delete mode 100644 streaming_api/test/test_stream_type.py delete mode 100644 streaming_api/test/test_streaming_api.py delete mode 100644 streaming_api/test/test_tag_match_object_type.py delete mode 100644 streaming_api/test/test_unauthorized_error.py delete mode 100644 streaming_api/tox.ini rename {test_templates_api => tags}/.gitignore (100%) rename {test_templates_api => tags}/.openapi-generator-ignore (100%) create mode 100644 tags/.openapi-generator/FILES create mode 100644 tags/.openapi-generator/VERSION create mode 100644 tags/README.md create mode 100644 tags/docs/AccessType.md create mode 100644 tags/docs/ApiError.md create mode 100644 tags/docs/Assignment.md create mode 100644 tags/docs/AssignmentType.md create mode 100644 tags/docs/BulkTagAssignment.md create mode 100644 tags/docs/BulkTagAssignments.md create mode 100644 tags/docs/BulkTagResponse.md create mode 100644 tags/docs/Error.md create mode 100644 tags/docs/Expand.md create mode 100644 tags/docs/GetTag.md create mode 100644 tags/docs/GetTags200Response.md create mode 100644 tags/docs/Link.md create mode 100644 tags/docs/ObjectType.md create mode 100644 tags/docs/SelfLinks.md create mode 100644 tags/docs/SelfLinksLinks.md create mode 100644 tags/docs/Tag.md create mode 100644 tags/docs/TagAssignment.md create mode 100644 tags/docs/TagAssignmentApi.md create mode 100644 tags/docs/TagBulkCreateError.md create mode 100644 tags/docs/TagCollection.md create mode 100644 tags/docs/TagsApi.md create mode 100644 tags/docs/UnauthorizedError.md create mode 100644 tags/docs/ValidationError.md create mode 100644 tags/docs/ValidationErrorAllOfErrors.md create mode 100644 tags/pyproject.toml rename {test_templates_api => tags}/requirements.txt (100%) rename {test_templates_api => tags}/setup.cfg (100%) create mode 100644 tags/setup.py create mode 100644 tags/tags/__init__.py create mode 100644 tags/tags/api/__init__.py create mode 100644 tags/tags/api/tag_assignment_api.py create mode 100644 tags/tags/api/tags_api.py create mode 100644 tags/tags/api_client.py create mode 100644 tags/tags/api_response.py create mode 100644 tags/tags/configuration.py create mode 100644 tags/tags/exceptions.py create mode 100644 tags/tags/models/__init__.py create mode 100644 tags/tags/models/access_type.py create mode 100644 tags/tags/models/api_error.py create mode 100644 tags/tags/models/assignment.py create mode 100644 tags/tags/models/assignment_type.py create mode 100644 tags/tags/models/bulk_tag_assignment.py create mode 100644 tags/tags/models/bulk_tag_assignments.py create mode 100644 tags/tags/models/bulk_tag_response.py create mode 100644 tags/tags/models/error.py create mode 100644 tags/tags/models/expand.py create mode 100644 tags/tags/models/get_tag.py create mode 100644 tags/tags/models/get_tags200_response.py create mode 100644 tags/tags/models/link.py create mode 100644 tags/tags/models/object_type.py create mode 100644 tags/tags/models/self_links.py create mode 100644 tags/tags/models/self_links_links.py create mode 100644 tags/tags/models/tag.py create mode 100644 tags/tags/models/tag_assignment.py create mode 100644 tags/tags/models/tag_bulk_create_error.py create mode 100644 tags/tags/models/tag_collection.py create mode 100644 tags/tags/models/unauthorized_error.py create mode 100644 tags/tags/models/validation_error.py create mode 100644 tags/tags/models/validation_error_all_of_errors.py rename {test_templates_api/test_templates_api => tags/tags}/py.typed (100%) create mode 100644 tags/tags/rest.py create mode 100644 tags/test-requirements.txt rename {test_templates_api => tags}/test/__init__.py (100%) create mode 100644 tags/test/test_access_type.py create mode 100644 tags/test/test_api_error.py create mode 100644 tags/test/test_assignment.py create mode 100644 tags/test/test_assignment_type.py create mode 100644 tags/test/test_bulk_tag_assignment.py create mode 100644 tags/test/test_bulk_tag_assignments.py create mode 100644 tags/test/test_bulk_tag_response.py create mode 100644 tags/test/test_error.py create mode 100644 tags/test/test_expand.py create mode 100644 tags/test/test_get_tag.py create mode 100644 tags/test/test_get_tags200_response.py create mode 100644 tags/test/test_link.py create mode 100644 tags/test/test_object_type.py create mode 100644 tags/test/test_self_links.py create mode 100644 tags/test/test_self_links_links.py create mode 100644 tags/test/test_tag.py create mode 100644 tags/test/test_tag_assignment.py create mode 100644 tags/test/test_tag_bulk_create_error.py create mode 100644 tags/test/test_tag_collection.py create mode 100644 tags/test/test_unauthorized_error.py create mode 100644 tags/test/test_validation_error.py create mode 100644 tags/test/test_validation_error_all_of_errors.py rename {tests_api => test_results}/.gitignore (100%) rename {tests_api => test_results}/.openapi-generator-ignore (100%) create mode 100644 test_results/.openapi-generator/FILES create mode 100644 test_results/.openapi-generator/VERSION create mode 100644 test_results/README.md create mode 100644 test_results/docs/Agent.md create mode 100644 test_results/docs/AppLinks.md create mode 100644 test_results/docs/AppLinksLinks.md rename {test_results_api => test_results}/docs/BgpBasicTestResult.md (84%) rename {test_results_api => test_results}/docs/BgpHop.md (86%) rename {test_results_api => test_results}/docs/BgpTestResult.md (78%) rename {test_results_api => test_results}/docs/BgpTestResults.md (82%) rename {test_results_api => test_results}/docs/BgpTestRouteInformationResult.md (85%) rename {test_results_api => test_results}/docs/BgpTestRouteInformationResults.md (77%) rename {test_results_api => test_results}/docs/DNSSECTestMetricsApi.md (89%) rename {test_results_api => test_results}/docs/DNSServerTestMetricsApi.md (89%) rename {test_results_api => test_results}/docs/DNSTraceTestMetricsApi.md (88%) rename {test_results_api => test_results}/docs/DnsServerTestResult.md (89%) rename {test_results_api => test_results}/docs/DnsServerTestResults.md (80%) rename {test_results_api => test_results}/docs/DnsTraceTestResult.md (90%) rename {test_results_api => test_results}/docs/DnsTraceTestResults.md (80%) rename {test_results_api => test_results}/docs/DnssecTestResult.md (88%) rename {test_results_api => test_results}/docs/DnssecTestResults.md (81%) rename {test_results_api => test_results}/docs/EpochTimeWindow.md (83%) create mode 100644 test_results/docs/Error.md create mode 100644 test_results/docs/Expand.md rename {test_results_api => test_results}/docs/FtpServerTestResult.md (85%) rename {test_results_api => test_results}/docs/FtpServerTestResults.md (80%) rename {test_results_api => test_results}/docs/GetTestPathvisAgentRound200Response.md (77%) rename {test_results_api => test_results}/docs/GetTestResultDnsServer200Response.md (80%) rename {test_results_api => test_results}/docs/GetTestResultDnsTrace200Response.md (80%) rename {test_results_api => test_results}/docs/GetTestResultDnssec200Response.md (81%) rename {test_results_api => test_results}/docs/GetTestResultFtpServer200Response.md (80%) create mode 100644 test_results/docs/GetTestResultHttpServer200Response.md rename {test_results_api => test_results}/docs/GetTestResultMetrics200Response.md (80%) create mode 100644 test_results/docs/GetTestResultNetworkPathVis200Response.md rename {test_results_api => test_results}/docs/GetTestResultPageLoad200Response.md (80%) create mode 100644 test_results/docs/GetTestResultPageLoadComponentDetail200Response.md rename {test_results_api => test_results}/docs/GetTestResultRtpStream200Response.md (80%) rename {test_results_api => test_results}/docs/GetTestResultSipServer200Response.md (80%) rename {test_results_api => test_results}/docs/GetTestResultWebTransactions200Response.md (79%) create mode 100644 test_results/docs/GetTestResultWebTransactionsComponentDetail200Response.md create mode 100644 test_results/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md create mode 100644 test_results/docs/GetTestResultsBgp200Response.md rename {test_results_api => test_results}/docs/GetTestResultsBgpPrefix200Response.md (77%) create mode 100644 test_results/docs/HttpTestResult.md create mode 100644 test_results/docs/HttpTestResultHeaders.md create mode 100644 test_results/docs/HttpTestResults.md create mode 100644 test_results/docs/Link.md rename {test_results_api => test_results}/docs/Marker.md (86%) create mode 100644 test_results/docs/Monitor.md rename {test_results_api => test_results}/docs/NetworkBGPTestMetricsApi.md (88%) create mode 100644 test_results/docs/NetworkTestMetricsApi.md create mode 100644 test_results/docs/NetworkTestResult.md create mode 100644 test_results/docs/NetworkTestResults.md rename {test_results_api => test_results}/docs/Page.md (90%) rename {test_results_api => test_results}/docs/PageLoadDetailTestResult.md (87%) rename {test_results_api => test_results}/docs/PageLoadDetailTestResults.md (78%) rename {test_results_api => test_results}/docs/PageLoadTestResult.md (88%) rename {test_results_api => test_results}/docs/PageLoadTestResults.md (80%) create mode 100644 test_results/docs/PaginationLinks.md create mode 100644 test_results/docs/PaginationLinksLinks.md create mode 100644 test_results/docs/PathVisBaseTestResult.md create mode 100644 test_results/docs/PathVisDetailTestResult.md create mode 100644 test_results/docs/PathVisDetailTestResults.md create mode 100644 test_results/docs/PathVisDirection.md create mode 100644 test_results/docs/PathVisEndpoint.md create mode 100644 test_results/docs/PathVisHop.md create mode 100644 test_results/docs/PathVisRoute.md create mode 100644 test_results/docs/PathVisTestResult.md create mode 100644 test_results/docs/PathVisTestResults.md create mode 100644 test_results/docs/QueryWindow.md rename {test_results_api => test_results}/docs/RtpStreamTestResult.md (82%) rename {test_results_api => test_results}/docs/RtpStreamTestResults.md (80%) create mode 100644 test_results/docs/SelfLinks.md create mode 100644 test_results/docs/SelfLinksLinks.md create mode 100644 test_results/docs/SimpleTest.md create mode 100644 test_results/docs/SimpleTestLinks.md create mode 100644 test_results/docs/SimpleTestLinksSelf.md rename {test_results_api => test_results}/docs/SipServerErrorType.md (99%) rename {test_results_api => test_results}/docs/SipServerTestResult.md (85%) rename {test_results_api => test_results}/docs/SipServerTestResults.md (80%) create mode 100644 test_results/docs/SslCert.md create mode 100644 test_results/docs/TestDirection.md create mode 100644 test_results/docs/TestInterval.md create mode 100644 test_results/docs/TestResult.md rename {test_results_api => test_results}/docs/TestResultAppLinks.md (78%) create mode 100644 test_results/docs/TestType.md create mode 100644 test_results/docs/UnauthorizedError.md create mode 100644 test_results/docs/ValidationError.md create mode 100644 test_results/docs/ValidationErrorAllOfErrors.md rename {test_results_api => test_results}/docs/VoiceRTPServerTestMetricsApi.md (88%) rename {test_results_api => test_results}/docs/VoiceSIPServerTestMetricsApi.md (89%) rename {test_results_api => test_results}/docs/WebFTPServerTestMetricsApi.md (89%) rename {test_results_api => test_results}/docs/WebHTTPServerTestMetricsApi.md (84%) rename {test_results_api => test_results}/docs/WebPageLoadTestMetricsApi.md (88%) rename {test_results_api => test_results}/docs/WebTransactionDetailTestResult.md (85%) rename {test_results_api => test_results}/docs/WebTransactionDetailTestResults.md (77%) rename {test_results_api => test_results}/docs/WebTransactionPageDetailTestResult.md (85%) rename {test_results_api => test_results}/docs/WebTransactionPageDetailTestResults.md (76%) rename {test_results_api => test_results}/docs/WebTransactionTestResult.md (86%) rename {test_results_api => test_results}/docs/WebTransactionTestResults.md (78%) rename {test_results_api => test_results}/docs/WebTransactionsTestMetricsApi.md (88%) create mode 100644 test_results/pyproject.toml rename {tests_api => test_results}/requirements.txt (100%) rename {tests_api => test_results}/setup.cfg (100%) create mode 100644 test_results/setup.py create mode 100644 test_results/test-requirements.txt rename {tests_api => test_results}/test/__init__.py (100%) create mode 100644 test_results/test/test_agent.py create mode 100644 test_results/test/test_app_links.py create mode 100644 test_results/test/test_app_links_links.py rename {test_results_api => test_results}/test/test_bgp_basic_test_result.py (89%) rename {test_results_api => test_results}/test/test_bgp_hop.py (91%) rename {test_results_api => test_results}/test/test_bgp_test_result.py (87%) rename {test_results_api => test_results}/test/test_bgp_test_results.py (88%) rename {test_results_api => test_results}/test/test_bgp_test_route_information_result.py (87%) rename {test_results_api => test_results}/test/test_bgp_test_route_information_results.py (88%) rename {test_results_api => test_results}/test/test_dns_server_test_result.py (87%) rename {test_results_api => test_results}/test/test_dns_server_test_results.py (88%) rename {test_results_api => test_results}/test/test_dns_trace_test_result.py (91%) rename {test_results_api => test_results}/test/test_dns_trace_test_results.py (88%) rename {test_results_api => test_results}/test/test_dnssec_test_result.py (86%) rename {test_results_api => test_results}/test/test_dnssec_test_results.py (88%) rename {test_results_api => test_results}/test/test_epoch_time_window.py (90%) create mode 100644 test_results/test/test_error.py create mode 100644 test_results/test/test_expand.py rename {test_results_api => test_results}/test/test_ftp_server_test_result.py (85%) rename {test_results_api => test_results}/test/test_ftp_server_test_results.py (88%) rename {test_results_api => test_results}/test/test_get_test_pathvis_agent_round200_response.py (84%) create mode 100644 test_results/test/test_get_test_result_dns_server200_response.py create mode 100644 test_results/test/test_get_test_result_dns_trace200_response.py create mode 100644 test_results/test/test_get_test_result_dnssec200_response.py create mode 100644 test_results/test/test_get_test_result_ftp_server200_response.py create mode 100644 test_results/test/test_get_test_result_http_server200_response.py create mode 100644 test_results/test/test_get_test_result_metrics200_response.py create mode 100644 test_results/test/test_get_test_result_network_path_vis200_response.py create mode 100644 test_results/test/test_get_test_result_page_load200_response.py create mode 100644 test_results/test/test_get_test_result_page_load_component_detail200_response.py create mode 100644 test_results/test/test_get_test_result_rtp_stream200_response.py create mode 100644 test_results/test/test_get_test_result_sip_server200_response.py create mode 100644 test_results/test/test_get_test_result_web_transactions200_response.py create mode 100644 test_results/test/test_get_test_result_web_transactions_component_detail200_response.py create mode 100644 test_results/test/test_get_test_result_web_transactions_component_page_detail200_response.py create mode 100644 test_results/test/test_get_test_results_bgp200_response.py rename {test_results_api => test_results}/test/test_get_test_results_bgp_prefix200_response.py (84%) create mode 100644 test_results/test/test_http_test_result.py create mode 100644 test_results/test/test_http_test_result_headers.py create mode 100644 test_results/test/test_http_test_results.py create mode 100644 test_results/test/test_link.py rename {test_results_api => test_results}/test/test_marker.py (91%) create mode 100644 test_results/test/test_monitor.py create mode 100644 test_results/test/test_network_test_result.py create mode 100644 test_results/test/test_network_test_results.py rename {test_results_api => test_results}/test/test_page.py (92%) rename {test_results_api => test_results}/test/test_page_load_detail_test_result.py (95%) rename {test_results_api => test_results}/test/test_page_load_detail_test_results.py (88%) rename {test_results_api => test_results}/test/test_page_load_test_result.py (86%) rename {test_results_api => test_results}/test/test_page_load_test_results.py (88%) create mode 100644 test_results/test/test_pagination_links.py create mode 100644 test_results/test/test_pagination_links_links.py create mode 100644 test_results/test/test_path_vis_base_test_result.py create mode 100644 test_results/test/test_path_vis_detail_test_result.py create mode 100644 test_results/test/test_path_vis_detail_test_results.py create mode 100644 test_results/test/test_path_vis_direction.py create mode 100644 test_results/test/test_path_vis_endpoint.py create mode 100644 test_results/test/test_path_vis_hop.py create mode 100644 test_results/test/test_path_vis_route.py create mode 100644 test_results/test/test_path_vis_test_result.py create mode 100644 test_results/test/test_path_vis_test_results.py create mode 100644 test_results/test/test_query_window.py rename {test_results_api => test_results}/test/test_rtp_stream_test_result.py (84%) rename {test_results_api => test_results}/test/test_rtp_stream_test_results.py (88%) create mode 100644 test_results/test/test_self_links.py create mode 100644 test_results/test/test_self_links_links.py create mode 100644 test_results/test/test_simple_test.py create mode 100644 test_results/test/test_simple_test_links.py create mode 100644 test_results/test/test_simple_test_links_self.py rename {test_results_api => test_results}/test/test_sip_server_error_type.py (80%) rename {test_results_api => test_results}/test/test_sip_server_test_result.py (91%) rename {test_results_api => test_results}/test/test_sip_server_test_results.py (88%) rename {test_results_api => test_results}/test/test_ssl_cert.py (86%) create mode 100644 test_results/test/test_test_direction.py create mode 100644 test_results/test/test_test_interval.py create mode 100644 test_results/test/test_test_result.py rename {test_results_api => test_results}/test/test_test_result_app_links.py (90%) create mode 100644 test_results/test/test_test_type.py create mode 100644 test_results/test/test_unauthorized_error.py create mode 100644 test_results/test/test_validation_error.py create mode 100644 test_results/test/test_validation_error_all_of_errors.py rename {test_results_api => test_results}/test/test_web_transaction_detail_test_result.py (84%) rename {test_results_api => test_results}/test/test_web_transaction_detail_test_results.py (88%) rename {test_results_api => test_results}/test/test_web_transaction_page_detail_test_result.py (93%) rename {test_results_api => test_results}/test/test_web_transaction_page_detail_test_results.py (87%) rename {test_results_api => test_results}/test/test_web_transaction_test_result.py (86%) rename {test_results_api => test_results}/test/test_web_transaction_test_results.py (88%) create mode 100644 test_results/test_results/__init__.py create mode 100644 test_results/test_results/api/__init__.py rename {test_results_api/test_results_api => test_results/test_results}/api/dns_server_test_metrics_api.py (96%) rename {test_results_api/test_results_api => test_results/test_results}/api/dns_trace_test_metrics_api.py (95%) rename {test_results_api/test_results_api => test_results/test_results}/api/dnssec_test_metrics_api.py (95%) rename {test_results_api/test_results_api => test_results/test_results}/api/network_bgp_test_metrics_api.py (96%) rename {test_results_api/test_results_api => test_results/test_results}/api/network_test_metrics_api.py (84%) rename {test_results_api/test_results_api => test_results/test_results}/api/voice_rtp_server_test_metrics_api.py (95%) rename {test_results_api/test_results_api => test_results/test_results}/api/voice_sip_server_test_metrics_api.py (95%) rename {test_results_api/test_results_api => test_results/test_results}/api/web_ftp_server_test_metrics_api.py (95%) rename {test_results_api/test_results_api => test_results/test_results}/api/web_http_server_test_metrics_api.py (95%) rename {test_results_api/test_results_api => test_results/test_results}/api/web_page_load_test_metrics_api.py (96%) rename {test_results_api/test_results_api => test_results/test_results}/api/web_transactions_test_metrics_api.py (96%) create mode 100644 test_results/test_results/api_client.py create mode 100644 test_results/test_results/api_response.py create mode 100644 test_results/test_results/configuration.py create mode 100644 test_results/test_results/exceptions.py create mode 100644 test_results/test_results/models/__init__.py create mode 100644 test_results/test_results/models/agent.py create mode 100644 test_results/test_results/models/app_links.py create mode 100644 test_results/test_results/models/app_links_links.py rename {test_results_api/test_results_api => test_results/test_results}/models/bgp_basic_test_result.py (76%) rename {test_results_api/test_results_api => test_results/test_results}/models/bgp_hop.py (79%) create mode 100644 test_results/test_results/models/bgp_test_result.py rename {test_results_api/test_results_api => test_results/test_results}/models/bgp_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/bgp_test_route_information_result.py (78%) rename {test_results_api/test_results_api => test_results/test_results}/models/bgp_test_route_information_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/dns_server_test_result.py (80%) rename {test_results_api/test_results_api => test_results/test_results}/models/dns_server_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/dns_trace_test_result.py (81%) rename {test_results_api/test_results_api => test_results/test_results}/models/dns_trace_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/dnssec_test_result.py (78%) rename {test_results_api/test_results_api => test_results/test_results}/models/dnssec_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/epoch_time_window.py (80%) create mode 100644 test_results/test_results/models/error.py create mode 100644 test_results/test_results/models/expand.py rename {test_results_api/test_results_api => test_results/test_results}/models/ftp_server_test_result.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/ftp_server_test_results.py (75%) create mode 100644 test_results/test_results/models/get_test_pathvis_agent_round200_response.py rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_dns_server200_response.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_dns_trace200_response.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_dnssec200_response.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_ftp_server200_response.py (75%) create mode 100644 test_results/test_results/models/get_test_result_http_server200_response.py rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_metrics200_response.py (75%) create mode 100644 test_results/test_results/models/get_test_result_network_path_vis200_response.py rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_page_load200_response.py (75%) create mode 100644 test_results/test_results/models/get_test_result_page_load_component_detail200_response.py rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_rtp_stream200_response.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_sip_server200_response.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/get_test_result_web_transactions200_response.py (75%) create mode 100644 test_results/test_results/models/get_test_result_web_transactions_component_detail200_response.py create mode 100644 test_results/test_results/models/get_test_result_web_transactions_component_page_detail200_response.py create mode 100644 test_results/test_results/models/get_test_results_bgp200_response.py create mode 100644 test_results/test_results/models/get_test_results_bgp_prefix200_response.py create mode 100644 test_results/test_results/models/http_test_result.py create mode 100644 test_results/test_results/models/http_test_result_headers.py create mode 100644 test_results/test_results/models/http_test_results.py create mode 100644 test_results/test_results/models/link.py rename {test_results_api/test_results_api => test_results/test_results}/models/marker.py (79%) create mode 100644 test_results/test_results/models/monitor.py create mode 100644 test_results/test_results/models/network_test_result.py create mode 100644 test_results/test_results/models/network_test_results.py rename {test_results_api/test_results_api => test_results/test_results}/models/page.py (81%) rename {test_results_api/test_results_api => test_results/test_results}/models/page_load_detail_test_result.py (78%) rename {test_results_api/test_results_api => test_results/test_results}/models/page_load_detail_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/page_load_test_result.py (81%) rename {test_results_api/test_results_api => test_results/test_results}/models/page_load_test_results.py (75%) create mode 100644 test_results/test_results/models/pagination_links.py create mode 100644 test_results/test_results/models/pagination_links_links.py create mode 100644 test_results/test_results/models/path_vis_base_test_result.py create mode 100644 test_results/test_results/models/path_vis_detail_test_result.py create mode 100644 test_results/test_results/models/path_vis_detail_test_results.py create mode 100644 test_results/test_results/models/path_vis_direction.py create mode 100644 test_results/test_results/models/path_vis_endpoint.py create mode 100644 test_results/test_results/models/path_vis_hop.py create mode 100644 test_results/test_results/models/path_vis_route.py create mode 100644 test_results/test_results/models/path_vis_test_result.py create mode 100644 test_results/test_results/models/path_vis_test_results.py create mode 100644 test_results/test_results/models/query_window.py create mode 100644 test_results/test_results/models/rtp_stream_test_result.py rename {test_results_api/test_results_api => test_results/test_results}/models/rtp_stream_test_results.py (75%) create mode 100644 test_results/test_results/models/self_links.py create mode 100644 test_results/test_results/models/self_links_links.py create mode 100644 test_results/test_results/models/simple_test.py create mode 100644 test_results/test_results/models/simple_test_links.py create mode 100644 test_results/test_results/models/simple_test_links_self.py rename {test_results_api/test_results_api => test_results/test_results}/models/sip_server_error_type.py (81%) create mode 100644 test_results/test_results/models/sip_server_test_result.py rename {test_results_api/test_results_api => test_results/test_results}/models/sip_server_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/ssl_cert.py (77%) create mode 100644 test_results/test_results/models/test_direction.py create mode 100644 test_results/test_results/models/test_interval.py create mode 100644 test_results/test_results/models/test_result.py rename {test_results_api/test_results_api => test_results/test_results}/models/test_result_app_links.py (80%) create mode 100644 test_results/test_results/models/test_type.py create mode 100644 test_results/test_results/models/unauthorized_error.py create mode 100644 test_results/test_results/models/validation_error.py create mode 100644 test_results/test_results/models/validation_error_all_of_errors.py rename {test_results_api/test_results_api => test_results/test_results}/models/web_transaction_detail_test_result.py (78%) rename {test_results_api/test_results_api => test_results/test_results}/models/web_transaction_detail_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/web_transaction_page_detail_test_result.py (76%) rename {test_results_api/test_results_api => test_results/test_results}/models/web_transaction_page_detail_test_results.py (75%) rename {test_results_api/test_results_api => test_results/test_results}/models/web_transaction_test_result.py (79%) rename {test_results_api/test_results_api => test_results/test_results}/models/web_transaction_test_results.py (75%) rename {tests_api/tests_api => test_results/test_results}/py.typed (100%) create mode 100644 test_results/test_results/rest.py delete mode 100644 test_results_api/.github/workflows/python.yml delete mode 100644 test_results_api/.gitlab-ci.yml delete mode 100644 test_results_api/.openapi-generator/FILES delete mode 100644 test_results_api/.openapi-generator/VERSION delete mode 100644 test_results_api/.travis.yml delete mode 100644 test_results_api/README.md delete mode 100644 test_results_api/docs/Agent.md delete mode 100644 test_results_api/docs/AppLinks.md delete mode 100644 test_results_api/docs/AppLinksLinks.md delete mode 100644 test_results_api/docs/Error.md delete mode 100644 test_results_api/docs/Expand.md delete mode 100644 test_results_api/docs/GetTestResultHttpServer200Response.md delete mode 100644 test_results_api/docs/GetTestResultNetworkPathvis200Response.md delete mode 100644 test_results_api/docs/GetTestResultPageLoadComponentDetail200Response.md delete mode 100644 test_results_api/docs/GetTestResultWebTransactionsComponentDetail200Response.md delete mode 100644 test_results_api/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md delete mode 100644 test_results_api/docs/GetTestResultsBgp200Response.md delete mode 100644 test_results_api/docs/HttpTestResult.md delete mode 100644 test_results_api/docs/HttpTestResultHeaders.md delete mode 100644 test_results_api/docs/HttpTestResults.md delete mode 100644 test_results_api/docs/Link.md delete mode 100644 test_results_api/docs/Monitor.md delete mode 100644 test_results_api/docs/NetworkTestMetricsApi.md delete mode 100644 test_results_api/docs/NetworkTestResult.md delete mode 100644 test_results_api/docs/NetworkTestResults.md delete mode 100644 test_results_api/docs/PaginationLinks.md delete mode 100644 test_results_api/docs/PaginationLinksLinks.md delete mode 100644 test_results_api/docs/PathVisBaseTestResult.md delete mode 100644 test_results_api/docs/PathVisDetailTestResult.md delete mode 100644 test_results_api/docs/PathVisDetailTestResults.md delete mode 100644 test_results_api/docs/PathVisEndpoint.md delete mode 100644 test_results_api/docs/PathVisHop.md delete mode 100644 test_results_api/docs/PathVisRoute.md delete mode 100644 test_results_api/docs/PathVisTestResult.md delete mode 100644 test_results_api/docs/PathVisTestResults.md delete mode 100644 test_results_api/docs/QueryWindow.md delete mode 100644 test_results_api/docs/SelfLinks.md delete mode 100644 test_results_api/docs/SelfLinksLinks.md delete mode 100644 test_results_api/docs/SimpleTest.md delete mode 100644 test_results_api/docs/SslCert.md delete mode 100644 test_results_api/docs/TestDirection.md delete mode 100644 test_results_api/docs/TestInterval.md delete mode 100644 test_results_api/docs/TestResult.md delete mode 100644 test_results_api/docs/TestType.md delete mode 100644 test_results_api/docs/UnauthorizedError.md delete mode 100644 test_results_api/docs/UnexpandedInstantTest.md delete mode 100644 test_results_api/docs/UnexpandedInstantTestLinks.md delete mode 100644 test_results_api/docs/UnexpandedInstantTestLinksSelf.md delete mode 100644 test_results_api/docs/UnexpandedInstantTestLinksTestResults.md delete mode 100644 test_results_api/docs/UnexpandedTest.md delete mode 100644 test_results_api/git_push.sh delete mode 100644 test_results_api/pyproject.toml delete mode 100644 test_results_api/setup.py delete mode 100644 test_results_api/test-requirements.txt delete mode 100644 test_results_api/test/test_agent.py delete mode 100644 test_results_api/test/test_app_links.py delete mode 100644 test_results_api/test/test_app_links_links.py delete mode 100644 test_results_api/test/test_dns_server_test_metrics_api.py delete mode 100644 test_results_api/test/test_dns_trace_test_metrics_api.py delete mode 100644 test_results_api/test/test_dnssec_test_metrics_api.py delete mode 100644 test_results_api/test/test_error.py delete mode 100644 test_results_api/test/test_expand.py delete mode 100644 test_results_api/test/test_get_test_result_dns_server200_response.py delete mode 100644 test_results_api/test/test_get_test_result_dns_trace200_response.py delete mode 100644 test_results_api/test/test_get_test_result_dnssec200_response.py delete mode 100644 test_results_api/test/test_get_test_result_ftp_server200_response.py delete mode 100644 test_results_api/test/test_get_test_result_http_server200_response.py delete mode 100644 test_results_api/test/test_get_test_result_metrics200_response.py delete mode 100644 test_results_api/test/test_get_test_result_network_pathvis200_response.py delete mode 100644 test_results_api/test/test_get_test_result_page_load200_response.py delete mode 100644 test_results_api/test/test_get_test_result_page_load_component_detail200_response.py delete mode 100644 test_results_api/test/test_get_test_result_rtp_stream200_response.py delete mode 100644 test_results_api/test/test_get_test_result_sip_server200_response.py delete mode 100644 test_results_api/test/test_get_test_result_web_transactions200_response.py delete mode 100644 test_results_api/test/test_get_test_result_web_transactions_component_detail200_response.py delete mode 100644 test_results_api/test/test_get_test_result_web_transactions_component_page_detail200_response.py delete mode 100644 test_results_api/test/test_get_test_results_bgp200_response.py delete mode 100644 test_results_api/test/test_http_test_result.py delete mode 100644 test_results_api/test/test_http_test_result_headers.py delete mode 100644 test_results_api/test/test_http_test_results.py delete mode 100644 test_results_api/test/test_link.py delete mode 100644 test_results_api/test/test_monitor.py delete mode 100644 test_results_api/test/test_network_bgp_test_metrics_api.py delete mode 100644 test_results_api/test/test_network_test_metrics_api.py delete mode 100644 test_results_api/test/test_network_test_result.py delete mode 100644 test_results_api/test/test_network_test_results.py delete mode 100644 test_results_api/test/test_pagination_links.py delete mode 100644 test_results_api/test/test_pagination_links_links.py delete mode 100644 test_results_api/test/test_path_vis_base_test_result.py delete mode 100644 test_results_api/test/test_path_vis_detail_test_result.py delete mode 100644 test_results_api/test/test_path_vis_detail_test_results.py delete mode 100644 test_results_api/test/test_path_vis_endpoint.py delete mode 100644 test_results_api/test/test_path_vis_hop.py delete mode 100644 test_results_api/test/test_path_vis_route.py delete mode 100644 test_results_api/test/test_path_vis_test_result.py delete mode 100644 test_results_api/test/test_path_vis_test_results.py delete mode 100644 test_results_api/test/test_query_window.py delete mode 100644 test_results_api/test/test_self_links.py delete mode 100644 test_results_api/test/test_self_links_links.py delete mode 100644 test_results_api/test/test_simple_test.py delete mode 100644 test_results_api/test/test_test_direction.py delete mode 100644 test_results_api/test/test_test_interval.py delete mode 100644 test_results_api/test/test_test_result.py delete mode 100644 test_results_api/test/test_test_type.py delete mode 100644 test_results_api/test/test_unauthorized_error.py delete mode 100644 test_results_api/test/test_unexpanded_instant_test.py delete mode 100644 test_results_api/test/test_unexpanded_instant_test_links.py delete mode 100644 test_results_api/test/test_unexpanded_instant_test_links_self.py delete mode 100644 test_results_api/test/test_unexpanded_instant_test_links_test_results.py delete mode 100644 test_results_api/test/test_unexpanded_test.py delete mode 100644 test_results_api/test/test_voice_rtp_server_test_metrics_api.py delete mode 100644 test_results_api/test/test_voice_sip_server_test_metrics_api.py delete mode 100644 test_results_api/test/test_web_ftp_server_test_metrics_api.py delete mode 100644 test_results_api/test/test_web_http_server_test_metrics_api.py delete mode 100644 test_results_api/test/test_web_page_load_test_metrics_api.py delete mode 100644 test_results_api/test/test_web_transactions_test_metrics_api.py delete mode 100644 test_results_api/test_results_api/__init__.py delete mode 100644 test_results_api/test_results_api/api/__init__.py delete mode 100644 test_results_api/test_results_api/api_client.py delete mode 100644 test_results_api/test_results_api/api_response.py delete mode 100644 test_results_api/test_results_api/configuration.py delete mode 100644 test_results_api/test_results_api/exceptions.py delete mode 100644 test_results_api/test_results_api/models/__init__.py delete mode 100644 test_results_api/test_results_api/models/agent.py delete mode 100644 test_results_api/test_results_api/models/app_links.py delete mode 100644 test_results_api/test_results_api/models/app_links_links.py delete mode 100644 test_results_api/test_results_api/models/bgp_test_result.py delete mode 100644 test_results_api/test_results_api/models/error.py delete mode 100644 test_results_api/test_results_api/models/expand.py delete mode 100644 test_results_api/test_results_api/models/get_test_pathvis_agent_round200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_result_http_server200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_result_page_load_component_detail200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_result_web_transactions_component_detail200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_result_web_transactions_component_page_detail200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_results_bgp200_response.py delete mode 100644 test_results_api/test_results_api/models/get_test_results_bgp_prefix200_response.py delete mode 100644 test_results_api/test_results_api/models/http_test_result.py delete mode 100644 test_results_api/test_results_api/models/http_test_result_headers.py delete mode 100644 test_results_api/test_results_api/models/http_test_results.py delete mode 100644 test_results_api/test_results_api/models/link.py delete mode 100644 test_results_api/test_results_api/models/monitor.py delete mode 100644 test_results_api/test_results_api/models/network_test_result.py delete mode 100644 test_results_api/test_results_api/models/network_test_results.py delete mode 100644 test_results_api/test_results_api/models/pagination_links.py delete mode 100644 test_results_api/test_results_api/models/pagination_links_links.py delete mode 100644 test_results_api/test_results_api/models/path_vis_base_test_result.py delete mode 100644 test_results_api/test_results_api/models/path_vis_detail_test_result.py delete mode 100644 test_results_api/test_results_api/models/path_vis_detail_test_results.py delete mode 100644 test_results_api/test_results_api/models/path_vis_endpoint.py delete mode 100644 test_results_api/test_results_api/models/path_vis_hop.py delete mode 100644 test_results_api/test_results_api/models/path_vis_route.py delete mode 100644 test_results_api/test_results_api/models/path_vis_test_result.py delete mode 100644 test_results_api/test_results_api/models/path_vis_test_results.py delete mode 100644 test_results_api/test_results_api/models/query_window.py delete mode 100644 test_results_api/test_results_api/models/rtp_stream_test_result.py delete mode 100644 test_results_api/test_results_api/models/self_links.py delete mode 100644 test_results_api/test_results_api/models/self_links_links.py delete mode 100644 test_results_api/test_results_api/models/simple_test.py delete mode 100644 test_results_api/test_results_api/models/sip_server_test_result.py delete mode 100644 test_results_api/test_results_api/models/test_direction.py delete mode 100644 test_results_api/test_results_api/models/test_interval.py delete mode 100644 test_results_api/test_results_api/models/test_result.py delete mode 100644 test_results_api/test_results_api/models/test_type.py delete mode 100644 test_results_api/test_results_api/models/unauthorized_error.py delete mode 100644 test_results_api/test_results_api/models/unexpanded_instant_test.py delete mode 100644 test_results_api/test_results_api/models/unexpanded_instant_test_links.py delete mode 100644 test_results_api/test_results_api/models/unexpanded_instant_test_links_self.py delete mode 100644 test_results_api/test_results_api/models/unexpanded_instant_test_links_test_results.py delete mode 100644 test_results_api/test_results_api/models/unexpanded_test.py delete mode 100644 test_results_api/test_results_api/rest.py delete mode 100644 test_results_api/tox.ini delete mode 100644 test_templates_api/.github/workflows/python.yml delete mode 100644 test_templates_api/.gitlab-ci.yml delete mode 100644 test_templates_api/.openapi-generator/FILES delete mode 100644 test_templates_api/.openapi-generator/VERSION delete mode 100644 test_templates_api/.travis.yml delete mode 100644 test_templates_api/README.md delete mode 100644 test_templates_api/docs/ApiError.md delete mode 100644 test_templates_api/docs/BadRequestError.md delete mode 100644 test_templates_api/docs/DeployTestTemplate.md delete mode 100644 test_templates_api/docs/DeployTestTemplateTests.md delete mode 100644 test_templates_api/docs/DeployTestTemplateUserInputValues.md delete mode 100644 test_templates_api/docs/DeploymentStrategy.md delete mode 100644 test_templates_api/docs/Link.md delete mode 100644 test_templates_api/docs/NotFoundError.md delete mode 100644 test_templates_api/docs/TestTemplate.md delete mode 100644 test_templates_api/docs/TestTemplateCollection.md delete mode 100644 test_templates_api/docs/TestTemplateCollectionLinks.md delete mode 100644 test_templates_api/docs/TestTemplateCollectionLinksSelf.md delete mode 100644 test_templates_api/docs/TestTemplateEndpointsApi.md delete mode 100644 test_templates_api/docs/TestTemplateUpsert.md delete mode 100644 test_templates_api/docs/UnauthorizedError.md delete mode 100644 test_templates_api/docs/UserInput.md delete mode 100644 test_templates_api/docs/UserInputDefaultValue.md delete mode 100644 test_templates_api/docs/UserInputType.md delete mode 100644 test_templates_api/git_push.sh delete mode 100644 test_templates_api/pyproject.toml delete mode 100644 test_templates_api/setup.py delete mode 100644 test_templates_api/test-requirements.txt delete mode 100644 test_templates_api/test/test_api_error.py delete mode 100644 test_templates_api/test/test_bad_request_error.py delete mode 100644 test_templates_api/test/test_deploy_test_template.py delete mode 100644 test_templates_api/test/test_deploy_test_template_tests.py delete mode 100644 test_templates_api/test/test_deploy_test_template_user_input_values.py delete mode 100644 test_templates_api/test/test_deployment_strategy.py delete mode 100644 test_templates_api/test/test_link.py delete mode 100644 test_templates_api/test/test_not_found_error.py delete mode 100644 test_templates_api/test/test_test_template.py delete mode 100644 test_templates_api/test/test_test_template_collection.py delete mode 100644 test_templates_api/test/test_test_template_collection_links.py delete mode 100644 test_templates_api/test/test_test_template_collection_links_self.py delete mode 100644 test_templates_api/test/test_test_template_endpoints_api.py delete mode 100644 test_templates_api/test/test_test_template_upsert.py delete mode 100644 test_templates_api/test/test_unauthorized_error.py delete mode 100644 test_templates_api/test/test_user_input.py delete mode 100644 test_templates_api/test/test_user_input_default_value.py delete mode 100644 test_templates_api/test/test_user_input_type.py delete mode 100644 test_templates_api/test_templates_api/__init__.py delete mode 100644 test_templates_api/test_templates_api/api/__init__.py delete mode 100644 test_templates_api/test_templates_api/api/test_template_endpoints_api.py delete mode 100644 test_templates_api/test_templates_api/api_client.py delete mode 100644 test_templates_api/test_templates_api/api_response.py delete mode 100644 test_templates_api/test_templates_api/configuration.py delete mode 100644 test_templates_api/test_templates_api/exceptions.py delete mode 100644 test_templates_api/test_templates_api/models/__init__.py delete mode 100644 test_templates_api/test_templates_api/models/api_error.py delete mode 100644 test_templates_api/test_templates_api/models/bad_request_error.py delete mode 100644 test_templates_api/test_templates_api/models/deploy_test_template.py delete mode 100644 test_templates_api/test_templates_api/models/deploy_test_template_tests.py delete mode 100644 test_templates_api/test_templates_api/models/deploy_test_template_user_input_values.py delete mode 100644 test_templates_api/test_templates_api/models/deployment_strategy.py delete mode 100644 test_templates_api/test_templates_api/models/link.py delete mode 100644 test_templates_api/test_templates_api/models/not_found_error.py delete mode 100644 test_templates_api/test_templates_api/models/test_template.py delete mode 100644 test_templates_api/test_templates_api/models/test_template_collection.py delete mode 100644 test_templates_api/test_templates_api/models/test_template_collection_links.py delete mode 100644 test_templates_api/test_templates_api/models/test_template_collection_links_self.py delete mode 100644 test_templates_api/test_templates_api/models/test_template_upsert.py delete mode 100644 test_templates_api/test_templates_api/models/unauthorized_error.py delete mode 100644 test_templates_api/test_templates_api/models/user_input.py delete mode 100644 test_templates_api/test_templates_api/models/user_input_default_value.py delete mode 100644 test_templates_api/test_templates_api/models/user_input_type.py delete mode 100644 test_templates_api/test_templates_api/rest.py delete mode 100644 test_templates_api/tox.ini rename {usage_api => tests}/.gitignore (100%) rename {usage_api => tests}/.openapi-generator-ignore (100%) create mode 100644 tests/.openapi-generator/FILES create mode 100644 tests/.openapi-generator/VERSION create mode 100644 tests/README.md create mode 100644 tests/docs/Agent.md create mode 100644 tests/docs/AgentBase.md create mode 100644 tests/docs/AgentToAgentApi.md create mode 100644 tests/docs/AgentToAgentInstantTest.md create mode 100644 tests/docs/AgentToAgentProperties.md rename {tests_api => tests}/docs/AgentToAgentTest.md (90%) create mode 100644 tests/docs/AgentToAgentTestProtocol.md create mode 100644 tests/docs/AgentToAgentTests.md create mode 100644 tests/docs/AgentToServerApi.md create mode 100644 tests/docs/AgentToServerInstantTest.md create mode 100644 tests/docs/AgentToServerProperties.md rename {tests_api => tests}/docs/AgentToServerTest.md (92%) create mode 100644 tests/docs/AgentToServerTests.md create mode 100644 tests/docs/AlertDirection.md create mode 100644 tests/docs/AlertRoundsViolationMode.md create mode 100644 tests/docs/AlertRule.md create mode 100644 tests/docs/AlertType.md rename {tests_api => tests}/docs/AllTestTypesApi.md (87%) rename {tests_api => tests}/docs/BGPApi.md (80%) create mode 100644 tests/docs/BaseBgpTest.md rename {tests_api => tests}/docs/BaseRequest.md (89%) create mode 100644 tests/docs/BaseTest.md rename {tests_api => tests}/docs/BgpTest.md (88%) rename {tests_api => tests}/docs/BgpTests.md (75%) create mode 100644 tests/docs/CloudEnterpriseAgentType.md rename {tests_api => tests}/docs/DNSSECApi.md (80%) create mode 100644 tests/docs/DNSServerApi.md create mode 100644 tests/docs/DNSTraceApi.md create mode 100644 tests/docs/DnsQueryClass.md create mode 100644 tests/docs/DnsSecInstantTest.md create mode 100644 tests/docs/DnsSecProperties.md rename {tests_api => tests}/docs/DnsSecTest.md (93%) create mode 100644 tests/docs/DnsSecTests.md create mode 100644 tests/docs/DnsServerInstantTest.md create mode 100644 tests/docs/DnsServerProperties.md rename {tests_api => tests}/docs/DnsServerTest.md (91%) create mode 100644 tests/docs/DnsServerTests.md create mode 100644 tests/docs/DnsServersRequest.md create mode 100644 tests/docs/DnsTraceInstantTest.md create mode 100644 tests/docs/DnsTraceProperties.md rename {tests_api => tests}/docs/DnsTraceTest.md (93%) create mode 100644 tests/docs/DnsTraceTests.md create mode 100644 tests/docs/Error.md create mode 100644 tests/docs/Expand.md create mode 100644 tests/docs/FTPServerApi.md create mode 100644 tests/docs/FtpServerInstantTest.md create mode 100644 tests/docs/FtpServerProperties.md create mode 100644 tests/docs/FtpServerRequestType.md rename {tests_api => tests}/docs/FtpServerTest.md (92%) create mode 100644 tests/docs/FtpServerTests.md create mode 100644 tests/docs/GetAgentToAgentTests200Response.md create mode 100644 tests/docs/GetAgentToServerTests200Response.md create mode 100644 tests/docs/GetBgpTests200Response.md create mode 100644 tests/docs/GetDNSServerTests200Response.md create mode 100644 tests/docs/GetDnsSecTests200Response.md create mode 100644 tests/docs/GetDnsTraceTests200Response.md create mode 100644 tests/docs/GetFtpServerTests200Response.md create mode 100644 tests/docs/GetHttpServerTests200Response.md create mode 100644 tests/docs/GetPageLoadTests200Response.md rename {tests_api => tests}/docs/GetPathVisInterfaceGroups200Response.md (76%) create mode 100644 tests/docs/GetSipServerTests200Response.md rename {tests_api => tests}/docs/GetTests200Response.md (80%) create mode 100644 tests/docs/GetVoiceTests200Response.md create mode 100644 tests/docs/GetWebTransactionsTests200Response.md create mode 100644 tests/docs/HTTPServerApi.md create mode 100644 tests/docs/HttpServerInstantTest.md create mode 100644 tests/docs/HttpServerProperties.md rename {tests_api => tests}/docs/HttpServerTest.md (91%) create mode 100644 tests/docs/HttpServerTests.md create mode 100644 tests/docs/InstantTest.md rename {tests_api => tests}/docs/InterfaceGroup.md (86%) rename {tests_api => tests}/docs/InterfaceGroups.md (81%) create mode 100644 tests/docs/Link.md create mode 100644 tests/docs/Monitor.md create mode 100644 tests/docs/MonitorType.md rename {tests_api => tests}/docs/MonitorsRequest.md (82%) rename {tests_api => tests}/docs/PageLoadApi.md (81%) create mode 100644 tests/docs/PageLoadInstantTest.md create mode 100644 tests/docs/PageLoadProperties.md rename {tests_api => tests}/docs/PageLoadTest.md (89%) create mode 100644 tests/docs/PageLoadTests.md rename {tests_api => tests}/docs/PathVisualizationInterfaceGroupsApi.md (85%) create mode 100644 tests/docs/SIPServerApi.md create mode 100644 tests/docs/SelfLinks.md create mode 100644 tests/docs/SelfLinksLinks.md create mode 100644 tests/docs/Severity.md create mode 100644 tests/docs/SimpleAgent.md create mode 100644 tests/docs/SimpleTest.md create mode 100644 tests/docs/SipServerInstantTest.md create mode 100644 tests/docs/SipServerInstantTestRequest.md create mode 100644 tests/docs/SipServerInstantTestResponse.md create mode 100644 tests/docs/SipServerProperties.md rename {tests_api => tests}/docs/SipServerTest.md (85%) create mode 100644 tests/docs/SipServerTests.md create mode 100644 tests/docs/SipTestProtocol.md create mode 100644 tests/docs/TestAuthType.md create mode 100644 tests/docs/TestCustomHeaders.md create mode 100644 tests/docs/TestDirection.md create mode 100644 tests/docs/TestDnsServer.md create mode 100644 tests/docs/TestDnsTransportProtocol.md create mode 100644 tests/docs/TestDscpId.md rename {tests_api => tests}/docs/TestHttpInterval.md (99%) create mode 100644 tests/docs/TestInterval.md create mode 100644 tests/docs/TestIpv6Policy.md create mode 100644 tests/docs/TestLabelsInner.md create mode 100644 tests/docs/TestMonitorsProperties.md create mode 100644 tests/docs/TestPageLoadingStrategy.md create mode 100644 tests/docs/TestPathTraceMode.md create mode 100644 tests/docs/TestProbeMode.md create mode 100644 tests/docs/TestProtocol.md rename {tests_api => tests}/docs/TestRequest.md (91%) rename {tests_api => tests}/docs/TestRequestAllOfAgents.md (82%) create mode 100644 tests/docs/TestSharedAccountsInner.md create mode 100644 tests/docs/TestSipCredentials.md create mode 100644 tests/docs/TestSslVersionId.md rename {tests_api => tests}/docs/TestSubInterval.md (99%) create mode 100644 tests/docs/TestType.md rename {tests_api => tests}/docs/Tests.md (86%) create mode 100644 tests/docs/UnauthorizedError.md create mode 100644 tests/docs/UnexpandedAgentToAgentTest.md create mode 100644 tests/docs/UnexpandedAgentToServerTest.md create mode 100644 tests/docs/UnexpandedBgpTest.md create mode 100644 tests/docs/UnexpandedDnsSecTest.md create mode 100644 tests/docs/UnexpandedDnsServerTest.md create mode 100644 tests/docs/UnexpandedDnsTraceTest.md create mode 100644 tests/docs/UnexpandedFtpServerTest.md create mode 100644 tests/docs/UnexpandedHttpServerTest.md create mode 100644 tests/docs/UnexpandedInstantTest.md create mode 100644 tests/docs/UnexpandedInstantTestLinks.md create mode 100644 tests/docs/UnexpandedInstantTestLinksSelf.md create mode 100644 tests/docs/UnexpandedPageLoadTest.md create mode 100644 tests/docs/UnexpandedSipServerTest.md create mode 100644 tests/docs/UnexpandedTest.md create mode 100644 tests/docs/UnexpandedVoiceTest.md create mode 100644 tests/docs/UnexpandedWebTransactionTest.md rename {tests_api => tests}/docs/UpdateAgentToAgentTest.md (90%) rename {tests_api => tests}/docs/UpdateAgentToServerTest.md (91%) rename {tests_api => tests}/docs/UpdateBgpTest.md (89%) create mode 100644 tests/docs/UpdateBgpTestRequest.md rename {tests_api => tests}/docs/UpdateDnsSecTest.md (92%) rename {tests_api => tests}/docs/UpdateDnsServerTest.md (89%) rename {tests_api => tests}/docs/UpdateDnsTraceTest.md (92%) rename {tests_api => tests}/docs/UpdateFtpServerTest.md (91%) rename {tests_api => tests}/docs/UpdateHttpServerTest.md (90%) rename {tests_api => tests}/docs/UpdatePageLoadTest.md (89%) rename {tests_api => tests}/docs/UpdateSipServerTest.md (83%) create mode 100644 tests/docs/UpdateSipServerTest1.md rename {tests_api => tests}/docs/UpdateVoiceTest.md (87%) rename {tests_api => tests}/docs/UpdateWebTransactionTest.md (90%) create mode 100644 tests/docs/ValidationError.md create mode 100644 tests/docs/ValidationErrorAllOfErrors.md create mode 100644 tests/docs/VoiceApi.md create mode 100644 tests/docs/VoiceInstantTest.md create mode 100644 tests/docs/VoiceProperties.md rename {tests_api => tests}/docs/VoiceTest.md (87%) create mode 100644 tests/docs/VoiceTests.md create mode 100644 tests/docs/WebTransactionApi.md create mode 100644 tests/docs/WebTransactionInstantTest.md create mode 100644 tests/docs/WebTransactionProperties.md rename {tests_api => tests}/docs/WebTransactionTest.md (90%) create mode 100644 tests/docs/WebTransactionTests.md create mode 100644 tests/pyproject.toml rename {usage_api => tests}/requirements.txt (100%) rename {usage_api => tests}/setup.cfg (100%) create mode 100644 tests/setup.py create mode 100644 tests/test-requirements.txt rename {usage_api => tests}/test/__init__.py (100%) create mode 100644 tests/test/test_agent.py create mode 100644 tests/test/test_agent_base.py create mode 100644 tests/test/test_agent_to_agent_instant_test.py create mode 100644 tests/test/test_agent_to_agent_properties.py rename {tests_api => tests}/test/test_agent_to_agent_test.py (80%) create mode 100644 tests/test/test_agent_to_agent_test_protocol.py rename {tests_api => tests}/test/test_agent_to_agent_tests.py (82%) create mode 100644 tests/test/test_agent_to_server_instant_test.py create mode 100644 tests/test/test_agent_to_server_properties.py rename {tests_api => tests}/test/test_agent_to_server_test.py (80%) rename {tests_api => tests}/test/test_agent_to_server_tests.py (82%) create mode 100644 tests/test/test_alert_direction.py create mode 100644 tests/test/test_alert_rounds_violation_mode.py create mode 100644 tests/test/test_alert_rule.py create mode 100644 tests/test/test_alert_type.py create mode 100644 tests/test/test_base_bgp_test.py rename {tests_api => tests}/test/test_base_request.py (80%) create mode 100644 tests/test/test_base_test.py rename {tests_api => tests}/test/test_bgp_test.py (78%) rename {tests_api => tests}/test/test_bgp_tests.py (83%) create mode 100644 tests/test/test_cloud_enterprise_agent_type.py create mode 100644 tests/test/test_dns_query_class.py create mode 100644 tests/test/test_dns_sec_instant_test.py create mode 100644 tests/test/test_dns_sec_properties.py rename {tests_api => tests}/test/test_dns_sec_test.py (76%) rename {tests_api => tests}/test/test_dns_sec_tests.py (82%) create mode 100644 tests/test/test_dns_server_instant_test.py create mode 100644 tests/test/test_dns_server_properties.py rename {tests_api => tests}/test/test_dns_server_test.py (79%) rename {tests_api => tests}/test/test_dns_server_tests.py (82%) create mode 100644 tests/test/test_dns_servers_request.py create mode 100644 tests/test/test_dns_trace_instant_test.py create mode 100644 tests/test/test_dns_trace_properties.py rename {tests_api => tests}/test/test_dns_trace_test.py (76%) rename {tests_api => tests}/test/test_dns_trace_tests.py (82%) create mode 100644 tests/test/test_error.py create mode 100644 tests/test/test_expand.py create mode 100644 tests/test/test_ftp_server_instant_test.py create mode 100644 tests/test/test_ftp_server_properties.py create mode 100644 tests/test/test_ftp_server_request_type.py rename {tests_api => tests}/test/test_ftp_server_test.py (81%) rename {tests_api => tests}/test/test_ftp_server_tests.py (82%) rename {tests_api => tests}/test/test_get_agent_to_agent_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_agent_to_server_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_bgp_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_dns_sec_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_dns_server_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_dns_trace_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_ftp_server_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_http_server_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_page_load_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_path_vis_interface_groups200_response.py (79%) rename {tests_api => tests}/test/test_get_sip_server_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_tests200_response.py (79%) rename {tests_api => tests}/test/test_get_voice_tests200_response.py (80%) rename {tests_api => tests}/test/test_get_web_transactions_tests200_response.py (80%) create mode 100644 tests/test/test_http_server_instant_test.py create mode 100644 tests/test/test_http_server_properties.py rename {tests_api => tests}/test/test_http_server_test.py (83%) rename {tests_api => tests}/test/test_http_server_tests.py (82%) create mode 100644 tests/test/test_instant_test.py rename {tests_api => tests}/test/test_interface_group.py (83%) rename {tests_api => tests}/test/test_interface_groups.py (80%) create mode 100644 tests/test/test_link.py create mode 100644 tests/test/test_monitor.py create mode 100644 tests/test/test_monitor_type.py rename {tests_api => tests}/test/test_monitors_request.py (82%) create mode 100644 tests/test/test_page_load_instant_test.py create mode 100644 tests/test/test_page_load_properties.py rename {tests_api => tests}/test/test_page_load_test.py (83%) rename {tests_api => tests}/test/test_page_load_tests.py (82%) create mode 100644 tests/test/test_self_links.py create mode 100644 tests/test/test_self_links_links.py create mode 100644 tests/test/test_severity.py create mode 100644 tests/test/test_simple_agent.py create mode 100644 tests/test/test_simple_test.py create mode 100644 tests/test/test_sip_server_instant_test.py create mode 100644 tests/test/test_sip_server_instant_test_request.py create mode 100644 tests/test/test_sip_server_instant_test_response.py create mode 100644 tests/test/test_sip_server_properties.py create mode 100644 tests/test/test_sip_server_test.py rename {tests_api => tests}/test/test_sip_server_tests.py (82%) create mode 100644 tests/test/test_sip_test_protocol.py create mode 100644 tests/test/test_test_auth_type.py create mode 100644 tests/test/test_test_custom_headers.py create mode 100644 tests/test/test_test_direction.py create mode 100644 tests/test/test_test_dns_server.py create mode 100644 tests/test/test_test_dns_transport_protocol.py create mode 100644 tests/test/test_test_dscp_id.py create mode 100644 tests/test/test_test_http_interval.py create mode 100644 tests/test/test_test_interval.py create mode 100644 tests/test/test_test_ipv6_policy.py create mode 100644 tests/test/test_test_labels_inner.py create mode 100644 tests/test/test_test_monitors_properties.py create mode 100644 tests/test/test_test_page_loading_strategy.py create mode 100644 tests/test/test_test_path_trace_mode.py create mode 100644 tests/test/test_test_probe_mode.py create mode 100644 tests/test/test_test_protocol.py rename {tests_api => tests}/test/test_test_request.py (81%) rename {tests_api => tests}/test/test_test_request_all_of_agents.py (82%) create mode 100644 tests/test/test_test_shared_accounts_inner.py create mode 100644 tests/test/test_test_sip_credentials.py create mode 100644 tests/test/test_test_ssl_version_id.py create mode 100644 tests/test/test_test_sub_interval.py create mode 100644 tests/test/test_test_type.py rename {tests_api => tests}/test/test_tests.py (81%) create mode 100644 tests/test/test_unauthorized_error.py create mode 100644 tests/test/test_unexpanded_agent_to_agent_test.py create mode 100644 tests/test/test_unexpanded_agent_to_server_test.py create mode 100644 tests/test/test_unexpanded_bgp_test.py create mode 100644 tests/test/test_unexpanded_dns_sec_test.py create mode 100644 tests/test/test_unexpanded_dns_server_test.py create mode 100644 tests/test/test_unexpanded_dns_trace_test.py create mode 100644 tests/test/test_unexpanded_ftp_server_test.py create mode 100644 tests/test/test_unexpanded_http_server_test.py create mode 100644 tests/test/test_unexpanded_instant_test.py create mode 100644 tests/test/test_unexpanded_instant_test_links.py create mode 100644 tests/test/test_unexpanded_instant_test_links_self.py create mode 100644 tests/test/test_unexpanded_page_load_test.py create mode 100644 tests/test/test_unexpanded_sip_server_test.py create mode 100644 tests/test/test_unexpanded_test.py create mode 100644 tests/test/test_unexpanded_voice_test.py create mode 100644 tests/test/test_unexpanded_web_transaction_test.py rename {tests_api => tests}/test/test_update_agent_to_agent_test.py (81%) rename {tests_api => tests}/test/test_update_agent_to_server_test.py (81%) rename {tests_api => tests}/test/test_update_bgp_test.py (76%) create mode 100644 tests/test/test_update_bgp_test_request.py rename {tests_api => tests}/test/test_update_dns_sec_test.py (76%) create mode 100644 tests/test/test_update_dns_server_test.py rename {tests_api => tests}/test/test_update_dns_trace_test.py (77%) rename {tests_api => tests}/test/test_update_ftp_server_test.py (82%) rename {tests_api => tests}/test/test_update_http_server_test.py (84%) rename {tests_api => tests}/test/test_update_page_load_test.py (85%) create mode 100644 tests/test/test_update_sip_server_test.py create mode 100644 tests/test/test_update_sip_server_test1.py create mode 100644 tests/test/test_update_voice_test.py rename {tests_api => tests}/test/test_update_web_transaction_test.py (85%) create mode 100644 tests/test/test_validation_error.py create mode 100644 tests/test/test_validation_error_all_of_errors.py create mode 100644 tests/test/test_voice_instant_test.py create mode 100644 tests/test/test_voice_properties.py create mode 100644 tests/test/test_voice_test.py rename {tests_api => tests}/test/test_voice_tests.py (83%) create mode 100644 tests/test/test_web_transaction_instant_test.py create mode 100644 tests/test/test_web_transaction_properties.py rename {tests_api => tests}/test/test_web_transaction_test.py (84%) rename {tests_api => tests}/test/test_web_transaction_tests.py (83%) create mode 100644 tests/tests/__init__.py create mode 100644 tests/tests/api/__init__.py create mode 100644 tests/tests/api/agent_to_agent_api.py create mode 100644 tests/tests/api/agent_to_server_api.py rename {tests_api/tests_api => tests/tests}/api/all_test_types_api.py (94%) rename {tests_api/tests_api => tests/tests}/api/bgp_api.py (95%) create mode 100644 tests/tests/api/dns_server_api.py create mode 100644 tests/tests/api/dns_trace_api.py rename {tests_api/tests_api => tests/tests}/api/dnssec_api.py (96%) create mode 100644 tests/tests/api/ftp_server_api.py create mode 100644 tests/tests/api/http_server_api.py rename {tests_api/tests_api => tests/tests}/api/page_load_api.py (96%) rename {tests_api/tests_api => tests/tests}/api/path_visualization_interface_groups_api.py (96%) create mode 100644 tests/tests/api/sip_server_api.py create mode 100644 tests/tests/api/voice_api.py create mode 100644 tests/tests/api/web_transaction_api.py create mode 100644 tests/tests/api_client.py create mode 100644 tests/tests/api_response.py create mode 100644 tests/tests/configuration.py create mode 100644 tests/tests/exceptions.py create mode 100644 tests/tests/models/__init__.py create mode 100644 tests/tests/models/agent.py create mode 100644 tests/tests/models/agent_base.py create mode 100644 tests/tests/models/agent_to_agent_instant_test.py create mode 100644 tests/tests/models/agent_to_agent_properties.py rename {tests_api/tests_api => tests/tests}/models/agent_to_agent_test.py (77%) create mode 100644 tests/tests/models/agent_to_agent_test_protocol.py create mode 100644 tests/tests/models/agent_to_agent_tests.py create mode 100644 tests/tests/models/agent_to_server_instant_test.py create mode 100644 tests/tests/models/agent_to_server_properties.py rename {tests_api/tests_api => tests/tests}/models/agent_to_server_test.py (78%) create mode 100644 tests/tests/models/agent_to_server_tests.py create mode 100644 tests/tests/models/alert_direction.py create mode 100644 tests/tests/models/alert_rounds_violation_mode.py create mode 100644 tests/tests/models/alert_rule.py create mode 100644 tests/tests/models/alert_type.py create mode 100644 tests/tests/models/base_bgp_test.py rename {tests_api/tests_api => tests/tests}/models/base_request.py (80%) create mode 100644 tests/tests/models/base_test.py rename {tests_api/tests_api => tests/tests}/models/bgp_test.py (75%) create mode 100644 tests/tests/models/bgp_tests.py create mode 100644 tests/tests/models/cloud_enterprise_agent_type.py create mode 100644 tests/tests/models/dns_query_class.py create mode 100644 tests/tests/models/dns_sec_instant_test.py create mode 100644 tests/tests/models/dns_sec_properties.py rename {tests_api/tests_api => tests/tests}/models/dns_sec_test.py (77%) create mode 100644 tests/tests/models/dns_sec_tests.py create mode 100644 tests/tests/models/dns_server_instant_test.py create mode 100644 tests/tests/models/dns_server_properties.py rename {tests_api/tests_api => tests/tests}/models/dns_server_test.py (77%) create mode 100644 tests/tests/models/dns_server_tests.py create mode 100644 tests/tests/models/dns_servers_request.py create mode 100644 tests/tests/models/dns_trace_instant_test.py create mode 100644 tests/tests/models/dns_trace_properties.py rename {tests_api/tests_api => tests/tests}/models/dns_trace_test.py (77%) create mode 100644 tests/tests/models/dns_trace_tests.py create mode 100644 tests/tests/models/error.py create mode 100644 tests/tests/models/expand.py create mode 100644 tests/tests/models/ftp_server_instant_test.py create mode 100644 tests/tests/models/ftp_server_properties.py create mode 100644 tests/tests/models/ftp_server_request_type.py rename {tests_api/tests_api => tests/tests}/models/ftp_server_test.py (78%) create mode 100644 tests/tests/models/ftp_server_tests.py create mode 100644 tests/tests/models/get_agent_to_agent_tests200_response.py create mode 100644 tests/tests/models/get_agent_to_server_tests200_response.py create mode 100644 tests/tests/models/get_bgp_tests200_response.py create mode 100644 tests/tests/models/get_dns_sec_tests200_response.py create mode 100644 tests/tests/models/get_dns_server_tests200_response.py create mode 100644 tests/tests/models/get_dns_trace_tests200_response.py create mode 100644 tests/tests/models/get_ftp_server_tests200_response.py create mode 100644 tests/tests/models/get_http_server_tests200_response.py create mode 100644 tests/tests/models/get_page_load_tests200_response.py create mode 100644 tests/tests/models/get_path_vis_interface_groups200_response.py create mode 100644 tests/tests/models/get_sip_server_tests200_response.py create mode 100644 tests/tests/models/get_tests200_response.py create mode 100644 tests/tests/models/get_voice_tests200_response.py create mode 100644 tests/tests/models/get_web_transactions_tests200_response.py create mode 100644 tests/tests/models/http_server_instant_test.py create mode 100644 tests/tests/models/http_server_properties.py rename {tests_api/tests_api => tests/tests}/models/http_server_test.py (78%) create mode 100644 tests/tests/models/http_server_tests.py create mode 100644 tests/tests/models/instant_test.py rename {tests_api/tests_api => tests/tests}/models/interface_group.py (80%) create mode 100644 tests/tests/models/interface_groups.py create mode 100644 tests/tests/models/link.py create mode 100644 tests/tests/models/monitor.py create mode 100644 tests/tests/models/monitor_type.py rename {tests_api/tests_api => tests/tests}/models/monitors_request.py (75%) create mode 100644 tests/tests/models/page_load_instant_test.py create mode 100644 tests/tests/models/page_load_properties.py rename {tests_api/tests_api => tests/tests}/models/page_load_test.py (77%) create mode 100644 tests/tests/models/page_load_tests.py create mode 100644 tests/tests/models/self_links.py create mode 100644 tests/tests/models/self_links_links.py create mode 100644 tests/tests/models/severity.py create mode 100644 tests/tests/models/simple_agent.py create mode 100644 tests/tests/models/simple_test.py create mode 100644 tests/tests/models/sip_server_instant_test.py create mode 100644 tests/tests/models/sip_server_instant_test_request.py create mode 100644 tests/tests/models/sip_server_instant_test_response.py create mode 100644 tests/tests/models/sip_server_properties.py create mode 100644 tests/tests/models/sip_server_test.py create mode 100644 tests/tests/models/sip_server_tests.py create mode 100644 tests/tests/models/sip_test_protocol.py create mode 100644 tests/tests/models/test_auth_type.py create mode 100644 tests/tests/models/test_custom_headers.py create mode 100644 tests/tests/models/test_direction.py create mode 100644 tests/tests/models/test_dns_server.py create mode 100644 tests/tests/models/test_dns_transport_protocol.py create mode 100644 tests/tests/models/test_dscp_id.py create mode 100644 tests/tests/models/test_http_interval.py create mode 100644 tests/tests/models/test_interval.py create mode 100644 tests/tests/models/test_ipv6_policy.py create mode 100644 tests/tests/models/test_labels_inner.py create mode 100644 tests/tests/models/test_monitors_properties.py create mode 100644 tests/tests/models/test_page_loading_strategy.py create mode 100644 tests/tests/models/test_path_trace_mode.py create mode 100644 tests/tests/models/test_probe_mode.py create mode 100644 tests/tests/models/test_protocol.py rename {tests_api/tests_api => tests/tests}/models/test_request.py (80%) rename {tests_api/tests_api => tests/tests}/models/test_request_all_of_agents.py (78%) create mode 100644 tests/tests/models/test_shared_accounts_inner.py create mode 100644 tests/tests/models/test_sip_credentials.py create mode 100644 tests/tests/models/test_ssl_version_id.py create mode 100644 tests/tests/models/test_sub_interval.py create mode 100644 tests/tests/models/test_type.py create mode 100644 tests/tests/models/tests.py create mode 100644 tests/tests/models/unauthorized_error.py create mode 100644 tests/tests/models/unexpanded_agent_to_agent_test.py create mode 100644 tests/tests/models/unexpanded_agent_to_server_test.py create mode 100644 tests/tests/models/unexpanded_bgp_test.py create mode 100644 tests/tests/models/unexpanded_dns_sec_test.py create mode 100644 tests/tests/models/unexpanded_dns_server_test.py create mode 100644 tests/tests/models/unexpanded_dns_trace_test.py create mode 100644 tests/tests/models/unexpanded_ftp_server_test.py create mode 100644 tests/tests/models/unexpanded_http_server_test.py create mode 100644 tests/tests/models/unexpanded_instant_test.py create mode 100644 tests/tests/models/unexpanded_instant_test_links.py create mode 100644 tests/tests/models/unexpanded_instant_test_links_self.py create mode 100644 tests/tests/models/unexpanded_page_load_test.py create mode 100644 tests/tests/models/unexpanded_sip_server_test.py create mode 100644 tests/tests/models/unexpanded_test.py create mode 100644 tests/tests/models/unexpanded_voice_test.py create mode 100644 tests/tests/models/unexpanded_web_transaction_test.py rename {tests_api/tests_api => tests/tests}/models/update_agent_to_agent_test.py (79%) rename {tests_api/tests_api => tests/tests}/models/update_agent_to_server_test.py (80%) rename {tests_api/tests_api => tests/tests}/models/update_bgp_test.py (78%) create mode 100644 tests/tests/models/update_bgp_test_request.py rename {tests_api/tests_api => tests/tests}/models/update_dns_sec_test.py (80%) rename {tests_api/tests_api => tests/tests}/models/update_dns_server_test.py (77%) rename {tests_api/tests_api => tests/tests}/models/update_dns_trace_test.py (79%) rename {tests_api/tests_api => tests/tests}/models/update_ftp_server_test.py (80%) rename {tests_api/tests_api => tests/tests}/models/update_http_server_test.py (80%) rename {tests_api/tests_api => tests/tests}/models/update_page_load_test.py (78%) create mode 100644 tests/tests/models/update_sip_server_test.py create mode 100644 tests/tests/models/update_sip_server_test1.py create mode 100644 tests/tests/models/update_voice_test.py rename {tests_api/tests_api => tests/tests}/models/update_web_transaction_test.py (80%) create mode 100644 tests/tests/models/validation_error.py create mode 100644 tests/tests/models/validation_error_all_of_errors.py create mode 100644 tests/tests/models/voice_instant_test.py create mode 100644 tests/tests/models/voice_properties.py create mode 100644 tests/tests/models/voice_test.py create mode 100644 tests/tests/models/voice_tests.py create mode 100644 tests/tests/models/web_transaction_instant_test.py create mode 100644 tests/tests/models/web_transaction_properties.py rename {tests_api/tests_api => tests/tests}/models/web_transaction_test.py (78%) create mode 100644 tests/tests/models/web_transaction_tests.py rename {usage_api/usage_api => tests/tests}/py.typed (100%) create mode 100644 tests/tests/rest.py delete mode 100644 tests_api/.github/workflows/python.yml delete mode 100644 tests_api/.gitlab-ci.yml delete mode 100644 tests_api/.openapi-generator/FILES delete mode 100644 tests_api/.openapi-generator/VERSION delete mode 100644 tests_api/.travis.yml delete mode 100644 tests_api/README.md delete mode 100644 tests_api/docs/Agent.md delete mode 100644 tests_api/docs/AgentBase.md delete mode 100644 tests_api/docs/AgentToAgentApi.md delete mode 100644 tests_api/docs/AgentToAgentInstantTest.md delete mode 100644 tests_api/docs/AgentToAgentTestProtocol.md delete mode 100644 tests_api/docs/AgentToAgentTests.md delete mode 100644 tests_api/docs/AgentToServerApi.md delete mode 100644 tests_api/docs/AgentToServerInstantTest.md delete mode 100644 tests_api/docs/AgentToServerTests.md delete mode 100644 tests_api/docs/AlertRoundsViolationMode.md delete mode 100644 tests_api/docs/AlertRule.md delete mode 100644 tests_api/docs/AlertType.md delete mode 100644 tests_api/docs/BaseTest.md delete mode 100644 tests_api/docs/CloudEnterpriseAgentType.md delete mode 100644 tests_api/docs/DNSServerApi.md delete mode 100644 tests_api/docs/DNSTraceApi.md delete mode 100644 tests_api/docs/DnsQueryClass.md delete mode 100644 tests_api/docs/DnsSecInstantTest.md delete mode 100644 tests_api/docs/DnsSecTests.md delete mode 100644 tests_api/docs/DnsServerInstantTest.md delete mode 100644 tests_api/docs/DnsServerTests.md delete mode 100644 tests_api/docs/DnsTraceInstantTest.md delete mode 100644 tests_api/docs/DnsTraceTests.md delete mode 100644 tests_api/docs/Error.md delete mode 100644 tests_api/docs/Expand.md delete mode 100644 tests_api/docs/FTPServerApi.md delete mode 100644 tests_api/docs/FtpServerInstantTest.md delete mode 100644 tests_api/docs/FtpServerRequestType.md delete mode 100644 tests_api/docs/FtpServerTests.md delete mode 100644 tests_api/docs/GetAgentToAgentTest200Response.md delete mode 100644 tests_api/docs/GetAgentToAgentTests200Response.md delete mode 100644 tests_api/docs/GetAgentToServerTest200Response.md delete mode 100644 tests_api/docs/GetAgentToServerTests200Response.md delete mode 100644 tests_api/docs/GetBgpTest200Response.md delete mode 100644 tests_api/docs/GetBgpTests200Response.md delete mode 100644 tests_api/docs/GetDNSServerTest200Response.md delete mode 100644 tests_api/docs/GetDNSServerTests200Response.md delete mode 100644 tests_api/docs/GetDnsSecTest200Response.md delete mode 100644 tests_api/docs/GetDnsSecTests200Response.md delete mode 100644 tests_api/docs/GetDnsTraceTest200Response.md delete mode 100644 tests_api/docs/GetDnsTraceTests200Response.md delete mode 100644 tests_api/docs/GetFtpServerTest200Response.md delete mode 100644 tests_api/docs/GetFtpServerTests200Response.md delete mode 100644 tests_api/docs/GetHttpServerTest200Response.md delete mode 100644 tests_api/docs/GetHttpServerTests200Response.md delete mode 100644 tests_api/docs/GetPageLoadTest200Response.md delete mode 100644 tests_api/docs/GetPageLoadTests200Response.md delete mode 100644 tests_api/docs/GetSipServerTest200Response.md delete mode 100644 tests_api/docs/GetSipServerTests200Response.md delete mode 100644 tests_api/docs/GetVoiceTest200Response.md delete mode 100644 tests_api/docs/GetVoiceTests200Response.md delete mode 100644 tests_api/docs/GetWebTransactionsTest200Response.md delete mode 100644 tests_api/docs/GetWebTransactionsTests200Response.md delete mode 100644 tests_api/docs/HTTPServerApi.md delete mode 100644 tests_api/docs/HttpServerInstantTest.md delete mode 100644 tests_api/docs/HttpServerTests.md delete mode 100644 tests_api/docs/InstantTest.md delete mode 100644 tests_api/docs/Link.md delete mode 100644 tests_api/docs/MapItem.md delete mode 100644 tests_api/docs/Monitor.md delete mode 100644 tests_api/docs/MonitorType.md delete mode 100644 tests_api/docs/PageLoadInstantTest.md delete mode 100644 tests_api/docs/PageLoadTests.md delete mode 100644 tests_api/docs/SIPServerApi.md delete mode 100644 tests_api/docs/SelfLinks.md delete mode 100644 tests_api/docs/SelfLinksLinks.md delete mode 100644 tests_api/docs/SimpleTest.md delete mode 100644 tests_api/docs/SipServerInstantTest.md delete mode 100644 tests_api/docs/SipServerTests.md delete mode 100644 tests_api/docs/SipTestProtocol.md delete mode 100644 tests_api/docs/TestAuthType.md delete mode 100644 tests_api/docs/TestCustomHeaders.md delete mode 100644 tests_api/docs/TestCustomHeadersAll.md delete mode 100644 tests_api/docs/TestCustomHeadersRoot.md delete mode 100644 tests_api/docs/TestDirection.md delete mode 100644 tests_api/docs/TestDnsServer.md delete mode 100644 tests_api/docs/TestDnsTransportProtocol.md delete mode 100644 tests_api/docs/TestDscpId.md delete mode 100644 tests_api/docs/TestInterval.md delete mode 100644 tests_api/docs/TestIpv6Policy.md delete mode 100644 tests_api/docs/TestLabelsInner.md delete mode 100644 tests_api/docs/TestPageLoadingStrategy.md delete mode 100644 tests_api/docs/TestPathTraceMode.md delete mode 100644 tests_api/docs/TestProbeMode.md delete mode 100644 tests_api/docs/TestProtocol.md delete mode 100644 tests_api/docs/TestSharedAccountsInner.md delete mode 100644 tests_api/docs/TestSipCredentials.md delete mode 100644 tests_api/docs/TestSslVersionId.md delete mode 100644 tests_api/docs/TestType.md delete mode 100644 tests_api/docs/UnauthorizedError.md delete mode 100644 tests_api/docs/UnexpandedInstantTest.md delete mode 100644 tests_api/docs/UnexpandedInstantTestLinks.md delete mode 100644 tests_api/docs/UnexpandedInstantTestLinksSelf.md delete mode 100644 tests_api/docs/UnexpandedInstantTestLinksTestResults.md delete mode 100644 tests_api/docs/UnexpandedTest.md delete mode 100644 tests_api/docs/UpdatePathVisInterfaceGroup200Response.md delete mode 100644 tests_api/docs/VoiceApi.md delete mode 100644 tests_api/docs/VoiceInstantTest.md delete mode 100644 tests_api/docs/VoiceTests.md delete mode 100644 tests_api/docs/WebTransactionApi.md delete mode 100644 tests_api/docs/WebTransactionInstantTest.md delete mode 100644 tests_api/docs/WebTransactionTests.md delete mode 100644 tests_api/git_push.sh delete mode 100644 tests_api/pyproject.toml delete mode 100644 tests_api/setup.py delete mode 100644 tests_api/test-requirements.txt delete mode 100644 tests_api/test/test_agent.py delete mode 100644 tests_api/test/test_agent_base.py delete mode 100644 tests_api/test/test_agent_to_agent_api.py delete mode 100644 tests_api/test/test_agent_to_agent_instant_test.py delete mode 100644 tests_api/test/test_agent_to_agent_test_protocol.py delete mode 100644 tests_api/test/test_agent_to_server_api.py delete mode 100644 tests_api/test/test_agent_to_server_instant_test.py delete mode 100644 tests_api/test/test_alert_rounds_violation_mode.py delete mode 100644 tests_api/test/test_alert_rule.py delete mode 100644 tests_api/test/test_alert_type.py delete mode 100644 tests_api/test/test_all_test_types_api.py delete mode 100644 tests_api/test/test_base_test.py delete mode 100644 tests_api/test/test_bgp_api.py delete mode 100644 tests_api/test/test_cloud_enterprise_agent_type.py delete mode 100644 tests_api/test/test_dns_query_class.py delete mode 100644 tests_api/test/test_dns_sec_instant_test.py delete mode 100644 tests_api/test/test_dns_server_api.py delete mode 100644 tests_api/test/test_dns_server_instant_test.py delete mode 100644 tests_api/test/test_dns_trace_api.py delete mode 100644 tests_api/test/test_dns_trace_instant_test.py delete mode 100644 tests_api/test/test_dnssec_api.py delete mode 100644 tests_api/test/test_error.py delete mode 100644 tests_api/test/test_expand.py delete mode 100644 tests_api/test/test_ftp_server_api.py delete mode 100644 tests_api/test/test_ftp_server_instant_test.py delete mode 100644 tests_api/test/test_ftp_server_request_type.py delete mode 100644 tests_api/test/test_get_agent_to_agent_test200_response.py delete mode 100644 tests_api/test/test_get_agent_to_server_test200_response.py delete mode 100644 tests_api/test/test_get_bgp_test200_response.py delete mode 100644 tests_api/test/test_get_dns_sec_test200_response.py delete mode 100644 tests_api/test/test_get_dns_server_test200_response.py delete mode 100644 tests_api/test/test_get_dns_trace_test200_response.py delete mode 100644 tests_api/test/test_get_ftp_server_test200_response.py delete mode 100644 tests_api/test/test_get_http_server_test200_response.py delete mode 100644 tests_api/test/test_get_page_load_test200_response.py delete mode 100644 tests_api/test/test_get_sip_server_test200_response.py delete mode 100644 tests_api/test/test_get_voice_test200_response.py delete mode 100644 tests_api/test/test_get_web_transactions_test200_response.py delete mode 100644 tests_api/test/test_http_server_api.py delete mode 100644 tests_api/test/test_http_server_instant_test.py delete mode 100644 tests_api/test/test_instant_test.py delete mode 100644 tests_api/test/test_link.py delete mode 100644 tests_api/test/test_map_item.py delete mode 100644 tests_api/test/test_monitor.py delete mode 100644 tests_api/test/test_monitor_type.py delete mode 100644 tests_api/test/test_page_load_api.py delete mode 100644 tests_api/test/test_page_load_instant_test.py delete mode 100644 tests_api/test/test_path_visualization_interface_groups_api.py delete mode 100644 tests_api/test/test_self_links.py delete mode 100644 tests_api/test/test_self_links_links.py delete mode 100644 tests_api/test/test_simple_test.py delete mode 100644 tests_api/test/test_sip_server_api.py delete mode 100644 tests_api/test/test_sip_server_instant_test.py delete mode 100644 tests_api/test/test_sip_server_test.py delete mode 100644 tests_api/test/test_sip_test_protocol.py delete mode 100644 tests_api/test/test_test_auth_type.py delete mode 100644 tests_api/test/test_test_custom_headers.py delete mode 100644 tests_api/test/test_test_custom_headers_all.py delete mode 100644 tests_api/test/test_test_custom_headers_root.py delete mode 100644 tests_api/test/test_test_direction.py delete mode 100644 tests_api/test/test_test_dns_server.py delete mode 100644 tests_api/test/test_test_dns_transport_protocol.py delete mode 100644 tests_api/test/test_test_dscp_id.py delete mode 100644 tests_api/test/test_test_http_interval.py delete mode 100644 tests_api/test/test_test_interval.py delete mode 100644 tests_api/test/test_test_ipv6_policy.py delete mode 100644 tests_api/test/test_test_labels_inner.py delete mode 100644 tests_api/test/test_test_page_loading_strategy.py delete mode 100644 tests_api/test/test_test_path_trace_mode.py delete mode 100644 tests_api/test/test_test_probe_mode.py delete mode 100644 tests_api/test/test_test_protocol.py delete mode 100644 tests_api/test/test_test_shared_accounts_inner.py delete mode 100644 tests_api/test/test_test_sip_credentials.py delete mode 100644 tests_api/test/test_test_ssl_version_id.py delete mode 100644 tests_api/test/test_test_sub_interval.py delete mode 100644 tests_api/test/test_test_type.py delete mode 100644 tests_api/test/test_unauthorized_error.py delete mode 100644 tests_api/test/test_unexpanded_instant_test.py delete mode 100644 tests_api/test/test_unexpanded_instant_test_links.py delete mode 100644 tests_api/test/test_unexpanded_instant_test_links_self.py delete mode 100644 tests_api/test/test_unexpanded_instant_test_links_test_results.py delete mode 100644 tests_api/test/test_unexpanded_test.py delete mode 100644 tests_api/test/test_update_dns_server_test.py delete mode 100644 tests_api/test/test_update_path_vis_interface_group200_response.py delete mode 100644 tests_api/test/test_update_sip_server_test.py delete mode 100644 tests_api/test/test_update_voice_test.py delete mode 100644 tests_api/test/test_voice_api.py delete mode 100644 tests_api/test/test_voice_instant_test.py delete mode 100644 tests_api/test/test_voice_test.py delete mode 100644 tests_api/test/test_web_transaction_api.py delete mode 100644 tests_api/test/test_web_transaction_instant_test.py delete mode 100644 tests_api/tests_api/__init__.py delete mode 100644 tests_api/tests_api/api/__init__.py delete mode 100644 tests_api/tests_api/api/agent_to_agent_api.py delete mode 100644 tests_api/tests_api/api/agent_to_server_api.py delete mode 100644 tests_api/tests_api/api/dns_server_api.py delete mode 100644 tests_api/tests_api/api/dns_trace_api.py delete mode 100644 tests_api/tests_api/api/ftp_server_api.py delete mode 100644 tests_api/tests_api/api/http_server_api.py delete mode 100644 tests_api/tests_api/api/sip_server_api.py delete mode 100644 tests_api/tests_api/api/voice_api.py delete mode 100644 tests_api/tests_api/api/web_transaction_api.py delete mode 100644 tests_api/tests_api/api_client.py delete mode 100644 tests_api/tests_api/api_response.py delete mode 100644 tests_api/tests_api/configuration.py delete mode 100644 tests_api/tests_api/exceptions.py delete mode 100644 tests_api/tests_api/models/__init__.py delete mode 100644 tests_api/tests_api/models/agent.py delete mode 100644 tests_api/tests_api/models/agent_base.py delete mode 100644 tests_api/tests_api/models/agent_to_agent_instant_test.py delete mode 100644 tests_api/tests_api/models/agent_to_agent_test_protocol.py delete mode 100644 tests_api/tests_api/models/agent_to_agent_tests.py delete mode 100644 tests_api/tests_api/models/agent_to_server_instant_test.py delete mode 100644 tests_api/tests_api/models/agent_to_server_tests.py delete mode 100644 tests_api/tests_api/models/alert_rounds_violation_mode.py delete mode 100644 tests_api/tests_api/models/alert_rule.py delete mode 100644 tests_api/tests_api/models/alert_type.py delete mode 100644 tests_api/tests_api/models/base_test.py delete mode 100644 tests_api/tests_api/models/bgp_tests.py delete mode 100644 tests_api/tests_api/models/cloud_enterprise_agent_type.py delete mode 100644 tests_api/tests_api/models/dns_query_class.py delete mode 100644 tests_api/tests_api/models/dns_sec_instant_test.py delete mode 100644 tests_api/tests_api/models/dns_sec_tests.py delete mode 100644 tests_api/tests_api/models/dns_server_instant_test.py delete mode 100644 tests_api/tests_api/models/dns_server_tests.py delete mode 100644 tests_api/tests_api/models/dns_trace_instant_test.py delete mode 100644 tests_api/tests_api/models/dns_trace_tests.py delete mode 100644 tests_api/tests_api/models/error.py delete mode 100644 tests_api/tests_api/models/expand.py delete mode 100644 tests_api/tests_api/models/ftp_server_instant_test.py delete mode 100644 tests_api/tests_api/models/ftp_server_request_type.py delete mode 100644 tests_api/tests_api/models/ftp_server_tests.py delete mode 100644 tests_api/tests_api/models/get_agent_to_agent_test200_response.py delete mode 100644 tests_api/tests_api/models/get_agent_to_agent_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_agent_to_server_test200_response.py delete mode 100644 tests_api/tests_api/models/get_agent_to_server_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_bgp_test200_response.py delete mode 100644 tests_api/tests_api/models/get_bgp_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_dns_sec_test200_response.py delete mode 100644 tests_api/tests_api/models/get_dns_sec_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_dns_server_test200_response.py delete mode 100644 tests_api/tests_api/models/get_dns_server_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_dns_trace_test200_response.py delete mode 100644 tests_api/tests_api/models/get_dns_trace_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_ftp_server_test200_response.py delete mode 100644 tests_api/tests_api/models/get_ftp_server_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_http_server_test200_response.py delete mode 100644 tests_api/tests_api/models/get_http_server_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_page_load_test200_response.py delete mode 100644 tests_api/tests_api/models/get_page_load_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_path_vis_interface_groups200_response.py delete mode 100644 tests_api/tests_api/models/get_sip_server_test200_response.py delete mode 100644 tests_api/tests_api/models/get_sip_server_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_voice_test200_response.py delete mode 100644 tests_api/tests_api/models/get_voice_tests200_response.py delete mode 100644 tests_api/tests_api/models/get_web_transactions_test200_response.py delete mode 100644 tests_api/tests_api/models/get_web_transactions_tests200_response.py delete mode 100644 tests_api/tests_api/models/http_server_instant_test.py delete mode 100644 tests_api/tests_api/models/http_server_tests.py delete mode 100644 tests_api/tests_api/models/instant_test.py delete mode 100644 tests_api/tests_api/models/interface_groups.py delete mode 100644 tests_api/tests_api/models/link.py delete mode 100644 tests_api/tests_api/models/map_item.py delete mode 100644 tests_api/tests_api/models/monitor.py delete mode 100644 tests_api/tests_api/models/monitor_type.py delete mode 100644 tests_api/tests_api/models/page_load_instant_test.py delete mode 100644 tests_api/tests_api/models/page_load_tests.py delete mode 100644 tests_api/tests_api/models/self_links.py delete mode 100644 tests_api/tests_api/models/self_links_links.py delete mode 100644 tests_api/tests_api/models/simple_test.py delete mode 100644 tests_api/tests_api/models/sip_server_instant_test.py delete mode 100644 tests_api/tests_api/models/sip_server_test.py delete mode 100644 tests_api/tests_api/models/sip_server_tests.py delete mode 100644 tests_api/tests_api/models/sip_test_protocol.py delete mode 100644 tests_api/tests_api/models/test_auth_type.py delete mode 100644 tests_api/tests_api/models/test_custom_headers.py delete mode 100644 tests_api/tests_api/models/test_custom_headers_all.py delete mode 100644 tests_api/tests_api/models/test_custom_headers_root.py delete mode 100644 tests_api/tests_api/models/test_direction.py delete mode 100644 tests_api/tests_api/models/test_dns_server.py delete mode 100644 tests_api/tests_api/models/test_dns_transport_protocol.py delete mode 100644 tests_api/tests_api/models/test_dscp_id.py delete mode 100644 tests_api/tests_api/models/test_http_interval.py delete mode 100644 tests_api/tests_api/models/test_interval.py delete mode 100644 tests_api/tests_api/models/test_ipv6_policy.py delete mode 100644 tests_api/tests_api/models/test_labels_inner.py delete mode 100644 tests_api/tests_api/models/test_page_loading_strategy.py delete mode 100644 tests_api/tests_api/models/test_path_trace_mode.py delete mode 100644 tests_api/tests_api/models/test_probe_mode.py delete mode 100644 tests_api/tests_api/models/test_protocol.py delete mode 100644 tests_api/tests_api/models/test_shared_accounts_inner.py delete mode 100644 tests_api/tests_api/models/test_sip_credentials.py delete mode 100644 tests_api/tests_api/models/test_ssl_version_id.py delete mode 100644 tests_api/tests_api/models/test_sub_interval.py delete mode 100644 tests_api/tests_api/models/test_type.py delete mode 100644 tests_api/tests_api/models/tests.py delete mode 100644 tests_api/tests_api/models/unauthorized_error.py delete mode 100644 tests_api/tests_api/models/unexpanded_instant_test.py delete mode 100644 tests_api/tests_api/models/unexpanded_instant_test_links.py delete mode 100644 tests_api/tests_api/models/unexpanded_instant_test_links_self.py delete mode 100644 tests_api/tests_api/models/unexpanded_instant_test_links_test_results.py delete mode 100644 tests_api/tests_api/models/unexpanded_test.py delete mode 100644 tests_api/tests_api/models/update_path_vis_interface_group200_response.py delete mode 100644 tests_api/tests_api/models/update_sip_server_test.py delete mode 100644 tests_api/tests_api/models/update_voice_test.py delete mode 100644 tests_api/tests_api/models/voice_instant_test.py delete mode 100644 tests_api/tests_api/models/voice_test.py delete mode 100644 tests_api/tests_api/models/voice_tests.py delete mode 100644 tests_api/tests_api/models/web_transaction_instant_test.py delete mode 100644 tests_api/tests_api/models/web_transaction_tests.py delete mode 100644 tests_api/tests_api/rest.py delete mode 100644 tests_api/tox.ini create mode 100644 usage/.gitignore create mode 100644 usage/.openapi-generator-ignore create mode 100644 usage/.openapi-generator/FILES create mode 100644 usage/.openapi-generator/VERSION create mode 100644 usage/README.md create mode 100644 usage/docs/AccountGroup.md create mode 100644 usage/docs/AccountGroupId.md rename {usage_api => usage}/docs/AccountGroupQuota.md (81%) rename {usage_api => usage}/docs/EndpointAgentsEmbeddedInner.md (82%) rename {usage_api => usage}/docs/EndpointAgentsEssentialsInner.md (81%) rename {usage_api => usage}/docs/EndpointAgentsInner.md (84%) create mode 100644 usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroup.md create mode 100644 usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md rename {usage_api => usage}/docs/EnterpriseAgentUnitsInner.md (87%) rename {usage_api => usage}/docs/EnterpriseAgentsInner.md (83%) create mode 100644 usage/docs/Error.md create mode 100644 usage/docs/Expand.md create mode 100644 usage/docs/GetEnterpriseAgentsUnitsUsage200Response.md rename {usage_api => usage}/docs/GetQuotas200Response.md (80%) create mode 100644 usage/docs/GetTestUnitsUsage200Response.md rename {usage_api => usage}/docs/GetUsage200Response.md (80%) create mode 100644 usage/docs/Link.md rename {usage_api => usage}/docs/OrganizationQuota.md (81%) rename {usage_api => usage}/docs/OrganizationsQuotasAssign.md (79%) rename {usage_api => usage}/docs/OrganizationsQuotasAssignOrganizationsInner.md (75%) rename {usage_api => usage}/docs/OrganizationsQuotasUnassign.md (78%) create mode 100644 usage/docs/OrganizationsQuotasUnassignOrganizationsInner.md create mode 100644 usage/docs/PaginationLinks.md create mode 100644 usage/docs/PaginationLinksLinks.md rename {usage_api => usage}/docs/Quotas.md (85%) create mode 100644 usage/docs/QuotasApi.md rename {usage_api => usage}/docs/QuotasAssignRequest.md (80%) rename {usage_api => usage}/docs/QuotasAssignResponse.md (79%) rename {usage_api => usage}/docs/QuotasQuotasInner.md (82%) rename {usage_api => usage}/docs/QuotasUnassign.md (81%) create mode 100644 usage/docs/SelfLinks.md create mode 100644 usage/docs/SelfLinksLinks.md rename {usage_api => usage}/docs/TestsInner.md (82%) create mode 100644 usage/docs/UnauthorizedError.md create mode 100644 usage/docs/UnitsByTests.md create mode 100644 usage/docs/UnitsByTestsBreakdownsInner.md rename {usage_api => usage}/docs/Usage.md (86%) create mode 100644 usage/docs/UsageApi.md rename {usage_api => usage}/docs/UsageUsage.md (96%) rename {usage_api => usage}/docs/UsageUsageQuota.md (90%) create mode 100644 usage/docs/ValidationError.md create mode 100644 usage/docs/ValidationErrorAllOfErrors.md create mode 100644 usage/pyproject.toml create mode 100644 usage/requirements.txt create mode 100644 usage/setup.cfg create mode 100644 usage/setup.py create mode 100644 usage/test-requirements.txt create mode 100644 usage/test/__init__.py create mode 100644 usage/test/test_account_group.py create mode 100644 usage/test/test_account_group_id.py create mode 100644 usage/test/test_account_group_quota.py create mode 100644 usage/test/test_endpoint_agents_embedded_inner.py create mode 100644 usage/test/test_endpoint_agents_essentials_inner.py create mode 100644 usage/test/test_endpoint_agents_inner.py create mode 100644 usage/test/test_enterprise_agent_units_by_test_owner_account_group.py create mode 100644 usage/test/test_enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py create mode 100644 usage/test/test_enterprise_agent_units_inner.py create mode 100644 usage/test/test_enterprise_agents_inner.py create mode 100644 usage/test/test_error.py create mode 100644 usage/test/test_expand.py create mode 100644 usage/test/test_get_enterprise_agents_units_usage200_response.py create mode 100644 usage/test/test_get_quotas200_response.py create mode 100644 usage/test/test_get_test_units_usage200_response.py create mode 100644 usage/test/test_get_usage200_response.py create mode 100644 usage/test/test_link.py create mode 100644 usage/test/test_organization_quota.py create mode 100644 usage/test/test_organizations_quotas_assign.py create mode 100644 usage/test/test_organizations_quotas_assign_organizations_inner.py create mode 100644 usage/test/test_organizations_quotas_unassign.py create mode 100644 usage/test/test_organizations_quotas_unassign_organizations_inner.py create mode 100644 usage/test/test_pagination_links.py create mode 100644 usage/test/test_pagination_links_links.py create mode 100644 usage/test/test_quotas.py create mode 100644 usage/test/test_quotas_assign_request.py create mode 100644 usage/test/test_quotas_assign_response.py create mode 100644 usage/test/test_quotas_quotas_inner.py create mode 100644 usage/test/test_quotas_unassign.py create mode 100644 usage/test/test_self_links.py create mode 100644 usage/test/test_self_links_links.py create mode 100644 usage/test/test_tests_inner.py create mode 100644 usage/test/test_unauthorized_error.py create mode 100644 usage/test/test_units_by_tests.py create mode 100644 usage/test/test_units_by_tests_breakdowns_inner.py create mode 100644 usage/test/test_usage.py create mode 100644 usage/test/test_usage_usage.py create mode 100644 usage/test/test_usage_usage_quota.py create mode 100644 usage/test/test_validation_error.py create mode 100644 usage/test/test_validation_error_all_of_errors.py create mode 100644 usage/usage/__init__.py create mode 100644 usage/usage/api/__init__.py rename {usage_api/usage_api => usage/usage}/api/quotas_api.py (77%) create mode 100644 usage/usage/api/usage_api.py create mode 100644 usage/usage/api_client.py create mode 100644 usage/usage/api_response.py create mode 100644 usage/usage/configuration.py create mode 100644 usage/usage/exceptions.py create mode 100644 usage/usage/models/__init__.py create mode 100644 usage/usage/models/account_group.py create mode 100644 usage/usage/models/account_group_id.py create mode 100644 usage/usage/models/account_group_quota.py create mode 100644 usage/usage/models/endpoint_agents_embedded_inner.py create mode 100644 usage/usage/models/endpoint_agents_essentials_inner.py create mode 100644 usage/usage/models/endpoint_agents_inner.py create mode 100644 usage/usage/models/enterprise_agent_units_by_test_owner_account_group.py create mode 100644 usage/usage/models/enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py create mode 100644 usage/usage/models/enterprise_agent_units_inner.py create mode 100644 usage/usage/models/enterprise_agents_inner.py create mode 100644 usage/usage/models/error.py create mode 100644 usage/usage/models/expand.py create mode 100644 usage/usage/models/get_enterprise_agents_units_usage200_response.py create mode 100644 usage/usage/models/get_quotas200_response.py create mode 100644 usage/usage/models/get_test_units_usage200_response.py create mode 100644 usage/usage/models/get_usage200_response.py create mode 100644 usage/usage/models/link.py create mode 100644 usage/usage/models/organization_quota.py create mode 100644 usage/usage/models/organizations_quotas_assign.py create mode 100644 usage/usage/models/organizations_quotas_assign_organizations_inner.py create mode 100644 usage/usage/models/organizations_quotas_unassign.py create mode 100644 usage/usage/models/organizations_quotas_unassign_organizations_inner.py create mode 100644 usage/usage/models/pagination_links.py create mode 100644 usage/usage/models/pagination_links_links.py create mode 100644 usage/usage/models/quotas.py create mode 100644 usage/usage/models/quotas_assign_request.py create mode 100644 usage/usage/models/quotas_assign_response.py create mode 100644 usage/usage/models/quotas_quotas_inner.py create mode 100644 usage/usage/models/quotas_unassign.py create mode 100644 usage/usage/models/self_links.py create mode 100644 usage/usage/models/self_links_links.py create mode 100644 usage/usage/models/tests_inner.py create mode 100644 usage/usage/models/unauthorized_error.py create mode 100644 usage/usage/models/units_by_tests.py create mode 100644 usage/usage/models/units_by_tests_breakdowns_inner.py create mode 100644 usage/usage/models/usage.py rename {usage_api/usage_api => usage/usage}/models/usage_usage.py (79%) create mode 100644 usage/usage/models/usage_usage_quota.py create mode 100644 usage/usage/models/validation_error.py create mode 100644 usage/usage/models/validation_error_all_of_errors.py create mode 100644 usage/usage/py.typed create mode 100644 usage/usage/rest.py delete mode 100644 usage_api/.github/workflows/python.yml delete mode 100644 usage_api/.gitlab-ci.yml delete mode 100644 usage_api/.openapi-generator/FILES delete mode 100644 usage_api/.openapi-generator/VERSION delete mode 100644 usage_api/.travis.yml delete mode 100644 usage_api/README.md delete mode 100644 usage_api/docs/AccountGroup.md delete mode 100644 usage_api/docs/AccountGroupId.md delete mode 100644 usage_api/docs/Error.md delete mode 100644 usage_api/docs/Expand.md delete mode 100644 usage_api/docs/Link.md delete mode 100644 usage_api/docs/OrganizationsQuotasUnassignOrganizationsInner.md delete mode 100644 usage_api/docs/QuotasApi.md delete mode 100644 usage_api/docs/SelfLinks.md delete mode 100644 usage_api/docs/SelfLinksLinks.md delete mode 100644 usage_api/docs/UnauthorizedError.md delete mode 100644 usage_api/docs/UsageApi.md delete mode 100644 usage_api/git_push.sh delete mode 100644 usage_api/pyproject.toml delete mode 100644 usage_api/setup.py delete mode 100644 usage_api/test-requirements.txt delete mode 100644 usage_api/test/test_account_group.py delete mode 100644 usage_api/test/test_account_group_id.py delete mode 100644 usage_api/test/test_account_group_quota.py delete mode 100644 usage_api/test/test_endpoint_agents_embedded_inner.py delete mode 100644 usage_api/test/test_endpoint_agents_essentials_inner.py delete mode 100644 usage_api/test/test_endpoint_agents_inner.py delete mode 100644 usage_api/test/test_enterprise_agent_units_inner.py delete mode 100644 usage_api/test/test_enterprise_agents_inner.py delete mode 100644 usage_api/test/test_error.py delete mode 100644 usage_api/test/test_expand.py delete mode 100644 usage_api/test/test_get_quotas200_response.py delete mode 100644 usage_api/test/test_get_usage200_response.py delete mode 100644 usage_api/test/test_link.py delete mode 100644 usage_api/test/test_organization_quota.py delete mode 100644 usage_api/test/test_organizations_quotas_assign.py delete mode 100644 usage_api/test/test_organizations_quotas_assign_organizations_inner.py delete mode 100644 usage_api/test/test_organizations_quotas_unassign.py delete mode 100644 usage_api/test/test_organizations_quotas_unassign_organizations_inner.py delete mode 100644 usage_api/test/test_quotas.py delete mode 100644 usage_api/test/test_quotas_api.py delete mode 100644 usage_api/test/test_quotas_assign_request.py delete mode 100644 usage_api/test/test_quotas_assign_response.py delete mode 100644 usage_api/test/test_quotas_quotas_inner.py delete mode 100644 usage_api/test/test_quotas_unassign.py delete mode 100644 usage_api/test/test_self_links.py delete mode 100644 usage_api/test/test_self_links_links.py delete mode 100644 usage_api/test/test_tests_inner.py delete mode 100644 usage_api/test/test_unauthorized_error.py delete mode 100644 usage_api/test/test_usage.py delete mode 100644 usage_api/test/test_usage_api.py delete mode 100644 usage_api/test/test_usage_usage.py delete mode 100644 usage_api/test/test_usage_usage_quota.py delete mode 100644 usage_api/tox.ini delete mode 100644 usage_api/usage_api/__init__.py delete mode 100644 usage_api/usage_api/api/__init__.py delete mode 100644 usage_api/usage_api/api/usage_api.py delete mode 100644 usage_api/usage_api/api_client.py delete mode 100644 usage_api/usage_api/api_response.py delete mode 100644 usage_api/usage_api/configuration.py delete mode 100644 usage_api/usage_api/exceptions.py delete mode 100644 usage_api/usage_api/models/__init__.py delete mode 100644 usage_api/usage_api/models/account_group.py delete mode 100644 usage_api/usage_api/models/account_group_id.py delete mode 100644 usage_api/usage_api/models/account_group_quota.py delete mode 100644 usage_api/usage_api/models/endpoint_agents_embedded_inner.py delete mode 100644 usage_api/usage_api/models/endpoint_agents_essentials_inner.py delete mode 100644 usage_api/usage_api/models/endpoint_agents_inner.py delete mode 100644 usage_api/usage_api/models/enterprise_agent_units_inner.py delete mode 100644 usage_api/usage_api/models/enterprise_agents_inner.py delete mode 100644 usage_api/usage_api/models/error.py delete mode 100644 usage_api/usage_api/models/expand.py delete mode 100644 usage_api/usage_api/models/get_quotas200_response.py delete mode 100644 usage_api/usage_api/models/get_usage200_response.py delete mode 100644 usage_api/usage_api/models/link.py delete mode 100644 usage_api/usage_api/models/organization_quota.py delete mode 100644 usage_api/usage_api/models/organizations_quotas_assign.py delete mode 100644 usage_api/usage_api/models/organizations_quotas_assign_organizations_inner.py delete mode 100644 usage_api/usage_api/models/organizations_quotas_unassign.py delete mode 100644 usage_api/usage_api/models/organizations_quotas_unassign_organizations_inner.py delete mode 100644 usage_api/usage_api/models/quotas.py delete mode 100644 usage_api/usage_api/models/quotas_assign_request.py delete mode 100644 usage_api/usage_api/models/quotas_assign_response.py delete mode 100644 usage_api/usage_api/models/quotas_quotas_inner.py delete mode 100644 usage_api/usage_api/models/quotas_unassign.py delete mode 100644 usage_api/usage_api/models/self_links.py delete mode 100644 usage_api/usage_api/models/self_links_links.py delete mode 100644 usage_api/usage_api/models/tests_inner.py delete mode 100644 usage_api/usage_api/models/unauthorized_error.py delete mode 100644 usage_api/usage_api/models/usage.py delete mode 100644 usage_api/usage_api/models/usage_usage_quota.py delete mode 100644 usage_api/usage_api/rest.py diff --git a/README.md b/README.md index d92bc464..5957bb6b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # thousandeyes-python-sdk -## Owners: api-team-admin +## Owners: api-team-current ## Description -Python SDK for accessing ThousandEyes v7 APIs \ No newline at end of file +Python SDK for accessing ThousandEyes v7 APIs diff --git a/admin_api/.gitignore b/admin/.gitignore similarity index 100% rename from admin_api/.gitignore rename to admin/.gitignore diff --git a/admin_api/.openapi-generator-ignore b/admin/.openapi-generator-ignore similarity index 100% rename from admin_api/.openapi-generator-ignore rename to admin/.openapi-generator-ignore diff --git a/admin/.openapi-generator/FILES b/admin/.openapi-generator/FILES new file mode 100644 index 00000000..7b1febe8 --- /dev/null +++ b/admin/.openapi-generator/FILES @@ -0,0 +1,220 @@ +.gitignore +.openapi-generator-ignore +README.md +admin/__init__.py +admin/api/__init__.py +admin/api/account_groups_api.py +admin/api/permissions_api.py +admin/api/roles_api.py +admin/api/user_events_api.py +admin/api/users_api.py +admin/api_client.py +admin/api_response.py +admin/configuration.py +admin/exceptions.py +admin/models/__init__.py +admin/models/account_group.py +admin/models/account_group1.py +admin/models/account_group_detail.py +admin/models/account_group_id.py +admin/models/account_group_request_body.py +admin/models/account_group_roles.py +admin/models/account_group_roles_account_group_roles_inner.py +admin/models/account_group_roles_request_body_inner.py +admin/models/account_groups.py +admin/models/agent.py +admin/models/agent_base.py +admin/models/all_account_group_roles.py +admin/models/base_role.py +admin/models/cloud_enterprise_agent_type.py +admin/models/cluster_member.py +admin/models/create_account_group201_response.py +admin/models/create_role201_response.py +admin/models/create_user201_response.py +admin/models/created_user.py +admin/models/enterprise_agent.py +admin/models/enterprise_agent_data.py +admin/models/enterprise_agent_ipv6_policy.py +admin/models/enterprise_agent_state.py +admin/models/enterprise_agents.py +admin/models/error.py +admin/models/error_detail.py +admin/models/error_detail_code.py +admin/models/expand.py +admin/models/extended_user.py +admin/models/get_account_group200_response.py +admin/models/get_account_groups200_response.py +admin/models/get_permissions200_response.py +admin/models/get_roles200_response.py +admin/models/get_user200_response.py +admin/models/get_user_events200_response.py +admin/models/get_users200_response.py +admin/models/interface_ip_mapping.py +admin/models/link.py +admin/models/login_account_group.py +admin/models/new_account_group_response.py +admin/models/pagination_links.py +admin/models/pagination_links_links.py +admin/models/permission.py +admin/models/permissions.py +admin/models/query_window.py +admin/models/role.py +admin/models/role_detail.py +admin/models/role_request_body.py +admin/models/roles.py +admin/models/self_links.py +admin/models/self_links_links.py +admin/models/simple_agent.py +admin/models/unauthorized_error.py +admin/models/user.py +admin/models/user_account_group.py +admin/models/user_account_groups.py +admin/models/user_detail.py +admin/models/user_event.py +admin/models/user_event_all_of_resources_inner.py +admin/models/user_events.py +admin/models/user_request_body.py +admin/models/users.py +admin/models/validation_error.py +admin/models/validation_error_all_of_errors.py +admin/py.typed +admin/rest.py +docs/AccountGroup.md +docs/AccountGroup1.md +docs/AccountGroupDetail.md +docs/AccountGroupId.md +docs/AccountGroupRequestBody.md +docs/AccountGroupRoles.md +docs/AccountGroupRolesAccountGroupRolesInner.md +docs/AccountGroupRolesRequestBodyInner.md +docs/AccountGroups.md +docs/AccountGroupsApi.md +docs/Agent.md +docs/AgentBase.md +docs/AllAccountGroupRoles.md +docs/BaseRole.md +docs/CloudEnterpriseAgentType.md +docs/ClusterMember.md +docs/CreateAccountGroup201Response.md +docs/CreateRole201Response.md +docs/CreateUser201Response.md +docs/CreatedUser.md +docs/EnterpriseAgent.md +docs/EnterpriseAgentData.md +docs/EnterpriseAgentIpv6Policy.md +docs/EnterpriseAgentState.md +docs/EnterpriseAgents.md +docs/Error.md +docs/ErrorDetail.md +docs/ErrorDetailCode.md +docs/Expand.md +docs/ExtendedUser.md +docs/GetAccountGroup200Response.md +docs/GetAccountGroups200Response.md +docs/GetPermissions200Response.md +docs/GetRoles200Response.md +docs/GetUser200Response.md +docs/GetUserEvents200Response.md +docs/GetUsers200Response.md +docs/InterfaceIpMapping.md +docs/Link.md +docs/LoginAccountGroup.md +docs/NewAccountGroupResponse.md +docs/PaginationLinks.md +docs/PaginationLinksLinks.md +docs/Permission.md +docs/Permissions.md +docs/PermissionsApi.md +docs/QueryWindow.md +docs/Role.md +docs/RoleDetail.md +docs/RoleRequestBody.md +docs/Roles.md +docs/RolesApi.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/SimpleAgent.md +docs/UnauthorizedError.md +docs/User.md +docs/UserAccountGroup.md +docs/UserAccountGroups.md +docs/UserDetail.md +docs/UserEvent.md +docs/UserEventAllOfResourcesInner.md +docs/UserEvents.md +docs/UserEventsApi.md +docs/UserRequestBody.md +docs/Users.md +docs/UsersApi.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_account_group.py +test/test_account_group1.py +test/test_account_group_detail.py +test/test_account_group_id.py +test/test_account_group_request_body.py +test/test_account_group_roles.py +test/test_account_group_roles_account_group_roles_inner.py +test/test_account_group_roles_request_body_inner.py +test/test_account_groups.py +test/test_agent.py +test/test_agent_base.py +test/test_all_account_group_roles.py +test/test_base_role.py +test/test_cloud_enterprise_agent_type.py +test/test_cluster_member.py +test/test_create_account_group201_response.py +test/test_create_role201_response.py +test/test_create_user201_response.py +test/test_created_user.py +test/test_enterprise_agent.py +test/test_enterprise_agent_data.py +test/test_enterprise_agent_ipv6_policy.py +test/test_enterprise_agent_state.py +test/test_enterprise_agents.py +test/test_error.py +test/test_error_detail.py +test/test_error_detail_code.py +test/test_expand.py +test/test_extended_user.py +test/test_get_account_group200_response.py +test/test_get_account_groups200_response.py +test/test_get_permissions200_response.py +test/test_get_roles200_response.py +test/test_get_user200_response.py +test/test_get_user_events200_response.py +test/test_get_users200_response.py +test/test_interface_ip_mapping.py +test/test_link.py +test/test_login_account_group.py +test/test_new_account_group_response.py +test/test_pagination_links.py +test/test_pagination_links_links.py +test/test_permission.py +test/test_permissions.py +test/test_query_window.py +test/test_role.py +test/test_role_detail.py +test/test_role_request_body.py +test/test_roles.py +test/test_self_links.py +test/test_self_links_links.py +test/test_simple_agent.py +test/test_unauthorized_error.py +test/test_user.py +test/test_user_account_group.py +test/test_user_account_groups.py +test/test_user_detail.py +test/test_user_event.py +test/test_user_event_all_of_resources_inner.py +test/test_user_events.py +test/test_user_request_body.py +test/test_users.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/admin/.openapi-generator/VERSION b/admin/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/admin/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/admin/README.md b/admin/README.md new file mode 100644 index 00000000..498d4193 --- /dev/null +++ b/admin/README.md @@ -0,0 +1,210 @@ +# admin +## 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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import 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 admin +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import admin +from 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 = admin.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 = admin.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = admin.AccountGroupsApi(api_client) + account_group_request_body = admin.AccountGroupRequestBody() # AccountGroupRequestBody | + expand = [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_body, 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) + - [AccountGroup1](docs/AccountGroup1.md) + - [AccountGroupDetail](docs/AccountGroupDetail.md) + - [AccountGroupId](docs/AccountGroupId.md) + - [AccountGroupRequestBody](docs/AccountGroupRequestBody.md) + - [AccountGroupRoles](docs/AccountGroupRoles.md) + - [AccountGroupRolesAccountGroupRolesInner](docs/AccountGroupRolesAccountGroupRolesInner.md) + - [AccountGroupRolesRequestBodyInner](docs/AccountGroupRolesRequestBodyInner.md) + - [AccountGroups](docs/AccountGroups.md) + - [Agent](docs/Agent.md) + - [AgentBase](docs/AgentBase.md) + - [AllAccountGroupRoles](docs/AllAccountGroupRoles.md) + - [BaseRole](docs/BaseRole.md) + - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) + - [ClusterMember](docs/ClusterMember.md) + - [CreateAccountGroup201Response](docs/CreateAccountGroup201Response.md) + - [CreateRole201Response](docs/CreateRole201Response.md) + - [CreateUser201Response](docs/CreateUser201Response.md) + - [CreatedUser](docs/CreatedUser.md) + - [EnterpriseAgent](docs/EnterpriseAgent.md) + - [EnterpriseAgentData](docs/EnterpriseAgentData.md) + - [EnterpriseAgentIpv6Policy](docs/EnterpriseAgentIpv6Policy.md) + - [EnterpriseAgentState](docs/EnterpriseAgentState.md) + - [EnterpriseAgents](docs/EnterpriseAgents.md) + - [Error](docs/Error.md) + - [ErrorDetail](docs/ErrorDetail.md) + - [ErrorDetailCode](docs/ErrorDetailCode.md) + - [Expand](docs/Expand.md) + - [ExtendedUser](docs/ExtendedUser.md) + - [GetAccountGroup200Response](docs/GetAccountGroup200Response.md) + - [GetAccountGroups200Response](docs/GetAccountGroups200Response.md) + - [GetPermissions200Response](docs/GetPermissions200Response.md) + - [GetRoles200Response](docs/GetRoles200Response.md) + - [GetUser200Response](docs/GetUser200Response.md) + - [GetUserEvents200Response](docs/GetUserEvents200Response.md) + - [GetUsers200Response](docs/GetUsers200Response.md) + - [InterfaceIpMapping](docs/InterfaceIpMapping.md) + - [Link](docs/Link.md) + - [LoginAccountGroup](docs/LoginAccountGroup.md) + - [NewAccountGroupResponse](docs/NewAccountGroupResponse.md) + - [PaginationLinks](docs/PaginationLinks.md) + - [PaginationLinksLinks](docs/PaginationLinksLinks.md) + - [Permission](docs/Permission.md) + - [Permissions](docs/Permissions.md) + - [QueryWindow](docs/QueryWindow.md) + - [Role](docs/Role.md) + - [RoleDetail](docs/RoleDetail.md) + - [RoleRequestBody](docs/RoleRequestBody.md) + - [Roles](docs/Roles.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [SimpleAgent](docs/SimpleAgent.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [User](docs/User.md) + - [UserAccountGroup](docs/UserAccountGroup.md) + - [UserAccountGroups](docs/UserAccountGroups.md) + - [UserDetail](docs/UserDetail.md) + - [UserEvent](docs/UserEvent.md) + - [UserEventAllOfResourcesInner](docs/UserEventAllOfResourcesInner.md) + - [UserEvents](docs/UserEvents.md) + - [UserRequestBody](docs/UserRequestBody.md) + - [Users](docs/Users.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/admin/admin/__init__.py b/admin/admin/__init__.py new file mode 100644 index 00000000..e5e55c4c --- /dev/null +++ b/admin/admin/__init__.py @@ -0,0 +1,101 @@ +# 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.2 + 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 admin.api.account_groups_api import AccountGroupsApi +from admin.api.permissions_api import PermissionsApi +from admin.api.roles_api import RolesApi +from admin.api.user_events_api import UserEventsApi +from admin.api.users_api import UsersApi + +# import ApiClient +from admin.api_response import ApiResponse +from admin.api_client import ApiClient +from admin.configuration import Configuration +from admin.exceptions import OpenApiException +from admin.exceptions import ApiTypeError +from admin.exceptions import ApiValueError +from admin.exceptions import ApiKeyError +from admin.exceptions import ApiAttributeError +from admin.exceptions import ApiException + +# import models into sdk package +from admin.models.account_group import AccountGroup +from admin.models.account_group1 import AccountGroup1 +from admin.models.account_group_detail import AccountGroupDetail +from admin.models.account_group_id import AccountGroupId +from admin.models.account_group_request_body import AccountGroupRequestBody +from admin.models.account_group_roles import AccountGroupRoles +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from admin.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner +from admin.models.account_groups import AccountGroups +from admin.models.agent import Agent +from admin.models.agent_base import AgentBase +from admin.models.all_account_group_roles import AllAccountGroupRoles +from admin.models.base_role import BaseRole +from admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from admin.models.cluster_member import ClusterMember +from admin.models.create_account_group201_response import CreateAccountGroup201Response +from admin.models.create_role201_response import CreateRole201Response +from admin.models.create_user201_response import CreateUser201Response +from admin.models.created_user import CreatedUser +from admin.models.enterprise_agent import EnterpriseAgent +from admin.models.enterprise_agent_data import EnterpriseAgentData +from admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from admin.models.enterprise_agent_state import EnterpriseAgentState +from admin.models.enterprise_agents import EnterpriseAgents +from admin.models.error import Error +from admin.models.error_detail import ErrorDetail +from admin.models.error_detail_code import ErrorDetailCode +from admin.models.expand import Expand +from admin.models.extended_user import ExtendedUser +from admin.models.get_account_group200_response import GetAccountGroup200Response +from admin.models.get_account_groups200_response import GetAccountGroups200Response +from admin.models.get_permissions200_response import GetPermissions200Response +from admin.models.get_roles200_response import GetRoles200Response +from admin.models.get_user200_response import GetUser200Response +from admin.models.get_user_events200_response import GetUserEvents200Response +from admin.models.get_users200_response import GetUsers200Response +from admin.models.interface_ip_mapping import InterfaceIpMapping +from admin.models.link import Link +from admin.models.login_account_group import LoginAccountGroup +from admin.models.new_account_group_response import NewAccountGroupResponse +from admin.models.pagination_links import PaginationLinks +from admin.models.pagination_links_links import PaginationLinksLinks +from admin.models.permission import Permission +from admin.models.permissions import Permissions +from admin.models.query_window import QueryWindow +from admin.models.role import Role +from admin.models.role_detail import RoleDetail +from admin.models.role_request_body import RoleRequestBody +from admin.models.roles import Roles +from admin.models.self_links import SelfLinks +from admin.models.self_links_links import SelfLinksLinks +from admin.models.simple_agent import SimpleAgent +from admin.models.unauthorized_error import UnauthorizedError +from admin.models.user import User +from admin.models.user_account_group import UserAccountGroup +from admin.models.user_account_groups import UserAccountGroups +from admin.models.user_detail import UserDetail +from admin.models.user_event import UserEvent +from admin.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner +from admin.models.user_events import UserEvents +from admin.models.user_request_body import UserRequestBody +from admin.models.users import Users +from admin.models.validation_error import ValidationError +from admin.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/admin/admin/api/__init__.py b/admin/admin/api/__init__.py new file mode 100644 index 00000000..b4419ec6 --- /dev/null +++ b/admin/admin/api/__init__.py @@ -0,0 +1,9 @@ +# flake8: noqa + +# import apis into api package +from admin.api.account_groups_api import AccountGroupsApi +from admin.api.permissions_api import PermissionsApi +from admin.api.roles_api import RolesApi +from admin.api.user_events_api import UserEventsApi +from admin.api.users_api import UsersApi + diff --git a/admin_api/admin_api/api/account_groups_api.py b/admin/admin/api/account_groups_api.py similarity index 95% rename from admin_api/admin_api/api/account_groups_api.py rename to admin/admin/api/account_groups_api.py index b71db216..583e1638 100644 --- a/admin_api/admin_api/api/account_groups_api.py +++ b/admin/admin/api/account_groups_api.py @@ -3,41 +3,31 @@ """ 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. + ## 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from admin.models.account_group_request_body import AccountGroupRequestBody +from admin.models.create_account_group201_response import CreateAccountGroup201Response +from admin.models.expand import Expand +from admin.models.get_account_group200_response import GetAccountGroup200Response +from admin.models.get_account_groups200_response import GetAccountGroups200Response -from admin_api.models.account_group_request_body import AccountGroupRequestBody -from admin_api.models.create_account_group201_response import CreateAccountGroup201Response -from admin_api.models.expand import Expand -from admin_api.models.get_account_group200_response import GetAccountGroup200Response -from admin_api.models.get_account_groups200_response import GetAccountGroups200Response - -from admin_api.api_client import ApiClient -from admin_api.api_response import ApiResponse -from admin_api.rest import RESTResponseType +from admin.api_client import ApiClient, RequestSerialized +from admin.api_response import ApiResponse +from admin.rest import RESTResponseType class AccountGroupsApi: @@ -112,13 +102,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAccountGroup201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -190,13 +179,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAccountGroup201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -268,13 +256,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAccountGroup201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -291,12 +278,11 @@ class AccountGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -304,7 +290,7 @@ class AccountGroupsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -419,7 +405,13 @@ class AccountGroupsApi: ) _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, @@ -486,7 +478,13 @@ class AccountGroupsApi: ) _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, @@ -553,7 +551,13 @@ class AccountGroupsApi: ) _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, @@ -569,19 +573,18 @@ class AccountGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -596,7 +599,6 @@ class AccountGroupsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -684,13 +686,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroup200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -762,13 +763,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroup200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -840,13 +840,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroup200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -863,12 +862,11 @@ class AccountGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -876,7 +874,7 @@ class AccountGroupsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -979,13 +977,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroups200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1053,13 +1050,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroups200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1127,13 +1123,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroups200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1149,19 +1144,18 @@ class AccountGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1270,13 +1264,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroup200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1352,13 +1345,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroup200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1434,13 +1426,12 @@ class AccountGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAccountGroup200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1458,12 +1449,11 @@ class AccountGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1471,7 +1461,7 @@ class AccountGroupsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/admin_api/admin_api/api/permissions_api.py b/admin/admin/api/permissions_api.py similarity index 89% rename from admin_api/admin_api/api/permissions_api.py rename to admin/admin/api/permissions_api.py index bdf0c69b..73ef688b 100644 --- a/admin_api/admin_api/api/permissions_api.py +++ b/admin/admin/api/permissions_api.py @@ -3,37 +3,27 @@ """ 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. + ## 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from admin.models.get_permissions200_response import GetPermissions200Response -from admin_api.models.get_permissions200_response import GetPermissions200Response - -from admin_api.api_client import ApiClient -from admin_api.api_response import ApiResponse -from admin_api.rest import RESTResponseType +from admin.api_client import ApiClient, RequestSerialized +from admin.api_response import ApiResponse +from admin.rest import RESTResponseType class PermissionsApi: @@ -104,13 +94,12 @@ class PermissionsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetPermissions200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -178,13 +167,12 @@ class PermissionsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetPermissions200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -252,13 +240,12 @@ class PermissionsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetPermissions200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -274,19 +261,18 @@ class PermissionsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/admin_api/admin_api/api/roles_api.py b/admin/admin/api/roles_api.py similarity index 95% rename from admin_api/admin_api/api/roles_api.py rename to admin/admin/api/roles_api.py index 1630de1a..0f35a2d8 100644 --- a/admin_api/admin_api/api/roles_api.py +++ b/admin/admin/api/roles_api.py @@ -3,39 +3,29 @@ """ 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. + ## 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from admin.models.create_role201_response import CreateRole201Response +from admin.models.get_roles200_response import GetRoles200Response +from admin.models.role_request_body import RoleRequestBody -from admin_api.models.create_role201_response import CreateRole201Response -from admin_api.models.get_roles200_response import GetRoles200Response -from admin_api.models.role_request_body import RoleRequestBody - -from admin_api.api_client import ApiClient -from admin_api.api_response import ApiResponse -from admin_api.rest import RESTResponseType +from admin.api_client import ApiClient, RequestSerialized +from admin.api_response import ApiResponse +from admin.rest import RESTResponseType class RolesApi: @@ -110,13 +100,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -188,13 +177,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -266,13 +254,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -289,19 +276,18 @@ class RolesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -420,7 +406,13 @@ class RolesApi: ) _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, @@ -491,7 +483,13 @@ class RolesApi: ) _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, @@ -562,7 +560,13 @@ class RolesApi: ) _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, @@ -579,19 +583,18 @@ class RolesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -610,7 +613,6 @@ class RolesApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -698,13 +700,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -776,13 +777,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -854,13 +854,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -877,19 +876,18 @@ class RolesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -992,13 +990,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetRoles200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1066,13 +1063,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetRoles200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1140,13 +1136,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetRoles200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1162,19 +1157,18 @@ class RolesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1283,13 +1277,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1365,13 +1358,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1447,13 +1439,12 @@ class RolesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateRole201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1471,19 +1462,18 @@ class RolesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/admin_api/admin_api/api/user_events_api.py b/admin/admin/api/user_events_api.py similarity index 82% rename from admin_api/admin_api/api/user_events_api.py rename to admin/admin/api/user_events_api.py index b516bd46..6dce3995 100644 --- a/admin_api/admin_api/api/user_events_api.py +++ b/admin/admin/api/user_events_api.py @@ -3,39 +3,28 @@ """ 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. + ## 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictBool, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from admin.models.get_user_events200_response import GetUserEvents200Response -from admin_api.models.get_user_events200_response import GetUserEvents200Response - -from admin_api.api_client import ApiClient -from admin_api.api_response import ApiResponse -from admin_api.rest import RESTResponseType +from admin.api_client import ApiClient, RequestSerialized +from admin.api_response import ApiResponse +from admin.rest import RESTResponseType class UserEventsApi: @@ -55,10 +44,11 @@ class UserEventsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -74,17 +64,19 @@ class UserEventsApi: ) -> GetUserEvents200Response: """List activity log events - Returns a list of activity log events. Users with the `View activity log for all users in account group` permission can see all activity log events in the current account group. Users with the `View own activity log` permission can see their own activity log events in the current account group. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + 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 `_links` instead of this parameter. + :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 @@ -110,6 +102,7 @@ class UserEventsApi: _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, @@ -122,13 +115,12 @@ class UserEventsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUserEvents200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -145,10 +137,11 @@ class UserEventsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -164,17 +157,19 @@ class UserEventsApi: ) -> ApiResponse[GetUserEvents200Response]: """List activity log events - Returns a list of activity log events. Users with the `View activity log for all users in account group` permission can see all activity log events in the current account group. Users with the `View own activity log` permission can see their own activity log events in the current account group. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + 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 `_links` instead of this parameter. + :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 @@ -200,6 +195,7 @@ class UserEventsApi: _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, @@ -212,13 +208,12 @@ class UserEventsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUserEvents200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -235,10 +230,11 @@ class UserEventsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -254,17 +250,19 @@ class UserEventsApi: ) -> RESTResponseType: """List activity log events - Returns a list of activity log events. Users with the `View activity log for all users in account group` permission can see all activity log events in the current account group. Users with the `View own activity log` permission can see their own activity log events in the current account group. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + 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 `_links` instead of this parameter. + :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 @@ -290,6 +288,7 @@ class UserEventsApi: _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, @@ -302,13 +301,12 @@ class UserEventsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUserEvents200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -320,6 +318,7 @@ class UserEventsApi: def _get_user_events_serialize( self, aid, + use_all_permitted_aids, window, start_date, end_date, @@ -328,19 +327,18 @@ class UserEventsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -349,6 +347,10 @@ class UserEventsApi: _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)) diff --git a/admin_api/admin_api/api/users_api.py b/admin/admin/api/users_api.py similarity index 93% rename from admin_api/admin_api/api/users_api.py rename to admin/admin/api/users_api.py index 23d2b3c4..7c35141c 100644 --- a/admin_api/admin_api/api/users_api.py +++ b/admin/admin/api/users_api.py @@ -3,40 +3,30 @@ """ 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. + ## 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from admin.models.create_user201_response import CreateUser201Response +from admin.models.get_user200_response import GetUser200Response +from admin.models.get_users200_response import GetUsers200Response +from admin.models.user_request_body import UserRequestBody -from admin_api.models.create_user201_response import CreateUser201Response -from admin_api.models.get_user200_response import GetUser200Response -from admin_api.models.get_users200_response import GetUsers200Response -from admin_api.models.user_request_body import UserRequestBody - -from admin_api.api_client import ApiClient -from admin_api.api_response import ApiResponse -from admin_api.rest import RESTResponseType +from admin.api_client import ApiClient, RequestSerialized +from admin.api_response import ApiResponse +from admin.rest import RESTResponseType class UsersApi: @@ -111,13 +101,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateUser201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -189,13 +178,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateUser201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -267,13 +255,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateUser201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -290,19 +277,18 @@ class UsersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -366,7 +352,7 @@ class UsersApi: @validate_call def delete_user( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + 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, @@ -385,7 +371,7 @@ class UsersApi: Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. - :param id: Identifer for the user. (required) + :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 @@ -421,7 +407,13 @@ class UsersApi: ) _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, @@ -437,7 +429,7 @@ class UsersApi: @validate_call def delete_user_with_http_info( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + 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, @@ -456,7 +448,7 @@ class UsersApi: Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. - :param id: Identifer for the user. (required) + :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 @@ -492,7 +484,13 @@ class UsersApi: ) _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, @@ -508,7 +506,7 @@ class UsersApi: @validate_call def delete_user_without_preload_content( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + 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, @@ -527,7 +525,7 @@ class UsersApi: Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. - :param id: Identifer for the user. (required) + :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 @@ -563,7 +561,13 @@ class UsersApi: ) _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, @@ -580,19 +584,18 @@ class UsersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -611,7 +614,6 @@ class UsersApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -643,7 +645,7 @@ class UsersApi: @validate_call def get_user( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + 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, @@ -662,7 +664,7 @@ class UsersApi: Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. - :param id: Identifer for the user. (required) + :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 @@ -699,13 +701,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUser200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -721,7 +722,7 @@ class UsersApi: @validate_call def get_user_with_http_info( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + 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, @@ -740,7 +741,7 @@ class UsersApi: Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. - :param id: Identifer for the user. (required) + :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 @@ -777,13 +778,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUser200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -799,7 +799,7 @@ class UsersApi: @validate_call def get_user_without_preload_content( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + 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, @@ -818,7 +818,7 @@ class UsersApi: Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. - :param id: Identifer for the user. (required) + :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 @@ -855,13 +855,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUser200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -878,19 +877,18 @@ class UsersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -993,13 +991,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUsers200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1067,13 +1064,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUsers200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1141,13 +1137,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUsers200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1163,19 +1158,18 @@ class UsersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1224,7 +1218,7 @@ class UsersApi: @validate_call def update_user( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + id: Annotated[StrictStr, Field(description="Identifier for the user.")], user_request_body: UserRequestBody, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[ @@ -1244,7 +1238,7 @@ class UsersApi: 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: Identifer for the user. (required) + :param id: Identifier for the user. (required) :type id: str :param user_request_body: (required) :type user_request_body: UserRequestBody @@ -1284,13 +1278,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUser200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1306,7 +1299,7 @@ class UsersApi: @validate_call def update_user_with_http_info( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + id: Annotated[StrictStr, Field(description="Identifier for the user.")], user_request_body: UserRequestBody, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[ @@ -1326,7 +1319,7 @@ class UsersApi: 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: Identifer for the user. (required) + :param id: Identifier for the user. (required) :type id: str :param user_request_body: (required) :type user_request_body: UserRequestBody @@ -1366,13 +1359,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUser200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1388,7 +1380,7 @@ class UsersApi: @validate_call def update_user_without_preload_content( self, - id: Annotated[StrictStr, Field(description="Identifer for the user.")], + id: Annotated[StrictStr, Field(description="Identifier for the user.")], user_request_body: UserRequestBody, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[ @@ -1408,7 +1400,7 @@ class UsersApi: 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: Identifer for the user. (required) + :param id: Identifier for the user. (required) :type id: str :param user_request_body: (required) :type user_request_body: UserRequestBody @@ -1448,13 +1440,12 @@ class UsersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetUser200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1472,19 +1463,18 @@ class UsersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/admin/admin/api_client.py b/admin/admin/api_client.py new file mode 100644 index 00000000..389b0bae --- /dev/null +++ b/admin/admin/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from admin.configuration import Configuration +from admin.api_response import ApiResponse, T as ApiResponseT +import admin.models +from admin import rest +from admin.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(admin.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/admin/admin/api_response.py b/admin/admin/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/admin/admin/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/admin/admin/configuration.py b/admin/admin/configuration.py new file mode 100644 index 00000000..c5b9cc18 --- /dev/null +++ b/admin/admin/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("admin") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/admin/admin/exceptions.py b/admin/admin/exceptions.py new file mode 100644 index 00000000..3ef04247 --- /dev/null +++ b/admin/admin/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/admin/admin/models/__init__.py b/admin/admin/models/__init__.py new file mode 100644 index 00000000..04ca255e --- /dev/null +++ b/admin/admin/models/__init__.py @@ -0,0 +1,80 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from admin.models.account_group import AccountGroup +from admin.models.account_group1 import AccountGroup1 +from admin.models.account_group_detail import AccountGroupDetail +from admin.models.account_group_id import AccountGroupId +from admin.models.account_group_request_body import AccountGroupRequestBody +from admin.models.account_group_roles import AccountGroupRoles +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from admin.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner +from admin.models.account_groups import AccountGroups +from admin.models.agent import Agent +from admin.models.agent_base import AgentBase +from admin.models.all_account_group_roles import AllAccountGroupRoles +from admin.models.base_role import BaseRole +from admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from admin.models.cluster_member import ClusterMember +from admin.models.create_account_group201_response import CreateAccountGroup201Response +from admin.models.create_role201_response import CreateRole201Response +from admin.models.create_user201_response import CreateUser201Response +from admin.models.created_user import CreatedUser +from admin.models.enterprise_agent import EnterpriseAgent +from admin.models.enterprise_agent_data import EnterpriseAgentData +from admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from admin.models.enterprise_agent_state import EnterpriseAgentState +from admin.models.enterprise_agents import EnterpriseAgents +from admin.models.error import Error +from admin.models.error_detail import ErrorDetail +from admin.models.error_detail_code import ErrorDetailCode +from admin.models.expand import Expand +from admin.models.extended_user import ExtendedUser +from admin.models.get_account_group200_response import GetAccountGroup200Response +from admin.models.get_account_groups200_response import GetAccountGroups200Response +from admin.models.get_permissions200_response import GetPermissions200Response +from admin.models.get_roles200_response import GetRoles200Response +from admin.models.get_user200_response import GetUser200Response +from admin.models.get_user_events200_response import GetUserEvents200Response +from admin.models.get_users200_response import GetUsers200Response +from admin.models.interface_ip_mapping import InterfaceIpMapping +from admin.models.link import Link +from admin.models.login_account_group import LoginAccountGroup +from admin.models.new_account_group_response import NewAccountGroupResponse +from admin.models.pagination_links import PaginationLinks +from admin.models.pagination_links_links import PaginationLinksLinks +from admin.models.permission import Permission +from admin.models.permissions import Permissions +from admin.models.query_window import QueryWindow +from admin.models.role import Role +from admin.models.role_detail import RoleDetail +from admin.models.role_request_body import RoleRequestBody +from admin.models.roles import Roles +from admin.models.self_links import SelfLinks +from admin.models.self_links_links import SelfLinksLinks +from admin.models.simple_agent import SimpleAgent +from admin.models.unauthorized_error import UnauthorizedError +from admin.models.user import User +from admin.models.user_account_group import UserAccountGroup +from admin.models.user_account_groups import UserAccountGroups +from admin.models.user_detail import UserDetail +from admin.models.user_event import UserEvent +from admin.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner +from admin.models.user_events import UserEvents +from admin.models.user_request_body import UserRequestBody +from admin.models.users import Users +from admin.models.validation_error import ValidationError +from admin.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/admin/admin/models/account_group.py b/admin/admin/models/account_group.py new file mode 100644 index 00000000..ccc40ecc --- /dev/null +++ b/admin/admin/models/account_group.py @@ -0,0 +1,95 @@ +# 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.2 + 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 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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"), + "isCurrentAccountGroup": obj.get("isCurrentAccountGroup"), + "isDefaultAccountGroup": obj.get("isDefaultAccountGroup"), + "organizationName": obj.get("organizationName") + }) + return _obj + + diff --git a/admin/admin/models/account_group1.py b/admin/admin/models/account_group1.py new file mode 100644 index 00000000..e5f4d57b --- /dev/null +++ b/admin/admin/models/account_group1.py @@ -0,0 +1,89 @@ +# 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.2 + 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 AccountGroup1(BaseModel): + """ + AccountGroup1 + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroup1 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 AccountGroup1 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/admin/admin/models/account_group_detail.py b/admin/admin/models/account_group_detail.py new file mode 100644 index 00000000..a19a665c --- /dev/null +++ b/admin/admin/models/account_group_detail.py @@ -0,0 +1,115 @@ +# 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.2 + 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 admin.models.enterprise_agent import EnterpriseAgent +from 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 + agents: Optional[List[EnterpriseAgent]] = None + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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, + "agents": [EnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/account_group_id.py b/admin/admin/models/account_group_id.py new file mode 100644 index 00000000..f39e24fb --- /dev/null +++ b/admin/admin/models/account_group_id.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AccountGroupId(BaseModel): + """ + AccountGroupId + """ # 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.") + __properties: ClassVar[List[str]] = ["aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupId 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 AccountGroupId 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") + }) + return _obj + + diff --git a/admin/admin/models/account_group_request_body.py b/admin/admin/models/account_group_request_body.py new file mode 100644 index 00000000..dd4335e1 --- /dev/null +++ b/admin/admin/models/account_group_request_body.py @@ -0,0 +1,89 @@ +# 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.2 + 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 AccountGroupRequestBody(BaseModel): + """ + AccountGroupRequestBody + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupRequestBody 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 AccountGroupRequestBody 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/admin/admin/models/account_group_roles.py b/admin/admin/models/account_group_roles.py new file mode 100644 index 00000000..f1ba4037 --- /dev/null +++ b/admin/admin/models/account_group_roles.py @@ -0,0 +1,95 @@ +# 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.2 + 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 admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from typing import Optional, Set +from typing_extensions import Self + +class AccountGroupRoles(BaseModel): + """ + AccountGroupRoles + """ # noqa: E501 + account_group_roles: Optional[List[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") + __properties: ClassVar[List[str]] = ["accountGroupRoles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupRoles 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 AccountGroupRoles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.from_dict(_item) for _item in obj["accountGroupRoles"]] if obj.get("accountGroupRoles") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/account_group_roles_account_group_roles_inner.py b/admin/admin/models/account_group_roles_account_group_roles_inner.py new file mode 100644 index 00000000..8de2e10c --- /dev/null +++ b/admin/admin/models/account_group_roles_account_group_roles_inner.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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.role import Role +from typing import Optional, Set +from typing_extensions import Self + +class AccountGroupRolesAccountGroupRolesInner(BaseModel): + """ + AccountGroupRolesAccountGroupRolesInner + """ # noqa: E501 + account_group: Optional[AccountGroup1] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupRolesAccountGroupRolesInner 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 AccountGroupRolesAccountGroupRolesInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroup": AccountGroup1.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/admin/admin/models/account_group_roles_request_body_inner.py b/admin/admin/models/account_group_roles_request_body_inner.py new file mode 100644 index 00000000..fe3bfd40 --- /dev/null +++ b/admin/admin/models/account_group_roles_request_body_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 AccountGroupRolesRequestBodyInner(BaseModel): + """ + AccountGroupRolesRequestBodyInner + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupRolesRequestBodyInner 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 AccountGroupRolesRequestBodyInner 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/admin/admin/models/account_groups.py b/admin/admin/models/account_groups.py new file mode 100644 index 00000000..42326b60 --- /dev/null +++ b/admin/admin/models/account_groups.py @@ -0,0 +1,95 @@ +# 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.2 + 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 admin.models.account_group import AccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class AccountGroups(BaseModel): + """ + AccountGroups + """ # noqa: E501 + account_groups: Optional[List[AccountGroup]] = Field(default=None, alias="accountGroups") + __properties: ClassVar[List[str]] = ["accountGroups"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/agent.py b/admin/admin/models/agent.py new file mode 100644 index 00000000..f281541b --- /dev/null +++ b/admin/admin/models/agent.py @@ -0,0 +1,124 @@ +# 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.2 + 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 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/agent_base.py b/admin/admin/models/agent_base.py new file mode 100644 index 00000000..acef04c5 --- /dev/null +++ b/admin/admin/models/agent_base.py @@ -0,0 +1,97 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/all_account_group_roles.py b/admin/admin/models/all_account_group_roles.py new file mode 100644 index 00000000..915036f8 --- /dev/null +++ b/admin/admin/models/all_account_group_roles.py @@ -0,0 +1,95 @@ +# 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.2 + 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 admin.models.role import Role +from typing import Optional, Set +from typing_extensions import Self + +class AllAccountGroupRoles(BaseModel): + """ + AllAccountGroupRoles + """ # noqa: E501 + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + __properties: ClassVar[List[str]] = ["allAccountGroupRoles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AllAccountGroupRoles 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 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AllAccountGroupRoles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj["allAccountGroupRoles"]] if obj.get("allAccountGroupRoles") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/base_role.py b/admin/admin/models/base_role.py new file mode 100644 index 00000000..25335a54 --- /dev/null +++ b/admin/admin/models/base_role.py @@ -0,0 +1,91 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/cloud_enterprise_agent_type.py b/admin/admin/models/cloud_enterprise_agent_type.py new file mode 100644 index 00000000..9e7b51fb --- /dev/null +++ b/admin/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.2 + 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/admin/admin/models/cluster_member.py b/admin/admin/models/cluster_member.py new file mode 100644 index 00000000..3568faa3 --- /dev/null +++ b/admin/admin/models/cluster_member.py @@ -0,0 +1,131 @@ +# 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.2 + 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 admin.models.enterprise_agent_state import EnterpriseAgentState +from 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/create_account_group201_response.py b/admin/admin/models/create_account_group201_response.py new file mode 100644 index 00000000..a041d788 --- /dev/null +++ b/admin/admin/models/create_account_group201_response.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.2 + 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 admin.models.self_links_links import SelfLinksLinks +from admin.models.user_account_group import UserAccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class CreateAccountGroup201Response(BaseModel): + """ + CreateAccountGroup201Response + """ # 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[SelfLinksLinks] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateAccountGroup201Response 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 CreateAccountGroup201Response 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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/create_role201_response.py b/admin/admin/models/create_role201_response.py new file mode 100644 index 00000000..c7bc40ce --- /dev/null +++ b/admin/admin/models/create_role201_response.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.2 + 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 admin.models.permission import Permission +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class CreateRole201Response(BaseModel): + """ + CreateRole201Response + """ # 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[SelfLinksLinks] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRole201Response 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 CreateRole201Response 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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/create_user201_response.py b/admin/admin/models/create_user201_response.py new file mode 100644 index 00000000..a3280775 --- /dev/null +++ b/admin/admin/models/create_user201_response.py @@ -0,0 +1,126 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from admin.models.role import Role +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class CreateUser201Response(BaseModel): + """ + CreateUser201Response + """ # 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[AccountGroup1] = Field(default=None, alias="loginAccountGroup") + account_group_roles: Optional[List[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + links: Optional[SelfLinksLinks] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateUser201Response 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 CreateUser201Response 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": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/created_user.py b/admin/admin/models/created_user.py new file mode 100644 index 00000000..b2030607 --- /dev/null +++ b/admin/admin/models/created_user.py @@ -0,0 +1,120 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from admin.models.role import Role +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[AccountGroup1] = Field(default=None, alias="loginAccountGroup") + account_group_roles: Optional[List[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "accountGroupRoles", "allAccountGroupRoles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.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 + }) + return _obj + + diff --git a/admin/admin/models/enterprise_agent.py b/admin/admin/models/enterprise_agent.py new file mode 100644 index 00000000..ea24e233 --- /dev/null +++ b/admin/admin/models/enterprise_agent.py @@ -0,0 +1,199 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from admin.models.cluster_member import ClusterMember +from admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from admin.models.enterprise_agent_state import EnterpriseAgentState +from admin.models.error_detail import ErrorDetail +from 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[AccountGroup1]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [AccountGroup1.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/admin/admin/models/enterprise_agent_data.py b/admin/admin/models/enterprise_agent_data.py new file mode 100644 index 00000000..09445009 --- /dev/null +++ b/admin/admin/models/enterprise_agent_data.py @@ -0,0 +1,160 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.cluster_member import ClusterMember +from admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from admin.models.enterprise_agent_state import EnterpriseAgentState +from admin.models.error_detail import ErrorDetail +from 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[AccountGroup1]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [AccountGroup1.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/admin/admin/models/enterprise_agent_ipv6_policy.py b/admin/admin/models/enterprise_agent_ipv6_policy.py new file mode 100644 index 00000000..c6aef63b --- /dev/null +++ b/admin/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.2 + 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/admin/admin/models/enterprise_agent_state.py b/admin/admin/models/enterprise_agent_state.py new file mode 100644 index 00000000..2755dc36 --- /dev/null +++ b/admin/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.2 + 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/admin/admin/models/enterprise_agents.py b/admin/admin/models/enterprise_agents.py new file mode 100644 index 00000000..7e0277dc --- /dev/null +++ b/admin/admin/models/enterprise_agents.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from admin.models.enterprise_agent import EnterpriseAgent +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgents(BaseModel): + """ + EnterpriseAgents + """ # noqa: E501 + agents: Optional[List[EnterpriseAgent]] = None + __properties: ClassVar[List[str]] = ["agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgents 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 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 EnterpriseAgents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agents": [EnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/error.py b/admin/admin/models/error.py new file mode 100644 index 00000000..3438da26 --- /dev/null +++ b/admin/admin/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/error_detail.py b/admin/admin/models/error_detail.py new file mode 100644 index 00000000..f8b95895 --- /dev/null +++ b/admin/admin/models/error_detail.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.2 + 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 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/error_detail_code.py b/admin/admin/models/error_detail_code.py new file mode 100644 index 00000000..8910ff2f --- /dev/null +++ b/admin/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.2 + 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/admin/admin/models/expand.py b/admin/admin/models/expand.py new file mode 100644 index 00000000..1a140b07 --- /dev/null +++ b/admin/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.2 + 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/admin/admin/models/extended_user.py b/admin/admin/models/extended_user.py new file mode 100644 index 00000000..31e2fad5 --- /dev/null +++ b/admin/admin/models/extended_user.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.2 + 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 admin.models.account_group1 import AccountGroup1 +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[AccountGroup1] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "lastLogin": obj.get("lastLogin") + }) + return _obj + + diff --git a/admin/admin/models/get_account_group200_response.py b/admin/admin/models/get_account_group200_response.py new file mode 100644 index 00000000..c98b133b --- /dev/null +++ b/admin/admin/models/get_account_group200_response.py @@ -0,0 +1,121 @@ +# 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.2 + 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 admin.models.enterprise_agent import EnterpriseAgent +from admin.models.self_links_links import SelfLinksLinks +from admin.models.user_account_group import UserAccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class GetAccountGroup200Response(BaseModel): + """ + GetAccountGroup200Response + """ # 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 + agents: Optional[List[EnterpriseAgent]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "agents", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAccountGroup200Response 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 each item in agents (list) + _items = [] + if self.agents: + for _item in self.agents: + if _item: + _items.append(_item.to_dict()) + _dict['agents'] = _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 GetAccountGroup200Response 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, + "agents": [EnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/get_account_groups200_response.py b/admin/admin/models/get_account_groups200_response.py new file mode 100644 index 00000000..69a4b2b0 --- /dev/null +++ b/admin/admin/models/get_account_groups200_response.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.2 + 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 admin.models.account_group import AccountGroup +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetAccountGroups200Response(BaseModel): + """ + GetAccountGroups200Response + """ # noqa: E501 + account_groups: Optional[List[AccountGroup]] = Field(default=None, alias="accountGroups") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["accountGroups", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAccountGroups200Response 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 GetAccountGroups200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/get_permissions200_response.py b/admin/admin/models/get_permissions200_response.py new file mode 100644 index 00000000..69995598 --- /dev/null +++ b/admin/admin/models/get_permissions200_response.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.2 + 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 admin.models.permission import Permission +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetPermissions200Response(BaseModel): + """ + GetPermissions200Response + """ # noqa: E501 + permissions: Optional[List[Permission]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["permissions", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetPermissions200Response 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 GetPermissions200Response 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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/get_roles200_response.py b/admin/admin/models/get_roles200_response.py new file mode 100644 index 00000000..2f2587df --- /dev/null +++ b/admin/admin/models/get_roles200_response.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.2 + 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 admin.models.role import Role +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetRoles200Response(BaseModel): + """ + GetRoles200Response + """ # noqa: E501 + roles: Optional[List[Role]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["roles", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetRoles200Response 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 GetRoles200Response 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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/get_user200_response.py b/admin/admin/models/get_user200_response.py new file mode 100644 index 00000000..a4a78e3c --- /dev/null +++ b/admin/admin/models/get_user200_response.py @@ -0,0 +1,128 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from admin.models.role import Role +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetUser200Response(BaseModel): + """ + GetUser200Response + """ # 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[AccountGroup1] = 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[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + links: Optional[SelfLinksLinks] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetUser200Response 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 GetUser200Response 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": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "lastLogin": obj.get("lastLogin"), + "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/get_user_events200_response.py b/admin/admin/models/get_user_events200_response.py new file mode 100644 index 00000000..3bb444df --- /dev/null +++ b/admin/admin/models/get_user_events200_response.py @@ -0,0 +1,110 @@ +# 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.2 + 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 admin.models.pagination_links_links import PaginationLinksLinks +from admin.models.user_event import UserEvent +from typing import Optional, Set +from typing_extensions import Self + +class GetUserEvents200Response(BaseModel): + """ + GetUserEvents200Response + """ # noqa: E501 + 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") + audit_events: Optional[List[UserEvent]] = Field(default=None, alias="auditEvents") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "auditEvents", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetUserEvents200Response 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 GetUserEvents200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "auditEvents": [UserEvent.from_dict(_item) for _item in obj["auditEvents"]] if obj.get("auditEvents") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/get_users200_response.py b/admin/admin/models/get_users200_response.py new file mode 100644 index 00000000..2d62c7d3 --- /dev/null +++ b/admin/admin/models/get_users200_response.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.2 + 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 admin.models.extended_user import ExtendedUser +from admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetUsers200Response(BaseModel): + """ + GetUsers200Response + """ # noqa: E501 + users: Optional[List[ExtendedUser]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["users", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetUsers200Response 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 GetUsers200Response 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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/interface_ip_mapping.py b/admin/admin/models/interface_ip_mapping.py new file mode 100644 index 00000000..bea3399b --- /dev/null +++ b/admin/admin/models/interface_ip_mapping.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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/link.py b/admin/admin/models/link.py new file mode 100644 index 00000000..649d6f71 --- /dev/null +++ b/admin/admin/models/link.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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/login_account_group.py b/admin/admin/models/login_account_group.py new file mode 100644 index 00000000..b1ba2788 --- /dev/null +++ b/admin/admin/models/login_account_group.py @@ -0,0 +1,91 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +from typing import Optional, Set +from typing_extensions import Self + +class LoginAccountGroup(BaseModel): + """ + LoginAccountGroup + """ # noqa: E501 + login_account_group: Optional[AccountGroup1] = Field(default=None, alias="loginAccountGroup") + __properties: ClassVar[List[str]] = ["loginAccountGroup"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LoginAccountGroup 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 LoginAccountGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "loginAccountGroup": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/new_account_group_response.py b/admin/admin/models/new_account_group_response.py new file mode 100644 index 00000000..faada4fd --- /dev/null +++ b/admin/admin/models/new_account_group_response.py @@ -0,0 +1,105 @@ +# 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.2 + 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 admin.models.user_account_group import UserAccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class NewAccountGroupResponse(BaseModel): + """ + NewAccountGroupResponse + """ # 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 + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NewAccountGroupResponse 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NewAccountGroupResponse 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 + }) + return _obj + + diff --git a/admin/admin/models/pagination_links.py b/admin/admin/models/pagination_links.py new file mode 100644 index 00000000..df1e25bd --- /dev/null +++ b/admin/admin/models/pagination_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 admin.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/pagination_links_links.py b/admin/admin/models/pagination_links_links.py new file mode 100644 index 00000000..ff00ffdb --- /dev/null +++ b/admin/admin/models/pagination_links_links.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.2 + 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 admin.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinksLinks(BaseModel): + """ + PaginationLinksLinks + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationLinksLinks 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 PaginationLinksLinks 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/admin/admin/models/permission.py b/admin/admin/models/permission.py new file mode 100644 index 00000000..cef3d60c --- /dev/null +++ b/admin/admin/models/permission.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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/permissions.py b/admin/admin/models/permissions.py new file mode 100644 index 00000000..e6bcfc91 --- /dev/null +++ b/admin/admin/models/permissions.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from admin.models.permission import Permission +from typing import Optional, Set +from typing_extensions import Self + +class Permissions(BaseModel): + """ + Permissions + """ # noqa: E501 + permissions: Optional[List[Permission]] = None + __properties: ClassVar[List[str]] = ["permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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 + }) + return _obj + + diff --git a/admin/admin/models/query_window.py b/admin/admin/models/query_window.py new file mode 100644 index 00000000..9465c601 --- /dev/null +++ b/admin/admin/models/query_window.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.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class QueryWindow(BaseModel): + """ + QueryWindow + """ # noqa: E501 + 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") + __properties: ClassVar[List[str]] = ["startDate", "endDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueryWindow 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, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueryWindow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/admin/admin/models/role.py b/admin/admin/models/role.py new file mode 100644 index 00000000..a03a0297 --- /dev/null +++ b/admin/admin/models/role.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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/role_detail.py b/admin/admin/models/role_detail.py new file mode 100644 index 00000000..e0be5c60 --- /dev/null +++ b/admin/admin/models/role_detail.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.2 + 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 admin.models.permission import Permission +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 + __properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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 + }) + return _obj + + diff --git a/admin/admin/models/role_request_body.py b/admin/admin/models/role_request_body.py new file mode 100644 index 00000000..f014154b --- /dev/null +++ b/admin/admin/models/role_request_body.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/roles.py b/admin/admin/models/roles.py new file mode 100644 index 00000000..c7dd2d02 --- /dev/null +++ b/admin/admin/models/roles.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from admin.models.role import Role +from typing import Optional, Set +from typing_extensions import Self + +class Roles(BaseModel): + """ + Roles + """ # noqa: E501 + roles: Optional[List[Role]] = None + __properties: ClassVar[List[str]] = ["roles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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 + }) + return _obj + + diff --git a/admin/admin/models/self_links.py b/admin/admin/models/self_links.py new file mode 100644 index 00000000..45874c94 --- /dev/null +++ b/admin/admin/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 admin.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/self_links_links.py b/admin/admin/models/self_links_links.py new file mode 100644 index 00000000..a72a0f80 --- /dev/null +++ b/admin/admin/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 admin.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/admin/admin/models/simple_agent.py b/admin/admin/models/simple_agent.py new file mode 100644 index 00000000..85335178 --- /dev/null +++ b/admin/admin/models/simple_agent.py @@ -0,0 +1,121 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/unauthorized_error.py b/admin/admin/models/unauthorized_error.py new file mode 100644 index 00000000..086a770c --- /dev/null +++ b/admin/admin/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/user.py b/admin/admin/models/user.py new file mode 100644 index 00000000..29a0f860 --- /dev/null +++ b/admin/admin/models/user.py @@ -0,0 +1,100 @@ +# 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.2 + 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 admin.models.account_group1 import AccountGroup1 +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[AccountGroup1] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/user_account_group.py b/admin/admin/models/user_account_group.py new file mode 100644 index 00000000..58b813d8 --- /dev/null +++ b/admin/admin/models/user_account_group.py @@ -0,0 +1,106 @@ +# 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.2 + 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 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/admin/admin/models/user_account_groups.py b/admin/admin/models/user_account_groups.py new file mode 100644 index 00000000..4b452f00 --- /dev/null +++ b/admin/admin/models/user_account_groups.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from admin.models.user_account_group import UserAccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class UserAccountGroups(BaseModel): + """ + UserAccountGroups + """ # noqa: E501 + users: Optional[List[UserAccountGroup]] = None + __properties: ClassVar[List[str]] = ["users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAccountGroups 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAccountGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "users": [UserAccountGroup.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/user_detail.py b/admin/admin/models/user_detail.py new file mode 100644 index 00000000..47b99c99 --- /dev/null +++ b/admin/admin/models/user_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.2 + 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 admin.models.account_group1 import AccountGroup1 +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner +from admin.models.role import Role +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[AccountGroup1] = 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[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "lastLogin", "accountGroupRoles", "allAccountGroupRoles"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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": AccountGroup1.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "lastLogin": obj.get("lastLogin"), + "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.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 + }) + return _obj + + diff --git a/admin/admin/models/user_event.py b/admin/admin/models/user_event.py new file mode 100644 index 00000000..20ec3e7e --- /dev/null +++ b/admin/admin/models/user_event.py @@ -0,0 +1,110 @@ +# 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.2 + 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 admin.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner +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[UserEventAllOfResourcesInner]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [UserEventAllOfResourcesInner.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/user_event_all_of_resources_inner.py b/admin/admin/models/user_event_all_of_resources_inner.py new file mode 100644 index 00000000..76e0c143 --- /dev/null +++ b/admin/admin/models/user_event_all_of_resources_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 UserEventAllOfResourcesInner(BaseModel): + """ + UserEventAllOfResourcesInner + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserEventAllOfResourcesInner 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 UserEventAllOfResourcesInner 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/admin/admin/models/user_events.py b/admin/admin/models/user_events.py new file mode 100644 index 00000000..6bed435d --- /dev/null +++ b/admin/admin/models/user_events.py @@ -0,0 +1,95 @@ +# 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.2 + 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 admin.models.user_event import UserEvent +from typing import Optional, Set +from typing_extensions import Self + +class UserEvents(BaseModel): + """ + UserEvents + """ # noqa: E501 + audit_events: Optional[List[UserEvent]] = Field(default=None, alias="auditEvents") + __properties: ClassVar[List[str]] = ["auditEvents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserEvents 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 audit_events (list) + _items = [] + if self.audit_events: + for _item in self.audit_events: + if _item: + _items.append(_item.to_dict()) + _dict['auditEvents'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserEvents 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 + }) + return _obj + + diff --git a/admin/admin/models/user_request_body.py b/admin/admin/models/user_request_body.py new file mode 100644 index 00000000..18d606ac --- /dev/null +++ b/admin/admin/models/user_request_body.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.2 + 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 admin.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner +from typing import Optional, Set +from typing_extensions import Self + +class UserRequestBody(BaseModel): + """ + UserRequestBody + """ # 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[AccountGroupRolesRequestBodyInner]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserRequestBody 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 UserRequestBody 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": [AccountGroupRolesRequestBodyInner.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/admin/admin/models/users.py b/admin/admin/models/users.py new file mode 100644 index 00000000..debb7ade --- /dev/null +++ b/admin/admin/models/users.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from admin.models.extended_user import ExtendedUser +from typing import Optional, Set +from typing_extensions import Self + +class Users(BaseModel): + """ + Users + """ # noqa: E501 + users: Optional[List[ExtendedUser]] = None + __properties: ClassVar[List[str]] = ["users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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 + }) + return _obj + + diff --git a/admin/admin/models/validation_error.py b/admin/admin/models/validation_error.py new file mode 100644 index 00000000..a8f08d65 --- /dev/null +++ b/admin/admin/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 admin.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/admin/admin/models/validation_error_all_of_errors.py b/admin/admin/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..2649caf2 --- /dev/null +++ b/admin/admin/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/admin_api/admin_api/py.typed b/admin/admin/py.typed similarity index 100% rename from admin_api/admin_api/py.typed rename to admin/admin/py.typed diff --git a/admin/admin/rest.py b/admin/admin/rest.py new file mode 100644 index 00000000..55d90312 --- /dev/null +++ b/admin/admin/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from admin.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/admin/docs/AccountGroup.md b/admin/docs/AccountGroup.md new file mode 100644 index 00000000..d7a7466d --- /dev/null +++ b/admin/docs/AccountGroup.md @@ -0,0 +1,33 @@ +# 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] +**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 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/admin_api/docs/AccountGroup1.md b/admin/docs/AccountGroup1.md similarity index 85% rename from admin_api/docs/AccountGroup1.md rename to admin/docs/AccountGroup1.md index 4d7e04c8..fd063b33 100644 --- a/admin_api/docs/AccountGroup1.md +++ b/admin/docs/AccountGroup1.md @@ -2,6 +2,7 @@ ## 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] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.account_group1 import AccountGroup1 +from admin.models.account_group1 import AccountGroup1 # TODO update the JSON string below json = "{}" # create an instance of AccountGroup1 from a JSON string account_group1_instance = AccountGroup1.from_json(json) # print the JSON string representation of the object -print AccountGroup1.to_json() +print(AccountGroup1.to_json()) # convert the object into a dict account_group1_dict = account_group1_instance.to_dict() # create an instance of AccountGroup1 from a dict -account_group1_form_dict = account_group1.from_dict(account_group1_dict) +account_group1_from_dict = AccountGroup1.from_dict(account_group1_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/admin_api/docs/AccountGroupDetail.md b/admin/docs/AccountGroupDetail.md similarity index 88% rename from admin_api/docs/AccountGroupDetail.md rename to admin/docs/AccountGroupDetail.md index ee3fbfa9..2b50588d 100644 --- a/admin_api/docs/AccountGroupDetail.md +++ b/admin/docs/AccountGroupDetail.md @@ -2,6 +2,7 @@ ## 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] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.account_group_detail import AccountGroupDetail +from 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() +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_form_dict = account_group_detail.from_dict(account_group_detail_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/admin/docs/AccountGroupId.md b/admin/docs/AccountGroupId.md new file mode 100644 index 00000000..05bfce87 --- /dev/null +++ b/admin/docs/AccountGroupId.md @@ -0,0 +1,29 @@ +# AccountGroupId + + +## 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] + +## Example + +```python +from admin.models.account_group_id import AccountGroupId + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupId from a JSON string +account_group_id_instance = AccountGroupId.from_json(json) +# print the JSON string representation of the object +print(AccountGroupId.to_json()) + +# convert the object into a dict +account_group_id_dict = account_group_id_instance.to_dict() +# create an instance of AccountGroupId from a dict +account_group_id_from_dict = AccountGroupId.from_dict(account_group_id_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/admin_api/docs/AccountGroupRequestBody.md b/admin/docs/AccountGroupRequestBody.md similarity index 81% rename from admin_api/docs/AccountGroupRequestBody.md rename to admin/docs/AccountGroupRequestBody.md index 9708da44..94bd63bc 100644 --- a/admin_api/docs/AccountGroupRequestBody.md +++ b/admin/docs/AccountGroupRequestBody.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_group_name** | **str** | The name of the account group | @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.account_group_request_body import AccountGroupRequestBody +from admin.models.account_group_request_body import AccountGroupRequestBody # TODO update the JSON string below json = "{}" # create an instance of AccountGroupRequestBody from a JSON string account_group_request_body_instance = AccountGroupRequestBody.from_json(json) # print the JSON string representation of the object -print AccountGroupRequestBody.to_json() +print(AccountGroupRequestBody.to_json()) # convert the object into a dict account_group_request_body_dict = account_group_request_body_instance.to_dict() # create an instance of AccountGroupRequestBody from a dict -account_group_request_body_form_dict = account_group_request_body.from_dict(account_group_request_body_dict) +account_group_request_body_from_dict = AccountGroupRequestBody.from_dict(account_group_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/admin_api/docs/AccountGroupRoles.md b/admin/docs/AccountGroupRoles.md similarity index 81% rename from admin_api/docs/AccountGroupRoles.md rename to admin/docs/AccountGroupRoles.md index 8418839f..cf1284ed 100644 --- a/admin_api/docs/AccountGroupRoles.md +++ b/admin/docs/AccountGroupRoles.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_group_roles** | [**List[AccountGroupRolesAccountGroupRolesInner]**](AccountGroupRolesAccountGroupRolesInner.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.account_group_roles import AccountGroupRoles +from admin.models.account_group_roles import AccountGroupRoles # TODO update the JSON string below json = "{}" # create an instance of AccountGroupRoles from a JSON string account_group_roles_instance = AccountGroupRoles.from_json(json) # print the JSON string representation of the object -print AccountGroupRoles.to_json() +print(AccountGroupRoles.to_json()) # convert the object into a dict account_group_roles_dict = account_group_roles_instance.to_dict() # create an instance of AccountGroupRoles from a dict -account_group_roles_form_dict = account_group_roles.from_dict(account_group_roles_dict) +account_group_roles_from_dict = AccountGroupRoles.from_dict(account_group_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/admin/docs/AccountGroupRolesAccountGroupRolesInner.md b/admin/docs/AccountGroupRolesAccountGroupRolesInner.md new file mode 100644 index 00000000..d993ede0 --- /dev/null +++ b/admin/docs/AccountGroupRolesAccountGroupRolesInner.md @@ -0,0 +1,30 @@ +# AccountGroupRolesAccountGroupRolesInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_group** | [**AccountGroup1**](AccountGroup1.md) | | [optional] +**roles** | [**List[Role]**](Role.md) | | [optional] + +## Example + +```python +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupRolesAccountGroupRolesInner from a JSON string +account_group_roles_account_group_roles_inner_instance = AccountGroupRolesAccountGroupRolesInner.from_json(json) +# print the JSON string representation of the object +print(AccountGroupRolesAccountGroupRolesInner.to_json()) + +# convert the object into a dict +account_group_roles_account_group_roles_inner_dict = account_group_roles_account_group_roles_inner_instance.to_dict() +# create an instance of AccountGroupRolesAccountGroupRolesInner from a dict +account_group_roles_account_group_roles_inner_from_dict = AccountGroupRolesAccountGroupRolesInner.from_dict(account_group_roles_account_group_roles_inner_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/admin_api/docs/AccountGroupRolesRequestBodyInner.md b/admin/docs/AccountGroupRolesRequestBodyInner.md similarity index 76% rename from admin_api/docs/AccountGroupRolesRequestBodyInner.md rename to admin/docs/AccountGroupRolesRequestBodyInner.md index c6da9612..5893a9d6 100644 --- a/admin_api/docs/AccountGroupRolesRequestBodyInner.md +++ b/admin/docs/AccountGroupRolesRequestBodyInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_group_id** | **str** | Unique ID of the account group. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner +from admin.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner # TODO update the JSON string below json = "{}" # create an instance of AccountGroupRolesRequestBodyInner from a JSON string account_group_roles_request_body_inner_instance = AccountGroupRolesRequestBodyInner.from_json(json) # print the JSON string representation of the object -print AccountGroupRolesRequestBodyInner.to_json() +print(AccountGroupRolesRequestBodyInner.to_json()) # convert the object into a dict account_group_roles_request_body_inner_dict = account_group_roles_request_body_inner_instance.to_dict() # create an instance of AccountGroupRolesRequestBodyInner from a dict -account_group_roles_request_body_inner_form_dict = account_group_roles_request_body_inner.from_dict(account_group_roles_request_body_inner_dict) +account_group_roles_request_body_inner_from_dict = AccountGroupRolesRequestBodyInner.from_dict(account_group_roles_request_body_inner_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/admin_api/docs/AccountGroups.md b/admin/docs/AccountGroups.md similarity index 82% rename from admin_api/docs/AccountGroups.md rename to admin/docs/AccountGroups.md index 719ebf92..e5254c3e 100644 --- a/admin_api/docs/AccountGroups.md +++ b/admin/docs/AccountGroups.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_groups** | [**List[AccountGroup]**](AccountGroup.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.account_groups import AccountGroups +from 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() +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_form_dict = account_groups.from_dict(account_groups_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/admin_api/docs/AccountGroupsApi.md b/admin/docs/AccountGroupsApi.md similarity index 80% rename from admin_api/docs/AccountGroupsApi.md rename to admin/docs/AccountGroupsApi.md index 7e62d215..c25f915d 100644 --- a/admin_api/docs/AccountGroupsApi.md +++ b/admin/docs/AccountGroupsApi.md @@ -1,4 +1,4 @@ -# admin_api.AccountGroupsApi +# admin.AccountGroupsApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,19 +21,18 @@ Creates a new account group. This operation requires the `Edit all account group ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.account_group_request_body import AccountGroupRequestBody -from admin_api.models.create_account_group201_response import CreateAccountGroup201Response -from admin_api.models.expand import Expand -from admin_api.rest import ApiException +import admin +from admin.models.account_group_request_body import AccountGroupRequestBody +from admin.models.create_account_group201_response import CreateAccountGroup201Response +from admin.models.expand import Expand +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,16 +42,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.AccountGroupsApi(api_client) - account_group_request_body = admin_api.AccountGroupRequestBody() # AccountGroupRequestBody | - expand = [admin_api.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) + api_instance = admin.AccountGroupsApi(api_client) + account_group_request_body = admin.AccountGroupRequestBody() # AccountGroupRequestBody | + expand = [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 @@ -67,6 +66,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **account_group_request_body** | [**AccountGroupRequestBody**](AccountGroupRequestBody.md)| | @@ -86,6 +86,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -108,16 +109,15 @@ Deletes an account group using its ID. This operation requires the following per ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.rest import ApiException +import admin +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -127,15 +127,15 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.AccountGroupsApi(api_client) - id = '2067' # str | Identifier for the account group. + api_instance = admin.AccountGroupsApi(api_client) + id = '1234' # str | Identifier for the account group. try: # Delete account group @@ -148,6 +148,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier for the account group. | @@ -163,9 +164,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -188,18 +190,17 @@ Retrieves detailed information about an account group using its ID. This operat ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.expand import Expand -from admin_api.models.get_account_group200_response import GetAccountGroup200Response -from admin_api.rest import ApiException +import admin +from admin.models.expand import Expand +from admin.models.get_account_group200_response import GetAccountGroup200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -209,16 +210,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.AccountGroupsApi(api_client) - id = '2067' # str | Identifier for the account group. - expand = [admin_api.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) + api_instance = admin.AccountGroupsApi(api_client) + id = '1234' # str | Identifier for the account group. + expand = [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 @@ -233,6 +234,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier for the account group. | @@ -252,6 +254,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -274,17 +277,16 @@ Retrieves a list of account groups available to the current user. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.get_account_groups200_response import GetAccountGroups200Response -from admin_api.rest import ApiException +import admin +from admin.models.get_account_groups200_response import GetAccountGroups200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -294,15 +296,15 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.AccountGroupsApi(api_client) - aid = '2067' # 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) + api_instance = 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 @@ -317,6 +319,7 @@ with admin_api.ApiClient(configuration) as api_client: ### 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] @@ -335,6 +338,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -357,19 +361,18 @@ Updates an account group using its ID. You can modify the account group’s name ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.account_group_request_body import AccountGroupRequestBody -from admin_api.models.expand import Expand -from admin_api.models.get_account_group200_response import GetAccountGroup200Response -from admin_api.rest import ApiException +import admin +from admin.models.account_group_request_body import AccountGroupRequestBody +from admin.models.expand import Expand +from admin.models.get_account_group200_response import GetAccountGroup200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -379,17 +382,17 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.AccountGroupsApi(api_client) - id = '2067' # str | Identifier for the account group. - account_group_request_body = admin_api.AccountGroupRequestBody() # AccountGroupRequestBody | - expand = [admin_api.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) + api_instance = admin.AccountGroupsApi(api_client) + id = '1234' # str | Identifier for the account group. + account_group_request_body = admin.AccountGroupRequestBody() # AccountGroupRequestBody | + expand = [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 @@ -404,6 +407,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier for the account group. | @@ -424,6 +428,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/admin/docs/Agent.md b/admin/docs/Agent.md new file mode 100644 index 00000000..b801c048 --- /dev/null +++ b/admin/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 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/admin/docs/AgentBase.md b/admin/docs/AgentBase.md new file mode 100644 index 00000000..147eed96 --- /dev/null +++ b/admin/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 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/admin_api/docs/AllAccountGroupRoles.md b/admin/docs/AllAccountGroupRoles.md similarity index 79% rename from admin_api/docs/AllAccountGroupRoles.md rename to admin/docs/AllAccountGroupRoles.md index 0d457dc9..4c567f95 100644 --- a/admin_api/docs/AllAccountGroupRoles.md +++ b/admin/docs/AllAccountGroupRoles.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **all_account_group_roles** | [**List[Role]**](Role.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.all_account_group_roles import AllAccountGroupRoles +from admin.models.all_account_group_roles import AllAccountGroupRoles # TODO update the JSON string below json = "{}" # create an instance of AllAccountGroupRoles from a JSON string all_account_group_roles_instance = AllAccountGroupRoles.from_json(json) # print the JSON string representation of the object -print AllAccountGroupRoles.to_json() +print(AllAccountGroupRoles.to_json()) # convert the object into a dict all_account_group_roles_dict = all_account_group_roles_instance.to_dict() # create an instance of AllAccountGroupRoles from a dict -all_account_group_roles_form_dict = all_account_group_roles.from_dict(all_account_group_roles_dict) +all_account_group_roles_from_dict = AllAccountGroupRoles.from_dict(all_account_group_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/admin_api/docs/BaseRole.md b/admin/docs/BaseRole.md similarity index 87% rename from admin_api/docs/BaseRole.md rename to admin/docs/BaseRole.md index 730e47b5..f6406660 100644 --- a/admin_api/docs/BaseRole.md +++ b/admin/docs/BaseRole.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name of the role. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.base_role import BaseRole +from 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() +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_form_dict = base_role.from_dict(base_role_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/admin/docs/CloudEnterpriseAgentType.md b/admin/docs/CloudEnterpriseAgentType.md new file mode 100644 index 00000000..371c853b --- /dev/null +++ b/admin/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/admin/docs/ClusterMember.md b/admin/docs/ClusterMember.md new file mode 100644 index 00000000..c22eb596 --- /dev/null +++ b/admin/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 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/admin_api/docs/CreateAccountGroup201Response.md b/admin/docs/CreateAccountGroup201Response.md similarity index 85% rename from admin_api/docs/CreateAccountGroup201Response.md rename to admin/docs/CreateAccountGroup201Response.md index bba6db9c..1847500d 100644 --- a/admin_api/docs/CreateAccountGroup201Response.md +++ b/admin/docs/CreateAccountGroup201Response.md @@ -2,6 +2,7 @@ ## 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] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.create_account_group201_response import CreateAccountGroup201Response +from admin.models.create_account_group201_response import CreateAccountGroup201Response # TODO update the JSON string below json = "{}" # create an instance of CreateAccountGroup201Response from a JSON string create_account_group201_response_instance = CreateAccountGroup201Response.from_json(json) # print the JSON string representation of the object -print CreateAccountGroup201Response.to_json() +print(CreateAccountGroup201Response.to_json()) # convert the object into a dict create_account_group201_response_dict = create_account_group201_response_instance.to_dict() # create an instance of CreateAccountGroup201Response from a dict -create_account_group201_response_form_dict = create_account_group201_response.from_dict(create_account_group201_response_dict) +create_account_group201_response_from_dict = CreateAccountGroup201Response.from_dict(create_account_group201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/CreateRole201Response.md b/admin/docs/CreateRole201Response.md similarity index 84% rename from admin_api/docs/CreateRole201Response.md rename to admin/docs/CreateRole201Response.md index 2608ab99..1db3f023 100644 --- a/admin_api/docs/CreateRole201Response.md +++ b/admin/docs/CreateRole201Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name of the role. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.create_role201_response import CreateRole201Response +from admin.models.create_role201_response import CreateRole201Response # TODO update the JSON string below json = "{}" # create an instance of CreateRole201Response from a JSON string create_role201_response_instance = CreateRole201Response.from_json(json) # print the JSON string representation of the object -print CreateRole201Response.to_json() +print(CreateRole201Response.to_json()) # convert the object into a dict create_role201_response_dict = create_role201_response_instance.to_dict() # create an instance of CreateRole201Response from a dict -create_role201_response_form_dict = create_role201_response.from_dict(create_role201_response_dict) +create_role201_response_from_dict = CreateRole201Response.from_dict(create_role201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/CreateUser201Response.md b/admin/docs/CreateUser201Response.md similarity index 86% rename from admin_api/docs/CreateUser201Response.md rename to admin/docs/CreateUser201Response.md index 385c8a5c..0e82d9df 100644 --- a/admin_api/docs/CreateUser201Response.md +++ b/admin/docs/CreateUser201Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.create_user201_response import CreateUser201Response +from admin.models.create_user201_response import CreateUser201Response # TODO update the JSON string below json = "{}" # create an instance of CreateUser201Response from a JSON string create_user201_response_instance = CreateUser201Response.from_json(json) # print the JSON string representation of the object -print CreateUser201Response.to_json() +print(CreateUser201Response.to_json()) # convert the object into a dict create_user201_response_dict = create_user201_response_instance.to_dict() # create an instance of CreateUser201Response from a dict -create_user201_response_form_dict = create_user201_response.from_dict(create_user201_response_dict) +create_user201_response_from_dict = CreateUser201Response.from_dict(create_user201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/CreatedUser.md b/admin/docs/CreatedUser.md similarity index 89% rename from admin_api/docs/CreatedUser.md rename to admin/docs/CreatedUser.md index 00486716..999d69c7 100644 --- a/admin_api/docs/CreatedUser.md +++ b/admin/docs/CreatedUser.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.created_user import CreatedUser +from 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() +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_form_dict = created_user.from_dict(created_user_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/admin/docs/EnterpriseAgent.md b/admin/docs/EnterpriseAgent.md new file mode 100644 index 00000000..3898bb7b --- /dev/null +++ b/admin/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[AccountGroup1]**](AccountGroup1.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 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/admin/docs/EnterpriseAgentData.md b/admin/docs/EnterpriseAgentData.md new file mode 100644 index 00000000..6472b7e8 --- /dev/null +++ b/admin/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[AccountGroup1]**](AccountGroup1.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 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/admin/docs/EnterpriseAgentIpv6Policy.md b/admin/docs/EnterpriseAgentIpv6Policy.md new file mode 100644 index 00000000..63668ac6 --- /dev/null +++ b/admin/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/admin/docs/EnterpriseAgentState.md b/admin/docs/EnterpriseAgentState.md new file mode 100644 index 00000000..476c1c54 --- /dev/null +++ b/admin/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/admin_api/docs/EnterpriseAgents.md b/admin/docs/EnterpriseAgents.md similarity index 81% rename from admin_api/docs/EnterpriseAgents.md rename to admin/docs/EnterpriseAgents.md index f384882c..ce12fdb1 100644 --- a/admin_api/docs/EnterpriseAgents.md +++ b/admin/docs/EnterpriseAgents.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agents** | [**List[EnterpriseAgent]**](EnterpriseAgent.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.enterprise_agents import EnterpriseAgents +from admin.models.enterprise_agents import EnterpriseAgents # TODO update the JSON string below json = "{}" # create an instance of EnterpriseAgents from a JSON string enterprise_agents_instance = EnterpriseAgents.from_json(json) # print the JSON string representation of the object -print EnterpriseAgents.to_json() +print(EnterpriseAgents.to_json()) # convert the object into a dict enterprise_agents_dict = enterprise_agents_instance.to_dict() # create an instance of EnterpriseAgents from a dict -enterprise_agents_form_dict = enterprise_agents.from_dict(enterprise_agents_dict) +enterprise_agents_from_dict = EnterpriseAgents.from_dict(enterprise_agents_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/admin/docs/Error.md b/admin/docs/Error.md new file mode 100644 index 00000000..82b60966 --- /dev/null +++ b/admin/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 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/admin/docs/ErrorDetail.md b/admin/docs/ErrorDetail.md new file mode 100644 index 00000000..1a487840 --- /dev/null +++ b/admin/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 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/admin/docs/ErrorDetailCode.md b/admin/docs/ErrorDetailCode.md new file mode 100644 index 00000000..b9b8b5b7 --- /dev/null +++ b/admin/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/admin/docs/Expand.md b/admin/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/admin/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/admin_api/docs/ExtendedUser.md b/admin/docs/ExtendedUser.md similarity index 88% rename from admin_api/docs/ExtendedUser.md rename to admin/docs/ExtendedUser.md index 4fad69ce..b78ac182 100644 --- a/admin_api/docs/ExtendedUser.md +++ b/admin/docs/ExtendedUser.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.extended_user import ExtendedUser +from 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() +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_form_dict = extended_user.from_dict(extended_user_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/admin_api/docs/GetAccountGroup200Response.md b/admin/docs/GetAccountGroup200Response.md similarity index 86% rename from admin_api/docs/GetAccountGroup200Response.md rename to admin/docs/GetAccountGroup200Response.md index ce8b595d..38aba32a 100644 --- a/admin_api/docs/GetAccountGroup200Response.md +++ b/admin/docs/GetAccountGroup200Response.md @@ -2,6 +2,7 @@ ## 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] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.get_account_group200_response import GetAccountGroup200Response +from admin.models.get_account_group200_response import GetAccountGroup200Response # TODO update the JSON string below json = "{}" # create an instance of GetAccountGroup200Response from a JSON string get_account_group200_response_instance = GetAccountGroup200Response.from_json(json) # print the JSON string representation of the object -print GetAccountGroup200Response.to_json() +print(GetAccountGroup200Response.to_json()) # convert the object into a dict get_account_group200_response_dict = get_account_group200_response_instance.to_dict() # create an instance of GetAccountGroup200Response from a dict -get_account_group200_response_form_dict = get_account_group200_response.from_dict(get_account_group200_response_dict) +get_account_group200_response_from_dict = GetAccountGroup200Response.from_dict(get_account_group200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/GetAccountGroups200Response.md b/admin/docs/GetAccountGroups200Response.md similarity index 78% rename from admin_api/docs/GetAccountGroups200Response.md rename to admin/docs/GetAccountGroups200Response.md index b0238f15..ce4fa870 100644 --- a/admin_api/docs/GetAccountGroups200Response.md +++ b/admin/docs/GetAccountGroups200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_groups** | [**List[AccountGroup]**](AccountGroup.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.get_account_groups200_response import GetAccountGroups200Response +from admin.models.get_account_groups200_response import GetAccountGroups200Response # TODO update the JSON string below json = "{}" # create an instance of GetAccountGroups200Response from a JSON string get_account_groups200_response_instance = GetAccountGroups200Response.from_json(json) # print the JSON string representation of the object -print GetAccountGroups200Response.to_json() +print(GetAccountGroups200Response.to_json()) # convert the object into a dict get_account_groups200_response_dict = get_account_groups200_response_instance.to_dict() # create an instance of GetAccountGroups200Response from a dict -get_account_groups200_response_form_dict = get_account_groups200_response.from_dict(get_account_groups200_response_dict) +get_account_groups200_response_from_dict = GetAccountGroups200Response.from_dict(get_account_groups200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/GetPermissions200Response.md b/admin/docs/GetPermissions200Response.md similarity index 79% rename from admin_api/docs/GetPermissions200Response.md rename to admin/docs/GetPermissions200Response.md index f6538862..62051058 100644 --- a/admin_api/docs/GetPermissions200Response.md +++ b/admin/docs/GetPermissions200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **permissions** | [**List[Permission]**](Permission.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.get_permissions200_response import GetPermissions200Response +from admin.models.get_permissions200_response import GetPermissions200Response # TODO update the JSON string below json = "{}" # create an instance of GetPermissions200Response from a JSON string get_permissions200_response_instance = GetPermissions200Response.from_json(json) # print the JSON string representation of the object -print GetPermissions200Response.to_json() +print(GetPermissions200Response.to_json()) # convert the object into a dict get_permissions200_response_dict = get_permissions200_response_instance.to_dict() # create an instance of GetPermissions200Response from a dict -get_permissions200_response_form_dict = get_permissions200_response.from_dict(get_permissions200_response_dict) +get_permissions200_response_from_dict = GetPermissions200Response.from_dict(get_permissions200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/GetRoles200Response.md b/admin/docs/GetRoles200Response.md similarity index 80% rename from admin_api/docs/GetRoles200Response.md rename to admin/docs/GetRoles200Response.md index 1033d0f8..83ed6e5b 100644 --- a/admin_api/docs/GetRoles200Response.md +++ b/admin/docs/GetRoles200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **roles** | [**List[Role]**](Role.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.get_roles200_response import GetRoles200Response +from admin.models.get_roles200_response import GetRoles200Response # TODO update the JSON string below json = "{}" # create an instance of GetRoles200Response from a JSON string get_roles200_response_instance = GetRoles200Response.from_json(json) # print the JSON string representation of the object -print GetRoles200Response.to_json() +print(GetRoles200Response.to_json()) # convert the object into a dict get_roles200_response_dict = get_roles200_response_instance.to_dict() # create an instance of GetRoles200Response from a dict -get_roles200_response_form_dict = get_roles200_response.from_dict(get_roles200_response_dict) +get_roles200_response_from_dict = GetRoles200Response.from_dict(get_roles200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/GetUser200Response.md b/admin/docs/GetUser200Response.md similarity index 88% rename from admin_api/docs/GetUser200Response.md rename to admin/docs/GetUser200Response.md index a7adce74..1e097ddf 100644 --- a/admin_api/docs/GetUser200Response.md +++ b/admin/docs/GetUser200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.get_user200_response import GetUser200Response +from admin.models.get_user200_response import GetUser200Response # TODO update the JSON string below json = "{}" # create an instance of GetUser200Response from a JSON string get_user200_response_instance = GetUser200Response.from_json(json) # print the JSON string representation of the object -print GetUser200Response.to_json() +print(GetUser200Response.to_json()) # convert the object into a dict get_user200_response_dict = get_user200_response_instance.to_dict() # create an instance of GetUser200Response from a dict -get_user200_response_form_dict = get_user200_response.from_dict(get_user200_response_dict) +get_user200_response_from_dict = GetUser200Response.from_dict(get_user200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/GetUserEvents200Response.md b/admin/docs/GetUserEvents200Response.md similarity index 81% rename from admin_api/docs/GetUserEvents200Response.md rename to admin/docs/GetUserEvents200Response.md index f52c0b36..4fb2434f 100644 --- a/admin_api/docs/GetUserEvents200Response.md +++ b/admin/docs/GetUserEvents200Response.md @@ -2,29 +2,30 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **audit_events** | [**List[UserEvent]**](UserEvent.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from admin_api.models.get_user_events200_response import GetUserEvents200Response +from admin.models.get_user_events200_response import GetUserEvents200Response # TODO update the JSON string below json = "{}" # create an instance of GetUserEvents200Response from a JSON string get_user_events200_response_instance = GetUserEvents200Response.from_json(json) # print the JSON string representation of the object -print GetUserEvents200Response.to_json() +print(GetUserEvents200Response.to_json()) # convert the object into a dict get_user_events200_response_dict = get_user_events200_response_instance.to_dict() # create an instance of GetUserEvents200Response from a dict -get_user_events200_response_form_dict = get_user_events200_response.from_dict(get_user_events200_response_dict) +get_user_events200_response_from_dict = GetUserEvents200Response.from_dict(get_user_events200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin_api/docs/GetUsers200Response.md b/admin/docs/GetUsers200Response.md similarity index 81% rename from admin_api/docs/GetUsers200Response.md rename to admin/docs/GetUsers200Response.md index f124a6d1..19f52fb0 100644 --- a/admin_api/docs/GetUsers200Response.md +++ b/admin/docs/GetUsers200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **users** | [**List[ExtendedUser]**](ExtendedUser.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.get_users200_response import GetUsers200Response +from admin.models.get_users200_response import GetUsers200Response # TODO update the JSON string below json = "{}" # create an instance of GetUsers200Response from a JSON string get_users200_response_instance = GetUsers200Response.from_json(json) # print the JSON string representation of the object -print GetUsers200Response.to_json() +print(GetUsers200Response.to_json()) # convert the object into a dict get_users200_response_dict = get_users200_response_instance.to_dict() # create an instance of GetUsers200Response from a dict -get_users200_response_form_dict = get_users200_response.from_dict(get_users200_response_dict) +get_users200_response_from_dict = GetUsers200Response.from_dict(get_users200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin/docs/InterfaceIpMapping.md b/admin/docs/InterfaceIpMapping.md new file mode 100644 index 00000000..23994ec6 --- /dev/null +++ b/admin/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 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/admin/docs/Link.md b/admin/docs/Link.md new file mode 100644 index 00000000..25ebf459 --- /dev/null +++ b/admin/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 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/admin_api/docs/LoginAccountGroup.md b/admin/docs/LoginAccountGroup.md similarity index 80% rename from admin_api/docs/LoginAccountGroup.md rename to admin/docs/LoginAccountGroup.md index 7cf18469..5ecb0192 100644 --- a/admin_api/docs/LoginAccountGroup.md +++ b/admin/docs/LoginAccountGroup.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **login_account_group** | [**AccountGroup1**](AccountGroup1.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.login_account_group import LoginAccountGroup +from admin.models.login_account_group import LoginAccountGroup # TODO update the JSON string below json = "{}" # create an instance of LoginAccountGroup from a JSON string login_account_group_instance = LoginAccountGroup.from_json(json) # print the JSON string representation of the object -print LoginAccountGroup.to_json() +print(LoginAccountGroup.to_json()) # convert the object into a dict login_account_group_dict = login_account_group_instance.to_dict() # create an instance of LoginAccountGroup from a dict -login_account_group_form_dict = login_account_group.from_dict(login_account_group_dict) +login_account_group_from_dict = LoginAccountGroup.from_dict(login_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/admin_api/docs/NewAccountGroupResponse.md b/admin/docs/NewAccountGroupResponse.md similarity index 86% rename from admin_api/docs/NewAccountGroupResponse.md rename to admin/docs/NewAccountGroupResponse.md index a9b9f7a2..6a15bd45 100644 --- a/admin_api/docs/NewAccountGroupResponse.md +++ b/admin/docs/NewAccountGroupResponse.md @@ -2,6 +2,7 @@ ## 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] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.new_account_group_response import NewAccountGroupResponse +from admin.models.new_account_group_response import NewAccountGroupResponse # TODO update the JSON string below json = "{}" # create an instance of NewAccountGroupResponse from a JSON string new_account_group_response_instance = NewAccountGroupResponse.from_json(json) # print the JSON string representation of the object -print NewAccountGroupResponse.to_json() +print(NewAccountGroupResponse.to_json()) # convert the object into a dict new_account_group_response_dict = new_account_group_response_instance.to_dict() # create an instance of NewAccountGroupResponse from a dict -new_account_group_response_form_dict = new_account_group_response.from_dict(new_account_group_response_dict) +new_account_group_response_from_dict = NewAccountGroupResponse.from_dict(new_account_group_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/admin/docs/PaginationLinks.md b/admin/docs/PaginationLinks.md new file mode 100644 index 00000000..8de3344d --- /dev/null +++ b/admin/docs/PaginationLinks.md @@ -0,0 +1,30 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from 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/admin/docs/PaginationLinksLinks.md b/admin/docs/PaginationLinksLinks.md new file mode 100644 index 00000000..033dd6c7 --- /dev/null +++ b/admin/docs/PaginationLinksLinks.md @@ -0,0 +1,31 @@ +# PaginationLinksLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from admin.models.pagination_links_links import PaginationLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinksLinks from a JSON string +pagination_links_links_instance = PaginationLinksLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinksLinks.to_json()) + +# convert the object into a dict +pagination_links_links_dict = pagination_links_links_instance.to_dict() +# create an instance of PaginationLinksLinks from a dict +pagination_links_links_from_dict = PaginationLinksLinks.from_dict(pagination_links_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/admin_api/docs/Permission.md b/admin/docs/Permission.md similarity index 87% rename from admin_api/docs/Permission.md rename to admin/docs/Permission.md index d1eac038..c7e27148 100644 --- a/admin_api/docs/Permission.md +++ b/admin/docs/Permission.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | Label corresponding to the permission. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.permission import Permission +from 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() +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_form_dict = permission.from_dict(permission_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/admin_api/docs/Permissions.md b/admin/docs/Permissions.md similarity index 83% rename from admin_api/docs/Permissions.md rename to admin/docs/Permissions.md index 8e5b0d5a..3bc60d74 100644 --- a/admin_api/docs/Permissions.md +++ b/admin/docs/Permissions.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **permissions** | [**List[Permission]**](Permission.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.permissions import Permissions +from 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() +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_form_dict = permissions.from_dict(permissions_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/admin_api/docs/PermissionsApi.md b/admin/docs/PermissionsApi.md similarity index 87% rename from admin_api/docs/PermissionsApi.md rename to admin/docs/PermissionsApi.md index 28b6381e..6c9daf52 100644 --- a/admin_api/docs/PermissionsApi.md +++ b/admin/docs/PermissionsApi.md @@ -1,4 +1,4 @@ -# admin_api.PermissionsApi +# admin.PermissionsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Users must be in a role assigned management permissions to access this endpoint. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.get_permissions200_response import GetPermissions200Response -from admin_api.rest import ApiException +import admin +from admin.models.get_permissions200_response import GetPermissions200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,15 +36,15 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.PermissionsApi(api_client) - aid = '2067' # 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) + api_instance = 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 @@ -60,6 +59,7 @@ with admin_api.ApiClient(configuration) as api_client: ### 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] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/admin/docs/QueryWindow.md b/admin/docs/QueryWindow.md new file mode 100644 index 00000000..72a62577 --- /dev/null +++ b/admin/docs/QueryWindow.md @@ -0,0 +1,30 @@ +# QueryWindow + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +## Example + +```python +from admin.models.query_window import QueryWindow + +# TODO update the JSON string below +json = "{}" +# create an instance of QueryWindow from a JSON string +query_window_instance = QueryWindow.from_json(json) +# print the JSON string representation of the object +print(QueryWindow.to_json()) + +# convert the object into a dict +query_window_dict = query_window_instance.to_dict() +# create an instance of QueryWindow from a dict +query_window_from_dict = QueryWindow.from_dict(query_window_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/admin_api/docs/Role.md b/admin/docs/Role.md similarity index 90% rename from admin_api/docs/Role.md rename to admin/docs/Role.md index b2153387..0f726b29 100644 --- a/admin_api/docs/Role.md +++ b/admin/docs/Role.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name of the role. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.role import Role +from 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() +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_form_dict = role.from_dict(role_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/admin_api/docs/RoleDetail.md b/admin/docs/RoleDetail.md similarity index 87% rename from admin_api/docs/RoleDetail.md rename to admin/docs/RoleDetail.md index 1de201c5..bd2dfd79 100644 --- a/admin_api/docs/RoleDetail.md +++ b/admin/docs/RoleDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name of the role. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.role_detail import RoleDetail +from 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() +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_form_dict = role_detail.from_dict(role_detail_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/admin_api/docs/RoleRequestBody.md b/admin/docs/RoleRequestBody.md similarity index 83% rename from admin_api/docs/RoleRequestBody.md rename to admin/docs/RoleRequestBody.md index 3de35512..cec225ca 100644 --- a/admin_api/docs/RoleRequestBody.md +++ b/admin/docs/RoleRequestBody.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name of the role. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.role_request_body import RoleRequestBody +from 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() +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_form_dict = role_request_body.from_dict(role_request_body_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/admin_api/docs/Roles.md b/admin/docs/Roles.md similarity index 85% rename from admin_api/docs/Roles.md rename to admin/docs/Roles.md index 37ca2905..8ccb36d6 100644 --- a/admin_api/docs/Roles.md +++ b/admin/docs/Roles.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **roles** | [**List[Role]**](Role.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.roles import Roles +from 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() +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_form_dict = roles.from_dict(roles_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/admin_api/docs/RolesApi.md b/admin/docs/RolesApi.md similarity index 86% rename from admin_api/docs/RolesApi.md rename to admin/docs/RolesApi.md index 31214417..112b7d2c 100644 --- a/admin_api/docs/RolesApi.md +++ b/admin/docs/RolesApi.md @@ -1,4 +1,4 @@ -# admin_api.RolesApi +# admin.RolesApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,18 +21,17 @@ Creates a new role. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.create_role201_response import CreateRole201Response -from admin_api.models.role_request_body import RoleRequestBody -from admin_api.rest import ApiException +import admin +from admin.models.create_role201_response import CreateRole201Response +from admin.models.role_request_body import RoleRequestBody +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -42,16 +41,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.RolesApi(api_client) - role_request_body = admin_api.RoleRequestBody() # RoleRequestBody | - aid = '2067' # 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) + api_instance = admin.RolesApi(api_client) + role_request_body = 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 @@ -66,6 +65,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **role_request_body** | [**RoleRequestBody**](RoleRequestBody.md)| | @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -107,16 +108,15 @@ Deletes a role using its ID. The user needs appropriate permissions to successfu ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.rest import ApiException +import admin +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.RolesApi(api_client) + api_instance = admin.RolesApi(api_client) id = '23' # str | The ID of the desired role. - aid = '2067' # 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) + 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 @@ -148,6 +148,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The ID of the desired role. | @@ -164,9 +165,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -189,17 +191,16 @@ Returns detailed information about a role using its ID. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.create_role201_response import CreateRole201Response -from admin_api.rest import ApiException +import admin +from admin.models.create_role201_response import CreateRole201Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -209,16 +210,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.RolesApi(api_client) + api_instance = admin.RolesApi(api_client) id = '23' # str | The ID of the desired role. - aid = '2067' # 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) + 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 @@ -233,6 +234,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The ID of the desired role. | @@ -252,6 +254,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -274,17 +277,16 @@ Retrieves a list of defined roles visible to the current user. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.get_roles200_response import GetRoles200Response -from admin_api.rest import ApiException +import admin +from admin.models.get_roles200_response import GetRoles200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -294,15 +296,15 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.RolesApi(api_client) - aid = '2067' # 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) + api_instance = 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 @@ -317,6 +319,7 @@ with admin_api.ApiClient(configuration) as api_client: ### 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] @@ -335,6 +338,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -357,18 +361,17 @@ Updates a user-defined role using its ID. When updating a role, the following a ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.create_role201_response import CreateRole201Response -from admin_api.models.role_request_body import RoleRequestBody -from admin_api.rest import ApiException +import admin +from admin.models.create_role201_response import CreateRole201Response +from admin.models.role_request_body import RoleRequestBody +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -378,17 +381,17 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.RolesApi(api_client) + api_instance = admin.RolesApi(api_client) id = '23' # str | The ID of the desired role. - role_request_body = admin_api.RoleRequestBody() # RoleRequestBody | - aid = '2067' # 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) + role_request_body = 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 @@ -403,6 +406,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The ID of the desired role. | @@ -423,6 +427,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/admin/docs/SelfLinks.md b/admin/docs/SelfLinks.md new file mode 100644 index 00000000..0aef160f --- /dev/null +++ b/admin/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from 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/admin/docs/SelfLinksLinks.md b/admin/docs/SelfLinksLinks.md new file mode 100644 index 00000000..759c31be --- /dev/null +++ b/admin/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from admin.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/admin/docs/SimpleAgent.md b/admin/docs/SimpleAgent.md new file mode 100644 index 00000000..1671a6c9 --- /dev/null +++ b/admin/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 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/admin/docs/UnauthorizedError.md b/admin/docs/UnauthorizedError.md new file mode 100644 index 00000000..ecf959f4 --- /dev/null +++ b/admin/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from 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/admin_api/docs/User.md b/admin/docs/User.md similarity index 90% rename from admin_api/docs/User.md rename to admin/docs/User.md index 6c0986f4..fa5cc63f 100644 --- a/admin_api/docs/User.md +++ b/admin/docs/User.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user import User +from 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() +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_form_dict = user.from_dict(user_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/admin_api/docs/UserAccountGroup.md b/admin/docs/UserAccountGroup.md similarity index 86% rename from admin_api/docs/UserAccountGroup.md rename to admin/docs/UserAccountGroup.md index fe2dbc6e..af235aa2 100644 --- a/admin_api/docs/UserAccountGroup.md +++ b/admin/docs/UserAccountGroup.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_account_group import UserAccountGroup +from 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() +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_form_dict = user_account_group.from_dict(user_account_group_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/admin_api/docs/UserAccountGroups.md b/admin/docs/UserAccountGroups.md similarity index 80% rename from admin_api/docs/UserAccountGroups.md rename to admin/docs/UserAccountGroups.md index 9f004fd9..ee952860 100644 --- a/admin_api/docs/UserAccountGroups.md +++ b/admin/docs/UserAccountGroups.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **users** | [**List[UserAccountGroup]**](UserAccountGroup.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_account_groups import UserAccountGroups +from admin.models.user_account_groups import UserAccountGroups # TODO update the JSON string below json = "{}" # create an instance of UserAccountGroups from a JSON string user_account_groups_instance = UserAccountGroups.from_json(json) # print the JSON string representation of the object -print UserAccountGroups.to_json() +print(UserAccountGroups.to_json()) # convert the object into a dict user_account_groups_dict = user_account_groups_instance.to_dict() # create an instance of UserAccountGroups from a dict -user_account_groups_form_dict = user_account_groups.from_dict(user_account_groups_dict) +user_account_groups_from_dict = UserAccountGroups.from_dict(user_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/admin_api/docs/UserDetail.md b/admin/docs/UserDetail.md similarity index 90% rename from admin_api/docs/UserDetail.md rename to admin/docs/UserDetail.md index f8bf45da..7179e56c 100644 --- a/admin_api/docs/UserDetail.md +++ b/admin/docs/UserDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_detail import UserDetail +from 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() +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_form_dict = user_detail.from_dict(user_detail_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/admin_api/docs/UserEvent.md b/admin/docs/UserEvent.md similarity index 90% rename from admin_api/docs/UserEvent.md rename to admin/docs/UserEvent.md index a932cfd5..70f3663a 100644 --- a/admin_api/docs/UserEvent.md +++ b/admin/docs/UserEvent.md @@ -2,6 +2,7 @@ ## 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] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_event import UserEvent +from 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() +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_form_dict = user_event.from_dict(user_event_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/admin_api/docs/UserEventAllOfResourcesInner.md b/admin/docs/UserEventAllOfResourcesInner.md similarity index 79% rename from admin_api/docs/UserEventAllOfResourcesInner.md rename to admin/docs/UserEventAllOfResourcesInner.md index 84a56475..7efe89bc 100644 --- a/admin_api/docs/UserEventAllOfResourcesInner.md +++ b/admin/docs/UserEventAllOfResourcesInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of resource affected. Can be “testName”, “reportTitle”, “userDisplayName”, “alertRuleName”, etc. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner +from admin.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner # TODO update the JSON string below json = "{}" # create an instance of UserEventAllOfResourcesInner from a JSON string user_event_all_of_resources_inner_instance = UserEventAllOfResourcesInner.from_json(json) # print the JSON string representation of the object -print UserEventAllOfResourcesInner.to_json() +print(UserEventAllOfResourcesInner.to_json()) # convert the object into a dict user_event_all_of_resources_inner_dict = user_event_all_of_resources_inner_instance.to_dict() # create an instance of UserEventAllOfResourcesInner from a dict -user_event_all_of_resources_inner_form_dict = user_event_all_of_resources_inner.from_dict(user_event_all_of_resources_inner_dict) +user_event_all_of_resources_inner_from_dict = UserEventAllOfResourcesInner.from_dict(user_event_all_of_resources_inner_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/admin_api/docs/UserEvents.md b/admin/docs/UserEvents.md similarity index 83% rename from admin_api/docs/UserEvents.md rename to admin/docs/UserEvents.md index 8d95717a..741c323f 100644 --- a/admin_api/docs/UserEvents.md +++ b/admin/docs/UserEvents.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **audit_events** | [**List[UserEvent]**](UserEvent.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_events import UserEvents +from admin.models.user_events import UserEvents # TODO update the JSON string below json = "{}" # create an instance of UserEvents from a JSON string user_events_instance = UserEvents.from_json(json) # print the JSON string representation of the object -print UserEvents.to_json() +print(UserEvents.to_json()) # convert the object into a dict user_events_dict = user_events_instance.to_dict() # create an instance of UserEvents from a dict -user_events_form_dict = user_events.from_dict(user_events_dict) +user_events_from_dict = UserEvents.from_dict(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/admin_api/docs/UserEventsApi.md b/admin/docs/UserEventsApi.md similarity index 75% rename from admin_api/docs/UserEventsApi.md rename to admin/docs/UserEventsApi.md index 744f81e4..95a765e5 100644 --- a/admin_api/docs/UserEventsApi.md +++ b/admin/docs/UserEventsApi.md @@ -1,4 +1,4 @@ -# admin_api.UserEventsApi +# admin.UserEventsApi All URIs are relative to *https://api.thousandeyes.com* @@ -8,26 +8,25 @@ Method | HTTP request | Description # **get_user_events** -> GetUserEvents200Response get_user_events(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +> GetUserEvents200Response 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. Users with the `View activity log for all users in account group` permission can see all activity log events in the current account group. Users with the `View own activity log` permission can see their own activity log events in the current account group. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). +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 time -import os -import admin_api -from admin_api.models.get_user_events200_response import GetUserEvents200Response -from admin_api.rest import ApiException +import admin +from admin.models.get_user_events200_response import GetUserEvents200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,23 +36,24 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.UserEventsApi(api_client) - aid = '2067' # 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) + api_instance = 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 `_links` instead of this parameter. (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, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + 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: @@ -64,13 +64,15 @@ with admin_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -86,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/admin_api/docs/UserRequestBody.md b/admin/docs/UserRequestBody.md similarity index 86% rename from admin_api/docs/UserRequestBody.md rename to admin/docs/UserRequestBody.md index 98c305f6..f56dc0d3 100644 --- a/admin_api/docs/UserRequestBody.md +++ b/admin/docs/UserRequestBody.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User's display name. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.user_request_body import UserRequestBody +from admin.models.user_request_body import UserRequestBody # TODO update the JSON string below json = "{}" # create an instance of UserRequestBody from a JSON string user_request_body_instance = UserRequestBody.from_json(json) # print the JSON string representation of the object -print UserRequestBody.to_json() +print(UserRequestBody.to_json()) # convert the object into a dict user_request_body_dict = user_request_body_instance.to_dict() # create an instance of UserRequestBody from a dict -user_request_body_form_dict = user_request_body.from_dict(user_request_body_dict) +user_request_body_from_dict = UserRequestBody.from_dict(user_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/admin_api/docs/Users.md b/admin/docs/Users.md similarity index 86% rename from admin_api/docs/Users.md rename to admin/docs/Users.md index 0dc1bb1c..bcf671b6 100644 --- a/admin_api/docs/Users.md +++ b/admin/docs/Users.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **users** | [**List[ExtendedUser]**](ExtendedUser.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from admin_api.models.users import Users +from 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() +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_form_dict = users.from_dict(users_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/admin_api/docs/UsersApi.md b/admin/docs/UsersApi.md similarity index 85% rename from admin_api/docs/UsersApi.md rename to admin/docs/UsersApi.md index 34e152bd..b5f4d4de 100644 --- a/admin_api/docs/UsersApi.md +++ b/admin/docs/UsersApi.md @@ -1,4 +1,4 @@ -# admin_api.UsersApi +# admin.UsersApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,18 +21,17 @@ Creates a new user. The following applies when creating a user: * If the user ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.create_user201_response import CreateUser201Response -from admin_api.models.user_request_body import UserRequestBody -from admin_api.rest import ApiException +import admin +from admin.models.create_user201_response import CreateUser201Response +from admin.models.user_request_body import UserRequestBody +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -42,16 +41,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.UsersApi(api_client) - user_request_body = admin_api.UserRequestBody() # UserRequestBody | - aid = '2067' # 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) + api_instance = admin.UsersApi(api_client) + user_request_body = admin.UserRequestBody() # UserRequestBody | + 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 @@ -66,6 +65,7 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_request_body** | [**UserRequestBody**](UserRequestBody.md)| | @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -107,16 +108,15 @@ Deletes a user using the user ID. This endpoint requires the `Edit users in all ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.rest import ApiException +import admin +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.UsersApi(api_client) - id = '1884' # str | Identifer for the user. - aid = '2067' # 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) + api_instance = 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 @@ -148,9 +148,10 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Identifer for the user. | + **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 @@ -164,9 +165,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -189,17 +191,16 @@ Retrieves detailed information about a user. This operation requires the `API Ac ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.get_user200_response import GetUser200Response -from admin_api.rest import ApiException +import admin +from admin.models.get_user200_response import GetUser200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -209,16 +210,16 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.UsersApi(api_client) - id = '1884' # str | Identifer for the user. - aid = '2067' # 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) + api_instance = 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 @@ -233,9 +234,10 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Identifer for the user. | + **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 @@ -252,6 +254,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -274,17 +277,16 @@ Retrieves a list of users in the organization the account group ID belongs to. T ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.get_users200_response import GetUsers200Response -from admin_api.rest import ApiException +import admin +from admin.models.get_users200_response import GetUsers200Response +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -294,15 +296,15 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.UsersApi(api_client) - aid = '2067' # 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) + api_instance = 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 @@ -317,6 +319,7 @@ with admin_api.ApiClient(configuration) as api_client: ### 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] @@ -335,6 +338,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -357,18 +361,17 @@ Updates a user using the user ID. You can update the user name, email address, a ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import admin_api -from admin_api.models.get_user200_response import GetUser200Response -from admin_api.models.user_request_body import UserRequestBody -from admin_api.rest import ApiException +import admin +from admin.models.get_user200_response import GetUser200Response +from admin.models.user_request_body import UserRequestBody +from 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 = admin_api.Configuration( +configuration = admin.Configuration( host = "https://api.thousandeyes.com" ) @@ -378,17 +381,17 @@ configuration = admin_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = admin_api.Configuration( +configuration = admin.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: +with admin.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = admin_api.UsersApi(api_client) - id = '1884' # str | Identifer for the user. - user_request_body = admin_api.UserRequestBody() # UserRequestBody | - aid = '2067' # 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) + api_instance = admin.UsersApi(api_client) + id = '1234' # str | Identifier for the user. + user_request_body = admin.UserRequestBody() # UserRequestBody | + 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 @@ -403,9 +406,10 @@ with admin_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **str**| Identifer for the user. | + **id** | **str**| Identifier for the user. | **user_request_body** | [**UserRequestBody**](UserRequestBody.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] @@ -423,6 +427,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/admin/docs/ValidationError.md b/admin/docs/ValidationError.md new file mode 100644 index 00000000..992c8c33 --- /dev/null +++ b/admin/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from 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/admin/docs/ValidationErrorAllOfErrors.md b/admin/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..22fcb8c2 --- /dev/null +++ b/admin/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from admin.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/admin/pyproject.toml b/admin/pyproject.toml new file mode 100644 index 00000000..3167d8c5 --- /dev/null +++ b/admin/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "admin" +version = "1.0.0" +description = "Administrative API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Administrative API"] +include = ["admin/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "admin", + #"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/admin_api/requirements.txt b/admin/requirements.txt similarity index 100% rename from admin_api/requirements.txt rename to admin/requirements.txt diff --git a/admin_api/setup.cfg b/admin/setup.cfg similarity index 100% rename from admin_api/setup.cfg rename to admin/setup.cfg diff --git a/admin/setup.py b/admin/setup.py new file mode 100644 index 00000000..46a75d80 --- /dev/null +++ b/admin/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "admin" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Administrative API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/admin", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Administrative API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + ## 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). + """, # noqa: E501 + package_data={"admin": ["py.typed"]}, +) diff --git a/admin/test-requirements.txt b/admin/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/admin/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/admin_api/test/__init__.py b/admin/test/__init__.py similarity index 100% rename from admin_api/test/__init__.py rename to admin/test/__init__.py diff --git a/admin/test/test_account_group.py b/admin/test/test_account_group.py new file mode 100644 index 00000000..997d7f2d --- /dev/null +++ b/admin/test/test_account_group.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group import AccountGroup + +class TestAccountGroup(unittest.TestCase): + """AccountGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroup: + """Test AccountGroup + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroup` + """ + model = AccountGroup() + if include_optional: + return AccountGroup( + aid = '1234', + account_group_name = 'Account A', + is_current_account_group = True, + is_default_account_group = True, + organization_name = '' + ) + else: + return AccountGroup( + ) + """ + + def testAccountGroup(self): + """Test AccountGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group1.py b/admin/test/test_account_group1.py new file mode 100644 index 00000000..19fef0bc --- /dev/null +++ b/admin/test/test_account_group1.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group1 import AccountGroup1 + +class TestAccountGroup1(unittest.TestCase): + """AccountGroup1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroup1: + """Test AccountGroup1 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroup1` + """ + model = AccountGroup1() + if include_optional: + return AccountGroup1( + aid = '1234', + account_group_name = 'Account A' + ) + else: + return AccountGroup1( + ) + """ + + def testAccountGroup1(self): + """Test AccountGroup1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group_detail.py b/admin/test/test_account_group_detail.py new file mode 100644 index 00000000..5f2c67b7 --- /dev/null +++ b/admin/test/test_account_group_detail.py @@ -0,0 +1,69 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group_detail import AccountGroupDetail + +class TestAccountGroupDetail(unittest.TestCase): + """AccountGroupDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupDetail: + """Test AccountGroupDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupDetail` + """ + model = AccountGroupDetail() + if include_optional: + return AccountGroupDetail( + aid = '1234', + account_group_name = 'Account A', + is_current_account_group = True, + is_default_account_group = True, + organization_name = '', + users = [ + admin.models.user_account_group.UserAccountGroup( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '235', + last_login = '2022-07-17T22:00:54Z', + date_registered = '2022-07-17T22:00:54Z', + roles = [ + admin.models.role.Role() + ], ) + ], + agents = [ + null + ] + ) + else: + return AccountGroupDetail( + ) + """ + + def testAccountGroupDetail(self): + """Test AccountGroupDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group_id.py b/admin/test/test_account_group_id.py new file mode 100644 index 00000000..d22a9633 --- /dev/null +++ b/admin/test/test_account_group_id.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group_id import AccountGroupId + +class TestAccountGroupId(unittest.TestCase): + """AccountGroupId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupId: + """Test AccountGroupId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupId` + """ + model = AccountGroupId() + if include_optional: + return AccountGroupId( + aid = '1234' + ) + else: + return AccountGroupId( + ) + """ + + def testAccountGroupId(self): + """Test AccountGroupId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group_request_body.py b/admin/test/test_account_group_request_body.py new file mode 100644 index 00000000..f1340f59 --- /dev/null +++ b/admin/test/test_account_group_request_body.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group_request_body import AccountGroupRequestBody + +class TestAccountGroupRequestBody(unittest.TestCase): + """AccountGroupRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupRequestBody: + """Test AccountGroupRequestBody + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupRequestBody` + """ + model = AccountGroupRequestBody() + if include_optional: + return AccountGroupRequestBody( + account_group_name = 'My testing account group', + agents = ["105","719"] + ) + else: + return AccountGroupRequestBody( + account_group_name = 'My testing account group', + ) + """ + + def testAccountGroupRequestBody(self): + """Test AccountGroupRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group_roles.py b/admin/test/test_account_group_roles.py new file mode 100644 index 00000000..e89fb8fd --- /dev/null +++ b/admin/test/test_account_group_roles.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group_roles import AccountGroupRoles + +class TestAccountGroupRoles(unittest.TestCase): + """AccountGroupRoles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupRoles: + """Test AccountGroupRoles + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupRoles` + """ + model = AccountGroupRoles() + if include_optional: + return AccountGroupRoles( + account_group_roles = [ + admin.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( + account_group = admin.models.account_group_1.AccountGroup_1(), + roles = [ + admin.models.role.Role() + ], ) + ] + ) + else: + return AccountGroupRoles( + ) + """ + + def testAccountGroupRoles(self): + """Test AccountGroupRoles""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group_roles_account_group_roles_inner.py b/admin/test/test_account_group_roles_account_group_roles_inner.py new file mode 100644 index 00000000..a66ab396 --- /dev/null +++ b/admin/test/test_account_group_roles_account_group_roles_inner.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner + +class TestAccountGroupRolesAccountGroupRolesInner(unittest.TestCase): + """AccountGroupRolesAccountGroupRolesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupRolesAccountGroupRolesInner: + """Test AccountGroupRolesAccountGroupRolesInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupRolesAccountGroupRolesInner` + """ + model = AccountGroupRolesAccountGroupRolesInner() + if include_optional: + return AccountGroupRolesAccountGroupRolesInner( + account_group = admin.models.account_group_1.AccountGroup_1(), + roles = [ + admin.models.role.Role() + ] + ) + else: + return AccountGroupRolesAccountGroupRolesInner( + ) + """ + + def testAccountGroupRolesAccountGroupRolesInner(self): + """Test AccountGroupRolesAccountGroupRolesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_group_roles_request_body_inner.py b/admin/test/test_account_group_roles_request_body_inner.py new file mode 100644 index 00000000..b8f16a10 --- /dev/null +++ b/admin/test/test_account_group_roles_request_body_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner + +class TestAccountGroupRolesRequestBodyInner(unittest.TestCase): + """AccountGroupRolesRequestBodyInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupRolesRequestBodyInner: + """Test AccountGroupRolesRequestBodyInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupRolesRequestBodyInner` + """ + model = AccountGroupRolesRequestBodyInner() + if include_optional: + return AccountGroupRolesRequestBodyInner( + account_group_id = '315', + role_ids = ["57","1140"] + ) + else: + return AccountGroupRolesRequestBodyInner( + ) + """ + + def testAccountGroupRolesRequestBodyInner(self): + """Test AccountGroupRolesRequestBodyInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_account_groups.py b/admin/test/test_account_groups.py new file mode 100644 index 00000000..be9cfc06 --- /dev/null +++ b/admin/test/test_account_groups.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.account_groups import AccountGroups + +class TestAccountGroups(unittest.TestCase): + """AccountGroups unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroups: + """Test AccountGroups + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroups` + """ + model = AccountGroups() + if include_optional: + return AccountGroups( + account_groups = [ + admin.models.account_group.AccountGroup() + ] + ) + else: + return AccountGroups( + ) + """ + + def testAccountGroups(self): + """Test AccountGroups""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_agent.py b/admin/test/test_agent.py new file mode 100644 index 00000000..e2b38dbc --- /dev/null +++ b/admin/test/test_agent.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.agent import Agent + +class TestAgent(unittest.TestCase): + """Agent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Agent: + """Test Agent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Agent` + """ + model = Agent() + if include_optional: + return Agent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + agent_type = 'enterprise-cluster' + ) + else: + return Agent( + agent_type = 'enterprise-cluster', + ) + """ + + def testAgent(self): + """Test Agent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_agent_base.py b/admin/test/test_agent_base.py new file mode 100644 index 00000000..a7b016af --- /dev/null +++ b/admin/test/test_agent_base.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.agent_base import AgentBase + +class TestAgentBase(unittest.TestCase): + """AgentBase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentBase: + """Test AgentBase + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentBase` + """ + model = AgentBase() + if include_optional: + return AgentBase( + ip_addresses = ["99.139.65.220","9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce"], + public_ip_addresses = ["192.168.1.78","f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c"], + network = 'AT&T Services, Inc. (AS 7018)' + ) + else: + return AgentBase( + ) + """ + + def testAgentBase(self): + """Test AgentBase""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_all_account_group_roles.py b/admin/test/test_all_account_group_roles.py new file mode 100644 index 00000000..eaa3f17e --- /dev/null +++ b/admin/test/test_all_account_group_roles.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.all_account_group_roles import AllAccountGroupRoles + +class TestAllAccountGroupRoles(unittest.TestCase): + """AllAccountGroupRoles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AllAccountGroupRoles: + """Test AllAccountGroupRoles + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AllAccountGroupRoles` + """ + model = AllAccountGroupRoles() + if include_optional: + return AllAccountGroupRoles( + all_account_group_roles = [ + admin.models.role.Role() + ] + ) + else: + return AllAccountGroupRoles( + ) + """ + + def testAllAccountGroupRoles(self): + """Test AllAccountGroupRoles""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_base_role.py b/admin/test/test_base_role.py new file mode 100644 index 00000000..6d31be7f --- /dev/null +++ b/admin/test/test_base_role.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.base_role import BaseRole + +class TestBaseRole(unittest.TestCase): + """BaseRole unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseRole: + """Test BaseRole + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseRole` + """ + model = BaseRole() + if include_optional: + return BaseRole( + name = 'Organization Admin', + role_id = '35', + is_builtin = True + ) + else: + return BaseRole( + ) + """ + + def testBaseRole(self): + """Test BaseRole""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_cloud_enterprise_agent_type.py b/admin/test/test_cloud_enterprise_agent_type.py new file mode 100644 index 00000000..84248386 --- /dev/null +++ b/admin/test/test_cloud_enterprise_agent_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType + +class TestCloudEnterpriseAgentType(unittest.TestCase): + """CloudEnterpriseAgentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCloudEnterpriseAgentType(self): + """Test CloudEnterpriseAgentType""" + # inst = CloudEnterpriseAgentType() + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_cluster_member.py b/admin/test/test_cluster_member.py new file mode 100644 index 00000000..09019e28 --- /dev/null +++ b/admin/test/test_cluster_member.py @@ -0,0 +1,64 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.cluster_member import ClusterMember + +class TestClusterMember(unittest.TestCase): + """ClusterMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterMember: + """Test ClusterMember + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterMember` + """ + model = ClusterMember() + if include_optional: + return ClusterMember( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + member_id = '10', + name = 'Cluster member name', + error_details = [ + admin.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + target_for_tests = '1.1.1.1', + utilization = 25 + ) + else: + return ClusterMember( + ) + """ + + def testClusterMember(self): + """Test ClusterMember""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_create_account_group201_response.py b/admin/test/test_create_account_group201_response.py new file mode 100644 index 00000000..f89d349a --- /dev/null +++ b/admin/test/test_create_account_group201_response.py @@ -0,0 +1,76 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.create_account_group201_response import CreateAccountGroup201Response + +class TestCreateAccountGroup201Response(unittest.TestCase): + """CreateAccountGroup201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateAccountGroup201Response: + """Test CreateAccountGroup201Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateAccountGroup201Response` + """ + model = CreateAccountGroup201Response() + if include_optional: + return CreateAccountGroup201Response( + aid = '1234', + account_group_name = 'Account A', + is_current_account_group = True, + is_default_account_group = True, + organization_name = '', + users = [ + admin.models.user_account_group.UserAccountGroup( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '235', + last_login = '2022-07-17T22:00:54Z', + date_registered = '2022-07-17T22:00:54Z', + roles = [ + admin.models.role.Role() + ], ) + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return CreateAccountGroup201Response( + ) + """ + + def testCreateAccountGroup201Response(self): + """Test CreateAccountGroup201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_create_role201_response.py b/admin/test/test_create_role201_response.py new file mode 100644 index 00000000..a33952a1 --- /dev/null +++ b/admin/test/test_create_role201_response.py @@ -0,0 +1,64 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.create_role201_response import CreateRole201Response + +class TestCreateRole201Response(unittest.TestCase): + """CreateRole201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRole201Response: + """Test CreateRole201Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRole201Response` + """ + model = CreateRole201Response() + if include_optional: + return CreateRole201Response( + name = 'Organization Admin', + role_id = '35', + is_builtin = True, + permissions = [{label=View reports, permissionId=1, isManagementPermission=true, permission=REPORT_READ}, {label=View snapshots, permissionId=51, isManagementPermission=false, permission=REPORT_SNAPSHOTS_READ}], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return CreateRole201Response( + ) + """ + + def testCreateRole201Response(self): + """Test CreateRole201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_create_user201_response.py b/admin/test/test_create_user201_response.py new file mode 100644 index 00000000..622ef9af --- /dev/null +++ b/admin/test/test_create_user201_response.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.create_user201_response import CreateUser201Response + +class TestCreateUser201Response(unittest.TestCase): + """CreateUser201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateUser201Response: + """Test CreateUser201Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateUser201Response` + """ + model = CreateUser201Response() + if include_optional: + return CreateUser201Response( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '245', + date_registered = '2020-07-17T22:00:54Z', + login_account_group = admin.models.account_group_1.AccountGroup_1(), + account_group_roles = [ + admin.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( + account_group = admin.models.account_group_1.AccountGroup_1(), + roles = [ + admin.models.role.Role() + ], ) + ], + all_account_group_roles = [ + admin.models.role.Role() + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return CreateUser201Response( + ) + """ + + def testCreateUser201Response(self): + """Test CreateUser201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_created_user.py b/admin/test/test_created_user.py new file mode 100644 index 00000000..9c41feca --- /dev/null +++ b/admin/test/test_created_user.py @@ -0,0 +1,65 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.created_user import CreatedUser + +class TestCreatedUser(unittest.TestCase): + """CreatedUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreatedUser: + """Test CreatedUser + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreatedUser` + """ + model = CreatedUser() + if include_optional: + return CreatedUser( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '245', + date_registered = '2020-07-17T22:00:54Z', + login_account_group = admin.models.account_group_1.AccountGroup_1(), + account_group_roles = [ + admin.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( + account_group = admin.models.account_group_1.AccountGroup_1(), + roles = [ + admin.models.role.Role() + ], ) + ], + all_account_group_roles = [ + admin.models.role.Role() + ] + ) + else: + return CreatedUser( + ) + """ + + def testCreatedUser(self): + """Test CreatedUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_enterprise_agent.py b/admin/test/test_enterprise_agent.py new file mode 100644 index 00000000..6d7d24d1 --- /dev/null +++ b/admin/test/test_enterprise_agent.py @@ -0,0 +1,89 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.enterprise_agent import EnterpriseAgent + +class TestEnterpriseAgent(unittest.TestCase): + """EnterpriseAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgent: + """Test EnterpriseAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgent` + """ + model = EnterpriseAgent() + if include_optional: + return EnterpriseAgent( + agent_type = 'enterprise-cluster', + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + admin.models.account_group_1.AccountGroup_1() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + admin.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + admin.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ] + ) + else: + return EnterpriseAgent( + agent_type = 'enterprise-cluster', + ) + """ + + def testEnterpriseAgent(self): + """Test EnterpriseAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_enterprise_agent_data.py b/admin/test/test_enterprise_agent_data.py new file mode 100644 index 00000000..471eda06 --- /dev/null +++ b/admin/test/test_enterprise_agent_data.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.enterprise_agent_data import EnterpriseAgentData + +class TestEnterpriseAgentData(unittest.TestCase): + """EnterpriseAgentData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentData: + """Test EnterpriseAgentData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentData` + """ + model = EnterpriseAgentData() + if include_optional: + return EnterpriseAgentData( + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + admin.models.account_group_1.AccountGroup_1() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + admin.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + admin.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ] + ) + else: + return EnterpriseAgentData( + ) + """ + + def testEnterpriseAgentData(self): + """Test EnterpriseAgentData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_enterprise_agent_ipv6_policy.py b/admin/test/test_enterprise_agent_ipv6_policy.py new file mode 100644 index 00000000..ad5e2bbc --- /dev/null +++ b/admin/test/test_enterprise_agent_ipv6_policy.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy + +class TestEnterpriseAgentIpv6Policy(unittest.TestCase): + """EnterpriseAgentIpv6Policy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnterpriseAgentIpv6Policy(self): + """Test EnterpriseAgentIpv6Policy""" + # inst = EnterpriseAgentIpv6Policy() + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_enterprise_agent_state.py b/admin/test/test_enterprise_agent_state.py new file mode 100644 index 00000000..5c0b8c28 --- /dev/null +++ b/admin/test/test_enterprise_agent_state.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.enterprise_agent_state import EnterpriseAgentState + +class TestEnterpriseAgentState(unittest.TestCase): + """EnterpriseAgentState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnterpriseAgentState(self): + """Test EnterpriseAgentState""" + # inst = EnterpriseAgentState() + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_enterprise_agents.py b/admin/test/test_enterprise_agents.py new file mode 100644 index 00000000..c773c383 --- /dev/null +++ b/admin/test/test_enterprise_agents.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.enterprise_agents import EnterpriseAgents + +class TestEnterpriseAgents(unittest.TestCase): + """EnterpriseAgents unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgents: + """Test EnterpriseAgents + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgents` + """ + model = EnterpriseAgents() + if include_optional: + return EnterpriseAgents( + agents = [ + null + ] + ) + else: + return EnterpriseAgents( + ) + """ + + def testEnterpriseAgents(self): + """Test EnterpriseAgents""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_error.py b/admin/test/test_error.py new file mode 100644 index 00000000..226bfedc --- /dev/null +++ b/admin/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_error_detail.py b/admin/test/test_error_detail.py new file mode 100644 index 00000000..4065cda0 --- /dev/null +++ b/admin/test/test_error_detail.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.error_detail import ErrorDetail + +class TestErrorDetail(unittest.TestCase): + """ErrorDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ErrorDetail: + """Test ErrorDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ErrorDetail` + """ + model = ErrorDetail() + if include_optional: + return ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)' + ) + else: + return ErrorDetail( + ) + """ + + def testErrorDetail(self): + """Test ErrorDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_error_detail_code.py b/admin/test/test_error_detail_code.py new file mode 100644 index 00000000..8e480915 --- /dev/null +++ b/admin/test/test_error_detail_code.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.error_detail_code import ErrorDetailCode + +class TestErrorDetailCode(unittest.TestCase): + """ErrorDetailCode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorDetailCode(self): + """Test ErrorDetailCode""" + # inst = ErrorDetailCode() + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_expand.py b/admin/test/test_expand.py new file mode 100644 index 00000000..cfd4c3af --- /dev/null +++ b/admin/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_extended_user.py b/admin/test/test_extended_user.py new file mode 100644 index 00000000..5ad90b13 --- /dev/null +++ b/admin/test/test_extended_user.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.extended_user import ExtendedUser + +class TestExtendedUser(unittest.TestCase): + """ExtendedUser unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExtendedUser: + """Test ExtendedUser + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExtendedUser` + """ + model = ExtendedUser() + if include_optional: + return ExtendedUser( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '245', + date_registered = '2020-07-17T22:00:54Z', + login_account_group = admin.models.account_group_1.AccountGroup_1(), + last_login = '2022-07-17T22:00:54Z' + ) + else: + return ExtendedUser( + ) + """ + + def testExtendedUser(self): + """Test ExtendedUser""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_account_group200_response.py b/admin/test/test_get_account_group200_response.py new file mode 100644 index 00000000..93a75e15 --- /dev/null +++ b/admin/test/test_get_account_group200_response.py @@ -0,0 +1,79 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_account_group200_response import GetAccountGroup200Response + +class TestGetAccountGroup200Response(unittest.TestCase): + """GetAccountGroup200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAccountGroup200Response: + """Test GetAccountGroup200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAccountGroup200Response` + """ + model = GetAccountGroup200Response() + if include_optional: + return GetAccountGroup200Response( + aid = '1234', + account_group_name = 'Account A', + is_current_account_group = True, + is_default_account_group = True, + organization_name = '', + users = [ + admin.models.user_account_group.UserAccountGroup( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '235', + last_login = '2022-07-17T22:00:54Z', + date_registered = '2022-07-17T22:00:54Z', + roles = [ + admin.models.role.Role() + ], ) + ], + agents = [ + null + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetAccountGroup200Response( + ) + """ + + def testGetAccountGroup200Response(self): + """Test GetAccountGroup200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_account_groups200_response.py b/admin/test/test_get_account_groups200_response.py new file mode 100644 index 00000000..f8d730e9 --- /dev/null +++ b/admin/test/test_get_account_groups200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_account_groups200_response import GetAccountGroups200Response + +class TestGetAccountGroups200Response(unittest.TestCase): + """GetAccountGroups200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAccountGroups200Response: + """Test GetAccountGroups200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAccountGroups200Response` + """ + model = GetAccountGroups200Response() + if include_optional: + return GetAccountGroups200Response( + account_groups = [ + admin.models.account_group.AccountGroup() + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetAccountGroups200Response( + ) + """ + + def testGetAccountGroups200Response(self): + """Test GetAccountGroups200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_permissions200_response.py b/admin/test/test_get_permissions200_response.py new file mode 100644 index 00000000..664047e1 --- /dev/null +++ b/admin/test/test_get_permissions200_response.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_permissions200_response import GetPermissions200Response + +class TestGetPermissions200Response(unittest.TestCase): + """GetPermissions200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetPermissions200Response: + """Test GetPermissions200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetPermissions200Response` + """ + model = GetPermissions200Response() + if include_optional: + return GetPermissions200Response( + permissions = [{label=View reports, permissionId=1, isManagementPermission=true, permission=REPORT_READ}, {label=View snapshots, permissionId=51, isManagementPermission=false, permission=REPORT_SNAPSHOTS_READ}], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetPermissions200Response( + ) + """ + + def testGetPermissions200Response(self): + """Test GetPermissions200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_roles200_response.py b/admin/test/test_get_roles200_response.py new file mode 100644 index 00000000..3e9e0caa --- /dev/null +++ b/admin/test/test_get_roles200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_roles200_response import GetRoles200Response + +class TestGetRoles200Response(unittest.TestCase): + """GetRoles200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetRoles200Response: + """Test GetRoles200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetRoles200Response` + """ + model = GetRoles200Response() + if include_optional: + return GetRoles200Response( + roles = [ + admin.models.role.Role() + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetRoles200Response( + ) + """ + + def testGetRoles200Response(self): + """Test GetRoles200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_user200_response.py b/admin/test/test_get_user200_response.py new file mode 100644 index 00000000..55d3a1f0 --- /dev/null +++ b/admin/test/test_get_user200_response.py @@ -0,0 +1,76 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_user200_response import GetUser200Response + +class TestGetUser200Response(unittest.TestCase): + """GetUser200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetUser200Response: + """Test GetUser200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetUser200Response` + """ + model = GetUser200Response() + if include_optional: + return GetUser200Response( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '245', + date_registered = '2020-07-17T22:00:54Z', + login_account_group = admin.models.account_group_1.AccountGroup_1(), + last_login = '2022-07-17T22:00:54Z', + account_group_roles = [ + admin.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( + account_group = admin.models.account_group_1.AccountGroup_1(), + roles = [ + admin.models.role.Role() + ], ) + ], + all_account_group_roles = [ + admin.models.role.Role() + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetUser200Response( + ) + """ + + def testGetUser200Response(self): + """Test GetUser200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_user_events200_response.py b/admin/test/test_get_user_events200_response.py new file mode 100644 index 00000000..244704a6 --- /dev/null +++ b/admin/test/test_get_user_events200_response.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_user_events200_response import GetUserEvents200Response + +class TestGetUserEvents200Response(unittest.TestCase): + """GetUserEvents200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetUserEvents200Response: + """Test GetUserEvents200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetUserEvents200Response` + """ + model = GetUserEvents200Response() + if include_optional: + return GetUserEvents200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + audit_events = [{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)}], + links = admin.models.pagination_links__links.PaginationLinks__links( + previous = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetUserEvents200Response( + ) + """ + + def testGetUserEvents200Response(self): + """Test GetUserEvents200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_get_users200_response.py b/admin/test/test_get_users200_response.py new file mode 100644 index 00000000..144f74f8 --- /dev/null +++ b/admin/test/test_get_users200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.get_users200_response import GetUsers200Response + +class TestGetUsers200Response(unittest.TestCase): + """GetUsers200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetUsers200Response: + """Test GetUsers200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetUsers200Response` + """ + model = GetUsers200Response() + if include_optional: + return GetUsers200Response( + users = [ + null + ], + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetUsers200Response( + ) + """ + + def testGetUsers200Response(self): + """Test GetUsers200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_interface_ip_mapping.py b/admin/test/test_interface_ip_mapping.py new file mode 100644 index 00000000..f3a4b641 --- /dev/null +++ b/admin/test/test_interface_ip_mapping.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.interface_ip_mapping import InterfaceIpMapping + +class TestInterfaceIpMapping(unittest.TestCase): + """InterfaceIpMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InterfaceIpMapping: + """Test InterfaceIpMapping + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InterfaceIpMapping` + """ + model = InterfaceIpMapping() + if include_optional: + return InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"] + ) + else: + return InterfaceIpMapping( + ) + """ + + def testInterfaceIpMapping(self): + """Test InterfaceIpMapping""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_link.py b/admin/test/test_link.py new file mode 100644 index 00000000..6b37b8e7 --- /dev/null +++ b/admin/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_login_account_group.py b/admin/test/test_login_account_group.py new file mode 100644 index 00000000..3ee0d688 --- /dev/null +++ b/admin/test/test_login_account_group.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.login_account_group import LoginAccountGroup + +class TestLoginAccountGroup(unittest.TestCase): + """LoginAccountGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LoginAccountGroup: + """Test LoginAccountGroup + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LoginAccountGroup` + """ + model = LoginAccountGroup() + if include_optional: + return LoginAccountGroup( + login_account_group = admin.models.account_group_1.AccountGroup_1() + ) + else: + return LoginAccountGroup( + ) + """ + + def testLoginAccountGroup(self): + """Test LoginAccountGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_new_account_group_response.py b/admin/test/test_new_account_group_response.py new file mode 100644 index 00000000..c06577d8 --- /dev/null +++ b/admin/test/test_new_account_group_response.py @@ -0,0 +1,66 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.new_account_group_response import NewAccountGroupResponse + +class TestNewAccountGroupResponse(unittest.TestCase): + """NewAccountGroupResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NewAccountGroupResponse: + """Test NewAccountGroupResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NewAccountGroupResponse` + """ + model = NewAccountGroupResponse() + if include_optional: + return NewAccountGroupResponse( + aid = '1234', + account_group_name = 'Account A', + is_current_account_group = True, + is_default_account_group = True, + organization_name = '', + users = [ + admin.models.user_account_group.UserAccountGroup( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '235', + last_login = '2022-07-17T22:00:54Z', + date_registered = '2022-07-17T22:00:54Z', + roles = [ + admin.models.role.Role() + ], ) + ] + ) + else: + return NewAccountGroupResponse( + ) + """ + + def testNewAccountGroupResponse(self): + """Test NewAccountGroupResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_pagination_links.py b/admin/test/test_pagination_links.py new file mode 100644 index 00000000..e2f2d666 --- /dev/null +++ b/admin/test/test_pagination_links.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.pagination_links import PaginationLinks + +class TestPaginationLinks(unittest.TestCase): + """PaginationLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinks: + """Test PaginationLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinks` + """ + model = PaginationLinks() + if include_optional: + return PaginationLinks( + links = admin.models.pagination_links__links.PaginationLinks__links( + previous = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return PaginationLinks( + ) + """ + + def testPaginationLinks(self): + """Test PaginationLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_pagination_links_links.py b/admin/test/test_pagination_links_links.py new file mode 100644 index 00000000..b92443ae --- /dev/null +++ b/admin/test/test_pagination_links_links.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.pagination_links_links import PaginationLinksLinks + +class TestPaginationLinksLinks(unittest.TestCase): + """PaginationLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinksLinks: + """Test PaginationLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinksLinks` + """ + model = PaginationLinksLinks() + if include_optional: + return PaginationLinksLinks( + previous = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationLinksLinks( + ) + """ + + def testPaginationLinksLinks(self): + """Test PaginationLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_permission.py b/admin/test/test_permission.py new file mode 100644 index 00000000..cd885eab --- /dev/null +++ b/admin/test/test_permission.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.permission import Permission + +class TestPermission(unittest.TestCase): + """Permission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Permission: + """Test Permission + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Permission` + """ + model = Permission() + if include_optional: + return Permission( + label = 'View reports', + permission_id = '56', + is_management_permission = True, + permission = 'REPORT_SNAPSHOTS_READ' + ) + else: + return Permission( + ) + """ + + def testPermission(self): + """Test Permission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_permissions.py b/admin/test/test_permissions.py new file mode 100644 index 00000000..752b9e6c --- /dev/null +++ b/admin/test/test_permissions.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.permissions import Permissions + +class TestPermissions(unittest.TestCase): + """Permissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Permissions: + """Test Permissions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Permissions` + """ + model = Permissions() + if include_optional: + return Permissions( + permissions = [{"label":"View reports","permissionId":1,"isManagementPermission":true,"permission":"REPORT_READ"},{"label":"View snapshots","permissionId":51,"isManagementPermission":false,"permission":"REPORT_SNAPSHOTS_READ"}] + ) + else: + return Permissions( + ) + """ + + def testPermissions(self): + """Test Permissions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_query_window.py b/admin/test/test_query_window.py new file mode 100644 index 00000000..547e60df --- /dev/null +++ b/admin/test/test_query_window.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.query_window import QueryWindow + +class TestQueryWindow(unittest.TestCase): + """QueryWindow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QueryWindow: + """Test QueryWindow + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QueryWindow` + """ + model = QueryWindow() + if include_optional: + return QueryWindow( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z' + ) + else: + return QueryWindow( + ) + """ + + def testQueryWindow(self): + """Test QueryWindow""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_role.py b/admin/test/test_role.py new file mode 100644 index 00000000..3e5ef21e --- /dev/null +++ b/admin/test/test_role.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.role import Role + +class TestRole(unittest.TestCase): + """Role unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Role: + """Test Role + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Role` + """ + model = Role() + if include_optional: + return Role( + name = 'Organization Admin', + role_id = '35', + is_builtin = True, + has_management_permissions = True + ) + else: + return Role( + ) + """ + + def testRole(self): + """Test Role""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_role_detail.py b/admin/test/test_role_detail.py new file mode 100644 index 00000000..d072caf4 --- /dev/null +++ b/admin/test/test_role_detail.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.role_detail import RoleDetail + +class TestRoleDetail(unittest.TestCase): + """RoleDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleDetail: + """Test RoleDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleDetail` + """ + model = RoleDetail() + if include_optional: + return RoleDetail( + name = 'Organization Admin', + role_id = '35', + is_builtin = True, + permissions = [{label=View reports, permissionId=1, isManagementPermission=true, permission=REPORT_READ}, {label=View snapshots, permissionId=51, isManagementPermission=false, permission=REPORT_SNAPSHOTS_READ}] + ) + else: + return RoleDetail( + ) + """ + + def testRoleDetail(self): + """Test RoleDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_role_request_body.py b/admin/test/test_role_request_body.py new file mode 100644 index 00000000..897c1c05 --- /dev/null +++ b/admin/test/test_role_request_body.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.role_request_body import RoleRequestBody + +class TestRoleRequestBody(unittest.TestCase): + """RoleRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RoleRequestBody: + """Test RoleRequestBody + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RoleRequestBody` + """ + model = RoleRequestBody() + if include_optional: + return RoleRequestBody( + name = 'Organization Admin', + permissions = ["56","315"] + ) + else: + return RoleRequestBody( + ) + """ + + def testRoleRequestBody(self): + """Test RoleRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_roles.py b/admin/test/test_roles.py new file mode 100644 index 00000000..2cbbcb25 --- /dev/null +++ b/admin/test/test_roles.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.roles import Roles + +class TestRoles(unittest.TestCase): + """Roles unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Roles: + """Test Roles + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Roles` + """ + model = Roles() + if include_optional: + return Roles( + roles = [ + admin.models.role.Role() + ] + ) + else: + return Roles( + ) + """ + + def testRoles(self): + """Test Roles""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_self_links.py b/admin/test/test_self_links.py new file mode 100644 index 00000000..0217b233 --- /dev/null +++ b/admin/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = admin.models.self_links__links.SelfLinks__links( + self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_self_links_links.py b/admin/test/test_self_links_links.py new file mode 100644 index 00000000..5ec105f9 --- /dev/null +++ b/admin/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = admin.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_simple_agent.py b/admin/test/test_simple_agent.py new file mode 100644 index 00000000..65c73220 --- /dev/null +++ b/admin/test/test_simple_agent.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.simple_agent import SimpleAgent + +class TestSimpleAgent(unittest.TestCase): + """SimpleAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleAgent: + """Test SimpleAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleAgent` + """ + model = SimpleAgent() + if include_optional: + return SimpleAgent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True + ) + else: + return SimpleAgent( + ) + """ + + def testSimpleAgent(self): + """Test SimpleAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_unauthorized_error.py b/admin/test/test_unauthorized_error.py new file mode 100644 index 00000000..58a0eb43 --- /dev/null +++ b/admin/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user.py b/admin/test/test_user.py new file mode 100644 index 00000000..4b3a203d --- /dev/null +++ b/admin/test/test_user.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user import User + +class TestUser(unittest.TestCase): + """User unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> User: + """Test User + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `User` + """ + model = User() + if include_optional: + return User( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '245', + date_registered = '2020-07-17T22:00:54Z', + login_account_group = admin.models.account_group_1.AccountGroup_1() + ) + else: + return User( + ) + """ + + def testUser(self): + """Test User""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_account_group.py b/admin/test/test_user_account_group.py new file mode 100644 index 00000000..20b01c34 --- /dev/null +++ b/admin/test/test_user_account_group.py @@ -0,0 +1,58 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_account_group import UserAccountGroup + +class TestUserAccountGroup(unittest.TestCase): + """UserAccountGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserAccountGroup: + """Test UserAccountGroup + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAccountGroup` + """ + model = UserAccountGroup() + if include_optional: + return UserAccountGroup( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '235', + last_login = '2022-07-17T22:00:54Z', + date_registered = '2022-07-17T22:00:54Z', + roles = [ + admin.models.role.Role() + ] + ) + else: + return UserAccountGroup( + ) + """ + + def testUserAccountGroup(self): + """Test UserAccountGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_account_groups.py b/admin/test/test_user_account_groups.py new file mode 100644 index 00000000..3b9ff4f9 --- /dev/null +++ b/admin/test/test_user_account_groups.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_account_groups import UserAccountGroups + +class TestUserAccountGroups(unittest.TestCase): + """UserAccountGroups unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserAccountGroups: + """Test UserAccountGroups + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserAccountGroups` + """ + model = UserAccountGroups() + if include_optional: + return UserAccountGroups( + users = [ + admin.models.user_account_group.UserAccountGroup( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '235', + last_login = '2022-07-17T22:00:54Z', + date_registered = '2022-07-17T22:00:54Z', + roles = [ + admin.models.role.Role() + ], ) + ] + ) + else: + return UserAccountGroups( + ) + """ + + def testUserAccountGroups(self): + """Test UserAccountGroups""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_detail.py b/admin/test/test_user_detail.py new file mode 100644 index 00000000..ff4d8c5f --- /dev/null +++ b/admin/test/test_user_detail.py @@ -0,0 +1,66 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_detail import UserDetail + +class TestUserDetail(unittest.TestCase): + """UserDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserDetail: + """Test UserDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDetail` + """ + model = UserDetail() + if include_optional: + return UserDetail( + name = 'User X', + email = 'userx@thousandeyes.com', + uid = '245', + date_registered = '2020-07-17T22:00:54Z', + login_account_group = admin.models.account_group_1.AccountGroup_1(), + last_login = '2022-07-17T22:00:54Z', + account_group_roles = [ + admin.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( + account_group = admin.models.account_group_1.AccountGroup_1(), + roles = [ + admin.models.role.Role() + ], ) + ], + all_account_group_roles = [ + admin.models.role.Role() + ] + ) + else: + return UserDetail( + ) + """ + + def testUserDetail(self): + """Test UserDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_event.py b/admin/test/test_user_event.py new file mode 100644 index 00000000..d6536fca --- /dev/null +++ b/admin/test/test_user_event.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_event import UserEvent + +class TestUserEvent(unittest.TestCase): + """UserEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserEvent: + """Test UserEvent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserEvent` + """ + model = UserEvent() + if include_optional: + return UserEvent( + aid = '1234', + account_group_name = 'Account A', + var_date = '2020-07-17T22:00:54Z', + event = 'Login failed.', + ip_address = '99.128.0.0/11', + uid = '245', + user = 'API Sandbox User (noreply@thousandeyes.com)', + resources = [ + admin.models.user_event_all_of_resources_inner.UserEvent_allOf_resources_inner( + type = '', + name = '', ) + ] + ) + else: + return UserEvent( + ) + """ + + def testUserEvent(self): + """Test UserEvent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_event_all_of_resources_inner.py b/admin/test/test_user_event_all_of_resources_inner.py new file mode 100644 index 00000000..c1ccb532 --- /dev/null +++ b/admin/test/test_user_event_all_of_resources_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner + +class TestUserEventAllOfResourcesInner(unittest.TestCase): + """UserEventAllOfResourcesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserEventAllOfResourcesInner: + """Test UserEventAllOfResourcesInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserEventAllOfResourcesInner` + """ + model = UserEventAllOfResourcesInner() + if include_optional: + return UserEventAllOfResourcesInner( + type = '', + name = '' + ) + else: + return UserEventAllOfResourcesInner( + ) + """ + + def testUserEventAllOfResourcesInner(self): + """Test UserEventAllOfResourcesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_events.py b/admin/test/test_user_events.py new file mode 100644 index 00000000..3cd878f0 --- /dev/null +++ b/admin/test/test_user_events.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_events import UserEvents + +class TestUserEvents(unittest.TestCase): + """UserEvents unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserEvents: + """Test UserEvents + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserEvents` + """ + model = UserEvents() + if include_optional: + return UserEvents( + audit_events = [{"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)"}] + ) + else: + return UserEvents( + ) + """ + + def testUserEvents(self): + """Test UserEvents""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_user_request_body.py b/admin/test/test_user_request_body.py new file mode 100644 index 00000000..32b2f79c --- /dev/null +++ b/admin/test/test_user_request_body.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.user_request_body import UserRequestBody + +class TestUserRequestBody(unittest.TestCase): + """UserRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserRequestBody: + """Test UserRequestBody + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserRequestBody` + """ + model = UserRequestBody() + if include_optional: + return UserRequestBody( + name = 'User X', + email = 'userx@thousandeyes.com', + login_account_group_id = '691', + account_group_roles = [ + admin.models.account_group_roles_request_body_inner.AccountGroupRolesRequestBody_inner( + account_group_id = '315', + role_ids = ["57","1140"], ) + ], + all_account_group_role_ids = ["57","1140"] + ) + else: + return UserRequestBody( + ) + """ + + def testUserRequestBody(self): + """Test UserRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_users.py b/admin/test/test_users.py new file mode 100644 index 00000000..137f89d0 --- /dev/null +++ b/admin/test/test_users.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.users import Users + +class TestUsers(unittest.TestCase): + """Users unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Users: + """Test Users + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Users` + """ + model = Users() + if include_optional: + return Users( + users = [ + null + ] + ) + else: + return Users( + ) + """ + + def testUsers(self): + """Test Users""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_validation_error.py b/admin/test/test_validation_error.py new file mode 100644 index 00000000..ee2cec8b --- /dev/null +++ b/admin/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + admin.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin/test/test_validation_error_all_of_errors.py b/admin/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..ef072c80 --- /dev/null +++ b/admin/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from admin.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/admin_api/.github/workflows/python.yml b/admin_api/.github/workflows/python.yml deleted file mode 100644 index cbc5a5c7..00000000 --- a/admin_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: admin_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/admin_api/.gitlab-ci.yml b/admin_api/.gitlab-ci.yml deleted file mode 100644 index 3d11cfd8..00000000 --- a/admin_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=admin_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/admin_api/.openapi-generator/FILES b/admin_api/.openapi-generator/FILES deleted file mode 100644 index d1a017a8..00000000 --- a/admin_api/.openapi-generator/FILES +++ /dev/null @@ -1,218 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -admin_api/__init__.py -admin_api/api/__init__.py -admin_api/api/account_groups_api.py -admin_api/api/permissions_api.py -admin_api/api/roles_api.py -admin_api/api/user_events_api.py -admin_api/api/users_api.py -admin_api/api_client.py -admin_api/api_response.py -admin_api/configuration.py -admin_api/exceptions.py -admin_api/models/__init__.py -admin_api/models/account_group.py -admin_api/models/account_group1.py -admin_api/models/account_group_detail.py -admin_api/models/account_group_id.py -admin_api/models/account_group_request_body.py -admin_api/models/account_group_roles.py -admin_api/models/account_group_roles_account_group_roles_inner.py -admin_api/models/account_group_roles_request_body_inner.py -admin_api/models/account_groups.py -admin_api/models/agent.py -admin_api/models/agent_base.py -admin_api/models/all_account_group_roles.py -admin_api/models/base_role.py -admin_api/models/cloud_enterprise_agent_type.py -admin_api/models/cluster_member.py -admin_api/models/create_account_group201_response.py -admin_api/models/create_role201_response.py -admin_api/models/create_user201_response.py -admin_api/models/created_user.py -admin_api/models/enterprise_agent.py -admin_api/models/enterprise_agent_ipv6_policy.py -admin_api/models/enterprise_agent_state.py -admin_api/models/enterprise_agents.py -admin_api/models/error.py -admin_api/models/error_detail.py -admin_api/models/error_detail_code.py -admin_api/models/expand.py -admin_api/models/extended_user.py -admin_api/models/get_account_group200_response.py -admin_api/models/get_account_groups200_response.py -admin_api/models/get_permissions200_response.py -admin_api/models/get_roles200_response.py -admin_api/models/get_user200_response.py -admin_api/models/get_user_events200_response.py -admin_api/models/get_users200_response.py -admin_api/models/interface_ip_mapping.py -admin_api/models/link.py -admin_api/models/login_account_group.py -admin_api/models/new_account_group_response.py -admin_api/models/pagination_links.py -admin_api/models/pagination_links_links.py -admin_api/models/permission.py -admin_api/models/permissions.py -admin_api/models/query_window.py -admin_api/models/role.py -admin_api/models/role_detail.py -admin_api/models/role_request_body.py -admin_api/models/roles.py -admin_api/models/self_links.py -admin_api/models/self_links_links.py -admin_api/models/unauthorized_error.py -admin_api/models/user.py -admin_api/models/user_account_group.py -admin_api/models/user_account_groups.py -admin_api/models/user_detail.py -admin_api/models/user_event.py -admin_api/models/user_event_all_of_resources_inner.py -admin_api/models/user_events.py -admin_api/models/user_request_body.py -admin_api/models/users.py -admin_api/py.typed -admin_api/rest.py -docs/AccountGroup.md -docs/AccountGroup1.md -docs/AccountGroupDetail.md -docs/AccountGroupId.md -docs/AccountGroupRequestBody.md -docs/AccountGroupRoles.md -docs/AccountGroupRolesAccountGroupRolesInner.md -docs/AccountGroupRolesRequestBodyInner.md -docs/AccountGroups.md -docs/AccountGroupsApi.md -docs/Agent.md -docs/AgentBase.md -docs/AllAccountGroupRoles.md -docs/BaseRole.md -docs/CloudEnterpriseAgentType.md -docs/ClusterMember.md -docs/CreateAccountGroup201Response.md -docs/CreateRole201Response.md -docs/CreateUser201Response.md -docs/CreatedUser.md -docs/EnterpriseAgent.md -docs/EnterpriseAgentIpv6Policy.md -docs/EnterpriseAgentState.md -docs/EnterpriseAgents.md -docs/Error.md -docs/ErrorDetail.md -docs/ErrorDetailCode.md -docs/Expand.md -docs/ExtendedUser.md -docs/GetAccountGroup200Response.md -docs/GetAccountGroups200Response.md -docs/GetPermissions200Response.md -docs/GetRoles200Response.md -docs/GetUser200Response.md -docs/GetUserEvents200Response.md -docs/GetUsers200Response.md -docs/InterfaceIpMapping.md -docs/Link.md -docs/LoginAccountGroup.md -docs/NewAccountGroupResponse.md -docs/PaginationLinks.md -docs/PaginationLinksLinks.md -docs/Permission.md -docs/Permissions.md -docs/PermissionsApi.md -docs/QueryWindow.md -docs/Role.md -docs/RoleDetail.md -docs/RoleRequestBody.md -docs/Roles.md -docs/RolesApi.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/UnauthorizedError.md -docs/User.md -docs/UserAccountGroup.md -docs/UserAccountGroups.md -docs/UserDetail.md -docs/UserEvent.md -docs/UserEventAllOfResourcesInner.md -docs/UserEvents.md -docs/UserEventsApi.md -docs/UserRequestBody.md -docs/Users.md -docs/UsersApi.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group.py -test/test_account_group1.py -test/test_account_group_detail.py -test/test_account_group_id.py -test/test_account_group_request_body.py -test/test_account_group_roles.py -test/test_account_group_roles_account_group_roles_inner.py -test/test_account_group_roles_request_body_inner.py -test/test_account_groups.py -test/test_account_groups_api.py -test/test_agent.py -test/test_agent_base.py -test/test_all_account_group_roles.py -test/test_base_role.py -test/test_cloud_enterprise_agent_type.py -test/test_cluster_member.py -test/test_create_account_group201_response.py -test/test_create_role201_response.py -test/test_create_user201_response.py -test/test_created_user.py -test/test_enterprise_agent.py -test/test_enterprise_agent_ipv6_policy.py -test/test_enterprise_agent_state.py -test/test_enterprise_agents.py -test/test_error.py -test/test_error_detail.py -test/test_error_detail_code.py -test/test_expand.py -test/test_extended_user.py -test/test_get_account_group200_response.py -test/test_get_account_groups200_response.py -test/test_get_permissions200_response.py -test/test_get_roles200_response.py -test/test_get_user200_response.py -test/test_get_user_events200_response.py -test/test_get_users200_response.py -test/test_interface_ip_mapping.py -test/test_link.py -test/test_login_account_group.py -test/test_new_account_group_response.py -test/test_pagination_links.py -test/test_pagination_links_links.py -test/test_permission.py -test/test_permissions.py -test/test_permissions_api.py -test/test_query_window.py -test/test_role.py -test/test_role_detail.py -test/test_role_request_body.py -test/test_roles.py -test/test_roles_api.py -test/test_self_links.py -test/test_self_links_links.py -test/test_unauthorized_error.py -test/test_user.py -test/test_user_account_group.py -test/test_user_account_groups.py -test/test_user_detail.py -test/test_user_event.py -test/test_user_event_all_of_resources_inner.py -test/test_user_events.py -test/test_user_events_api.py -test/test_user_request_body.py -test/test_users.py -test/test_users_api.py -tox.ini diff --git a/admin_api/.openapi-generator/VERSION b/admin_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/admin_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/admin_api/.travis.yml b/admin_api/.travis.yml deleted file mode 100644 index 26d8878d..00000000 --- a/admin_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=admin_api diff --git a/admin_api/README.md b/admin_api/README.md deleted file mode 100644 index 1ac01000..00000000 --- a/admin_api/README.md +++ /dev/null @@ -1,205 +0,0 @@ -# admin-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. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import admin_api -``` - -### 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 admin_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import admin_api -from admin_api.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 = admin_api.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 = admin_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with admin_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = admin_api.AccountGroupsApi(api_client) - account_group_request_body = admin_api.AccountGroupRequestBody() # AccountGroupRequestBody | - expand = [admin_api.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_body, 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) - - [AccountGroup1](docs/AccountGroup1.md) - - [AccountGroupDetail](docs/AccountGroupDetail.md) - - [AccountGroupId](docs/AccountGroupId.md) - - [AccountGroupRequestBody](docs/AccountGroupRequestBody.md) - - [AccountGroupRoles](docs/AccountGroupRoles.md) - - [AccountGroupRolesAccountGroupRolesInner](docs/AccountGroupRolesAccountGroupRolesInner.md) - - [AccountGroupRolesRequestBodyInner](docs/AccountGroupRolesRequestBodyInner.md) - - [AccountGroups](docs/AccountGroups.md) - - [Agent](docs/Agent.md) - - [AgentBase](docs/AgentBase.md) - - [AllAccountGroupRoles](docs/AllAccountGroupRoles.md) - - [BaseRole](docs/BaseRole.md) - - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) - - [ClusterMember](docs/ClusterMember.md) - - [CreateAccountGroup201Response](docs/CreateAccountGroup201Response.md) - - [CreateRole201Response](docs/CreateRole201Response.md) - - [CreateUser201Response](docs/CreateUser201Response.md) - - [CreatedUser](docs/CreatedUser.md) - - [EnterpriseAgent](docs/EnterpriseAgent.md) - - [EnterpriseAgentIpv6Policy](docs/EnterpriseAgentIpv6Policy.md) - - [EnterpriseAgentState](docs/EnterpriseAgentState.md) - - [EnterpriseAgents](docs/EnterpriseAgents.md) - - [Error](docs/Error.md) - - [ErrorDetail](docs/ErrorDetail.md) - - [ErrorDetailCode](docs/ErrorDetailCode.md) - - [Expand](docs/Expand.md) - - [ExtendedUser](docs/ExtendedUser.md) - - [GetAccountGroup200Response](docs/GetAccountGroup200Response.md) - - [GetAccountGroups200Response](docs/GetAccountGroups200Response.md) - - [GetPermissions200Response](docs/GetPermissions200Response.md) - - [GetRoles200Response](docs/GetRoles200Response.md) - - [GetUser200Response](docs/GetUser200Response.md) - - [GetUserEvents200Response](docs/GetUserEvents200Response.md) - - [GetUsers200Response](docs/GetUsers200Response.md) - - [InterfaceIpMapping](docs/InterfaceIpMapping.md) - - [Link](docs/Link.md) - - [LoginAccountGroup](docs/LoginAccountGroup.md) - - [NewAccountGroupResponse](docs/NewAccountGroupResponse.md) - - [PaginationLinks](docs/PaginationLinks.md) - - [PaginationLinksLinks](docs/PaginationLinksLinks.md) - - [Permission](docs/Permission.md) - - [Permissions](docs/Permissions.md) - - [QueryWindow](docs/QueryWindow.md) - - [Role](docs/Role.md) - - [RoleDetail](docs/RoleDetail.md) - - [RoleRequestBody](docs/RoleRequestBody.md) - - [Roles](docs/Roles.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [User](docs/User.md) - - [UserAccountGroup](docs/UserAccountGroup.md) - - [UserAccountGroups](docs/UserAccountGroups.md) - - [UserDetail](docs/UserDetail.md) - - [UserEvent](docs/UserEvent.md) - - [UserEventAllOfResourcesInner](docs/UserEventAllOfResourcesInner.md) - - [UserEvents](docs/UserEvents.md) - - [UserRequestBody](docs/UserRequestBody.md) - - [Users](docs/Users.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/admin_api/admin_api/__init__.py b/admin_api/admin_api/__init__.py deleted file mode 100644 index 83f7ca50..00000000 --- a/admin_api/admin_api/__init__.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 admin_api.api.account_groups_api import AccountGroupsApi -from admin_api.api.permissions_api import PermissionsApi -from admin_api.api.roles_api import RolesApi -from admin_api.api.user_events_api import UserEventsApi -from admin_api.api.users_api import UsersApi - -# import ApiClient -from admin_api.api_response import ApiResponse -from admin_api.api_client import ApiClient -from admin_api.configuration import Configuration -from admin_api.exceptions import OpenApiException -from admin_api.exceptions import ApiTypeError -from admin_api.exceptions import ApiValueError -from admin_api.exceptions import ApiKeyError -from admin_api.exceptions import ApiAttributeError -from admin_api.exceptions import ApiException - -# import models into sdk package -from admin_api.models.account_group import AccountGroup -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.account_group_detail import AccountGroupDetail -from admin_api.models.account_group_id import AccountGroupId -from admin_api.models.account_group_request_body import AccountGroupRequestBody -from admin_api.models.account_group_roles import AccountGroupRoles -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -from admin_api.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner -from admin_api.models.account_groups import AccountGroups -from admin_api.models.agent import Agent -from admin_api.models.agent_base import AgentBase -from admin_api.models.all_account_group_roles import AllAccountGroupRoles -from admin_api.models.base_role import BaseRole -from admin_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from admin_api.models.cluster_member import ClusterMember -from admin_api.models.create_account_group201_response import CreateAccountGroup201Response -from admin_api.models.create_role201_response import CreateRole201Response -from admin_api.models.create_user201_response import CreateUser201Response -from admin_api.models.created_user import CreatedUser -from admin_api.models.enterprise_agent import EnterpriseAgent -from admin_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from admin_api.models.enterprise_agent_state import EnterpriseAgentState -from admin_api.models.enterprise_agents import EnterpriseAgents -from admin_api.models.error import Error -from admin_api.models.error_detail import ErrorDetail -from admin_api.models.error_detail_code import ErrorDetailCode -from admin_api.models.expand import Expand -from admin_api.models.extended_user import ExtendedUser -from admin_api.models.get_account_group200_response import GetAccountGroup200Response -from admin_api.models.get_account_groups200_response import GetAccountGroups200Response -from admin_api.models.get_permissions200_response import GetPermissions200Response -from admin_api.models.get_roles200_response import GetRoles200Response -from admin_api.models.get_user200_response import GetUser200Response -from admin_api.models.get_user_events200_response import GetUserEvents200Response -from admin_api.models.get_users200_response import GetUsers200Response -from admin_api.models.interface_ip_mapping import InterfaceIpMapping -from admin_api.models.link import Link -from admin_api.models.login_account_group import LoginAccountGroup -from admin_api.models.new_account_group_response import NewAccountGroupResponse -from admin_api.models.pagination_links import PaginationLinks -from admin_api.models.pagination_links_links import PaginationLinksLinks -from admin_api.models.permission import Permission -from admin_api.models.permissions import Permissions -from admin_api.models.query_window import QueryWindow -from admin_api.models.role import Role -from admin_api.models.role_detail import RoleDetail -from admin_api.models.role_request_body import RoleRequestBody -from admin_api.models.roles import Roles -from admin_api.models.self_links import SelfLinks -from admin_api.models.self_links_links import SelfLinksLinks -from admin_api.models.unauthorized_error import UnauthorizedError -from admin_api.models.user import User -from admin_api.models.user_account_group import UserAccountGroup -from admin_api.models.user_account_groups import UserAccountGroups -from admin_api.models.user_detail import UserDetail -from admin_api.models.user_event import UserEvent -from admin_api.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner -from admin_api.models.user_events import UserEvents -from admin_api.models.user_request_body import UserRequestBody -from admin_api.models.users import Users diff --git a/admin_api/admin_api/api/__init__.py b/admin_api/admin_api/api/__init__.py deleted file mode 100644 index a63ca435..00000000 --- a/admin_api/admin_api/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from admin_api.api.account_groups_api import AccountGroupsApi -from admin_api.api.permissions_api import PermissionsApi -from admin_api.api.roles_api import RolesApi -from admin_api.api.user_events_api import UserEventsApi -from admin_api.api.users_api import UsersApi - diff --git a/admin_api/admin_api/api_client.py b/admin_api/admin_api/api_client.py deleted file mode 100644 index 94ebfe98..00000000 --- a/admin_api/admin_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from admin_api.configuration import Configuration -from admin_api.api_response import ApiResponse -import admin_api.models -from admin_api import rest -from admin_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(admin_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/admin_api/admin_api/api_response.py b/admin_api/admin_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/admin_api/admin_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/admin_api/admin_api/configuration.py b/admin_api/admin_api/configuration.py deleted file mode 100644 index 32987fed..00000000 --- a/admin_api/admin_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("admin_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/admin_api/admin_api/exceptions.py b/admin_api/admin_api/exceptions.py deleted file mode 100644 index c092517b..00000000 --- a/admin_api/admin_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/admin_api/admin_api/models/__init__.py b/admin_api/admin_api/models/__init__.py deleted file mode 100644 index 4058f1ac..00000000 --- a/admin_api/admin_api/models/__init__.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from admin_api.models.account_group import AccountGroup -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.account_group_detail import AccountGroupDetail -from admin_api.models.account_group_id import AccountGroupId -from admin_api.models.account_group_request_body import AccountGroupRequestBody -from admin_api.models.account_group_roles import AccountGroupRoles -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -from admin_api.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner -from admin_api.models.account_groups import AccountGroups -from admin_api.models.agent import Agent -from admin_api.models.agent_base import AgentBase -from admin_api.models.all_account_group_roles import AllAccountGroupRoles -from admin_api.models.base_role import BaseRole -from admin_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from admin_api.models.cluster_member import ClusterMember -from admin_api.models.create_account_group201_response import CreateAccountGroup201Response -from admin_api.models.create_role201_response import CreateRole201Response -from admin_api.models.create_user201_response import CreateUser201Response -from admin_api.models.created_user import CreatedUser -from admin_api.models.enterprise_agent import EnterpriseAgent -from admin_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from admin_api.models.enterprise_agent_state import EnterpriseAgentState -from admin_api.models.enterprise_agents import EnterpriseAgents -from admin_api.models.error import Error -from admin_api.models.error_detail import ErrorDetail -from admin_api.models.error_detail_code import ErrorDetailCode -from admin_api.models.expand import Expand -from admin_api.models.extended_user import ExtendedUser -from admin_api.models.get_account_group200_response import GetAccountGroup200Response -from admin_api.models.get_account_groups200_response import GetAccountGroups200Response -from admin_api.models.get_permissions200_response import GetPermissions200Response -from admin_api.models.get_roles200_response import GetRoles200Response -from admin_api.models.get_user200_response import GetUser200Response -from admin_api.models.get_user_events200_response import GetUserEvents200Response -from admin_api.models.get_users200_response import GetUsers200Response -from admin_api.models.interface_ip_mapping import InterfaceIpMapping -from admin_api.models.link import Link -from admin_api.models.login_account_group import LoginAccountGroup -from admin_api.models.new_account_group_response import NewAccountGroupResponse -from admin_api.models.pagination_links import PaginationLinks -from admin_api.models.pagination_links_links import PaginationLinksLinks -from admin_api.models.permission import Permission -from admin_api.models.permissions import Permissions -from admin_api.models.query_window import QueryWindow -from admin_api.models.role import Role -from admin_api.models.role_detail import RoleDetail -from admin_api.models.role_request_body import RoleRequestBody -from admin_api.models.roles import Roles -from admin_api.models.self_links import SelfLinks -from admin_api.models.self_links_links import SelfLinksLinks -from admin_api.models.unauthorized_error import UnauthorizedError -from admin_api.models.user import User -from admin_api.models.user_account_group import UserAccountGroup -from admin_api.models.user_account_groups import UserAccountGroups -from admin_api.models.user_detail import UserDetail -from admin_api.models.user_event import UserEvent -from admin_api.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner -from admin_api.models.user_events import UserEvents -from admin_api.models.user_request_body import UserRequestBody -from admin_api.models.users import Users diff --git a/admin_api/admin_api/models/account_group.py b/admin_api/admin_api/models/account_group.py deleted file mode 100644 index d5248f7d..00000000 --- a/admin_api/admin_api/models/account_group.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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") - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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"), - "isCurrentAccountGroup": obj.get("isCurrentAccountGroup"), - "isDefaultAccountGroup": obj.get("isDefaultAccountGroup"), - "organizationName": obj.get("organizationName") - }) - return _obj - - diff --git a/admin_api/admin_api/models/account_group1.py b/admin_api/admin_api/models/account_group1.py deleted file mode 100644 index 569b7648..00000000 --- a/admin_api/admin_api/models/account_group1.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroup1(BaseModel): - """ - AccountGroup1 - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroup1 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroup1 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/admin_api/admin_api/models/account_group_detail.py b/admin_api/admin_api/models/account_group_detail.py deleted file mode 100644 index ae5f1b80..00000000 --- a/admin_api/admin_api/models/account_group_detail.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.enterprise_agent import EnterpriseAgent -from admin_api.models.user_account_group import UserAccountGroup -try: - from typing import Self -except ImportError: - 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 - agents: Optional[List[EnterpriseAgent]] = None - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 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: Dict) -> 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.get("users")] if obj.get("users") is not None else None, - "agents": [EnterpriseAgent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/account_group_id.py b/admin_api/admin_api/models/account_group_id.py deleted file mode 100644 index 224fcbae..00000000 --- a/admin_api/admin_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/admin_api/admin_api/models/account_group_request_body.py b/admin_api/admin_api/models/account_group_request_body.py deleted file mode 100644 index ab4bd331..00000000 --- a/admin_api/admin_api/models/account_group_request_body.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupRequestBody(BaseModel): - """ - AccountGroupRequestBody - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupRequestBody 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupRequestBody 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/admin_api/admin_api/models/account_group_roles.py b/admin_api/admin_api/models/account_group_roles.py deleted file mode 100644 index 3c635c1d..00000000 --- a/admin_api/admin_api/models/account_group_roles.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupRoles(BaseModel): - """ - AccountGroupRoles - """ # noqa: E501 - account_group_roles: Optional[List[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") - __properties: ClassVar[List[str]] = ["accountGroupRoles"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupRoles 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of AccountGroupRoles from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.from_dict(_item) for _item in obj.get("accountGroupRoles")] if obj.get("accountGroupRoles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/account_group_roles_account_group_roles_inner.py b/admin_api/admin_api/models/account_group_roles_account_group_roles_inner.py deleted file mode 100644 index ffc2ce88..00000000 --- a/admin_api/admin_api/models/account_group_roles_account_group_roles_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.role import Role -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupRolesAccountGroupRolesInner(BaseModel): - """ - AccountGroupRolesAccountGroupRolesInner - """ # noqa: E501 - account_group: Optional[AccountGroup1] = Field(default=None, alias="accountGroup") - roles: Optional[List[Role]] = None - __properties: ClassVar[List[str]] = ["accountGroup", "roles"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupRolesAccountGroupRolesInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of AccountGroupRolesAccountGroupRolesInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountGroup": AccountGroup1.from_dict(obj.get("accountGroup")) if obj.get("accountGroup") is not None else None, - "roles": [Role.from_dict(_item) for _item in obj.get("roles")] if obj.get("roles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/account_group_roles_request_body_inner.py b/admin_api/admin_api/models/account_group_roles_request_body_inner.py deleted file mode 100644 index 92cd8e86..00000000 --- a/admin_api/admin_api/models/account_group_roles_request_body_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupRolesRequestBodyInner(BaseModel): - """ - AccountGroupRolesRequestBodyInner - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupRolesRequestBodyInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupRolesRequestBodyInner 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/admin_api/admin_api/models/account_groups.py b/admin_api/admin_api/models/account_groups.py deleted file mode 100644 index 92d3c6be..00000000 --- a/admin_api/admin_api/models/account_groups.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.account_group import AccountGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroups(BaseModel): - """ - AccountGroups - """ # noqa: E501 - account_groups: Optional[List[AccountGroup]] = Field(default=None, alias="accountGroups") - __properties: ClassVar[List[str]] = ["accountGroups"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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": [AccountGroup.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/agent.py b/admin_api/admin_api/models/agent.py deleted file mode 100644 index 62ee766e..00000000 --- a/admin_api/admin_api/models/agent.py +++ /dev/null @@ -1,121 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -try: - from typing import Self -except ImportError: - 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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", "agentType", "location", "countryId", "enabled", "verifySslCertificates"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates") - }) - return _obj - - diff --git a/admin_api/admin_api/models/agent_base.py b/admin_api/admin_api/models/agent_base.py deleted file mode 100644 index f14b6193..00000000 --- a/admin_api/admin_api/models/agent_base.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/all_account_group_roles.py b/admin_api/admin_api/models/all_account_group_roles.py deleted file mode 100644 index 4d5eef39..00000000 --- a/admin_api/admin_api/models/all_account_group_roles.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.role import Role -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AllAccountGroupRoles(BaseModel): - """ - AllAccountGroupRoles - """ # noqa: E501 - all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") - __properties: ClassVar[List[str]] = ["allAccountGroupRoles"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AllAccountGroupRoles 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AllAccountGroupRoles from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj.get("allAccountGroupRoles")] if obj.get("allAccountGroupRoles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/base_role.py b/admin_api/admin_api/models/base_role.py deleted file mode 100644 index c1c69d60..00000000 --- a/admin_api/admin_api/models/base_role.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/cloud_enterprise_agent_type.py b/admin_api/admin_api/models/cloud_enterprise_agent_type.py deleted file mode 100644 index cdebf7c0..00000000 --- a/admin_api/admin_api/models/cloud_enterprise_agent_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/admin_api/admin_api/models/cluster_member.py b/admin_api/admin_api/models/cluster_member.py deleted file mode 100644 index c09bee81..00000000 --- a/admin_api/admin_api/models/cluster_member.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from admin_api.models.enterprise_agent_state import EnterpriseAgentState -from admin_api.models.error_detail import ErrorDetail -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "member_id", - "name", - "error_details", - "last_seen", - "utilization", - }, - 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: Dict) -> 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.get("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/admin_api/admin_api/models/create_account_group201_response.py b/admin_api/admin_api/models/create_account_group201_response.py deleted file mode 100644 index b7876518..00000000 --- a/admin_api/admin_api/models/create_account_group201_response.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.self_links_links import SelfLinksLinks -from admin_api.models.user_account_group import UserAccountGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateAccountGroup201Response(BaseModel): - """ - CreateAccountGroup201Response - """ # 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[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateAccountGroup201Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of CreateAccountGroup201Response 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.get("users")] if obj.get("users") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/create_role201_response.py b/admin_api/admin_api/models/create_role201_response.py deleted file mode 100644 index f9356b1a..00000000 --- a/admin_api/admin_api/models/create_role201_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.permission import Permission -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateRole201Response(BaseModel): - """ - CreateRole201Response - """ # 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[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "permissions", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateRole201Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of CreateRole201Response 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.get("permissions")] if obj.get("permissions") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/create_user201_response.py b/admin_api/admin_api/models/create_user201_response.py deleted file mode 100644 index b2a1731a..00000000 --- a/admin_api/admin_api/models/create_user201_response.py +++ /dev/null @@ -1,126 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -from admin_api.models.role import Role -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateUser201Response(BaseModel): - """ - CreateUser201Response - """ # 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[AccountGroup1] = Field(default=None, alias="loginAccountGroup") - account_group_roles: Optional[List[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") - all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "accountGroupRoles", "allAccountGroupRoles", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateUser201Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of CreateUser201Response 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": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None, - "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.from_dict(_item) for _item in obj.get("accountGroupRoles")] if obj.get("accountGroupRoles") is not None else None, - "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj.get("allAccountGroupRoles")] if obj.get("allAccountGroupRoles") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/created_user.py b/admin_api/admin_api/models/created_user.py deleted file mode 100644 index 0d2a0491..00000000 --- a/admin_api/admin_api/models/created_user.py +++ /dev/null @@ -1,120 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -from admin_api.models.role import Role -try: - from typing import Self -except ImportError: - 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[AccountGroup1] = Field(default=None, alias="loginAccountGroup") - account_group_roles: Optional[List[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") - all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") - __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "accountGroupRoles", "allAccountGroupRoles"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None, - "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.from_dict(_item) for _item in obj.get("accountGroupRoles")] if obj.get("accountGroupRoles") is not None else None, - "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj.get("allAccountGroupRoles")] if obj.get("allAccountGroupRoles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/enterprise_agent.py b/admin_api/admin_api/models/enterprise_agent.py deleted file mode 100644 index 2efd33c9..00000000 --- a/admin_api/admin_api/models/enterprise_agent.py +++ /dev/null @@ -1,199 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from admin_api.models.cluster_member import ClusterMember -from admin_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from admin_api.models.enterprise_agent_state import EnterpriseAgentState -from admin_api.models.error_detail import ErrorDetail -from admin_api.models.interface_ip_mapping import InterfaceIpMapping -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EnterpriseAgent(BaseModel): - """ - EnterpriseAgent - """ # 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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[AccountGroup1]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") - 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]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "agentType", "location", "countryId", "enabled", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "prefix", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - "cluster_members", - "utilization", - "prefix", - "error_details", - "hostname", - "last_seen", - "created_date", - "interface_ip_mappings", - }, - 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: Dict) -> 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({ - "ipAddresses": obj.get("ipAddresses"), - "publicIpAddresses": obj.get("publicIpAddresses"), - "network": obj.get("network"), - "agentId": obj.get("agentId"), - "agentName": obj.get("agentName"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates"), - "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj.get("clusterMembers")] if obj.get("clusterMembers") is not None else None, - "utilization": obj.get("utilization"), - "accountGroups": [AccountGroup1.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None, - "prefix": obj.get("prefix"), - "ipv6Policy": obj.get("ipv6Policy"), - "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj.get("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.get("interfaceIpMappings")] if obj.get("interfaceIpMappings") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/enterprise_agent_ipv6_policy.py b/admin_api/admin_api/models/enterprise_agent_ipv6_policy.py deleted file mode 100644 index c3693f09..00000000 --- a/admin_api/admin_api/models/enterprise_agent_ipv6_policy.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/admin_api/admin_api/models/enterprise_agent_state.py b/admin_api/admin_api/models/enterprise_agent_state.py deleted file mode 100644 index eaa28aff..00000000 --- a/admin_api/admin_api/models/enterprise_agent_state.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/admin_api/admin_api/models/enterprise_agents.py b/admin_api/admin_api/models/enterprise_agents.py deleted file mode 100644 index dd7e467e..00000000 --- a/admin_api/admin_api/models/enterprise_agents.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from admin_api.models.enterprise_agent import EnterpriseAgent -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EnterpriseAgents(BaseModel): - """ - EnterpriseAgents - """ # noqa: E501 - agents: Optional[List[EnterpriseAgent]] = None - __properties: ClassVar[List[str]] = ["agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EnterpriseAgents 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of EnterpriseAgents from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agents": [EnterpriseAgent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/error.py b/admin_api/admin_api/models/error.py deleted file mode 100644 index 9b9d6032..00000000 --- a/admin_api/admin_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/error_detail.py b/admin_api/admin_api/models/error_detail.py deleted file mode 100644 index 02e1b323..00000000 --- a/admin_api/admin_api/models/error_detail.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.error_detail_code import ErrorDetailCode -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "description", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/error_detail_code.py b/admin_api/admin_api/models/error_detail_code.py deleted file mode 100644 index 96d5eef9..00000000 --- a/admin_api/admin_api/models/error_detail_code.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/admin_api/admin_api/models/expand.py b/admin_api/admin_api/models/expand.py deleted file mode 100644 index ced69069..00000000 --- a/admin_api/admin_api/models/expand.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/admin_api/admin_api/models/extended_user.py b/admin_api/admin_api/models/extended_user.py deleted file mode 100644 index d328c26d..00000000 --- a/admin_api/admin_api/models/extended_user.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -try: - from typing import Self -except ImportError: - 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[AccountGroup1] = 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> 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": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None, - "lastLogin": obj.get("lastLogin") - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_account_group200_response.py b/admin_api/admin_api/models/get_account_group200_response.py deleted file mode 100644 index a0fccd80..00000000 --- a/admin_api/admin_api/models/get_account_group200_response.py +++ /dev/null @@ -1,122 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.enterprise_agent import EnterpriseAgent -from admin_api.models.self_links_links import SelfLinksLinks -from admin_api.models.user_account_group import UserAccountGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAccountGroup200Response(BaseModel): - """ - GetAccountGroup200Response - """ # 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 - agents: Optional[List[EnterpriseAgent]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "agents", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAccountGroup200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 each item in agents (list) - _items = [] - if self.agents: - for _item in self.agents: - if _item: - _items.append(_item.to_dict()) - _dict['agents'] = _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: Dict) -> Self: - """Create an instance of GetAccountGroup200Response 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.get("users")] if obj.get("users") is not None else None, - "agents": [EnterpriseAgent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_account_groups200_response.py b/admin_api/admin_api/models/get_account_groups200_response.py deleted file mode 100644 index 6a7cd961..00000000 --- a/admin_api/admin_api/models/get_account_groups200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.account_group import AccountGroup -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAccountGroups200Response(BaseModel): - """ - GetAccountGroups200Response - """ # noqa: E501 - account_groups: Optional[List[AccountGroup]] = Field(default=None, alias="accountGroups") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["accountGroups", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAccountGroups200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of GetAccountGroups200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "accountGroups": [AccountGroup.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_permissions200_response.py b/admin_api/admin_api/models/get_permissions200_response.py deleted file mode 100644 index f127d472..00000000 --- a/admin_api/admin_api/models/get_permissions200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.permission import Permission -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetPermissions200Response(BaseModel): - """ - GetPermissions200Response - """ # noqa: E501 - permissions: Optional[List[Permission]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["permissions", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetPermissions200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of GetPermissions200Response 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.get("permissions")] if obj.get("permissions") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_roles200_response.py b/admin_api/admin_api/models/get_roles200_response.py deleted file mode 100644 index a9d92571..00000000 --- a/admin_api/admin_api/models/get_roles200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.role import Role -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetRoles200Response(BaseModel): - """ - GetRoles200Response - """ # noqa: E501 - roles: Optional[List[Role]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["roles", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetRoles200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of GetRoles200Response 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.get("roles")] if obj.get("roles") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_user200_response.py b/admin_api/admin_api/models/get_user200_response.py deleted file mode 100644 index 1ebe120b..00000000 --- a/admin_api/admin_api/models/get_user200_response.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -from admin_api.models.role import Role -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetUser200Response(BaseModel): - """ - GetUser200Response - """ # 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[AccountGroup1] = 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[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") - all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "lastLogin", "accountGroupRoles", "allAccountGroupRoles", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUser200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of GetUser200Response 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": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None, - "lastLogin": obj.get("lastLogin"), - "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.from_dict(_item) for _item in obj.get("accountGroupRoles")] if obj.get("accountGroupRoles") is not None else None, - "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj.get("allAccountGroupRoles")] if obj.get("allAccountGroupRoles") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_user_events200_response.py b/admin_api/admin_api/models/get_user_events200_response.py deleted file mode 100644 index 1e99f719..00000000 --- a/admin_api/admin_api/models/get_user_events200_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.self_links_links import SelfLinksLinks -from admin_api.models.user_event import UserEvent -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetUserEvents200Response(BaseModel): - """ - GetUserEvents200Response - """ # noqa: E501 - 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") - audit_events: Optional[List[UserEvent]] = Field(default=None, alias="auditEvents") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["startDate", "endDate", "auditEvents", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUserEvents200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - 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: Dict) -> Self: - """Create an instance of GetUserEvents200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "auditEvents": [UserEvent.from_dict(_item) for _item in obj.get("auditEvents")] if obj.get("auditEvents") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/get_users200_response.py b/admin_api/admin_api/models/get_users200_response.py deleted file mode 100644 index 54ccecff..00000000 --- a/admin_api/admin_api/models/get_users200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.extended_user import ExtendedUser -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetUsers200Response(BaseModel): - """ - GetUsers200Response - """ # noqa: E501 - users: Optional[List[ExtendedUser]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["users", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsers200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of GetUsers200Response 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.get("users")] if obj.get("users") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/interface_ip_mapping.py b/admin_api/admin_api/models/interface_ip_mapping.py deleted file mode 100644 index e3c1dab2..00000000 --- a/admin_api/admin_api/models/interface_ip_mapping.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "interface_name", - "ip_addresses", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/link.py b/admin_api/admin_api/models/link.py deleted file mode 100644 index 0b108601..00000000 --- a/admin_api/admin_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/login_account_group.py b/admin_api/admin_api/models/login_account_group.py deleted file mode 100644 index a4d53783..00000000 --- a/admin_api/admin_api/models/login_account_group.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class LoginAccountGroup(BaseModel): - """ - LoginAccountGroup - """ # noqa: E501 - login_account_group: Optional[AccountGroup1] = Field(default=None, alias="loginAccountGroup") - __properties: ClassVar[List[str]] = ["loginAccountGroup"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of LoginAccountGroup 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of LoginAccountGroup from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "loginAccountGroup": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/new_account_group_response.py b/admin_api/admin_api/models/new_account_group_response.py deleted file mode 100644 index 2eb974d2..00000000 --- a/admin_api/admin_api/models/new_account_group_response.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.user_account_group import UserAccountGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NewAccountGroupResponse(BaseModel): - """ - NewAccountGroupResponse - """ # 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 - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NewAccountGroupResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NewAccountGroupResponse 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.get("users")] if obj.get("users") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/pagination_links.py b/admin_api/admin_api/models/pagination_links.py deleted file mode 100644 index 2c0bdbc0..00000000 --- a/admin_api/admin_api/models/pagination_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.pagination_links_links import PaginationLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinks(BaseModel): - """ - A links object containing pagination related link(s). - """ # noqa: E501 - links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": PaginationLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/pagination_links_links.py b/admin_api/admin_api/models/pagination_links_links.py deleted file mode 100644 index 37221c29..00000000 --- a/admin_api/admin_api/models/pagination_links_links.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from admin_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinksLinks(BaseModel): - """ - PaginationLinksLinks - """ # noqa: E501 - previous: Optional[Link] = None - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["previous", "next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationLinksLinks 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.get("previous")) if obj.get("previous") is not None else None, - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/permission.py b/admin_api/admin_api/models/permission.py deleted file mode 100644 index cecb13de..00000000 --- a/admin_api/admin_api/models/permission.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/permissions.py b/admin_api/admin_api/models/permissions.py deleted file mode 100644 index 0881fa2b..00000000 --- a/admin_api/admin_api/models/permissions.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from admin_api.models.permission import Permission -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Permissions(BaseModel): - """ - Permissions - """ # noqa: E501 - permissions: Optional[List[Permission]] = None - __properties: ClassVar[List[str]] = ["permissions"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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.get("permissions")] if obj.get("permissions") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/query_window.py b/admin_api/admin_api/models/query_window.py deleted file mode 100644 index 94b87f5f..00000000 --- a/admin_api/admin_api/models/query_window.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QueryWindow(BaseModel): - """ - QueryWindow - """ # noqa: E501 - 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") - __properties: ClassVar[List[str]] = ["startDate", "endDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QueryWindow 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QueryWindow from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate") - }) - return _obj - - diff --git a/admin_api/admin_api/models/role.py b/admin_api/admin_api/models/role.py deleted file mode 100644 index 0b17c30b..00000000 --- a/admin_api/admin_api/models/role.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/role_detail.py b/admin_api/admin_api/models/role_detail.py deleted file mode 100644 index 22d04588..00000000 --- a/admin_api/admin_api/models/role_detail.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from admin_api.models.permission import Permission -try: - from typing import Self -except ImportError: - 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 - __properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "permissions"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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.get("permissions")] if obj.get("permissions") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/role_request_body.py b/admin_api/admin_api/models/role_request_body.py deleted file mode 100644 index 71458ad9..00000000 --- a/admin_api/admin_api/models/role_request_body.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/roles.py b/admin_api/admin_api/models/roles.py deleted file mode 100644 index 19f6d8c8..00000000 --- a/admin_api/admin_api/models/roles.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from admin_api.models.role import Role -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Roles(BaseModel): - """ - Roles - """ # noqa: E501 - roles: Optional[List[Role]] = None - __properties: ClassVar[List[str]] = ["roles"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> 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.get("roles")] if obj.get("roles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/self_links.py b/admin_api/admin_api/models/self_links.py deleted file mode 100644 index e0d58827..00000000 --- a/admin_api/admin_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/self_links_links.py b/admin_api/admin_api/models/self_links_links.py deleted file mode 100644 index a01290b8..00000000 --- a/admin_api/admin_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/unauthorized_error.py b/admin_api/admin_api/models/unauthorized_error.py deleted file mode 100644 index 84e40ec7..00000000 --- a/admin_api/admin_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/admin_api/admin_api/models/user.py b/admin_api/admin_api/models/user.py deleted file mode 100644 index fa5749e5..00000000 --- a/admin_api/admin_api/models/user.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -try: - from typing import Self -except ImportError: - 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[AccountGroup1] = Field(default=None, alias="loginAccountGroup") - __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> 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": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/user_account_group.py b/admin_api/admin_api/models/user_account_group.py deleted file mode 100644 index 08b176ea..00000000 --- a/admin_api/admin_api/models/user_account_group.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.role import Role -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> 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.get("roles")] if obj.get("roles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/user_account_groups.py b/admin_api/admin_api/models/user_account_groups.py deleted file mode 100644 index 9ec895aa..00000000 --- a/admin_api/admin_api/models/user_account_groups.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from admin_api.models.user_account_group import UserAccountGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UserAccountGroups(BaseModel): - """ - UserAccountGroups - """ # noqa: E501 - users: Optional[List[UserAccountGroup]] = None - __properties: ClassVar[List[str]] = ["users"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UserAccountGroups 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UserAccountGroups from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "users": [UserAccountGroup.from_dict(_item) for _item in obj.get("users")] if obj.get("users") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/user_detail.py b/admin_api/admin_api/models/user_detail.py deleted file mode 100644 index a16660cf..00000000 --- a/admin_api/admin_api/models/user_detail.py +++ /dev/null @@ -1,122 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group1 import AccountGroup1 -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner -from admin_api.models.role import Role -try: - from typing import Self -except ImportError: - 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[AccountGroup1] = 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[AccountGroupRolesAccountGroupRolesInner]] = Field(default=None, alias="accountGroupRoles") - all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") - __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "lastLogin", "accountGroupRoles", "allAccountGroupRoles"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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": AccountGroup1.from_dict(obj.get("loginAccountGroup")) if obj.get("loginAccountGroup") is not None else None, - "lastLogin": obj.get("lastLogin"), - "accountGroupRoles": [AccountGroupRolesAccountGroupRolesInner.from_dict(_item) for _item in obj.get("accountGroupRoles")] if obj.get("accountGroupRoles") is not None else None, - "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj.get("allAccountGroupRoles")] if obj.get("allAccountGroupRoles") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/user_event.py b/admin_api/admin_api/models/user_event.py deleted file mode 100644 index 9dc40065..00000000 --- a/admin_api/admin_api/models/user_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner -try: - from typing import Self -except ImportError: - 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[UserEventAllOfResourcesInner]] = None - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "date", "event", "ipAddress", "uid", "user", "resources"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> 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": [UserEventAllOfResourcesInner.from_dict(_item) for _item in obj.get("resources")] if obj.get("resources") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/user_event_all_of_resources_inner.py b/admin_api/admin_api/models/user_event_all_of_resources_inner.py deleted file mode 100644 index bc4e2244..00000000 --- a/admin_api/admin_api/models/user_event_all_of_resources_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UserEventAllOfResourcesInner(BaseModel): - """ - UserEventAllOfResourcesInner - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UserEventAllOfResourcesInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UserEventAllOfResourcesInner 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/admin_api/admin_api/models/user_events.py b/admin_api/admin_api/models/user_events.py deleted file mode 100644 index 0079c137..00000000 --- a/admin_api/admin_api/models/user_events.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from admin_api.models.user_event import UserEvent -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UserEvents(BaseModel): - """ - UserEvents - """ # noqa: E501 - audit_events: Optional[List[UserEvent]] = Field(default=None, alias="auditEvents") - __properties: ClassVar[List[str]] = ["auditEvents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UserEvents 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UserEvents 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.get("auditEvents")] if obj.get("auditEvents") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/models/user_request_body.py b/admin_api/admin_api/models/user_request_body.py deleted file mode 100644 index 04cf0d96..00000000 --- a/admin_api/admin_api/models/user_request_body.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from admin_api.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UserRequestBody(BaseModel): - """ - UserRequestBody - """ # 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[AccountGroupRolesRequestBodyInner]] = 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UserRequestBody 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of UserRequestBody 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": [AccountGroupRolesRequestBodyInner.from_dict(_item) for _item in obj.get("accountGroupRoles")] if obj.get("accountGroupRoles") is not None else None, - "allAccountGroupRoleIds": obj.get("allAccountGroupRoleIds") - }) - return _obj - - diff --git a/admin_api/admin_api/models/users.py b/admin_api/admin_api/models/users.py deleted file mode 100644 index deaaecc0..00000000 --- a/admin_api/admin_api/models/users.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from admin_api.models.extended_user import ExtendedUser -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Users(BaseModel): - """ - Users - """ # noqa: E501 - users: Optional[List[ExtendedUser]] = None - __properties: ClassVar[List[str]] = ["users"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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.get("users")] if obj.get("users") is not None else None - }) - return _obj - - diff --git a/admin_api/admin_api/rest.py b/admin_api/admin_api/rest.py deleted file mode 100644 index dc0c453a..00000000 --- a/admin_api/admin_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from admin_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/admin_api/docs/AccountGroup.md b/admin_api/docs/AccountGroup.md deleted file mode 100644 index d6f9c450..00000000 --- a/admin_api/docs/AccountGroup.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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] -**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 admin_api.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_form_dict = account_group.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/admin_api/docs/AccountGroupId.md b/admin_api/docs/AccountGroupId.md deleted file mode 100644 index 172a3e78..00000000 --- a/admin_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from admin_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/admin_api/docs/AccountGroupRolesAccountGroupRolesInner.md b/admin_api/docs/AccountGroupRolesAccountGroupRolesInner.md deleted file mode 100644 index d954ba17..00000000 --- a/admin_api/docs/AccountGroupRolesAccountGroupRolesInner.md +++ /dev/null @@ -1,29 +0,0 @@ -# AccountGroupRolesAccountGroupRolesInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_group** | [**AccountGroup1**](AccountGroup1.md) | | [optional] -**roles** | [**List[Role]**](Role.md) | | [optional] - -## Example - -```python -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupRolesAccountGroupRolesInner from a JSON string -account_group_roles_account_group_roles_inner_instance = AccountGroupRolesAccountGroupRolesInner.from_json(json) -# print the JSON string representation of the object -print AccountGroupRolesAccountGroupRolesInner.to_json() - -# convert the object into a dict -account_group_roles_account_group_roles_inner_dict = account_group_roles_account_group_roles_inner_instance.to_dict() -# create an instance of AccountGroupRolesAccountGroupRolesInner from a dict -account_group_roles_account_group_roles_inner_form_dict = account_group_roles_account_group_roles_inner.from_dict(account_group_roles_account_group_roles_inner_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/admin_api/docs/Agent.md b/admin_api/docs/Agent.md deleted file mode 100644 index 7a21d0f5..00000000 --- a/admin_api/docs/Agent.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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 admin_api.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_form_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/admin_api/docs/AgentBase.md b/admin_api/docs/AgentBase.md deleted file mode 100644 index e7dfe60a..00000000 --- a/admin_api/docs/AgentBase.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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 admin_api.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_form_dict = agent_base.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/admin_api/docs/CloudEnterpriseAgentType.md b/admin_api/docs/CloudEnterpriseAgentType.md deleted file mode 100644 index 951c803e..00000000 --- a/admin_api/docs/CloudEnterpriseAgentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/admin_api/docs/ClusterMember.md b/admin_api/docs/ClusterMember.md deleted file mode 100644 index 9ab70ee3..00000000 --- a/admin_api/docs/ClusterMember.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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 admin_api.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_form_dict = cluster_member.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/admin_api/docs/EnterpriseAgent.md b/admin_api/docs/EnterpriseAgent.md deleted file mode 100644 index 60ac4e54..00000000 --- a/admin_api/docs/EnterpriseAgent.md +++ /dev/null @@ -1,51 +0,0 @@ -# EnterpriseAgent - - -## 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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[AccountGroup1]**](AccountGroup1.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] -**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 admin_api.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_form_dict = enterprise_agent.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/admin_api/docs/EnterpriseAgentIpv6Policy.md b/admin_api/docs/EnterpriseAgentIpv6Policy.md deleted file mode 100644 index 28e3b47f..00000000 --- a/admin_api/docs/EnterpriseAgentIpv6Policy.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/admin_api/docs/EnterpriseAgentState.md b/admin_api/docs/EnterpriseAgentState.md deleted file mode 100644 index a9ec4b61..00000000 --- a/admin_api/docs/EnterpriseAgentState.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/admin_api/docs/Error.md b/admin_api/docs/Error.md deleted file mode 100644 index d22745ba..00000000 --- a/admin_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 admin_api.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_form_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/admin_api/docs/ErrorDetail.md b/admin_api/docs/ErrorDetail.md deleted file mode 100644 index 35587780..00000000 --- a/admin_api/docs/ErrorDetail.md +++ /dev/null @@ -1,29 +0,0 @@ -# ErrorDetail - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | [**ErrorDetailCode**](ErrorDetailCode.md) | | [optional] -**description** | **str** | Description for the agent error. | [optional] [readonly] - -## Example - -```python -from admin_api.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_form_dict = error_detail.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/admin_api/docs/ErrorDetailCode.md b/admin_api/docs/ErrorDetailCode.md deleted file mode 100644 index c91277dc..00000000 --- a/admin_api/docs/ErrorDetailCode.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/admin_api/docs/Expand.md b/admin_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/admin_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/admin_api/docs/InterfaceIpMapping.md b/admin_api/docs/InterfaceIpMapping.md deleted file mode 100644 index 5fd3b486..00000000 --- a/admin_api/docs/InterfaceIpMapping.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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 admin_api.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_form_dict = interface_ip_mapping.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/admin_api/docs/Link.md b/admin_api/docs/Link.md deleted file mode 100644 index c63c2f38..00000000 --- a/admin_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 admin_api.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_form_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/admin_api/docs/PaginationLinks.md b/admin_api/docs/PaginationLinks.md deleted file mode 100644 index 3da3faa7..00000000 --- a/admin_api/docs/PaginationLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinks - -A links object containing pagination related link(s). - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] - -## Example - -```python -from admin_api.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_form_dict = pagination_links.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/admin_api/docs/PaginationLinksLinks.md b/admin_api/docs/PaginationLinksLinks.md deleted file mode 100644 index 8099ec5c..00000000 --- a/admin_api/docs/PaginationLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinksLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**previous** | [**Link**](Link.md) | | [optional] -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from admin_api.models.pagination_links_links import PaginationLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationLinksLinks from a JSON string -pagination_links_links_instance = PaginationLinksLinks.from_json(json) -# print the JSON string representation of the object -print PaginationLinksLinks.to_json() - -# convert the object into a dict -pagination_links_links_dict = pagination_links_links_instance.to_dict() -# create an instance of PaginationLinksLinks from a dict -pagination_links_links_form_dict = pagination_links_links.from_dict(pagination_links_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/admin_api/docs/QueryWindow.md b/admin_api/docs/QueryWindow.md deleted file mode 100644 index 83d7cb41..00000000 --- a/admin_api/docs/QueryWindow.md +++ /dev/null @@ -1,29 +0,0 @@ -# QueryWindow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -## Example - -```python -from admin_api.models.query_window import QueryWindow - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryWindow from a JSON string -query_window_instance = QueryWindow.from_json(json) -# print the JSON string representation of the object -print QueryWindow.to_json() - -# convert the object into a dict -query_window_dict = query_window_instance.to_dict() -# create an instance of QueryWindow from a dict -query_window_form_dict = query_window.from_dict(query_window_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/admin_api/docs/SelfLinks.md b/admin_api/docs/SelfLinks.md deleted file mode 100644 index 726654ef..00000000 --- a/admin_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from admin_api.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_form_dict = self_links.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/admin_api/docs/SelfLinksLinks.md b/admin_api/docs/SelfLinksLinks.md deleted file mode 100644 index cd94f652..00000000 --- a/admin_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from admin_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/admin_api/docs/UnauthorizedError.md b/admin_api/docs/UnauthorizedError.md deleted file mode 100644 index 7ded01ea..00000000 --- a/admin_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from admin_api.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_form_dict = unauthorized_error.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/admin_api/git_push.sh b/admin_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/admin_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/admin_api/pyproject.toml b/admin_api/pyproject.toml deleted file mode 100644 index a3b147b9..00000000 --- a/admin_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "admin_api" -version = "1.0.0" -description = "Administrative API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Administrative API"] -include = ["admin_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/admin_api/setup.py b/admin_api/setup.py deleted file mode 100644 index 22a607f0..00000000 --- a/admin_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "admin-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Administrative API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Administrative API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## 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. - """, # noqa: E501 - package_data={"admin_api": ["py.typed"]}, -) diff --git a/admin_api/test-requirements.txt b/admin_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/admin_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/admin_api/test/test_account_group.py b/admin_api/test/test_account_group.py deleted file mode 100644 index f7775a4f..00000000 --- a/admin_api/test/test_account_group.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group import AccountGroup - -class TestAccountGroup(unittest.TestCase): - """AccountGroup unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroup: - """Test AccountGroup - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroup` - """ - model = AccountGroup() - if include_optional: - return AccountGroup( - aid = '11', - account_group_name = 'Account A', - is_current_account_group = True, - is_default_account_group = True, - organization_name = '' - ) - else: - return AccountGroup( - ) - """ - - def testAccountGroup(self): - """Test AccountGroup""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group1.py b/admin_api/test/test_account_group1.py deleted file mode 100644 index 082ef38a..00000000 --- a/admin_api/test/test_account_group1.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group1 import AccountGroup1 - -class TestAccountGroup1(unittest.TestCase): - """AccountGroup1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroup1: - """Test AccountGroup1 - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroup1` - """ - model = AccountGroup1() - if include_optional: - return AccountGroup1( - aid = '11', - account_group_name = 'Account A' - ) - else: - return AccountGroup1( - ) - """ - - def testAccountGroup1(self): - """Test AccountGroup1""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group_detail.py b/admin_api/test/test_account_group_detail.py deleted file mode 100644 index a08a7f9e..00000000 --- a/admin_api/test/test_account_group_detail.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group_detail import AccountGroupDetail - -class TestAccountGroupDetail(unittest.TestCase): - """AccountGroupDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupDetail: - """Test AccountGroupDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupDetail` - """ - model = AccountGroupDetail() - if include_optional: - return AccountGroupDetail( - aid = '11', - account_group_name = 'Account A', - is_current_account_group = True, - is_default_account_group = True, - organization_name = '', - users = [ - admin_api.models.user_account_group.UserAccountGroup( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '235', - last_login = '2022-07-17T22:00:54Z', - date_registered = '2022-07-17T22:00:54Z', - roles = [ - admin_api.models.role.Role() - ], ) - ], - agents = [ - null - ] - ) - else: - return AccountGroupDetail( - ) - """ - - def testAccountGroupDetail(self): - """Test AccountGroupDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group_id.py b/admin_api/test/test_account_group_id.py deleted file mode 100644 index 15127387..00000000 --- a/admin_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group_request_body.py b/admin_api/test/test_account_group_request_body.py deleted file mode 100644 index 788a6c48..00000000 --- a/admin_api/test/test_account_group_request_body.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group_request_body import AccountGroupRequestBody - -class TestAccountGroupRequestBody(unittest.TestCase): - """AccountGroupRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupRequestBody: - """Test AccountGroupRequestBody - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupRequestBody` - """ - model = AccountGroupRequestBody() - if include_optional: - return AccountGroupRequestBody( - account_group_name = 'My testing account group', - agents = ["105","719"] - ) - else: - return AccountGroupRequestBody( - account_group_name = 'My testing account group', - ) - """ - - def testAccountGroupRequestBody(self): - """Test AccountGroupRequestBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group_roles.py b/admin_api/test/test_account_group_roles.py deleted file mode 100644 index d3e74311..00000000 --- a/admin_api/test/test_account_group_roles.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group_roles import AccountGroupRoles - -class TestAccountGroupRoles(unittest.TestCase): - """AccountGroupRoles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupRoles: - """Test AccountGroupRoles - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupRoles` - """ - model = AccountGroupRoles() - if include_optional: - return AccountGroupRoles( - account_group_roles = [ - admin_api.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( - account_group = admin_api.models.account_group_1.AccountGroup_1(), - roles = [ - admin_api.models.role.Role() - ], ) - ] - ) - else: - return AccountGroupRoles( - ) - """ - - def testAccountGroupRoles(self): - """Test AccountGroupRoles""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group_roles_account_group_roles_inner.py b/admin_api/test/test_account_group_roles_account_group_roles_inner.py deleted file mode 100644 index f927f236..00000000 --- a/admin_api/test/test_account_group_roles_account_group_roles_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group_roles_account_group_roles_inner import AccountGroupRolesAccountGroupRolesInner - -class TestAccountGroupRolesAccountGroupRolesInner(unittest.TestCase): - """AccountGroupRolesAccountGroupRolesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupRolesAccountGroupRolesInner: - """Test AccountGroupRolesAccountGroupRolesInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupRolesAccountGroupRolesInner` - """ - model = AccountGroupRolesAccountGroupRolesInner() - if include_optional: - return AccountGroupRolesAccountGroupRolesInner( - account_group = admin_api.models.account_group_1.AccountGroup_1(), - roles = [ - admin_api.models.role.Role() - ] - ) - else: - return AccountGroupRolesAccountGroupRolesInner( - ) - """ - - def testAccountGroupRolesAccountGroupRolesInner(self): - """Test AccountGroupRolesAccountGroupRolesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_group_roles_request_body_inner.py b/admin_api/test/test_account_group_roles_request_body_inner.py deleted file mode 100644 index f35f0e3c..00000000 --- a/admin_api/test/test_account_group_roles_request_body_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_group_roles_request_body_inner import AccountGroupRolesRequestBodyInner - -class TestAccountGroupRolesRequestBodyInner(unittest.TestCase): - """AccountGroupRolesRequestBodyInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupRolesRequestBodyInner: - """Test AccountGroupRolesRequestBodyInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupRolesRequestBodyInner` - """ - model = AccountGroupRolesRequestBodyInner() - if include_optional: - return AccountGroupRolesRequestBodyInner( - account_group_id = '315', - role_ids = ["57","1140"] - ) - else: - return AccountGroupRolesRequestBodyInner( - ) - """ - - def testAccountGroupRolesRequestBodyInner(self): - """Test AccountGroupRolesRequestBodyInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_groups.py b/admin_api/test/test_account_groups.py deleted file mode 100644 index cb945d79..00000000 --- a/admin_api/test/test_account_groups.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.account_groups import AccountGroups - -class TestAccountGroups(unittest.TestCase): - """AccountGroups unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroups: - """Test AccountGroups - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroups` - """ - model = AccountGroups() - if include_optional: - return AccountGroups( - account_groups = [ - admin_api.models.account_group.AccountGroup() - ] - ) - else: - return AccountGroups( - ) - """ - - def testAccountGroups(self): - """Test AccountGroups""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_account_groups_api.py b/admin_api/test/test_account_groups_api.py deleted file mode 100644 index c726e601..00000000 --- a/admin_api/test/test_account_groups_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from admin_api.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(self) -> None: - """Test case for create_account_group - - Create account group - """ - pass - - def test_delete_account_group(self) -> None: - """Test case for delete_account_group - - Delete account group - """ - pass - - def test_get_account_group(self) -> None: - """Test case for get_account_group - - Retrieve account group - """ - pass - - def test_get_account_groups(self) -> None: - """Test case for get_account_groups - - List account groups - """ - pass - - def test_update_account_group(self) -> None: - """Test case for update_account_group - - Update account group - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_agent.py b/admin_api/test/test_agent.py deleted file mode 100644 index 78905104..00000000 --- a/admin_api/test/test_agent.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.agent import Agent - -class TestAgent(unittest.TestCase): - """Agent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Agent: - """Test Agent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Agent` - """ - model = Agent() - if include_optional: - return Agent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True - ) - else: - return Agent( - ) - """ - - def testAgent(self): - """Test Agent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_agent_base.py b/admin_api/test/test_agent_base.py deleted file mode 100644 index 3e8dec04..00000000 --- a/admin_api/test/test_agent_base.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.agent_base import AgentBase - -class TestAgentBase(unittest.TestCase): - """AgentBase unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentBase: - """Test AgentBase - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentBase` - """ - model = AgentBase() - if include_optional: - return AgentBase( - ip_addresses = ["99.139.65.220","99.139.65.221"], - public_ip_addresses = ["192.168.1.78","192.168.1.79"], - network = 'AT&T Services, Inc. (AS 7018)' - ) - else: - return AgentBase( - ) - """ - - def testAgentBase(self): - """Test AgentBase""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_all_account_group_roles.py b/admin_api/test/test_all_account_group_roles.py deleted file mode 100644 index 351b9f4b..00000000 --- a/admin_api/test/test_all_account_group_roles.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.all_account_group_roles import AllAccountGroupRoles - -class TestAllAccountGroupRoles(unittest.TestCase): - """AllAccountGroupRoles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AllAccountGroupRoles: - """Test AllAccountGroupRoles - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AllAccountGroupRoles` - """ - model = AllAccountGroupRoles() - if include_optional: - return AllAccountGroupRoles( - all_account_group_roles = [ - admin_api.models.role.Role() - ] - ) - else: - return AllAccountGroupRoles( - ) - """ - - def testAllAccountGroupRoles(self): - """Test AllAccountGroupRoles""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_base_role.py b/admin_api/test/test_base_role.py deleted file mode 100644 index dec2a3ba..00000000 --- a/admin_api/test/test_base_role.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.base_role import BaseRole - -class TestBaseRole(unittest.TestCase): - """BaseRole unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseRole: - """Test BaseRole - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BaseRole` - """ - model = BaseRole() - if include_optional: - return BaseRole( - name = 'Organization Admin', - role_id = '35', - is_builtin = True - ) - else: - return BaseRole( - ) - """ - - def testBaseRole(self): - """Test BaseRole""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_cloud_enterprise_agent_type.py b/admin_api/test/test_cloud_enterprise_agent_type.py deleted file mode 100644 index a39e780b..00000000 --- a/admin_api/test/test_cloud_enterprise_agent_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType - -class TestCloudEnterpriseAgentType(unittest.TestCase): - """CloudEnterpriseAgentType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCloudEnterpriseAgentType(self): - """Test CloudEnterpriseAgentType""" - # inst = CloudEnterpriseAgentType() - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_cluster_member.py b/admin_api/test/test_cluster_member.py deleted file mode 100644 index 67c46957..00000000 --- a/admin_api/test/test_cluster_member.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.cluster_member import ClusterMember - -class TestClusterMember(unittest.TestCase): - """ClusterMember unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClusterMember: - """Test ClusterMember - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClusterMember` - """ - model = ClusterMember() - if include_optional: - return ClusterMember( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - member_id = '10', - name = 'Cluster member name', - error_details = [ - admin_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - target_for_tests = '1.1.1.1', - utilization = 25 - ) - else: - return ClusterMember( - ) - """ - - def testClusterMember(self): - """Test ClusterMember""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_create_account_group201_response.py b/admin_api/test/test_create_account_group201_response.py deleted file mode 100644 index 1330ccc8..00000000 --- a/admin_api/test/test_create_account_group201_response.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.create_account_group201_response import CreateAccountGroup201Response - -class TestCreateAccountGroup201Response(unittest.TestCase): - """CreateAccountGroup201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateAccountGroup201Response: - """Test CreateAccountGroup201Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateAccountGroup201Response` - """ - model = CreateAccountGroup201Response() - if include_optional: - return CreateAccountGroup201Response( - aid = '11', - account_group_name = 'Account A', - is_current_account_group = True, - is_default_account_group = True, - organization_name = '', - users = [ - admin_api.models.user_account_group.UserAccountGroup( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '235', - last_login = '2022-07-17T22:00:54Z', - date_registered = '2022-07-17T22:00:54Z', - roles = [ - admin_api.models.role.Role() - ], ) - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return CreateAccountGroup201Response( - ) - """ - - def testCreateAccountGroup201Response(self): - """Test CreateAccountGroup201Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_create_role201_response.py b/admin_api/test/test_create_role201_response.py deleted file mode 100644 index 02313436..00000000 --- a/admin_api/test/test_create_role201_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.create_role201_response import CreateRole201Response - -class TestCreateRole201Response(unittest.TestCase): - """CreateRole201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateRole201Response: - """Test CreateRole201Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateRole201Response` - """ - model = CreateRole201Response() - if include_optional: - return CreateRole201Response( - name = 'Organization Admin', - role_id = '35', - is_builtin = True, - permissions = [{label=View reports, permissionId=1, isManagementPermission=true, permission=REPORT_READ}, {label=View snapshots, permissionId=51, isManagementPermission=false, permission=REPORT_SNAPSHOTS_READ}], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return CreateRole201Response( - ) - """ - - def testCreateRole201Response(self): - """Test CreateRole201Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_create_user201_response.py b/admin_api/test/test_create_user201_response.py deleted file mode 100644 index 37ec7ea9..00000000 --- a/admin_api/test/test_create_user201_response.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.create_user201_response import CreateUser201Response - -class TestCreateUser201Response(unittest.TestCase): - """CreateUser201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateUser201Response: - """Test CreateUser201Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateUser201Response` - """ - model = CreateUser201Response() - if include_optional: - return CreateUser201Response( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '245', - date_registered = '2020-07-17T22:00:54Z', - login_account_group = admin_api.models.account_group_1.AccountGroup_1(), - account_group_roles = [ - admin_api.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( - account_group = admin_api.models.account_group_1.AccountGroup_1(), - roles = [ - admin_api.models.role.Role() - ], ) - ], - all_account_group_roles = [ - admin_api.models.role.Role() - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return CreateUser201Response( - ) - """ - - def testCreateUser201Response(self): - """Test CreateUser201Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_created_user.py b/admin_api/test/test_created_user.py deleted file mode 100644 index 7854dbd6..00000000 --- a/admin_api/test/test_created_user.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.created_user import CreatedUser - -class TestCreatedUser(unittest.TestCase): - """CreatedUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreatedUser: - """Test CreatedUser - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreatedUser` - """ - model = CreatedUser() - if include_optional: - return CreatedUser( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '245', - date_registered = '2020-07-17T22:00:54Z', - login_account_group = admin_api.models.account_group_1.AccountGroup_1(), - account_group_roles = [ - admin_api.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( - account_group = admin_api.models.account_group_1.AccountGroup_1(), - roles = [ - admin_api.models.role.Role() - ], ) - ], - all_account_group_roles = [ - admin_api.models.role.Role() - ] - ) - else: - return CreatedUser( - ) - """ - - def testCreatedUser(self): - """Test CreatedUser""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_enterprise_agent.py b/admin_api/test/test_enterprise_agent.py deleted file mode 100644 index 5b658737..00000000 --- a/admin_api/test/test_enterprise_agent.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.enterprise_agent import EnterpriseAgent - -class TestEnterpriseAgent(unittest.TestCase): - """EnterpriseAgent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgent: - """Test EnterpriseAgent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgent` - """ - model = EnterpriseAgent() - if include_optional: - return EnterpriseAgent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - cluster_members = [ - null - ], - utilization = 25, - account_groups = [ - admin_api.models.account_group_1.AccountGroup_1() - ], - prefix = '99.128.0.0/11', - ipv6_policy = 'force-ipv4', - error_details = [ - admin_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - hostname = 'thousandeyes.com', - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - keep_browser_cache = True, - created_date = '2022-07-17T22:00:54Z', - target_for_tests = '1.1.1.1', - local_resolution_prefixes = [ - '10.2.3.3/24' - ], - interface_ip_mappings = [ - admin_api.models.interface_ip_mapping.InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) - ] - ) - else: - return EnterpriseAgent( - ) - """ - - def testEnterpriseAgent(self): - """Test EnterpriseAgent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_enterprise_agent_ipv6_policy.py b/admin_api/test/test_enterprise_agent_ipv6_policy.py deleted file mode 100644 index 83272d10..00000000 --- a/admin_api/test/test_enterprise_agent_ipv6_policy.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy - -class TestEnterpriseAgentIpv6Policy(unittest.TestCase): - """EnterpriseAgentIpv6Policy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnterpriseAgentIpv6Policy(self): - """Test EnterpriseAgentIpv6Policy""" - # inst = EnterpriseAgentIpv6Policy() - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_enterprise_agent_state.py b/admin_api/test/test_enterprise_agent_state.py deleted file mode 100644 index 8b0c5810..00000000 --- a/admin_api/test/test_enterprise_agent_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.enterprise_agent_state import EnterpriseAgentState - -class TestEnterpriseAgentState(unittest.TestCase): - """EnterpriseAgentState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnterpriseAgentState(self): - """Test EnterpriseAgentState""" - # inst = EnterpriseAgentState() - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_enterprise_agents.py b/admin_api/test/test_enterprise_agents.py deleted file mode 100644 index 55bee827..00000000 --- a/admin_api/test/test_enterprise_agents.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.enterprise_agents import EnterpriseAgents - -class TestEnterpriseAgents(unittest.TestCase): - """EnterpriseAgents unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgents: - """Test EnterpriseAgents - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgents` - """ - model = EnterpriseAgents() - if include_optional: - return EnterpriseAgents( - agents = [ - null - ] - ) - else: - return EnterpriseAgents( - ) - """ - - def testEnterpriseAgents(self): - """Test EnterpriseAgents""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_error.py b/admin_api/test/test_error.py deleted file mode 100644 index 92fd294a..00000000 --- a/admin_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_error_detail.py b/admin_api/test/test_error_detail.py deleted file mode 100644 index af047bd6..00000000 --- a/admin_api/test/test_error_detail.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.error_detail import ErrorDetail - -class TestErrorDetail(unittest.TestCase): - """ErrorDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorDetail: - """Test ErrorDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ErrorDetail` - """ - model = ErrorDetail() - if include_optional: - return ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)' - ) - else: - return ErrorDetail( - ) - """ - - def testErrorDetail(self): - """Test ErrorDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_error_detail_code.py b/admin_api/test/test_error_detail_code.py deleted file mode 100644 index 977242d5..00000000 --- a/admin_api/test/test_error_detail_code.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.error_detail_code import ErrorDetailCode - -class TestErrorDetailCode(unittest.TestCase): - """ErrorDetailCode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testErrorDetailCode(self): - """Test ErrorDetailCode""" - # inst = ErrorDetailCode() - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_expand.py b/admin_api/test/test_expand.py deleted file mode 100644 index f9a527df..00000000 --- a/admin_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_extended_user.py b/admin_api/test/test_extended_user.py deleted file mode 100644 index 7ee6ae8b..00000000 --- a/admin_api/test/test_extended_user.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.extended_user import ExtendedUser - -class TestExtendedUser(unittest.TestCase): - """ExtendedUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ExtendedUser: - """Test ExtendedUser - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ExtendedUser` - """ - model = ExtendedUser() - if include_optional: - return ExtendedUser( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '245', - date_registered = '2020-07-17T22:00:54Z', - login_account_group = admin_api.models.account_group_1.AccountGroup_1(), - last_login = '2022-07-17T22:00:54Z' - ) - else: - return ExtendedUser( - ) - """ - - def testExtendedUser(self): - """Test ExtendedUser""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_account_group200_response.py b/admin_api/test/test_get_account_group200_response.py deleted file mode 100644 index c5ab044c..00000000 --- a/admin_api/test/test_get_account_group200_response.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_account_group200_response import GetAccountGroup200Response - -class TestGetAccountGroup200Response(unittest.TestCase): - """GetAccountGroup200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAccountGroup200Response: - """Test GetAccountGroup200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAccountGroup200Response` - """ - model = GetAccountGroup200Response() - if include_optional: - return GetAccountGroup200Response( - aid = '11', - account_group_name = 'Account A', - is_current_account_group = True, - is_default_account_group = True, - organization_name = '', - users = [ - admin_api.models.user_account_group.UserAccountGroup( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '235', - last_login = '2022-07-17T22:00:54Z', - date_registered = '2022-07-17T22:00:54Z', - roles = [ - admin_api.models.role.Role() - ], ) - ], - agents = [ - null - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetAccountGroup200Response( - ) - """ - - def testGetAccountGroup200Response(self): - """Test GetAccountGroup200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_account_groups200_response.py b/admin_api/test/test_get_account_groups200_response.py deleted file mode 100644 index 1415ab79..00000000 --- a/admin_api/test/test_get_account_groups200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_account_groups200_response import GetAccountGroups200Response - -class TestGetAccountGroups200Response(unittest.TestCase): - """GetAccountGroups200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAccountGroups200Response: - """Test GetAccountGroups200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAccountGroups200Response` - """ - model = GetAccountGroups200Response() - if include_optional: - return GetAccountGroups200Response( - account_groups = [ - admin_api.models.account_group.AccountGroup() - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetAccountGroups200Response( - ) - """ - - def testGetAccountGroups200Response(self): - """Test GetAccountGroups200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_permissions200_response.py b/admin_api/test/test_get_permissions200_response.py deleted file mode 100644 index ee088b20..00000000 --- a/admin_api/test/test_get_permissions200_response.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_permissions200_response import GetPermissions200Response - -class TestGetPermissions200Response(unittest.TestCase): - """GetPermissions200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetPermissions200Response: - """Test GetPermissions200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetPermissions200Response` - """ - model = GetPermissions200Response() - if include_optional: - return GetPermissions200Response( - permissions = [{label=View reports, permissionId=1, isManagementPermission=true, permission=REPORT_READ}, {label=View snapshots, permissionId=51, isManagementPermission=false, permission=REPORT_SNAPSHOTS_READ}], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetPermissions200Response( - ) - """ - - def testGetPermissions200Response(self): - """Test GetPermissions200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_roles200_response.py b/admin_api/test/test_get_roles200_response.py deleted file mode 100644 index e1d6a7a7..00000000 --- a/admin_api/test/test_get_roles200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_roles200_response import GetRoles200Response - -class TestGetRoles200Response(unittest.TestCase): - """GetRoles200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetRoles200Response: - """Test GetRoles200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetRoles200Response` - """ - model = GetRoles200Response() - if include_optional: - return GetRoles200Response( - roles = [ - admin_api.models.role.Role() - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetRoles200Response( - ) - """ - - def testGetRoles200Response(self): - """Test GetRoles200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_user200_response.py b/admin_api/test/test_get_user200_response.py deleted file mode 100644 index 55dce4e4..00000000 --- a/admin_api/test/test_get_user200_response.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_user200_response import GetUser200Response - -class TestGetUser200Response(unittest.TestCase): - """GetUser200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUser200Response: - """Test GetUser200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUser200Response` - """ - model = GetUser200Response() - if include_optional: - return GetUser200Response( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '245', - date_registered = '2020-07-17T22:00:54Z', - login_account_group = admin_api.models.account_group_1.AccountGroup_1(), - last_login = '2022-07-17T22:00:54Z', - account_group_roles = [ - admin_api.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( - account_group = admin_api.models.account_group_1.AccountGroup_1(), - roles = [ - admin_api.models.role.Role() - ], ) - ], - all_account_group_roles = [ - admin_api.models.role.Role() - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetUser200Response( - ) - """ - - def testGetUser200Response(self): - """Test GetUser200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_user_events200_response.py b/admin_api/test/test_get_user_events200_response.py deleted file mode 100644 index 728c2b7d..00000000 --- a/admin_api/test/test_get_user_events200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_user_events200_response import GetUserEvents200Response - -class TestGetUserEvents200Response(unittest.TestCase): - """GetUserEvents200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUserEvents200Response: - """Test GetUserEvents200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUserEvents200Response` - """ - model = GetUserEvents200Response() - if include_optional: - return GetUserEvents200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - audit_events = [{accountGroupName=API Sandbox, aid=75, date=2020-07-17T21:54:54Z, event=Report created., ipAddress=99.128.0.0/11, uid=245, user=API Sandbox User (noreply@thousandeyes.com), resources=[{name=My New report, type=reportTitle}, {name=Other Report, type=testName}]}, {accountGroupName=API Sandbox, aid=75, date=2020-07-17T22:00:54Z, event=Login failed., ipAddress=99.128.0.0/11, uid=245, user=API Sandbox User (noreply@thousandeyes.com)}], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetUserEvents200Response( - ) - """ - - def testGetUserEvents200Response(self): - """Test GetUserEvents200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_get_users200_response.py b/admin_api/test/test_get_users200_response.py deleted file mode 100644 index 20d584c5..00000000 --- a/admin_api/test/test_get_users200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.get_users200_response import GetUsers200Response - -class TestGetUsers200Response(unittest.TestCase): - """GetUsers200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUsers200Response: - """Test GetUsers200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUsers200Response` - """ - model = GetUsers200Response() - if include_optional: - return GetUsers200Response( - users = [ - null - ], - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetUsers200Response( - ) - """ - - def testGetUsers200Response(self): - """Test GetUsers200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_interface_ip_mapping.py b/admin_api/test/test_interface_ip_mapping.py deleted file mode 100644 index c41e1e2b..00000000 --- a/admin_api/test/test_interface_ip_mapping.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.interface_ip_mapping import InterfaceIpMapping - -class TestInterfaceIpMapping(unittest.TestCase): - """InterfaceIpMapping unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InterfaceIpMapping: - """Test InterfaceIpMapping - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InterfaceIpMapping` - """ - model = InterfaceIpMapping() - if include_optional: - return InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"] - ) - else: - return InterfaceIpMapping( - ) - """ - - def testInterfaceIpMapping(self): - """Test InterfaceIpMapping""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_link.py b/admin_api/test/test_link.py deleted file mode 100644 index 945bae6e..00000000 --- a/admin_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_login_account_group.py b/admin_api/test/test_login_account_group.py deleted file mode 100644 index 0b3e53ca..00000000 --- a/admin_api/test/test_login_account_group.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.login_account_group import LoginAccountGroup - -class TestLoginAccountGroup(unittest.TestCase): - """LoginAccountGroup unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LoginAccountGroup: - """Test LoginAccountGroup - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LoginAccountGroup` - """ - model = LoginAccountGroup() - if include_optional: - return LoginAccountGroup( - login_account_group = admin_api.models.account_group_1.AccountGroup_1() - ) - else: - return LoginAccountGroup( - ) - """ - - def testLoginAccountGroup(self): - """Test LoginAccountGroup""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_new_account_group_response.py b/admin_api/test/test_new_account_group_response.py deleted file mode 100644 index 8a187d7a..00000000 --- a/admin_api/test/test_new_account_group_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.new_account_group_response import NewAccountGroupResponse - -class TestNewAccountGroupResponse(unittest.TestCase): - """NewAccountGroupResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NewAccountGroupResponse: - """Test NewAccountGroupResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NewAccountGroupResponse` - """ - model = NewAccountGroupResponse() - if include_optional: - return NewAccountGroupResponse( - aid = '11', - account_group_name = 'Account A', - is_current_account_group = True, - is_default_account_group = True, - organization_name = '', - users = [ - admin_api.models.user_account_group.UserAccountGroup( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '235', - last_login = '2022-07-17T22:00:54Z', - date_registered = '2022-07-17T22:00:54Z', - roles = [ - admin_api.models.role.Role() - ], ) - ] - ) - else: - return NewAccountGroupResponse( - ) - """ - - def testNewAccountGroupResponse(self): - """Test NewAccountGroupResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_pagination_links.py b/admin_api/test/test_pagination_links.py deleted file mode 100644 index b89fb85c..00000000 --- a/admin_api/test/test_pagination_links.py +++ /dev/null @@ -1,70 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.pagination_links import PaginationLinks - -class TestPaginationLinks(unittest.TestCase): - """PaginationLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinks: - """Test PaginationLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinks` - """ - model = PaginationLinks() - if include_optional: - return PaginationLinks( - links = admin_api.models.pagination_links__links.PaginationLinks__links( - previous = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationLinks( - ) - """ - - def testPaginationLinks(self): - """Test PaginationLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_pagination_links_links.py b/admin_api/test/test_pagination_links_links.py deleted file mode 100644 index 6d8fedb4..00000000 --- a/admin_api/test/test_pagination_links_links.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.pagination_links_links import PaginationLinksLinks - -class TestPaginationLinksLinks(unittest.TestCase): - """PaginationLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinksLinks: - """Test PaginationLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinksLinks` - """ - model = PaginationLinksLinks() - if include_optional: - return PaginationLinksLinks( - previous = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationLinksLinks( - ) - """ - - def testPaginationLinksLinks(self): - """Test PaginationLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_permission.py b/admin_api/test/test_permission.py deleted file mode 100644 index aa74809b..00000000 --- a/admin_api/test/test_permission.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.permission import Permission - -class TestPermission(unittest.TestCase): - """Permission unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Permission: - """Test Permission - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Permission` - """ - model = Permission() - if include_optional: - return Permission( - label = 'View reports', - permission_id = '56', - is_management_permission = True, - permission = 'REPORT_SNAPSHOTS_READ' - ) - else: - return Permission( - ) - """ - - def testPermission(self): - """Test Permission""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_permissions.py b/admin_api/test/test_permissions.py deleted file mode 100644 index 8a976bb5..00000000 --- a/admin_api/test/test_permissions.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.permissions import Permissions - -class TestPermissions(unittest.TestCase): - """Permissions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Permissions: - """Test Permissions - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Permissions` - """ - model = Permissions() - if include_optional: - return Permissions( - permissions = [{"label":"View reports","permissionId":1,"isManagementPermission":true,"permission":"REPORT_READ"},{"label":"View snapshots","permissionId":51,"isManagementPermission":false,"permission":"REPORT_SNAPSHOTS_READ"}] - ) - else: - return Permissions( - ) - """ - - def testPermissions(self): - """Test Permissions""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_permissions_api.py b/admin_api/test/test_permissions_api.py deleted file mode 100644 index 19b55afd..00000000 --- a/admin_api/test/test_permissions_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from admin_api.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(self) -> None: - """Test case for get_permissions - - List assignable permissions - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_query_window.py b/admin_api/test/test_query_window.py deleted file mode 100644 index ac3a6dbe..00000000 --- a/admin_api/test/test_query_window.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.query_window import QueryWindow - -class TestQueryWindow(unittest.TestCase): - """QueryWindow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryWindow: - """Test QueryWindow - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryWindow` - """ - model = QueryWindow() - if include_optional: - return QueryWindow( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z' - ) - else: - return QueryWindow( - ) - """ - - def testQueryWindow(self): - """Test QueryWindow""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_role.py b/admin_api/test/test_role.py deleted file mode 100644 index ddf5bd20..00000000 --- a/admin_api/test/test_role.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.role import Role - -class TestRole(unittest.TestCase): - """Role unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Role: - """Test Role - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Role` - """ - model = Role() - if include_optional: - return Role( - name = 'Organization Admin', - role_id = '35', - is_builtin = True, - has_management_permissions = True - ) - else: - return Role( - ) - """ - - def testRole(self): - """Test Role""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_role_detail.py b/admin_api/test/test_role_detail.py deleted file mode 100644 index 5984bce5..00000000 --- a/admin_api/test/test_role_detail.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.role_detail import RoleDetail - -class TestRoleDetail(unittest.TestCase): - """RoleDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RoleDetail: - """Test RoleDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RoleDetail` - """ - model = RoleDetail() - if include_optional: - return RoleDetail( - name = 'Organization Admin', - role_id = '35', - is_builtin = True, - permissions = [{label=View reports, permissionId=1, isManagementPermission=true, permission=REPORT_READ}, {label=View snapshots, permissionId=51, isManagementPermission=false, permission=REPORT_SNAPSHOTS_READ}] - ) - else: - return RoleDetail( - ) - """ - - def testRoleDetail(self): - """Test RoleDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_role_request_body.py b/admin_api/test/test_role_request_body.py deleted file mode 100644 index a8f6415a..00000000 --- a/admin_api/test/test_role_request_body.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.role_request_body import RoleRequestBody - -class TestRoleRequestBody(unittest.TestCase): - """RoleRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RoleRequestBody: - """Test RoleRequestBody - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RoleRequestBody` - """ - model = RoleRequestBody() - if include_optional: - return RoleRequestBody( - name = 'Organization Admin', - permissions = ["56","315"] - ) - else: - return RoleRequestBody( - ) - """ - - def testRoleRequestBody(self): - """Test RoleRequestBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_roles.py b/admin_api/test/test_roles.py deleted file mode 100644 index 657e4a7b..00000000 --- a/admin_api/test/test_roles.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.roles import Roles - -class TestRoles(unittest.TestCase): - """Roles unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Roles: - """Test Roles - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Roles` - """ - model = Roles() - if include_optional: - return Roles( - roles = [ - admin_api.models.role.Role() - ] - ) - else: - return Roles( - ) - """ - - def testRoles(self): - """Test Roles""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_roles_api.py b/admin_api/test/test_roles_api.py deleted file mode 100644 index aba35a64..00000000 --- a/admin_api/test/test_roles_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from admin_api.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(self) -> None: - """Test case for create_role - - Create role - """ - pass - - def test_delete_role(self) -> None: - """Test case for delete_role - - Delete role - """ - pass - - def test_get_role(self) -> None: - """Test case for get_role - - Retrieve role - """ - pass - - def test_get_roles(self) -> None: - """Test case for get_roles - - List roles - """ - pass - - def test_update_role(self) -> None: - """Test case for update_role - - Update role - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_self_links.py b/admin_api/test/test_self_links.py deleted file mode 100644 index f8fd4f10..00000000 --- a/admin_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = admin_api.models.self_links__links.SelfLinks__links( - self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_self_links_links.py b/admin_api/test/test_self_links_links.py deleted file mode 100644 index 045e2cf4..00000000 --- a/admin_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = admin_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_unauthorized_error.py b/admin_api/test/test_unauthorized_error.py deleted file mode 100644 index b206cc91..00000000 --- a/admin_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user.py b/admin_api/test/test_user.py deleted file mode 100644 index 93efdb55..00000000 --- a/admin_api/test/test_user.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user import User - -class TestUser(unittest.TestCase): - """User unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> User: - """Test User - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `User` - """ - model = User() - if include_optional: - return User( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '245', - date_registered = '2020-07-17T22:00:54Z', - login_account_group = admin_api.models.account_group_1.AccountGroup_1() - ) - else: - return User( - ) - """ - - def testUser(self): - """Test User""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_account_group.py b/admin_api/test/test_user_account_group.py deleted file mode 100644 index 95bab0cd..00000000 --- a/admin_api/test/test_user_account_group.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_account_group import UserAccountGroup - -class TestUserAccountGroup(unittest.TestCase): - """UserAccountGroup unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserAccountGroup: - """Test UserAccountGroup - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserAccountGroup` - """ - model = UserAccountGroup() - if include_optional: - return UserAccountGroup( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '235', - last_login = '2022-07-17T22:00:54Z', - date_registered = '2022-07-17T22:00:54Z', - roles = [ - admin_api.models.role.Role() - ] - ) - else: - return UserAccountGroup( - ) - """ - - def testUserAccountGroup(self): - """Test UserAccountGroup""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_account_groups.py b/admin_api/test/test_user_account_groups.py deleted file mode 100644 index 73ac363b..00000000 --- a/admin_api/test/test_user_account_groups.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_account_groups import UserAccountGroups - -class TestUserAccountGroups(unittest.TestCase): - """UserAccountGroups unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserAccountGroups: - """Test UserAccountGroups - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserAccountGroups` - """ - model = UserAccountGroups() - if include_optional: - return UserAccountGroups( - users = [ - admin_api.models.user_account_group.UserAccountGroup( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '235', - last_login = '2022-07-17T22:00:54Z', - date_registered = '2022-07-17T22:00:54Z', - roles = [ - admin_api.models.role.Role() - ], ) - ] - ) - else: - return UserAccountGroups( - ) - """ - - def testUserAccountGroups(self): - """Test UserAccountGroups""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_detail.py b/admin_api/test/test_user_detail.py deleted file mode 100644 index 20dcf946..00000000 --- a/admin_api/test/test_user_detail.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_detail import UserDetail - -class TestUserDetail(unittest.TestCase): - """UserDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserDetail: - """Test UserDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserDetail` - """ - model = UserDetail() - if include_optional: - return UserDetail( - name = 'User X', - email = 'userx@thousandeyes.com', - uid = '245', - date_registered = '2020-07-17T22:00:54Z', - login_account_group = admin_api.models.account_group_1.AccountGroup_1(), - last_login = '2022-07-17T22:00:54Z', - account_group_roles = [ - admin_api.models.account_group_roles_account_group_roles_inner.AccountGroupRoles_accountGroupRoles_inner( - account_group = admin_api.models.account_group_1.AccountGroup_1(), - roles = [ - admin_api.models.role.Role() - ], ) - ], - all_account_group_roles = [ - admin_api.models.role.Role() - ] - ) - else: - return UserDetail( - ) - """ - - def testUserDetail(self): - """Test UserDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_event.py b/admin_api/test/test_user_event.py deleted file mode 100644 index 31c5c2f2..00000000 --- a/admin_api/test/test_user_event.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_event import UserEvent - -class TestUserEvent(unittest.TestCase): - """UserEvent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserEvent: - """Test UserEvent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserEvent` - """ - model = UserEvent() - if include_optional: - return UserEvent( - aid = '11', - account_group_name = 'Account A', - var_date = '2020-07-17T22:00:54Z', - event = 'Login failed.', - ip_address = '99.128.0.0/11', - uid = '245', - user = 'API Sandbox User (noreply@thousandeyes.com)', - resources = [ - admin_api.models.user_event_all_of_resources_inner.UserEvent_allOf_resources_inner( - type = '', - name = '', ) - ] - ) - else: - return UserEvent( - ) - """ - - def testUserEvent(self): - """Test UserEvent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_event_all_of_resources_inner.py b/admin_api/test/test_user_event_all_of_resources_inner.py deleted file mode 100644 index c1004db3..00000000 --- a/admin_api/test/test_user_event_all_of_resources_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_event_all_of_resources_inner import UserEventAllOfResourcesInner - -class TestUserEventAllOfResourcesInner(unittest.TestCase): - """UserEventAllOfResourcesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserEventAllOfResourcesInner: - """Test UserEventAllOfResourcesInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserEventAllOfResourcesInner` - """ - model = UserEventAllOfResourcesInner() - if include_optional: - return UserEventAllOfResourcesInner( - type = '', - name = '' - ) - else: - return UserEventAllOfResourcesInner( - ) - """ - - def testUserEventAllOfResourcesInner(self): - """Test UserEventAllOfResourcesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_events.py b/admin_api/test/test_user_events.py deleted file mode 100644 index 2cb5daf0..00000000 --- a/admin_api/test/test_user_events.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_events import UserEvents - -class TestUserEvents(unittest.TestCase): - """UserEvents unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserEvents: - """Test UserEvents - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserEvents` - """ - model = UserEvents() - if include_optional: - return UserEvents( - audit_events = [{"accountGroupName":"API Sandbox","aid":"75","date":"2020-07-17T21:54:54Z","event":"Report created.","ipAddress":"99.128.0.0/11","uid":"245","user":"API Sandbox User (noreply@thousandeyes.com)","resources":[{"name":"My New report","type":"reportTitle"},{"name":"Other Report","type":"testName"}]},{"accountGroupName":"API Sandbox","aid":"75","date":"2020-07-17T22:00:54Z","event":"Login failed.","ipAddress":"99.128.0.0/11","uid":"245","user":"API Sandbox User (noreply@thousandeyes.com)"}] - ) - else: - return UserEvents( - ) - """ - - def testUserEvents(self): - """Test UserEvents""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_events_api.py b/admin_api/test/test_user_events_api.py deleted file mode 100644 index 05b2bbeb..00000000 --- a/admin_api/test/test_user_events_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from admin_api.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(self) -> None: - """Test case for get_user_events - - List activity log events - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_user_request_body.py b/admin_api/test/test_user_request_body.py deleted file mode 100644 index 0f0b0340..00000000 --- a/admin_api/test/test_user_request_body.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.user_request_body import UserRequestBody - -class TestUserRequestBody(unittest.TestCase): - """UserRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserRequestBody: - """Test UserRequestBody - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserRequestBody` - """ - model = UserRequestBody() - if include_optional: - return UserRequestBody( - name = 'User X', - email = 'userx@thousandeyes.com', - login_account_group_id = '691', - account_group_roles = [ - admin_api.models.account_group_roles_request_body_inner.AccountGroupRolesRequestBody_inner( - account_group_id = '315', - role_ids = ["57","1140"], ) - ], - all_account_group_role_ids = ["57","1140"] - ) - else: - return UserRequestBody( - ) - """ - - def testUserRequestBody(self): - """Test UserRequestBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_users.py b/admin_api/test/test_users.py deleted file mode 100644 index ee550b86..00000000 --- a/admin_api/test/test_users.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from admin_api.models.users import Users - -class TestUsers(unittest.TestCase): - """Users unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Users: - """Test Users - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Users` - """ - model = Users() - if include_optional: - return Users( - users = [ - null - ] - ) - else: - return Users( - ) - """ - - def testUsers(self): - """Test Users""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/test/test_users_api.py b/admin_api/test/test_users_api.py deleted file mode 100644 index ad92814f..00000000 --- a/admin_api/test/test_users_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from admin_api.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(self) -> None: - """Test case for create_user - - Create user - """ - pass - - def test_delete_user(self) -> None: - """Test case for delete_user - - Delete user - """ - pass - - def test_get_user(self) -> None: - """Test case for get_user - - Retrieve user - """ - pass - - def test_get_users(self) -> None: - """Test case for get_users - - List users - """ - pass - - def test_update_user(self) -> None: - """Test case for update_user - - Update user - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/admin_api/tox.ini b/admin_api/tox.ini deleted file mode 100644 index 289db326..00000000 --- a/admin_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=admin_api diff --git a/agents_api/.gitignore b/agents/.gitignore similarity index 100% rename from agents_api/.gitignore rename to agents/.gitignore diff --git a/agents_api/.openapi-generator-ignore b/agents/.openapi-generator-ignore similarity index 100% rename from agents_api/.openapi-generator-ignore rename to agents/.openapi-generator-ignore diff --git a/agents/.openapi-generator/FILES b/agents/.openapi-generator/FILES new file mode 100644 index 00000000..093f1d20 --- /dev/null +++ b/agents/.openapi-generator/FILES @@ -0,0 +1,200 @@ +.gitignore +.openapi-generator-ignore +README.md +agents/__init__.py +agents/api/__init__.py +agents/api/cloud_and_enterprise_agent_notification_rules_api.py +agents/api/cloud_and_enterprise_agents_api.py +agents/api/enterprise_agent_cluster_api.py +agents/api/proxies_api.py +agents/api_client.py +agents/api_response.py +agents/configuration.py +agents/exceptions.py +agents/models/__init__.py +agents/models/account_group.py +agents/models/account_group_id.py +agents/models/agent.py +agents/models/agent_base.py +agents/models/agent_details.py +agents/models/agent_details_expand.py +agents/models/agent_ipv6_policy.py +agents/models/agent_list_expand.py +agents/models/agent_proxies.py +agents/models/agent_proxy.py +agents/models/agent_request_body.py +agents/models/agents.py +agents/models/alert_email.py +agents/models/alert_integration_base.py +agents/models/alert_integration_type.py +agents/models/assign_enterprise_agent_cluster_request.py +agents/models/cloud_agent_detail.py +agents/models/cloud_enterprise_agent.py +agents/models/cloud_enterprise_agent_type.py +agents/models/cloud_enterprise_agents.py +agents/models/cluster_member.py +agents/models/enterprise_agent.py +agents/models/enterprise_agent_cluster_detail.py +agents/models/enterprise_agent_data.py +agents/models/enterprise_agent_detail.py +agents/models/enterprise_agent_ipv6_policy.py +agents/models/enterprise_agent_response_expands.py +agents/models/enterprise_agent_state.py +agents/models/error.py +agents/models/error_detail.py +agents/models/error_detail_code.py +agents/models/get_agent_proxies200_response.py +agents/models/get_agents200_response.py +agents/models/get_agents_notification_rule200_response.py +agents/models/get_agents_notification_rules200_response.py +agents/models/interface_ip_mapping.py +agents/models/labels.py +agents/models/link.py +agents/models/notification.py +agents/models/notification_rule.py +agents/models/notification_rule_detail.py +agents/models/notification_rules.py +agents/models/notifications.py +agents/models/proxy_auth_type.py +agents/models/proxy_type.py +agents/models/self_links.py +agents/models/self_links_links.py +agents/models/simple_agent.py +agents/models/simple_enterprise_agent.py +agents/models/simple_test.py +agents/models/simple_test_links.py +agents/models/simple_test_links_self.py +agents/models/test_interval.py +agents/models/test_type.py +agents/models/unassign_enterprise_agent_from_cluster_request.py +agents/models/unauthorized_error.py +agents/models/validation_error.py +agents/models/validation_error_all_of_errors.py +agents/py.typed +agents/rest.py +docs/AccountGroup.md +docs/AccountGroupId.md +docs/Agent.md +docs/AgentBase.md +docs/AgentDetails.md +docs/AgentDetailsExpand.md +docs/AgentIpv6Policy.md +docs/AgentListExpand.md +docs/AgentProxies.md +docs/AgentProxy.md +docs/AgentRequestBody.md +docs/Agents.md +docs/AlertEmail.md +docs/AlertIntegrationBase.md +docs/AlertIntegrationType.md +docs/AssignEnterpriseAgentClusterRequest.md +docs/CloudAgentDetail.md +docs/CloudAndEnterpriseAgentNotificationRulesApi.md +docs/CloudAndEnterpriseAgentsApi.md +docs/CloudEnterpriseAgent.md +docs/CloudEnterpriseAgentType.md +docs/CloudEnterpriseAgents.md +docs/ClusterMember.md +docs/EnterpriseAgent.md +docs/EnterpriseAgentClusterApi.md +docs/EnterpriseAgentClusterDetail.md +docs/EnterpriseAgentData.md +docs/EnterpriseAgentDetail.md +docs/EnterpriseAgentIpv6Policy.md +docs/EnterpriseAgentResponseExpands.md +docs/EnterpriseAgentState.md +docs/Error.md +docs/ErrorDetail.md +docs/ErrorDetailCode.md +docs/GetAgentProxies200Response.md +docs/GetAgents200Response.md +docs/GetAgentsNotificationRule200Response.md +docs/GetAgentsNotificationRules200Response.md +docs/InterfaceIpMapping.md +docs/Labels.md +docs/Link.md +docs/Notification.md +docs/NotificationRule.md +docs/NotificationRuleDetail.md +docs/NotificationRules.md +docs/Notifications.md +docs/ProxiesApi.md +docs/ProxyAuthType.md +docs/ProxyType.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/SimpleAgent.md +docs/SimpleEnterpriseAgent.md +docs/SimpleTest.md +docs/SimpleTestLinks.md +docs/SimpleTestLinksSelf.md +docs/TestInterval.md +docs/TestType.md +docs/UnassignEnterpriseAgentFromClusterRequest.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_account_group.py +test/test_account_group_id.py +test/test_agent.py +test/test_agent_base.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_body.py +test/test_agents.py +test/test_alert_email.py +test/test_alert_integration_base.py +test/test_alert_integration_type.py +test/test_assign_enterprise_agent_cluster_request.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_get_agent_proxies200_response.py +test/test_get_agents200_response.py +test/test_get_agents_notification_rule200_response.py +test/test_get_agents_notification_rules200_response.py +test/test_interface_ip_mapping.py +test/test_labels.py +test/test_link.py +test/test_notification.py +test/test_notification_rule.py +test/test_notification_rule_detail.py +test/test_notification_rules.py +test/test_notifications.py +test/test_proxy_auth_type.py +test/test_proxy_type.py +test/test_self_links.py +test/test_self_links_links.py +test/test_simple_agent.py +test/test_simple_enterprise_agent.py +test/test_simple_test.py +test/test_simple_test_links.py +test/test_simple_test_links_self.py +test/test_test_interval.py +test/test_test_type.py +test/test_unassign_enterprise_agent_from_cluster_request.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/agents/.openapi-generator/VERSION b/agents/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/agents/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/agents/README.md b/agents/README.md new file mode 100644 index 00000000..27566610 --- /dev/null +++ b/agents/README.md @@ -0,0 +1,188 @@ +# agents + +## Overview +Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import agents +``` + +### 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 agents +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import agents +from 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 = agents.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 = agents.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with agents.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = agents.CloudAndEnterpriseAgentNotificationRulesApi(api_client) + notification_rule_id = '281474976710706' # str | Unique ID for the agent notification rule. + 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 notification rule + api_response = api_instance.get_agents_notification_rule(notification_rule_id, aid=aid) + print("The response of CloudAndEnterpriseAgentNotificationRulesApi->get_agents_notification_rule:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling CloudAndEnterpriseAgentNotificationRulesApi->get_agents_notification_rule: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +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* | [**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 + + +## Documentation For Models + + - [AccountGroup](docs/AccountGroup.md) + - [AccountGroupId](docs/AccountGroupId.md) + - [Agent](docs/Agent.md) + - [AgentBase](docs/AgentBase.md) + - [AgentDetails](docs/AgentDetails.md) + - [AgentDetailsExpand](docs/AgentDetailsExpand.md) + - [AgentIpv6Policy](docs/AgentIpv6Policy.md) + - [AgentListExpand](docs/AgentListExpand.md) + - [AgentProxies](docs/AgentProxies.md) + - [AgentProxy](docs/AgentProxy.md) + - [AgentRequestBody](docs/AgentRequestBody.md) + - [Agents](docs/Agents.md) + - [AlertEmail](docs/AlertEmail.md) + - [AlertIntegrationBase](docs/AlertIntegrationBase.md) + - [AlertIntegrationType](docs/AlertIntegrationType.md) + - [AssignEnterpriseAgentClusterRequest](docs/AssignEnterpriseAgentClusterRequest.md) + - [CloudAgentDetail](docs/CloudAgentDetail.md) + - [CloudEnterpriseAgent](docs/CloudEnterpriseAgent.md) + - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) + - [CloudEnterpriseAgents](docs/CloudEnterpriseAgents.md) + - [ClusterMember](docs/ClusterMember.md) + - [EnterpriseAgent](docs/EnterpriseAgent.md) + - [EnterpriseAgentClusterDetail](docs/EnterpriseAgentClusterDetail.md) + - [EnterpriseAgentData](docs/EnterpriseAgentData.md) + - [EnterpriseAgentDetail](docs/EnterpriseAgentDetail.md) + - [EnterpriseAgentIpv6Policy](docs/EnterpriseAgentIpv6Policy.md) + - [EnterpriseAgentResponseExpands](docs/EnterpriseAgentResponseExpands.md) + - [EnterpriseAgentState](docs/EnterpriseAgentState.md) + - [Error](docs/Error.md) + - [ErrorDetail](docs/ErrorDetail.md) + - [ErrorDetailCode](docs/ErrorDetailCode.md) + - [GetAgentProxies200Response](docs/GetAgentProxies200Response.md) + - [GetAgents200Response](docs/GetAgents200Response.md) + - [GetAgentsNotificationRule200Response](docs/GetAgentsNotificationRule200Response.md) + - [GetAgentsNotificationRules200Response](docs/GetAgentsNotificationRules200Response.md) + - [InterfaceIpMapping](docs/InterfaceIpMapping.md) + - [Labels](docs/Labels.md) + - [Link](docs/Link.md) + - [Notification](docs/Notification.md) + - [NotificationRule](docs/NotificationRule.md) + - [NotificationRuleDetail](docs/NotificationRuleDetail.md) + - [NotificationRules](docs/NotificationRules.md) + - [Notifications](docs/Notifications.md) + - [ProxyAuthType](docs/ProxyAuthType.md) + - [ProxyType](docs/ProxyType.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [SimpleAgent](docs/SimpleAgent.md) + - [SimpleEnterpriseAgent](docs/SimpleEnterpriseAgent.md) + - [SimpleTest](docs/SimpleTest.md) + - [SimpleTestLinks](docs/SimpleTestLinks.md) + - [SimpleTestLinksSelf](docs/SimpleTestLinksSelf.md) + - [TestInterval](docs/TestInterval.md) + - [TestType](docs/TestType.md) + - [UnassignEnterpriseAgentFromClusterRequest](docs/UnassignEnterpriseAgentFromClusterRequest.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/agents/agents/__init__.py b/agents/agents/__init__.py new file mode 100644 index 00000000..f76903e9 --- /dev/null +++ b/agents/agents/__init__.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi +from agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi +from agents.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi +from agents.api.proxies_api import ProxiesApi + +# import ApiClient +from agents.api_response import ApiResponse +from agents.api_client import ApiClient +from agents.configuration import Configuration +from agents.exceptions import OpenApiException +from agents.exceptions import ApiTypeError +from agents.exceptions import ApiValueError +from agents.exceptions import ApiKeyError +from agents.exceptions import ApiAttributeError +from agents.exceptions import ApiException + +# import models into sdk package +from agents.models.account_group import AccountGroup +from agents.models.account_group_id import AccountGroupId +from agents.models.agent import Agent +from agents.models.agent_base import AgentBase +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.agent_ipv6_policy import AgentIpv6Policy +from agents.models.agent_list_expand import AgentListExpand +from agents.models.agent_proxies import AgentProxies +from agents.models.agent_proxy import AgentProxy +from agents.models.agent_request_body import AgentRequestBody +from agents.models.agents import Agents +from agents.models.alert_email import AlertEmail +from agents.models.alert_integration_base import AlertIntegrationBase +from agents.models.alert_integration_type import AlertIntegrationType +from agents.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest +from agents.models.cloud_agent_detail import CloudAgentDetail +from agents.models.cloud_enterprise_agent import CloudEnterpriseAgent +from agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from agents.models.cloud_enterprise_agents import CloudEnterpriseAgents +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent import EnterpriseAgent +from agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail +from agents.models.enterprise_agent_data import EnterpriseAgentData +from agents.models.enterprise_agent_detail import EnterpriseAgentDetail +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_response_expands import EnterpriseAgentResponseExpands +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error import Error +from agents.models.error_detail import ErrorDetail +from agents.models.error_detail_code import ErrorDetailCode +from agents.models.get_agent_proxies200_response import GetAgentProxies200Response +from agents.models.get_agents200_response import GetAgents200Response +from agents.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response +from agents.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response +from agents.models.interface_ip_mapping import InterfaceIpMapping +from agents.models.labels import Labels +from agents.models.link import Link +from agents.models.notification import Notification +from agents.models.notification_rule import NotificationRule +from agents.models.notification_rule_detail import NotificationRuleDetail +from agents.models.notification_rules import NotificationRules +from agents.models.notifications import Notifications +from agents.models.proxy_auth_type import ProxyAuthType +from agents.models.proxy_type import ProxyType +from agents.models.self_links import SelfLinks +from agents.models.self_links_links import SelfLinksLinks +from agents.models.simple_agent import SimpleAgent +from agents.models.simple_enterprise_agent import SimpleEnterpriseAgent +from agents.models.simple_test import SimpleTest +from agents.models.simple_test_links import SimpleTestLinks +from agents.models.simple_test_links_self import SimpleTestLinksSelf +from agents.models.test_interval import TestInterval +from agents.models.test_type import TestType +from agents.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest +from agents.models.unauthorized_error import UnauthorizedError +from agents.models.validation_error import ValidationError +from agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/agents/agents/api/__init__.py b/agents/agents/api/__init__.py new file mode 100644 index 00000000..3e299593 --- /dev/null +++ b/agents/agents/api/__init__.py @@ -0,0 +1,8 @@ +# flake8: noqa + +# import apis into api package +from agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi +from agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi +from agents.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi +from agents.api.proxies_api import ProxiesApi + diff --git a/agents_api/agents_api/api/cloud_and_enterprise_agent_notification_rules_api.py b/agents/agents/api/cloud_and_enterprise_agent_notification_rules_api.py similarity index 96% rename from agents_api/agents_api/api/cloud_and_enterprise_agent_notification_rules_api.py rename to agents/agents/api/cloud_and_enterprise_agent_notification_rules_api.py index 235a8bb9..c30c30b7 100644 --- a/agents_api/agents_api/api/cloud_and_enterprise_agent_notification_rules_api.py +++ b/agents/agents/api/cloud_and_enterprise_agent_notification_rules_api.py @@ -5,36 +5,26 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from agents.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response +from agents.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response -from agents_api.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response -from agents_api.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from agents.api_client import ApiClient, RequestSerialized +from agents.api_response import ApiResponse +from agents.rest import RESTResponseType class CloudAndEnterpriseAgentNotificationRulesApi: @@ -115,8 +105,6 @@ class CloudAndEnterpriseAgentNotificationRulesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -194,8 +182,6 @@ class CloudAndEnterpriseAgentNotificationRulesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -273,8 +259,6 @@ class CloudAndEnterpriseAgentNotificationRulesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -291,19 +275,18 @@ class CloudAndEnterpriseAgentNotificationRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -412,8 +395,6 @@ class CloudAndEnterpriseAgentNotificationRulesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -487,8 +468,6 @@ class CloudAndEnterpriseAgentNotificationRulesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -562,8 +541,6 @@ class CloudAndEnterpriseAgentNotificationRulesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -579,19 +556,18 @@ class CloudAndEnterpriseAgentNotificationRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/agents_api/agents_api/api/cloud_and_enterprise_agents_api.py b/agents/agents/api/cloud_and_enterprise_agents_api.py similarity index 95% rename from agents_api/agents_api/api/cloud_and_enterprise_agents_api.py rename to agents/agents/api/cloud_and_enterprise_agents_api.py index a0cda0b6..b38f8321 100644 --- a/agents_api/agents_api/api/cloud_and_enterprise_agents_api.py +++ b/agents/agents/api/cloud_and_enterprise_agents_api.py @@ -5,41 +5,30 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.agent_list_expand import AgentListExpand +from agents.models.agent_request_body import AgentRequestBody +from agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from agents.models.get_agents200_response import GetAgents200Response -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.agent_list_expand import AgentListExpand -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.enterprise_agent_request_body import EnterpriseAgentRequestBody -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response -from agents_api.models.get_agents200_response import GetAgents200Response -from agents_api.models.update_enterprise_agent_details200_response import UpdateEnterpriseAgentDetails200Response - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from agents.api_client import ApiClient, RequestSerialized +from agents.api_response import ApiResponse +from agents.rest import RESTResponseType class CloudAndEnterpriseAgentsApi: @@ -113,7 +102,13 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -184,7 +179,13 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -255,7 +256,13 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -272,19 +279,18 @@ class CloudAndEnterpriseAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -303,7 +309,6 @@ class CloudAndEnterpriseAgentsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -350,7 +355,7 @@ class CloudAndEnterpriseAgentsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAgentDetails200Response: + ) -> AgentDetails: """Retrieve Cloud and Enterprise Agent Returns details for an agent, including assigned tests. For Enterprise Agents, this endpoint returns additional details, including utilization data, assigned accounts, a list of account groups the agent is assigned to, and utilization details. @@ -394,15 +399,13 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentDetails200Response", + '200': "AgentDetails", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -433,7 +436,7 @@ class CloudAndEnterpriseAgentsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAgentDetails200Response]: + ) -> ApiResponse[AgentDetails]: """Retrieve Cloud and Enterprise Agent Returns details for an agent, including assigned tests. For Enterprise Agents, this endpoint returns additional details, including utilization data, assigned accounts, a list of account groups the agent is assigned to, and utilization details. @@ -477,15 +480,13 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentDetails200Response", + '200': "AgentDetails", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -560,15 +561,13 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentDetails200Response", + '200': "AgentDetails", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -586,12 +585,11 @@ class CloudAndEnterpriseAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -599,7 +597,7 @@ class CloudAndEnterpriseAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -720,8 +718,6 @@ class CloudAndEnterpriseAgentsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -803,8 +799,6 @@ class CloudAndEnterpriseAgentsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -886,8 +880,6 @@ class CloudAndEnterpriseAgentsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -905,12 +897,11 @@ class CloudAndEnterpriseAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', 'agentTypes': 'csv', } @@ -919,7 +910,7 @@ class CloudAndEnterpriseAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -977,7 +968,7 @@ class CloudAndEnterpriseAgentsApi: def update_enterprise_agent_details( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], - enterprise_agent_request_body: EnterpriseAgentRequestBody, + agent_request_body: AgentRequestBody, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[AgentDetailsExpand]], Field(description="Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query.")] = None, _request_timeout: Union[ @@ -992,15 +983,15 @@ class CloudAndEnterpriseAgentsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UpdateEnterpriseAgentDetails200Response: + ) -> AgentDetails: """Update Enterprise Agent Updates details for an Enterprise Agent. This endpoint can only be used for Enterprise Agents, and only for users in a role that permits modification of Enterprise Agents. Important notes related to agent modification on tests: * if an agent is removed from a test, the modification date for tests using that agent at the time it was removed will be changed. * If an agent is removed from an entire account group, then all tests using this agent in the removed account group will be updated to reflect the removed agent. * If a removed agent is the final remaining agent on a test, then the test will be disabled when the agent is removed. Users can update the following fields: * `agentName`: String representation of an agent. No two agents can have the same display name. * `enabled`: Boolean representation of agent state. * `accountGroups`: An array of account group ids. See `v7/account-groups` to pull a list of account IDs. * `tests`: An array of test Is. See `v7/tests` to retrieve a list tests available in the current account context. * `ipv6Policy`: Enum representation of the IP version policy. * `keepBrowserCache`: Boolean representation of the Keep browser cache state. * `targetForTests`: String representation of the target IP address or domain name. This represents the test destination when agent is acting as a test target in an agent-to-agent test. * `localResolutionPrefixes`: This array of strings represents the public IP ranges where the Enterprise Agent performs rDNS (Reverse DNS) lookups. The range should be in CIDR notation, such as `10.1.1.0/24`. Please note that a maximum of 5 prefixes is allowed. This only applies to Enterprise Agents and Enterprise Agent clusters. :param agent_id: Unique ID for the agent. (required) :type agent_id: str - :param enterprise_agent_request_body: (required) - :type enterprise_agent_request_body: EnterpriseAgentRequestBody + :param agent_request_body: (required) + :type agent_request_body: AgentRequestBody :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: Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. @@ -1029,7 +1020,7 @@ class CloudAndEnterpriseAgentsApi: _param = self._update_enterprise_agent_details_serialize( agent_id=agent_id, - enterprise_agent_request_body=enterprise_agent_request_body, + agent_request_body=agent_request_body, aid=aid, expand=expand, _request_auth=_request_auth, @@ -1039,16 +1030,14 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateEnterpriseAgentDetails200Response", - '400': "Error", + '200': "AgentDetails", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1065,7 +1054,7 @@ class CloudAndEnterpriseAgentsApi: def update_enterprise_agent_details_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], - enterprise_agent_request_body: EnterpriseAgentRequestBody, + agent_request_body: AgentRequestBody, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[AgentDetailsExpand]], Field(description="Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query.")] = None, _request_timeout: Union[ @@ -1080,15 +1069,15 @@ class CloudAndEnterpriseAgentsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UpdateEnterpriseAgentDetails200Response]: + ) -> ApiResponse[AgentDetails]: """Update Enterprise Agent Updates details for an Enterprise Agent. This endpoint can only be used for Enterprise Agents, and only for users in a role that permits modification of Enterprise Agents. Important notes related to agent modification on tests: * if an agent is removed from a test, the modification date for tests using that agent at the time it was removed will be changed. * If an agent is removed from an entire account group, then all tests using this agent in the removed account group will be updated to reflect the removed agent. * If a removed agent is the final remaining agent on a test, then the test will be disabled when the agent is removed. Users can update the following fields: * `agentName`: String representation of an agent. No two agents can have the same display name. * `enabled`: Boolean representation of agent state. * `accountGroups`: An array of account group ids. See `v7/account-groups` to pull a list of account IDs. * `tests`: An array of test Is. See `v7/tests` to retrieve a list tests available in the current account context. * `ipv6Policy`: Enum representation of the IP version policy. * `keepBrowserCache`: Boolean representation of the Keep browser cache state. * `targetForTests`: String representation of the target IP address or domain name. This represents the test destination when agent is acting as a test target in an agent-to-agent test. * `localResolutionPrefixes`: This array of strings represents the public IP ranges where the Enterprise Agent performs rDNS (Reverse DNS) lookups. The range should be in CIDR notation, such as `10.1.1.0/24`. Please note that a maximum of 5 prefixes is allowed. This only applies to Enterprise Agents and Enterprise Agent clusters. :param agent_id: Unique ID for the agent. (required) :type agent_id: str - :param enterprise_agent_request_body: (required) - :type enterprise_agent_request_body: EnterpriseAgentRequestBody + :param agent_request_body: (required) + :type agent_request_body: AgentRequestBody :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: Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. @@ -1117,7 +1106,7 @@ class CloudAndEnterpriseAgentsApi: _param = self._update_enterprise_agent_details_serialize( agent_id=agent_id, - enterprise_agent_request_body=enterprise_agent_request_body, + agent_request_body=agent_request_body, aid=aid, expand=expand, _request_auth=_request_auth, @@ -1127,16 +1116,14 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateEnterpriseAgentDetails200Response", - '400': "Error", + '200': "AgentDetails", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1153,7 +1140,7 @@ class CloudAndEnterpriseAgentsApi: def update_enterprise_agent_details_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], - enterprise_agent_request_body: EnterpriseAgentRequestBody, + agent_request_body: AgentRequestBody, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[AgentDetailsExpand]], Field(description="Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query.")] = None, _request_timeout: Union[ @@ -1175,8 +1162,8 @@ class CloudAndEnterpriseAgentsApi: :param agent_id: Unique ID for the agent. (required) :type agent_id: str - :param enterprise_agent_request_body: (required) - :type enterprise_agent_request_body: EnterpriseAgentRequestBody + :param agent_request_body: (required) + :type agent_request_body: AgentRequestBody :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: Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. @@ -1205,7 +1192,7 @@ class CloudAndEnterpriseAgentsApi: _param = self._update_enterprise_agent_details_serialize( agent_id=agent_id, - enterprise_agent_request_body=enterprise_agent_request_body, + agent_request_body=agent_request_body, aid=aid, expand=expand, _request_auth=_request_auth, @@ -1215,16 +1202,14 @@ class CloudAndEnterpriseAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateEnterpriseAgentDetails200Response", - '400': "Error", + '200': "AgentDetails", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1236,19 +1221,18 @@ class CloudAndEnterpriseAgentsApi: def _update_enterprise_agent_details_serialize( self, agent_id, - enterprise_agent_request_body, + agent_request_body, aid, expand, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1256,7 +1240,7 @@ class CloudAndEnterpriseAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1274,8 +1258,8 @@ class CloudAndEnterpriseAgentsApi: # process the header parameters # process the form parameters # process the body parameter - if enterprise_agent_request_body is not None: - _body_params = enterprise_agent_request_body + if agent_request_body is not None: + _body_params = agent_request_body # set the HTTP header `Accept` diff --git a/agents_api/agents_api/api/enterprise_agent_cluster_api.py b/agents/agents/api/enterprise_agent_cluster_api.py similarity index 96% rename from agents_api/agents_api/api/enterprise_agent_cluster_api.py rename to agents/agents/api/enterprise_agent_cluster_api.py index e3066b12..bcb5b0c5 100644 --- a/agents_api/agents_api/api/enterprise_agent_cluster_api.py +++ b/agents/agents/api/enterprise_agent_cluster_api.py @@ -5,39 +5,29 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest +from agents.models.get_agents200_response import GetAgents200Response +from agents.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response -from agents_api.models.get_agents200_response import GetAgents200Response -from agents_api.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from agents.api_client import ApiClient, RequestSerialized +from agents.api_response import ApiResponse +from agents.rest import RESTResponseType class EnterpriseAgentClusterApi: @@ -72,7 +62,7 @@ class EnterpriseAgentClusterApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAgentDetails200Response: + ) -> AgentDetails: """Add member to Enterprise Agent cluster Adding a member to an Enterprise Agent cluster converts a standalone Enterprise Agent to an Enterprise Agent cluster. If the agent represented by the path {agentId} is not already a cluster, it will be converted to a cluster. The response will be a single Enterprise Agent Cluster. The converted Enterprise Agents will become cluster members, and can be returned using the `?expand=cluster-member` parameter. This endpoint requires users to have the `Edit agents in account group` permission. Upon successful cluster creation, the response includes: * Information about the new cluster in the response body. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` value is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is present in the request URL. **Example - converting a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign -H \"Authorization: Bearer $Bearer_token\" ```` **Example - converting multiple agents** ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ```` @@ -119,16 +109,14 @@ class EnterpriseAgentClusterApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentDetails200Response", - '400': "Error", + '200': "AgentDetails", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -160,7 +148,7 @@ class EnterpriseAgentClusterApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAgentDetails200Response]: + ) -> ApiResponse[AgentDetails]: """Add member to Enterprise Agent cluster Adding a member to an Enterprise Agent cluster converts a standalone Enterprise Agent to an Enterprise Agent cluster. If the agent represented by the path {agentId} is not already a cluster, it will be converted to a cluster. The response will be a single Enterprise Agent Cluster. The converted Enterprise Agents will become cluster members, and can be returned using the `?expand=cluster-member` parameter. This endpoint requires users to have the `Edit agents in account group` permission. Upon successful cluster creation, the response includes: * Information about the new cluster in the response body. * Each cluster member receives a unique `memberId` within the cluster. * The `memberId` value is not linked to the original `agentId` used in the request URL or POST body. * The cluster name is based on the agent whose `agentId` is present in the request URL. **Example - converting a single agent** ``` curl -X POST https://api.thousandeyes.com/v7/agents/64965/cluster/assign -H \"Authorization: Bearer $Bearer_token\" ```` **Example - converting multiple agents** ``` curl https://api.thousandeyes.com/v7/agents/64965/cluster/assign \\ '{\"agents\":[ \"2277\", \"1234\" ]}' \\ -H \"content-type:application/json\" \\ -H \"Authorization: Bearer $Bearer_token\" ```` @@ -207,16 +195,14 @@ class EnterpriseAgentClusterApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentDetails200Response", - '400': "Error", + '200': "AgentDetails", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -295,16 +281,14 @@ class EnterpriseAgentClusterApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentDetails200Response", - '400': "Error", + '200': "AgentDetails", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -323,12 +307,11 @@ class EnterpriseAgentClusterApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -336,7 +319,7 @@ class EnterpriseAgentClusterApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -470,15 +453,13 @@ class EnterpriseAgentClusterApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAgents200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -558,15 +539,13 @@ class EnterpriseAgentClusterApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAgents200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -646,15 +625,13 @@ class EnterpriseAgentClusterApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetAgents200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -673,12 +650,11 @@ class EnterpriseAgentClusterApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -686,7 +662,7 @@ class EnterpriseAgentClusterApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/agents_api/agents_api/api/proxies_api.py b/agents/agents/api/proxies_api.py similarity index 95% rename from agents_api/agents_api/api/proxies_api.py rename to agents/agents/api/proxies_api.py index 5070266c..47546fd8 100644 --- a/agents_api/agents_api/api/proxies_api.py +++ b/agents/agents/api/proxies_api.py @@ -5,35 +5,25 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from agents.models.get_agent_proxies200_response import GetAgentProxies200Response -from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from agents.api_client import ApiClient, RequestSerialized +from agents.api_response import ApiResponse +from agents.rest import RESTResponseType class ProxiesApi: @@ -110,8 +100,6 @@ class ProxiesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -185,8 +173,6 @@ class ProxiesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -260,8 +246,6 @@ class ProxiesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -277,19 +261,18 @@ class ProxiesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/agents/agents/api_client.py b/agents/agents/api_client.py new file mode 100644 index 00000000..cbca1868 --- /dev/null +++ b/agents/agents/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from agents.configuration import Configuration +from agents.api_response import ApiResponse, T as ApiResponseT +import agents.models +from agents import rest +from agents.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(agents.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/agents/agents/api_response.py b/agents/agents/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/agents/agents/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/agents/agents/configuration.py b/agents/agents/configuration.py new file mode 100644 index 00000000..6de5c14e --- /dev/null +++ b/agents/agents/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("agents") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/agents/agents/exceptions.py b/agents/agents/exceptions.py new file mode 100644 index 00000000..728e35fa --- /dev/null +++ b/agents/agents/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/agents/agents/models/__init__.py b/agents/agents/models/__init__.py new file mode 100644 index 00000000..bc9c86cd --- /dev/null +++ b/agents/agents/models/__init__.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from agents.models.account_group import AccountGroup +from agents.models.account_group_id import AccountGroupId +from agents.models.agent import Agent +from agents.models.agent_base import AgentBase +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.agent_ipv6_policy import AgentIpv6Policy +from agents.models.agent_list_expand import AgentListExpand +from agents.models.agent_proxies import AgentProxies +from agents.models.agent_proxy import AgentProxy +from agents.models.agent_request_body import AgentRequestBody +from agents.models.agents import Agents +from agents.models.alert_email import AlertEmail +from agents.models.alert_integration_base import AlertIntegrationBase +from agents.models.alert_integration_type import AlertIntegrationType +from agents.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest +from agents.models.cloud_agent_detail import CloudAgentDetail +from agents.models.cloud_enterprise_agent import CloudEnterpriseAgent +from agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from agents.models.cloud_enterprise_agents import CloudEnterpriseAgents +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent import EnterpriseAgent +from agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail +from agents.models.enterprise_agent_data import EnterpriseAgentData +from agents.models.enterprise_agent_detail import EnterpriseAgentDetail +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_response_expands import EnterpriseAgentResponseExpands +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error import Error +from agents.models.error_detail import ErrorDetail +from agents.models.error_detail_code import ErrorDetailCode +from agents.models.get_agent_proxies200_response import GetAgentProxies200Response +from agents.models.get_agents200_response import GetAgents200Response +from agents.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response +from agents.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response +from agents.models.interface_ip_mapping import InterfaceIpMapping +from agents.models.labels import Labels +from agents.models.link import Link +from agents.models.notification import Notification +from agents.models.notification_rule import NotificationRule +from agents.models.notification_rule_detail import NotificationRuleDetail +from agents.models.notification_rules import NotificationRules +from agents.models.notifications import Notifications +from agents.models.proxy_auth_type import ProxyAuthType +from agents.models.proxy_type import ProxyType +from agents.models.self_links import SelfLinks +from agents.models.self_links_links import SelfLinksLinks +from agents.models.simple_agent import SimpleAgent +from agents.models.simple_enterprise_agent import SimpleEnterpriseAgent +from agents.models.simple_test import SimpleTest +from agents.models.simple_test_links import SimpleTestLinks +from agents.models.simple_test_links_self import SimpleTestLinksSelf +from agents.models.test_interval import TestInterval +from agents.models.test_type import TestType +from agents.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest +from agents.models.unauthorized_error import UnauthorizedError +from agents.models.validation_error import ValidationError +from agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/agents/agents/models/account_group.py b/agents/agents/models/account_group.py new file mode 100644 index 00000000..f5449a43 --- /dev/null +++ b/agents/agents/models/account_group.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/account_group_id.py b/agents/agents/models/account_group_id.py new file mode 100644 index 00000000..601cda4b --- /dev/null +++ b/agents/agents/models/account_group_id.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AccountGroupId(BaseModel): + """ + AccountGroupId + """ # 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.") + __properties: ClassVar[List[str]] = ["aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupId 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 AccountGroupId 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") + }) + return _obj + + diff --git a/agents/agents/models/agent.py b/agents/agents/models/agent.py new file mode 100644 index 00000000..fd94309c --- /dev/null +++ b/agents/agents/models/agent.py @@ -0,0 +1,124 @@ +# 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.2 + 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 agents.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/agent_base.py b/agents/agents/models/agent_base.py new file mode 100644 index 00000000..6d5f1cae --- /dev/null +++ b/agents/agents/models/agent_base.py @@ -0,0 +1,97 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/agent_details.py b/agents/agents/models/agent_details.py new file mode 100644 index 00000000..481262ca --- /dev/null +++ b/agents/agents/models/agent_details.py @@ -0,0 +1,154 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from agents.models.cloud_agent_detail import CloudAgentDetail +from agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail +from agents.models.enterprise_agent_detail import EnterpriseAgentDetail +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AGENTDETAILS_ONE_OF_SCHEMAS = ["CloudAgentDetail", "EnterpriseAgentClusterDetail", "EnterpriseAgentDetail"] + +class AgentDetails(BaseModel): + """ + AgentDetails + """ + # data type: CloudAgentDetail + oneof_schema_1_validator: Optional[CloudAgentDetail] = None + # data type: EnterpriseAgentDetail + oneof_schema_2_validator: Optional[EnterpriseAgentDetail] = None + # data type: EnterpriseAgentClusterDetail + oneof_schema_3_validator: Optional[EnterpriseAgentClusterDetail] = None + actual_instance: Optional[Union[CloudAgentDetail, EnterpriseAgentClusterDetail, EnterpriseAgentDetail]] = None + one_of_schemas: Set[str] = { "CloudAgentDetail", "EnterpriseAgentClusterDetail", "EnterpriseAgentDetail" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AgentDetails.model_construct() + error_messages = [] + match = 0 + # validate data type: CloudAgentDetail + if not isinstance(v, CloudAgentDetail): + error_messages.append(f"Error! Input type `{type(v)}` is not `CloudAgentDetail`") + else: + match += 1 + # validate data type: EnterpriseAgentDetail + if not isinstance(v, EnterpriseAgentDetail): + error_messages.append(f"Error! Input type `{type(v)}` is not `EnterpriseAgentDetail`") + else: + match += 1 + # validate data type: EnterpriseAgentClusterDetail + if not isinstance(v, EnterpriseAgentClusterDetail): + error_messages.append(f"Error! Input type `{type(v)}` is not `EnterpriseAgentClusterDetail`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AgentDetails with oneOf schemas: CloudAgentDetail, EnterpriseAgentClusterDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AgentDetails with oneOf schemas: CloudAgentDetail, EnterpriseAgentClusterDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CloudAgentDetail + try: + instance.actual_instance = CloudAgentDetail.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EnterpriseAgentDetail + try: + instance.actual_instance = EnterpriseAgentDetail.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EnterpriseAgentClusterDetail + try: + instance.actual_instance = EnterpriseAgentClusterDetail.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AgentDetails with oneOf schemas: CloudAgentDetail, EnterpriseAgentClusterDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AgentDetails with oneOf schemas: CloudAgentDetail, EnterpriseAgentClusterDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CloudAgentDetail, EnterpriseAgentClusterDetail, EnterpriseAgentDetail]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/agents_api/agents_api/models/agent_details_expand.py b/agents/agents/models/agent_details_expand.py similarity index 80% rename from agents_api/agents_api/models/agent_details_expand.py rename to agents/agents/models/agent_details_expand.py index 3ed27744..f86f8ffa 100644 --- a/agents_api/agents_api/models/agent_details_expand.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AgentDetailsExpand(str, Enum): diff --git a/agents_api/agents_api/models/agent_ipv6_policy.py b/agents/agents/models/agent_ipv6_policy.py similarity index 81% rename from agents_api/agents_api/models/agent_ipv6_policy.py rename to agents/agents/models/agent_ipv6_policy.py index f30bfe1e..aa3c01f2 100644 --- a/agents_api/agents_api/models/agent_ipv6_policy.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AgentIpv6Policy(str, Enum): diff --git a/agents_api/agents_api/models/agent_list_expand.py b/agents/agents/models/agent_list_expand.py similarity index 79% rename from agents_api/agents_api/models/agent_list_expand.py rename to agents/agents/models/agent_list_expand.py index 5148f314..39575c37 100644 --- a/agents_api/agents_api/models/agent_list_expand.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AgentListExpand(str, Enum): diff --git a/agents_api/agents_api/models/agent_proxies.py b/agents/agents/models/agent_proxies.py similarity index 78% rename from agents_api/agents_api/models/agent_proxies.py rename to agents/agents/models/agent_proxies.py index 78afaf9e..314f8a74 100644 --- a/agents_api/agents_api/models/agent_proxies.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.agent_proxy import AgentProxy -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.agent_proxy import AgentProxy +from typing import Optional, Set +from typing_extensions import Self class AgentProxies(BaseModel): """ @@ -34,10 +30,11 @@ class AgentProxies(BaseModel): agent_proxies: Optional[List[AgentProxy]] = Field(default=None, alias="agentProxies") __properties: ClassVar[List[str]] = ["agentProxies"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class AgentProxies(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentProxies from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +61,12 @@ class AgentProxies(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agent_proxies (list) @@ -80,7 +79,7 @@ class AgentProxies(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentProxies from a dict""" if obj is None: return None @@ -89,7 +88,7 @@ class AgentProxies(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agentProxies": [AgentProxy.from_dict(_item) for _item in obj.get("agentProxies")] if obj.get("agentProxies") is not None else None + "agentProxies": [AgentProxy.from_dict(_item) for _item in obj["agentProxies"]] if obj.get("agentProxies") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/agent_proxy.py b/agents/agents/models/agent_proxy.py similarity index 86% rename from agents_api/agents_api/models/agent_proxy.py rename to agents/agents/models/agent_proxy.py index e54c53cf..45a63f8b 100644 --- a/agents_api/agents_api/models/agent_proxy.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, SecretStr, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, SecretStr, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.proxy_auth_type import ProxyAuthType -from agents_api.models.proxy_type import ProxyType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.proxy_auth_type import ProxyAuthType +from agents.models.proxy_type import ProxyType +from typing import Optional, Set +from typing_extensions import Self class AgentProxy(BaseModel): """ @@ -45,10 +42,11 @@ class AgentProxy(BaseModel): user: Optional[StrictStr] = Field(default=None, description="Username for proxy authentication.") __properties: ClassVar[List[str]] = ["aid", "authType", "bypassList", "lastModified", "location", "isLocalConfigured", "name", "password", "proxyId", "type", "user"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +59,7 @@ class AgentProxy(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentProxy from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,16 +73,18 @@ class AgentProxy(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentProxy from a dict""" if obj is None: return None diff --git a/agents/agents/models/agent_request_body.py b/agents/agents/models/agent_request_body.py new file mode 100644 index 00000000..e5dec3d5 --- /dev/null +++ b/agents/agents/models/agent_request_body.py @@ -0,0 +1,102 @@ +# 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.2 + 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 agents.models.agent_ipv6_policy import AgentIpv6Policy +from typing import Optional, Set +from typing_extensions import Self + +class AgentRequestBody(BaseModel): + """ + AgentRequestBody + """ # noqa: E501 + agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName") + enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") + account_groups: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of account groups IDs. See `/accounts-groups` for a list of account IDs", alias="accountGroups") + ipv6_policy: Optional[AgentIpv6Policy] = Field(default=None, alias="ipv6Policy") + keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache") + 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="Public IP ranges for rDNS lookups. 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") + tests: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test IDs. See `/tests` to pull a list of available tests.") + __properties: ClassVar[List[str]] = ["agentName", "enabled", "accountGroups", "ipv6Policy", "keepBrowserCache", "targetForTests", "localResolutionPrefixes", "tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentRequestBody 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 AgentRequestBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentName": obj.get("agentName"), + "enabled": obj.get("enabled"), + "accountGroups": obj.get("accountGroups"), + "ipv6Policy": obj.get("ipv6Policy"), + "keepBrowserCache": obj.get("keepBrowserCache"), + "targetForTests": obj.get("targetForTests"), + "localResolutionPrefixes": obj.get("localResolutionPrefixes"), + "tests": obj.get("tests") + }) + return _obj + + diff --git a/agents_api/agents_api/models/agents.py b/agents/agents/models/agents.py similarity index 76% rename from agents_api/agents_api/models/agents.py rename to agents/agents/models/agents.py index 4e872e92..32165a72 100644 --- a/agents_api/agents_api/models/agents.py +++ b/agents/agents/models/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from agents_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class Agents(BaseModel): """ @@ -33,10 +30,11 @@ class Agents(BaseModel): agents: Optional[List[Agent]] = None __properties: ClassVar[List[str]] = ["agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class Agents(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Agents from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class Agents(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agents (list) @@ -79,7 +79,7 @@ class Agents(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Agents from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class Agents(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/alert_email.py b/agents/agents/models/alert_email.py similarity index 80% rename from agents_api/agents_api/models/alert_email.py rename to agents/agents/models/alert_email.py index 47b0f563..85ca4739 100644 --- a/agents_api/agents_api/models/alert_email.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class AlertEmail(BaseModel): """ @@ -34,10 +30,11 @@ class AlertEmail(BaseModel): recipients: Optional[List[StrictStr]] = Field(default=None, description="List of recipients emails that will be notified.") __properties: ClassVar[List[str]] = ["message", "recipients"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class AlertEmail(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AlertEmail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class AlertEmail(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AlertEmail from a dict""" if obj is None: return None diff --git a/agents_api/agents_api/models/alert_integration_base.py b/agents/agents/models/alert_integration_base.py similarity index 85% rename from agents_api/agents_api/models/alert_integration_base.py rename to agents/agents/models/alert_integration_base.py index 34491e02..f5ba4484 100644 --- a/agents_api/agents_api/models/alert_integration_base.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.alert_integration_type import AlertIntegrationType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.alert_integration_type import AlertIntegrationType +from typing import Optional, Set +from typing_extensions import Self class AlertIntegrationBase(BaseModel): """ @@ -41,10 +37,11 @@ class AlertIntegrationBase(BaseModel): channel: Optional[StrictStr] = Field(default=None, description="(Slack only) Slack `#channel` or `@user`.") __properties: ClassVar[List[str]] = ["integrationId", "integrationName", "integrationType", "target", "authMethod", "authUser", "authToken", "channel"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ class AlertIntegrationBase(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AlertIntegrationBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,16 +68,18 @@ class AlertIntegrationBase(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AlertIntegrationBase from a dict""" if obj is None: return None diff --git a/agents_api/agents_api/models/alert_integration_type.py b/agents/agents/models/alert_integration_type.py similarity index 80% rename from agents_api/agents_api/models/alert_integration_type.py rename to agents/agents/models/alert_integration_type.py index 772600d4..153cc40a 100644 --- a/agents_api/agents_api/models/alert_integration_type.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AlertIntegrationType(str, Enum): diff --git a/agents_api/agents_api/models/assign_enterprise_agent_cluster_request.py b/agents/agents/models/assign_enterprise_agent_cluster_request.py similarity index 80% rename from agents_api/agents_api/models/assign_enterprise_agent_cluster_request.py rename to agents/agents/models/assign_enterprise_agent_cluster_request.py index 16930036..f648b0e2 100644 --- a/agents_api/agents_api/models/assign_enterprise_agent_cluster_request.py +++ b/agents/agents/models/assign_enterprise_agent_cluster_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class AssignEnterpriseAgentClusterRequest(BaseModel): """ @@ -33,10 +29,11 @@ class AssignEnterpriseAgentClusterRequest(BaseModel): agents: Optional[List[StrictStr]] = Field(default=None, description="Contains list of agent IDs (get `agentId` from `/agents` endpoint)") __properties: ClassVar[List[str]] = ["agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +46,7 @@ class AssignEnterpriseAgentClusterRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AssignEnterpriseAgentClusterRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +60,18 @@ class AssignEnterpriseAgentClusterRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AssignEnterpriseAgentClusterRequest from a dict""" if obj is None: return None diff --git a/agents/agents/models/cloud_agent_detail.py b/agents/agents/models/cloud_agent_detail.py new file mode 100644 index 00000000..d3a456fe --- /dev/null +++ b/agents/agents/models/cloud_agent_detail.py @@ -0,0 +1,159 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from agents.models.labels import Labels +from agents.models.self_links_links import SelfLinksLinks +from agents.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class CloudAgentDetail(BaseModel): + """ + CloudAgentDetail + """ # 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") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + agent_type: Annotated[str, Field(strict=True)] = Field(description="Cloud agent type.", alias="agentType") + tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") + labels: Optional[List[Labels]] = Field(default=None, description="List of labels - see `/labels` for more information.") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "_links", "agentType", "tests", "labels"] + + @field_validator('agent_type') + def agent_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^cloud$", value): + raise ValueError(r"must validate the regular expression /^cloud$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CloudAgentDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + "agent_id", + "location", + "country_id", + "prefix", + "verify_ssl_certificates", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CloudAgentDetail 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"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentType": obj.get("agentType"), + "tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "labels": [Labels.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/agents_api/agents_api/models/cloud_enterprise_agent.py b/agents/agents/models/cloud_enterprise_agent.py similarity index 80% rename from agents_api/agents_api/models/cloud_enterprise_agent.py rename to agents/agents/models/cloud_enterprise_agent.py index 42d1e1fd..b4a90fa0 100644 --- a/agents_api/agents_api/models/cloud_enterprise_agent.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,18 +17,13 @@ from inspect import getfullargspec import json import pprint import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from agents_api.models.agent import Agent -from agents_api.models.enterprise_agent import EnterpriseAgent -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.agent import Agent +from 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 CLOUDENTERPRISEAGENT_ANY_OF_SCHEMAS = ["Agent", "EnterpriseAgent"] @@ -45,10 +40,11 @@ class CloudEnterpriseAgent(BaseModel): actual_instance: Optional[Union[Agent, EnterpriseAgent]] = None else: actual_instance: Any = None - any_of_schemas: List[str] = Literal[CLOUDENTERPRISEAGENT_ANY_OF_SCHEMAS] + any_of_schemas: Set[str] = { "Agent", "EnterpriseAgent" } model_config = { - "validate_assignment": True + "validate_assignment": True, + "protected_namespaces": (), } def __init__(self, *args, **kwargs) -> None: @@ -84,7 +80,7 @@ class CloudEnterpriseAgent(BaseModel): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Dict[str, Any]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -116,22 +112,20 @@ class CloudEnterpriseAgent(BaseModel): if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], Agent, EnterpriseAgent]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: - return "null" + return None - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: - return json.dumps(self.actual_instance) + return self.actual_instance def to_str(self) -> str: """Returns the string representation of the actual instance""" diff --git a/agents/agents/models/cloud_enterprise_agent_type.py b/agents/agents/models/cloud_enterprise_agent_type.py new file mode 100644 index 00000000..b1f74d25 --- /dev/null +++ b/agents/agents/models/cloud_enterprise_agent_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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/agents_api/agents_api/models/cloud_enterprise_agents.py b/agents/agents/models/cloud_enterprise_agents.py similarity index 78% rename from agents_api/agents_api/models/cloud_enterprise_agents.py rename to agents/agents/models/cloud_enterprise_agents.py index afc276f3..5ccd2e67 100644 --- a/agents_api/agents_api/models/cloud_enterprise_agents.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from agents_api.models.cloud_enterprise_agent import CloudEnterpriseAgent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.cloud_enterprise_agent import CloudEnterpriseAgent +from typing import Optional, Set +from typing_extensions import Self class CloudEnterpriseAgents(BaseModel): """ @@ -33,10 +30,11 @@ class CloudEnterpriseAgents(BaseModel): agents: Optional[List[CloudEnterpriseAgent]] = None __properties: ClassVar[List[str]] = ["agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class CloudEnterpriseAgents(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CloudEnterpriseAgents from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class CloudEnterpriseAgents(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agents (list) @@ -79,7 +79,7 @@ class CloudEnterpriseAgents(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CloudEnterpriseAgents from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class CloudEnterpriseAgents(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agents": [CloudEnterpriseAgent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None + "agents": [CloudEnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/agents/agents/models/cluster_member.py b/agents/agents/models/cluster_member.py new file mode 100644 index 00000000..69dc29e4 --- /dev/null +++ b/agents/agents/models/cluster_member.py @@ -0,0 +1,131 @@ +# 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.2 + 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 agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/enterprise_agent.py b/agents/agents/models/enterprise_agent.py new file mode 100644 index 00000000..0197a8cc --- /dev/null +++ b/agents/agents/models/enterprise_agent.py @@ -0,0 +1,199 @@ +# 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.2 + 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 agents.models.account_group import AccountGroup +from agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error_detail import ErrorDetail +from agents.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/enterprise_agent_cluster_detail.py b/agents/agents/models/enterprise_agent_cluster_detail.py new file mode 100644 index 00000000..6c046a95 --- /dev/null +++ b/agents/agents/models/enterprise_agent_cluster_detail.py @@ -0,0 +1,244 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from agents.models.account_group import AccountGroup +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error_detail import ErrorDetail +from agents.models.interface_ip_mapping import InterfaceIpMapping +from agents.models.labels import Labels +from agents.models.notification_rules import NotificationRules +from agents.models.self_links_links import SelfLinksLinks +from agents.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgentClusterDetail(BaseModel): + """ + EnterpriseAgentClusterDetail + """ # 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") + 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") + tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") + notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules") + labels: Optional[List[Labels]] = Field(default=None, description="List of labels. See `/labels` for more information.") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + agent_type: Annotated[str, Field(strict=True)] = Field(description="Enterprise Cluster agent type.", alias="agentType") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels", "_links", "agentType"] + + @field_validator('agent_type') + def agent_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^enterprise-cluster$", value): + raise ValueError(r"must validate the regular expression /^enterprise-cluster$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgentClusterDetail 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. + * 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", + "labels", + ]) + + _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 + # override the default output from pydantic by calling `to_dict()` of each item in tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in notification_rules (list) + _items = [] + if self.notification_rules: + for _item in self.notification_rules: + if _item: + _items.append(_item.to_dict()) + _dict['notificationRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _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 EnterpriseAgentClusterDetail 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"), + "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, + "tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "notificationRules": [NotificationRules.from_dict(_item) for _item in obj["notificationRules"]] if obj.get("notificationRules") is not None else None, + "labels": [Labels.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentType": obj.get("agentType") + }) + return _obj + + diff --git a/agents/agents/models/enterprise_agent_data.py b/agents/agents/models/enterprise_agent_data.py new file mode 100644 index 00000000..e96bc2a1 --- /dev/null +++ b/agents/agents/models/enterprise_agent_data.py @@ -0,0 +1,160 @@ +# 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.2 + 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 agents.models.account_group import AccountGroup +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error_detail import ErrorDetail +from agents.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents_api/agents_api/models/enterprise_agent_detail.py b/agents/agents/models/enterprise_agent_detail.py similarity index 75% rename from agents_api/agents_api/models/enterprise_agent_detail.py rename to agents/agents/models/enterprise_agent_detail.py index f33cd757..829ee67d 100644 --- a/agents_api/agents_api/models/enterprise_agent_detail.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,23 +18,21 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.account_group import AccountGroup -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.cluster_member import ClusterMember -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error_detail import ErrorDetail -from agents_api.models.interface_ip_mapping import InterfaceIpMapping -from agents_api.models.labels import Labels -from agents_api.models.notification_rules import NotificationRules -from agents_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Annotated +from agents.models.account_group import AccountGroup +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error_detail import ErrorDetail +from agents.models.interface_ip_mapping import InterfaceIpMapping +from agents.models.labels import Labels +from agents.models.notification_rules import NotificationRules +from agents.models.self_links_links import SelfLinksLinks +from agents.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class EnterpriseAgentDetail(BaseModel): """ @@ -45,15 +43,14 @@ class EnterpriseAgentDetail(BaseModel): 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") 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") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") 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)") @@ -67,12 +64,22 @@ class EnterpriseAgentDetail(BaseModel): tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules") labels: Optional[List[Labels]] = Field(default=None, description="List of labels. See `/labels` for more information.") - __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "agentType", "location", "countryId", "enabled", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "prefix", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels"] + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + agent_type: Annotated[str, Field(strict=True)] = Field(description="Enterprise agent type.", alias="agentType") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels", "_links", "agentType"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + @field_validator('agent_type') + def agent_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^enterprise$", value): + raise ValueError(r"must validate the regular expression /^enterprise$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -85,7 +92,7 @@ class EnterpriseAgentDetail(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EnterpriseAgentDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,26 +122,28 @@ class EnterpriseAgentDetail(BaseModel): * 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", + "labels", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - "cluster_members", - "utilization", - "prefix", - "error_details", - "hostname", - "last_seen", - "created_date", - "interface_ip_mappings", - "labels", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list) @@ -186,10 +195,13 @@ class EnterpriseAgentDetail(BaseModel): if _item: _items.append(_item.to_dict()) _dict['labels'] = _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: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EnterpriseAgentDetail from a dict""" if obj is None: return None @@ -203,17 +215,16 @@ class EnterpriseAgentDetail(BaseModel): "network": obj.get("network"), "agentId": obj.get("agentId"), "agentName": obj.get("agentName"), - "agentType": obj.get("agentType"), "location": obj.get("location"), "countryId": obj.get("countryId"), "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates"), - "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj.get("clusterMembers")] if obj.get("clusterMembers") is not None else None, - "utilization": obj.get("utilization"), - "accountGroups": [AccountGroup.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None, "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.get("errorDetails")] if obj.get("errorDetails") is not None else None, + "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"), @@ -221,10 +232,12 @@ class EnterpriseAgentDetail(BaseModel): "createdDate": obj.get("createdDate"), "targetForTests": obj.get("targetForTests"), "localResolutionPrefixes": obj.get("localResolutionPrefixes"), - "interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj.get("interfaceIpMappings")] if obj.get("interfaceIpMappings") is not None else None, - "tests": [SimpleTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "notificationRules": [NotificationRules.from_dict(_item) for _item in obj.get("notificationRules")] if obj.get("notificationRules") is not None else None, - "labels": [Labels.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None + "interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None, + "tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "notificationRules": [NotificationRules.from_dict(_item) for _item in obj["notificationRules"]] if obj.get("notificationRules") is not None else None, + "labels": [Labels.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentType": obj.get("agentType") }) return _obj diff --git a/agents/agents/models/enterprise_agent_ipv6_policy.py b/agents/agents/models/enterprise_agent_ipv6_policy.py new file mode 100644 index 00000000..ff49d667 --- /dev/null +++ b/agents/agents/models/enterprise_agent_ipv6_policy.py @@ -0,0 +1,38 @@ +# 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.2 + 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/agents/agents/models/enterprise_agent_response_expands.py b/agents/agents/models/enterprise_agent_response_expands.py new file mode 100644 index 00000000..e8327833 --- /dev/null +++ b/agents/agents/models/enterprise_agent_response_expands.py @@ -0,0 +1,117 @@ +# 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.2 + 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 agents.models.labels import Labels +from agents.models.notification_rules import NotificationRules +from agents.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgentResponseExpands(BaseModel): + """ + EnterpriseAgentResponseExpands + """ # noqa: E501 + tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") + notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules") + labels: Optional[List[Labels]] = Field(default=None, description="List of labels. See `/labels` for more information.") + __properties: ClassVar[List[str]] = ["tests", "notificationRules", "labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgentResponseExpands 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([ + "labels", + ]) + + _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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in notification_rules (list) + _items = [] + if self.notification_rules: + for _item in self.notification_rules: + if _item: + _items.append(_item.to_dict()) + _dict['notificationRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnterpriseAgentResponseExpands from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "notificationRules": [NotificationRules.from_dict(_item) for _item in obj["notificationRules"]] if obj.get("notificationRules") is not None else None, + "labels": [Labels.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/agents/agents/models/enterprise_agent_state.py b/agents/agents/models/enterprise_agent_state.py new file mode 100644 index 00000000..8b4b3131 --- /dev/null +++ b/agents/agents/models/enterprise_agent_state.py @@ -0,0 +1,38 @@ +# 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.2 + 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/agents/agents/models/error.py b/agents/agents/models/error.py new file mode 100644 index 00000000..ed7ffa08 --- /dev/null +++ b/agents/agents/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/error_detail.py b/agents/agents/models/error_detail.py new file mode 100644 index 00000000..316c44da --- /dev/null +++ b/agents/agents/models/error_detail.py @@ -0,0 +1,92 @@ +# 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.2 + 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 agents.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/error_detail_code.py b/agents/agents/models/error_detail_code.py new file mode 100644 index 00000000..df56ec2e --- /dev/null +++ b/agents/agents/models/error_detail_code.py @@ -0,0 +1,43 @@ +# 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.2 + 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/agents_api/agents_api/models/get_agent_proxies200_response.py b/agents/agents/models/get_agent_proxies200_response.py similarity index 76% rename from agents_api/agents_api/models/get_agent_proxies200_response.py rename to agents/agents/models/get_agent_proxies200_response.py index f4482ba0..ca06ef40 100644 --- a/agents_api/agents_api/models/get_agent_proxies200_response.py +++ b/agents/agents/models/get_agent_proxies200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.agent_proxy import AgentProxy -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.agent_proxy import AgentProxy +from agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetAgentProxies200Response(BaseModel): """ @@ -36,10 +32,11 @@ class GetAgentProxies200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["agentProxies", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class GetAgentProxies200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetAgentProxies200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class GetAgentProxies200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agent_proxies (list) @@ -85,7 +84,7 @@ class GetAgentProxies200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetAgentProxies200Response from a dict""" if obj is None: return None @@ -94,8 +93,8 @@ class GetAgentProxies200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agentProxies": [AgentProxy.from_dict(_item) for _item in obj.get("agentProxies")] if obj.get("agentProxies") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "agentProxies": [AgentProxy.from_dict(_item) for _item in obj["agentProxies"]] if obj.get("agentProxies") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/get_agents200_response.py b/agents/agents/models/get_agents200_response.py similarity index 76% rename from agents_api/agents_api/models/get_agents200_response.py rename to agents/agents/models/get_agents200_response.py index ca0d4d54..aa126287 100644 --- a/agents_api/agents_api/models/get_agents200_response.py +++ b/agents/agents/models/get_agents200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.cloud_enterprise_agent import CloudEnterpriseAgent -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.cloud_enterprise_agent import CloudEnterpriseAgent +from agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetAgents200Response(BaseModel): """ @@ -36,10 +32,11 @@ class GetAgents200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["agents", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class GetAgents200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetAgents200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class GetAgents200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agents (list) @@ -85,7 +84,7 @@ class GetAgents200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetAgents200Response from a dict""" if obj is None: return None @@ -94,8 +93,8 @@ class GetAgents200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agents": [CloudEnterpriseAgent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "agents": [CloudEnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/get_agents_notification_rule200_response.py b/agents/agents/models/get_agents_notification_rule200_response.py similarity index 78% rename from agents_api/agents_api/models/get_agents_notification_rule200_response.py rename to agents/agents/models/get_agents_notification_rule200_response.py index bc58c4e7..736419e8 100644 --- a/agents_api/agents_api/models/get_agents_notification_rule200_response.py +++ b/agents/agents/models/get_agents_notification_rule200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ 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 pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.agent import Agent -from agents_api.models.notification import Notification -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.agent import Agent +from agents.models.notification import Notification +from agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetAgentsNotificationRule200Response(BaseModel): """ @@ -43,10 +39,11 @@ class GetAgentsNotificationRule200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "notifyOnClear", "isDefault", "agents", "notifications", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ class GetAgentsNotificationRule200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetAgentsNotificationRule200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,11 +71,13 @@ class GetAgentsNotificationRule200Response(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "rule_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "rule_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agents (list) @@ -97,7 +96,7 @@ class GetAgentsNotificationRule200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetAgentsNotificationRule200Response from a dict""" if obj is None: return None @@ -111,9 +110,9 @@ class GetAgentsNotificationRule200Response(BaseModel): "expression": obj.get("expression"), "notifyOnClear": obj.get("notifyOnClear"), "isDefault": obj.get("isDefault"), - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/get_agents_notification_rules200_response.py b/agents/agents/models/get_agents_notification_rules200_response.py similarity index 76% rename from agents_api/agents_api/models/get_agents_notification_rules200_response.py rename to agents/agents/models/get_agents_notification_rules200_response.py index ce72d092..5b337f90 100644 --- a/agents_api/agents_api/models/get_agents_notification_rules200_response.py +++ b/agents/agents/models/get_agents_notification_rules200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.notification_rule import NotificationRule -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.notification_rule import NotificationRule +from agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetAgentsNotificationRules200Response(BaseModel): """ @@ -36,10 +32,11 @@ class GetAgentsNotificationRules200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["agentAlertRules", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class GetAgentsNotificationRules200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetAgentsNotificationRules200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class GetAgentsNotificationRules200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agent_alert_rules (list) @@ -85,7 +84,7 @@ class GetAgentsNotificationRules200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetAgentsNotificationRules200Response from a dict""" if obj is None: return None @@ -94,8 +93,8 @@ class GetAgentsNotificationRules200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agentAlertRules": [NotificationRule.from_dict(_item) for _item in obj.get("agentAlertRules")] if obj.get("agentAlertRules") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "agentAlertRules": [NotificationRule.from_dict(_item) for _item in obj["agentAlertRules"]] if obj.get("agentAlertRules") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/agents/agents/models/interface_ip_mapping.py b/agents/agents/models/interface_ip_mapping.py new file mode 100644 index 00000000..5d3b2e67 --- /dev/null +++ b/agents/agents/models/interface_ip_mapping.py @@ -0,0 +1,93 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/labels.py b/agents/agents/models/labels.py new file mode 100644 index 00000000..ec3ab09e --- /dev/null +++ b/agents/agents/models/labels.py @@ -0,0 +1,89 @@ +# 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.2 + 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 Labels(BaseModel): + """ + Labels + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Label Id.", alias="labelId") + name: Optional[StrictStr] = Field(default=None, description="Name of the label.") + __properties: ClassVar[List[str]] = ["labelId", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Labels 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 Labels from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "name": obj.get("name") + }) + return _obj + + diff --git a/agents/agents/models/link.py b/agents/agents/models/link.py new file mode 100644 index 00000000..87b3e8e4 --- /dev/null +++ b/agents/agents/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/notification.py b/agents/agents/models/notification.py new file mode 100644 index 00000000..650e4f0b --- /dev/null +++ b/agents/agents/models/notification.py @@ -0,0 +1,110 @@ +# 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.2 + 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 agents.models.alert_email import AlertEmail +from agents.models.alert_integration_base import AlertIntegrationBase +from typing import Optional, Set +from typing_extensions import Self + +class Notification(BaseModel): + """ + Alert notification object. + """ # noqa: E501 + email: Optional[AlertEmail] = None + third_party: Optional[List[AlertIntegrationBase]] = Field(default=None, alias="thirdParty") + webhook: Optional[List[AlertIntegrationBase]] = None + __properties: ClassVar[List[str]] = ["email", "thirdParty", "webhook"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Notification 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 email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in third_party (list) + _items = [] + if self.third_party: + for _item in self.third_party: + if _item: + _items.append(_item.to_dict()) + _dict['thirdParty'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in webhook (list) + _items = [] + if self.webhook: + for _item in self.webhook: + if _item: + _items.append(_item.to_dict()) + _dict['webhook'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Notification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": AlertEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "thirdParty": [AlertIntegrationBase.from_dict(_item) for _item in obj["thirdParty"]] if obj.get("thirdParty") is not None else None, + "webhook": [AlertIntegrationBase.from_dict(_item) for _item in obj["webhook"]] if obj.get("webhook") is not None else None + }) + return _obj + + diff --git a/agents_api/agents_api/models/notification_rule.py b/agents/agents/models/notification_rule.py similarity index 83% rename from agents_api/agents_api/models/notification_rule.py rename to agents/agents/models/notification_rule.py index dec13fdc..7438333b 100644 --- a/agents_api/agents_api/models/notification_rule.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class NotificationRule(BaseModel): """ @@ -37,10 +33,11 @@ class NotificationRule(BaseModel): is_default: Optional[StrictBool] = Field(default=None, description="Agent notification rule will be automatically included on all new Enterprise Agents.", alias="isDefault") __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "notifyOnClear", "isDefault"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class NotificationRule(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NotificationRule from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,17 +65,19 @@ class NotificationRule(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "rule_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "rule_id", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NotificationRule from a dict""" if obj is None: return None diff --git a/agents_api/agents_api/models/notification_rule_detail.py b/agents/agents/models/notification_rule_detail.py similarity index 79% rename from agents_api/agents_api/models/notification_rule_detail.py rename to agents/agents/models/notification_rule_detail.py index f609ab5e..3fef6c37 100644 --- a/agents_api/agents_api/models/notification_rule_detail.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ 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 pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.agent import Agent -from agents_api.models.notification import Notification -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.agent import Agent +from agents.models.notification import Notification +from typing import Optional, Set +from typing_extensions import Self class NotificationRuleDetail(BaseModel): """ @@ -41,10 +37,11 @@ class NotificationRuleDetail(BaseModel): notifications: Optional[Notification] = None __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "notifyOnClear", "isDefault", "agents", "notifications"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ class NotificationRuleDetail(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NotificationRuleDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,11 +69,13 @@ class NotificationRuleDetail(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "rule_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "rule_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agents (list) @@ -92,7 +91,7 @@ class NotificationRuleDetail(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NotificationRuleDetail from a dict""" if obj is None: return None @@ -106,8 +105,8 @@ class NotificationRuleDetail(BaseModel): "expression": obj.get("expression"), "notifyOnClear": obj.get("notifyOnClear"), "isDefault": obj.get("isDefault"), - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/notification_rules.py b/agents/agents/models/notification_rules.py similarity index 78% rename from agents_api/agents_api/models/notification_rules.py rename to agents/agents/models/notification_rules.py index b0624d24..85ce1366 100644 --- a/agents_api/agents_api/models/notification_rules.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.notification_rule import NotificationRule -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.notification_rule import NotificationRule +from typing import Optional, Set +from typing_extensions import Self class NotificationRules(BaseModel): """ @@ -34,10 +30,11 @@ class NotificationRules(BaseModel): agent_alert_rules: Optional[List[NotificationRule]] = Field(default=None, alias="agentAlertRules") __properties: ClassVar[List[str]] = ["agentAlertRules"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class NotificationRules(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NotificationRules from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +61,12 @@ class NotificationRules(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agent_alert_rules (list) @@ -80,7 +79,7 @@ class NotificationRules(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NotificationRules from a dict""" if obj is None: return None @@ -89,7 +88,7 @@ class NotificationRules(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "agentAlertRules": [NotificationRule.from_dict(_item) for _item in obj.get("agentAlertRules")] if obj.get("agentAlertRules") is not None else None + "agentAlertRules": [NotificationRule.from_dict(_item) for _item in obj["agentAlertRules"]] if obj.get("agentAlertRules") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/notifications.py b/agents/agents/models/notifications.py similarity index 75% rename from agents_api/agents_api/models/notifications.py rename to agents/agents/models/notifications.py index 6f922552..def34cf8 100644 --- a/agents_api/agents_api/models/notifications.py +++ b/agents/agents/models/notifications.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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from agents_api.models.notification import Notification -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from agents.models.notification import Notification +from typing import Optional, Set +from typing_extensions import Self class Notifications(BaseModel): """ @@ -33,10 +30,11 @@ class Notifications(BaseModel): notifications: Optional[Notification] = None __properties: ClassVar[List[str]] = ["notifications"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class Notifications(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Notifications from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class Notifications(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of notifications @@ -75,7 +75,7 @@ class Notifications(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Notifications from a dict""" if obj is None: return None @@ -84,7 +84,7 @@ class Notifications(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None }) return _obj diff --git a/agents_api/agents_api/models/proxy_auth_type.py b/agents/agents/models/proxy_auth_type.py similarity index 80% rename from agents_api/agents_api/models/proxy_auth_type.py rename to agents/agents/models/proxy_auth_type.py index 52073b5d..a0690a0c 100644 --- a/agents_api/agents_api/models/proxy_auth_type.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ProxyAuthType(str, Enum): diff --git a/agents_api/agents_api/models/proxy_type.py b/agents/agents/models/proxy_type.py similarity index 79% rename from agents_api/agents_api/models/proxy_type.py rename to agents/agents/models/proxy_type.py index 46bdeb20..92a3cbf0 100644 --- a/agents_api/agents_api/models/proxy_type.py +++ b/agents/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ProxyType(str, Enum): diff --git a/agents/agents/models/self_links.py b/agents/agents/models/self_links.py new file mode 100644 index 00000000..95ef7d26 --- /dev/null +++ b/agents/agents/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/agents/agents/models/self_links_links.py b/agents/agents/models/self_links_links.py new file mode 100644 index 00000000..6ca4c19f --- /dev/null +++ b/agents/agents/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 agents.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/agents/agents/models/simple_agent.py b/agents/agents/models/simple_agent.py new file mode 100644 index 00000000..32089e16 --- /dev/null +++ b/agents/agents/models/simple_agent.py @@ -0,0 +1,121 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/simple_enterprise_agent.py b/agents/agents/models/simple_enterprise_agent.py new file mode 100644 index 00000000..343dcfe4 --- /dev/null +++ b/agents/agents/models/simple_enterprise_agent.py @@ -0,0 +1,196 @@ +# 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.2 + 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 agents.models.account_group import AccountGroup +from agents.models.cluster_member import ClusterMember +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from agents.models.enterprise_agent_state import EnterpriseAgentState +from agents.models.error_detail import ErrorDetail +from agents.models.interface_ip_mapping import InterfaceIpMapping +from typing import Optional, Set +from typing_extensions import Self + +class SimpleEnterpriseAgent(BaseModel): + """ + SimpleEnterpriseAgent + """ # 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") + 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]] = ["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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleEnterpriseAgent 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 SimpleEnterpriseAgent 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"), + "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/agents/agents/models/simple_test.py b/agents/agents/models/simple_test.py new file mode 100644 index 00000000..05d5e558 --- /dev/null +++ b/agents/agents/models/simple_test.py @@ -0,0 +1,147 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agents.models.simple_test_links import SimpleTestLinks +from agents.models.test_interval import TestInterval +from agents.models.test_type import TestType +from typing import Optional, Set +from typing_extensions import Self + +class SimpleTest(BaseModel): + """ + Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[SimpleTestLinks] = Field(default=None, alias="_links") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTest 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": SimpleTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/agents/agents/models/simple_test_links.py b/agents/agents/models/simple_test_links.py new file mode 100644 index 00000000..a9ff6f89 --- /dev/null +++ b/agents/agents/models/simple_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 agents.models.link import Link +from agents.models.simple_test_links_self import SimpleTestLinksSelf +from typing import Optional, Set +from typing_extensions import Self + +class SimpleTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information + """ # noqa: E501 + var_self: Optional[SimpleTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": SimpleTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/agents/agents/models/simple_test_links_self.py b/agents/agents/models/simple_test_links_self.py new file mode 100644 index 00000000..e8ef11bd --- /dev/null +++ b/agents/agents/models/simple_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 SimpleTestLinksSelf(BaseModel): + """ + SimpleTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTestLinksSelf 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 SimpleTestLinksSelf 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/agents/agents/models/test_interval.py b/agents/agents/models/test_interval.py new file mode 100644 index 00000000..972974fa --- /dev/null +++ b/agents/agents/models/test_interval.py @@ -0,0 +1,42 @@ +# 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.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/agents/agents/models/test_type.py b/agents/agents/models/test_type.py new file mode 100644 index 00000000..d3bd041a --- /dev/null +++ b/agents/agents/models/test_type.py @@ -0,0 +1,47 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TestType(str, Enum): + """ + This is a read only value, as test type is implicit in the test creation url. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + BGP = 'bgp' + HTTP_MINUS_SERVER = 'http-server' + PAGE_MINUS_LOAD = 'page-load' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + FTP_MINUS_SERVER = 'ftp-server' + DNS_MINUS_TRACE = 'dns-trace' + DNS_MINUS_SERVER = 'dns-server' + DNSSEC = 'dnssec' + SIP_MINUS_SERVER = 'sip-server' + VOICE = 'voice' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/agents_api/agents_api/models/unassign_enterprise_agent_from_cluster_request.py b/agents/agents/models/unassign_enterprise_agent_from_cluster_request.py similarity index 80% rename from agents_api/agents_api/models/unassign_enterprise_agent_from_cluster_request.py rename to agents/agents/models/unassign_enterprise_agent_from_cluster_request.py index 11b1c059..ff1f7bb1 100644 --- a/agents_api/agents_api/models/unassign_enterprise_agent_from_cluster_request.py +++ b/agents/agents/models/unassign_enterprise_agent_from_cluster_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UnassignEnterpriseAgentFromClusterRequest(BaseModel): """ @@ -33,10 +29,11 @@ class UnassignEnterpriseAgentFromClusterRequest(BaseModel): members: Optional[List[StrictStr]] = Field(default=None, description="Contains list of member IDs. (get `memberId` from `/agents/{agentId}` endpoint)") __properties: ClassVar[List[str]] = ["members"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +46,7 @@ class UnassignEnterpriseAgentFromClusterRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UnassignEnterpriseAgentFromClusterRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +60,18 @@ class UnassignEnterpriseAgentFromClusterRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UnassignEnterpriseAgentFromClusterRequest from a dict""" if obj is None: return None diff --git a/agents/agents/models/unauthorized_error.py b/agents/agents/models/unauthorized_error.py new file mode 100644 index 00000000..aac4fcae --- /dev/null +++ b/agents/agents/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/agents/agents/models/validation_error.py b/agents/agents/models/validation_error.py new file mode 100644 index 00000000..0e2cea86 --- /dev/null +++ b/agents/agents/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/agents/agents/models/validation_error_all_of_errors.py b/agents/agents/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..a9243a1d --- /dev/null +++ b/agents/agents/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/agents_api/agents_api/py.typed b/agents/agents/py.typed similarity index 100% rename from agents_api/agents_api/py.typed rename to agents/agents/py.typed diff --git a/agents/agents/rest.py b/agents/agents/rest.py new file mode 100644 index 00000000..7693df19 --- /dev/null +++ b/agents/agents/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from agents.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/agents/docs/AccountGroup.md b/agents/docs/AccountGroup.md new file mode 100644 index 00000000..97ac447e --- /dev/null +++ b/agents/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 agents.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/agents/docs/AccountGroupId.md b/agents/docs/AccountGroupId.md new file mode 100644 index 00000000..68880aaf --- /dev/null +++ b/agents/docs/AccountGroupId.md @@ -0,0 +1,29 @@ +# AccountGroupId + + +## 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] + +## Example + +```python +from agents.models.account_group_id import AccountGroupId + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupId from a JSON string +account_group_id_instance = AccountGroupId.from_json(json) +# print the JSON string representation of the object +print(AccountGroupId.to_json()) + +# convert the object into a dict +account_group_id_dict = account_group_id_instance.to_dict() +# create an instance of AccountGroupId from a dict +account_group_id_from_dict = AccountGroupId.from_dict(account_group_id_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/agents/docs/Agent.md b/agents/docs/Agent.md new file mode 100644 index 00000000..c0f27613 --- /dev/null +++ b/agents/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 agents.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/agents/docs/AgentBase.md b/agents/docs/AgentBase.md new file mode 100644 index 00000000..45c82311 --- /dev/null +++ b/agents/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 agents.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/agents_api/docs/AgentDetails.md b/agents/docs/AgentDetails.md similarity index 90% rename from agents_api/docs/AgentDetails.md rename to agents/docs/AgentDetails.md index b895ad5e..666902c4 100644 --- a/agents_api/docs/AgentDetails.md +++ b/agents/docs/AgentDetails.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly] @@ -9,15 +10,18 @@ Name | Type | Description | Notes **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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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** | **str** | Enterprise Cluster agent type. | +**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] +**labels** | [**List[Labels]**](Labels.md) | List of labels. See `/labels` for more information. | [optional] [readonly] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] **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] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] **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] @@ -28,26 +32,24 @@ Name | Type | Description | Notes **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] -**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] **notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional] -**labels** | [**List[Labels]**](Labels.md) | List of labels - see `/labels` for more information. | [optional] [readonly] ## Example ```python -from agents_api.models.agent_details import AgentDetails +from agents.models.agent_details import AgentDetails # TODO update the JSON string below json = "{}" # create an instance of AgentDetails from a JSON string agent_details_instance = AgentDetails.from_json(json) # print the JSON string representation of the object -print AgentDetails.to_json() +print(AgentDetails.to_json()) # convert the object into a dict agent_details_dict = agent_details_instance.to_dict() # create an instance of AgentDetails from a dict -agent_details_form_dict = agent_details.from_dict(agent_details_dict) +agent_details_from_dict = AgentDetails.from_dict(agent_details_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/agents_api/docs/AgentDetailsExpand.md b/agents/docs/AgentDetailsExpand.md similarity index 99% rename from agents_api/docs/AgentDetailsExpand.md rename to agents/docs/AgentDetailsExpand.md index 98168ad6..d33e1de2 100644 --- a/agents_api/docs/AgentDetailsExpand.md +++ b/agents/docs/AgentDetailsExpand.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/agents_api/docs/AgentIpv6Policy.md b/agents/docs/AgentIpv6Policy.md similarity index 99% rename from agents_api/docs/AgentIpv6Policy.md rename to agents/docs/AgentIpv6Policy.md index c8a0d372..6c9e5d76 100644 --- a/agents_api/docs/AgentIpv6Policy.md +++ b/agents/docs/AgentIpv6Policy.md @@ -3,6 +3,7 @@ IP version policy, (Enterprise Agents and Enterprise Clusters only) ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/agents_api/docs/AgentListExpand.md b/agents/docs/AgentListExpand.md similarity index 99% rename from agents_api/docs/AgentListExpand.md rename to agents/docs/AgentListExpand.md index 6fa7c0a9..06035630 100644 --- a/agents_api/docs/AgentListExpand.md +++ b/agents/docs/AgentListExpand.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/agents_api/docs/AgentProxies.md b/agents/docs/AgentProxies.md similarity index 82% rename from agents_api/docs/AgentProxies.md rename to agents/docs/AgentProxies.md index f6488136..13479593 100644 --- a/agents_api/docs/AgentProxies.md +++ b/agents/docs/AgentProxies.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_proxies** | [**List[AgentProxy]**](AgentProxy.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.agent_proxies import AgentProxies +from agents.models.agent_proxies import AgentProxies # TODO update the JSON string below json = "{}" # create an instance of AgentProxies from a JSON string agent_proxies_instance = AgentProxies.from_json(json) # print the JSON string representation of the object -print AgentProxies.to_json() +print(AgentProxies.to_json()) # convert the object into a dict agent_proxies_dict = agent_proxies_instance.to_dict() # create an instance of AgentProxies from a dict -agent_proxies_form_dict = agent_proxies.from_dict(agent_proxies_dict) +agent_proxies_from_dict = AgentProxies.from_dict(agent_proxies_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/agents_api/docs/AgentProxy.md b/agents/docs/AgentProxy.md similarity index 93% rename from agents_api/docs/AgentProxy.md rename to agents/docs/AgentProxy.md index db8a06ad..02c7441d 100644 --- a/agents_api/docs/AgentProxy.md +++ b/agents/docs/AgentProxy.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **str** | Account id that this proxy configuration belongs to | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.agent_proxy import AgentProxy +from agents.models.agent_proxy import AgentProxy # TODO update the JSON string below json = "{}" # create an instance of AgentProxy from a JSON string agent_proxy_instance = AgentProxy.from_json(json) # print the JSON string representation of the object -print AgentProxy.to_json() +print(AgentProxy.to_json()) # convert the object into a dict agent_proxy_dict = agent_proxy_instance.to_dict() # create an instance of AgentProxy from a dict -agent_proxy_form_dict = agent_proxy.from_dict(agent_proxy_dict) +agent_proxy_from_dict = AgentProxy.from_dict(agent_proxy_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/agents/docs/AgentRequestBody.md b/agents/docs/AgentRequestBody.md new file mode 100644 index 00000000..bcd714d7 --- /dev/null +++ b/agents/docs/AgentRequestBody.md @@ -0,0 +1,36 @@ +# AgentRequestBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_name** | **str** | Name of the agent. | [optional] +**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] +**account_groups** | **List[str]** | Contains a list of account groups IDs. See `/accounts-groups` for a list of account IDs | [optional] +**ipv6_policy** | [**AgentIpv6Policy**](AgentIpv6Policy.md) | | [optional] +**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional] +**target_for_tests** | **str** | Test target IP address. | [optional] +**local_resolution_prefixes** | **List[str]** | Public IP ranges for rDNS lookups. 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] +**tests** | **List[str]** | Contains list of test IDs. See `/tests` to pull a list of available tests. | [optional] + +## Example + +```python +from agents.models.agent_request_body import AgentRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentRequestBody from a JSON string +agent_request_body_instance = AgentRequestBody.from_json(json) +# print the JSON string representation of the object +print(AgentRequestBody.to_json()) + +# convert the object into a dict +agent_request_body_dict = agent_request_body_instance.to_dict() +# create an instance of AgentRequestBody from a dict +agent_request_body_from_dict = AgentRequestBody.from_dict(agent_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/agents_api/docs/Agents.md b/agents/docs/Agents.md similarity index 85% rename from agents_api/docs/Agents.md rename to agents/docs/Agents.md index e99b91ad..961f3d0e 100644 --- a/agents_api/docs/Agents.md +++ b/agents/docs/Agents.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agents** | [**List[Agent]**](Agent.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.agents import Agents +from agents.models.agents import Agents # TODO update the JSON string below json = "{}" # create an instance of Agents from a JSON string agents_instance = Agents.from_json(json) # print the JSON string representation of the object -print Agents.to_json() +print(Agents.to_json()) # convert the object into a dict agents_dict = agents_instance.to_dict() # create an instance of Agents from a dict -agents_form_dict = agents.from_dict(agents_dict) +agents_from_dict = Agents.from_dict(agents_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/agents_api/docs/AlertEmail.md b/agents/docs/AlertEmail.md similarity index 85% rename from agents_api/docs/AlertEmail.md rename to agents/docs/AlertEmail.md index f2415b01..1b623a50 100644 --- a/agents_api/docs/AlertEmail.md +++ b/agents/docs/AlertEmail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Message used for email notification. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.alert_email import AlertEmail +from agents.models.alert_email import AlertEmail # TODO update the JSON string below json = "{}" # create an instance of AlertEmail from a JSON string alert_email_instance = AlertEmail.from_json(json) # print the JSON string representation of the object -print AlertEmail.to_json() +print(AlertEmail.to_json()) # convert the object into a dict alert_email_dict = alert_email_instance.to_dict() # create an instance of AlertEmail from a dict -alert_email_form_dict = alert_email.from_dict(alert_email_dict) +alert_email_from_dict = AlertEmail.from_dict(alert_email_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/agents_api/docs/AlertIntegrationBase.md b/agents/docs/AlertIntegrationBase.md similarity index 86% rename from agents_api/docs/AlertIntegrationBase.md rename to agents/docs/AlertIntegrationBase.md index fa1ddb06..04ee4385 100644 --- a/agents_api/docs/AlertIntegrationBase.md +++ b/agents/docs/AlertIntegrationBase.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **integration_id** | **str** | Unique ID of the integration. | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.alert_integration_base import AlertIntegrationBase +from agents.models.alert_integration_base import AlertIntegrationBase # TODO update the JSON string below json = "{}" # create an instance of AlertIntegrationBase from a JSON string alert_integration_base_instance = AlertIntegrationBase.from_json(json) # print the JSON string representation of the object -print AlertIntegrationBase.to_json() +print(AlertIntegrationBase.to_json()) # convert the object into a dict alert_integration_base_dict = alert_integration_base_instance.to_dict() # create an instance of AlertIntegrationBase from a dict -alert_integration_base_form_dict = alert_integration_base.from_dict(alert_integration_base_dict) +alert_integration_base_from_dict = AlertIntegrationBase.from_dict(alert_integration_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/agents_api/docs/AlertIntegrationType.md b/agents/docs/AlertIntegrationType.md similarity index 99% rename from agents_api/docs/AlertIntegrationType.md rename to agents/docs/AlertIntegrationType.md index 5810374d..771379d2 100644 --- a/agents_api/docs/AlertIntegrationType.md +++ b/agents/docs/AlertIntegrationType.md @@ -3,6 +3,7 @@ Type of the alert integration ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/agents_api/docs/AssignEnterpriseAgentClusterRequest.md b/agents/docs/AssignEnterpriseAgentClusterRequest.md similarity index 75% rename from agents_api/docs/AssignEnterpriseAgentClusterRequest.md rename to agents/docs/AssignEnterpriseAgentClusterRequest.md index 475809e2..5babfefb 100644 --- a/agents_api/docs/AssignEnterpriseAgentClusterRequest.md +++ b/agents/docs/AssignEnterpriseAgentClusterRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agents** | **List[str]** | Contains list of agent IDs (get `agentId` from `/agents` endpoint) | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest +from agents.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest # TODO update the JSON string below json = "{}" # create an instance of AssignEnterpriseAgentClusterRequest from a JSON string assign_enterprise_agent_cluster_request_instance = AssignEnterpriseAgentClusterRequest.from_json(json) # print the JSON string representation of the object -print AssignEnterpriseAgentClusterRequest.to_json() +print(AssignEnterpriseAgentClusterRequest.to_json()) # convert the object into a dict assign_enterprise_agent_cluster_request_dict = assign_enterprise_agent_cluster_request_instance.to_dict() # create an instance of AssignEnterpriseAgentClusterRequest from a dict -assign_enterprise_agent_cluster_request_form_dict = assign_enterprise_agent_cluster_request.from_dict(assign_enterprise_agent_cluster_request_dict) +assign_enterprise_agent_cluster_request_from_dict = AssignEnterpriseAgentClusterRequest.from_dict(assign_enterprise_agent_cluster_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/agents/docs/CloudAgentDetail.md b/agents/docs/CloudAgentDetail.md new file mode 100644 index 00000000..aafee125 --- /dev/null +++ b/agents/docs/CloudAgentDetail.md @@ -0,0 +1,42 @@ +# CloudAgentDetail + + +## 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] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**agent_type** | **str** | Cloud agent type. | +**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] +**labels** | [**List[Labels]**](Labels.md) | List of labels - see `/labels` for more information. | [optional] [readonly] + +## Example + +```python +from agents.models.cloud_agent_detail import CloudAgentDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of CloudAgentDetail from a JSON string +cloud_agent_detail_instance = CloudAgentDetail.from_json(json) +# print the JSON string representation of the object +print(CloudAgentDetail.to_json()) + +# convert the object into a dict +cloud_agent_detail_dict = cloud_agent_detail_instance.to_dict() +# create an instance of CloudAgentDetail from a dict +cloud_agent_detail_from_dict = CloudAgentDetail.from_dict(cloud_agent_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/agents_api/docs/CloudAndEnterpriseAgentNotificationRulesApi.md b/agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md similarity index 86% rename from agents_api/docs/CloudAndEnterpriseAgentNotificationRulesApi.md rename to agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md index 4a5187d3..fc0817f2 100644 --- a/agents_api/docs/CloudAndEnterpriseAgentNotificationRulesApi.md +++ b/agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md @@ -1,4 +1,4 @@ -# agents_api.CloudAndEnterpriseAgentNotificationRulesApi +# agents.CloudAndEnterpriseAgentNotificationRulesApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,17 +18,16 @@ Returns details of an agent notification rule, including agents it is assigned t ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response -from agents_api.rest import ApiException +import agents +from agents.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,16 +37,16 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentNotificationRulesApi(api_client) + api_instance = agents.CloudAndEnterpriseAgentNotificationRulesApi(api_client) notification_rule_id = '281474976710706' # str | Unique ID for the agent notification rule. - aid = '2067' # 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) + 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 notification rule @@ -62,6 +61,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **notification_rule_id** | **str**| Unique ID for the agent notification rule. | @@ -81,6 +81,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -104,17 +105,16 @@ Returns a list of all agent notification rules configured under the account. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response -from agents_api.rest import ApiException +import agents +from agents.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -124,15 +124,15 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentNotificationRulesApi(api_client) - aid = '2067' # 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) + api_instance = agents.CloudAndEnterpriseAgentNotificationRulesApi(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 notification rules @@ -147,6 +147,7 @@ with agents_api.ApiClient(configuration) as api_client: ### 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] @@ -165,6 +166,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/agents_api/docs/CloudAndEnterpriseAgentsApi.md b/agents/docs/CloudAndEnterpriseAgentsApi.md similarity index 80% rename from agents_api/docs/CloudAndEnterpriseAgentsApi.md rename to agents/docs/CloudAndEnterpriseAgentsApi.md index f85b37dd..283f1eaa 100644 --- a/agents_api/docs/CloudAndEnterpriseAgentsApi.md +++ b/agents/docs/CloudAndEnterpriseAgentsApi.md @@ -1,4 +1,4 @@ -# agents_api.CloudAndEnterpriseAgentsApi +# agents.CloudAndEnterpriseAgentsApi All URIs are relative to *https://api.thousandeyes.com* @@ -20,16 +20,15 @@ Deletes an Enterprise Agent. Important notes related to agent removal: * If an ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.rest import ApiException +import agents +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,16 +38,16 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentsApi(api_client) + api_instance = agents.CloudAndEnterpriseAgentsApi(api_client) agent_id = '281474976710706' # str | Unique ID for the agent. - aid = '2067' # 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) + 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 Enterprise Agent @@ -61,6 +60,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| Unique ID for the agent. | @@ -77,9 +77,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -94,7 +95,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_agent_details** -> GetAgentDetails200Response get_agent_details(agent_id, aid=aid, expand=expand) +> AgentDetails get_agent_details(agent_id, aid=aid, expand=expand) Retrieve Cloud and Enterprise Agent @@ -103,18 +104,17 @@ Returns details for an agent, including assigned tests. For Enterprise Agents, ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response -from agents_api.rest import ApiException +import agents +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -124,17 +124,17 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentsApi(api_client) + api_instance = agents.CloudAndEnterpriseAgentsApi(api_client) agent_id = '281474976710706' # str | Unique ID for the agent. - aid = '2067' # 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 = [agents_api.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (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 = [agents.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) try: # Retrieve Cloud and Enterprise Agent @@ -149,6 +149,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| Unique ID for the agent. | @@ -157,7 +158,7 @@ Name | Type | Description | Notes ### Return type -[**GetAgentDetails200Response**](GetAgentDetails200Response.md) +[**AgentDetails**](AgentDetails.md) ### Authorization @@ -169,6 +170,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -192,19 +194,18 @@ Returns a list of all agents available to your ThousandEyes account, including b ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_list_expand import AgentListExpand -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.get_agents200_response import GetAgents200Response -from agents_api.rest import ApiException +import agents +from agents.models.agent_list_expand import AgentListExpand +from agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from agents.models.get_agents200_response import GetAgents200Response +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -214,17 +215,17 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentsApi(api_client) - aid = '2067' # 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 = [agents_api.AgentListExpand()] # List[AgentListExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) - agent_types = [agents_api.CloudEnterpriseAgentType()] # List[CloudEnterpriseAgentType] | Specifies the type of agent to request. (optional) + api_instance = agents.CloudAndEnterpriseAgentsApi(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) + expand = [agents.AgentListExpand()] # List[AgentListExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) + agent_types = [agents.CloudEnterpriseAgentType()] # List[CloudEnterpriseAgentType] | Specifies the type of agent to request. (optional) try: # List Cloud and Enterprise Agents @@ -239,6 +240,7 @@ with agents_api.ApiClient(configuration) as api_client: ### 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] @@ -259,6 +261,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -273,7 +276,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_enterprise_agent_details** -> UpdateEnterpriseAgentDetails200Response update_enterprise_agent_details(agent_id, enterprise_agent_request_body, aid=aid, expand=expand) +> AgentDetails update_enterprise_agent_details(agent_id, agent_request_body, aid=aid, expand=expand) Update Enterprise Agent @@ -282,19 +285,18 @@ Updates details for an Enterprise Agent. This endpoint can only be used for Ente ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.enterprise_agent_request_body import EnterpriseAgentRequestBody -from agents_api.models.update_enterprise_agent_details200_response import UpdateEnterpriseAgentDetails200Response -from agents_api.rest import ApiException +import agents +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.agent_request_body import AgentRequestBody +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -304,22 +306,22 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentsApi(api_client) + api_instance = agents.CloudAndEnterpriseAgentsApi(api_client) agent_id = '281474976710706' # str | Unique ID for the agent. - enterprise_agent_request_body = agents_api.EnterpriseAgentRequestBody() # EnterpriseAgentRequestBody | - aid = '2067' # 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 = [agents_api.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) + agent_request_body = agents.AgentRequestBody() # AgentRequestBody | + 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 = [agents.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) try: # Update Enterprise Agent - api_response = api_instance.update_enterprise_agent_details(agent_id, enterprise_agent_request_body, aid=aid, expand=expand) + api_response = api_instance.update_enterprise_agent_details(agent_id, agent_request_body, aid=aid, expand=expand) print("The response of CloudAndEnterpriseAgentsApi->update_enterprise_agent_details:\n") pprint(api_response) except Exception as e: @@ -330,16 +332,17 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| Unique ID for the agent. | - **enterprise_agent_request_body** | [**EnterpriseAgentRequestBody**](EnterpriseAgentRequestBody.md)| | + **agent_request_body** | [**AgentRequestBody**](AgentRequestBody.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] **expand** | [**List[AgentDetailsExpand]**](AgentDetailsExpand.md)| Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. | [optional] ### Return type -[**UpdateEnterpriseAgentDetails200Response**](UpdateEnterpriseAgentDetails200Response.md) +[**AgentDetails**](AgentDetails.md) ### Authorization @@ -351,6 +354,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/agents_api/docs/CloudEnterpriseAgent.md b/agents/docs/CloudEnterpriseAgent.md similarity index 93% rename from agents_api/docs/CloudEnterpriseAgent.md rename to agents/docs/CloudEnterpriseAgent.md index cb8656a0..3bbabb7d 100644 --- a/agents_api/docs/CloudEnterpriseAgent.md +++ b/agents/docs/CloudEnterpriseAgent.md @@ -2,22 +2,23 @@ ## 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] **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] @@ -32,19 +33,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.cloud_enterprise_agent import CloudEnterpriseAgent +from agents.models.cloud_enterprise_agent import CloudEnterpriseAgent # TODO update the JSON string below json = "{}" # create an instance of CloudEnterpriseAgent from a JSON string cloud_enterprise_agent_instance = CloudEnterpriseAgent.from_json(json) # print the JSON string representation of the object -print CloudEnterpriseAgent.to_json() +print(CloudEnterpriseAgent.to_json()) # convert the object into a dict cloud_enterprise_agent_dict = cloud_enterprise_agent_instance.to_dict() # create an instance of CloudEnterpriseAgent from a dict -cloud_enterprise_agent_form_dict = cloud_enterprise_agent.from_dict(cloud_enterprise_agent_dict) +cloud_enterprise_agent_from_dict = CloudEnterpriseAgent.from_dict(cloud_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/agents/docs/CloudEnterpriseAgentType.md b/agents/docs/CloudEnterpriseAgentType.md new file mode 100644 index 00000000..371c853b --- /dev/null +++ b/agents/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/agents_api/docs/CloudEnterpriseAgents.md b/agents/docs/CloudEnterpriseAgents.md similarity index 79% rename from agents_api/docs/CloudEnterpriseAgents.md rename to agents/docs/CloudEnterpriseAgents.md index d98f9bbd..28281a9c 100644 --- a/agents_api/docs/CloudEnterpriseAgents.md +++ b/agents/docs/CloudEnterpriseAgents.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agents** | [**List[CloudEnterpriseAgent]**](CloudEnterpriseAgent.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.cloud_enterprise_agents import CloudEnterpriseAgents +from agents.models.cloud_enterprise_agents import CloudEnterpriseAgents # TODO update the JSON string below json = "{}" # create an instance of CloudEnterpriseAgents from a JSON string cloud_enterprise_agents_instance = CloudEnterpriseAgents.from_json(json) # print the JSON string representation of the object -print CloudEnterpriseAgents.to_json() +print(CloudEnterpriseAgents.to_json()) # convert the object into a dict cloud_enterprise_agents_dict = cloud_enterprise_agents_instance.to_dict() # create an instance of CloudEnterpriseAgents from a dict -cloud_enterprise_agents_form_dict = cloud_enterprise_agents.from_dict(cloud_enterprise_agents_dict) +cloud_enterprise_agents_from_dict = CloudEnterpriseAgents.from_dict(cloud_enterprise_agents_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/agents/docs/ClusterMember.md b/agents/docs/ClusterMember.md new file mode 100644 index 00000000..3fc05b65 --- /dev/null +++ b/agents/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 agents.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/agents/docs/EnterpriseAgent.md b/agents/docs/EnterpriseAgent.md new file mode 100644 index 00000000..275f8283 --- /dev/null +++ b/agents/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 agents.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/agents_api/docs/EnterpriseAgentClusterApi.md b/agents/docs/EnterpriseAgentClusterApi.md similarity index 82% rename from agents_api/docs/EnterpriseAgentClusterApi.md rename to agents/docs/EnterpriseAgentClusterApi.md index 45066759..61853513 100644 --- a/agents_api/docs/EnterpriseAgentClusterApi.md +++ b/agents/docs/EnterpriseAgentClusterApi.md @@ -1,4 +1,4 @@ -# agents_api.EnterpriseAgentClusterApi +# agents.EnterpriseAgentClusterApi All URIs are relative to *https://api.thousandeyes.com* @@ -9,7 +9,7 @@ Method | HTTP request | Description # **assign_enterprise_agent_cluster** -> GetAgentDetails200Response assign_enterprise_agent_cluster(agent_id, assign_enterprise_agent_cluster_request, aid=aid, expand=expand) +> AgentDetails assign_enterprise_agent_cluster(agent_id, assign_enterprise_agent_cluster_request, aid=aid, expand=expand) Add member to Enterprise Agent cluster @@ -18,19 +18,18 @@ Adding a member to an Enterprise Agent cluster converts a standalone Enterprise ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response -from agents_api.rest import ApiException +import agents +from agents.models.agent_details import AgentDetails +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -40,18 +39,18 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.EnterpriseAgentClusterApi(api_client) + api_instance = agents.EnterpriseAgentClusterApi(api_client) agent_id = '281474976710706' # str | Unique ID for the Enterprise Agent cluster to add new agents to. - assign_enterprise_agent_cluster_request = agents_api.AssignEnterpriseAgentClusterRequest() # AssignEnterpriseAgentClusterRequest | - aid = '2067' # 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 = [agents_api.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) + assign_enterprise_agent_cluster_request = agents.AssignEnterpriseAgentClusterRequest() # AssignEnterpriseAgentClusterRequest | + 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 = [agents.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) try: # Add member to Enterprise Agent cluster @@ -66,6 +65,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| Unique ID for the Enterprise Agent cluster to add new agents to. | @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### Return type -[**GetAgentDetails200Response**](GetAgentDetails200Response.md) +[**AgentDetails**](AgentDetails.md) ### Authorization @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -111,19 +112,18 @@ Converts a cluster with a single or multiple Enterprise Agent members back to a ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.get_agents200_response import GetAgents200Response -from agents_api.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest -from agents_api.rest import ApiException +import agents +from agents.models.agent_details_expand import AgentDetailsExpand +from agents.models.get_agents200_response import GetAgents200Response +from agents.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -133,18 +133,18 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.EnterpriseAgentClusterApi(api_client) + api_instance = agents.EnterpriseAgentClusterApi(api_client) agent_id = '281474976710706' # str | Unique ID for the Enterprise Agent cluster to remove agents from. - unassign_enterprise_agent_from_cluster_request = agents_api.UnassignEnterpriseAgentFromClusterRequest() # UnassignEnterpriseAgentFromClusterRequest | - aid = '2067' # 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 = [agents_api.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) + unassign_enterprise_agent_from_cluster_request = agents.UnassignEnterpriseAgentFromClusterRequest() # UnassignEnterpriseAgentFromClusterRequest | + 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 = [agents.AgentDetailsExpand()] # List[AgentDetailsExpand] | Optional parameter, off by default. Indicates which agent sub-resource to expand. For example, if you wish to expand the `clusterMembers` sub-resource, pass the `?expand=cluster-member` query. (optional) try: # Remove member from Enterprise Agent cluster @@ -159,6 +159,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| Unique ID for the Enterprise Agent cluster to remove agents from. | @@ -180,6 +181,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/agents/docs/EnterpriseAgentClusterDetail.md b/agents/docs/EnterpriseAgentClusterDetail.md new file mode 100644 index 00000000..49cd3a92 --- /dev/null +++ b/agents/docs/EnterpriseAgentClusterDetail.md @@ -0,0 +1,56 @@ +# EnterpriseAgentClusterDetail + + +## 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] +**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] +**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] +**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional] +**labels** | [**List[Labels]**](Labels.md) | List of labels. See `/labels` for more information. | [optional] [readonly] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**agent_type** | **str** | Enterprise Cluster agent type. | + +## Example + +```python +from agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of EnterpriseAgentClusterDetail from a JSON string +enterprise_agent_cluster_detail_instance = EnterpriseAgentClusterDetail.from_json(json) +# print the JSON string representation of the object +print(EnterpriseAgentClusterDetail.to_json()) + +# convert the object into a dict +enterprise_agent_cluster_detail_dict = enterprise_agent_cluster_detail_instance.to_dict() +# create an instance of EnterpriseAgentClusterDetail from a dict +enterprise_agent_cluster_detail_from_dict = EnterpriseAgentClusterDetail.from_dict(enterprise_agent_cluster_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/agents/docs/EnterpriseAgentData.md b/agents/docs/EnterpriseAgentData.md new file mode 100644 index 00000000..d0446f49 --- /dev/null +++ b/agents/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 agents.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/agents_api/docs/EnterpriseAgentDetail.md b/agents/docs/EnterpriseAgentDetail.md similarity index 92% rename from agents_api/docs/EnterpriseAgentDetail.md rename to agents/docs/EnterpriseAgentDetail.md index 6803fd64..52b32d00 100644 --- a/agents_api/docs/EnterpriseAgentDetail.md +++ b/agents/docs/EnterpriseAgentDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly] @@ -9,15 +10,14 @@ Name | Type | Description | Notes **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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] **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] @@ -31,23 +31,25 @@ Name | Type | Description | Notes **tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] **notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional] **labels** | [**List[Labels]**](Labels.md) | List of labels. See `/labels` for more information. | [optional] [readonly] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**agent_type** | **str** | Enterprise agent type. | ## Example ```python -from agents_api.models.enterprise_agent_detail import EnterpriseAgentDetail +from agents.models.enterprise_agent_detail import EnterpriseAgentDetail # TODO update the JSON string below json = "{}" # create an instance of EnterpriseAgentDetail from a JSON string enterprise_agent_detail_instance = EnterpriseAgentDetail.from_json(json) # print the JSON string representation of the object -print EnterpriseAgentDetail.to_json() +print(EnterpriseAgentDetail.to_json()) # convert the object into a dict enterprise_agent_detail_dict = enterprise_agent_detail_instance.to_dict() # create an instance of EnterpriseAgentDetail from a dict -enterprise_agent_detail_form_dict = enterprise_agent_detail.from_dict(enterprise_agent_detail_dict) +enterprise_agent_detail_from_dict = EnterpriseAgentDetail.from_dict(enterprise_agent_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/agents/docs/EnterpriseAgentIpv6Policy.md b/agents/docs/EnterpriseAgentIpv6Policy.md new file mode 100644 index 00000000..63668ac6 --- /dev/null +++ b/agents/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/agents/docs/EnterpriseAgentResponseExpands.md b/agents/docs/EnterpriseAgentResponseExpands.md new file mode 100644 index 00000000..2595b776 --- /dev/null +++ b/agents/docs/EnterpriseAgentResponseExpands.md @@ -0,0 +1,31 @@ +# EnterpriseAgentResponseExpands + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] +**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional] +**labels** | [**List[Labels]**](Labels.md) | List of labels. See `/labels` for more information. | [optional] [readonly] + +## Example + +```python +from agents.models.enterprise_agent_response_expands import EnterpriseAgentResponseExpands + +# TODO update the JSON string below +json = "{}" +# create an instance of EnterpriseAgentResponseExpands from a JSON string +enterprise_agent_response_expands_instance = EnterpriseAgentResponseExpands.from_json(json) +# print the JSON string representation of the object +print(EnterpriseAgentResponseExpands.to_json()) + +# convert the object into a dict +enterprise_agent_response_expands_dict = enterprise_agent_response_expands_instance.to_dict() +# create an instance of EnterpriseAgentResponseExpands from a dict +enterprise_agent_response_expands_from_dict = EnterpriseAgentResponseExpands.from_dict(enterprise_agent_response_expands_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/agents/docs/EnterpriseAgentState.md b/agents/docs/EnterpriseAgentState.md new file mode 100644 index 00000000..476c1c54 --- /dev/null +++ b/agents/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/agents/docs/Error.md b/agents/docs/Error.md new file mode 100644 index 00000000..175785ed --- /dev/null +++ b/agents/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 agents.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/agents/docs/ErrorDetail.md b/agents/docs/ErrorDetail.md new file mode 100644 index 00000000..e5d1200e --- /dev/null +++ b/agents/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 agents.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/agents/docs/ErrorDetailCode.md b/agents/docs/ErrorDetailCode.md new file mode 100644 index 00000000..b9b8b5b7 --- /dev/null +++ b/agents/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/agents_api/docs/GetAgentProxies200Response.md b/agents/docs/GetAgentProxies200Response.md similarity index 78% rename from agents_api/docs/GetAgentProxies200Response.md rename to agents/docs/GetAgentProxies200Response.md index cb4cfe71..5de93910 100644 --- a/agents_api/docs/GetAgentProxies200Response.md +++ b/agents/docs/GetAgentProxies200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_proxies** | [**List[AgentProxy]**](AgentProxy.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response +from agents.models.get_agent_proxies200_response import GetAgentProxies200Response # TODO update the JSON string below json = "{}" # create an instance of GetAgentProxies200Response from a JSON string get_agent_proxies200_response_instance = GetAgentProxies200Response.from_json(json) # print the JSON string representation of the object -print GetAgentProxies200Response.to_json() +print(GetAgentProxies200Response.to_json()) # convert the object into a dict get_agent_proxies200_response_dict = get_agent_proxies200_response_instance.to_dict() # create an instance of GetAgentProxies200Response from a dict -get_agent_proxies200_response_form_dict = get_agent_proxies200_response.from_dict(get_agent_proxies200_response_dict) +get_agent_proxies200_response_from_dict = GetAgentProxies200Response.from_dict(get_agent_proxies200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/agents_api/docs/GetAgents200Response.md b/agents/docs/GetAgents200Response.md similarity index 80% rename from agents_api/docs/GetAgents200Response.md rename to agents/docs/GetAgents200Response.md index 26baa6ff..72d4c5f1 100644 --- a/agents_api/docs/GetAgents200Response.md +++ b/agents/docs/GetAgents200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agents** | [**List[CloudEnterpriseAgent]**](CloudEnterpriseAgent.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.get_agents200_response import GetAgents200Response +from agents.models.get_agents200_response import GetAgents200Response # TODO update the JSON string below json = "{}" # create an instance of GetAgents200Response from a JSON string get_agents200_response_instance = GetAgents200Response.from_json(json) # print the JSON string representation of the object -print GetAgents200Response.to_json() +print(GetAgents200Response.to_json()) # convert the object into a dict get_agents200_response_dict = get_agents200_response_instance.to_dict() # create an instance of GetAgents200Response from a dict -get_agents200_response_form_dict = get_agents200_response.from_dict(get_agents200_response_dict) +get_agents200_response_from_dict = GetAgents200Response.from_dict(get_agents200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/agents_api/docs/GetAgentsNotificationRule200Response.md b/agents/docs/GetAgentsNotificationRule200Response.md similarity index 82% rename from agents_api/docs/GetAgentsNotificationRule200Response.md rename to agents/docs/GetAgentsNotificationRule200Response.md index ebb1dfe3..da666773 100644 --- a/agents_api/docs/GetAgentsNotificationRule200Response.md +++ b/agents/docs/GetAgentsNotificationRule200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Agent notification rule ID | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response +from agents.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response # TODO update the JSON string below json = "{}" # create an instance of GetAgentsNotificationRule200Response from a JSON string get_agents_notification_rule200_response_instance = GetAgentsNotificationRule200Response.from_json(json) # print the JSON string representation of the object -print GetAgentsNotificationRule200Response.to_json() +print(GetAgentsNotificationRule200Response.to_json()) # convert the object into a dict get_agents_notification_rule200_response_dict = get_agents_notification_rule200_response_instance.to_dict() # create an instance of GetAgentsNotificationRule200Response from a dict -get_agents_notification_rule200_response_form_dict = get_agents_notification_rule200_response.from_dict(get_agents_notification_rule200_response_dict) +get_agents_notification_rule200_response_from_dict = GetAgentsNotificationRule200Response.from_dict(get_agents_notification_rule200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/agents_api/docs/GetAgentsNotificationRules200Response.md b/agents/docs/GetAgentsNotificationRules200Response.md similarity index 76% rename from agents_api/docs/GetAgentsNotificationRules200Response.md rename to agents/docs/GetAgentsNotificationRules200Response.md index 332353eb..e809acdc 100644 --- a/agents_api/docs/GetAgentsNotificationRules200Response.md +++ b/agents/docs/GetAgentsNotificationRules200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_alert_rules** | [**List[NotificationRule]**](NotificationRule.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response +from agents.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response # TODO update the JSON string below json = "{}" # create an instance of GetAgentsNotificationRules200Response from a JSON string get_agents_notification_rules200_response_instance = GetAgentsNotificationRules200Response.from_json(json) # print the JSON string representation of the object -print GetAgentsNotificationRules200Response.to_json() +print(GetAgentsNotificationRules200Response.to_json()) # convert the object into a dict get_agents_notification_rules200_response_dict = get_agents_notification_rules200_response_instance.to_dict() # create an instance of GetAgentsNotificationRules200Response from a dict -get_agents_notification_rules200_response_form_dict = get_agents_notification_rules200_response.from_dict(get_agents_notification_rules200_response_dict) +get_agents_notification_rules200_response_from_dict = GetAgentsNotificationRules200Response.from_dict(get_agents_notification_rules200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/agents/docs/InterfaceIpMapping.md b/agents/docs/InterfaceIpMapping.md new file mode 100644 index 00000000..54d88158 --- /dev/null +++ b/agents/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 agents.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/agents/docs/Labels.md b/agents/docs/Labels.md new file mode 100644 index 00000000..d87beafe --- /dev/null +++ b/agents/docs/Labels.md @@ -0,0 +1,30 @@ +# Labels + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Label Id. | [optional] +**name** | **str** | Name of the label. | [optional] + +## Example + +```python +from agents.models.labels import Labels + +# TODO update the JSON string below +json = "{}" +# create an instance of Labels from a JSON string +labels_instance = Labels.from_json(json) +# print the JSON string representation of the object +print(Labels.to_json()) + +# convert the object into a dict +labels_dict = labels_instance.to_dict() +# create an instance of Labels from a dict +labels_from_dict = Labels.from_dict(labels_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/agents/docs/Link.md b/agents/docs/Link.md new file mode 100644 index 00000000..b5223ca3 --- /dev/null +++ b/agents/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 agents.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/agents/docs/Notification.md b/agents/docs/Notification.md new file mode 100644 index 00000000..ccbe9694 --- /dev/null +++ b/agents/docs/Notification.md @@ -0,0 +1,32 @@ +# Notification + +Alert notification object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | [**AlertEmail**](AlertEmail.md) | | [optional] +**third_party** | [**List[AlertIntegrationBase]**](AlertIntegrationBase.md) | | [optional] +**webhook** | [**List[AlertIntegrationBase]**](AlertIntegrationBase.md) | | [optional] + +## Example + +```python +from agents.models.notification import Notification + +# TODO update the JSON string below +json = "{}" +# create an instance of Notification from a JSON string +notification_instance = Notification.from_json(json) +# print the JSON string representation of the object +print(Notification.to_json()) + +# convert the object into a dict +notification_dict = notification_instance.to_dict() +# create an instance of Notification from a dict +notification_from_dict = Notification.from_dict(notification_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/agents_api/docs/NotificationRule.md b/agents/docs/NotificationRule.md similarity index 86% rename from agents_api/docs/NotificationRule.md rename to agents/docs/NotificationRule.md index 0eff471b..8cbda709 100644 --- a/agents_api/docs/NotificationRule.md +++ b/agents/docs/NotificationRule.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Agent notification rule ID | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.notification_rule import NotificationRule +from agents.models.notification_rule import NotificationRule # TODO update the JSON string below json = "{}" # create an instance of NotificationRule from a JSON string notification_rule_instance = NotificationRule.from_json(json) # print the JSON string representation of the object -print NotificationRule.to_json() +print(NotificationRule.to_json()) # convert the object into a dict notification_rule_dict = notification_rule_instance.to_dict() # create an instance of NotificationRule from a dict -notification_rule_form_dict = notification_rule.from_dict(notification_rule_dict) +notification_rule_from_dict = NotificationRule.from_dict(notification_rule_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/agents_api/docs/NotificationRuleDetail.md b/agents/docs/NotificationRuleDetail.md similarity index 85% rename from agents_api/docs/NotificationRuleDetail.md rename to agents/docs/NotificationRuleDetail.md index f1b124ed..1c76026d 100644 --- a/agents_api/docs/NotificationRuleDetail.md +++ b/agents/docs/NotificationRuleDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Agent notification rule ID | [optional] [readonly] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.notification_rule_detail import NotificationRuleDetail +from agents.models.notification_rule_detail import NotificationRuleDetail # TODO update the JSON string below json = "{}" # create an instance of NotificationRuleDetail from a JSON string notification_rule_detail_instance = NotificationRuleDetail.from_json(json) # print the JSON string representation of the object -print NotificationRuleDetail.to_json() +print(NotificationRuleDetail.to_json()) # convert the object into a dict notification_rule_detail_dict = notification_rule_detail_instance.to_dict() # create an instance of NotificationRuleDetail from a dict -notification_rule_detail_form_dict = notification_rule_detail.from_dict(notification_rule_detail_dict) +notification_rule_detail_from_dict = NotificationRuleDetail.from_dict(notification_rule_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/agents_api/docs/NotificationRules.md b/agents/docs/NotificationRules.md similarity index 80% rename from agents_api/docs/NotificationRules.md rename to agents/docs/NotificationRules.md index e2f45c85..e0cc65c4 100644 --- a/agents_api/docs/NotificationRules.md +++ b/agents/docs/NotificationRules.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_alert_rules** | [**List[NotificationRule]**](NotificationRule.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.notification_rules import NotificationRules +from agents.models.notification_rules import NotificationRules # TODO update the JSON string below json = "{}" # create an instance of NotificationRules from a JSON string notification_rules_instance = NotificationRules.from_json(json) # print the JSON string representation of the object -print NotificationRules.to_json() +print(NotificationRules.to_json()) # convert the object into a dict notification_rules_dict = notification_rules_instance.to_dict() # create an instance of NotificationRules from a dict -notification_rules_form_dict = notification_rules.from_dict(notification_rules_dict) +notification_rules_from_dict = NotificationRules.from_dict(notification_rules_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/agents_api/docs/Notifications.md b/agents/docs/Notifications.md similarity index 83% rename from agents_api/docs/Notifications.md rename to agents/docs/Notifications.md index c830fc16..985ae1bd 100644 --- a/agents_api/docs/Notifications.md +++ b/agents/docs/Notifications.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **notifications** | [**Notification**](Notification.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.notifications import Notifications +from agents.models.notifications import Notifications # TODO update the JSON string below json = "{}" # create an instance of Notifications from a JSON string notifications_instance = Notifications.from_json(json) # print the JSON string representation of the object -print Notifications.to_json() +print(Notifications.to_json()) # convert the object into a dict notifications_dict = notifications_instance.to_dict() # create an instance of Notifications from a dict -notifications_form_dict = notifications.from_dict(notifications_dict) +notifications_from_dict = Notifications.from_dict(notifications_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/agents_api/docs/ProxiesApi.md b/agents/docs/ProxiesApi.md similarity index 87% rename from agents_api/docs/ProxiesApi.md rename to agents/docs/ProxiesApi.md index c03e93c2..c491df50 100644 --- a/agents_api/docs/ProxiesApi.md +++ b/agents/docs/ProxiesApi.md @@ -1,4 +1,4 @@ -# agents_api.ProxiesApi +# agents.ProxiesApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ List all agent proxies available under the account group. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response -from agents_api.rest import ApiException +import agents +from agents.models.get_agent_proxies200_response import GetAgentProxies200Response +from 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 = agents_api.Configuration( +configuration = agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,15 +36,15 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ProxiesApi(api_client) - aid = '2067' # 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) + api_instance = agents.ProxiesApi(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 proxies @@ -60,6 +59,7 @@ with agents_api.ApiClient(configuration) as api_client: ### 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] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/agents_api/docs/ProxyAuthType.md b/agents/docs/ProxyAuthType.md similarity index 99% rename from agents_api/docs/ProxyAuthType.md rename to agents/docs/ProxyAuthType.md index 5ba17ab5..91ea3b90 100644 --- a/agents_api/docs/ProxyAuthType.md +++ b/agents/docs/ProxyAuthType.md @@ -3,6 +3,7 @@ The type of authentication the proxy requires ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/agents_api/docs/ProxyType.md b/agents/docs/ProxyType.md similarity index 99% rename from agents_api/docs/ProxyType.md rename to agents/docs/ProxyType.md index 8dbe6c7c..8f22675c 100644 --- a/agents_api/docs/ProxyType.md +++ b/agents/docs/ProxyType.md @@ -3,6 +3,7 @@ The type of proxy, STATIC or PAC. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/agents/docs/SelfLinks.md b/agents/docs/SelfLinks.md new file mode 100644 index 00000000..655e89fd --- /dev/null +++ b/agents/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from agents.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/agents/docs/SelfLinksLinks.md b/agents/docs/SelfLinksLinks.md new file mode 100644 index 00000000..90215343 --- /dev/null +++ b/agents/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from agents.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/agents/docs/SimpleAgent.md b/agents/docs/SimpleAgent.md new file mode 100644 index 00000000..d416c8c2 --- /dev/null +++ b/agents/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 agents.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/agents/docs/SimpleEnterpriseAgent.md b/agents/docs/SimpleEnterpriseAgent.md new file mode 100644 index 00000000..c7332d5a --- /dev/null +++ b/agents/docs/SimpleEnterpriseAgent.md @@ -0,0 +1,51 @@ +# SimpleEnterpriseAgent + + +## 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] +**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 agents.models.simple_enterprise_agent import SimpleEnterpriseAgent + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleEnterpriseAgent from a JSON string +simple_enterprise_agent_instance = SimpleEnterpriseAgent.from_json(json) +# print the JSON string representation of the object +print(SimpleEnterpriseAgent.to_json()) + +# convert the object into a dict +simple_enterprise_agent_dict = simple_enterprise_agent_instance.to_dict() +# create an instance of SimpleEnterpriseAgent from a dict +simple_enterprise_agent_from_dict = SimpleEnterpriseAgent.from_dict(simple_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/agents/docs/SimpleTest.md b/agents/docs/SimpleTest.md new file mode 100644 index 00000000..18c6487e --- /dev/null +++ b/agents/docs/SimpleTest.md @@ -0,0 +1,43 @@ +# SimpleTest + +Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**SimpleTestLinks**](SimpleTestLinks.md) | | [optional] + +## Example + +```python +from agents.models.simple_test import SimpleTest + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTest from a JSON string +simple_test_instance = SimpleTest.from_json(json) +# print the JSON string representation of the object +print(SimpleTest.to_json()) + +# convert the object into a dict +simple_test_dict = simple_test_instance.to_dict() +# create an instance of SimpleTest from a dict +simple_test_from_dict = SimpleTest.from_dict(simple_test_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/agents/docs/SimpleTestLinks.md b/agents/docs/SimpleTestLinks.md new file mode 100644 index 00000000..78a7ab50 --- /dev/null +++ b/agents/docs/SimpleTestLinks.md @@ -0,0 +1,31 @@ +# SimpleTestLinks + +A list of links that can be accessed to get more information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**SimpleTestLinksSelf**](SimpleTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from agents.models.simple_test_links import SimpleTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTestLinks from a JSON string +simple_test_links_instance = SimpleTestLinks.from_json(json) +# print the JSON string representation of the object +print(SimpleTestLinks.to_json()) + +# convert the object into a dict +simple_test_links_dict = simple_test_links_instance.to_dict() +# create an instance of SimpleTestLinks from a dict +simple_test_links_from_dict = SimpleTestLinks.from_dict(simple_test_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/agents/docs/SimpleTestLinksSelf.md b/agents/docs/SimpleTestLinksSelf.md new file mode 100644 index 00000000..618a3408 --- /dev/null +++ b/agents/docs/SimpleTestLinksSelf.md @@ -0,0 +1,36 @@ +# SimpleTestLinksSelf + + +## 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 agents.models.simple_test_links_self import SimpleTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTestLinksSelf from a JSON string +simple_test_links_self_instance = SimpleTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(SimpleTestLinksSelf.to_json()) + +# convert the object into a dict +simple_test_links_self_dict = simple_test_links_self_instance.to_dict() +# create an instance of SimpleTestLinksSelf from a dict +simple_test_links_self_from_dict = SimpleTestLinksSelf.from_dict(simple_test_links_self_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/agents/docs/TestInterval.md b/agents/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/agents/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/agents/docs/TestType.md b/agents/docs/TestType.md new file mode 100644 index 00000000..8093a739 --- /dev/null +++ b/agents/docs/TestType.md @@ -0,0 +1,12 @@ +# TestType + +This is a read only value, as test type is implicit in the test creation url. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/agents/docs/UnassignEnterpriseAgentFromClusterRequest.md b/agents/docs/UnassignEnterpriseAgentFromClusterRequest.md new file mode 100644 index 00000000..4edde52a --- /dev/null +++ b/agents/docs/UnassignEnterpriseAgentFromClusterRequest.md @@ -0,0 +1,29 @@ +# UnassignEnterpriseAgentFromClusterRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | **List[str]** | Contains list of member IDs. (get `memberId` from `/agents/{agentId}` endpoint) | [optional] + +## Example + +```python +from agents.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnassignEnterpriseAgentFromClusterRequest from a JSON string +unassign_enterprise_agent_from_cluster_request_instance = UnassignEnterpriseAgentFromClusterRequest.from_json(json) +# print the JSON string representation of the object +print(UnassignEnterpriseAgentFromClusterRequest.to_json()) + +# convert the object into a dict +unassign_enterprise_agent_from_cluster_request_dict = unassign_enterprise_agent_from_cluster_request_instance.to_dict() +# create an instance of UnassignEnterpriseAgentFromClusterRequest from a dict +unassign_enterprise_agent_from_cluster_request_from_dict = UnassignEnterpriseAgentFromClusterRequest.from_dict(unassign_enterprise_agent_from_cluster_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/agents/docs/UnauthorizedError.md b/agents/docs/UnauthorizedError.md new file mode 100644 index 00000000..8441427e --- /dev/null +++ b/agents/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from agents.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/agents/docs/ValidationError.md b/agents/docs/ValidationError.md new file mode 100644 index 00000000..6a9d1b32 --- /dev/null +++ b/agents/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from agents.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/agents/docs/ValidationErrorAllOfErrors.md b/agents/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..52ea9989 --- /dev/null +++ b/agents/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/agents/pyproject.toml b/agents/pyproject.toml new file mode 100644 index 00000000..313ec22a --- /dev/null +++ b/agents/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "agents" +version = "1.0.0" +description = "Agents API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Agents API"] +include = ["agents/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "agents", + #"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/agents_api/requirements.txt b/agents/requirements.txt similarity index 100% rename from agents_api/requirements.txt rename to agents/requirements.txt diff --git a/agents_api/setup.cfg b/agents/setup.cfg similarity index 100% rename from agents_api/setup.cfg rename to agents/setup.cfg diff --git a/agents/setup.py b/agents/setup.py new file mode 100644 index 00000000..5debd4ab --- /dev/null +++ b/agents/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "agents" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Agents API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/agents", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Agents API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. + """, # noqa: E501 + package_data={"agents": ["py.typed"]}, +) diff --git a/agents/test-requirements.txt b/agents/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/agents/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/agents_api/test/__init__.py b/agents/test/__init__.py similarity index 100% rename from agents_api/test/__init__.py rename to agents/test/__init__.py diff --git a/agents/test/test_account_group.py b/agents/test/test_account_group.py new file mode 100644 index 00000000..1fefcca8 --- /dev/null +++ b/agents/test/test_account_group.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.account_group import AccountGroup + +class TestAccountGroup(unittest.TestCase): + """AccountGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroup: + """Test AccountGroup + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroup` + """ + model = AccountGroup() + if include_optional: + return AccountGroup( + aid = '1234', + account_group_name = 'Account A' + ) + else: + return AccountGroup( + ) + """ + + def testAccountGroup(self): + """Test AccountGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_account_group_id.py b/agents/test/test_account_group_id.py new file mode 100644 index 00000000..f5f2d767 --- /dev/null +++ b/agents/test/test_account_group_id.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.account_group_id import AccountGroupId + +class TestAccountGroupId(unittest.TestCase): + """AccountGroupId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupId: + """Test AccountGroupId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupId` + """ + model = AccountGroupId() + if include_optional: + return AccountGroupId( + aid = '1234' + ) + else: + return AccountGroupId( + ) + """ + + def testAccountGroupId(self): + """Test AccountGroupId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_agent.py b/agents/test/test_agent.py new file mode 100644 index 00000000..db5a1455 --- /dev/null +++ b/agents/test/test_agent.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.agent import Agent + +class TestAgent(unittest.TestCase): + """Agent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Agent: + """Test Agent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Agent` + """ + model = Agent() + if include_optional: + return Agent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + agent_type = 'enterprise-cluster' + ) + else: + return Agent( + agent_type = 'enterprise-cluster', + ) + """ + + def testAgent(self): + """Test Agent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_agent_base.py b/agents/test/test_agent_base.py new file mode 100644 index 00000000..0029dff8 --- /dev/null +++ b/agents/test/test_agent_base.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.agent_base import AgentBase + +class TestAgentBase(unittest.TestCase): + """AgentBase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentBase: + """Test AgentBase + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentBase` + """ + model = AgentBase() + if include_optional: + return AgentBase( + ip_addresses = ["99.139.65.220","9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce"], + public_ip_addresses = ["192.168.1.78","f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c"], + network = 'AT&T Services, Inc. (AS 7018)' + ) + else: + return AgentBase( + ) + """ + + def testAgentBase(self): + """Test AgentBase""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_agent_details.py b/agents/test/test_agent_details.py new file mode 100644 index 00000000..8d4808c4 --- /dev/null +++ b/agents/test/test_agent_details.py @@ -0,0 +1,111 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.agent_details import AgentDetails + +class TestAgentDetails(unittest.TestCase): + """AgentDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentDetails: + """Test AgentDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentDetails` + """ + model = AgentDetails() + if include_optional: + return AgentDetails( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + agent_type = 'enterprise-cluster', + tests = [ + { } + ], + labels = [ + agents.models.labels.Labels( + label_id = '11', + name = 'Label name', ) + ], + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + agents.models.account_group.AccountGroup() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + agents.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ], + notification_rules = [ + agents.models.notification_rules.NotificationRules( + agent_alert_rules = [{"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}], ) + ] + ) + else: + return AgentDetails( + agent_type = 'enterprise-cluster', + ) + """ + + def testAgentDetails(self): + """Test AgentDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_agent_details_expand.py b/agents/test/test_agent_details_expand.py similarity index 82% rename from agents_api/test/test_agent_details_expand.py rename to agents/test/test_agent_details_expand.py index 420849bf..145b6f0e 100644 --- a/agents_api/test/test_agent_details_expand.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_details_expand import AgentDetailsExpand +from agents.models.agent_details_expand import AgentDetailsExpand class TestAgentDetailsExpand(unittest.TestCase): """AgentDetailsExpand unit test stubs""" diff --git a/agents_api/test/test_agent_ipv6_policy.py b/agents/test/test_agent_ipv6_policy.py similarity index 82% rename from agents_api/test/test_agent_ipv6_policy.py rename to agents/test/test_agent_ipv6_policy.py index 19ab392c..c54063da 100644 --- a/agents_api/test/test_agent_ipv6_policy.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_ipv6_policy import AgentIpv6Policy +from agents.models.agent_ipv6_policy import AgentIpv6Policy class TestAgentIpv6Policy(unittest.TestCase): """AgentIpv6Policy unit test stubs""" diff --git a/agents_api/test/test_agent_list_expand.py b/agents/test/test_agent_list_expand.py similarity index 82% rename from agents_api/test/test_agent_list_expand.py rename to agents/test/test_agent_list_expand.py index 0fa4f5d9..e1930a56 100644 --- a/agents_api/test/test_agent_list_expand.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_list_expand import AgentListExpand +from agents.models.agent_list_expand import AgentListExpand class TestAgentListExpand(unittest.TestCase): """AgentListExpand unit test stubs""" diff --git a/agents_api/test/test_agent_proxies.py b/agents/test/test_agent_proxies.py similarity index 89% rename from agents_api/test/test_agent_proxies.py rename to agents/test/test_agent_proxies.py index 90aafb78..61656d11 100644 --- a/agents_api/test/test_agent_proxies.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_proxies import AgentProxies +from agents.models.agent_proxies import AgentProxies class TestAgentProxies(unittest.TestCase): """AgentProxies unit test stubs""" @@ -37,8 +36,8 @@ class TestAgentProxies(unittest.TestCase): if include_optional: return AgentProxies( agent_proxies = [ - agents_api.models.agent_proxy.AgentProxy( - aid = '105', + agents.models.agent_proxy.AgentProxy( + aid = '1234', auth_type = 'basic', bypass_list = ["10.0.0.0/16","*.thousandeyes.com"], last_modified = '2022-07-17T22:00:54Z', diff --git a/agents_api/test/test_agent_proxy.py b/agents/test/test_agent_proxy.py similarity index 92% rename from agents_api/test/test_agent_proxy.py rename to agents/test/test_agent_proxy.py index b988f189..4fabe747 100644 --- a/agents_api/test/test_agent_proxy.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_proxy import AgentProxy +from agents.models.agent_proxy import AgentProxy class TestAgentProxy(unittest.TestCase): """AgentProxy unit test stubs""" @@ -36,7 +35,7 @@ class TestAgentProxy(unittest.TestCase): model = AgentProxy() if include_optional: return AgentProxy( - aid = '105', + aid = '1234', auth_type = 'basic', bypass_list = ["10.0.0.0/16","*.thousandeyes.com"], last_modified = '2022-07-17T22:00:54Z', diff --git a/agents/test/test_agent_request_body.py b/agents/test/test_agent_request_body.py new file mode 100644 index 00000000..6cf7ef60 --- /dev/null +++ b/agents/test/test_agent_request_body.py @@ -0,0 +1,58 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.agent_request_body import AgentRequestBody + +class TestAgentRequestBody(unittest.TestCase): + """AgentRequestBody unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentRequestBody: + """Test AgentRequestBody + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentRequestBody` + """ + model = AgentRequestBody() + if include_optional: + return AgentRequestBody( + agent_name = 'thousandeyes-stg-va-254', + enabled = True, + account_groups = ["1234","1"], + ipv6_policy = 'force-ipv4', + keep_browser_cache = True, + target_for_tests = '1.1.1.1', + local_resolution_prefixes = ["10.2.3.3/24","10.2.3.3/25"], + tests = ["12313145","12345"] + ) + else: + return AgentRequestBody( + ) + """ + + def testAgentRequestBody(self): + """Test AgentRequestBody""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_agents.py b/agents/test/test_agents.py similarity index 88% rename from agents_api/test/test_agents.py rename to agents/test/test_agents.py index 3ef0db14..294bd03c 100644 --- a/agents_api/test/test_agents.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agents import Agents +from agents.models.agents import Agents class TestAgents(unittest.TestCase): """Agents unit test stubs""" @@ -37,7 +36,7 @@ class TestAgents(unittest.TestCase): if include_optional: return Agents( agents = [ - agents_api.models.agent.Agent() + null ] ) else: diff --git a/agents_api/test/test_alert_email.py b/agents/test/test_alert_email.py similarity index 92% rename from agents_api/test/test_alert_email.py rename to agents/test/test_alert_email.py index ac5502ee..b708ea94 100644 --- a/agents_api/test/test_alert_email.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.alert_email import AlertEmail +from agents.models.alert_email import AlertEmail class TestAlertEmail(unittest.TestCase): """AlertEmail unit test stubs""" diff --git a/agents_api/test/test_alert_integration_base.py b/agents/test/test_alert_integration_base.py similarity index 92% rename from agents_api/test/test_alert_integration_base.py rename to agents/test/test_alert_integration_base.py index add5580a..5ca38bb9 100644 --- a/agents_api/test/test_alert_integration_base.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.alert_integration_base import AlertIntegrationBase +from agents.models.alert_integration_base import AlertIntegrationBase class TestAlertIntegrationBase(unittest.TestCase): """AlertIntegrationBase unit test stubs""" diff --git a/agents_api/test/test_alert_integration_type.py b/agents/test/test_alert_integration_type.py similarity index 82% rename from agents_api/test/test_alert_integration_type.py rename to agents/test/test_alert_integration_type.py index f3ee4fc8..73cde1d2 100644 --- a/agents_api/test/test_alert_integration_type.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.alert_integration_type import AlertIntegrationType +from agents.models.alert_integration_type import AlertIntegrationType class TestAlertIntegrationType(unittest.TestCase): """AlertIntegrationType unit test stubs""" diff --git a/agents_api/test/test_assign_enterprise_agent_cluster_request.py b/agents/test/test_assign_enterprise_agent_cluster_request.py similarity index 90% rename from agents_api/test/test_assign_enterprise_agent_cluster_request.py rename to agents/test/test_assign_enterprise_agent_cluster_request.py index d1d258e7..0fb21fde 100644 --- a/agents_api/test/test_assign_enterprise_agent_cluster_request.py +++ b/agents/test/test_assign_enterprise_agent_cluster_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest +from agents.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest class TestAssignEnterpriseAgentClusterRequest(unittest.TestCase): """AssignEnterpriseAgentClusterRequest unit test stubs""" diff --git a/agents/test/test_cloud_agent_detail.py b/agents/test/test_cloud_agent_detail.py new file mode 100644 index 00000000..5ba9e95d --- /dev/null +++ b/agents/test/test_cloud_agent_detail.py @@ -0,0 +1,80 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.cloud_agent_detail import CloudAgentDetail + +class TestCloudAgentDetail(unittest.TestCase): + """CloudAgentDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CloudAgentDetail: + """Test CloudAgentDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CloudAgentDetail` + """ + model = CloudAgentDetail() + if include_optional: + return CloudAgentDetail( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + agent_type = 'cloud', + tests = [ + { } + ], + labels = [ + agents.models.labels.Labels( + label_id = '11', + name = 'Label name', ) + ] + ) + else: + return CloudAgentDetail( + agent_type = 'cloud', + ) + """ + + def testCloudAgentDetail(self): + """Test CloudAgentDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_cloud_enterprise_agent.py b/agents/test/test_cloud_enterprise_agent.py similarity index 83% rename from agents_api/test/test_cloud_enterprise_agent.py rename to agents/test/test_cloud_enterprise_agent.py index 3a79fa5a..51d96dae 100644 --- a/agents_api/test/test_cloud_enterprise_agent.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.cloud_enterprise_agent import CloudEnterpriseAgent +from agents.models.cloud_enterprise_agent import CloudEnterpriseAgent class TestCloudEnterpriseAgent(unittest.TestCase): """CloudEnterpriseAgent unit test stubs""" @@ -36,27 +35,27 @@ class TestCloudEnterpriseAgent(unittest.TestCase): model = CloudEnterpriseAgent() if include_optional: return CloudEnterpriseAgent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], + agent_type = 'enterprise-cluster', + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], network = 'AT&T Services, Inc. (AS 7018)', agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', location = 'San Francisco Bay Area', country_id = 'US', enabled = True, + prefix = '99.128.0.0/11', verify_ssl_certificates = True, cluster_members = [ null ], utilization = 25, account_groups = [ - agents_api.models.account_group.AccountGroup() + agents.models.account_group.AccountGroup() ], - prefix = '99.128.0.0/11', ipv6_policy = 'force-ipv4', error_details = [ - agents_api.models.error_detail.ErrorDetail( + agents.models.error_detail.ErrorDetail( code = 'agent-version-outdated', description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) ], @@ -70,13 +69,14 @@ class TestCloudEnterpriseAgent(unittest.TestCase): '10.2.3.3/24' ], interface_ip_mappings = [ - agents_api.models.interface_ip_mapping.InterfaceIpMapping( + agents.models.interface_ip_mapping.InterfaceIpMapping( interface_name = 'wlp4s0', ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) ] ) else: return CloudEnterpriseAgent( + agent_type = 'enterprise-cluster', ) """ diff --git a/agents/test/test_cloud_enterprise_agent_type.py b/agents/test/test_cloud_enterprise_agent_type.py new file mode 100644 index 00000000..7968daa6 --- /dev/null +++ b/agents/test/test_cloud_enterprise_agent_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType + +class TestCloudEnterpriseAgentType(unittest.TestCase): + """CloudEnterpriseAgentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCloudEnterpriseAgentType(self): + """Test CloudEnterpriseAgentType""" + # inst = CloudEnterpriseAgentType() + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_cloud_enterprise_agents.py b/agents/test/test_cloud_enterprise_agents.py similarity index 90% rename from agents_api/test/test_cloud_enterprise_agents.py rename to agents/test/test_cloud_enterprise_agents.py index d6d2d7ba..c3a69b82 100644 --- a/agents_api/test/test_cloud_enterprise_agents.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.cloud_enterprise_agents import CloudEnterpriseAgents +from agents.models.cloud_enterprise_agents import CloudEnterpriseAgents class TestCloudEnterpriseAgents(unittest.TestCase): """CloudEnterpriseAgents unit test stubs""" diff --git a/agents/test/test_cluster_member.py b/agents/test/test_cluster_member.py new file mode 100644 index 00000000..bdefcdcb --- /dev/null +++ b/agents/test/test_cluster_member.py @@ -0,0 +1,64 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.cluster_member import ClusterMember + +class TestClusterMember(unittest.TestCase): + """ClusterMember unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ClusterMember: + """Test ClusterMember + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ClusterMember` + """ + model = ClusterMember() + if include_optional: + return ClusterMember( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + member_id = '10', + name = 'Cluster member name', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + target_for_tests = '1.1.1.1', + utilization = 25 + ) + else: + return ClusterMember( + ) + """ + + def testClusterMember(self): + """Test ClusterMember""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent.py b/agents/test/test_enterprise_agent.py new file mode 100644 index 00000000..33de1c02 --- /dev/null +++ b/agents/test/test_enterprise_agent.py @@ -0,0 +1,89 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent import EnterpriseAgent + +class TestEnterpriseAgent(unittest.TestCase): + """EnterpriseAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgent: + """Test EnterpriseAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgent` + """ + model = EnterpriseAgent() + if include_optional: + return EnterpriseAgent( + agent_type = 'enterprise-cluster', + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + agents.models.account_group.AccountGroup() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + agents.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ] + ) + else: + return EnterpriseAgent( + agent_type = 'enterprise-cluster', + ) + """ + + def testEnterpriseAgent(self): + """Test EnterpriseAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent_cluster_detail.py b/agents/test/test_enterprise_agent_cluster_detail.py new file mode 100644 index 00000000..d83ee022 --- /dev/null +++ b/agents/test/test_enterprise_agent_cluster_detail.py @@ -0,0 +1,111 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail + +class TestEnterpriseAgentClusterDetail(unittest.TestCase): + """EnterpriseAgentClusterDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentClusterDetail: + """Test EnterpriseAgentClusterDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentClusterDetail` + """ + model = EnterpriseAgentClusterDetail() + if include_optional: + return EnterpriseAgentClusterDetail( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + agents.models.account_group.AccountGroup() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + agents.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ], + tests = [ + { } + ], + notification_rules = [ + agents.models.notification_rules.NotificationRules( + agent_alert_rules = [{"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}], ) + ], + labels = [ + agents.models.labels.Labels( + label_id = '11', + name = 'Label name', ) + ], + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + agent_type = 'enterprise-cluster' + ) + else: + return EnterpriseAgentClusterDetail( + agent_type = 'enterprise-cluster', + ) + """ + + def testEnterpriseAgentClusterDetail(self): + """Test EnterpriseAgentClusterDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent_data.py b/agents/test/test_enterprise_agent_data.py new file mode 100644 index 00000000..3f8fc40a --- /dev/null +++ b/agents/test/test_enterprise_agent_data.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent_data import EnterpriseAgentData + +class TestEnterpriseAgentData(unittest.TestCase): + """EnterpriseAgentData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentData: + """Test EnterpriseAgentData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentData` + """ + model = EnterpriseAgentData() + if include_optional: + return EnterpriseAgentData( + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + agents.models.account_group.AccountGroup() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + agents.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ] + ) + else: + return EnterpriseAgentData( + ) + """ + + def testEnterpriseAgentData(self): + """Test EnterpriseAgentData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent_detail.py b/agents/test/test_enterprise_agent_detail.py new file mode 100644 index 00000000..7bd42d0c --- /dev/null +++ b/agents/test/test_enterprise_agent_detail.py @@ -0,0 +1,111 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent_detail import EnterpriseAgentDetail + +class TestEnterpriseAgentDetail(unittest.TestCase): + """EnterpriseAgentDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentDetail: + """Test EnterpriseAgentDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentDetail` + """ + model = EnterpriseAgentDetail() + if include_optional: + return EnterpriseAgentDetail( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + agents.models.account_group.AccountGroup() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + agents.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ], + tests = [ + { } + ], + notification_rules = [ + agents.models.notification_rules.NotificationRules( + agent_alert_rules = [{"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}], ) + ], + labels = [ + agents.models.labels.Labels( + label_id = '11', + name = 'Label name', ) + ], + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + agent_type = 'enterprise' + ) + else: + return EnterpriseAgentDetail( + agent_type = 'enterprise', + ) + """ + + def testEnterpriseAgentDetail(self): + """Test EnterpriseAgentDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent_ipv6_policy.py b/agents/test/test_enterprise_agent_ipv6_policy.py new file mode 100644 index 00000000..afa3826b --- /dev/null +++ b/agents/test/test_enterprise_agent_ipv6_policy.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy + +class TestEnterpriseAgentIpv6Policy(unittest.TestCase): + """EnterpriseAgentIpv6Policy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnterpriseAgentIpv6Policy(self): + """Test EnterpriseAgentIpv6Policy""" + # inst = EnterpriseAgentIpv6Policy() + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent_response_expands.py b/agents/test/test_enterprise_agent_response_expands.py new file mode 100644 index 00000000..7d54fe8a --- /dev/null +++ b/agents/test/test_enterprise_agent_response_expands.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent_response_expands import EnterpriseAgentResponseExpands + +class TestEnterpriseAgentResponseExpands(unittest.TestCase): + """EnterpriseAgentResponseExpands unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentResponseExpands: + """Test EnterpriseAgentResponseExpands + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentResponseExpands` + """ + model = EnterpriseAgentResponseExpands() + if include_optional: + return EnterpriseAgentResponseExpands( + tests = [ + { } + ], + notification_rules = [ + agents.models.notification_rules.NotificationRules( + agent_alert_rules = [{"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}], ) + ], + labels = [ + agents.models.labels.Labels( + label_id = '11', + name = 'Label name', ) + ] + ) + else: + return EnterpriseAgentResponseExpands( + ) + """ + + def testEnterpriseAgentResponseExpands(self): + """Test EnterpriseAgentResponseExpands""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_enterprise_agent_state.py b/agents/test/test_enterprise_agent_state.py new file mode 100644 index 00000000..8a595346 --- /dev/null +++ b/agents/test/test_enterprise_agent_state.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.enterprise_agent_state import EnterpriseAgentState + +class TestEnterpriseAgentState(unittest.TestCase): + """EnterpriseAgentState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnterpriseAgentState(self): + """Test EnterpriseAgentState""" + # inst = EnterpriseAgentState() + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_error.py b/agents/test/test_error.py new file mode 100644 index 00000000..1c90afd1 --- /dev/null +++ b/agents/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_error_detail.py b/agents/test/test_error_detail.py new file mode 100644 index 00000000..cfa88a3e --- /dev/null +++ b/agents/test/test_error_detail.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.error_detail import ErrorDetail + +class TestErrorDetail(unittest.TestCase): + """ErrorDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ErrorDetail: + """Test ErrorDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ErrorDetail` + """ + model = ErrorDetail() + if include_optional: + return ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)' + ) + else: + return ErrorDetail( + ) + """ + + def testErrorDetail(self): + """Test ErrorDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_error_detail_code.py b/agents/test/test_error_detail_code.py new file mode 100644 index 00000000..d8f3c118 --- /dev/null +++ b/agents/test/test_error_detail_code.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.error_detail_code import ErrorDetailCode + +class TestErrorDetailCode(unittest.TestCase): + """ErrorDetailCode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorDetailCode(self): + """Test ErrorDetailCode""" + # inst = ErrorDetailCode() + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_get_agent_proxies200_response.py b/agents/test/test_get_agent_proxies200_response.py similarity index 85% rename from agents_api/test/test_get_agent_proxies200_response.py rename to agents/test/test_get_agent_proxies200_response.py index f7967541..72982c9d 100644 --- a/agents_api/test/test_get_agent_proxies200_response.py +++ b/agents/test/test_get_agent_proxies200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response +from agents.models.get_agent_proxies200_response import GetAgentProxies200Response class TestGetAgentProxies200Response(unittest.TestCase): """GetAgentProxies200Response unit test stubs""" @@ -37,8 +36,8 @@ class TestGetAgentProxies200Response(unittest.TestCase): if include_optional: return GetAgentProxies200Response( agent_proxies = [ - agents_api.models.agent_proxy.AgentProxy( - aid = '105', + agents.models.agent_proxy.AgentProxy( + aid = '1234', auth_type = 'basic', bypass_list = ["10.0.0.0/16","*.thousandeyes.com"], last_modified = '2022-07-17T22:00:54Z', @@ -50,8 +49,8 @@ class TestGetAgentProxies200Response(unittest.TestCase): type = 'static', user = 'user1', ) ], - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/agents_api/test/test_get_agents200_response.py b/agents/test/test_get_agents200_response.py similarity index 86% rename from agents_api/test/test_get_agents200_response.py rename to agents/test/test_get_agents200_response.py index 8a45fad1..00736daf 100644 --- a/agents_api/test/test_get_agents200_response.py +++ b/agents/test/test_get_agents200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.get_agents200_response import GetAgents200Response +from agents.models.get_agents200_response import GetAgents200Response class TestGetAgents200Response(unittest.TestCase): """GetAgents200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetAgents200Response(unittest.TestCase): agents = [ null ], - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/agents_api/test/test_get_agents_notification_rule200_response.py b/agents/test/test_get_agents_notification_rule200_response.py similarity index 83% rename from agents_api/test/test_get_agents_notification_rule200_response.py rename to agents/test/test_get_agents_notification_rule200_response.py index 0d8e1928..804a7167 100644 --- a/agents_api/test/test_get_agents_notification_rule200_response.py +++ b/agents/test/test_get_agents_notification_rule200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response +from agents.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response class TestGetAgentsNotificationRule200Response(unittest.TestCase): """GetAgentsNotificationRule200Response unit test stubs""" @@ -42,14 +41,14 @@ class TestGetAgentsNotificationRule200Response(unittest.TestCase): notify_on_clear = True, is_default = False, agents = [ - agents_api.models.agent.Agent() + null ], - notifications = agents_api.models.notification.Notification( - email = agents_api.models.alert_email.AlertEmail( + notifications = agents.models.notification.Notification( + email = agents.models.alert_email.AlertEmail( message = 'This test is failing, check as soon as possible.', recipients = ["user1@thousandeyes.com","user2@cisco.com"], ), third_party = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( + agents.models.alert_integration_base.AlertIntegrationBase( integration_id = 'wb-78', integration_name = 'integrationSlack1', integration_type = 'slack', @@ -60,7 +59,7 @@ class TestGetAgentsNotificationRule200Response(unittest.TestCase): channel = '#slackChannel', ) ], webhook = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( + agents.models.alert_integration_base.AlertIntegrationBase( integration_id = 'wb-78', integration_name = 'integrationSlack1', target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', @@ -69,8 +68,8 @@ class TestGetAgentsNotificationRule200Response(unittest.TestCase): auth_token = '0VqDYEpidpHVAK397x8PBsmZ', channel = '#slackChannel', ) ], ), - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/agents_api/test/test_get_agents_notification_rules200_response.py b/agents/test/test_get_agents_notification_rules200_response.py similarity index 87% rename from agents_api/test/test_get_agents_notification_rules200_response.py rename to agents/test/test_get_agents_notification_rules200_response.py index 2c1cc0b8..bdda28f1 100644 --- a/agents_api/test/test_get_agents_notification_rules200_response.py +++ b/agents/test/test_get_agents_notification_rules200_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response +from agents.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response class TestGetAgentsNotificationRules200Response(unittest.TestCase): """GetAgentsNotificationRules200Response unit test stubs""" @@ -37,8 +36,8 @@ class TestGetAgentsNotificationRules200Response(unittest.TestCase): if include_optional: return GetAgentsNotificationRules200Response( agent_alert_rules = [{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 = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/agents/test/test_interface_ip_mapping.py b/agents/test/test_interface_ip_mapping.py new file mode 100644 index 00000000..9d09b9ca --- /dev/null +++ b/agents/test/test_interface_ip_mapping.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.interface_ip_mapping import InterfaceIpMapping + +class TestInterfaceIpMapping(unittest.TestCase): + """InterfaceIpMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InterfaceIpMapping: + """Test InterfaceIpMapping + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InterfaceIpMapping` + """ + model = InterfaceIpMapping() + if include_optional: + return InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"] + ) + else: + return InterfaceIpMapping( + ) + """ + + def testInterfaceIpMapping(self): + """Test InterfaceIpMapping""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_labels.py b/agents/test/test_labels.py new file mode 100644 index 00000000..75f31a07 --- /dev/null +++ b/agents/test/test_labels.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.labels import Labels + +class TestLabels(unittest.TestCase): + """Labels unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Labels: + """Test Labels + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Labels` + """ + model = Labels() + if include_optional: + return Labels( + label_id = '11', + name = 'Label name' + ) + else: + return Labels( + ) + """ + + def testLabels(self): + """Test Labels""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_link.py b/agents/test/test_link.py new file mode 100644 index 00000000..f2342617 --- /dev/null +++ b/agents/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_notification.py b/agents/test/test_notification.py new file mode 100644 index 00000000..fb26aaaa --- /dev/null +++ b/agents/test/test_notification.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.notification import Notification + +class TestNotification(unittest.TestCase): + """Notification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Notification: + """Test Notification + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Notification` + """ + model = Notification() + if include_optional: + return Notification( + email = agents.models.alert_email.AlertEmail( + message = 'This test is failing, check as soon as possible.', + recipients = ["user1@thousandeyes.com","user2@cisco.com"], ), + third_party = [ + agents.models.alert_integration_base.AlertIntegrationBase( + integration_id = 'wb-78', + integration_name = 'integrationSlack1', + integration_type = 'slack', + target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', + auth_method = 'Basic', + auth_user = 'user123', + auth_token = '0VqDYEpidpHVAK397x8PBsmZ', + channel = '#slackChannel', ) + ], + webhook = [ + agents.models.alert_integration_base.AlertIntegrationBase( + integration_id = 'wb-78', + integration_name = 'integrationSlack1', + integration_type = 'slack', + target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', + auth_method = 'Basic', + auth_user = 'user123', + auth_token = '0VqDYEpidpHVAK397x8PBsmZ', + channel = '#slackChannel', ) + ] + ) + else: + return Notification( + ) + """ + + def testNotification(self): + """Test Notification""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_notification_rule.py b/agents/test/test_notification_rule.py similarity index 92% rename from agents_api/test/test_notification_rule.py rename to agents/test/test_notification_rule.py index 49fe680e..297fe48c 100644 --- a/agents_api/test/test_notification_rule.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.notification_rule import NotificationRule +from agents.models.notification_rule import NotificationRule class TestNotificationRule(unittest.TestCase): """NotificationRule unit test stubs""" diff --git a/agents_api/test/test_notification_rule_detail.py b/agents/test/test_notification_rule_detail.py similarity index 84% rename from agents_api/test/test_notification_rule_detail.py rename to agents/test/test_notification_rule_detail.py index 5cd2403e..90b1202a 100644 --- a/agents_api/test/test_notification_rule_detail.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.notification_rule_detail import NotificationRuleDetail +from agents.models.notification_rule_detail import NotificationRuleDetail class TestNotificationRuleDetail(unittest.TestCase): """NotificationRuleDetail unit test stubs""" @@ -42,14 +41,14 @@ class TestNotificationRuleDetail(unittest.TestCase): notify_on_clear = True, is_default = False, agents = [ - agents_api.models.agent.Agent() + null ], - notifications = agents_api.models.notification.Notification( - email = agents_api.models.alert_email.AlertEmail( + notifications = agents.models.notification.Notification( + email = agents.models.alert_email.AlertEmail( message = 'This test is failing, check as soon as possible.', recipients = ["user1@thousandeyes.com","user2@cisco.com"], ), third_party = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( + agents.models.alert_integration_base.AlertIntegrationBase( integration_id = 'wb-78', integration_name = 'integrationSlack1', integration_type = 'slack', @@ -60,7 +59,7 @@ class TestNotificationRuleDetail(unittest.TestCase): channel = '#slackChannel', ) ], webhook = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( + agents.models.alert_integration_base.AlertIntegrationBase( integration_id = 'wb-78', integration_name = 'integrationSlack1', target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', diff --git a/agents_api/test/test_notification_rules.py b/agents/test/test_notification_rules.py similarity index 92% rename from agents_api/test/test_notification_rules.py rename to agents/test/test_notification_rules.py index ecb56501..89805b5d 100644 --- a/agents_api/test/test_notification_rules.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.notification_rules import NotificationRules +from agents.models.notification_rules import NotificationRules class TestNotificationRules(unittest.TestCase): """NotificationRules unit test stubs""" diff --git a/agents_api/test/test_notifications.py b/agents/test/test_notifications.py similarity index 85% rename from agents_api/test/test_notifications.py rename to agents/test/test_notifications.py index 2f928cb6..d0868afa 100644 --- a/agents_api/test/test_notifications.py +++ b/agents/test/test_notifications.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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.notifications import Notifications +from agents.models.notifications import Notifications class TestNotifications(unittest.TestCase): """Notifications unit test stubs""" @@ -36,12 +35,12 @@ class TestNotifications(unittest.TestCase): model = Notifications() if include_optional: return Notifications( - notifications = agents_api.models.notification.Notification( - email = agents_api.models.alert_email.AlertEmail( + notifications = agents.models.notification.Notification( + email = agents.models.alert_email.AlertEmail( message = 'This test is failing, check as soon as possible.', recipients = ["user1@thousandeyes.com","user2@cisco.com"], ), third_party = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( + agents.models.alert_integration_base.AlertIntegrationBase( integration_id = 'wb-78', integration_name = 'integrationSlack1', integration_type = 'slack', @@ -52,7 +51,7 @@ class TestNotifications(unittest.TestCase): channel = '#slackChannel', ) ], webhook = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( + agents.models.alert_integration_base.AlertIntegrationBase( integration_id = 'wb-78', integration_name = 'integrationSlack1', target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', diff --git a/agents_api/test/test_proxy_auth_type.py b/agents/test/test_proxy_auth_type.py similarity index 83% rename from agents_api/test/test_proxy_auth_type.py rename to agents/test/test_proxy_auth_type.py index 69e56965..c20f2da2 100644 --- a/agents_api/test/test_proxy_auth_type.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.proxy_auth_type import ProxyAuthType +from agents.models.proxy_auth_type import ProxyAuthType class TestProxyAuthType(unittest.TestCase): """ProxyAuthType unit test stubs""" diff --git a/agents_api/test/test_proxy_type.py b/agents/test/test_proxy_type.py similarity index 83% rename from agents_api/test/test_proxy_type.py rename to agents/test/test_proxy_type.py index 66ecf42c..7c9594c1 100644 --- a/agents_api/test/test_proxy_type.py +++ b/agents/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.proxy_type import ProxyType +from agents.models.proxy_type import ProxyType class TestProxyType(unittest.TestCase): """ProxyType unit test stubs""" diff --git a/agents/test/test_self_links.py b/agents/test/test_self_links.py new file mode 100644 index 00000000..0cb5b061 --- /dev/null +++ b/agents/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = agents.models.self_links__links.SelfLinks__links( + self = agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_self_links_links.py b/agents/test/test_self_links_links.py new file mode 100644 index 00000000..60219c7a --- /dev/null +++ b/agents/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_simple_agent.py b/agents/test/test_simple_agent.py new file mode 100644 index 00000000..a67d63da --- /dev/null +++ b/agents/test/test_simple_agent.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.simple_agent import SimpleAgent + +class TestSimpleAgent(unittest.TestCase): + """SimpleAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleAgent: + """Test SimpleAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleAgent` + """ + model = SimpleAgent() + if include_optional: + return SimpleAgent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True + ) + else: + return SimpleAgent( + ) + """ + + def testSimpleAgent(self): + """Test SimpleAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_simple_enterprise_agent.py b/agents/test/test_simple_enterprise_agent.py new file mode 100644 index 00000000..f10c8faf --- /dev/null +++ b/agents/test/test_simple_enterprise_agent.py @@ -0,0 +1,87 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.simple_enterprise_agent import SimpleEnterpriseAgent + +class TestSimpleEnterpriseAgent(unittest.TestCase): + """SimpleEnterpriseAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleEnterpriseAgent: + """Test SimpleEnterpriseAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleEnterpriseAgent` + """ + model = SimpleEnterpriseAgent() + if include_optional: + return SimpleEnterpriseAgent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + cluster_members = [ + null + ], + utilization = 25, + account_groups = [ + agents.models.account_group.AccountGroup() + ], + ipv6_policy = 'force-ipv4', + error_details = [ + agents.models.error_detail.ErrorDetail( + code = 'agent-version-outdated', + description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) + ], + hostname = 'thousandeyes.com', + last_seen = '2022-07-17T22:00:54Z', + agent_state = 'online', + keep_browser_cache = True, + created_date = '2022-07-17T22:00:54Z', + target_for_tests = '1.1.1.1', + local_resolution_prefixes = [ + '10.2.3.3/24' + ], + interface_ip_mappings = [ + agents.models.interface_ip_mapping.InterfaceIpMapping( + interface_name = 'wlp4s0', + ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) + ] + ) + else: + return SimpleEnterpriseAgent( + ) + """ + + def testSimpleEnterpriseAgent(self): + """Test SimpleEnterpriseAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_simple_test.py b/agents/test/test_simple_test.py new file mode 100644 index 00000000..7e6364c4 --- /dev/null +++ b/agents/test/test_simple_test.py @@ -0,0 +1,66 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.simple_test import SimpleTest + +class TestSimpleTest(unittest.TestCase): + """SimpleTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTest: + """Test SimpleTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTest` + """ + model = SimpleTest() + if include_optional: + return SimpleTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = agents.models.simple_test__links.SimpleTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) + ) + else: + return SimpleTest( + ) + """ + + def testSimpleTest(self): + """Test SimpleTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_simple_test_links.py b/agents/test/test_simple_test_links.py new file mode 100644 index 00000000..1c3101dc --- /dev/null +++ b/agents/test/test_simple_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.simple_test_links import SimpleTestLinks + +class TestSimpleTestLinks(unittest.TestCase): + """SimpleTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTestLinks: + """Test SimpleTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTestLinks` + """ + model = SimpleTestLinks() + if include_optional: + return SimpleTestLinks( + var_self = None, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}] + ) + else: + return SimpleTestLinks( + ) + """ + + def testSimpleTestLinks(self): + """Test SimpleTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_simple_test_links_self.py b/agents/test/test_simple_test_links_self.py new file mode 100644 index 00000000..ff0a045c --- /dev/null +++ b/agents/test/test_simple_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.simple_test_links_self import SimpleTestLinksSelf + +class TestSimpleTestLinksSelf(unittest.TestCase): + """SimpleTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTestLinksSelf: + """Test SimpleTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTestLinksSelf` + """ + model = SimpleTestLinksSelf() + if include_optional: + return SimpleTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return SimpleTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testSimpleTestLinksSelf(self): + """Test SimpleTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_test_interval.py b/agents/test/test_test_interval.py new file mode 100644 index 00000000..596bda55 --- /dev/null +++ b/agents/test/test_test_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_test_type.py b/agents/test/test_test_type.py new file mode 100644 index 00000000..a2aee081 --- /dev/null +++ b/agents/test/test_test_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.test_type import TestType + +class TestTestType(unittest.TestCase): + """TestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestType(self): + """Test TestType""" + # inst = TestType() + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/test/test_unassign_enterprise_agent_from_cluster_request.py b/agents/test/test_unassign_enterprise_agent_from_cluster_request.py similarity index 89% rename from agents_api/test/test_unassign_enterprise_agent_from_cluster_request.py rename to agents/test/test_unassign_enterprise_agent_from_cluster_request.py index f813bee5..8fc08e4d 100644 --- a/agents_api/test/test_unassign_enterprise_agent_from_cluster_request.py +++ b/agents/test/test_unassign_enterprise_agent_from_cluster_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest +from agents.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest class TestUnassignEnterpriseAgentFromClusterRequest(unittest.TestCase): """UnassignEnterpriseAgentFromClusterRequest unit test stubs""" diff --git a/agents/test/test_unauthorized_error.py b/agents/test/test_unauthorized_error.py new file mode 100644 index 00000000..1f071d1d --- /dev/null +++ b/agents/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_validation_error.py b/agents/test/test_validation_error.py new file mode 100644 index 00000000..3ae97e36 --- /dev/null +++ b/agents/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + agents.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents/test/test_validation_error_all_of_errors.py b/agents/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..a7925758 --- /dev/null +++ b/agents/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/agents_api/.github/workflows/python.yml b/agents_api/.github/workflows/python.yml deleted file mode 100644 index 129fc497..00000000 --- a/agents_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: agents_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/agents_api/.gitlab-ci.yml b/agents_api/.gitlab-ci.yml deleted file mode 100644 index 337432fd..00000000 --- a/agents_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=agents_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/agents_api/.openapi-generator/FILES b/agents_api/.openapi-generator/FILES deleted file mode 100644 index a2df8725..00000000 --- a/agents_api/.openapi-generator/FILES +++ /dev/null @@ -1,203 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -agents_api/__init__.py -agents_api/api/__init__.py -agents_api/api/cloud_and_enterprise_agent_notification_rules_api.py -agents_api/api/cloud_and_enterprise_agents_api.py -agents_api/api/enterprise_agent_cluster_api.py -agents_api/api/proxies_api.py -agents_api/api_client.py -agents_api/api_response.py -agents_api/configuration.py -agents_api/exceptions.py -agents_api/models/__init__.py -agents_api/models/account_group.py -agents_api/models/account_group_id.py -agents_api/models/agent.py -agents_api/models/agent_base.py -agents_api/models/agent_detail.py -agents_api/models/agent_details.py -agents_api/models/agent_details_expand.py -agents_api/models/agent_ipv6_policy.py -agents_api/models/agent_list_expand.py -agents_api/models/agent_proxies.py -agents_api/models/agent_proxy.py -agents_api/models/agents.py -agents_api/models/alert_email.py -agents_api/models/alert_integration_base.py -agents_api/models/alert_integration_type.py -agents_api/models/assign_enterprise_agent_cluster_request.py -agents_api/models/cloud_enterprise_agent.py -agents_api/models/cloud_enterprise_agent_type.py -agents_api/models/cloud_enterprise_agents.py -agents_api/models/cluster_member.py -agents_api/models/enterprise_agent.py -agents_api/models/enterprise_agent_detail.py -agents_api/models/enterprise_agent_ipv6_policy.py -agents_api/models/enterprise_agent_request_body.py -agents_api/models/enterprise_agent_state.py -agents_api/models/error.py -agents_api/models/error_detail.py -agents_api/models/error_detail_code.py -agents_api/models/get_agent_details200_response.py -agents_api/models/get_agent_proxies200_response.py -agents_api/models/get_agents200_response.py -agents_api/models/get_agents_notification_rule200_response.py -agents_api/models/get_agents_notification_rules200_response.py -agents_api/models/interface_ip_mapping.py -agents_api/models/labels.py -agents_api/models/link.py -agents_api/models/notification.py -agents_api/models/notification_rule.py -agents_api/models/notification_rule_detail.py -agents_api/models/notification_rules.py -agents_api/models/notifications.py -agents_api/models/proxy_auth_type.py -agents_api/models/proxy_type.py -agents_api/models/self_links.py -agents_api/models/self_links_links.py -agents_api/models/simple_test.py -agents_api/models/test_interval.py -agents_api/models/test_type.py -agents_api/models/unassign_enterprise_agent_from_cluster_request.py -agents_api/models/unauthorized_error.py -agents_api/models/unexpanded_instant_test.py -agents_api/models/unexpanded_instant_test_links.py -agents_api/models/unexpanded_instant_test_links_self.py -agents_api/models/unexpanded_instant_test_links_test_results.py -agents_api/models/unexpanded_test.py -agents_api/models/update_enterprise_agent_details200_response.py -agents_api/py.typed -agents_api/rest.py -docs/AccountGroup.md -docs/AccountGroupId.md -docs/Agent.md -docs/AgentBase.md -docs/AgentDetail.md -docs/AgentDetails.md -docs/AgentDetailsExpand.md -docs/AgentIpv6Policy.md -docs/AgentListExpand.md -docs/AgentProxies.md -docs/AgentProxy.md -docs/Agents.md -docs/AlertEmail.md -docs/AlertIntegrationBase.md -docs/AlertIntegrationType.md -docs/AssignEnterpriseAgentClusterRequest.md -docs/CloudAndEnterpriseAgentNotificationRulesApi.md -docs/CloudAndEnterpriseAgentsApi.md -docs/CloudEnterpriseAgent.md -docs/CloudEnterpriseAgentType.md -docs/CloudEnterpriseAgents.md -docs/ClusterMember.md -docs/EnterpriseAgent.md -docs/EnterpriseAgentClusterApi.md -docs/EnterpriseAgentDetail.md -docs/EnterpriseAgentIpv6Policy.md -docs/EnterpriseAgentRequestBody.md -docs/EnterpriseAgentState.md -docs/Error.md -docs/ErrorDetail.md -docs/ErrorDetailCode.md -docs/GetAgentDetails200Response.md -docs/GetAgentProxies200Response.md -docs/GetAgents200Response.md -docs/GetAgentsNotificationRule200Response.md -docs/GetAgentsNotificationRules200Response.md -docs/InterfaceIpMapping.md -docs/Labels.md -docs/Link.md -docs/Notification.md -docs/NotificationRule.md -docs/NotificationRuleDetail.md -docs/NotificationRules.md -docs/Notifications.md -docs/ProxiesApi.md -docs/ProxyAuthType.md -docs/ProxyType.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SimpleTest.md -docs/TestInterval.md -docs/TestType.md -docs/UnassignEnterpriseAgentFromClusterRequest.md -docs/UnauthorizedError.md -docs/UnexpandedInstantTest.md -docs/UnexpandedInstantTestLinks.md -docs/UnexpandedInstantTestLinksSelf.md -docs/UnexpandedInstantTestLinksTestResults.md -docs/UnexpandedTest.md -docs/UpdateEnterpriseAgentDetails200Response.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group.py -test/test_account_group_id.py -test/test_agent.py -test/test_agent_base.py -test/test_agent_detail.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_agents.py -test/test_alert_email.py -test/test_alert_integration_base.py -test/test_alert_integration_type.py -test/test_assign_enterprise_agent_cluster_request.py -test/test_cloud_and_enterprise_agent_notification_rules_api.py -test/test_cloud_and_enterprise_agents_api.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_api.py -test/test_enterprise_agent_detail.py -test/test_enterprise_agent_ipv6_policy.py -test/test_enterprise_agent_request_body.py -test/test_enterprise_agent_state.py -test/test_error.py -test/test_error_detail.py -test/test_error_detail_code.py -test/test_get_agent_details200_response.py -test/test_get_agent_proxies200_response.py -test/test_get_agents200_response.py -test/test_get_agents_notification_rule200_response.py -test/test_get_agents_notification_rules200_response.py -test/test_interface_ip_mapping.py -test/test_labels.py -test/test_link.py -test/test_notification.py -test/test_notification_rule.py -test/test_notification_rule_detail.py -test/test_notification_rules.py -test/test_notifications.py -test/test_proxies_api.py -test/test_proxy_auth_type.py -test/test_proxy_type.py -test/test_self_links.py -test/test_self_links_links.py -test/test_simple_test.py -test/test_test_interval.py -test/test_test_type.py -test/test_unassign_enterprise_agent_from_cluster_request.py -test/test_unauthorized_error.py -test/test_unexpanded_instant_test.py -test/test_unexpanded_instant_test_links.py -test/test_unexpanded_instant_test_links_self.py -test/test_unexpanded_instant_test_links_test_results.py -test/test_unexpanded_test.py -test/test_update_enterprise_agent_details200_response.py -tox.ini diff --git a/agents_api/.openapi-generator/VERSION b/agents_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/agents_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/agents_api/.travis.yml b/agents_api/.travis.yml deleted file mode 100644 index 7ade2997..00000000 --- a/agents_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=agents_api diff --git a/agents_api/README.md b/agents_api/README.md deleted file mode 100644 index 535c707c..00000000 --- a/agents_api/README.md +++ /dev/null @@ -1,186 +0,0 @@ -# agents-api - -## Overview -Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import agents_api -``` - -### 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 agents_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import agents_api -from agents_api.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 = agents_api.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 = agents_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agents_api.CloudAndEnterpriseAgentNotificationRulesApi(api_client) - notification_rule_id = '281474976710706' # str | Unique ID for the agent notification rule. - aid = '2067' # 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 notification rule - api_response = api_instance.get_agents_notification_rule(notification_rule_id, aid=aid) - print("The response of CloudAndEnterpriseAgentNotificationRulesApi->get_agents_notification_rule:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling CloudAndEnterpriseAgentNotificationRulesApi->get_agents_notification_rule: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -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* | [**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 - - -## Documentation For Models - - - [AccountGroup](docs/AccountGroup.md) - - [AccountGroupId](docs/AccountGroupId.md) - - [Agent](docs/Agent.md) - - [AgentBase](docs/AgentBase.md) - - [AgentDetail](docs/AgentDetail.md) - - [AgentDetails](docs/AgentDetails.md) - - [AgentDetailsExpand](docs/AgentDetailsExpand.md) - - [AgentIpv6Policy](docs/AgentIpv6Policy.md) - - [AgentListExpand](docs/AgentListExpand.md) - - [AgentProxies](docs/AgentProxies.md) - - [AgentProxy](docs/AgentProxy.md) - - [Agents](docs/Agents.md) - - [AlertEmail](docs/AlertEmail.md) - - [AlertIntegrationBase](docs/AlertIntegrationBase.md) - - [AlertIntegrationType](docs/AlertIntegrationType.md) - - [AssignEnterpriseAgentClusterRequest](docs/AssignEnterpriseAgentClusterRequest.md) - - [CloudEnterpriseAgent](docs/CloudEnterpriseAgent.md) - - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) - - [CloudEnterpriseAgents](docs/CloudEnterpriseAgents.md) - - [ClusterMember](docs/ClusterMember.md) - - [EnterpriseAgent](docs/EnterpriseAgent.md) - - [EnterpriseAgentDetail](docs/EnterpriseAgentDetail.md) - - [EnterpriseAgentIpv6Policy](docs/EnterpriseAgentIpv6Policy.md) - - [EnterpriseAgentRequestBody](docs/EnterpriseAgentRequestBody.md) - - [EnterpriseAgentState](docs/EnterpriseAgentState.md) - - [Error](docs/Error.md) - - [ErrorDetail](docs/ErrorDetail.md) - - [ErrorDetailCode](docs/ErrorDetailCode.md) - - [GetAgentDetails200Response](docs/GetAgentDetails200Response.md) - - [GetAgentProxies200Response](docs/GetAgentProxies200Response.md) - - [GetAgents200Response](docs/GetAgents200Response.md) - - [GetAgentsNotificationRule200Response](docs/GetAgentsNotificationRule200Response.md) - - [GetAgentsNotificationRules200Response](docs/GetAgentsNotificationRules200Response.md) - - [InterfaceIpMapping](docs/InterfaceIpMapping.md) - - [Labels](docs/Labels.md) - - [Link](docs/Link.md) - - [Notification](docs/Notification.md) - - [NotificationRule](docs/NotificationRule.md) - - [NotificationRuleDetail](docs/NotificationRuleDetail.md) - - [NotificationRules](docs/NotificationRules.md) - - [Notifications](docs/Notifications.md) - - [ProxyAuthType](docs/ProxyAuthType.md) - - [ProxyType](docs/ProxyType.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SimpleTest](docs/SimpleTest.md) - - [TestInterval](docs/TestInterval.md) - - [TestType](docs/TestType.md) - - [UnassignEnterpriseAgentFromClusterRequest](docs/UnassignEnterpriseAgentFromClusterRequest.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) - - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) - - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) - - [UnexpandedInstantTestLinksTestResults](docs/UnexpandedInstantTestLinksTestResults.md) - - [UnexpandedTest](docs/UnexpandedTest.md) - - [UpdateEnterpriseAgentDetails200Response](docs/UpdateEnterpriseAgentDetails200Response.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/agents_api/agents_api/__init__.py b/agents_api/agents_api/__init__.py deleted file mode 100644 index d73de25d..00000000 --- a/agents_api/agents_api/__init__.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - 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.0 - 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 agents_api.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi -from agents_api.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi -from agents_api.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi -from agents_api.api.proxies_api import ProxiesApi - -# import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.api_client import ApiClient -from agents_api.configuration import Configuration -from agents_api.exceptions import OpenApiException -from agents_api.exceptions import ApiTypeError -from agents_api.exceptions import ApiValueError -from agents_api.exceptions import ApiKeyError -from agents_api.exceptions import ApiAttributeError -from agents_api.exceptions import ApiException - -# import models into sdk package -from agents_api.models.account_group import AccountGroup -from agents_api.models.account_group_id import AccountGroupId -from agents_api.models.agent import Agent -from agents_api.models.agent_base import AgentBase -from agents_api.models.agent_detail import AgentDetail -from agents_api.models.agent_details import AgentDetails -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.agent_ipv6_policy import AgentIpv6Policy -from agents_api.models.agent_list_expand import AgentListExpand -from agents_api.models.agent_proxies import AgentProxies -from agents_api.models.agent_proxy import AgentProxy -from agents_api.models.agents import Agents -from agents_api.models.alert_email import AlertEmail -from agents_api.models.alert_integration_base import AlertIntegrationBase -from agents_api.models.alert_integration_type import AlertIntegrationType -from agents_api.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest -from agents_api.models.cloud_enterprise_agent import CloudEnterpriseAgent -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.cloud_enterprise_agents import CloudEnterpriseAgents -from agents_api.models.cluster_member import ClusterMember -from agents_api.models.enterprise_agent import EnterpriseAgent -from agents_api.models.enterprise_agent_detail import EnterpriseAgentDetail -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from agents_api.models.enterprise_agent_request_body import EnterpriseAgentRequestBody -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error import Error -from agents_api.models.error_detail import ErrorDetail -from agents_api.models.error_detail_code import ErrorDetailCode -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response -from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response -from agents_api.models.get_agents200_response import GetAgents200Response -from agents_api.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response -from agents_api.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response -from agents_api.models.interface_ip_mapping import InterfaceIpMapping -from agents_api.models.labels import Labels -from agents_api.models.link import Link -from agents_api.models.notification import Notification -from agents_api.models.notification_rule import NotificationRule -from agents_api.models.notification_rule_detail import NotificationRuleDetail -from agents_api.models.notification_rules import NotificationRules -from agents_api.models.notifications import Notifications -from agents_api.models.proxy_auth_type import ProxyAuthType -from agents_api.models.proxy_type import ProxyType -from agents_api.models.self_links import SelfLinks -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.simple_test import SimpleTest -from agents_api.models.test_interval import TestInterval -from agents_api.models.test_type import TestType -from agents_api.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest -from agents_api.models.unauthorized_error import UnauthorizedError -from agents_api.models.unexpanded_instant_test import UnexpandedInstantTest -from agents_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from agents_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from agents_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from agents_api.models.unexpanded_test import UnexpandedTest -from agents_api.models.update_enterprise_agent_details200_response import UpdateEnterpriseAgentDetails200Response diff --git a/agents_api/agents_api/api/__init__.py b/agents_api/agents_api/api/__init__.py deleted file mode 100644 index 29594b74..00000000 --- a/agents_api/agents_api/api/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# flake8: noqa - -# import apis into api package -from agents_api.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi -from agents_api.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi -from agents_api.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi -from agents_api.api.proxies_api import ProxiesApi - diff --git a/agents_api/agents_api/api_client.py b/agents_api/agents_api/api_client.py deleted file mode 100644 index 936dfaa6..00000000 --- a/agents_api/agents_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from agents_api.configuration import Configuration -from agents_api.api_response import ApiResponse -import agents_api.models -from agents_api import rest -from agents_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(agents_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/agents_api/agents_api/api_response.py b/agents_api/agents_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/agents_api/agents_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/agents_api/agents_api/configuration.py b/agents_api/agents_api/configuration.py deleted file mode 100644 index dd1548ff..00000000 --- a/agents_api/agents_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("agents_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/agents_api/agents_api/exceptions.py b/agents_api/agents_api/exceptions.py deleted file mode 100644 index 41742aa7..00000000 --- a/agents_api/agents_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/agents_api/agents_api/models/__init__.py b/agents_api/agents_api/models/__init__.py deleted file mode 100644 index 77a27512..00000000 --- a/agents_api/agents_api/models/__init__.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from agents_api.models.account_group import AccountGroup -from agents_api.models.account_group_id import AccountGroupId -from agents_api.models.agent import Agent -from agents_api.models.agent_base import AgentBase -from agents_api.models.agent_detail import AgentDetail -from agents_api.models.agent_details import AgentDetails -from agents_api.models.agent_details_expand import AgentDetailsExpand -from agents_api.models.agent_ipv6_policy import AgentIpv6Policy -from agents_api.models.agent_list_expand import AgentListExpand -from agents_api.models.agent_proxies import AgentProxies -from agents_api.models.agent_proxy import AgentProxy -from agents_api.models.agents import Agents -from agents_api.models.alert_email import AlertEmail -from agents_api.models.alert_integration_base import AlertIntegrationBase -from agents_api.models.alert_integration_type import AlertIntegrationType -from agents_api.models.assign_enterprise_agent_cluster_request import AssignEnterpriseAgentClusterRequest -from agents_api.models.cloud_enterprise_agent import CloudEnterpriseAgent -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.cloud_enterprise_agents import CloudEnterpriseAgents -from agents_api.models.cluster_member import ClusterMember -from agents_api.models.enterprise_agent import EnterpriseAgent -from agents_api.models.enterprise_agent_detail import EnterpriseAgentDetail -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from agents_api.models.enterprise_agent_request_body import EnterpriseAgentRequestBody -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error import Error -from agents_api.models.error_detail import ErrorDetail -from agents_api.models.error_detail_code import ErrorDetailCode -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response -from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response -from agents_api.models.get_agents200_response import GetAgents200Response -from agents_api.models.get_agents_notification_rule200_response import GetAgentsNotificationRule200Response -from agents_api.models.get_agents_notification_rules200_response import GetAgentsNotificationRules200Response -from agents_api.models.interface_ip_mapping import InterfaceIpMapping -from agents_api.models.labels import Labels -from agents_api.models.link import Link -from agents_api.models.notification import Notification -from agents_api.models.notification_rule import NotificationRule -from agents_api.models.notification_rule_detail import NotificationRuleDetail -from agents_api.models.notification_rules import NotificationRules -from agents_api.models.notifications import Notifications -from agents_api.models.proxy_auth_type import ProxyAuthType -from agents_api.models.proxy_type import ProxyType -from agents_api.models.self_links import SelfLinks -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.simple_test import SimpleTest -from agents_api.models.test_interval import TestInterval -from agents_api.models.test_type import TestType -from agents_api.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest -from agents_api.models.unauthorized_error import UnauthorizedError -from agents_api.models.unexpanded_instant_test import UnexpandedInstantTest -from agents_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from agents_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from agents_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from agents_api.models.unexpanded_test import UnexpandedTest -from agents_api.models.update_enterprise_agent_details200_response import UpdateEnterpriseAgentDetails200Response diff --git a/agents_api/agents_api/models/account_group.py b/agents_api/agents_api/models/account_group.py deleted file mode 100644 index 793775d2..00000000 --- a/agents_api/agents_api/models/account_group.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/account_group_id.py b/agents_api/agents_api/models/account_group_id.py deleted file mode 100644 index 1ba848fc..00000000 --- a/agents_api/agents_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/agents_api/agents_api/models/agent.py b/agents_api/agents_api/models/agent.py deleted file mode 100644 index 00f1a9b3..00000000 --- a/agents_api/agents_api/models/agent.py +++ /dev/null @@ -1,121 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -try: - from typing import Self -except ImportError: - 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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", "agentType", "location", "countryId", "enabled", "verifySslCertificates"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates") - }) - return _obj - - diff --git a/agents_api/agents_api/models/agent_base.py b/agents_api/agents_api/models/agent_base.py deleted file mode 100644 index 542368fb..00000000 --- a/agents_api/agents_api/models/agent_base.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/agent_detail.py b/agents_api/agents_api/models/agent_detail.py deleted file mode 100644 index ca2191bb..00000000 --- a/agents_api/agents_api/models/agent_detail.py +++ /dev/null @@ -1,143 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.labels import Labels -from agents_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentDetail(BaseModel): - """ - AgentDetail - """ # 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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") - tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") - labels: Optional[List[Labels]] = Field(default=None, description="List of labels - see `/labels` for more information.") - __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "agentType", "location", "countryId", "enabled", "verifySslCertificates", "tests", "labels"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentDetail 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - "labels", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AgentDetail 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates"), - "tests": [SimpleTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "labels": [Labels.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/agent_details.py b/agents_api/agents_api/models/agent_details.py deleted file mode 100644 index 7dd3084a..00000000 --- a/agents_api/agents_api/models/agent_details.py +++ /dev/null @@ -1,145 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from agents_api.models.agent_detail import AgentDetail -from agents_api.models.enterprise_agent_detail import EnterpriseAgentDetail -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -AGENTDETAILS_ONE_OF_SCHEMAS = ["AgentDetail", "EnterpriseAgentDetail"] - -class AgentDetails(BaseModel): - """ - AgentDetails - """ - # data type: EnterpriseAgentDetail - oneof_schema_1_validator: Optional[EnterpriseAgentDetail] = None - # data type: AgentDetail - oneof_schema_2_validator: Optional[AgentDetail] = None - actual_instance: Optional[Union[AgentDetail, EnterpriseAgentDetail]] = None - one_of_schemas: List[str] = Literal["AgentDetail", "EnterpriseAgentDetail"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = AgentDetails.model_construct() - error_messages = [] - match = 0 - # validate data type: EnterpriseAgentDetail - if not isinstance(v, EnterpriseAgentDetail): - error_messages.append(f"Error! Input type `{type(v)}` is not `EnterpriseAgentDetail`") - else: - match += 1 - # validate data type: AgentDetail - if not isinstance(v, AgentDetail): - error_messages.append(f"Error! Input type `{type(v)}` is not `AgentDetail`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in AgentDetails with oneOf schemas: AgentDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in AgentDetails with oneOf schemas: AgentDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into EnterpriseAgentDetail - try: - instance.actual_instance = EnterpriseAgentDetail.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into AgentDetail - try: - instance.actual_instance = AgentDetail.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into AgentDetails with oneOf schemas: AgentDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into AgentDetails with oneOf schemas: AgentDetail, EnterpriseAgentDetail. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/agents_api/agents_api/models/cloud_enterprise_agent_type.py b/agents_api/agents_api/models/cloud_enterprise_agent_type.py deleted file mode 100644 index db0116f8..00000000 --- a/agents_api/agents_api/models/cloud_enterprise_agent_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/agents_api/agents_api/models/cluster_member.py b/agents_api/agents_api/models/cluster_member.py deleted file mode 100644 index dc865969..00000000 --- a/agents_api/agents_api/models/cluster_member.py +++ /dev/null @@ -1,131 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error_detail import ErrorDetail -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "member_id", - "name", - "error_details", - "last_seen", - "utilization", - }, - 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: Dict) -> 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.get("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/agents_api/agents_api/models/enterprise_agent.py b/agents_api/agents_api/models/enterprise_agent.py deleted file mode 100644 index 30430f64..00000000 --- a/agents_api/agents_api/models/enterprise_agent.py +++ /dev/null @@ -1,199 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.account_group import AccountGroup -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.cluster_member import ClusterMember -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error_detail import ErrorDetail -from agents_api.models.interface_ip_mapping import InterfaceIpMapping -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EnterpriseAgent(BaseModel): - """ - EnterpriseAgent - """ # 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") - 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]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "agentType", "location", "countryId", "enabled", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "prefix", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - "cluster_members", - "utilization", - "prefix", - "error_details", - "hostname", - "last_seen", - "created_date", - "interface_ip_mappings", - }, - 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: Dict) -> 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({ - "ipAddresses": obj.get("ipAddresses"), - "publicIpAddresses": obj.get("publicIpAddresses"), - "network": obj.get("network"), - "agentId": obj.get("agentId"), - "agentName": obj.get("agentName"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates"), - "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj.get("clusterMembers")] if obj.get("clusterMembers") is not None else None, - "utilization": obj.get("utilization"), - "accountGroups": [AccountGroup.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None, - "prefix": obj.get("prefix"), - "ipv6Policy": obj.get("ipv6Policy"), - "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj.get("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.get("interfaceIpMappings")] if obj.get("interfaceIpMappings") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/enterprise_agent_ipv6_policy.py b/agents_api/agents_api/models/enterprise_agent_ipv6_policy.py deleted file mode 100644 index 89de4aaa..00000000 --- a/agents_api/agents_api/models/enterprise_agent_ipv6_policy.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/agents_api/agents_api/models/enterprise_agent_request_body.py b/agents_api/agents_api/models/enterprise_agent_request_body.py deleted file mode 100644 index dd0e847b..00000000 --- a/agents_api/agents_api/models/enterprise_agent_request_body.py +++ /dev/null @@ -1,103 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.agent_ipv6_policy import AgentIpv6Policy -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EnterpriseAgentRequestBody(BaseModel): - """ - EnterpriseAgentRequestBody - """ # noqa: E501 - agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName") - enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") - account_groups: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of account groups IDs. See `/accounts-groups` for a list of account IDs", alias="accountGroups") - ipv6_policy: Optional[AgentIpv6Policy] = Field(default=None, alias="ipv6Policy") - keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache") - 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="Public IP ranges for rDNS lookups. 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") - tests: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test IDs. See `/tests` to pull a list of available tests.") - __properties: ClassVar[List[str]] = ["agentName", "enabled", "accountGroups", "ipv6Policy", "keepBrowserCache", "targetForTests", "localResolutionPrefixes", "tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EnterpriseAgentRequestBody 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EnterpriseAgentRequestBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentName": obj.get("agentName"), - "enabled": obj.get("enabled"), - "accountGroups": obj.get("accountGroups"), - "ipv6Policy": obj.get("ipv6Policy"), - "keepBrowserCache": obj.get("keepBrowserCache"), - "targetForTests": obj.get("targetForTests"), - "localResolutionPrefixes": obj.get("localResolutionPrefixes"), - "tests": obj.get("tests") - }) - return _obj - - diff --git a/agents_api/agents_api/models/enterprise_agent_state.py b/agents_api/agents_api/models/enterprise_agent_state.py deleted file mode 100644 index da16ee7e..00000000 --- a/agents_api/agents_api/models/enterprise_agent_state.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/agents_api/agents_api/models/error.py b/agents_api/agents_api/models/error.py deleted file mode 100644 index 2354ad37..00000000 --- a/agents_api/agents_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/error_detail.py b/agents_api/agents_api/models/error_detail.py deleted file mode 100644 index 5a2b3ffa..00000000 --- a/agents_api/agents_api/models/error_detail.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.error_detail_code import ErrorDetailCode -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "description", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/error_detail_code.py b/agents_api/agents_api/models/error_detail_code.py deleted file mode 100644 index 795f86b3..00000000 --- a/agents_api/agents_api/models/error_detail_code.py +++ /dev/null @@ -1,51 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/agents_api/agents_api/models/get_agent_details200_response.py b/agents_api/agents_api/models/get_agent_details200_response.py deleted file mode 100644 index 4a49c09b..00000000 --- a/agents_api/agents_api/models/get_agent_details200_response.py +++ /dev/null @@ -1,237 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.account_group import AccountGroup -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.cluster_member import ClusterMember -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error_detail import ErrorDetail -from agents_api.models.interface_ip_mapping import InterfaceIpMapping -from agents_api.models.labels import Labels -from agents_api.models.notification_rules import NotificationRules -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAgentDetails200Response(BaseModel): - """ - GetAgentDetails200Response - """ # 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") - 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") - tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") - notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules") - labels: Optional[List[Labels]] = Field(default=None, description="List of labels - see `/labels` for more information.") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "agentType", "location", "countryId", "enabled", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "prefix", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAgentDetails200Response 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. - * OpenAPI `readOnly` fields are excluded. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - "cluster_members", - "utilization", - "prefix", - "error_details", - "hostname", - "last_seen", - "created_date", - "interface_ip_mappings", - "labels", - }, - 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 - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in notification_rules (list) - _items = [] - if self.notification_rules: - for _item in self.notification_rules: - if _item: - _items.append(_item.to_dict()) - _dict['notificationRules'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _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: Dict) -> Self: - """Create an instance of GetAgentDetails200Response 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates"), - "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj.get("clusterMembers")] if obj.get("clusterMembers") is not None else None, - "utilization": obj.get("utilization"), - "accountGroups": [AccountGroup.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None, - "prefix": obj.get("prefix"), - "ipv6Policy": obj.get("ipv6Policy"), - "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj.get("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.get("interfaceIpMappings")] if obj.get("interfaceIpMappings") is not None else None, - "tests": [SimpleTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "notificationRules": [NotificationRules.from_dict(_item) for _item in obj.get("notificationRules")] if obj.get("notificationRules") is not None else None, - "labels": [Labels.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/interface_ip_mapping.py b/agents_api/agents_api/models/interface_ip_mapping.py deleted file mode 100644 index 2794216c..00000000 --- a/agents_api/agents_api/models/interface_ip_mapping.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "interface_name", - "ip_addresses", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/labels.py b/agents_api/agents_api/models/labels.py deleted file mode 100644 index dde99dff..00000000 --- a/agents_api/agents_api/models/labels.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Labels(BaseModel): - """ - Labels - """ # noqa: E501 - label_id: Optional[StrictStr] = Field(default=None, description="Label Id.", alias="labelId") - name: Optional[StrictStr] = Field(default=None, description="Name of the label.") - __properties: ClassVar[List[str]] = ["labelId", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Labels 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Labels from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labelId": obj.get("labelId"), - "name": obj.get("name") - }) - return _obj - - diff --git a/agents_api/agents_api/models/link.py b/agents_api/agents_api/models/link.py deleted file mode 100644 index 96acc497..00000000 --- a/agents_api/agents_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/notification.py b/agents_api/agents_api/models/notification.py deleted file mode 100644 index 93f71396..00000000 --- a/agents_api/agents_api/models/notification.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.alert_email import AlertEmail -from agents_api.models.alert_integration_base import AlertIntegrationBase -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Notification(BaseModel): - """ - Alert notification object. - """ # noqa: E501 - email: Optional[AlertEmail] = None - third_party: Optional[List[AlertIntegrationBase]] = Field(default=None, alias="thirdParty") - webhook: Optional[List[AlertIntegrationBase]] = None - __properties: ClassVar[List[str]] = ["email", "thirdParty", "webhook"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Notification 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of email - if self.email: - _dict['email'] = self.email.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in third_party (list) - _items = [] - if self.third_party: - for _item in self.third_party: - if _item: - _items.append(_item.to_dict()) - _dict['thirdParty'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in webhook (list) - _items = [] - if self.webhook: - for _item in self.webhook: - if _item: - _items.append(_item.to_dict()) - _dict['webhook'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Notification from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": AlertEmail.from_dict(obj.get("email")) if obj.get("email") is not None else None, - "thirdParty": [AlertIntegrationBase.from_dict(_item) for _item in obj.get("thirdParty")] if obj.get("thirdParty") is not None else None, - "webhook": [AlertIntegrationBase.from_dict(_item) for _item in obj.get("webhook")] if obj.get("webhook") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/self_links.py b/agents_api/agents_api/models/self_links.py deleted file mode 100644 index 06a305bd..00000000 --- a/agents_api/agents_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/self_links_links.py b/agents_api/agents_api/models/self_links_links.py deleted file mode 100644 index 2955aaeb..00000000 --- a/agents_api/agents_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/simple_test.py b/agents_api/agents_api/models/simple_test.py deleted file mode 100644 index 2ed013b4..00000000 --- a/agents_api/agents_api/models/simple_test.py +++ /dev/null @@ -1,134 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.test_interval import TestInterval -from agents_api.models.test_type import TestType -from agents_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SimpleTest(BaseModel): - """ - Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SimpleTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of SimpleTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/test_interval.py b/agents_api/agents_api/models/test_interval.py deleted file mode 100644 index 0449e88b..00000000 --- a/agents_api/agents_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/agents_api/agents_api/models/test_type.py b/agents_api/agents_api/models/test_type.py deleted file mode 100644 index f4a13130..00000000 --- a/agents_api/agents_api/models/test_type.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestType(str, Enum): - """ - This is a read only value, as test type is implicit in the test creation url. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - BGP = 'bgp' - HTTP_MINUS_SERVER = 'http-server' - PAGE_MINUS_LOAD = 'page-load' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - FTP_MINUS_SERVER = 'ftp-server' - DNS_MINUS_TRACE = 'dns-trace' - DNS_MINUS_SERVER = 'dns-server' - DNSSEC = 'dnssec' - SIP_MINUS_SERVER = 'sip-server' - VOICE = 'voice' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/agents_api/agents_api/models/unauthorized_error.py b/agents_api/agents_api/models/unauthorized_error.py deleted file mode 100644 index cb4762c8..00000000 --- a/agents_api/agents_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/agents_api/agents_api/models/unexpanded_instant_test.py b/agents_api/agents_api/models/unexpanded_instant_test.py deleted file mode 100644 index b63001c2..00000000 --- a/agents_api/agents_api/models/unexpanded_instant_test.py +++ /dev/null @@ -1,127 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.test_type import TestType -from agents_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTest(BaseModel): - """ - UnexpandedInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UnexpandedInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/unexpanded_instant_test_links.py b/agents_api/agents_api/models/unexpanded_instant_test_links.py deleted file mode 100644 index 5e145dfb..00000000 --- a/agents_api/agents_api/models/unexpanded_instant_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from agents_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information - """ # noqa: E501 - var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[UnexpandedInstantTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": UnexpandedInstantTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": UnexpandedInstantTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/models/unexpanded_instant_test_links_self.py b/agents_api/agents_api/models/unexpanded_instant_test_links_self.py deleted file mode 100644 index 3baf86d2..00000000 --- a/agents_api/agents_api/models/unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinksSelf(BaseModel): - """ - UnexpandedInstantTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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/agents_api/agents_api/models/unexpanded_instant_test_links_test_results.py b/agents_api/agents_api/models/unexpanded_instant_test_links_test_results.py deleted file mode 100644 index 3e73ce71..00000000 --- a/agents_api/agents_api/models/unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from agents_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -UNEXPANDEDINSTANTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class UnexpandedInstantTestLinksTestResults(BaseModel): - """ - UnexpandedInstantTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = UnexpandedInstantTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/agents_api/agents_api/models/unexpanded_test.py b/agents_api/agents_api/models/unexpanded_test.py deleted file mode 100644 index 2af9d367..00000000 --- a/agents_api/agents_api/models/unexpanded_test.py +++ /dev/null @@ -1,93 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from agents_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedTest(BaseModel): - """ - UnexpandedTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True - }) - return _obj - - diff --git a/agents_api/agents_api/models/update_enterprise_agent_details200_response.py b/agents_api/agents_api/models/update_enterprise_agent_details200_response.py deleted file mode 100644 index 5496e0b8..00000000 --- a/agents_api/agents_api/models/update_enterprise_agent_details200_response.py +++ /dev/null @@ -1,237 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.account_group import AccountGroup -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from agents_api.models.cluster_member import ClusterMember -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy -from agents_api.models.enterprise_agent_state import EnterpriseAgentState -from agents_api.models.error_detail import ErrorDetail -from agents_api.models.interface_ip_mapping import InterfaceIpMapping -from agents_api.models.labels import Labels -from agents_api.models.notification_rules import NotificationRules -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdateEnterpriseAgentDetails200Response(BaseModel): - """ - UpdateEnterpriseAgentDetails200Response - """ # 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") - 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") - tests: Optional[List[SimpleTest]] = Field(default=None, description="List of tests. See `/tests` for more information.") - notification_rules: Optional[List[NotificationRules]] = Field(default=None, description="List of notification rule objects configured on agent", alias="notificationRules") - labels: Optional[List[Labels]] = Field(default=None, description="List of labels. See `/labels` for more information.") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "agentType", "location", "countryId", "enabled", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "prefix", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings", "tests", "notificationRules", "labels", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdateEnterpriseAgentDetails200Response 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. - * OpenAPI `readOnly` fields are excluded. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - "cluster_members", - "utilization", - "prefix", - "error_details", - "hostname", - "last_seen", - "created_date", - "interface_ip_mappings", - "labels", - }, - 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 - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in notification_rules (list) - _items = [] - if self.notification_rules: - for _item in self.notification_rules: - if _item: - _items.append(_item.to_dict()) - _dict['notificationRules'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _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: Dict) -> Self: - """Create an instance of UpdateEnterpriseAgentDetails200Response 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates"), - "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj.get("clusterMembers")] if obj.get("clusterMembers") is not None else None, - "utilization": obj.get("utilization"), - "accountGroups": [AccountGroup.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None, - "prefix": obj.get("prefix"), - "ipv6Policy": obj.get("ipv6Policy"), - "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj.get("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.get("interfaceIpMappings")] if obj.get("interfaceIpMappings") is not None else None, - "tests": [SimpleTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "notificationRules": [NotificationRules.from_dict(_item) for _item in obj.get("notificationRules")] if obj.get("notificationRules") is not None else None, - "labels": [Labels.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/agents_api/agents_api/rest.py b/agents_api/agents_api/rest.py deleted file mode 100644 index e6146afd..00000000 --- a/agents_api/agents_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from agents_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/agents_api/docs/AccountGroup.md b/agents_api/docs/AccountGroup.md deleted file mode 100644 index 4c53ca8e..00000000 --- a/agents_api/docs/AccountGroup.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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 agents_api.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_form_dict = account_group.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/agents_api/docs/AccountGroupId.md b/agents_api/docs/AccountGroupId.md deleted file mode 100644 index 37c02068..00000000 --- a/agents_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from agents_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/agents_api/docs/Agent.md b/agents_api/docs/Agent.md deleted file mode 100644 index d63f60ac..00000000 --- a/agents_api/docs/Agent.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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 agents_api.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_form_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/agents_api/docs/AgentBase.md b/agents_api/docs/AgentBase.md deleted file mode 100644 index 45262d39..00000000 --- a/agents_api/docs/AgentBase.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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 agents_api.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_form_dict = agent_base.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/agents_api/docs/AgentDetail.md b/agents_api/docs/AgentDetail.md deleted file mode 100644 index 360fa285..00000000 --- a/agents_api/docs/AgentDetail.md +++ /dev/null @@ -1,39 +0,0 @@ -# AgentDetail - - -## 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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] -**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] -**labels** | [**List[Labels]**](Labels.md) | List of labels - see `/labels` for more information. | [optional] [readonly] - -## Example - -```python -from agents_api.models.agent_detail import AgentDetail - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentDetail from a JSON string -agent_detail_instance = AgentDetail.from_json(json) -# print the JSON string representation of the object -print AgentDetail.to_json() - -# convert the object into a dict -agent_detail_dict = agent_detail_instance.to_dict() -# create an instance of AgentDetail from a dict -agent_detail_form_dict = agent_detail.from_dict(agent_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/agents_api/docs/CloudEnterpriseAgentType.md b/agents_api/docs/CloudEnterpriseAgentType.md deleted file mode 100644 index 951c803e..00000000 --- a/agents_api/docs/CloudEnterpriseAgentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/agents_api/docs/ClusterMember.md b/agents_api/docs/ClusterMember.md deleted file mode 100644 index 7ba0bf05..00000000 --- a/agents_api/docs/ClusterMember.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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 agents_api.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_form_dict = cluster_member.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/agents_api/docs/EnterpriseAgent.md b/agents_api/docs/EnterpriseAgent.md deleted file mode 100644 index 78d7e874..00000000 --- a/agents_api/docs/EnterpriseAgent.md +++ /dev/null @@ -1,51 +0,0 @@ -# EnterpriseAgent - - -## 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] -**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 agents_api.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_form_dict = enterprise_agent.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/agents_api/docs/EnterpriseAgentIpv6Policy.md b/agents_api/docs/EnterpriseAgentIpv6Policy.md deleted file mode 100644 index 28e3b47f..00000000 --- a/agents_api/docs/EnterpriseAgentIpv6Policy.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/agents_api/docs/EnterpriseAgentRequestBody.md b/agents_api/docs/EnterpriseAgentRequestBody.md deleted file mode 100644 index a3279b62..00000000 --- a/agents_api/docs/EnterpriseAgentRequestBody.md +++ /dev/null @@ -1,35 +0,0 @@ -# EnterpriseAgentRequestBody - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_name** | **str** | Name of the agent. | [optional] -**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] -**account_groups** | **List[str]** | Contains a list of account groups IDs. See `/accounts-groups` for a list of account IDs | [optional] -**ipv6_policy** | [**AgentIpv6Policy**](AgentIpv6Policy.md) | | [optional] -**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional] -**target_for_tests** | **str** | Test target IP address. | [optional] -**local_resolution_prefixes** | **List[str]** | Public IP ranges for rDNS lookups. 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] -**tests** | **List[str]** | Contains list of test IDs. See `/tests` to pull a list of available tests. | [optional] - -## Example - -```python -from agents_api.models.enterprise_agent_request_body import EnterpriseAgentRequestBody - -# TODO update the JSON string below -json = "{}" -# create an instance of EnterpriseAgentRequestBody from a JSON string -enterprise_agent_request_body_instance = EnterpriseAgentRequestBody.from_json(json) -# print the JSON string representation of the object -print EnterpriseAgentRequestBody.to_json() - -# convert the object into a dict -enterprise_agent_request_body_dict = enterprise_agent_request_body_instance.to_dict() -# create an instance of EnterpriseAgentRequestBody from a dict -enterprise_agent_request_body_form_dict = enterprise_agent_request_body.from_dict(enterprise_agent_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/agents_api/docs/EnterpriseAgentState.md b/agents_api/docs/EnterpriseAgentState.md deleted file mode 100644 index a9ec4b61..00000000 --- a/agents_api/docs/EnterpriseAgentState.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/agents_api/docs/Error.md b/agents_api/docs/Error.md deleted file mode 100644 index 41bf6718..00000000 --- a/agents_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 agents_api.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_form_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/agents_api/docs/ErrorDetail.md b/agents_api/docs/ErrorDetail.md deleted file mode 100644 index f192ab56..00000000 --- a/agents_api/docs/ErrorDetail.md +++ /dev/null @@ -1,29 +0,0 @@ -# ErrorDetail - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | [**ErrorDetailCode**](ErrorDetailCode.md) | | [optional] -**description** | **str** | Description for the agent error. | [optional] [readonly] - -## Example - -```python -from agents_api.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_form_dict = error_detail.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/agents_api/docs/ErrorDetailCode.md b/agents_api/docs/ErrorDetailCode.md deleted file mode 100644 index c91277dc..00000000 --- a/agents_api/docs/ErrorDetailCode.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/agents_api/docs/GetAgentDetails200Response.md b/agents_api/docs/GetAgentDetails200Response.md deleted file mode 100644 index b797da82..00000000 --- a/agents_api/docs/GetAgentDetails200Response.md +++ /dev/null @@ -1,55 +0,0 @@ -# GetAgentDetails200Response - - -## 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] -**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] -**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] -**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional] -**labels** | [**List[Labels]**](Labels.md) | List of labels - see `/labels` for more information. | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAgentDetails200Response from a JSON string -get_agent_details200_response_instance = GetAgentDetails200Response.from_json(json) -# print the JSON string representation of the object -print GetAgentDetails200Response.to_json() - -# convert the object into a dict -get_agent_details200_response_dict = get_agent_details200_response_instance.to_dict() -# create an instance of GetAgentDetails200Response from a dict -get_agent_details200_response_form_dict = get_agent_details200_response.from_dict(get_agent_details200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/agents_api/docs/InterfaceIpMapping.md b/agents_api/docs/InterfaceIpMapping.md deleted file mode 100644 index 273ac93d..00000000 --- a/agents_api/docs/InterfaceIpMapping.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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 agents_api.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_form_dict = interface_ip_mapping.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/agents_api/docs/Labels.md b/agents_api/docs/Labels.md deleted file mode 100644 index 3245a08c..00000000 --- a/agents_api/docs/Labels.md +++ /dev/null @@ -1,29 +0,0 @@ -# Labels - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label_id** | **str** | Label Id. | [optional] -**name** | **str** | Name of the label. | [optional] - -## Example - -```python -from agents_api.models.labels import Labels - -# TODO update the JSON string below -json = "{}" -# create an instance of Labels from a JSON string -labels_instance = Labels.from_json(json) -# print the JSON string representation of the object -print Labels.to_json() - -# convert the object into a dict -labels_dict = labels_instance.to_dict() -# create an instance of Labels from a dict -labels_form_dict = labels.from_dict(labels_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/agents_api/docs/Link.md b/agents_api/docs/Link.md deleted file mode 100644 index b158dd4c..00000000 --- a/agents_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 agents_api.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_form_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/agents_api/docs/Notification.md b/agents_api/docs/Notification.md deleted file mode 100644 index 0d0fcfee..00000000 --- a/agents_api/docs/Notification.md +++ /dev/null @@ -1,31 +0,0 @@ -# Notification - -Alert notification object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | [**AlertEmail**](AlertEmail.md) | | [optional] -**third_party** | [**List[AlertIntegrationBase]**](AlertIntegrationBase.md) | | [optional] -**webhook** | [**List[AlertIntegrationBase]**](AlertIntegrationBase.md) | | [optional] - -## Example - -```python -from agents_api.models.notification import Notification - -# TODO update the JSON string below -json = "{}" -# create an instance of Notification from a JSON string -notification_instance = Notification.from_json(json) -# print the JSON string representation of the object -print Notification.to_json() - -# convert the object into a dict -notification_dict = notification_instance.to_dict() -# create an instance of Notification from a dict -notification_form_dict = notification.from_dict(notification_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/agents_api/docs/SelfLinks.md b/agents_api/docs/SelfLinks.md deleted file mode 100644 index 152ab3c6..00000000 --- a/agents_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from agents_api.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_form_dict = self_links.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/agents_api/docs/SelfLinksLinks.md b/agents_api/docs/SelfLinksLinks.md deleted file mode 100644 index e01ac6f9..00000000 --- a/agents_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from agents_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/agents_api/docs/SimpleTest.md b/agents_api/docs/SimpleTest.md deleted file mode 100644 index a7ec3f3d..00000000 --- a/agents_api/docs/SimpleTest.md +++ /dev/null @@ -1,42 +0,0 @@ -# SimpleTest - -Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from agents_api.models.simple_test import SimpleTest - -# TODO update the JSON string below -json = "{}" -# create an instance of SimpleTest from a JSON string -simple_test_instance = SimpleTest.from_json(json) -# print the JSON string representation of the object -print SimpleTest.to_json() - -# convert the object into a dict -simple_test_dict = simple_test_instance.to_dict() -# create an instance of SimpleTest from a dict -simple_test_form_dict = simple_test.from_dict(simple_test_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/agents_api/docs/TestInterval.md b/agents_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/agents_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/agents_api/docs/TestType.md b/agents_api/docs/TestType.md deleted file mode 100644 index ae5d924e..00000000 --- a/agents_api/docs/TestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestType - -This is a read only value, as test type is implicit in the test creation url. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/agents_api/docs/UnassignEnterpriseAgentFromClusterRequest.md b/agents_api/docs/UnassignEnterpriseAgentFromClusterRequest.md deleted file mode 100644 index aefde9f6..00000000 --- a/agents_api/docs/UnassignEnterpriseAgentFromClusterRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# UnassignEnterpriseAgentFromClusterRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | **List[str]** | Contains list of member IDs. (get `memberId` from `/agents/{agentId}` endpoint) | [optional] - -## Example - -```python -from agents_api.models.unassign_enterprise_agent_from_cluster_request import UnassignEnterpriseAgentFromClusterRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnassignEnterpriseAgentFromClusterRequest from a JSON string -unassign_enterprise_agent_from_cluster_request_instance = UnassignEnterpriseAgentFromClusterRequest.from_json(json) -# print the JSON string representation of the object -print UnassignEnterpriseAgentFromClusterRequest.to_json() - -# convert the object into a dict -unassign_enterprise_agent_from_cluster_request_dict = unassign_enterprise_agent_from_cluster_request_instance.to_dict() -# create an instance of UnassignEnterpriseAgentFromClusterRequest from a dict -unassign_enterprise_agent_from_cluster_request_form_dict = unassign_enterprise_agent_from_cluster_request.from_dict(unassign_enterprise_agent_from_cluster_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/agents_api/docs/UnauthorizedError.md b/agents_api/docs/UnauthorizedError.md deleted file mode 100644 index 8f5ab602..00000000 --- a/agents_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from agents_api.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_form_dict = unauthorized_error.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/agents_api/docs/UnexpandedInstantTest.md b/agents_api/docs/UnexpandedInstantTest.md deleted file mode 100644 index 42a9246d..00000000 --- a/agents_api/docs/UnexpandedInstantTest.md +++ /dev/null @@ -1,38 +0,0 @@ -# UnexpandedInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from agents_api.models.unexpanded_instant_test import UnexpandedInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTest from a JSON string -unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTest.to_json() - -# convert the object into a dict -unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() -# create an instance of UnexpandedInstantTest from a dict -unexpanded_instant_test_form_dict = unexpanded_instant_test.from_dict(unexpanded_instant_test_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/agents_api/docs/UnexpandedInstantTestLinks.md b/agents_api/docs/UnexpandedInstantTestLinks.md deleted file mode 100644 index 28511644..00000000 --- a/agents_api/docs/UnexpandedInstantTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedInstantTestLinks - -A list of links that can be accessed to get more information - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] -**test_results** | [**UnexpandedInstantTestLinksTestResults**](UnexpandedInstantTestLinksTestResults.md) | | [optional] - -## Example - -```python -from agents_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinks from a JSON string -unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinks.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() -# create an instance of UnexpandedInstantTestLinks from a dict -unexpanded_instant_test_links_form_dict = unexpanded_instant_test_links.from_dict(unexpanded_instant_test_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/agents_api/docs/UnexpandedInstantTestLinksSelf.md b/agents_api/docs/UnexpandedInstantTestLinksSelf.md deleted file mode 100644 index 0b89e058..00000000 --- a/agents_api/docs/UnexpandedInstantTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksSelf - - -## 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 agents_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksSelf from a JSON string -unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksSelf.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksSelf from a dict -unexpanded_instant_test_links_self_form_dict = unexpanded_instant_test_links_self.from_dict(unexpanded_instant_test_links_self_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/agents_api/docs/UnexpandedInstantTestLinksTestResults.md b/agents_api/docs/UnexpandedInstantTestLinksTestResults.md deleted file mode 100644 index 2d5267b8..00000000 --- a/agents_api/docs/UnexpandedInstantTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksTestResults - - -## 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 agents_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksTestResults from a JSON string -unexpanded_instant_test_links_test_results_instance = UnexpandedInstantTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksTestResults.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_test_results_dict = unexpanded_instant_test_links_test_results_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksTestResults from a dict -unexpanded_instant_test_links_test_results_form_dict = unexpanded_instant_test_links_test_results.from_dict(unexpanded_instant_test_links_test_results_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/agents_api/docs/UnexpandedTest.md b/agents_api/docs/UnexpandedTest.md deleted file mode 100644 index e2c7bbef..00000000 --- a/agents_api/docs/UnexpandedTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] - -## Example - -```python -from agents_api.models.unexpanded_test import UnexpandedTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedTest from a JSON string -unexpanded_test_instance = UnexpandedTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedTest.to_json() - -# convert the object into a dict -unexpanded_test_dict = unexpanded_test_instance.to_dict() -# create an instance of UnexpandedTest from a dict -unexpanded_test_form_dict = unexpanded_test.from_dict(unexpanded_test_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/agents_api/docs/UpdateEnterpriseAgentDetails200Response.md b/agents_api/docs/UpdateEnterpriseAgentDetails200Response.md deleted file mode 100644 index 1c6a0bf0..00000000 --- a/agents_api/docs/UpdateEnterpriseAgentDetails200Response.md +++ /dev/null @@ -1,55 +0,0 @@ -# UpdateEnterpriseAgentDetails200Response - - -## 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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] -**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] -**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] -**tests** | [**List[SimpleTest]**](SimpleTest.md) | List of tests. See `/tests` for more information. | [optional] -**notification_rules** | [**List[NotificationRules]**](NotificationRules.md) | List of notification rule objects configured on agent | [optional] -**labels** | [**List[Labels]**](Labels.md) | List of labels. See `/labels` for more information. | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from agents_api.models.update_enterprise_agent_details200_response import UpdateEnterpriseAgentDetails200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateEnterpriseAgentDetails200Response from a JSON string -update_enterprise_agent_details200_response_instance = UpdateEnterpriseAgentDetails200Response.from_json(json) -# print the JSON string representation of the object -print UpdateEnterpriseAgentDetails200Response.to_json() - -# convert the object into a dict -update_enterprise_agent_details200_response_dict = update_enterprise_agent_details200_response_instance.to_dict() -# create an instance of UpdateEnterpriseAgentDetails200Response from a dict -update_enterprise_agent_details200_response_form_dict = update_enterprise_agent_details200_response.from_dict(update_enterprise_agent_details200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/agents_api/git_push.sh b/agents_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/agents_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/agents_api/pyproject.toml b/agents_api/pyproject.toml deleted file mode 100644 index 2d11580a..00000000 --- a/agents_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "agents_api" -version = "1.0.0" -description = "Agents API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Agents API"] -include = ["agents_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/agents_api/setup.py b/agents_api/setup.py deleted file mode 100644 index 286bb6cb..00000000 --- a/agents_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "agents-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Agents API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Agents API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - """, # noqa: E501 - package_data={"agents_api": ["py.typed"]}, -) diff --git a/agents_api/test-requirements.txt b/agents_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/agents_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/agents_api/test/test_account_group.py b/agents_api/test/test_account_group.py deleted file mode 100644 index 42fd167a..00000000 --- a/agents_api/test/test_account_group.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.account_group import AccountGroup - -class TestAccountGroup(unittest.TestCase): - """AccountGroup unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroup: - """Test AccountGroup - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroup` - """ - model = AccountGroup() - if include_optional: - return AccountGroup( - aid = '11', - account_group_name = 'Account A' - ) - else: - return AccountGroup( - ) - """ - - def testAccountGroup(self): - """Test AccountGroup""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_account_group_id.py b/agents_api/test/test_account_group_id.py deleted file mode 100644 index dc3dde3b..00000000 --- a/agents_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_agent.py b/agents_api/test/test_agent.py deleted file mode 100644 index 6c88aa70..00000000 --- a/agents_api/test/test_agent.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.agent import Agent - -class TestAgent(unittest.TestCase): - """Agent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Agent: - """Test Agent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Agent` - """ - model = Agent() - if include_optional: - return Agent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True - ) - else: - return Agent( - ) - """ - - def testAgent(self): - """Test Agent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_agent_base.py b/agents_api/test/test_agent_base.py deleted file mode 100644 index fd27a843..00000000 --- a/agents_api/test/test_agent_base.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.agent_base import AgentBase - -class TestAgentBase(unittest.TestCase): - """AgentBase unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentBase: - """Test AgentBase - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentBase` - """ - model = AgentBase() - if include_optional: - return AgentBase( - ip_addresses = ["99.139.65.220","99.139.65.221"], - public_ip_addresses = ["192.168.1.78","192.168.1.79"], - network = 'AT&T Services, Inc. (AS 7018)' - ) - else: - return AgentBase( - ) - """ - - def testAgentBase(self): - """Test AgentBase""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_agent_detail.py b/agents_api/test/test_agent_detail.py deleted file mode 100644 index f7e272ba..00000000 --- a/agents_api/test/test_agent_detail.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.agent_detail import AgentDetail - -class TestAgentDetail(unittest.TestCase): - """AgentDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentDetail: - """Test AgentDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentDetail` - """ - model = AgentDetail() - if include_optional: - return AgentDetail( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - tests = [ - null - ], - labels = [ - agents_api.models.labels.Labels( - label_id = '11', - name = 'Label name', ) - ] - ) - else: - return AgentDetail( - ) - """ - - def testAgentDetail(self): - """Test AgentDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_agent_details.py b/agents_api/test/test_agent_details.py deleted file mode 100644 index b4164023..00000000 --- a/agents_api/test/test_agent_details.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.agent_details import AgentDetails - -class TestAgentDetails(unittest.TestCase): - """AgentDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentDetails: - """Test AgentDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentDetails` - """ - model = AgentDetails() - if include_optional: - return AgentDetails( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - cluster_members = [ - null - ], - utilization = 25, - account_groups = [ - agents_api.models.account_group.AccountGroup() - ], - prefix = '99.128.0.0/11', - ipv6_policy = 'force-ipv4', - error_details = [ - agents_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - hostname = 'thousandeyes.com', - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - keep_browser_cache = True, - created_date = '2022-07-17T22:00:54Z', - target_for_tests = '1.1.1.1', - local_resolution_prefixes = [ - '10.2.3.3/24' - ], - interface_ip_mappings = [ - agents_api.models.interface_ip_mapping.InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) - ], - tests = [ - null - ], - notification_rules = [ - agents_api.models.notification_rules.NotificationRules( - agent_alert_rules = [{"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}], ) - ], - labels = [ - agents_api.models.labels.Labels( - label_id = '11', - name = 'Label name', ) - ] - ) - else: - return AgentDetails( - ) - """ - - def testAgentDetails(self): - """Test AgentDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_cloud_and_enterprise_agent_notification_rules_api.py b/agents_api/test/test_cloud_and_enterprise_agent_notification_rules_api.py deleted file mode 100644 index 3260cfd9..00000000 --- a/agents_api/test/test_cloud_and_enterprise_agent_notification_rules_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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(self) -> None: - """Test case for get_agents_notification_rule - - Retrieve agent notification rule - """ - pass - - def test_get_agents_notification_rules(self) -> None: - """Test case for get_agents_notification_rules - - List agent notification rules - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_cloud_and_enterprise_agents_api.py b/agents_api/test/test_cloud_and_enterprise_agents_api.py deleted file mode 100644 index 15ea98cc..00000000 --- a/agents_api/test/test_cloud_and_enterprise_agents_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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_enterprise_agent(self) -> None: - """Test case for delete_enterprise_agent - - Delete Enterprise Agent - """ - pass - - def test_get_agent_details(self) -> None: - """Test case for get_agent_details - - Retrieve Cloud and Enterprise Agent - """ - pass - - def test_get_agents(self) -> None: - """Test case for get_agents - - List Cloud and Enterprise Agents - """ - pass - - def test_update_enterprise_agent_details(self) -> None: - """Test case for update_enterprise_agent_details - - Update Enterprise Agent - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_cloud_enterprise_agent_type.py b/agents_api/test/test_cloud_enterprise_agent_type.py deleted file mode 100644 index 80e23faf..00000000 --- a/agents_api/test/test_cloud_enterprise_agent_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType - -class TestCloudEnterpriseAgentType(unittest.TestCase): - """CloudEnterpriseAgentType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCloudEnterpriseAgentType(self): - """Test CloudEnterpriseAgentType""" - # inst = CloudEnterpriseAgentType() - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_cluster_member.py b/agents_api/test/test_cluster_member.py deleted file mode 100644 index 319779fb..00000000 --- a/agents_api/test/test_cluster_member.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.cluster_member import ClusterMember - -class TestClusterMember(unittest.TestCase): - """ClusterMember unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClusterMember: - """Test ClusterMember - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClusterMember` - """ - model = ClusterMember() - if include_optional: - return ClusterMember( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - member_id = '10', - name = 'Cluster member name', - error_details = [ - agents_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - target_for_tests = '1.1.1.1', - utilization = 25 - ) - else: - return ClusterMember( - ) - """ - - def testClusterMember(self): - """Test ClusterMember""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_enterprise_agent.py b/agents_api/test/test_enterprise_agent.py deleted file mode 100644 index 6f673d24..00000000 --- a/agents_api/test/test_enterprise_agent.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.enterprise_agent import EnterpriseAgent - -class TestEnterpriseAgent(unittest.TestCase): - """EnterpriseAgent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgent: - """Test EnterpriseAgent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgent` - """ - model = EnterpriseAgent() - if include_optional: - return EnterpriseAgent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - cluster_members = [ - null - ], - utilization = 25, - account_groups = [ - agents_api.models.account_group.AccountGroup() - ], - prefix = '99.128.0.0/11', - ipv6_policy = 'force-ipv4', - error_details = [ - agents_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - hostname = 'thousandeyes.com', - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - keep_browser_cache = True, - created_date = '2022-07-17T22:00:54Z', - target_for_tests = '1.1.1.1', - local_resolution_prefixes = [ - '10.2.3.3/24' - ], - interface_ip_mappings = [ - agents_api.models.interface_ip_mapping.InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) - ] - ) - else: - return EnterpriseAgent( - ) - """ - - def testEnterpriseAgent(self): - """Test EnterpriseAgent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_enterprise_agent_cluster_api.py b/agents_api/test/test_enterprise_agent_cluster_api.py deleted file mode 100644 index 8644ffa7..00000000 --- a/agents_api/test/test_enterprise_agent_cluster_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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_enterprise_agent_cluster(self) -> None: - """Test case for assign_enterprise_agent_cluster - - Add member to Enterprise Agent cluster - """ - pass - - def test_unassign_enterprise_agent_from_cluster(self) -> None: - """Test case for unassign_enterprise_agent_from_cluster - - Remove member from Enterprise Agent cluster - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_enterprise_agent_detail.py b/agents_api/test/test_enterprise_agent_detail.py deleted file mode 100644 index 1b756918..00000000 --- a/agents_api/test/test_enterprise_agent_detail.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.enterprise_agent_detail import EnterpriseAgentDetail - -class TestEnterpriseAgentDetail(unittest.TestCase): - """EnterpriseAgentDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgentDetail: - """Test EnterpriseAgentDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgentDetail` - """ - model = EnterpriseAgentDetail() - if include_optional: - return EnterpriseAgentDetail( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - cluster_members = [ - null - ], - utilization = 25, - account_groups = [ - agents_api.models.account_group.AccountGroup() - ], - prefix = '99.128.0.0/11', - ipv6_policy = 'force-ipv4', - error_details = [ - agents_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - hostname = 'thousandeyes.com', - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - keep_browser_cache = True, - created_date = '2022-07-17T22:00:54Z', - target_for_tests = '1.1.1.1', - local_resolution_prefixes = [ - '10.2.3.3/24' - ], - interface_ip_mappings = [ - agents_api.models.interface_ip_mapping.InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) - ], - tests = [ - null - ], - notification_rules = [ - agents_api.models.notification_rules.NotificationRules( - agent_alert_rules = [{"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}], ) - ], - labels = [ - agents_api.models.labels.Labels( - label_id = '11', - name = 'Label name', ) - ] - ) - else: - return EnterpriseAgentDetail( - ) - """ - - def testEnterpriseAgentDetail(self): - """Test EnterpriseAgentDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_enterprise_agent_ipv6_policy.py b/agents_api/test/test_enterprise_agent_ipv6_policy.py deleted file mode 100644 index 471b9145..00000000 --- a/agents_api/test/test_enterprise_agent_ipv6_policy.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy - -class TestEnterpriseAgentIpv6Policy(unittest.TestCase): - """EnterpriseAgentIpv6Policy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnterpriseAgentIpv6Policy(self): - """Test EnterpriseAgentIpv6Policy""" - # inst = EnterpriseAgentIpv6Policy() - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_enterprise_agent_request_body.py b/agents_api/test/test_enterprise_agent_request_body.py deleted file mode 100644 index 19c64298..00000000 --- a/agents_api/test/test_enterprise_agent_request_body.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.enterprise_agent_request_body import EnterpriseAgentRequestBody - -class TestEnterpriseAgentRequestBody(unittest.TestCase): - """EnterpriseAgentRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgentRequestBody: - """Test EnterpriseAgentRequestBody - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgentRequestBody` - """ - model = EnterpriseAgentRequestBody() - if include_optional: - return EnterpriseAgentRequestBody( - agent_name = 'thousandeyes-stg-va-254', - enabled = True, - account_groups = ["1234","1"], - ipv6_policy = 'force-ipv4', - keep_browser_cache = True, - target_for_tests = '1.1.1.1', - local_resolution_prefixes = ["10.2.3.3/24","10.2.3.3/25"], - tests = ["12313145","12345"] - ) - else: - return EnterpriseAgentRequestBody( - ) - """ - - def testEnterpriseAgentRequestBody(self): - """Test EnterpriseAgentRequestBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_enterprise_agent_state.py b/agents_api/test/test_enterprise_agent_state.py deleted file mode 100644 index 41becb46..00000000 --- a/agents_api/test/test_enterprise_agent_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.enterprise_agent_state import EnterpriseAgentState - -class TestEnterpriseAgentState(unittest.TestCase): - """EnterpriseAgentState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnterpriseAgentState(self): - """Test EnterpriseAgentState""" - # inst = EnterpriseAgentState() - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_error.py b/agents_api/test/test_error.py deleted file mode 100644 index e64fc6ce..00000000 --- a/agents_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_error_detail.py b/agents_api/test/test_error_detail.py deleted file mode 100644 index 3a734e28..00000000 --- a/agents_api/test/test_error_detail.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.error_detail import ErrorDetail - -class TestErrorDetail(unittest.TestCase): - """ErrorDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorDetail: - """Test ErrorDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ErrorDetail` - """ - model = ErrorDetail() - if include_optional: - return ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)' - ) - else: - return ErrorDetail( - ) - """ - - def testErrorDetail(self): - """Test ErrorDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_error_detail_code.py b/agents_api/test/test_error_detail_code.py deleted file mode 100644 index bd215df3..00000000 --- a/agents_api/test/test_error_detail_code.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.error_detail_code import ErrorDetailCode - -class TestErrorDetailCode(unittest.TestCase): - """ErrorDetailCode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testErrorDetailCode(self): - """Test ErrorDetailCode""" - # inst = ErrorDetailCode() - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_get_agent_details200_response.py b/agents_api/test/test_get_agent_details200_response.py deleted file mode 100644 index f765b7f0..00000000 --- a/agents_api/test/test_get_agent_details200_response.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.get_agent_details200_response import GetAgentDetails200Response - -class TestGetAgentDetails200Response(unittest.TestCase): - """GetAgentDetails200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAgentDetails200Response: - """Test GetAgentDetails200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAgentDetails200Response` - """ - model = GetAgentDetails200Response() - if include_optional: - return GetAgentDetails200Response( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - cluster_members = [ - null - ], - utilization = 25, - account_groups = [ - agents_api.models.account_group.AccountGroup() - ], - prefix = '99.128.0.0/11', - ipv6_policy = 'force-ipv4', - error_details = [ - agents_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - hostname = 'thousandeyes.com', - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - keep_browser_cache = True, - created_date = '2022-07-17T22:00:54Z', - target_for_tests = '1.1.1.1', - local_resolution_prefixes = [ - '10.2.3.3/24' - ], - interface_ip_mappings = [ - agents_api.models.interface_ip_mapping.InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) - ], - tests = [ - null - ], - notification_rules = [ - agents_api.models.notification_rules.NotificationRules( - agent_alert_rules = [{"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}], ) - ], - labels = [ - agents_api.models.labels.Labels( - label_id = '11', - name = 'Label name', ) - ], - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetAgentDetails200Response( - ) - """ - - def testGetAgentDetails200Response(self): - """Test GetAgentDetails200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_interface_ip_mapping.py b/agents_api/test/test_interface_ip_mapping.py deleted file mode 100644 index caaee9d7..00000000 --- a/agents_api/test/test_interface_ip_mapping.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.interface_ip_mapping import InterfaceIpMapping - -class TestInterfaceIpMapping(unittest.TestCase): - """InterfaceIpMapping unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InterfaceIpMapping: - """Test InterfaceIpMapping - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InterfaceIpMapping` - """ - model = InterfaceIpMapping() - if include_optional: - return InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"] - ) - else: - return InterfaceIpMapping( - ) - """ - - def testInterfaceIpMapping(self): - """Test InterfaceIpMapping""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_labels.py b/agents_api/test/test_labels.py deleted file mode 100644 index 3079c90d..00000000 --- a/agents_api/test/test_labels.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.labels import Labels - -class TestLabels(unittest.TestCase): - """Labels unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Labels: - """Test Labels - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Labels` - """ - model = Labels() - if include_optional: - return Labels( - label_id = '11', - name = 'Label name' - ) - else: - return Labels( - ) - """ - - def testLabels(self): - """Test Labels""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_link.py b/agents_api/test/test_link.py deleted file mode 100644 index 6fb41455..00000000 --- a/agents_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_notification.py b/agents_api/test/test_notification.py deleted file mode 100644 index bd9ff7e5..00000000 --- a/agents_api/test/test_notification.py +++ /dev/null @@ -1,76 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.notification import Notification - -class TestNotification(unittest.TestCase): - """Notification unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Notification: - """Test Notification - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Notification` - """ - model = Notification() - if include_optional: - return Notification( - email = agents_api.models.alert_email.AlertEmail( - message = 'This test is failing, check as soon as possible.', - recipients = ["user1@thousandeyes.com","user2@cisco.com"], ), - third_party = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( - integration_id = 'wb-78', - integration_name = 'integrationSlack1', - integration_type = 'slack', - target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', - auth_method = 'Basic', - auth_user = 'user123', - auth_token = '0VqDYEpidpHVAK397x8PBsmZ', - channel = '#slackChannel', ) - ], - webhook = [ - agents_api.models.alert_integration_base.AlertIntegrationBase( - integration_id = 'wb-78', - integration_name = 'integrationSlack1', - integration_type = 'slack', - target = 'https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ', - auth_method = 'Basic', - auth_user = 'user123', - auth_token = '0VqDYEpidpHVAK397x8PBsmZ', - channel = '#slackChannel', ) - ] - ) - else: - return Notification( - ) - """ - - def testNotification(self): - """Test Notification""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_proxies_api.py b/agents_api/test/test_proxies_api.py deleted file mode 100644 index e9df1189..00000000 --- a/agents_api/test/test_proxies_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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_agent_proxies(self) -> None: - """Test case for get_agent_proxies - - List agent proxies - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_self_links.py b/agents_api/test/test_self_links.py deleted file mode 100644 index 774ce1a4..00000000 --- a/agents_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_self_links_links.py b/agents_api/test/test_self_links_links.py deleted file mode 100644 index 9f292d80..00000000 --- a/agents_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_simple_test.py b/agents_api/test/test_simple_test.py deleted file mode 100644 index 877a0130..00000000 --- a/agents_api/test/test_simple_test.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.simple_test import SimpleTest - -class TestSimpleTest(unittest.TestCase): - """SimpleTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SimpleTest: - """Test SimpleTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SimpleTest` - """ - model = SimpleTest() - if include_optional: - return SimpleTest( - interval = 120, - alerts_enabled = True, - enabled = True, - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = agents_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return SimpleTest( - ) - """ - - def testSimpleTest(self): - """Test SimpleTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_test_interval.py b/agents_api/test/test_test_interval.py deleted file mode 100644 index 64fb49eb..00000000 --- a/agents_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_test_type.py b/agents_api/test/test_test_type.py deleted file mode 100644 index 205cd405..00000000 --- a/agents_api/test/test_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.test_type import TestType - -class TestTestType(unittest.TestCase): - """TestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestType(self): - """Test TestType""" - # inst = TestType() - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_unauthorized_error.py b/agents_api/test/test_unauthorized_error.py deleted file mode 100644 index aa5bcb3f..00000000 --- a/agents_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_unexpanded_instant_test.py b/agents_api/test/test_unexpanded_instant_test.py deleted file mode 100644 index 6046d12c..00000000 --- a/agents_api/test/test_unexpanded_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unexpanded_instant_test import UnexpandedInstantTest - -class TestUnexpandedInstantTest(unittest.TestCase): - """UnexpandedInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTest: - """Test UnexpandedInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTest` - """ - model = UnexpandedInstantTest() - if include_optional: - return UnexpandedInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = agents_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return UnexpandedInstantTest( - ) - """ - - def testUnexpandedInstantTest(self): - """Test UnexpandedInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_unexpanded_instant_test_links.py b/agents_api/test/test_unexpanded_instant_test_links.py deleted file mode 100644 index 1c9a393e..00000000 --- a/agents_api/test/test_unexpanded_instant_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -class TestUnexpandedInstantTestLinks(unittest.TestCase): - """UnexpandedInstantTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: - """Test UnexpandedInstantTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinks` - """ - model = UnexpandedInstantTestLinks() - if include_optional: - return UnexpandedInstantTestLinks( - var_self = None, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}] - ) - else: - return UnexpandedInstantTestLinks( - ) - """ - - def testUnexpandedInstantTestLinks(self): - """Test UnexpandedInstantTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_unexpanded_instant_test_links_self.py b/agents_api/test/test_unexpanded_instant_test_links_self.py deleted file mode 100644 index 90dd56b1..00000000 --- a/agents_api/test/test_unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): - """UnexpandedInstantTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: - """Test UnexpandedInstantTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` - """ - model = UnexpandedInstantTestLinksSelf() - if include_optional: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksSelf(self): - """Test UnexpandedInstantTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_unexpanded_instant_test_links_test_results.py b/agents_api/test/test_unexpanded_instant_test_links_test_results.py deleted file mode 100644 index f9446982..00000000 --- a/agents_api/test/test_unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -class TestUnexpandedInstantTestLinksTestResults(unittest.TestCase): - """UnexpandedInstantTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksTestResults: - """Test UnexpandedInstantTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksTestResults` - """ - model = UnexpandedInstantTestLinksTestResults() - if include_optional: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksTestResults(self): - """Test UnexpandedInstantTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_unexpanded_test.py b/agents_api/test/test_unexpanded_test.py deleted file mode 100644 index 747ec0d9..00000000 --- a/agents_api/test/test_unexpanded_test.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unexpanded_test import UnexpandedTest - -class TestUnexpandedTest(unittest.TestCase): - """UnexpandedTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedTest: - """Test UnexpandedTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedTest` - """ - model = UnexpandedTest() - if include_optional: - return UnexpandedTest( - interval = 120, - alerts_enabled = True, - enabled = True - ) - else: - return UnexpandedTest( - ) - """ - - def testUnexpandedTest(self): - """Test UnexpandedTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/test/test_update_enterprise_agent_details200_response.py b/agents_api/test/test_update_enterprise_agent_details200_response.py deleted file mode 100644 index a6e04ce3..00000000 --- a/agents_api/test/test_update_enterprise_agent_details200_response.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.update_enterprise_agent_details200_response import UpdateEnterpriseAgentDetails200Response - -class TestUpdateEnterpriseAgentDetails200Response(unittest.TestCase): - """UpdateEnterpriseAgentDetails200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateEnterpriseAgentDetails200Response: - """Test UpdateEnterpriseAgentDetails200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateEnterpriseAgentDetails200Response` - """ - model = UpdateEnterpriseAgentDetails200Response() - if include_optional: - return UpdateEnterpriseAgentDetails200Response( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True, - cluster_members = [ - null - ], - utilization = 25, - account_groups = [ - agents_api.models.account_group.AccountGroup() - ], - prefix = '99.128.0.0/11', - ipv6_policy = 'force-ipv4', - error_details = [ - agents_api.models.error_detail.ErrorDetail( - code = 'agent-version-outdated', - description = 'Agent Version 0.1.1 (latest: 1.0.0)', ) - ], - hostname = 'thousandeyes.com', - last_seen = '2022-07-17T22:00:54Z', - agent_state = 'online', - keep_browser_cache = True, - created_date = '2022-07-17T22:00:54Z', - target_for_tests = '1.1.1.1', - local_resolution_prefixes = [ - '10.2.3.3/24' - ], - interface_ip_mappings = [ - agents_api.models.interface_ip_mapping.InterfaceIpMapping( - interface_name = 'wlp4s0', - ip_addresses = ["73.252.207.219","2601:646:300:3ae0::b977"], ) - ], - tests = [ - null - ], - notification_rules = [ - agents_api.models.notification_rules.NotificationRules( - agent_alert_rules = [{"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}], ) - ], - labels = [ - agents_api.models.labels.Labels( - label_id = '11', - name = 'Label name', ) - ], - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return UpdateEnterpriseAgentDetails200Response( - ) - """ - - def testUpdateEnterpriseAgentDetails200Response(self): - """Test UpdateEnterpriseAgentDetails200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/agents_api/tox.ini b/agents_api/tox.ini deleted file mode 100644 index 5d4caa48..00000000 --- a/agents_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=agents_api diff --git a/alerts_api/.gitignore b/alerts/.gitignore similarity index 100% rename from alerts_api/.gitignore rename to alerts/.gitignore diff --git a/alerts_api/.openapi-generator-ignore b/alerts/.openapi-generator-ignore similarity index 100% rename from alerts_api/.openapi-generator-ignore rename to alerts/.openapi-generator-ignore diff --git a/alerts/.openapi-generator/FILES b/alerts/.openapi-generator/FILES new file mode 100644 index 00000000..d83ec986 --- /dev/null +++ b/alerts/.openapi-generator/FILES @@ -0,0 +1,201 @@ +.gitignore +.openapi-generator-ignore +README.md +alerts/__init__.py +alerts/api/__init__.py +alerts/api/alert_rules_api.py +alerts/api/alert_suppression_windows_api.py +alerts/api/alerts_api.py +alerts/api_client.py +alerts/api_response.py +alerts/configuration.py +alerts/exceptions.py +alerts/models/__init__.py +alerts/models/alert.py +alerts/models/alert_detail.py +alerts/models/alert_direction.py +alerts/models/alert_links.py +alerts/models/alert_links_links.py +alerts/models/alert_metric_detail.py +alerts/models/alert_metric_detail_end.py +alerts/models/alert_metric_detail_start.py +alerts/models/alert_metrics.py +alerts/models/alert_rounds_violation_mode.py +alerts/models/alert_rule.py +alerts/models/alert_suppression_window.py +alerts/models/alert_suppression_window_request.py +alerts/models/alert_suppression_window_state.py +alerts/models/alert_suppression_windows.py +alerts/models/alert_suppression_windows_alert_suppression_windows_inner.py +alerts/models/alert_type.py +alerts/models/alerts.py +alerts/models/base_alert.py +alerts/models/base_alert_all_of_meta.py +alerts/models/base_test.py +alerts/models/complete_alert_suppression_window.py +alerts/models/create_alert_rule201_response.py +alerts/models/create_suppression_windows201_response.py +alerts/models/days_of_week.py +alerts/models/end_repeat.py +alerts/models/end_repeat_type.py +alerts/models/error.py +alerts/models/expand.py +alerts/models/get_alert_rule_details200_response.py +alerts/models/get_alerts200_response.py +alerts/models/get_alerts_rules200_response.py +alerts/models/get_suppression_windows200_response.py +alerts/models/interval_type.py +alerts/models/legacy_alert.py +alerts/models/link.py +alerts/models/notification.py +alerts/models/notification_email.py +alerts/models/notification_third_party.py +alerts/models/notification_webhook.py +alerts/models/pagination_links.py +alerts/models/pagination_links_links.py +alerts/models/repeat.py +alerts/models/repeat_type.py +alerts/models/rule.py +alerts/models/rule_detail.py +alerts/models/rule_detail_update.py +alerts/models/rules.py +alerts/models/self_links.py +alerts/models/self_links_links.py +alerts/models/severity.py +alerts/models/state.py +alerts/models/test_interval.py +alerts/models/third_party_integration_type.py +alerts/models/unauthorized_error.py +alerts/models/unexpanded_test.py +alerts/models/validation_error.py +alerts/models/validation_error_all_of_errors.py +alerts/models/webhook_integration_type.py +alerts/py.typed +alerts/rest.py +docs/Alert.md +docs/AlertDetail.md +docs/AlertDirection.md +docs/AlertLinks.md +docs/AlertLinksLinks.md +docs/AlertMetricDetail.md +docs/AlertMetricDetailEnd.md +docs/AlertMetricDetailStart.md +docs/AlertMetrics.md +docs/AlertRoundsViolationMode.md +docs/AlertRule.md +docs/AlertRulesApi.md +docs/AlertSuppressionWindow.md +docs/AlertSuppressionWindowRequest.md +docs/AlertSuppressionWindowState.md +docs/AlertSuppressionWindows.md +docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md +docs/AlertSuppressionWindowsApi.md +docs/AlertType.md +docs/Alerts.md +docs/AlertsApi.md +docs/BaseAlert.md +docs/BaseAlertAllOfMeta.md +docs/BaseTest.md +docs/CompleteAlertSuppressionWindow.md +docs/CreateAlertRule201Response.md +docs/CreateSuppressionWindows201Response.md +docs/DaysOfWeek.md +docs/EndRepeat.md +docs/EndRepeatType.md +docs/Error.md +docs/Expand.md +docs/GetAlertRuleDetails200Response.md +docs/GetAlerts200Response.md +docs/GetAlertsRules200Response.md +docs/GetSuppressionWindows200Response.md +docs/IntervalType.md +docs/LegacyAlert.md +docs/Link.md +docs/Notification.md +docs/NotificationEmail.md +docs/NotificationThirdParty.md +docs/NotificationWebhook.md +docs/PaginationLinks.md +docs/PaginationLinksLinks.md +docs/Repeat.md +docs/RepeatType.md +docs/Rule.md +docs/RuleDetail.md +docs/RuleDetailUpdate.md +docs/Rules.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/Severity.md +docs/State.md +docs/TestInterval.md +docs/ThirdPartyIntegrationType.md +docs/UnauthorizedError.md +docs/UnexpandedTest.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/WebhookIntegrationType.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +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_links_links.py +test/test_alert_metric_detail.py +test/test_alert_metric_detail_end.py +test/test_alert_metric_detail_start.py +test/test_alert_metrics.py +test/test_alert_rounds_violation_mode.py +test/test_alert_rule.py +test/test_alert_suppression_window.py +test/test_alert_suppression_window_request.py +test/test_alert_suppression_window_state.py +test/test_alert_suppression_windows.py +test/test_alert_suppression_windows_alert_suppression_windows_inner.py +test/test_alert_type.py +test/test_alerts.py +test/test_base_alert.py +test/test_base_alert_all_of_meta.py +test/test_base_test.py +test/test_complete_alert_suppression_window.py +test/test_create_alert_rule201_response.py +test/test_create_suppression_windows201_response.py +test/test_days_of_week.py +test/test_end_repeat.py +test/test_end_repeat_type.py +test/test_error.py +test/test_expand.py +test/test_get_alert_rule_details200_response.py +test/test_get_alerts200_response.py +test/test_get_alerts_rules200_response.py +test/test_get_suppression_windows200_response.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_pagination_links_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_self_links_links.py +test/test_severity.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_all_of_errors.py +test/test_webhook_integration_type.py diff --git a/alerts/.openapi-generator/VERSION b/alerts/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/alerts/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/alerts/README.md b/alerts/README.md new file mode 100644 index 00000000..4b55001b --- /dev/null +++ b/alerts/README.md @@ -0,0 +1,199 @@ +# alerts +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). + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import alerts +``` + +### 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 alerts +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import alerts +from alerts.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 = alerts.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 = alerts.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with alerts.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = alerts.AlertRulesApi(api_client) + rule_detail_update = alerts.RuleDetailUpdate() # RuleDetailUpdate | + 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 alert rule + api_response = api_instance.create_alert_rule(rule_detail_update, aid=aid) + print("The response of AlertRulesApi->create_alert_rule:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AlertRulesApi->create_alert_rule: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +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_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 +*AlertsApi* | [**get_alerts**](docs/AlertsApi.md#get_alerts) | **GET** /v7/alerts | List active alerts + + +## Documentation For Models + + - [Alert](docs/Alert.md) + - [AlertDetail](docs/AlertDetail.md) + - [AlertDirection](docs/AlertDirection.md) + - [AlertLinks](docs/AlertLinks.md) + - [AlertLinksLinks](docs/AlertLinksLinks.md) + - [AlertMetricDetail](docs/AlertMetricDetail.md) + - [AlertMetricDetailEnd](docs/AlertMetricDetailEnd.md) + - [AlertMetricDetailStart](docs/AlertMetricDetailStart.md) + - [AlertMetrics](docs/AlertMetrics.md) + - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) + - [AlertRule](docs/AlertRule.md) + - [AlertSuppressionWindow](docs/AlertSuppressionWindow.md) + - [AlertSuppressionWindowRequest](docs/AlertSuppressionWindowRequest.md) + - [AlertSuppressionWindowState](docs/AlertSuppressionWindowState.md) + - [AlertSuppressionWindows](docs/AlertSuppressionWindows.md) + - [AlertSuppressionWindowsAlertSuppressionWindowsInner](docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md) + - [AlertType](docs/AlertType.md) + - [Alerts](docs/Alerts.md) + - [BaseAlert](docs/BaseAlert.md) + - [BaseAlertAllOfMeta](docs/BaseAlertAllOfMeta.md) + - [BaseTest](docs/BaseTest.md) + - [CompleteAlertSuppressionWindow](docs/CompleteAlertSuppressionWindow.md) + - [CreateAlertRule201Response](docs/CreateAlertRule201Response.md) + - [CreateSuppressionWindows201Response](docs/CreateSuppressionWindows201Response.md) + - [DaysOfWeek](docs/DaysOfWeek.md) + - [EndRepeat](docs/EndRepeat.md) + - [EndRepeatType](docs/EndRepeatType.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [GetAlertRuleDetails200Response](docs/GetAlertRuleDetails200Response.md) + - [GetAlerts200Response](docs/GetAlerts200Response.md) + - [GetAlertsRules200Response](docs/GetAlertsRules200Response.md) + - [GetSuppressionWindows200Response](docs/GetSuppressionWindows200Response.md) + - [IntervalType](docs/IntervalType.md) + - [LegacyAlert](docs/LegacyAlert.md) + - [Link](docs/Link.md) + - [Notification](docs/Notification.md) + - [NotificationEmail](docs/NotificationEmail.md) + - [NotificationThirdParty](docs/NotificationThirdParty.md) + - [NotificationWebhook](docs/NotificationWebhook.md) + - [PaginationLinks](docs/PaginationLinks.md) + - [PaginationLinksLinks](docs/PaginationLinksLinks.md) + - [Repeat](docs/Repeat.md) + - [RepeatType](docs/RepeatType.md) + - [Rule](docs/Rule.md) + - [RuleDetail](docs/RuleDetail.md) + - [RuleDetailUpdate](docs/RuleDetailUpdate.md) + - [Rules](docs/Rules.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [Severity](docs/Severity.md) + - [State](docs/State.md) + - [TestInterval](docs/TestInterval.md) + - [ThirdPartyIntegrationType](docs/ThirdPartyIntegrationType.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UnexpandedTest](docs/UnexpandedTest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [WebhookIntegrationType](docs/WebhookIntegrationType.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/alerts/alerts/__init__.py b/alerts/alerts/__init__.py new file mode 100644 index 00000000..b1a2cee5 --- /dev/null +++ b/alerts/alerts/__init__.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 alerts.api.alert_rules_api import AlertRulesApi +from alerts.api.alert_suppression_windows_api import AlertSuppressionWindowsApi +from alerts.api.alerts_api import AlertsApi + +# import ApiClient +from alerts.api_response import ApiResponse +from alerts.api_client import ApiClient +from alerts.configuration import Configuration +from alerts.exceptions import OpenApiException +from alerts.exceptions import ApiTypeError +from alerts.exceptions import ApiValueError +from alerts.exceptions import ApiKeyError +from alerts.exceptions import ApiAttributeError +from alerts.exceptions import ApiException + +# import models into sdk package +from alerts.models.alert import Alert +from alerts.models.alert_detail import AlertDetail +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_links import AlertLinks +from alerts.models.alert_links_links import AlertLinksLinks +from alerts.models.alert_metric_detail import AlertMetricDetail +from alerts.models.alert_metric_detail_end import AlertMetricDetailEnd +from alerts.models.alert_metric_detail_start import AlertMetricDetailStart +from alerts.models.alert_metrics import AlertMetrics +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_rule import AlertRule +from alerts.models.alert_suppression_window import AlertSuppressionWindow +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest +from alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.alert_suppression_windows import AlertSuppressionWindows +from alerts.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner +from alerts.models.alert_type import AlertType +from alerts.models.alerts import Alerts +from alerts.models.base_alert import BaseAlert +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta +from alerts.models.base_test import BaseTest +from alerts.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.days_of_week import DaysOfWeek +from alerts.models.end_repeat import EndRepeat +from alerts.models.end_repeat_type import EndRepeatType +from alerts.models.error import Error +from alerts.models.expand import Expand +from alerts.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response +from alerts.models.get_alerts200_response import GetAlerts200Response +from alerts.models.get_alerts_rules200_response import GetAlertsRules200Response +from alerts.models.get_suppression_windows200_response import GetSuppressionWindows200Response +from alerts.models.interval_type import IntervalType +from alerts.models.legacy_alert import LegacyAlert +from alerts.models.link import Link +from alerts.models.notification import Notification +from alerts.models.notification_email import NotificationEmail +from alerts.models.notification_third_party import NotificationThirdParty +from alerts.models.notification_webhook import NotificationWebhook +from alerts.models.pagination_links import PaginationLinks +from alerts.models.pagination_links_links import PaginationLinksLinks +from alerts.models.repeat import Repeat +from alerts.models.repeat_type import RepeatType +from alerts.models.rule import Rule +from alerts.models.rule_detail import RuleDetail +from alerts.models.rule_detail_update import RuleDetailUpdate +from alerts.models.rules import Rules +from alerts.models.self_links import SelfLinks +from alerts.models.self_links_links import SelfLinksLinks +from alerts.models.severity import Severity +from alerts.models.state import State +from alerts.models.test_interval import TestInterval +from alerts.models.third_party_integration_type import ThirdPartyIntegrationType +from alerts.models.unauthorized_error import UnauthorizedError +from alerts.models.unexpanded_test import UnexpandedTest +from alerts.models.validation_error import ValidationError +from alerts.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from alerts.models.webhook_integration_type import WebhookIntegrationType diff --git a/alerts/alerts/api/__init__.py b/alerts/alerts/api/__init__.py new file mode 100644 index 00000000..f2d2e28f --- /dev/null +++ b/alerts/alerts/api/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa + +# import apis into api package +from alerts.api.alert_rules_api import AlertRulesApi +from alerts.api.alert_suppression_windows_api import AlertSuppressionWindowsApi +from alerts.api.alerts_api import AlertsApi + diff --git a/alerts_api/alerts_api/api/alert_rules_api.py b/alerts/alerts/api/alert_rules_api.py similarity index 95% rename from alerts_api/alerts_api/api/alert_rules_api.py rename to alerts/alerts/api/alert_rules_api.py index d875e27d..5122dea3 100644 --- a/alerts_api/alerts_api/api/alert_rules_api.py +++ b/alerts/alerts/api/alert_rules_api.py @@ -3,40 +3,30 @@ """ Alerts API - ## Overview Manage all alerts, alert rules and alert suppression windows. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response +from alerts.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response +from alerts.models.get_alerts_rules200_response import GetAlertsRules200Response +from alerts.models.rule_detail_update import RuleDetailUpdate -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response -from alerts_api.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response -from alerts_api.models.get_alerts_rules200_response import GetAlertsRules200Response -from alerts_api.models.rule_detail_update import RuleDetailUpdate - -from alerts_api.api_client import ApiClient -from alerts_api.api_response import ApiResponse -from alerts_api.rest import RESTResponseType +from alerts.api_client import ApiClient, RequestSerialized +from alerts.api_response import ApiResponse +from alerts.rest import RESTResponseType class AlertRulesApi: @@ -111,13 +101,12 @@ class AlertRulesApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAlertRule201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -189,13 +178,12 @@ class AlertRulesApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAlertRule201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -267,13 +255,12 @@ class AlertRulesApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAlertRule201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -290,19 +277,18 @@ class AlertRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -421,7 +407,13 @@ class AlertRulesApi: ) _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, @@ -492,7 +484,13 @@ class AlertRulesApi: ) _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, @@ -563,7 +561,13 @@ class AlertRulesApi: ) _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, @@ -580,19 +584,18 @@ class AlertRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -611,7 +614,6 @@ class AlertRulesApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -703,8 +705,7 @@ class AlertRulesApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -780,8 +781,7 @@ class AlertRulesApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -857,8 +857,7 @@ class AlertRulesApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -875,19 +874,18 @@ class AlertRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -994,8 +992,7 @@ class AlertRulesApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1067,8 +1064,7 @@ class AlertRulesApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1140,8 +1136,7 @@ class AlertRulesApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1157,19 +1152,18 @@ class AlertRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1278,13 +1272,12 @@ class AlertRulesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAlertRule201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1360,13 +1353,12 @@ class AlertRulesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAlertRule201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1442,13 +1434,12 @@ class AlertRulesApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAlertRule201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1466,19 +1457,18 @@ class AlertRulesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/alerts_api/alerts_api/api/alert_suppression_windows_api.py b/alerts/alerts/api/alert_suppression_windows_api.py similarity index 95% rename from alerts_api/alerts_api/api/alert_suppression_windows_api.py rename to alerts/alerts/api/alert_suppression_windows_api.py index 0ef0e1a2..be44cd11 100644 --- a/alerts_api/alerts_api/api/alert_suppression_windows_api.py +++ b/alerts/alerts/api/alert_suppression_windows_api.py @@ -3,40 +3,30 @@ """ Alerts API - ## Overview Manage all alerts, alert rules and alert suppression windows. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.expand import Expand +from alerts.models.get_suppression_windows200_response import GetSuppressionWindows200Response -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response -from alerts_api.models.expand import Expand -from alerts_api.models.get_suppression_windows200_response import GetSuppressionWindows200Response - -from alerts_api.api_client import ApiClient -from alerts_api.api_response import ApiResponse -from alerts_api.rest import RESTResponseType +from alerts.api_client import ApiClient, RequestSerialized +from alerts.api_response import ApiResponse +from alerts.rest import RESTResponseType class AlertSuppressionWindowsApi: @@ -115,13 +105,12 @@ class AlertSuppressionWindowsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateSuppressionWindows201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -197,13 +186,12 @@ class AlertSuppressionWindowsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateSuppressionWindows201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -279,13 +267,12 @@ class AlertSuppressionWindowsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateSuppressionWindows201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -303,12 +290,11 @@ class AlertSuppressionWindowsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -316,7 +302,7 @@ class AlertSuppressionWindowsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -439,7 +425,13 @@ class AlertSuppressionWindowsApi: ) _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, @@ -510,7 +502,13 @@ class AlertSuppressionWindowsApi: ) _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, @@ -581,7 +579,13 @@ class AlertSuppressionWindowsApi: ) _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, @@ -598,19 +602,18 @@ class AlertSuppressionWindowsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -629,7 +632,6 @@ class AlertSuppressionWindowsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -725,8 +727,7 @@ class AlertSuppressionWindowsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -806,8 +807,7 @@ class AlertSuppressionWindowsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -887,8 +887,7 @@ class AlertSuppressionWindowsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -906,12 +905,11 @@ class AlertSuppressionWindowsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -919,7 +917,7 @@ class AlertSuppressionWindowsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1030,8 +1028,7 @@ class AlertSuppressionWindowsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1103,8 +1100,7 @@ class AlertSuppressionWindowsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1176,8 +1172,7 @@ class AlertSuppressionWindowsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1193,19 +1188,18 @@ class AlertSuppressionWindowsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1318,13 +1312,12 @@ class AlertSuppressionWindowsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateSuppressionWindows201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1404,13 +1397,12 @@ class AlertSuppressionWindowsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateSuppressionWindows201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1490,13 +1482,12 @@ class AlertSuppressionWindowsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateSuppressionWindows201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1515,12 +1506,11 @@ class AlertSuppressionWindowsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1528,7 +1518,7 @@ class AlertSuppressionWindowsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/alerts_api/alerts_api/api/alerts_api.py b/alerts/alerts/api/alerts_api.py similarity index 95% rename from alerts_api/alerts_api/api/alerts_api.py rename to alerts/alerts/api/alerts_api.py index 232c198f..9ebec4e0 100644 --- a/alerts_api/alerts_api/api/alerts_api.py +++ b/alerts/alerts/api/alerts_api.py @@ -3,40 +3,29 @@ """ Alerts API - ## Overview Manage all alerts, alert rules and alert suppression windows. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictFloat, StrictInt, StrictStr, field_validator - +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, Optional, Union +from typing_extensions import Annotated +from alerts.models.alert_detail import AlertDetail +from alerts.models.get_alerts200_response import GetAlerts200Response -from alerts_api.models.alert_detail import AlertDetail -from alerts_api.models.get_alerts200_response import GetAlerts200Response - -from alerts_api.api_client import ApiClient -from alerts_api.api_response import ApiResponse -from alerts_api.rest import RESTResponseType +from alerts.api_client import ApiClient, RequestSerialized +from alerts.api_response import ApiResponse +from alerts.rest import RESTResponseType class AlertsApi: @@ -115,8 +104,7 @@ class AlertsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -192,8 +180,7 @@ class AlertsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -269,8 +256,7 @@ class AlertsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -287,19 +273,18 @@ class AlertsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -426,8 +411,7 @@ class AlertsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -519,8 +503,7 @@ class AlertsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -612,8 +595,7 @@ class AlertsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -634,19 +616,18 @@ class AlertsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/alerts/alerts/api_client.py b/alerts/alerts/api_client.py new file mode 100644 index 00000000..fc316d7b --- /dev/null +++ b/alerts/alerts/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from alerts.configuration import Configuration +from alerts.api_response import ApiResponse, T as ApiResponseT +import alerts.models +from alerts import rest +from alerts.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(alerts.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/alerts/alerts/api_response.py b/alerts/alerts/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/alerts/alerts/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/alerts/alerts/configuration.py b/alerts/alerts/configuration.py new file mode 100644 index 00000000..721632a0 --- /dev/null +++ b/alerts/alerts/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("alerts") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/alerts/alerts/exceptions.py b/alerts/alerts/exceptions.py new file mode 100644 index 00000000..382f25a9 --- /dev/null +++ b/alerts/alerts/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/alerts/alerts/models/__init__.py b/alerts/alerts/models/__init__.py new file mode 100644 index 00000000..9f8edffe --- /dev/null +++ b/alerts/alerts/models/__init__.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from alerts.models.alert import Alert +from alerts.models.alert_detail import AlertDetail +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_links import AlertLinks +from alerts.models.alert_links_links import AlertLinksLinks +from alerts.models.alert_metric_detail import AlertMetricDetail +from alerts.models.alert_metric_detail_end import AlertMetricDetailEnd +from alerts.models.alert_metric_detail_start import AlertMetricDetailStart +from alerts.models.alert_metrics import AlertMetrics +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_rule import AlertRule +from alerts.models.alert_suppression_window import AlertSuppressionWindow +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest +from alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.alert_suppression_windows import AlertSuppressionWindows +from alerts.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner +from alerts.models.alert_type import AlertType +from alerts.models.alerts import Alerts +from alerts.models.base_alert import BaseAlert +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta +from alerts.models.base_test import BaseTest +from alerts.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.days_of_week import DaysOfWeek +from alerts.models.end_repeat import EndRepeat +from alerts.models.end_repeat_type import EndRepeatType +from alerts.models.error import Error +from alerts.models.expand import Expand +from alerts.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response +from alerts.models.get_alerts200_response import GetAlerts200Response +from alerts.models.get_alerts_rules200_response import GetAlertsRules200Response +from alerts.models.get_suppression_windows200_response import GetSuppressionWindows200Response +from alerts.models.interval_type import IntervalType +from alerts.models.legacy_alert import LegacyAlert +from alerts.models.link import Link +from alerts.models.notification import Notification +from alerts.models.notification_email import NotificationEmail +from alerts.models.notification_third_party import NotificationThirdParty +from alerts.models.notification_webhook import NotificationWebhook +from alerts.models.pagination_links import PaginationLinks +from alerts.models.pagination_links_links import PaginationLinksLinks +from alerts.models.repeat import Repeat +from alerts.models.repeat_type import RepeatType +from alerts.models.rule import Rule +from alerts.models.rule_detail import RuleDetail +from alerts.models.rule_detail_update import RuleDetailUpdate +from alerts.models.rules import Rules +from alerts.models.self_links import SelfLinks +from alerts.models.self_links_links import SelfLinksLinks +from alerts.models.severity import Severity +from alerts.models.state import State +from alerts.models.test_interval import TestInterval +from alerts.models.third_party_integration_type import ThirdPartyIntegrationType +from alerts.models.unauthorized_error import UnauthorizedError +from alerts.models.unexpanded_test import UnexpandedTest +from alerts.models.validation_error import ValidationError +from alerts.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from alerts.models.webhook_integration_type import WebhookIntegrationType diff --git a/alerts/alerts/models/alert.py b/alerts/alerts/models/alert.py new file mode 100644 index 00000000..85c3a28d --- /dev/null +++ b/alerts/alerts/models/alert.py @@ -0,0 +1,175 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from alerts.models.alert_links_links import AlertLinksLinks +from alerts.models.alert_type import AlertType +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta +from alerts.models.severity import Severity +from alerts.models.state import State +from typing import Optional, Set +from typing_extensions import Self + +class Alert(BaseModel): + """ + Alert + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + 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") + suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.") + meta: Optional[BaseAlertAllOfMeta] = None + links: Optional[AlertLinksLinks] = Field(default=None, alias="_links") + alert_id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.", alias="alertId") + date_start: Optional[StrictStr] = Field(default=None, description="The start date and time for querying alerts.", alias="dateStart") + date_end: Optional[StrictStr] = Field(default=None, description="The end date and time for querying alerts.", alias="dateEnd") + rule_id: Optional[StrictInt] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + state: Optional[StrictStr] = Field(default=None, description="Current state of the alert. Possible values: clear or trigger.") + severity: Optional[StrictStr] = Field(default=None, description="The severity of the alert.") + permalink: Optional[StrictStr] = Field(default=None, description="Hyperlink to alerts list, with row expanded") + api_links: Optional[List[Dict[str, Any]]] = Field(default=None, description="List of hyperlinks to other areas of the API", alias="apiLinks") + alert_rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="alertRuleId") + alert_state: Optional[State] = Field(default=None, alias="alertState") + alert_severity: Optional[Severity] = Field(default=None, alias="alertSeverity") + __properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta", "_links", "alertId", "dateStart", "dateEnd", "ruleId", "state", "severity", "permalink", "apiLinks", "alertRuleId", "alertState", "alertSeverity"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ACTIVE', 'CLEARED']): + raise ValueError("must be one of enum values ('ACTIVE', 'CLEARED')") + return value + + @field_validator('severity') + def severity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INFO', 'MAJOR', 'MINOR', 'CRITICAL', 'UNKNOWN']): + raise ValueError("must be one of enum values ('INFO', 'MAJOR', 'MINOR', 'CRITICAL', 'UNKNOWN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Alert from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "start_date", + "end_date", + "alert_id", + "date_start", + "date_end", + "rule_id", + "state", + "alert_rule_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # 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 Alert 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"), + "alertType": obj.get("alertType"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "violationCount": obj.get("violationCount"), + "duration": obj.get("duration"), + "suppressed": obj.get("suppressed"), + "meta": BaseAlertAllOfMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "_links": AlertLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "alertId": obj.get("alertId"), + "dateStart": obj.get("dateStart"), + "dateEnd": obj.get("dateEnd"), + "ruleId": obj.get("ruleId"), + "state": obj.get("state"), + "severity": obj.get("severity"), + "permalink": obj.get("permalink"), + "apiLinks": obj.get("apiLinks"), + "alertRuleId": obj.get("alertRuleId"), + "alertState": obj.get("alertState"), + "alertSeverity": obj.get("alertSeverity") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_detail.py b/alerts/alerts/models/alert_detail.py new file mode 100644 index 00000000..f8643816 --- /dev/null +++ b/alerts/alerts/models/alert_detail.py @@ -0,0 +1,135 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from alerts.models.alert_links_links import AlertLinksLinks +from alerts.models.alert_metric_detail import AlertMetricDetail +from alerts.models.alert_type import AlertType +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta +from alerts.models.severity import Severity +from alerts.models.state import State +from typing import Optional, Set +from typing_extensions import Self + +class AlertDetail(BaseModel): + """ + AlertDetail + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + 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") + suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.") + meta: Optional[BaseAlertAllOfMeta] = None + links: Optional[AlertLinksLinks] = Field(default=None, alias="_links") + state: Optional[State] = None + severity: Optional[Severity] = None + details: Optional[List[AlertMetricDetail]] = None + __properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta", "_links", "state", "severity", "details"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertDetail 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([ + "id", + "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 meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # 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 details (list) + _items = [] + if self.details: + for _item in self.details: + if _item: + _items.append(_item.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertDetail 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"), + "alertType": obj.get("alertType"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "violationCount": obj.get("violationCount"), + "duration": obj.get("duration"), + "suppressed": obj.get("suppressed"), + "meta": BaseAlertAllOfMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None, + "_links": AlertLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "state": obj.get("state"), + "severity": obj.get("severity"), + "details": [AlertMetricDetail.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/alert_direction.py b/alerts/alerts/models/alert_direction.py new file mode 100644 index 00000000..96d35377 --- /dev/null +++ b/alerts/alerts/models/alert_direction.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AlertDirection(str, Enum): + """ + Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/alert_links.py b/alerts/alerts/models/alert_links.py new file mode 100644 index 00000000..db4cc194 --- /dev/null +++ b/alerts/alerts/models/alert_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 alerts.models.alert_links_links import AlertLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class AlertLinks(BaseModel): + """ + AlertLinks + """ # noqa: E501 + links: Optional[AlertLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertLinks 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 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 AlertLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": AlertLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/alert_links_links.py b/alerts/alerts/models/alert_links_links.py new file mode 100644 index 00000000..c17581a9 --- /dev/null +++ b/alerts/alerts/models/alert_links_links.py @@ -0,0 +1,106 @@ +# 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.2 + 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 alerts.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class AlertLinksLinks(BaseModel): + """ + An object containing the alert links. + """ # noqa: E501 + test: Optional[Link] = None + rule: Optional[Link] = None + app_link: Optional[Link] = Field(default=None, alias="appLink") + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["test", "rule", "appLink", "self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertLinksLinks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # override the default output from pydantic by calling `to_dict()` of rule + if self.rule: + _dict['rule'] = self.rule.to_dict() + # override the default output from pydantic by calling `to_dict()` of app_link + if self.app_link: + _dict['appLink'] = self.app_link.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 AlertLinksLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "test": Link.from_dict(obj["test"]) if obj.get("test") is not None else None, + "rule": Link.from_dict(obj["rule"]) if obj.get("rule") is not None else None, + "appLink": Link.from_dict(obj["appLink"]) if obj.get("appLink") 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/alerts/alerts/models/alert_metric_detail.py b/alerts/alerts/models/alert_metric_detail.py new file mode 100644 index 00000000..aa409477 --- /dev/null +++ b/alerts/alerts/models/alert_metric_detail.py @@ -0,0 +1,106 @@ +# 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.2 + 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 alerts.models.alert_metric_detail_end import AlertMetricDetailEnd +from alerts.models.alert_metric_detail_start import AlertMetricDetailStart +from alerts.models.state import State +from typing import Optional, Set +from typing_extensions import Self + +class AlertMetricDetail(BaseModel): + """ + AlertMetricDetail + """ # noqa: E501 + end: Optional[AlertMetricDetailEnd] = None + id: Optional[StrictStr] = Field(default=None, description="Unique metric detail id.") + name: Optional[StrictStr] = Field(default=None, description="Geolocation of the alert.") + start: Optional[AlertMetricDetailStart] = None + state: Optional[State] = None + type: Optional[StrictStr] = Field(default=None, description="Type of the alert metric.") + __properties: ClassVar[List[str]] = ["end", "id", "name", "start", "state", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertMetricDetail 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 end + if self.end: + _dict['end'] = self.end.to_dict() + # override the default output from pydantic by calling `to_dict()` of start + if self.start: + _dict['start'] = self.start.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertMetricDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "end": AlertMetricDetailEnd.from_dict(obj["end"]) if obj.get("end") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "start": AlertMetricDetailStart.from_dict(obj["start"]) if obj.get("start") is not None else None, + "state": obj.get("state"), + "type": obj.get("type") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_metric_detail_end.py b/alerts/alerts/models/alert_metric_detail_end.py new file mode 100644 index 00000000..5673343d --- /dev/null +++ b/alerts/alerts/models/alert_metric_detail_end.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AlertMetricDetailEnd(BaseModel): + """ + AlertMetricDetailEnd + """ # noqa: E501 + metrics: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["metrics"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertMetricDetailEnd 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 AlertMetricDetailEnd from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metrics": obj.get("metrics") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_metric_detail_start.py b/alerts/alerts/models/alert_metric_detail_start.py new file mode 100644 index 00000000..51c790b3 --- /dev/null +++ b/alerts/alerts/models/alert_metric_detail_start.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AlertMetricDetailStart(BaseModel): + """ + AlertMetricDetailStart + """ # noqa: E501 + metrics: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["metrics"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertMetricDetailStart 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 AlertMetricDetailStart from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metrics": obj.get("metrics") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_metrics.py b/alerts/alerts/models/alert_metrics.py new file mode 100644 index 00000000..f15b8edb --- /dev/null +++ b/alerts/alerts/models/alert_metrics.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AlertMetrics(BaseModel): + """ + AlertMetrics + """ # noqa: E501 + metrics: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["metrics"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertMetrics 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 AlertMetrics from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metrics": obj.get("metrics") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_rounds_violation_mode.py b/alerts/alerts/models/alert_rounds_violation_mode.py new file mode 100644 index 00000000..e873eb38 --- /dev/null +++ b/alerts/alerts/models/alert_rounds_violation_mode.py @@ -0,0 +1,37 @@ +# 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.2 + 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 AlertRoundsViolationMode(str, Enum): + """ + `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + """ + + """ + allowed enum values + """ + EXACT = 'exact' + ANY = 'any' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertRoundsViolationMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/alert_rule.py b/alerts/alerts/models/alert_rule.py new file mode 100644 index 00000000..1b4e2b17 --- /dev/null +++ b/alerts/alerts/models/alert_rule.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_type import AlertType +from alerts.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class AlertRule(BaseModel): + """ + AlertRule + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") + rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") + expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") + direction: Optional[AlertDirection] = None + is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") + severity: Optional[Severity] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "severity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertRule 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([ + "rule_id", + "rule_name", + "expression", + "is_default", + "minimum_sources", + "minimum_sources_pct", + "rounds_violating_out_of", + "rounds_violating_required", + ]) + + _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 AlertRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_suppression_window.py b/alerts/alerts/models/alert_suppression_window.py new file mode 100644 index 00000000..97273bb3 --- /dev/null +++ b/alerts/alerts/models/alert_suppression_window.py @@ -0,0 +1,113 @@ +# 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.2 + 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 alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.end_repeat import EndRepeat +from alerts.models.repeat import Repeat +from typing import Optional, Set +from typing_extensions import Self + +class AlertSuppressionWindow(BaseModel): + """ + AlertSuppressionWindow + """ # noqa: E501 + alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") + name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") + is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") + status: Optional[AlertSuppressionWindowState] = None + start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") + repeat: Optional[Repeat] = None + end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") + __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertSuppressionWindow 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([ + "alert_suppression_window_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of repeat + if self.repeat: + _dict['repeat'] = self.repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of end_repeat + if self.end_repeat: + _dict['endRepeat'] = self.end_repeat.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertSuppressionWindow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), + "name": obj.get("name"), + "isEnabled": obj.get("isEnabled"), + "status": obj.get("status"), + "startDate": obj.get("startDate"), + "duration": obj.get("duration"), + "repeat": Repeat.from_dict(obj["repeat"]) if obj.get("repeat") is not None else None, + "endRepeat": EndRepeat.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/alert_suppression_window_request.py b/alerts/alerts/models/alert_suppression_window_request.py new file mode 100644 index 00000000..34552fdf --- /dev/null +++ b/alerts/alerts/models/alert_suppression_window_request.py @@ -0,0 +1,115 @@ +# 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.2 + 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 alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.end_repeat import EndRepeat +from alerts.models.repeat import Repeat +from typing import Optional, Set +from typing_extensions import Self + +class AlertSuppressionWindowRequest(BaseModel): + """ + AlertSuppressionWindowRequest + """ # noqa: E501 + alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") + name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") + is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") + status: Optional[AlertSuppressionWindowState] = None + start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") + repeat: Optional[Repeat] = None + end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") + tests: Optional[List[StrictStr]] = Field(default=None, description="List of tests to assign to the alert suppression window.") + __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertSuppressionWindowRequest 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([ + "alert_suppression_window_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of repeat + if self.repeat: + _dict['repeat'] = self.repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of end_repeat + if self.end_repeat: + _dict['endRepeat'] = self.end_repeat.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertSuppressionWindowRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), + "name": obj.get("name"), + "isEnabled": obj.get("isEnabled"), + "status": obj.get("status"), + "startDate": obj.get("startDate"), + "duration": obj.get("duration"), + "repeat": Repeat.from_dict(obj["repeat"]) if obj.get("repeat") is not None else None, + "endRepeat": EndRepeat.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None, + "tests": obj.get("tests") + }) + return _obj + + diff --git a/alerts/alerts/models/alert_suppression_window_state.py b/alerts/alerts/models/alert_suppression_window_state.py new file mode 100644 index 00000000..2395a818 --- /dev/null +++ b/alerts/alerts/models/alert_suppression_window_state.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AlertSuppressionWindowState(str, Enum): + """ + Indicates the current status of the suppression window. + """ + + """ + allowed enum values + """ + ACTIVE = 'active' + INACTIVE = 'inactive' + ENDED = 'ended' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertSuppressionWindowState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/alert_suppression_windows.py b/alerts/alerts/models/alert_suppression_windows.py new file mode 100644 index 00000000..f2e9ed1d --- /dev/null +++ b/alerts/alerts/models/alert_suppression_windows.py @@ -0,0 +1,95 @@ +# 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.2 + 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 alerts.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner +from typing import Optional, Set +from typing_extensions import Self + +class AlertSuppressionWindows(BaseModel): + """ + Alert suppression windows. + """ # noqa: E501 + alert_suppression_windows: Optional[List[AlertSuppressionWindowsAlertSuppressionWindowsInner]] = Field(default=None, alias="alertSuppressionWindows") + __properties: ClassVar[List[str]] = ["alertSuppressionWindows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertSuppressionWindows 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 alert_suppression_windows (list) + _items = [] + if self.alert_suppression_windows: + for _item in self.alert_suppression_windows: + if _item: + _items.append(_item.to_dict()) + _dict['alertSuppressionWindows'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertSuppressionWindows from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindows": [AlertSuppressionWindowsAlertSuppressionWindowsInner.from_dict(_item) for _item in obj["alertSuppressionWindows"]] if obj.get("alertSuppressionWindows") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/alert_suppression_windows_alert_suppression_windows_inner.py b/alerts/alerts/models/alert_suppression_windows_alert_suppression_windows_inner.py new file mode 100644 index 00000000..a43ed4cd --- /dev/null +++ b/alerts/alerts/models/alert_suppression_windows_alert_suppression_windows_inner.py @@ -0,0 +1,119 @@ +# 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.2 + 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 alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.end_repeat import EndRepeat +from alerts.models.repeat import Repeat +from alerts.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class AlertSuppressionWindowsAlertSuppressionWindowsInner(BaseModel): + """ + AlertSuppressionWindowsAlertSuppressionWindowsInner + """ # noqa: E501 + alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") + name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") + is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") + status: Optional[AlertSuppressionWindowState] = None + start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") + repeat: Optional[Repeat] = None + end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertSuppressionWindowsAlertSuppressionWindowsInner 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([ + "alert_suppression_window_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of repeat + if self.repeat: + _dict['repeat'] = self.repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of end_repeat + if self.end_repeat: + _dict['endRepeat'] = self.end_repeat.to_dict() + # 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 AlertSuppressionWindowsAlertSuppressionWindowsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), + "name": obj.get("name"), + "isEnabled": obj.get("isEnabled"), + "status": obj.get("status"), + "startDate": obj.get("startDate"), + "duration": obj.get("duration"), + "repeat": Repeat.from_dict(obj["repeat"]) if obj.get("repeat") is not None else None, + "endRepeat": EndRepeat.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/alert_type.py b/alerts/alerts/models/alert_type.py new file mode 100644 index 00000000..0962b620 --- /dev/null +++ b/alerts/alerts/models/alert_type.py @@ -0,0 +1,62 @@ +# 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.2 + 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 AlertType(str, Enum): + """ + Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + """ + + """ + allowed enum values + """ + PAGE_MINUS_LOAD = 'page-load' + HTTP_MINUS_SERVER = 'http-server' + END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' + END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' + VOICE = 'voice' + DNS_MINUS_SERVER = 'dns-server' + DNS_MINUS_TRACE = 'dns-trace' + DNSSEC = 'dnssec' + BGP = 'bgp' + PATH_MINUS_TRACE = 'path-trace' + FTP = 'ftp' + SIP_MINUS_SERVER = 'sip-server' + TRANSACTIONS = 'transactions' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + AGENT = 'agent' + NETWORK_MINUS_OUTAGE = 'network-outage' + APPLICATION_MINUS_OUTAGE = 'application-outage' + DEVICE_MINUS_DEVICE = 'device-device' + DEVICE_MINUS_INTERFACE = 'device-interface' + ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' + ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' + ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' + API = 'api' + WEB_MINUS_TRANSACTION = 'web-transaction' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/alerts.py b/alerts/alerts/models/alerts.py new file mode 100644 index 00000000..f3d4a746 --- /dev/null +++ b/alerts/alerts/models/alerts.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert import Alert +from typing import Optional, Set +from typing_extensions import Self + +class Alerts(BaseModel): + """ + Alerts + """ # noqa: E501 + alerts: Optional[List[Alert]] = None + __properties: ClassVar[List[str]] = ["alerts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Alerts 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 alerts (list) + _items = [] + if self.alerts: + for _item in self.alerts: + if _item: + _items.append(_item.to_dict()) + _dict['alerts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Alerts from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alerts": [Alert.from_dict(_item) for _item in obj["alerts"]] if obj.get("alerts") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/base_alert.py b/alerts/alerts/models/base_alert.py new file mode 100644 index 00000000..b8a81290 --- /dev/null +++ b/alerts/alerts/models/base_alert.py @@ -0,0 +1,119 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from alerts.models.alert_links_links import AlertLinksLinks +from alerts.models.alert_type import AlertType +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta +from typing import Optional, Set +from typing_extensions import Self + +class BaseAlert(BaseModel): + """ + BaseAlert + """ # noqa: E501 + links: Optional[AlertLinksLinks] = Field(default=None, alias="_links") + id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + 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") + suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.") + meta: Optional[BaseAlertAllOfMeta] = None + __properties: ClassVar[List[str]] = ["_links", "id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseAlert 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([ + "id", + "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 links + if self.links: + _dict['_links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseAlert from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": AlertLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "id": obj.get("id"), + "alertType": obj.get("alertType"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "violationCount": obj.get("violationCount"), + "duration": obj.get("duration"), + "suppressed": obj.get("suppressed"), + "meta": BaseAlertAllOfMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/base_alert_all_of_meta.py b/alerts/alerts/models/base_alert_all_of_meta.py new file mode 100644 index 00000000..f18d8ec1 --- /dev/null +++ b/alerts/alerts/models/base_alert_all_of_meta.py @@ -0,0 +1,87 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BaseAlertAllOfMeta(BaseModel): + """ + BaseAlertAllOfMeta + """ # noqa: E501 + version: Optional[StrictInt] = Field(default=None, description="Indicates the number of times this alert has re-entered the 'trigger' state after being suppressed. It starts at 1 and increments whenever a real-time ASW ends and the alert conditions remain active.") + __properties: ClassVar[List[str]] = ["version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseAlertAllOfMeta 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 BaseAlertAllOfMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "version": obj.get("version") + }) + return _obj + + diff --git a/alerts/alerts/models/base_test.py b/alerts/alerts/models/base_test.py new file mode 100644 index 00000000..0ba774d9 --- /dev/null +++ b/alerts/alerts/models/base_test.py @@ -0,0 +1,102 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_rule import AlertRule +from alerts.models.test_interval import TestInterval +from typing import Optional, Set +from typing_extensions import Self + +class BaseTest(BaseModel): + """ + BaseTest + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseTest 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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/complete_alert_suppression_window.py b/alerts/alerts/models/complete_alert_suppression_window.py new file mode 100644 index 00000000..38485b08 --- /dev/null +++ b/alerts/alerts/models/complete_alert_suppression_window.py @@ -0,0 +1,123 @@ +# 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.2 + 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 alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.base_test import BaseTest +from alerts.models.end_repeat import EndRepeat +from alerts.models.repeat import Repeat +from typing import Optional, Set +from typing_extensions import Self + +class CompleteAlertSuppressionWindow(BaseModel): + """ + CompleteAlertSuppressionWindow + """ # noqa: E501 + alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") + name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") + is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") + status: Optional[AlertSuppressionWindowState] = None + start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") + repeat: Optional[Repeat] = None + end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") + tests: Optional[List[BaseTest]] = Field(default=None, description="List of tests assigned to the alert suppression window.") + __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CompleteAlertSuppressionWindow 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([ + "alert_suppression_window_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of repeat + if self.repeat: + _dict['repeat'] = self.repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of end_repeat + if self.end_repeat: + _dict['endRepeat'] = self.end_repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CompleteAlertSuppressionWindow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), + "name": obj.get("name"), + "isEnabled": obj.get("isEnabled"), + "status": obj.get("status"), + "startDate": obj.get("startDate"), + "duration": obj.get("duration"), + "repeat": Repeat.from_dict(obj["repeat"]) if obj.get("repeat") is not None else None, + "endRepeat": EndRepeat.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None, + "tests": [BaseTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/create_alert_rule201_response.py b/alerts/alerts/models/create_alert_rule201_response.py new file mode 100644 index 00000000..25d8bd44 --- /dev/null +++ b/alerts/alerts/models/create_alert_rule201_response.py @@ -0,0 +1,133 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_type import AlertType +from alerts.models.notification import Notification +from alerts.models.self_links_links import SelfLinksLinks +from alerts.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class CreateAlertRule201Response(BaseModel): + """ + CreateAlertRule201Response + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") + expression: StrictStr = Field(description="The expression of the alert rule.") + direction: Optional[AlertDirection] = None + notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") + is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") + alert_type: AlertType = Field(alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") + severity: Optional[Severity] = None + notifications: Optional[Notification] = None + test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "testIds", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateAlertRule201Response 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([ + "rule_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of notifications + if self.notifications: + _dict['notifications'] = self.notifications.to_dict() + # 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 CreateAlertRule201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "notifyOnClear": obj.get("notifyOnClear"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "severity": obj.get("severity"), + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None, + "testIds": obj.get("testIds"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/create_suppression_windows201_response.py b/alerts/alerts/models/create_suppression_windows201_response.py new file mode 100644 index 00000000..c2212f65 --- /dev/null +++ b/alerts/alerts/models/create_suppression_windows201_response.py @@ -0,0 +1,129 @@ +# 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.2 + 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 alerts.models.alert_suppression_window_state import AlertSuppressionWindowState +from alerts.models.base_test import BaseTest +from alerts.models.end_repeat import EndRepeat +from alerts.models.repeat import Repeat +from alerts.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class CreateSuppressionWindows201Response(BaseModel): + """ + CreateSuppressionWindows201Response + """ # noqa: E501 + alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") + name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") + is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") + status: Optional[AlertSuppressionWindowState] = None + start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") + repeat: Optional[Repeat] = None + end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") + tests: Optional[List[BaseTest]] = Field(default=None, description="List of tests assigned to the alert suppression window.") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateSuppressionWindows201Response 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([ + "alert_suppression_window_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of repeat + if self.repeat: + _dict['repeat'] = self.repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of end_repeat + if self.end_repeat: + _dict['endRepeat'] = self.end_repeat.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 CreateSuppressionWindows201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), + "name": obj.get("name"), + "isEnabled": obj.get("isEnabled"), + "status": obj.get("status"), + "startDate": obj.get("startDate"), + "duration": obj.get("duration"), + "repeat": Repeat.from_dict(obj["repeat"]) if obj.get("repeat") is not None else None, + "endRepeat": EndRepeat.from_dict(obj["endRepeat"]) if obj.get("endRepeat") is not None else None, + "tests": [BaseTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/days_of_week.py b/alerts/alerts/models/days_of_week.py new file mode 100644 index 00000000..4fa78bec --- /dev/null +++ b/alerts/alerts/models/days_of_week.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Alerts API + + You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). + + The version of the OpenAPI document: 7.0.2 + 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 DaysOfWeek(str, Enum): + """ + Specifies the day to activate the alert suppression window. Applicable only when `intervalType` is set to `week`. + """ + + """ + allowed enum values + """ + SUN = 'sun' + MON = 'mon' + TUE = 'tue' + WED = 'wed' + THU = 'thu' + FRI = 'fri' + SAT = 'sat' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DaysOfWeek from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/end_repeat.py b/alerts/alerts/models/end_repeat.py new file mode 100644 index 00000000..1b528128 --- /dev/null +++ b/alerts/alerts/models/end_repeat.py @@ -0,0 +1,93 @@ +# 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.2 + 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 date +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.end_repeat_type import EndRepeatType +from typing import Optional, Set +from typing_extensions import Self + +class EndRepeat(BaseModel): + """ + End repeat options. + """ # noqa: E501 + type: Optional[EndRepeatType] = None + count: Optional[StrictInt] = Field(default=None, description="End repeat after number of occurrences, only valid with count type option.") + var_date: Optional[date] = Field(default=None, description="End repeat after specific date, only valid with date type option (ISO date format).", alias="date") + __properties: ClassVar[List[str]] = ["type", "count", "date"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndRepeat 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 EndRepeat 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"), + "count": obj.get("count"), + "date": obj.get("date") + }) + return _obj + + diff --git a/alerts/alerts/models/end_repeat_type.py b/alerts/alerts/models/end_repeat_type.py new file mode 100644 index 00000000..0c3f29c5 --- /dev/null +++ b/alerts/alerts/models/end_repeat_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 EndRepeatType(str, Enum): + """ + End repeat options type. + """ + + """ + allowed enum values + """ + COUNT = 'count' + NEVER = 'never' + DATE = 'date' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndRepeatType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/error.py b/alerts/alerts/models/error.py new file mode 100644 index 00000000..b8cedb5f --- /dev/null +++ b/alerts/alerts/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/alerts/alerts/models/expand.py b/alerts/alerts/models/expand.py new file mode 100644 index 00000000..b9016392 --- /dev/null +++ b/alerts/alerts/models/expand.py @@ -0,0 +1,36 @@ +# 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.2 + 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 + """ + TEST = 'test' + + @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/alerts/alerts/models/get_alert_rule_details200_response.py b/alerts/alerts/models/get_alert_rule_details200_response.py new file mode 100644 index 00000000..0a0143fe --- /dev/null +++ b/alerts/alerts/models/get_alert_rule_details200_response.py @@ -0,0 +1,143 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_type import AlertType +from alerts.models.base_test import BaseTest +from alerts.models.notification import Notification +from alerts.models.self_links_links import SelfLinksLinks +from alerts.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class GetAlertRuleDetails200Response(BaseModel): + """ + GetAlertRuleDetails200Response + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") + expression: StrictStr = Field(description="The expression of the alert rule.") + direction: Optional[AlertDirection] = None + notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") + is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") + alert_type: AlertType = Field(alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") + severity: Optional[Severity] = None + notifications: Optional[Notification] = None + tests: Optional[List[BaseTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAlertRuleDetails200Response 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([ + "rule_id", + "tests", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of notifications + if self.notifications: + _dict['notifications'] = self.notifications.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetAlertRuleDetails200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "notifyOnClear": obj.get("notifyOnClear"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "severity": obj.get("severity"), + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None, + "tests": [BaseTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/get_alerts200_response.py b/alerts/alerts/models/get_alerts200_response.py new file mode 100644 index 00000000..cc20c0bb --- /dev/null +++ b/alerts/alerts/models/get_alerts200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 alerts.models.alert import Alert +from alerts.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetAlerts200Response(BaseModel): + """ + GetAlerts200Response + """ # noqa: E501 + alerts: Optional[List[Alert]] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["alerts", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAlerts200Response 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 alerts (list) + _items = [] + if self.alerts: + for _item in self.alerts: + if _item: + _items.append(_item.to_dict()) + _dict['alerts'] = _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 GetAlerts200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alerts": [Alert.from_dict(_item) for _item in obj["alerts"]] if obj.get("alerts") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/get_alerts_rules200_response.py b/alerts/alerts/models/get_alerts_rules200_response.py new file mode 100644 index 00000000..ecc0133b --- /dev/null +++ b/alerts/alerts/models/get_alerts_rules200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 alerts.models.rule import Rule +from alerts.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetAlertsRules200Response(BaseModel): + """ + GetAlertsRules200Response + """ # noqa: E501 + alert_rules: Optional[List[Rule]] = Field(default=None, alias="alertRules") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["alertRules", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAlertsRules200Response 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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _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 GetAlertsRules200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertRules": [Rule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/get_suppression_windows200_response.py b/alerts/alerts/models/get_suppression_windows200_response.py new file mode 100644 index 00000000..c726c1b5 --- /dev/null +++ b/alerts/alerts/models/get_suppression_windows200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 alerts.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner +from alerts.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetSuppressionWindows200Response(BaseModel): + """ + GetSuppressionWindows200Response + """ # noqa: E501 + alert_suppression_windows: Optional[List[AlertSuppressionWindowsAlertSuppressionWindowsInner]] = Field(default=None, alias="alertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["alertSuppressionWindows", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetSuppressionWindows200Response 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 alert_suppression_windows (list) + _items = [] + if self.alert_suppression_windows: + for _item in self.alert_suppression_windows: + if _item: + _items.append(_item.to_dict()) + _dict['alertSuppressionWindows'] = _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 GetSuppressionWindows200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertSuppressionWindows": [AlertSuppressionWindowsAlertSuppressionWindowsInner.from_dict(_item) for _item in obj["alertSuppressionWindows"]] if obj.get("alertSuppressionWindows") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/interval_type.py b/alerts/alerts/models/interval_type.py new file mode 100644 index 00000000..d10ad49b --- /dev/null +++ b/alerts/alerts/models/interval_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 IntervalType(str, Enum): + """ + Repeat options interval type + """ + + """ + allowed enum values + """ + DAY = 'day' + WEEK = 'week' + MONTH = 'month' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of IntervalType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/legacy_alert.py b/alerts/alerts/models/legacy_alert.py new file mode 100644 index 00000000..96b60dc7 --- /dev/null +++ b/alerts/alerts/models/legacy_alert.py @@ -0,0 +1,131 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LegacyAlert(BaseModel): + """ + LegacyAlert + """ # noqa: E501 + alert_id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.", alias="alertId") + date_start: Optional[StrictStr] = Field(default=None, description="The start date and time for querying alerts.", alias="dateStart") + date_end: Optional[StrictStr] = Field(default=None, description="The end date and time for querying alerts.", alias="dateEnd") + rule_id: Optional[StrictInt] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + state: Optional[StrictStr] = Field(default=None, description="Current state of the alert. Possible values: clear or trigger.") + severity: Optional[StrictStr] = Field(default=None, description="The severity of the alert.") + permalink: Optional[StrictStr] = Field(default=None, description="Hyperlink to alerts list, with row expanded") + api_links: Optional[List[Dict[str, Any]]] = Field(default=None, description="List of hyperlinks to other areas of the API", alias="apiLinks") + __properties: ClassVar[List[str]] = ["alertId", "dateStart", "dateEnd", "ruleId", "state", "severity", "permalink", "apiLinks"] + + @field_validator('state') + def state_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ACTIVE', 'CLEARED']): + raise ValueError("must be one of enum values ('ACTIVE', 'CLEARED')") + return value + + @field_validator('severity') + def severity_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['INFO', 'MAJOR', 'MINOR', 'CRITICAL', 'UNKNOWN']): + raise ValueError("must be one of enum values ('INFO', 'MAJOR', 'MINOR', 'CRITICAL', 'UNKNOWN')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LegacyAlert 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. + """ + excluded_fields: Set[str] = set([ + "alert_id", + "date_start", + "date_end", + "rule_id", + "state", + ]) + + _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 LegacyAlert from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertId": obj.get("alertId"), + "dateStart": obj.get("dateStart"), + "dateEnd": obj.get("dateEnd"), + "ruleId": obj.get("ruleId"), + "state": obj.get("state"), + "severity": obj.get("severity"), + "permalink": obj.get("permalink"), + "apiLinks": obj.get("apiLinks") + }) + return _obj + + diff --git a/alerts/alerts/models/link.py b/alerts/alerts/models/link.py new file mode 100644 index 00000000..b3b434af --- /dev/null +++ b/alerts/alerts/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/alerts/alerts/models/notification.py b/alerts/alerts/models/notification.py new file mode 100644 index 00000000..1f5e5c9b --- /dev/null +++ b/alerts/alerts/models/notification.py @@ -0,0 +1,111 @@ +# 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.2 + 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 alerts.models.notification_email import NotificationEmail +from alerts.models.notification_third_party import NotificationThirdParty +from alerts.models.notification_webhook import NotificationWebhook +from typing import Optional, Set +from typing_extensions import Self + +class Notification(BaseModel): + """ + Alert notification object. See Alert notification integrations. + """ # noqa: E501 + email: Optional[NotificationEmail] = None + third_party: Optional[List[NotificationThirdParty]] = Field(default=None, description="Third party notifications.", alias="thirdParty") + webhook: Optional[List[NotificationWebhook]] = Field(default=None, description="Webhooks notifications.") + __properties: ClassVar[List[str]] = ["email", "thirdParty", "webhook"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Notification 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 email + if self.email: + _dict['email'] = self.email.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in third_party (list) + _items = [] + if self.third_party: + for _item in self.third_party: + if _item: + _items.append(_item.to_dict()) + _dict['thirdParty'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in webhook (list) + _items = [] + if self.webhook: + for _item in self.webhook: + if _item: + _items.append(_item.to_dict()) + _dict['webhook'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Notification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": NotificationEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, + "thirdParty": [NotificationThirdParty.from_dict(_item) for _item in obj["thirdParty"]] if obj.get("thirdParty") is not None else None, + "webhook": [NotificationWebhook.from_dict(_item) for _item in obj["webhook"]] if obj.get("webhook") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/notification_email.py b/alerts/alerts/models/notification_email.py new file mode 100644 index 00000000..ff5185ba --- /dev/null +++ b/alerts/alerts/models/notification_email.py @@ -0,0 +1,89 @@ +# 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.2 + 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 NotificationEmail(BaseModel): + """ + Email notifications. + """ # noqa: E501 + recipients: Optional[List[StrictStr]] = Field(default=None, description="An array containing the email addresses to receive notifications.") + message: Optional[StrictStr] = Field(default=None, description="Custom text included in alert email notifications sent to recipients.") + __properties: ClassVar[List[str]] = ["recipients", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotificationEmail 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 NotificationEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "recipients": obj.get("recipients"), + "message": obj.get("message") + }) + return _obj + + diff --git a/alerts/alerts/models/notification_third_party.py b/alerts/alerts/models/notification_third_party.py new file mode 100644 index 00000000..7df4ef7a --- /dev/null +++ b/alerts/alerts/models/notification_third_party.py @@ -0,0 +1,90 @@ +# 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.2 + 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 alerts.models.third_party_integration_type import ThirdPartyIntegrationType +from typing import Optional, Set +from typing_extensions import Self + +class NotificationThirdParty(BaseModel): + """ + Webhook notification. + """ # noqa: E501 + integration_id: Optional[List[StrictStr]] = Field(default=None, description="Integration ID.", alias="integrationId") + integration_type: Optional[ThirdPartyIntegrationType] = Field(default=None, alias="integrationType") + __properties: ClassVar[List[str]] = ["integrationId", "integrationType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotificationThirdParty 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 NotificationThirdParty from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "integrationId": obj.get("integrationId"), + "integrationType": obj.get("integrationType") + }) + return _obj + + diff --git a/alerts/alerts/models/notification_webhook.py b/alerts/alerts/models/notification_webhook.py new file mode 100644 index 00000000..be023471 --- /dev/null +++ b/alerts/alerts/models/notification_webhook.py @@ -0,0 +1,90 @@ +# 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.2 + 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 alerts.models.webhook_integration_type import WebhookIntegrationType +from typing import Optional, Set +from typing_extensions import Self + +class NotificationWebhook(BaseModel): + """ + Webhook notification. + """ # noqa: E501 + integration_id: Optional[List[StrictStr]] = Field(default=None, description="Integration ID.", alias="integrationId") + integration_type: Optional[WebhookIntegrationType] = Field(default=None, alias="integrationType") + __properties: ClassVar[List[str]] = ["integrationId", "integrationType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotificationWebhook 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 NotificationWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "integrationId": obj.get("integrationId"), + "integrationType": obj.get("integrationType") + }) + return _obj + + diff --git a/alerts/alerts/models/pagination_links.py b/alerts/alerts/models/pagination_links.py new file mode 100644 index 00000000..7d23fbb4 --- /dev/null +++ b/alerts/alerts/models/pagination_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 alerts.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/pagination_links_links.py b/alerts/alerts/models/pagination_links_links.py new file mode 100644 index 00000000..8298009d --- /dev/null +++ b/alerts/alerts/models/pagination_links_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 alerts.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinksLinks(BaseModel): + """ + PaginationLinksLinks + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationLinksLinks 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 PaginationLinksLinks 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/alerts/alerts/models/repeat.py b/alerts/alerts/models/repeat.py new file mode 100644 index 00000000..8f9677df --- /dev/null +++ b/alerts/alerts/models/repeat.py @@ -0,0 +1,96 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.days_of_week import DaysOfWeek +from alerts.models.interval_type import IntervalType +from alerts.models.repeat_type import RepeatType +from typing import Optional, Set +from typing_extensions import Self + +class Repeat(BaseModel): + """ + Repeat options. + """ # noqa: E501 + type: Optional[RepeatType] = None + interval_type: Optional[IntervalType] = Field(default=None, alias="intervalType") + interval_length: Optional[StrictInt] = Field(default=None, description="Number of `intervalTypes` to wait before reactivating the alert suppression window.", alias="intervalLength") + days_of_week: Optional[List[DaysOfWeek]] = Field(default=None, alias="daysOfWeek") + __properties: ClassVar[List[str]] = ["type", "intervalType", "intervalLength", "daysOfWeek"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Repeat 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 Repeat 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"), + "intervalType": obj.get("intervalType"), + "intervalLength": obj.get("intervalLength"), + "daysOfWeek": obj.get("daysOfWeek") + }) + return _obj + + diff --git a/alerts/alerts/models/repeat_type.py b/alerts/alerts/models/repeat_type.py new file mode 100644 index 00000000..5a319c24 --- /dev/null +++ b/alerts/alerts/models/repeat_type.py @@ -0,0 +1,39 @@ +# 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.2 + 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 RepeatType(str, Enum): + """ + Repeat options type. + """ + + """ + allowed enum values + """ + DAY = 'day' + WEEK = 'week' + MONTH = 'month' + CUSTOM = 'custom' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of RepeatType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/rule.py b/alerts/alerts/models/rule.py new file mode 100644 index 00000000..2511ade6 --- /dev/null +++ b/alerts/alerts/models/rule.py @@ -0,0 +1,119 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_type import AlertType +from alerts.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class Rule(BaseModel): + """ + Rule + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") + expression: StrictStr = Field(description="The expression of the alert rule.") + direction: Optional[AlertDirection] = None + notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") + is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") + alert_type: AlertType = Field(alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") + severity: Optional[Severity] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Rule 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([ + "rule_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 Rule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "notifyOnClear": obj.get("notifyOnClear"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/alerts/alerts/models/rule_detail.py b/alerts/alerts/models/rule_detail.py new file mode 100644 index 00000000..06441a35 --- /dev/null +++ b/alerts/alerts/models/rule_detail.py @@ -0,0 +1,137 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_type import AlertType +from alerts.models.base_test import BaseTest +from alerts.models.notification import Notification +from alerts.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class RuleDetail(BaseModel): + """ + RuleDetail + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") + expression: StrictStr = Field(description="The expression of the alert rule.") + direction: Optional[AlertDirection] = None + notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") + is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") + alert_type: AlertType = Field(alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") + severity: Optional[Severity] = None + notifications: Optional[Notification] = None + tests: Optional[List[BaseTest]] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RuleDetail 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([ + "rule_id", + "tests", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of notifications + if self.notifications: + _dict['notifications'] = self.notifications.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RuleDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "notifyOnClear": obj.get("notifyOnClear"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "severity": obj.get("severity"), + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None, + "tests": [BaseTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/rule_detail_update.py b/alerts/alerts/models/rule_detail_update.py new file mode 100644 index 00000000..0a1ae062 --- /dev/null +++ b/alerts/alerts/models/rule_detail_update.py @@ -0,0 +1,127 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.alert_direction import AlertDirection +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from alerts.models.alert_type import AlertType +from alerts.models.notification import Notification +from alerts.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class RuleDetailUpdate(BaseModel): + """ + RuleDetailUpdate + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") + rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") + expression: StrictStr = Field(description="The expression of the alert rule.") + direction: Optional[AlertDirection] = None + notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") + is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") + alert_type: AlertType = Field(alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") + severity: Optional[Severity] = None + notifications: Optional[Notification] = None + test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds") + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "testIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RuleDetailUpdate 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([ + "rule_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of notifications + if self.notifications: + _dict['notifications'] = self.notifications.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RuleDetailUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "notifyOnClear": obj.get("notifyOnClear"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "severity": obj.get("severity"), + "notifications": Notification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None, + "testIds": obj.get("testIds") + }) + return _obj + + diff --git a/alerts/alerts/models/rules.py b/alerts/alerts/models/rules.py new file mode 100644 index 00000000..4647a001 --- /dev/null +++ b/alerts/alerts/models/rules.py @@ -0,0 +1,95 @@ +# 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.2 + 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 alerts.models.rule import Rule +from typing import Optional, Set +from typing_extensions import Self + +class Rules(BaseModel): + """ + Rules + """ # noqa: E501 + alert_rules: Optional[List[Rule]] = Field(default=None, alias="alertRules") + __properties: ClassVar[List[str]] = ["alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Rules 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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Rules from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "alertRules": [Rule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/self_links.py b/alerts/alerts/models/self_links.py new file mode 100644 index 00000000..035ca738 --- /dev/null +++ b/alerts/alerts/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 alerts.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/self_links_links.py b/alerts/alerts/models/self_links_links.py new file mode 100644 index 00000000..db2331fa --- /dev/null +++ b/alerts/alerts/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 alerts.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/alerts/alerts/models/severity.py b/alerts/alerts/models/severity.py new file mode 100644 index 00000000..dba005b0 --- /dev/null +++ b/alerts/alerts/models/severity.py @@ -0,0 +1,40 @@ +# 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.2 + 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 Severity(str, Enum): + """ + The severity of the alert. + """ + + """ + allowed enum values + """ + INFO = 'info' + MAJOR = 'major' + MINOR = 'minor' + CRITICAL = 'critical' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Severity from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/state.py b/alerts/alerts/models/state.py new file mode 100644 index 00000000..4f3653dd --- /dev/null +++ b/alerts/alerts/models/state.py @@ -0,0 +1,37 @@ +# 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.2 + 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 State(str, Enum): + """ + Current state of the alert. Possible values: clear or trigger. + """ + + """ + allowed enum values + """ + CLEAR = 'clear' + TRIGGER = 'trigger' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of State from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/test_interval.py b/alerts/alerts/models/test_interval.py new file mode 100644 index 00000000..baf8a262 --- /dev/null +++ b/alerts/alerts/models/test_interval.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Alerts API + + You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). + + The version of the OpenAPI document: 7.0.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/third_party_integration_type.py b/alerts/alerts/models/third_party_integration_type.py new file mode 100644 index 00000000..2a8fb5ea --- /dev/null +++ b/alerts/alerts/models/third_party_integration_type.py @@ -0,0 +1,37 @@ +# 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.2 + 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 ThirdPartyIntegrationType(str, Enum): + """ + Integration type. + """ + + """ + allowed enum values + """ + PAGERDUTY = 'pagerduty' + SLACK = 'slack' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ThirdPartyIntegrationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts/alerts/models/unauthorized_error.py b/alerts/alerts/models/unauthorized_error.py new file mode 100644 index 00000000..866b4d82 --- /dev/null +++ b/alerts/alerts/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/alerts/alerts/models/unexpanded_test.py b/alerts/alerts/models/unexpanded_test.py new file mode 100644 index 00000000..33dc5c5d --- /dev/null +++ b/alerts/alerts/models/unexpanded_test.py @@ -0,0 +1,92 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from alerts.models.test_interval import TestInterval +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedTest(BaseModel): + """ + UnexpandedTest + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedTest 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 UnexpandedTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True + }) + return _obj + + diff --git a/alerts/alerts/models/validation_error.py b/alerts/alerts/models/validation_error.py new file mode 100644 index 00000000..be605d30 --- /dev/null +++ b/alerts/alerts/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 alerts.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/alerts/alerts/models/validation_error_all_of_errors.py b/alerts/alerts/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..ed61899e --- /dev/null +++ b/alerts/alerts/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/alerts/alerts/models/webhook_integration_type.py b/alerts/alerts/models/webhook_integration_type.py new file mode 100644 index 00000000..000ece82 --- /dev/null +++ b/alerts/alerts/models/webhook_integration_type.py @@ -0,0 +1,36 @@ +# 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.2 + 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 WebhookIntegrationType(str, Enum): + """ + Integration type. + """ + + """ + allowed enum values + """ + WEBHOOK = 'webhook' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebhookIntegrationType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/alerts_api/alerts_api/py.typed b/alerts/alerts/py.typed similarity index 100% rename from alerts_api/alerts_api/py.typed rename to alerts/alerts/py.typed diff --git a/alerts/alerts/rest.py b/alerts/alerts/rest.py new file mode 100644 index 00000000..798edacf --- /dev/null +++ b/alerts/alerts/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from alerts.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/alerts/docs/Alert.md b/alerts/docs/Alert.md new file mode 100644 index 00000000..89c53659 --- /dev/null +++ b/alerts/docs/Alert.md @@ -0,0 +1,48 @@ +# Alert + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | A unique ID for each individual alert occurrence. | [optional] [readonly] +**alert_type** | [**AlertType**](AlertType.md) | | [optional] +**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] +**suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional] +**meta** | [**BaseAlertAllOfMeta**](BaseAlertAllOfMeta.md) | | [optional] +**links** | [**AlertLinksLinks**](AlertLinksLinks.md) | | [optional] +**alert_id** | **str** | A unique ID for each individual alert occurrence. | [optional] [readonly] +**date_start** | **str** | The start date and time for querying alerts. | [optional] [readonly] +**date_end** | **str** | The end date and time for querying alerts. | [optional] [readonly] +**rule_id** | **int** | Unique ID of the rule. | [optional] [readonly] +**state** | **str** | Current state of the alert. Possible values: clear or trigger. | [optional] [readonly] +**severity** | **str** | The severity of the alert. | [optional] +**permalink** | **str** | Hyperlink to alerts list, with row expanded | [optional] +**api_links** | **List[Dict[str, object]]** | List of hyperlinks to other areas of the API | [optional] +**alert_rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] +**alert_state** | [**State**](State.md) | | [optional] +**alert_severity** | [**Severity**](Severity.md) | | [optional] + +## Example + +```python +from alerts.models.alert import Alert + +# TODO update the JSON string below +json = "{}" +# create an instance of Alert from a JSON string +alert_instance = Alert.from_json(json) +# print the JSON string representation of the object +print(Alert.to_json()) + +# convert the object into a dict +alert_dict = alert_instance.to_dict() +# create an instance of Alert from a dict +alert_from_dict = Alert.from_dict(alert_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/alerts_api/docs/AlertDetail.md b/alerts/docs/AlertDetail.md similarity index 77% rename from alerts_api/docs/AlertDetail.md rename to alerts/docs/AlertDetail.md index e29bd0ca..20d724bf 100644 --- a/alerts_api/docs/AlertDetail.md +++ b/alerts/docs/AlertDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | A unique ID for each individual alert occurrence. | [optional] [readonly] @@ -10,7 +11,9 @@ Name | Type | Description | Notes **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] -**links** | [**RuleLinksLinks**](RuleLinksLinks.md) | | [optional] +**suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional] +**meta** | [**BaseAlertAllOfMeta**](BaseAlertAllOfMeta.md) | | [optional] +**links** | [**AlertLinksLinks**](AlertLinksLinks.md) | | [optional] **state** | [**State**](State.md) | | [optional] **severity** | [**Severity**](Severity.md) | | [optional] **details** | [**List[AlertMetricDetail]**](AlertMetricDetail.md) | | [optional] @@ -18,19 +21,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_detail import AlertDetail +from alerts.models.alert_detail import AlertDetail # TODO update the JSON string below json = "{}" # create an instance of AlertDetail from a JSON string alert_detail_instance = AlertDetail.from_json(json) # print the JSON string representation of the object -print AlertDetail.to_json() +print(AlertDetail.to_json()) # convert the object into a dict alert_detail_dict = alert_detail_instance.to_dict() # create an instance of AlertDetail from a dict -alert_detail_form_dict = alert_detail.from_dict(alert_detail_dict) +alert_detail_from_dict = AlertDetail.from_dict(alert_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/alerts/docs/AlertDirection.md b/alerts/docs/AlertDirection.md new file mode 100644 index 00000000..8902e9bf --- /dev/null +++ b/alerts/docs/AlertDirection.md @@ -0,0 +1,12 @@ +# AlertDirection + +Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + +## 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/alerts_api/docs/AlertLinks.md b/alerts/docs/AlertLinks.md similarity index 75% rename from alerts_api/docs/AlertLinks.md rename to alerts/docs/AlertLinks.md index 16f65a7f..595a4dc1 100644 --- a/alerts_api/docs/AlertLinks.md +++ b/alerts/docs/AlertLinks.md @@ -2,26 +2,27 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**RuleLinksLinks**](RuleLinksLinks.md) | | [optional] +**links** | [**AlertLinksLinks**](AlertLinksLinks.md) | | [optional] ## Example ```python -from alerts_api.models.alert_links import AlertLinks +from alerts.models.alert_links import AlertLinks # TODO update the JSON string below json = "{}" # create an instance of AlertLinks from a JSON string alert_links_instance = AlertLinks.from_json(json) # print the JSON string representation of the object -print AlertLinks.to_json() +print(AlertLinks.to_json()) # convert the object into a dict alert_links_dict = alert_links_instance.to_dict() # create an instance of AlertLinks from a dict -alert_links_form_dict = alert_links.from_dict(alert_links_dict) +alert_links_from_dict = AlertLinks.from_dict(alert_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/alerts/docs/AlertLinksLinks.md b/alerts/docs/AlertLinksLinks.md new file mode 100644 index 00000000..2de5cc23 --- /dev/null +++ b/alerts/docs/AlertLinksLinks.md @@ -0,0 +1,33 @@ +# AlertLinksLinks + +An object containing the alert links. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**test** | [**Link**](Link.md) | | [optional] +**rule** | [**Link**](Link.md) | | [optional] +**app_link** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from alerts.models.alert_links_links import AlertLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertLinksLinks from a JSON string +alert_links_links_instance = AlertLinksLinks.from_json(json) +# print the JSON string representation of the object +print(AlertLinksLinks.to_json()) + +# convert the object into a dict +alert_links_links_dict = alert_links_links_instance.to_dict() +# create an instance of AlertLinksLinks from a dict +alert_links_links_from_dict = AlertLinksLinks.from_dict(alert_links_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/alerts_api/docs/AlertMetricDetail.md b/alerts/docs/AlertMetricDetail.md similarity index 85% rename from alerts_api/docs/AlertMetricDetail.md rename to alerts/docs/AlertMetricDetail.md index 21fcd7cc..c479d70a 100644 --- a/alerts_api/docs/AlertMetricDetail.md +++ b/alerts/docs/AlertMetricDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **end** | [**AlertMetricDetailEnd**](AlertMetricDetailEnd.md) | | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_metric_detail import AlertMetricDetail +from alerts.models.alert_metric_detail import AlertMetricDetail # TODO update the JSON string below json = "{}" # create an instance of AlertMetricDetail from a JSON string alert_metric_detail_instance = AlertMetricDetail.from_json(json) # print the JSON string representation of the object -print AlertMetricDetail.to_json() +print(AlertMetricDetail.to_json()) # convert the object into a dict alert_metric_detail_dict = alert_metric_detail_instance.to_dict() # create an instance of AlertMetricDetail from a dict -alert_metric_detail_form_dict = alert_metric_detail.from_dict(alert_metric_detail_dict) +alert_metric_detail_from_dict = AlertMetricDetail.from_dict(alert_metric_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/alerts_api/docs/AlertMetricDetailEnd.md b/alerts/docs/AlertMetricDetailEnd.md similarity index 78% rename from alerts_api/docs/AlertMetricDetailEnd.md rename to alerts/docs/AlertMetricDetailEnd.md index 96955b74..0ae7dd9e 100644 --- a/alerts_api/docs/AlertMetricDetailEnd.md +++ b/alerts/docs/AlertMetricDetailEnd.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **metrics** | **str** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_metric_detail_end import AlertMetricDetailEnd +from alerts.models.alert_metric_detail_end import AlertMetricDetailEnd # TODO update the JSON string below json = "{}" # create an instance of AlertMetricDetailEnd from a JSON string alert_metric_detail_end_instance = AlertMetricDetailEnd.from_json(json) # print the JSON string representation of the object -print AlertMetricDetailEnd.to_json() +print(AlertMetricDetailEnd.to_json()) # convert the object into a dict alert_metric_detail_end_dict = alert_metric_detail_end_instance.to_dict() # create an instance of AlertMetricDetailEnd from a dict -alert_metric_detail_end_form_dict = alert_metric_detail_end.from_dict(alert_metric_detail_end_dict) +alert_metric_detail_end_from_dict = AlertMetricDetailEnd.from_dict(alert_metric_detail_end_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/alerts_api/docs/AlertMetricDetailStart.md b/alerts/docs/AlertMetricDetailStart.md similarity index 77% rename from alerts_api/docs/AlertMetricDetailStart.md rename to alerts/docs/AlertMetricDetailStart.md index e4c1352f..317ce1db 100644 --- a/alerts_api/docs/AlertMetricDetailStart.md +++ b/alerts/docs/AlertMetricDetailStart.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **metrics** | **str** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_metric_detail_start import AlertMetricDetailStart +from alerts.models.alert_metric_detail_start import AlertMetricDetailStart # TODO update the JSON string below json = "{}" # create an instance of AlertMetricDetailStart from a JSON string alert_metric_detail_start_instance = AlertMetricDetailStart.from_json(json) # print the JSON string representation of the object -print AlertMetricDetailStart.to_json() +print(AlertMetricDetailStart.to_json()) # convert the object into a dict alert_metric_detail_start_dict = alert_metric_detail_start_instance.to_dict() # create an instance of AlertMetricDetailStart from a dict -alert_metric_detail_start_form_dict = alert_metric_detail_start.from_dict(alert_metric_detail_start_dict) +alert_metric_detail_start_from_dict = AlertMetricDetailStart.from_dict(alert_metric_detail_start_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/alerts_api/docs/AlertMetrics.md b/alerts/docs/AlertMetrics.md similarity index 81% rename from alerts_api/docs/AlertMetrics.md rename to alerts/docs/AlertMetrics.md index 0e24a974..df1e846b 100644 --- a/alerts_api/docs/AlertMetrics.md +++ b/alerts/docs/AlertMetrics.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **metrics** | **str** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_metrics import AlertMetrics +from alerts.models.alert_metrics import AlertMetrics # TODO update the JSON string below json = "{}" # create an instance of AlertMetrics from a JSON string alert_metrics_instance = AlertMetrics.from_json(json) # print the JSON string representation of the object -print AlertMetrics.to_json() +print(AlertMetrics.to_json()) # convert the object into a dict alert_metrics_dict = alert_metrics_instance.to_dict() # create an instance of AlertMetrics from a dict -alert_metrics_form_dict = alert_metrics.from_dict(alert_metrics_dict) +alert_metrics_from_dict = AlertMetrics.from_dict(alert_metrics_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/alerts/docs/AlertRoundsViolationMode.md b/alerts/docs/AlertRoundsViolationMode.md new file mode 100644 index 00000000..efe78921 --- /dev/null +++ b/alerts/docs/AlertRoundsViolationMode.md @@ -0,0 +1,12 @@ +# AlertRoundsViolationMode + +`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + +## 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/alerts/docs/AlertRule.md b/alerts/docs/AlertRule.md new file mode 100644 index 00000000..efae601b --- /dev/null +++ b/alerts/docs/AlertRule.md @@ -0,0 +1,40 @@ +# AlertRule + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] +**rule_name** | **str** | Name of the alert rule | [optional] [readonly] +**expression** | **str** | String expression of alert rule | [optional] [readonly] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] +**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] +**alert_type** | [**AlertType**](AlertType.md) | | [optional] +**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] +**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] +**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] +**severity** | [**Severity**](Severity.md) | | [optional] + +## Example + +```python +from alerts.models.alert_rule import AlertRule + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertRule from a JSON string +alert_rule_instance = AlertRule.from_json(json) +# print the JSON string representation of the object +print(AlertRule.to_json()) + +# convert the object into a dict +alert_rule_dict = alert_rule_instance.to_dict() +# create an instance of AlertRule from a dict +alert_rule_from_dict = AlertRule.from_dict(alert_rule_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/alerts_api/docs/AlertRulesApi.md b/alerts/docs/AlertRulesApi.md similarity index 86% rename from alerts_api/docs/AlertRulesApi.md rename to alerts/docs/AlertRulesApi.md index 6f4b9c54..bc989616 100644 --- a/alerts_api/docs/AlertRulesApi.md +++ b/alerts/docs/AlertRulesApi.md @@ -1,4 +1,4 @@ -# alerts_api.AlertRulesApi +# alerts.AlertRulesApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,18 +21,17 @@ Creates a new alert rule in your account, using the provided POST data. The `Edi ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response -from alerts_api.models.rule_detail_update import RuleDetailUpdate -from alerts_api.rest import ApiException +import alerts +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response +from alerts.models.rule_detail_update import RuleDetailUpdate +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -42,16 +41,16 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertRulesApi(api_client) - rule_detail_update = alerts_api.RuleDetailUpdate() # RuleDetailUpdate | - aid = '2067' # 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) + api_instance = alerts.AlertRulesApi(api_client) + rule_detail_update = alerts.RuleDetailUpdate() # RuleDetailUpdate | + 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 alert rule @@ -66,6 +65,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_detail_update** | [**RuleDetailUpdate**](RuleDetailUpdate.md)| | @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -107,16 +108,15 @@ Deletes an alert rule from your account. Users must have both `Edit alert rules` ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.rest import ApiException +import alerts +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertRulesApi(api_client) + api_instance = alerts.AlertRulesApi(api_client) rule_id = '127094' # str | Unique alert rule ID. - aid = '2067' # 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) + 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 alert rule @@ -148,6 +148,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **str**| Unique alert rule ID. | @@ -164,9 +165,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -189,17 +191,16 @@ Returns detailed information about an alert rule using the `ruleId`. If the `rul ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response -from alerts_api.rest import ApiException +import alerts +from alerts.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -209,16 +210,16 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertRulesApi(api_client) + api_instance = alerts.AlertRulesApi(api_client) rule_id = '127094' # str | Unique alert rule ID. - aid = '2067' # 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) + 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 alert rule @@ -233,6 +234,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **str**| Unique alert rule ID. | @@ -252,6 +254,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -273,17 +276,16 @@ Returns a list of alert rules. Default rules for each test type are indicated wi ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.get_alerts_rules200_response import GetAlertsRules200Response -from alerts_api.rest import ApiException +import alerts +from alerts.models.get_alerts_rules200_response import GetAlertsRules200Response +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -293,15 +295,15 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertRulesApi(api_client) - aid = '2067' # 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) + api_instance = alerts.AlertRulesApi(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 alert rules @@ -316,6 +318,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### 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] @@ -334,6 +337,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -355,18 +359,17 @@ Modifies an existing alert rule in your account, using the provided POST data. T ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response -from alerts_api.models.rule_detail_update import RuleDetailUpdate -from alerts_api.rest import ApiException +import alerts +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response +from alerts.models.rule_detail_update import RuleDetailUpdate +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -376,17 +379,17 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertRulesApi(api_client) + api_instance = alerts.AlertRulesApi(api_client) rule_id = '127094' # str | Unique alert rule ID. - rule_detail_update = alerts_api.RuleDetailUpdate() # RuleDetailUpdate | - aid = '2067' # 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) + rule_detail_update = alerts.RuleDetailUpdate() # RuleDetailUpdate | + 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 alert rule @@ -401,6 +404,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **str**| Unique alert rule ID. | @@ -421,6 +425,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/alerts_api/docs/AlertSuppressionWindow.md b/alerts/docs/AlertSuppressionWindow.md similarity index 87% rename from alerts_api/docs/AlertSuppressionWindow.md rename to alerts/docs/AlertSuppressionWindow.md index aabd44db..a9a8f47e 100644 --- a/alerts_api/docs/AlertSuppressionWindow.md +++ b/alerts/docs/AlertSuppressionWindow.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_window_id** | **str** | Unique ID of the alert suppression window. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_suppression_window import AlertSuppressionWindow +from alerts.models.alert_suppression_window import AlertSuppressionWindow # TODO update the JSON string below json = "{}" # create an instance of AlertSuppressionWindow from a JSON string alert_suppression_window_instance = AlertSuppressionWindow.from_json(json) # print the JSON string representation of the object -print AlertSuppressionWindow.to_json() +print(AlertSuppressionWindow.to_json()) # convert the object into a dict alert_suppression_window_dict = alert_suppression_window_instance.to_dict() # create an instance of AlertSuppressionWindow from a dict -alert_suppression_window_form_dict = alert_suppression_window.from_dict(alert_suppression_window_dict) +alert_suppression_window_from_dict = AlertSuppressionWindow.from_dict(alert_suppression_window_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/alerts_api/docs/AlertSuppressionWindowRequest.md b/alerts/docs/AlertSuppressionWindowRequest.md similarity index 86% rename from alerts_api/docs/AlertSuppressionWindowRequest.md rename to alerts/docs/AlertSuppressionWindowRequest.md index 6c2860ec..4464808e 100644 --- a/alerts_api/docs/AlertSuppressionWindowRequest.md +++ b/alerts/docs/AlertSuppressionWindowRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_window_id** | **str** | Unique ID of the alert suppression window. | [optional] [readonly] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest # TODO update the JSON string below json = "{}" # create an instance of AlertSuppressionWindowRequest from a JSON string alert_suppression_window_request_instance = AlertSuppressionWindowRequest.from_json(json) # print the JSON string representation of the object -print AlertSuppressionWindowRequest.to_json() +print(AlertSuppressionWindowRequest.to_json()) # convert the object into a dict alert_suppression_window_request_dict = alert_suppression_window_request_instance.to_dict() # create an instance of AlertSuppressionWindowRequest from a dict -alert_suppression_window_request_form_dict = alert_suppression_window_request.from_dict(alert_suppression_window_request_dict) +alert_suppression_window_request_from_dict = AlertSuppressionWindowRequest.from_dict(alert_suppression_window_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/alerts_api/docs/AlertSuppressionWindowState.md b/alerts/docs/AlertSuppressionWindowState.md similarity index 99% rename from alerts_api/docs/AlertSuppressionWindowState.md rename to alerts/docs/AlertSuppressionWindowState.md index cae27390..dda9ad34 100644 --- a/alerts_api/docs/AlertSuppressionWindowState.md +++ b/alerts/docs/AlertSuppressionWindowState.md @@ -3,6 +3,7 @@ Indicates the current status of the suppression window. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts_api/docs/AlertSuppressionWindows.md b/alerts/docs/AlertSuppressionWindows.md similarity index 80% rename from alerts_api/docs/AlertSuppressionWindows.md rename to alerts/docs/AlertSuppressionWindows.md index 9a8f8e75..9dc47ee5 100644 --- a/alerts_api/docs/AlertSuppressionWindows.md +++ b/alerts/docs/AlertSuppressionWindows.md @@ -3,6 +3,7 @@ Alert suppression windows. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_windows** | [**List[AlertSuppressionWindowsAlertSuppressionWindowsInner]**](AlertSuppressionWindowsAlertSuppressionWindowsInner.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_suppression_windows import AlertSuppressionWindows +from alerts.models.alert_suppression_windows import AlertSuppressionWindows # TODO update the JSON string below json = "{}" # create an instance of AlertSuppressionWindows from a JSON string alert_suppression_windows_instance = AlertSuppressionWindows.from_json(json) # print the JSON string representation of the object -print AlertSuppressionWindows.to_json() +print(AlertSuppressionWindows.to_json()) # convert the object into a dict alert_suppression_windows_dict = alert_suppression_windows_instance.to_dict() # create an instance of AlertSuppressionWindows from a dict -alert_suppression_windows_form_dict = alert_suppression_windows.from_dict(alert_suppression_windows_dict) +alert_suppression_windows_from_dict = AlertSuppressionWindows.from_dict(alert_suppression_windows_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/alerts_api/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md b/alerts/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md similarity index 81% rename from alerts_api/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md rename to alerts/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md index 23d1edfa..375eca80 100644 --- a/alerts_api/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md +++ b/alerts/docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_window_id** | **str** | Unique ID of the alert suppression window. | [optional] [readonly] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner +from alerts.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner # TODO update the JSON string below json = "{}" # create an instance of AlertSuppressionWindowsAlertSuppressionWindowsInner from a JSON string alert_suppression_windows_alert_suppression_windows_inner_instance = AlertSuppressionWindowsAlertSuppressionWindowsInner.from_json(json) # print the JSON string representation of the object -print AlertSuppressionWindowsAlertSuppressionWindowsInner.to_json() +print(AlertSuppressionWindowsAlertSuppressionWindowsInner.to_json()) # convert the object into a dict alert_suppression_windows_alert_suppression_windows_inner_dict = alert_suppression_windows_alert_suppression_windows_inner_instance.to_dict() # create an instance of AlertSuppressionWindowsAlertSuppressionWindowsInner from a dict -alert_suppression_windows_alert_suppression_windows_inner_form_dict = alert_suppression_windows_alert_suppression_windows_inner.from_dict(alert_suppression_windows_alert_suppression_windows_inner_dict) +alert_suppression_windows_alert_suppression_windows_inner_from_dict = AlertSuppressionWindowsAlertSuppressionWindowsInner.from_dict(alert_suppression_windows_alert_suppression_windows_inner_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/alerts_api/docs/AlertSuppressionWindowsApi.md b/alerts/docs/AlertSuppressionWindowsApi.md similarity index 82% rename from alerts_api/docs/AlertSuppressionWindowsApi.md rename to alerts/docs/AlertSuppressionWindowsApi.md index 8a537aaf..a038d034 100644 --- a/alerts_api/docs/AlertSuppressionWindowsApi.md +++ b/alerts/docs/AlertSuppressionWindowsApi.md @@ -1,4 +1,4 @@ -# alerts_api.AlertSuppressionWindowsApi +# alerts.AlertSuppressionWindowsApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,19 +21,18 @@ Creates a new alert suppression window in ThousandEyes, using the provided POST ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response -from alerts_api.models.expand import Expand -from alerts_api.rest import ApiException +import alerts +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.expand import Expand +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,17 +42,17 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertSuppressionWindowsApi(api_client) - alert_suppression_window_request = alerts_api.AlertSuppressionWindowRequest() # AlertSuppressionWindowRequest | - aid = '2067' # 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 = [alerts_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional) + api_instance = alerts.AlertSuppressionWindowsApi(api_client) + alert_suppression_window_request = alerts.AlertSuppressionWindowRequest() # AlertSuppressionWindowRequest | + 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 = [alerts.Expand()] # List[Expand] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional) try: # Create alert suppression window @@ -68,6 +67,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_suppression_window_request** | [**AlertSuppressionWindowRequest**](AlertSuppressionWindowRequest.md)| | @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -110,16 +111,15 @@ Deletes an alert suppression window. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.rest import ApiException +import alerts +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -129,16 +129,16 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertSuppressionWindowsApi(api_client) + api_instance = alerts.AlertSuppressionWindowsApi(api_client) window_id = '2411' # str | Unique window ID. - aid = '2067' # 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) + 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 alert suppression window @@ -151,6 +151,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **window_id** | **str**| Unique window ID. | @@ -167,9 +168,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -192,18 +194,17 @@ Returns detailed information about an alert suppression window configured in you ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response -from alerts_api.models.expand import Expand -from alerts_api.rest import ApiException +import alerts +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.expand import Expand +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -213,17 +214,17 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertSuppressionWindowsApi(api_client) + api_instance = alerts.AlertSuppressionWindowsApi(api_client) window_id = '2411' # str | Unique window ID. - aid = '2067' # 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 = [alerts_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (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 = [alerts.Expand()] # List[Expand] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional) try: # Retrieve alert suppression window @@ -238,6 +239,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **window_id** | **str**| Unique window ID. | @@ -258,6 +260,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -279,17 +282,16 @@ Returns a list of all alert suppression windows configured in your account group ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.get_suppression_windows200_response import GetSuppressionWindows200Response -from alerts_api.rest import ApiException +import alerts +from alerts.models.get_suppression_windows200_response import GetSuppressionWindows200Response +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -299,15 +301,15 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertSuppressionWindowsApi(api_client) - aid = '2067' # 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) + api_instance = alerts.AlertSuppressionWindowsApi(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 alert suppression windows @@ -322,6 +324,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### 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] @@ -340,6 +343,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -361,19 +365,18 @@ Updates an alert suppression window in ThousandEyes, using the provided POST da ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response -from alerts_api.models.expand import Expand -from alerts_api.rest import ApiException +import alerts +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.expand import Expand +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -383,18 +386,18 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertSuppressionWindowsApi(api_client) + api_instance = alerts.AlertSuppressionWindowsApi(api_client) window_id = '2411' # str | Unique window ID. - alert_suppression_window_request = alerts_api.AlertSuppressionWindowRequest() # AlertSuppressionWindowRequest | - aid = '2067' # 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 = [alerts_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional) + alert_suppression_window_request = alerts.AlertSuppressionWindowRequest() # AlertSuppressionWindowRequest | + 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 = [alerts.Expand()] # List[Expand] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional) try: # Update alert suppression window @@ -409,6 +412,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **window_id** | **str**| Unique window ID. | @@ -430,6 +434,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/alerts/docs/AlertType.md b/alerts/docs/AlertType.md new file mode 100644 index 00000000..cde41743 --- /dev/null +++ b/alerts/docs/AlertType.md @@ -0,0 +1,12 @@ +# AlertType + +Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + +## 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/alerts_api/docs/Alerts.md b/alerts/docs/Alerts.md similarity index 85% rename from alerts_api/docs/Alerts.md rename to alerts/docs/Alerts.md index f2eda47e..a2362194 100644 --- a/alerts_api/docs/Alerts.md +++ b/alerts/docs/Alerts.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alerts** | [**List[Alert]**](Alert.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.alerts import Alerts +from alerts.models.alerts import Alerts # TODO update the JSON string below json = "{}" # create an instance of Alerts from a JSON string alerts_instance = Alerts.from_json(json) # print the JSON string representation of the object -print Alerts.to_json() +print(Alerts.to_json()) # convert the object into a dict alerts_dict = alerts_instance.to_dict() # create an instance of Alerts from a dict -alerts_form_dict = alerts.from_dict(alerts_dict) +alerts_from_dict = Alerts.from_dict(alerts_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/alerts_api/docs/AlertsApi.md b/alerts/docs/AlertsApi.md similarity index 89% rename from alerts_api/docs/AlertsApi.md rename to alerts/docs/AlertsApi.md index 62d49186..e348f58f 100644 --- a/alerts_api/docs/AlertsApi.md +++ b/alerts/docs/AlertsApi.md @@ -1,4 +1,4 @@ -# alerts_api.AlertsApi +# alerts.AlertsApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,17 +18,16 @@ Returns detailed information about an alert using its ID. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.alert_detail import AlertDetail -from alerts_api.rest import ApiException +import alerts +from alerts.models.alert_detail import AlertDetail +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,16 +37,16 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertsApi(api_client) + api_instance = alerts.AlertsApi(api_client) alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569' # str | Unique alert ID. - aid = '2067' # 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) + 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 alert details @@ -62,6 +61,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_id** | **str**| Unique alert ID. | @@ -81,6 +81,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -102,17 +103,16 @@ Returns a list of active alerts. If no alerts are active within the specified t ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import alerts_api -from alerts_api.models.get_alerts200_response import GetAlerts200Response -from alerts_api.rest import ApiException +import alerts +from alerts.models.get_alerts200_response import GetAlerts200Response +from alerts.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 = alerts_api.Configuration( +configuration = alerts.Configuration( host = "https://api.thousandeyes.com" ) @@ -122,20 +122,20 @@ configuration = alerts_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = alerts_api.Configuration( +configuration = alerts.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: +with alerts.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = alerts_api.AlertsApi(api_client) - aid = '2067' # 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) + api_instance = alerts.AlertsApi(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) max = 5 # float | (Optional) Maximum number of objects to return. (optional) - state = alerts_api.State() # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional) + state = alerts.State() # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional) try: # List active alerts @@ -150,6 +150,7 @@ with alerts_api.ApiClient(configuration) as api_client: ### 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] @@ -173,6 +174,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/alerts_api/docs/BaseAlert.md b/alerts/docs/BaseAlert.md similarity index 75% rename from alerts_api/docs/BaseAlert.md rename to alerts/docs/BaseAlert.md index 97c7cdfa..e4c2c195 100644 --- a/alerts_api/docs/BaseAlert.md +++ b/alerts/docs/BaseAlert.md @@ -2,32 +2,35 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**RuleLinksLinks**](RuleLinksLinks.md) | | [optional] +**links** | [**AlertLinksLinks**](AlertLinksLinks.md) | | [optional] **id** | **str** | A unique ID for each individual alert occurrence. | [optional] [readonly] **alert_type** | [**AlertType**](AlertType.md) | | [optional] **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] +**suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional] +**meta** | [**BaseAlertAllOfMeta**](BaseAlertAllOfMeta.md) | | [optional] ## Example ```python -from alerts_api.models.base_alert import BaseAlert +from alerts.models.base_alert import BaseAlert # TODO update the JSON string below json = "{}" # create an instance of BaseAlert from a JSON string base_alert_instance = BaseAlert.from_json(json) # print the JSON string representation of the object -print BaseAlert.to_json() +print(BaseAlert.to_json()) # convert the object into a dict base_alert_dict = base_alert_instance.to_dict() # create an instance of BaseAlert from a dict -base_alert_form_dict = base_alert.from_dict(base_alert_dict) +base_alert_from_dict = BaseAlert.from_dict(base_alert_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/alerts/docs/BaseAlertAllOfMeta.md b/alerts/docs/BaseAlertAllOfMeta.md new file mode 100644 index 00000000..82392bfe --- /dev/null +++ b/alerts/docs/BaseAlertAllOfMeta.md @@ -0,0 +1,29 @@ +# BaseAlertAllOfMeta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **int** | Indicates the number of times this alert has re-entered the 'trigger' state after being suppressed. It starts at 1 and increments whenever a real-time ASW ends and the alert conditions remain active. | [optional] + +## Example + +```python +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseAlertAllOfMeta from a JSON string +base_alert_all_of_meta_instance = BaseAlertAllOfMeta.from_json(json) +# print the JSON string representation of the object +print(BaseAlertAllOfMeta.to_json()) + +# convert the object into a dict +base_alert_all_of_meta_dict = base_alert_all_of_meta_instance.to_dict() +# create an instance of BaseAlertAllOfMeta from a dict +base_alert_all_of_meta_from_dict = BaseAlertAllOfMeta.from_dict(base_alert_all_of_meta_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/alerts/docs/BaseTest.md b/alerts/docs/BaseTest.md new file mode 100644 index 00000000..c834d090 --- /dev/null +++ b/alerts/docs/BaseTest.md @@ -0,0 +1,32 @@ +# BaseTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] + +## Example + +```python +from alerts.models.base_test import BaseTest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseTest from a JSON string +base_test_instance = BaseTest.from_json(json) +# print the JSON string representation of the object +print(BaseTest.to_json()) + +# convert the object into a dict +base_test_dict = base_test_instance.to_dict() +# create an instance of BaseTest from a dict +base_test_from_dict = BaseTest.from_dict(base_test_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/alerts_api/docs/CompleteAlertSuppressionWindow.md b/alerts/docs/CompleteAlertSuppressionWindow.md similarity index 85% rename from alerts_api/docs/CompleteAlertSuppressionWindow.md rename to alerts/docs/CompleteAlertSuppressionWindow.md index bb4059c8..537bc033 100644 --- a/alerts_api/docs/CompleteAlertSuppressionWindow.md +++ b/alerts/docs/CompleteAlertSuppressionWindow.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_window_id** | **str** | Unique ID of the alert suppression window. | [optional] [readonly] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow +from alerts.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow # TODO update the JSON string below json = "{}" # create an instance of CompleteAlertSuppressionWindow from a JSON string complete_alert_suppression_window_instance = CompleteAlertSuppressionWindow.from_json(json) # print the JSON string representation of the object -print CompleteAlertSuppressionWindow.to_json() +print(CompleteAlertSuppressionWindow.to_json()) # convert the object into a dict complete_alert_suppression_window_dict = complete_alert_suppression_window_instance.to_dict() # create an instance of CompleteAlertSuppressionWindow from a dict -complete_alert_suppression_window_form_dict = complete_alert_suppression_window.from_dict(complete_alert_suppression_window_dict) +complete_alert_suppression_window_from_dict = CompleteAlertSuppressionWindow.from_dict(complete_alert_suppression_window_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/alerts_api/docs/CreateAlertRule201Response.md b/alerts/docs/CreateAlertRule201Response.md similarity index 88% rename from alerts_api/docs/CreateAlertRule201Response.md rename to alerts/docs/CreateAlertRule201Response.md index 69a2b494..b141b60c 100644 --- a/alerts_api/docs/CreateAlertRule201Response.md +++ b/alerts/docs/CreateAlertRule201Response.md @@ -2,12 +2,13 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] **rule_name** | **str** | Name of the alert rule. | **expression** | **str** | The expression of the alert rule. | -**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] **notify_on_clear** | **bool** | Send notification when alert clears. | [optional] **is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional] **alert_type** | [**AlertType**](AlertType.md) | | @@ -25,19 +26,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response # TODO update the JSON string below json = "{}" # create an instance of CreateAlertRule201Response from a JSON string create_alert_rule201_response_instance = CreateAlertRule201Response.from_json(json) # print the JSON string representation of the object -print CreateAlertRule201Response.to_json() +print(CreateAlertRule201Response.to_json()) # convert the object into a dict create_alert_rule201_response_dict = create_alert_rule201_response_instance.to_dict() # create an instance of CreateAlertRule201Response from a dict -create_alert_rule201_response_form_dict = create_alert_rule201_response.from_dict(create_alert_rule201_response_dict) +create_alert_rule201_response_from_dict = CreateAlertRule201Response.from_dict(create_alert_rule201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/CreateSuppressionWindows201Response.md b/alerts/docs/CreateSuppressionWindows201Response.md similarity index 85% rename from alerts_api/docs/CreateSuppressionWindows201Response.md rename to alerts/docs/CreateSuppressionWindows201Response.md index 245b113f..dcc3a01e 100644 --- a/alerts_api/docs/CreateSuppressionWindows201Response.md +++ b/alerts/docs/CreateSuppressionWindows201Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_window_id** | **str** | Unique ID of the alert suppression window. | [optional] [readonly] @@ -18,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response # TODO update the JSON string below json = "{}" # create an instance of CreateSuppressionWindows201Response from a JSON string create_suppression_windows201_response_instance = CreateSuppressionWindows201Response.from_json(json) # print the JSON string representation of the object -print CreateSuppressionWindows201Response.to_json() +print(CreateSuppressionWindows201Response.to_json()) # convert the object into a dict create_suppression_windows201_response_dict = create_suppression_windows201_response_instance.to_dict() # create an instance of CreateSuppressionWindows201Response from a dict -create_suppression_windows201_response_form_dict = create_suppression_windows201_response.from_dict(create_suppression_windows201_response_dict) +create_suppression_windows201_response_from_dict = CreateSuppressionWindows201Response.from_dict(create_suppression_windows201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/DaysOfWeek.md b/alerts/docs/DaysOfWeek.md similarity index 99% rename from alerts_api/docs/DaysOfWeek.md rename to alerts/docs/DaysOfWeek.md index 7fd0e207..da597299 100644 --- a/alerts_api/docs/DaysOfWeek.md +++ b/alerts/docs/DaysOfWeek.md @@ -3,6 +3,7 @@ Specifies the day to activate the alert suppression window. Applicable only when `intervalType` is set to `week`. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts_api/docs/EndRepeat.md b/alerts/docs/EndRepeat.md similarity index 87% rename from alerts_api/docs/EndRepeat.md rename to alerts/docs/EndRepeat.md index 1736a62a..6d63270d 100644 --- a/alerts_api/docs/EndRepeat.md +++ b/alerts/docs/EndRepeat.md @@ -3,6 +3,7 @@ End repeat options. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**EndRepeatType**](EndRepeatType.md) | | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.end_repeat import EndRepeat +from alerts.models.end_repeat import EndRepeat # TODO update the JSON string below json = "{}" # create an instance of EndRepeat from a JSON string end_repeat_instance = EndRepeat.from_json(json) # print the JSON string representation of the object -print EndRepeat.to_json() +print(EndRepeat.to_json()) # convert the object into a dict end_repeat_dict = end_repeat_instance.to_dict() # create an instance of EndRepeat from a dict -end_repeat_form_dict = end_repeat.from_dict(end_repeat_dict) +end_repeat_from_dict = EndRepeat.from_dict(end_repeat_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/EndRepeatType.md b/alerts/docs/EndRepeatType.md similarity index 99% rename from alerts_api/docs/EndRepeatType.md rename to alerts/docs/EndRepeatType.md index ea650a6f..faaad672 100644 --- a/alerts_api/docs/EndRepeatType.md +++ b/alerts/docs/EndRepeatType.md @@ -3,6 +3,7 @@ End repeat options type. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts/docs/Error.md b/alerts/docs/Error.md new file mode 100644 index 00000000..c9f4a81c --- /dev/null +++ b/alerts/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 alerts.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/alerts/docs/Expand.md b/alerts/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/alerts/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/alerts_api/docs/GetAlertRuleDetails200Response.md b/alerts/docs/GetAlertRuleDetails200Response.md similarity index 87% rename from alerts_api/docs/GetAlertRuleDetails200Response.md rename to alerts/docs/GetAlertRuleDetails200Response.md index 980ad997..04a1e327 100644 --- a/alerts_api/docs/GetAlertRuleDetails200Response.md +++ b/alerts/docs/GetAlertRuleDetails200Response.md @@ -2,12 +2,13 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] **rule_name** | **str** | Name of the alert rule. | **expression** | **str** | The expression of the alert rule. | -**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] **notify_on_clear** | **bool** | Send notification when alert clears. | [optional] **is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional] **alert_type** | [**AlertType**](AlertType.md) | | @@ -25,19 +26,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response +from alerts.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response # TODO update the JSON string below json = "{}" # create an instance of GetAlertRuleDetails200Response from a JSON string get_alert_rule_details200_response_instance = GetAlertRuleDetails200Response.from_json(json) # print the JSON string representation of the object -print GetAlertRuleDetails200Response.to_json() +print(GetAlertRuleDetails200Response.to_json()) # convert the object into a dict get_alert_rule_details200_response_dict = get_alert_rule_details200_response_instance.to_dict() # create an instance of GetAlertRuleDetails200Response from a dict -get_alert_rule_details200_response_form_dict = get_alert_rule_details200_response.from_dict(get_alert_rule_details200_response_dict) +get_alert_rule_details200_response_from_dict = GetAlertRuleDetails200Response.from_dict(get_alert_rule_details200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/GetAlerts200Response.md b/alerts/docs/GetAlerts200Response.md similarity index 80% rename from alerts_api/docs/GetAlerts200Response.md rename to alerts/docs/GetAlerts200Response.md index d1996a9d..39c83143 100644 --- a/alerts_api/docs/GetAlerts200Response.md +++ b/alerts/docs/GetAlerts200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alerts** | [**List[Alert]**](Alert.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.get_alerts200_response import GetAlerts200Response +from alerts.models.get_alerts200_response import GetAlerts200Response # TODO update the JSON string below json = "{}" # create an instance of GetAlerts200Response from a JSON string get_alerts200_response_instance = GetAlerts200Response.from_json(json) # print the JSON string representation of the object -print GetAlerts200Response.to_json() +print(GetAlerts200Response.to_json()) # convert the object into a dict get_alerts200_response_dict = get_alerts200_response_instance.to_dict() # create an instance of GetAlerts200Response from a dict -get_alerts200_response_form_dict = get_alerts200_response.from_dict(get_alerts200_response_dict) +get_alerts200_response_from_dict = GetAlerts200Response.from_dict(get_alerts200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/GetAlertsRules200Response.md b/alerts/docs/GetAlertsRules200Response.md similarity index 78% rename from alerts_api/docs/GetAlertsRules200Response.md rename to alerts/docs/GetAlertsRules200Response.md index be5d26e0..66060e89 100644 --- a/alerts_api/docs/GetAlertsRules200Response.md +++ b/alerts/docs/GetAlertsRules200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_rules** | [**List[Rule]**](Rule.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.get_alerts_rules200_response import GetAlertsRules200Response +from alerts.models.get_alerts_rules200_response import GetAlertsRules200Response # TODO update the JSON string below json = "{}" # create an instance of GetAlertsRules200Response from a JSON string get_alerts_rules200_response_instance = GetAlertsRules200Response.from_json(json) # print the JSON string representation of the object -print GetAlertsRules200Response.to_json() +print(GetAlertsRules200Response.to_json()) # convert the object into a dict get_alerts_rules200_response_dict = get_alerts_rules200_response_instance.to_dict() # create an instance of GetAlertsRules200Response from a dict -get_alerts_rules200_response_form_dict = get_alerts_rules200_response.from_dict(get_alerts_rules200_response_dict) +get_alerts_rules200_response_from_dict = GetAlertsRules200Response.from_dict(get_alerts_rules200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/GetSuppressionWindows200Response.md b/alerts/docs/GetSuppressionWindows200Response.md similarity index 78% rename from alerts_api/docs/GetSuppressionWindows200Response.md rename to alerts/docs/GetSuppressionWindows200Response.md index 90d8553b..b18cee01 100644 --- a/alerts_api/docs/GetSuppressionWindows200Response.md +++ b/alerts/docs/GetSuppressionWindows200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_suppression_windows** | [**List[AlertSuppressionWindowsAlertSuppressionWindowsInner]**](AlertSuppressionWindowsAlertSuppressionWindowsInner.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.get_suppression_windows200_response import GetSuppressionWindows200Response +from alerts.models.get_suppression_windows200_response import GetSuppressionWindows200Response # TODO update the JSON string below json = "{}" # create an instance of GetSuppressionWindows200Response from a JSON string get_suppression_windows200_response_instance = GetSuppressionWindows200Response.from_json(json) # print the JSON string representation of the object -print GetSuppressionWindows200Response.to_json() +print(GetSuppressionWindows200Response.to_json()) # convert the object into a dict get_suppression_windows200_response_dict = get_suppression_windows200_response_instance.to_dict() # create an instance of GetSuppressionWindows200Response from a dict -get_suppression_windows200_response_form_dict = get_suppression_windows200_response.from_dict(get_suppression_windows200_response_dict) +get_suppression_windows200_response_from_dict = GetSuppressionWindows200Response.from_dict(get_suppression_windows200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/IntervalType.md b/alerts/docs/IntervalType.md similarity index 99% rename from alerts_api/docs/IntervalType.md rename to alerts/docs/IntervalType.md index 4ab6e755..8ec40649 100644 --- a/alerts_api/docs/IntervalType.md +++ b/alerts/docs/IntervalType.md @@ -3,6 +3,7 @@ Repeat options interval type ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts/docs/LegacyAlert.md b/alerts/docs/LegacyAlert.md new file mode 100644 index 00000000..4db77522 --- /dev/null +++ b/alerts/docs/LegacyAlert.md @@ -0,0 +1,36 @@ +# LegacyAlert + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alert_id** | **str** | A unique ID for each individual alert occurrence. | [optional] [readonly] +**date_start** | **str** | The start date and time for querying alerts. | [optional] [readonly] +**date_end** | **str** | The end date and time for querying alerts. | [optional] [readonly] +**rule_id** | **int** | Unique ID of the rule. | [optional] [readonly] +**state** | **str** | Current state of the alert. Possible values: clear or trigger. | [optional] [readonly] +**severity** | **str** | The severity of the alert. | [optional] +**permalink** | **str** | Hyperlink to alerts list, with row expanded | [optional] +**api_links** | **List[Dict[str, object]]** | List of hyperlinks to other areas of the API | [optional] + +## Example + +```python +from alerts.models.legacy_alert import LegacyAlert + +# TODO update the JSON string below +json = "{}" +# create an instance of LegacyAlert from a JSON string +legacy_alert_instance = LegacyAlert.from_json(json) +# print the JSON string representation of the object +print(LegacyAlert.to_json()) + +# convert the object into a dict +legacy_alert_dict = legacy_alert_instance.to_dict() +# create an instance of LegacyAlert from a dict +legacy_alert_from_dict = LegacyAlert.from_dict(legacy_alert_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/alerts/docs/Link.md b/alerts/docs/Link.md new file mode 100644 index 00000000..7a8ebbc8 --- /dev/null +++ b/alerts/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 alerts.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/alerts/docs/Notification.md b/alerts/docs/Notification.md new file mode 100644 index 00000000..a1406bf0 --- /dev/null +++ b/alerts/docs/Notification.md @@ -0,0 +1,32 @@ +# Notification + +Alert notification object. See Alert notification integrations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | [**NotificationEmail**](NotificationEmail.md) | | [optional] +**third_party** | [**List[NotificationThirdParty]**](NotificationThirdParty.md) | Third party notifications. | [optional] +**webhook** | [**List[NotificationWebhook]**](NotificationWebhook.md) | Webhooks notifications. | [optional] + +## Example + +```python +from alerts.models.notification import Notification + +# TODO update the JSON string below +json = "{}" +# create an instance of Notification from a JSON string +notification_instance = Notification.from_json(json) +# print the JSON string representation of the object +print(Notification.to_json()) + +# convert the object into a dict +notification_dict = notification_instance.to_dict() +# create an instance of Notification from a dict +notification_from_dict = Notification.from_dict(notification_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/alerts_api/docs/NotificationEmail.md b/alerts/docs/NotificationEmail.md similarity index 83% rename from alerts_api/docs/NotificationEmail.md rename to alerts/docs/NotificationEmail.md index 0bf611e2..395b6220 100644 --- a/alerts_api/docs/NotificationEmail.md +++ b/alerts/docs/NotificationEmail.md @@ -3,6 +3,7 @@ Email notifications. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **recipients** | **List[str]** | An array containing the email addresses to receive notifications. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.notification_email import NotificationEmail +from alerts.models.notification_email import NotificationEmail # TODO update the JSON string below json = "{}" # create an instance of NotificationEmail from a JSON string notification_email_instance = NotificationEmail.from_json(json) # print the JSON string representation of the object -print NotificationEmail.to_json() +print(NotificationEmail.to_json()) # convert the object into a dict notification_email_dict = notification_email_instance.to_dict() # create an instance of NotificationEmail from a dict -notification_email_form_dict = notification_email.from_dict(notification_email_dict) +notification_email_from_dict = NotificationEmail.from_dict(notification_email_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/alerts_api/docs/NotificationThirdParty.md b/alerts/docs/NotificationThirdParty.md similarity index 80% rename from alerts_api/docs/NotificationThirdParty.md rename to alerts/docs/NotificationThirdParty.md index 236092a7..a5ed7252 100644 --- a/alerts_api/docs/NotificationThirdParty.md +++ b/alerts/docs/NotificationThirdParty.md @@ -3,6 +3,7 @@ Webhook notification. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **integration_id** | **List[str]** | Integration ID. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.notification_third_party import NotificationThirdParty +from alerts.models.notification_third_party import NotificationThirdParty # TODO update the JSON string below json = "{}" # create an instance of NotificationThirdParty from a JSON string notification_third_party_instance = NotificationThirdParty.from_json(json) # print the JSON string representation of the object -print NotificationThirdParty.to_json() +print(NotificationThirdParty.to_json()) # convert the object into a dict notification_third_party_dict = notification_third_party_instance.to_dict() # create an instance of NotificationThirdParty from a dict -notification_third_party_form_dict = notification_third_party.from_dict(notification_third_party_dict) +notification_third_party_from_dict = NotificationThirdParty.from_dict(notification_third_party_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/alerts_api/docs/NotificationWebhook.md b/alerts/docs/NotificationWebhook.md similarity index 81% rename from alerts_api/docs/NotificationWebhook.md rename to alerts/docs/NotificationWebhook.md index a2bacd5d..064432e1 100644 --- a/alerts_api/docs/NotificationWebhook.md +++ b/alerts/docs/NotificationWebhook.md @@ -3,6 +3,7 @@ Webhook notification. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **integration_id** | **List[str]** | Integration ID. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.notification_webhook import NotificationWebhook +from alerts.models.notification_webhook import NotificationWebhook # TODO update the JSON string below json = "{}" # create an instance of NotificationWebhook from a JSON string notification_webhook_instance = NotificationWebhook.from_json(json) # print the JSON string representation of the object -print NotificationWebhook.to_json() +print(NotificationWebhook.to_json()) # convert the object into a dict notification_webhook_dict = notification_webhook_instance.to_dict() # create an instance of NotificationWebhook from a dict -notification_webhook_form_dict = notification_webhook.from_dict(notification_webhook_dict) +notification_webhook_from_dict = NotificationWebhook.from_dict(notification_webhook_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/alerts/docs/PaginationLinks.md b/alerts/docs/PaginationLinks.md new file mode 100644 index 00000000..23da17c5 --- /dev/null +++ b/alerts/docs/PaginationLinks.md @@ -0,0 +1,30 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from alerts.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/alerts/docs/PaginationLinksLinks.md b/alerts/docs/PaginationLinksLinks.md new file mode 100644 index 00000000..e9b21b26 --- /dev/null +++ b/alerts/docs/PaginationLinksLinks.md @@ -0,0 +1,31 @@ +# PaginationLinksLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from alerts.models.pagination_links_links import PaginationLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinksLinks from a JSON string +pagination_links_links_instance = PaginationLinksLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinksLinks.to_json()) + +# convert the object into a dict +pagination_links_links_dict = pagination_links_links_instance.to_dict() +# create an instance of PaginationLinksLinks from a dict +pagination_links_links_from_dict = PaginationLinksLinks.from_dict(pagination_links_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/alerts_api/docs/Repeat.md b/alerts/docs/Repeat.md similarity index 89% rename from alerts_api/docs/Repeat.md rename to alerts/docs/Repeat.md index 442a2a67..bf0b1b53 100644 --- a/alerts_api/docs/Repeat.md +++ b/alerts/docs/Repeat.md @@ -3,6 +3,7 @@ Repeat options. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**RepeatType**](RepeatType.md) | | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.repeat import Repeat +from alerts.models.repeat import Repeat # TODO update the JSON string below json = "{}" # create an instance of Repeat from a JSON string repeat_instance = Repeat.from_json(json) # print the JSON string representation of the object -print Repeat.to_json() +print(Repeat.to_json()) # convert the object into a dict repeat_dict = repeat_instance.to_dict() # create an instance of Repeat from a dict -repeat_form_dict = repeat.from_dict(repeat_dict) +repeat_from_dict = Repeat.from_dict(repeat_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/alerts_api/docs/RepeatType.md b/alerts/docs/RepeatType.md similarity index 99% rename from alerts_api/docs/RepeatType.md rename to alerts/docs/RepeatType.md index 4ac64d65..5959e43f 100644 --- a/alerts_api/docs/RepeatType.md +++ b/alerts/docs/RepeatType.md @@ -3,6 +3,7 @@ Repeat options type. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts_api/docs/Rule.md b/alerts/docs/Rule.md similarity index 92% rename from alerts_api/docs/Rule.md rename to alerts/docs/Rule.md index df0c9606..cddb6d3c 100644 --- a/alerts_api/docs/Rule.md +++ b/alerts/docs/Rule.md @@ -2,12 +2,13 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] **rule_name** | **str** | Name of the alert rule. | **expression** | **str** | The expression of the alert rule. | -**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] **notify_on_clear** | **bool** | Send notification when alert clears. | [optional] **is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional] **alert_type** | [**AlertType**](AlertType.md) | | @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.rule import Rule +from alerts.models.rule import Rule # TODO update the JSON string below json = "{}" # create an instance of Rule from a JSON string rule_instance = Rule.from_json(json) # print the JSON string representation of the object -print Rule.to_json() +print(Rule.to_json()) # convert the object into a dict rule_dict = rule_instance.to_dict() # create an instance of Rule from a dict -rule_form_dict = rule.from_dict(rule_dict) +rule_from_dict = Rule.from_dict(rule_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/alerts_api/docs/RuleDetail.md b/alerts/docs/RuleDetail.md similarity index 91% rename from alerts_api/docs/RuleDetail.md rename to alerts/docs/RuleDetail.md index a92fa324..96b4f1ba 100644 --- a/alerts_api/docs/RuleDetail.md +++ b/alerts/docs/RuleDetail.md @@ -2,12 +2,13 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] **rule_name** | **str** | Name of the alert rule. | **expression** | **str** | The expression of the alert rule. | -**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] **notify_on_clear** | **bool** | Send notification when alert clears. | [optional] **is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional] **alert_type** | [**AlertType**](AlertType.md) | | @@ -24,19 +25,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.rule_detail import RuleDetail +from alerts.models.rule_detail import RuleDetail # TODO update the JSON string below json = "{}" # create an instance of RuleDetail from a JSON string rule_detail_instance = RuleDetail.from_json(json) # print the JSON string representation of the object -print RuleDetail.to_json() +print(RuleDetail.to_json()) # convert the object into a dict rule_detail_dict = rule_detail_instance.to_dict() # create an instance of RuleDetail from a dict -rule_detail_form_dict = rule_detail.from_dict(rule_detail_dict) +rule_detail_from_dict = RuleDetail.from_dict(rule_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/alerts_api/docs/RuleDetailUpdate.md b/alerts/docs/RuleDetailUpdate.md similarity index 90% rename from alerts_api/docs/RuleDetailUpdate.md rename to alerts/docs/RuleDetailUpdate.md index 0b19b42d..35a3c0f7 100644 --- a/alerts_api/docs/RuleDetailUpdate.md +++ b/alerts/docs/RuleDetailUpdate.md @@ -2,12 +2,13 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] **rule_name** | **str** | Name of the alert rule. | **expression** | **str** | The expression of the alert rule. | -**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] **notify_on_clear** | **bool** | Send notification when alert clears. | [optional] **is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional] **alert_type** | [**AlertType**](AlertType.md) | | @@ -24,19 +25,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.rule_detail_update import RuleDetailUpdate +from alerts.models.rule_detail_update import RuleDetailUpdate # TODO update the JSON string below json = "{}" # create an instance of RuleDetailUpdate from a JSON string rule_detail_update_instance = RuleDetailUpdate.from_json(json) # print the JSON string representation of the object -print RuleDetailUpdate.to_json() +print(RuleDetailUpdate.to_json()) # convert the object into a dict rule_detail_update_dict = rule_detail_update_instance.to_dict() # create an instance of RuleDetailUpdate from a dict -rule_detail_update_form_dict = rule_detail_update.from_dict(rule_detail_update_dict) +rule_detail_update_from_dict = RuleDetailUpdate.from_dict(rule_detail_update_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/alerts_api/docs/Rules.md b/alerts/docs/Rules.md similarity index 85% rename from alerts_api/docs/Rules.md rename to alerts/docs/Rules.md index b958300d..d013c944 100644 --- a/alerts_api/docs/Rules.md +++ b/alerts/docs/Rules.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_rules** | [**List[Rule]**](Rule.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from alerts_api.models.rules import Rules +from alerts.models.rules import Rules # TODO update the JSON string below json = "{}" # create an instance of Rules from a JSON string rules_instance = Rules.from_json(json) # print the JSON string representation of the object -print Rules.to_json() +print(Rules.to_json()) # convert the object into a dict rules_dict = rules_instance.to_dict() # create an instance of Rules from a dict -rules_form_dict = rules.from_dict(rules_dict) +rules_from_dict = Rules.from_dict(rules_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/alerts/docs/SelfLinks.md b/alerts/docs/SelfLinks.md new file mode 100644 index 00000000..e2425564 --- /dev/null +++ b/alerts/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from alerts.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/alerts/docs/SelfLinksLinks.md b/alerts/docs/SelfLinksLinks.md new file mode 100644 index 00000000..e90730e3 --- /dev/null +++ b/alerts/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from alerts.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/alerts/docs/Severity.md b/alerts/docs/Severity.md new file mode 100644 index 00000000..3abd8037 --- /dev/null +++ b/alerts/docs/Severity.md @@ -0,0 +1,12 @@ +# Severity + +The severity of the alert. + +## 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/alerts_api/docs/State.md b/alerts/docs/State.md similarity index 99% rename from alerts_api/docs/State.md rename to alerts/docs/State.md index ae4cac45..edf3a4b7 100644 --- a/alerts_api/docs/State.md +++ b/alerts/docs/State.md @@ -3,6 +3,7 @@ Current state of the alert. Possible values: clear or trigger. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts/docs/TestInterval.md b/alerts/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/alerts/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/alerts_api/docs/ThirdPartyIntegrationType.md b/alerts/docs/ThirdPartyIntegrationType.md similarity index 99% rename from alerts_api/docs/ThirdPartyIntegrationType.md rename to alerts/docs/ThirdPartyIntegrationType.md index cf3b8357..a91fdc5f 100644 --- a/alerts_api/docs/ThirdPartyIntegrationType.md +++ b/alerts/docs/ThirdPartyIntegrationType.md @@ -3,6 +3,7 @@ Integration type. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts/docs/UnauthorizedError.md b/alerts/docs/UnauthorizedError.md new file mode 100644 index 00000000..0edb2948 --- /dev/null +++ b/alerts/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from alerts.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/alerts/docs/UnexpandedTest.md b/alerts/docs/UnexpandedTest.md new file mode 100644 index 00000000..ca296489 --- /dev/null +++ b/alerts/docs/UnexpandedTest.md @@ -0,0 +1,31 @@ +# UnexpandedTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] + +## Example + +```python +from alerts.models.unexpanded_test import UnexpandedTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedTest from a JSON string +unexpanded_test_instance = UnexpandedTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedTest.to_json()) + +# convert the object into a dict +unexpanded_test_dict = unexpanded_test_instance.to_dict() +# create an instance of UnexpandedTest from a dict +unexpanded_test_from_dict = UnexpandedTest.from_dict(unexpanded_test_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/alerts/docs/ValidationError.md b/alerts/docs/ValidationError.md new file mode 100644 index 00000000..58b47d21 --- /dev/null +++ b/alerts/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from alerts.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/alerts/docs/ValidationErrorAllOfErrors.md b/alerts/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..d8c3e136 --- /dev/null +++ b/alerts/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from alerts.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/alerts_api/docs/WebhookIntegrationType.md b/alerts/docs/WebhookIntegrationType.md similarity index 99% rename from alerts_api/docs/WebhookIntegrationType.md rename to alerts/docs/WebhookIntegrationType.md index 7aa89505..7e42be8f 100644 --- a/alerts_api/docs/WebhookIntegrationType.md +++ b/alerts/docs/WebhookIntegrationType.md @@ -3,6 +3,7 @@ Integration type. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/alerts/pyproject.toml b/alerts/pyproject.toml new file mode 100644 index 00000000..8ed9bef6 --- /dev/null +++ b/alerts/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "alerts" +version = "1.0.0" +description = "Alerts API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Alerts API"] +include = ["alerts/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "alerts", + #"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/alerts_api/requirements.txt b/alerts/requirements.txt similarity index 100% rename from alerts_api/requirements.txt rename to alerts/requirements.txt diff --git a/alerts_api/setup.cfg b/alerts/setup.cfg similarity index 100% rename from alerts_api/setup.cfg rename to alerts/setup.cfg diff --git a/alerts/setup.py b/alerts/setup.py new file mode 100644 index 00000000..6d7118fe --- /dev/null +++ b/alerts/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "alerts" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Alerts API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/alerts", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Alerts API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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). + """, # noqa: E501 + package_data={"alerts": ["py.typed"]}, +) diff --git a/alerts/test-requirements.txt b/alerts/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/alerts/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/alerts_api/test/__init__.py b/alerts/test/__init__.py similarity index 100% rename from alerts_api/test/__init__.py rename to alerts/test/__init__.py diff --git a/alerts/test/test_alert.py b/alerts/test/test_alert.py new file mode 100644 index 00000000..7c59edc8 --- /dev/null +++ b/alerts/test/test_alert.py @@ -0,0 +1,93 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert import Alert + +class TestAlert(unittest.TestCase): + """Alert unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Alert: + """Test Alert + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Alert` + """ + model = Alert() + if include_optional: + return Alert( + id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + alert_type = 'http-server', + start_date = '2020-04-23T13:43:16Z', + end_date = '2020-04-23T13:43:16Z', + violation_count = 2, + duration = 60, + suppressed = False, + meta = alerts.models.base_alert_all_of_meta.BaseAlert_allOf_meta( + version = 1, ), + links = alerts.models.alert_links__links.AlertLinks__links( + test = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + rule = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + app_link = , + self = , ), + alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + date_start = '2020-04-23 13:43:16', + date_end = '2020-04-23 13:43:16', + rule_id = 127094, + state = 'ACTIVE', + severity = 'MAJOR', + permalink = 'https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12', + api_links = [ + { } + ], + alert_rule_id = '127094', + alert_state = 'active', + alert_severity = 'major' + ) + else: + return Alert( + ) + """ + + def testAlert(self): + """Test Alert""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_detail.py b/alerts/test/test_alert_detail.py new file mode 100644 index 00000000..c58f1144 --- /dev/null +++ b/alerts/test/test_alert_detail.py @@ -0,0 +1,91 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_detail import AlertDetail + +class TestAlertDetail(unittest.TestCase): + """AlertDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertDetail: + """Test AlertDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertDetail` + """ + model = AlertDetail() + if include_optional: + return AlertDetail( + id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + alert_type = 'http-server', + start_date = '2020-04-23T13:43:16Z', + end_date = '2020-04-23T13:43:16Z', + violation_count = 2, + duration = 60, + suppressed = False, + meta = alerts.models.base_alert_all_of_meta.BaseAlert_allOf_meta( + version = 1, ), + links = alerts.models.alert_links__links.AlertLinks__links( + test = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + rule = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + app_link = , + self = , ), + state = 'active', + severity = 'major', + details = [ + alerts.models.alert_metric_detail.AlertMetricDetail( + end = null, + id = '3379', + name = 'Bucharest, Romania', + start = null, + state = 'active', + type = 'cea_agent', ) + ] + ) + else: + return AlertDetail( + ) + """ + + def testAlertDetail(self): + """Test AlertDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_direction.py b/alerts/test/test_alert_direction.py new file mode 100644 index 00000000..7125a55f --- /dev/null +++ b/alerts/test/test_alert_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_direction import AlertDirection + +class TestAlertDirection(unittest.TestCase): + """AlertDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertDirection(self): + """Test AlertDirection""" + # inst = AlertDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_links.py b/alerts/test/test_alert_links.py new file mode 100644 index 00000000..f2c00b38 --- /dev/null +++ b/alerts/test/test_alert_links.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_links import AlertLinks + +class TestAlertLinks(unittest.TestCase): + """AlertLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertLinks: + """Test AlertLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertLinks` + """ + model = AlertLinks() + if include_optional: + return AlertLinks( + links = alerts.models.alert_links__links.AlertLinks__links( + test = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + rule = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + app_link = , + self = , ) + ) + else: + return AlertLinks( + ) + """ + + def testAlertLinks(self): + """Test AlertLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_links_links.py b/alerts/test/test_alert_links_links.py new file mode 100644 index 00000000..6f6c5b8e --- /dev/null +++ b/alerts/test/test_alert_links_links.py @@ -0,0 +1,86 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_links_links import AlertLinksLinks + +class TestAlertLinksLinks(unittest.TestCase): + """AlertLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertLinksLinks: + """Test AlertLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertLinksLinks` + """ + model = AlertLinksLinks() + if include_optional: + return AlertLinksLinks( + test = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + rule = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + app_link = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return AlertLinksLinks( + ) + """ + + def testAlertLinksLinks(self): + """Test AlertLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_metric_detail.py b/alerts/test/test_alert_metric_detail.py new file mode 100644 index 00000000..1fa7da5c --- /dev/null +++ b/alerts/test/test_alert_metric_detail.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_metric_detail import AlertMetricDetail + +class TestAlertMetricDetail(unittest.TestCase): + """AlertMetricDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertMetricDetail: + """Test AlertMetricDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertMetricDetail` + """ + model = AlertMetricDetail() + if include_optional: + return AlertMetricDetail( + end = None, + id = '3379', + name = 'Bucharest, Romania', + start = None, + state = 'active', + type = 'cea_agent' + ) + else: + return AlertMetricDetail( + ) + """ + + def testAlertMetricDetail(self): + """Test AlertMetricDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_metric_detail_end.py b/alerts/test/test_alert_metric_detail_end.py new file mode 100644 index 00000000..f8da5eee --- /dev/null +++ b/alerts/test/test_alert_metric_detail_end.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_metric_detail_end import AlertMetricDetailEnd + +class TestAlertMetricDetailEnd(unittest.TestCase): + """AlertMetricDetailEnd unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertMetricDetailEnd: + """Test AlertMetricDetailEnd + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertMetricDetailEnd` + """ + model = AlertMetricDetailEnd() + if include_optional: + return AlertMetricDetailEnd( + metrics = '' + ) + else: + return AlertMetricDetailEnd( + ) + """ + + def testAlertMetricDetailEnd(self): + """Test AlertMetricDetailEnd""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_metric_detail_start.py b/alerts/test/test_alert_metric_detail_start.py new file mode 100644 index 00000000..05442639 --- /dev/null +++ b/alerts/test/test_alert_metric_detail_start.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_metric_detail_start import AlertMetricDetailStart + +class TestAlertMetricDetailStart(unittest.TestCase): + """AlertMetricDetailStart unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertMetricDetailStart: + """Test AlertMetricDetailStart + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertMetricDetailStart` + """ + model = AlertMetricDetailStart() + if include_optional: + return AlertMetricDetailStart( + metrics = '' + ) + else: + return AlertMetricDetailStart( + ) + """ + + def testAlertMetricDetailStart(self): + """Test AlertMetricDetailStart""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_metrics.py b/alerts/test/test_alert_metrics.py new file mode 100644 index 00000000..a339934c --- /dev/null +++ b/alerts/test/test_alert_metrics.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_metrics import AlertMetrics + +class TestAlertMetrics(unittest.TestCase): + """AlertMetrics unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertMetrics: + """Test AlertMetrics + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertMetrics` + """ + model = AlertMetrics() + if include_optional: + return AlertMetrics( + metrics = '' + ) + else: + return AlertMetrics( + ) + """ + + def testAlertMetrics(self): + """Test AlertMetrics""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_rounds_violation_mode.py b/alerts/test/test_alert_rounds_violation_mode.py new file mode 100644 index 00000000..587e8edd --- /dev/null +++ b/alerts/test/test_alert_rounds_violation_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode + +class TestAlertRoundsViolationMode(unittest.TestCase): + """AlertRoundsViolationMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertRoundsViolationMode(self): + """Test AlertRoundsViolationMode""" + # inst = AlertRoundsViolationMode() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_rule.py b/alerts/test/test_alert_rule.py new file mode 100644 index 00000000..f32710b2 --- /dev/null +++ b/alerts/test/test_alert_rule.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_rule import AlertRule + +class TestAlertRule(unittest.TestCase): + """AlertRule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertRule: + """Test AlertRule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertRule` + """ + model = AlertRule() + if include_optional: + return AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major' + ) + else: + return AlertRule( + ) + """ + + def testAlertRule(self): + """Test AlertRule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_suppression_window.py b/alerts/test/test_alert_suppression_window.py new file mode 100644 index 00000000..1cb3153b --- /dev/null +++ b/alerts/test/test_alert_suppression_window.py @@ -0,0 +1,67 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_suppression_window import AlertSuppressionWindow + +class TestAlertSuppressionWindow(unittest.TestCase): + """AlertSuppressionWindow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertSuppressionWindow: + """Test AlertSuppressionWindow + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertSuppressionWindow` + """ + model = AlertSuppressionWindow() + if include_optional: + return AlertSuppressionWindow( + alert_suppression_window_id = '2411', + name = 'Monthly maintenance', + is_enabled = False, + status = 'ended', + start_date = '2017-07-01T05:00Z', + duration = 0, + repeat = alerts.models.repeat.Repeat( + type = 'week', + interval_type = 'day', + interval_length = 2, + days_of_week = [ + 'sun' + ], ), + end_repeat = alerts.models.end_repeat.EndRepeat( + type = 'never', + count = 3, + date = 'Sat Jul 01 01:00:00 BST 2017', ) + ) + else: + return AlertSuppressionWindow( + ) + """ + + def testAlertSuppressionWindow(self): + """Test AlertSuppressionWindow""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_suppression_window_request.py b/alerts/test/test_alert_suppression_window_request.py new file mode 100644 index 00000000..8dbe010c --- /dev/null +++ b/alerts/test/test_alert_suppression_window_request.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_suppression_window_request import AlertSuppressionWindowRequest + +class TestAlertSuppressionWindowRequest(unittest.TestCase): + """AlertSuppressionWindowRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertSuppressionWindowRequest: + """Test AlertSuppressionWindowRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertSuppressionWindowRequest` + """ + model = AlertSuppressionWindowRequest() + if include_optional: + return AlertSuppressionWindowRequest( + alert_suppression_window_id = '2411', + name = 'Monthly maintenance', + is_enabled = False, + status = 'ended', + start_date = '2017-07-01T05:00Z', + duration = 0, + repeat = alerts.models.repeat.Repeat( + type = 'week', + interval_type = 'day', + interval_length = 2, + days_of_week = [ + 'sun' + ], ), + end_repeat = alerts.models.end_repeat.EndRepeat( + type = 'never', + count = 3, + date = 'Sat Jul 01 01:00:00 BST 2017', ), + tests = [ + '71687' + ] + ) + else: + return AlertSuppressionWindowRequest( + ) + """ + + def testAlertSuppressionWindowRequest(self): + """Test AlertSuppressionWindowRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_suppression_window_state.py b/alerts/test/test_alert_suppression_window_state.py new file mode 100644 index 00000000..b90bd9c1 --- /dev/null +++ b/alerts/test/test_alert_suppression_window_state.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_suppression_window_state import AlertSuppressionWindowState + +class TestAlertSuppressionWindowState(unittest.TestCase): + """AlertSuppressionWindowState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertSuppressionWindowState(self): + """Test AlertSuppressionWindowState""" + # inst = AlertSuppressionWindowState() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_suppression_windows.py b/alerts/test/test_alert_suppression_windows.py new file mode 100644 index 00000000..28139f5a --- /dev/null +++ b/alerts/test/test_alert_suppression_windows.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_suppression_windows import AlertSuppressionWindows + +class TestAlertSuppressionWindows(unittest.TestCase): + """AlertSuppressionWindows unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertSuppressionWindows: + """Test AlertSuppressionWindows + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertSuppressionWindows` + """ + model = AlertSuppressionWindows() + if include_optional: + return AlertSuppressionWindows( + alert_suppression_windows = [ + null + ] + ) + else: + return AlertSuppressionWindows( + ) + """ + + def testAlertSuppressionWindows(self): + """Test AlertSuppressionWindows""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_suppression_windows_alert_suppression_windows_inner.py b/alerts/test/test_alert_suppression_windows_alert_suppression_windows_inner.py new file mode 100644 index 00000000..3c48da77 --- /dev/null +++ b/alerts/test/test_alert_suppression_windows_alert_suppression_windows_inner.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner + +class TestAlertSuppressionWindowsAlertSuppressionWindowsInner(unittest.TestCase): + """AlertSuppressionWindowsAlertSuppressionWindowsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertSuppressionWindowsAlertSuppressionWindowsInner: + """Test AlertSuppressionWindowsAlertSuppressionWindowsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertSuppressionWindowsAlertSuppressionWindowsInner` + """ + model = AlertSuppressionWindowsAlertSuppressionWindowsInner() + if include_optional: + return AlertSuppressionWindowsAlertSuppressionWindowsInner( + alert_suppression_window_id = '2411', + name = 'Monthly maintenance', + is_enabled = False, + status = 'ended', + start_date = '2017-07-01T05:00Z', + duration = 0, + repeat = alerts.models.repeat.Repeat( + type = 'week', + interval_type = 'day', + interval_length = 2, + days_of_week = [ + 'sun' + ], ), + end_repeat = alerts.models.end_repeat.EndRepeat( + type = 'never', + count = 3, + date = 'Sat Jul 01 01:00:00 BST 2017', ), + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return AlertSuppressionWindowsAlertSuppressionWindowsInner( + ) + """ + + def testAlertSuppressionWindowsAlertSuppressionWindowsInner(self): + """Test AlertSuppressionWindowsAlertSuppressionWindowsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alert_type.py b/alerts/test/test_alert_type.py new file mode 100644 index 00000000..066d7e27 --- /dev/null +++ b/alerts/test/test_alert_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alert_type import AlertType + +class TestAlertType(unittest.TestCase): + """AlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertType(self): + """Test AlertType""" + # inst = AlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_alerts.py b/alerts/test/test_alerts.py new file mode 100644 index 00000000..fd90b10f --- /dev/null +++ b/alerts/test/test_alerts.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.alerts import Alerts + +class TestAlerts(unittest.TestCase): + """Alerts unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Alerts: + """Test Alerts + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Alerts` + """ + model = Alerts() + if include_optional: + return Alerts( + alerts = [ + null + ] + ) + else: + return Alerts( + ) + """ + + def testAlerts(self): + """Test Alerts""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_base_alert.py b/alerts/test/test_base_alert.py new file mode 100644 index 00000000..fa6669fa --- /dev/null +++ b/alerts/test/test_base_alert.py @@ -0,0 +1,80 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.base_alert import BaseAlert + +class TestBaseAlert(unittest.TestCase): + """BaseAlert unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseAlert: + """Test BaseAlert + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseAlert` + """ + model = BaseAlert() + if include_optional: + return BaseAlert( + links = alerts.models.alert_links__links.AlertLinks__links( + test = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + rule = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + app_link = , + self = , ), + id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + alert_type = 'http-server', + start_date = '2020-04-23T13:43:16Z', + end_date = '2020-04-23T13:43:16Z', + violation_count = 2, + duration = 60, + suppressed = False, + meta = alerts.models.base_alert_all_of_meta.BaseAlert_allOf_meta( + version = 1, ) + ) + else: + return BaseAlert( + ) + """ + + def testBaseAlert(self): + """Test BaseAlert""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_base_alert_all_of_meta.py b/alerts/test/test_base_alert_all_of_meta.py new file mode 100644 index 00000000..ec8745dc --- /dev/null +++ b/alerts/test/test_base_alert_all_of_meta.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.base_alert_all_of_meta import BaseAlertAllOfMeta + +class TestBaseAlertAllOfMeta(unittest.TestCase): + """BaseAlertAllOfMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseAlertAllOfMeta: + """Test BaseAlertAllOfMeta + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseAlertAllOfMeta` + """ + model = BaseAlertAllOfMeta() + if include_optional: + return BaseAlertAllOfMeta( + version = 1 + ) + else: + return BaseAlertAllOfMeta( + ) + """ + + def testBaseAlertAllOfMeta(self): + """Test BaseAlertAllOfMeta""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_base_test.py b/alerts/test/test_base_test.py new file mode 100644 index 00000000..6a762fa7 --- /dev/null +++ b/alerts/test/test_base_test.py @@ -0,0 +1,68 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.base_test import BaseTest + +class TestBaseTest(unittest.TestCase): + """BaseTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseTest: + """Test BaseTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseTest` + """ + model = BaseTest() + if include_optional: + return BaseTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [ + alerts.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ] + ) + else: + return BaseTest( + ) + """ + + def testBaseTest(self): + """Test BaseTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_complete_alert_suppression_window.py b/alerts/test/test_complete_alert_suppression_window.py new file mode 100644 index 00000000..6145aab0 --- /dev/null +++ b/alerts/test/test_complete_alert_suppression_window.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow + +class TestCompleteAlertSuppressionWindow(unittest.TestCase): + """CompleteAlertSuppressionWindow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CompleteAlertSuppressionWindow: + """Test CompleteAlertSuppressionWindow + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CompleteAlertSuppressionWindow` + """ + model = CompleteAlertSuppressionWindow() + if include_optional: + return CompleteAlertSuppressionWindow( + alert_suppression_window_id = '2411', + name = 'Monthly maintenance', + is_enabled = False, + status = 'ended', + start_date = '2017-07-01T05:00Z', + duration = 0, + repeat = alerts.models.repeat.Repeat( + type = 'week', + interval_type = 'day', + interval_length = 2, + days_of_week = [ + 'sun' + ], ), + end_repeat = alerts.models.end_repeat.EndRepeat( + type = 'never', + count = 3, + date = 'Sat Jul 01 01:00:00 BST 2017', ), + tests = [ + null + ] + ) + else: + return CompleteAlertSuppressionWindow( + ) + """ + + def testCompleteAlertSuppressionWindow(self): + """Test CompleteAlertSuppressionWindow""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_create_alert_rule201_response.py b/alerts/test/test_create_alert_rule201_response.py new file mode 100644 index 00000000..5549968a --- /dev/null +++ b/alerts/test/test_create_alert_rule201_response.py @@ -0,0 +1,93 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.create_alert_rule201_response import CreateAlertRule201Response + +class TestCreateAlertRule201Response(unittest.TestCase): + """CreateAlertRule201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateAlertRule201Response: + """Test CreateAlertRule201Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateAlertRule201Response` + """ + model = CreateAlertRule201Response() + if include_optional: + return CreateAlertRule201Response( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major', + notifications = alerts.models.notification.Notification( + email = alerts.models.notification_email.NotificationEmail( + recipients = noreply@thousandeyes.com, + message = 'Notification message', ), + third_party = [ + alerts.models.notification_third_party.NotificationThirdParty( + integration_id = sl-101, + integration_type = 'slack', ) + ], + webhook = [ + alerts.models.notification_webhook.NotificationWebhook( + integration_id = wb-201, ) + ], ), + test_ids = ["281474976710706","271659"], + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return CreateAlertRule201Response( + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + alert_type = 'http-server', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + ) + """ + + def testCreateAlertRule201Response(self): + """Test CreateAlertRule201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_create_suppression_windows201_response.py b/alerts/test/test_create_suppression_windows201_response.py new file mode 100644 index 00000000..54e1ea08 --- /dev/null +++ b/alerts/test/test_create_suppression_windows201_response.py @@ -0,0 +1,80 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.create_suppression_windows201_response import CreateSuppressionWindows201Response + +class TestCreateSuppressionWindows201Response(unittest.TestCase): + """CreateSuppressionWindows201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateSuppressionWindows201Response: + """Test CreateSuppressionWindows201Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateSuppressionWindows201Response` + """ + model = CreateSuppressionWindows201Response() + if include_optional: + return CreateSuppressionWindows201Response( + alert_suppression_window_id = '2411', + name = 'Monthly maintenance', + is_enabled = False, + status = 'ended', + start_date = '2017-07-01T05:00Z', + duration = 0, + repeat = alerts.models.repeat.Repeat( + type = 'week', + interval_type = 'day', + interval_length = 2, + days_of_week = [ + 'sun' + ], ), + end_repeat = alerts.models.end_repeat.EndRepeat( + type = 'never', + count = 3, + date = 'Sat Jul 01 01:00:00 BST 2017', ), + tests = [ + null + ], + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return CreateSuppressionWindows201Response( + ) + """ + + def testCreateSuppressionWindows201Response(self): + """Test CreateSuppressionWindows201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_days_of_week.py b/alerts/test/test_days_of_week.py new file mode 100644 index 00000000..878a3a55 --- /dev/null +++ b/alerts/test/test_days_of_week.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.days_of_week import DaysOfWeek + +class TestDaysOfWeek(unittest.TestCase): + """DaysOfWeek unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDaysOfWeek(self): + """Test DaysOfWeek""" + # inst = DaysOfWeek() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_end_repeat.py b/alerts/test/test_end_repeat.py new file mode 100644 index 00000000..2fec50eb --- /dev/null +++ b/alerts/test/test_end_repeat.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.end_repeat import EndRepeat + +class TestEndRepeat(unittest.TestCase): + """EndRepeat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndRepeat: + """Test EndRepeat + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndRepeat` + """ + model = EndRepeat() + if include_optional: + return EndRepeat( + type = 'never', + count = 3, + var_date = 'Sat Jul 01 01:00:00 BST 2017' + ) + else: + return EndRepeat( + ) + """ + + def testEndRepeat(self): + """Test EndRepeat""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_end_repeat_type.py b/alerts/test/test_end_repeat_type.py new file mode 100644 index 00000000..97841bcd --- /dev/null +++ b/alerts/test/test_end_repeat_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.end_repeat_type import EndRepeatType + +class TestEndRepeatType(unittest.TestCase): + """EndRepeatType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndRepeatType(self): + """Test EndRepeatType""" + # inst = EndRepeatType() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_error.py b/alerts/test/test_error.py new file mode 100644 index 00000000..7c71550f --- /dev/null +++ b/alerts/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_expand.py b/alerts/test/test_expand.py new file mode 100644 index 00000000..0b74e54a --- /dev/null +++ b/alerts/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_get_alert_rule_details200_response.py b/alerts/test/test_get_alert_rule_details200_response.py new file mode 100644 index 00000000..95ae4544 --- /dev/null +++ b/alerts/test/test_get_alert_rule_details200_response.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response + +class TestGetAlertRuleDetails200Response(unittest.TestCase): + """GetAlertRuleDetails200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAlertRuleDetails200Response: + """Test GetAlertRuleDetails200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAlertRuleDetails200Response` + """ + model = GetAlertRuleDetails200Response() + if include_optional: + return GetAlertRuleDetails200Response( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major', + notifications = alerts.models.notification.Notification( + email = alerts.models.notification_email.NotificationEmail( + recipients = noreply@thousandeyes.com, + message = 'Notification message', ), + third_party = [ + alerts.models.notification_third_party.NotificationThirdParty( + integration_id = sl-101, + integration_type = 'slack', ) + ], + webhook = [ + alerts.models.notification_webhook.NotificationWebhook( + integration_id = wb-201, ) + ], ), + tests = [ + null + ], + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetAlertRuleDetails200Response( + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + alert_type = 'http-server', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + ) + """ + + def testGetAlertRuleDetails200Response(self): + """Test GetAlertRuleDetails200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_get_alerts200_response.py b/alerts/test/test_get_alerts200_response.py new file mode 100644 index 00000000..6a4d76c6 --- /dev/null +++ b/alerts/test/test_get_alerts200_response.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.get_alerts200_response import GetAlerts200Response + +class TestGetAlerts200Response(unittest.TestCase): + """GetAlerts200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAlerts200Response: + """Test GetAlerts200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAlerts200Response` + """ + model = GetAlerts200Response() + if include_optional: + return GetAlerts200Response( + alerts = [ + null + ], + links = alerts.models.pagination_links__links.PaginationLinks__links( + previous = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetAlerts200Response( + ) + """ + + def testGetAlerts200Response(self): + """Test GetAlerts200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_get_alerts_rules200_response.py b/alerts/test/test_get_alerts_rules200_response.py new file mode 100644 index 00000000..05bb640e --- /dev/null +++ b/alerts/test/test_get_alerts_rules200_response.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.get_alerts_rules200_response import GetAlertsRules200Response + +class TestGetAlertsRules200Response(unittest.TestCase): + """GetAlertsRules200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAlertsRules200Response: + """Test GetAlertsRules200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAlertsRules200Response` + """ + model = GetAlertsRules200Response() + if include_optional: + return GetAlertsRules200Response( + alert_rules = [ + alerts.models.rule.Rule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major', ) + ], + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetAlertsRules200Response( + ) + """ + + def testGetAlertsRules200Response(self): + """Test GetAlertsRules200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_get_suppression_windows200_response.py b/alerts/test/test_get_suppression_windows200_response.py new file mode 100644 index 00000000..5087416c --- /dev/null +++ b/alerts/test/test_get_suppression_windows200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.get_suppression_windows200_response import GetSuppressionWindows200Response + +class TestGetSuppressionWindows200Response(unittest.TestCase): + """GetSuppressionWindows200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetSuppressionWindows200Response: + """Test GetSuppressionWindows200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetSuppressionWindows200Response` + """ + model = GetSuppressionWindows200Response() + if include_optional: + return GetSuppressionWindows200Response( + alert_suppression_windows = [ + null + ], + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetSuppressionWindows200Response( + ) + """ + + def testGetSuppressionWindows200Response(self): + """Test GetSuppressionWindows200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_interval_type.py b/alerts/test/test_interval_type.py new file mode 100644 index 00000000..35af06c0 --- /dev/null +++ b/alerts/test/test_interval_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.interval_type import IntervalType + +class TestIntervalType(unittest.TestCase): + """IntervalType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIntervalType(self): + """Test IntervalType""" + # inst = IntervalType() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_legacy_alert.py b/alerts/test/test_legacy_alert.py new file mode 100644 index 00000000..9152b4d6 --- /dev/null +++ b/alerts/test/test_legacy_alert.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.legacy_alert import LegacyAlert + +class TestLegacyAlert(unittest.TestCase): + """LegacyAlert unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LegacyAlert: + """Test LegacyAlert + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LegacyAlert` + """ + model = LegacyAlert() + if include_optional: + return LegacyAlert( + alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', + date_start = '2020-04-23 13:43:16', + date_end = '2020-04-23 13:43:16', + rule_id = 127094, + state = 'ACTIVE', + severity = 'MAJOR', + permalink = 'https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12', + api_links = [ + { } + ] + ) + else: + return LegacyAlert( + ) + """ + + def testLegacyAlert(self): + """Test LegacyAlert""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_link.py b/alerts/test/test_link.py new file mode 100644 index 00000000..0e84d8d9 --- /dev/null +++ b/alerts/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_notification.py b/alerts/test/test_notification.py new file mode 100644 index 00000000..1e60b6c2 --- /dev/null +++ b/alerts/test/test_notification.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.notification import Notification + +class TestNotification(unittest.TestCase): + """Notification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Notification: + """Test Notification + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Notification` + """ + model = Notification() + if include_optional: + return Notification( + email = alerts.models.notification_email.NotificationEmail( + recipients = noreply@thousandeyes.com, + message = 'Notification message', ), + third_party = [ + alerts.models.notification_third_party.NotificationThirdParty( + integration_id = sl-101, + integration_type = 'slack', ) + ], + webhook = [ + alerts.models.notification_webhook.NotificationWebhook( + integration_id = wb-201, + integration_type = 'webhook', ) + ] + ) + else: + return Notification( + ) + """ + + def testNotification(self): + """Test Notification""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_notification_email.py b/alerts/test/test_notification_email.py new file mode 100644 index 00000000..de8ca02e --- /dev/null +++ b/alerts/test/test_notification_email.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.notification_email import NotificationEmail + +class TestNotificationEmail(unittest.TestCase): + """NotificationEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NotificationEmail: + """Test NotificationEmail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NotificationEmail` + """ + model = NotificationEmail() + if include_optional: + return NotificationEmail( + recipients = noreply@thousandeyes.com, + message = 'Notification message' + ) + else: + return NotificationEmail( + ) + """ + + def testNotificationEmail(self): + """Test NotificationEmail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_notification_third_party.py b/alerts/test/test_notification_third_party.py new file mode 100644 index 00000000..0b26be15 --- /dev/null +++ b/alerts/test/test_notification_third_party.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.notification_third_party import NotificationThirdParty + +class TestNotificationThirdParty(unittest.TestCase): + """NotificationThirdParty unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NotificationThirdParty: + """Test NotificationThirdParty + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NotificationThirdParty` + """ + model = NotificationThirdParty() + if include_optional: + return NotificationThirdParty( + integration_id = sl-101, + integration_type = 'slack' + ) + else: + return NotificationThirdParty( + ) + """ + + def testNotificationThirdParty(self): + """Test NotificationThirdParty""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_notification_webhook.py b/alerts/test/test_notification_webhook.py new file mode 100644 index 00000000..7a5ec468 --- /dev/null +++ b/alerts/test/test_notification_webhook.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.notification_webhook import NotificationWebhook + +class TestNotificationWebhook(unittest.TestCase): + """NotificationWebhook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NotificationWebhook: + """Test NotificationWebhook + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NotificationWebhook` + """ + model = NotificationWebhook() + if include_optional: + return NotificationWebhook( + integration_id = wb-201, + integration_type = 'webhook' + ) + else: + return NotificationWebhook( + ) + """ + + def testNotificationWebhook(self): + """Test NotificationWebhook""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_pagination_links.py b/alerts/test/test_pagination_links.py new file mode 100644 index 00000000..afff9f76 --- /dev/null +++ b/alerts/test/test_pagination_links.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.pagination_links import PaginationLinks + +class TestPaginationLinks(unittest.TestCase): + """PaginationLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinks: + """Test PaginationLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinks` + """ + model = PaginationLinks() + if include_optional: + return PaginationLinks( + links = alerts.models.pagination_links__links.PaginationLinks__links( + previous = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return PaginationLinks( + ) + """ + + def testPaginationLinks(self): + """Test PaginationLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_pagination_links_links.py b/alerts/test/test_pagination_links_links.py new file mode 100644 index 00000000..9760bac8 --- /dev/null +++ b/alerts/test/test_pagination_links_links.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.pagination_links_links import PaginationLinksLinks + +class TestPaginationLinksLinks(unittest.TestCase): + """PaginationLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinksLinks: + """Test PaginationLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinksLinks` + """ + model = PaginationLinksLinks() + if include_optional: + return PaginationLinksLinks( + previous = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationLinksLinks( + ) + """ + + def testPaginationLinksLinks(self): + """Test PaginationLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_repeat.py b/alerts/test/test_repeat.py new file mode 100644 index 00000000..e13a7d3c --- /dev/null +++ b/alerts/test/test_repeat.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.repeat import Repeat + +class TestRepeat(unittest.TestCase): + """Repeat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Repeat: + """Test Repeat + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Repeat` + """ + model = Repeat() + if include_optional: + return Repeat( + type = 'week', + interval_type = 'day', + interval_length = 2, + days_of_week = [ + 'sun' + ] + ) + else: + return Repeat( + ) + """ + + def testRepeat(self): + """Test Repeat""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_repeat_type.py b/alerts/test/test_repeat_type.py new file mode 100644 index 00000000..0ab19fe9 --- /dev/null +++ b/alerts/test/test_repeat_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.repeat_type import RepeatType + +class TestRepeatType(unittest.TestCase): + """RepeatType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepeatType(self): + """Test RepeatType""" + # inst = RepeatType() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_rule.py b/alerts/test/test_rule.py new file mode 100644 index 00000000..9f5970cf --- /dev/null +++ b/alerts/test/test_rule.py @@ -0,0 +1,69 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.rule import Rule + +class TestRule(unittest.TestCase): + """Rule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Rule: + """Test Rule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Rule` + """ + model = Rule() + if include_optional: + return Rule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major' + ) + else: + return Rule( + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + alert_type = 'http-server', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + ) + """ + + def testRule(self): + """Test Rule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_rule_detail.py b/alerts/test/test_rule_detail.py new file mode 100644 index 00000000..f28984bf --- /dev/null +++ b/alerts/test/test_rule_detail.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.rule_detail import RuleDetail + +class TestRuleDetail(unittest.TestCase): + """RuleDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RuleDetail: + """Test RuleDetail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RuleDetail` + """ + model = RuleDetail() + if include_optional: + return RuleDetail( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major', + notifications = alerts.models.notification.Notification( + email = alerts.models.notification_email.NotificationEmail( + recipients = noreply@thousandeyes.com, + message = 'Notification message', ), + third_party = [ + alerts.models.notification_third_party.NotificationThirdParty( + integration_id = sl-101, + integration_type = 'slack', ) + ], + webhook = [ + alerts.models.notification_webhook.NotificationWebhook( + integration_id = wb-201, ) + ], ), + tests = [ + null + ] + ) + else: + return RuleDetail( + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + alert_type = 'http-server', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + ) + """ + + def testRuleDetail(self): + """Test RuleDetail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_rule_detail_update.py b/alerts/test/test_rule_detail_update.py new file mode 100644 index 00000000..01596518 --- /dev/null +++ b/alerts/test/test_rule_detail_update.py @@ -0,0 +1,83 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.rule_detail_update import RuleDetailUpdate + +class TestRuleDetailUpdate(unittest.TestCase): + """RuleDetailUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RuleDetailUpdate: + """Test RuleDetailUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RuleDetailUpdate` + """ + model = RuleDetailUpdate() + if include_optional: + return RuleDetailUpdate( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major', + notifications = alerts.models.notification.Notification( + email = alerts.models.notification_email.NotificationEmail( + recipients = noreply@thousandeyes.com, + message = 'Notification message', ), + third_party = [ + alerts.models.notification_third_party.NotificationThirdParty( + integration_id = sl-101, + integration_type = 'slack', ) + ], + webhook = [ + alerts.models.notification_webhook.NotificationWebhook( + integration_id = wb-201, ) + ], ), + test_ids = ["281474976710706","271659"] + ) + else: + return RuleDetailUpdate( + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + alert_type = 'http-server', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + ) + """ + + def testRuleDetailUpdate(self): + """Test RuleDetailUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_rules.py b/alerts/test/test_rules.py new file mode 100644 index 00000000..d082d679 --- /dev/null +++ b/alerts/test/test_rules.py @@ -0,0 +1,67 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.rules import Rules + +class TestRules(unittest.TestCase): + """Rules unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Rules: + """Test Rules + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Rules` + """ + model = Rules() + if include_optional: + return Rules( + alert_rules = [ + alerts.models.rule.Rule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + notify_on_clear = True, + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + include_covered_prefixes = True, + severity = 'major', ) + ] + ) + else: + return Rules( + ) + """ + + def testRules(self): + """Test Rules""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_self_links.py b/alerts/test/test_self_links.py new file mode 100644 index 00000000..bf0d9ed3 --- /dev/null +++ b/alerts/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = alerts.models.self_links__links.SelfLinks__links( + self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_self_links_links.py b/alerts/test/test_self_links_links.py new file mode 100644 index 00000000..df8d35e1 --- /dev/null +++ b/alerts/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = alerts.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_severity.py b/alerts/test/test_severity.py new file mode 100644 index 00000000..91c598e7 --- /dev/null +++ b/alerts/test/test_severity.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.severity import Severity + +class TestSeverity(unittest.TestCase): + """Severity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSeverity(self): + """Test Severity""" + # inst = Severity() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_state.py b/alerts/test/test_state.py new file mode 100644 index 00000000..11ae2e91 --- /dev/null +++ b/alerts/test/test_state.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.state import State + +class TestState(unittest.TestCase): + """State unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testState(self): + """Test State""" + # inst = State() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_test_interval.py b/alerts/test/test_test_interval.py new file mode 100644 index 00000000..2ebad05d --- /dev/null +++ b/alerts/test/test_test_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_third_party_integration_type.py b/alerts/test/test_third_party_integration_type.py new file mode 100644 index 00000000..353d85de --- /dev/null +++ b/alerts/test/test_third_party_integration_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.third_party_integration_type import ThirdPartyIntegrationType + +class TestThirdPartyIntegrationType(unittest.TestCase): + """ThirdPartyIntegrationType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testThirdPartyIntegrationType(self): + """Test ThirdPartyIntegrationType""" + # inst = ThirdPartyIntegrationType() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_unauthorized_error.py b/alerts/test/test_unauthorized_error.py new file mode 100644 index 00000000..0de72f66 --- /dev/null +++ b/alerts/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_unexpanded_test.py b/alerts/test/test_unexpanded_test.py new file mode 100644 index 00000000..3ba915e8 --- /dev/null +++ b/alerts/test/test_unexpanded_test.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.unexpanded_test import UnexpandedTest + +class TestUnexpandedTest(unittest.TestCase): + """UnexpandedTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedTest: + """Test UnexpandedTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedTest` + """ + model = UnexpandedTest() + if include_optional: + return UnexpandedTest( + interval = 120, + alerts_enabled = True, + enabled = True + ) + else: + return UnexpandedTest( + ) + """ + + def testUnexpandedTest(self): + """Test UnexpandedTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_validation_error.py b/alerts/test/test_validation_error.py new file mode 100644 index 00000000..d388764f --- /dev/null +++ b/alerts/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + alerts.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_validation_error_all_of_errors.py b/alerts/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..8615c69d --- /dev/null +++ b/alerts/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/alerts/test/test_webhook_integration_type.py b/alerts/test/test_webhook_integration_type.py new file mode 100644 index 00000000..c1e4e528 --- /dev/null +++ b/alerts/test/test_webhook_integration_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from alerts.models.webhook_integration_type import WebhookIntegrationType + +class TestWebhookIntegrationType(unittest.TestCase): + """WebhookIntegrationType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWebhookIntegrationType(self): + """Test WebhookIntegrationType""" + # inst = WebhookIntegrationType() + +if __name__ == '__main__': + unittest.main() diff --git a/alerts_api/.github/workflows/python.yml b/alerts_api/.github/workflows/python.yml deleted file mode 100644 index 9c698eb6..00000000 --- a/alerts_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: alerts_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/alerts_api/.gitlab-ci.yml b/alerts_api/.gitlab-ci.yml deleted file mode 100644 index 178a5bec..00000000 --- a/alerts_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=alerts_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/alerts_api/.openapi-generator/FILES b/alerts_api/.openapi-generator/FILES deleted file mode 100644 index 4fe2148b..00000000 --- a/alerts_api/.openapi-generator/FILES +++ /dev/null @@ -1,206 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -alerts_api/__init__.py -alerts_api/api/__init__.py -alerts_api/api/alert_rules_api.py -alerts_api/api/alert_suppression_windows_api.py -alerts_api/api/alerts_api.py -alerts_api/api_client.py -alerts_api/api_response.py -alerts_api/configuration.py -alerts_api/exceptions.py -alerts_api/models/__init__.py -alerts_api/models/alert.py -alerts_api/models/alert_detail.py -alerts_api/models/alert_links.py -alerts_api/models/alert_metric_detail.py -alerts_api/models/alert_metric_detail_end.py -alerts_api/models/alert_metric_detail_start.py -alerts_api/models/alert_metrics.py -alerts_api/models/alert_rounds_violation_mode.py -alerts_api/models/alert_rule.py -alerts_api/models/alert_suppression_window.py -alerts_api/models/alert_suppression_window_request.py -alerts_api/models/alert_suppression_window_state.py -alerts_api/models/alert_suppression_windows.py -alerts_api/models/alert_suppression_windows_alert_suppression_windows_inner.py -alerts_api/models/alert_type.py -alerts_api/models/alerts.py -alerts_api/models/app_links.py -alerts_api/models/app_links_links.py -alerts_api/models/base_alert.py -alerts_api/models/base_test.py -alerts_api/models/complete_alert_suppression_window.py -alerts_api/models/create_alert_rule201_response.py -alerts_api/models/create_suppression_windows201_response.py -alerts_api/models/days_of_week.py -alerts_api/models/end_repeat.py -alerts_api/models/end_repeat_type.py -alerts_api/models/error.py -alerts_api/models/expand.py -alerts_api/models/get_alert_rule_details200_response.py -alerts_api/models/get_alerts200_response.py -alerts_api/models/get_alerts_rules200_response.py -alerts_api/models/get_suppression_windows200_response.py -alerts_api/models/interval_type.py -alerts_api/models/link.py -alerts_api/models/notification.py -alerts_api/models/notification_email.py -alerts_api/models/notification_third_party.py -alerts_api/models/notification_webhook.py -alerts_api/models/pagination_links.py -alerts_api/models/pagination_links_links.py -alerts_api/models/repeat.py -alerts_api/models/repeat_type.py -alerts_api/models/rule.py -alerts_api/models/rule_detail.py -alerts_api/models/rule_detail_update.py -alerts_api/models/rule_links.py -alerts_api/models/rule_links_links.py -alerts_api/models/rules.py -alerts_api/models/self_links.py -alerts_api/models/self_links_links.py -alerts_api/models/severity.py -alerts_api/models/state.py -alerts_api/models/test_direction.py -alerts_api/models/test_interval.py -alerts_api/models/third_party_integration_type.py -alerts_api/models/unauthorized_error.py -alerts_api/models/unexpanded_test.py -alerts_api/models/webhook_integration_type.py -alerts_api/py.typed -alerts_api/rest.py -docs/Alert.md -docs/AlertDetail.md -docs/AlertLinks.md -docs/AlertMetricDetail.md -docs/AlertMetricDetailEnd.md -docs/AlertMetricDetailStart.md -docs/AlertMetrics.md -docs/AlertRoundsViolationMode.md -docs/AlertRule.md -docs/AlertRulesApi.md -docs/AlertSuppressionWindow.md -docs/AlertSuppressionWindowRequest.md -docs/AlertSuppressionWindowState.md -docs/AlertSuppressionWindows.md -docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md -docs/AlertSuppressionWindowsApi.md -docs/AlertType.md -docs/Alerts.md -docs/AlertsApi.md -docs/AppLinks.md -docs/AppLinksLinks.md -docs/BaseAlert.md -docs/BaseTest.md -docs/CompleteAlertSuppressionWindow.md -docs/CreateAlertRule201Response.md -docs/CreateSuppressionWindows201Response.md -docs/DaysOfWeek.md -docs/EndRepeat.md -docs/EndRepeatType.md -docs/Error.md -docs/Expand.md -docs/GetAlertRuleDetails200Response.md -docs/GetAlerts200Response.md -docs/GetAlertsRules200Response.md -docs/GetSuppressionWindows200Response.md -docs/IntervalType.md -docs/Link.md -docs/Notification.md -docs/NotificationEmail.md -docs/NotificationThirdParty.md -docs/NotificationWebhook.md -docs/PaginationLinks.md -docs/PaginationLinksLinks.md -docs/Repeat.md -docs/RepeatType.md -docs/Rule.md -docs/RuleDetail.md -docs/RuleDetailUpdate.md -docs/RuleLinks.md -docs/RuleLinksLinks.md -docs/Rules.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/Severity.md -docs/State.md -docs/TestDirection.md -docs/TestInterval.md -docs/ThirdPartyIntegrationType.md -docs/UnauthorizedError.md -docs/UnexpandedTest.md -docs/WebhookIntegrationType.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_alert.py -test/test_alert_detail.py -test/test_alert_links.py -test/test_alert_metric_detail.py -test/test_alert_metric_detail_end.py -test/test_alert_metric_detail_start.py -test/test_alert_metrics.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_rules_api.py -test/test_alert_suppression_window.py -test/test_alert_suppression_window_request.py -test/test_alert_suppression_window_state.py -test/test_alert_suppression_windows.py -test/test_alert_suppression_windows_alert_suppression_windows_inner.py -test/test_alert_suppression_windows_api.py -test/test_alert_type.py -test/test_alerts.py -test/test_alerts_api.py -test/test_app_links.py -test/test_app_links_links.py -test/test_base_alert.py -test/test_base_test.py -test/test_complete_alert_suppression_window.py -test/test_create_alert_rule201_response.py -test/test_create_suppression_windows201_response.py -test/test_days_of_week.py -test/test_end_repeat.py -test/test_end_repeat_type.py -test/test_error.py -test/test_expand.py -test/test_get_alert_rule_details200_response.py -test/test_get_alerts200_response.py -test/test_get_alerts_rules200_response.py -test/test_get_suppression_windows200_response.py -test/test_interval_type.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_pagination_links_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_rule_links.py -test/test_rule_links_links.py -test/test_rules.py -test/test_self_links.py -test/test_self_links_links.py -test/test_severity.py -test/test_state.py -test/test_test_direction.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_webhook_integration_type.py -tox.ini diff --git a/alerts_api/.openapi-generator/VERSION b/alerts_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/alerts_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/alerts_api/.travis.yml b/alerts_api/.travis.yml deleted file mode 100644 index 6dbdd95e..00000000 --- a/alerts_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=alerts_api diff --git a/alerts_api/README.md b/alerts_api/README.md deleted file mode 100644 index e19af28a..00000000 --- a/alerts_api/README.md +++ /dev/null @@ -1,191 +0,0 @@ -# alerts-api - -## Overview -Manage all alerts, alert rules and alert suppression windows. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import alerts_api -``` - -### 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 alerts_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import alerts_api -from alerts_api.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 = alerts_api.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 = alerts_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with alerts_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = alerts_api.AlertRulesApi(api_client) - rule_detail_update = alerts_api.RuleDetailUpdate() # RuleDetailUpdate | - aid = '2067' # 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 alert rule - api_response = api_instance.create_alert_rule(rule_detail_update, aid=aid) - print("The response of AlertRulesApi->create_alert_rule:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling AlertRulesApi->create_alert_rule: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -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_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 -*AlertsApi* | [**get_alerts**](docs/AlertsApi.md#get_alerts) | **GET** /v7/alerts | List active alerts - - -## Documentation For Models - - - [Alert](docs/Alert.md) - - [AlertDetail](docs/AlertDetail.md) - - [AlertLinks](docs/AlertLinks.md) - - [AlertMetricDetail](docs/AlertMetricDetail.md) - - [AlertMetricDetailEnd](docs/AlertMetricDetailEnd.md) - - [AlertMetricDetailStart](docs/AlertMetricDetailStart.md) - - [AlertMetrics](docs/AlertMetrics.md) - - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) - - [AlertRule](docs/AlertRule.md) - - [AlertSuppressionWindow](docs/AlertSuppressionWindow.md) - - [AlertSuppressionWindowRequest](docs/AlertSuppressionWindowRequest.md) - - [AlertSuppressionWindowState](docs/AlertSuppressionWindowState.md) - - [AlertSuppressionWindows](docs/AlertSuppressionWindows.md) - - [AlertSuppressionWindowsAlertSuppressionWindowsInner](docs/AlertSuppressionWindowsAlertSuppressionWindowsInner.md) - - [AlertType](docs/AlertType.md) - - [Alerts](docs/Alerts.md) - - [AppLinks](docs/AppLinks.md) - - [AppLinksLinks](docs/AppLinksLinks.md) - - [BaseAlert](docs/BaseAlert.md) - - [BaseTest](docs/BaseTest.md) - - [CompleteAlertSuppressionWindow](docs/CompleteAlertSuppressionWindow.md) - - [CreateAlertRule201Response](docs/CreateAlertRule201Response.md) - - [CreateSuppressionWindows201Response](docs/CreateSuppressionWindows201Response.md) - - [DaysOfWeek](docs/DaysOfWeek.md) - - [EndRepeat](docs/EndRepeat.md) - - [EndRepeatType](docs/EndRepeatType.md) - - [Error](docs/Error.md) - - [Expand](docs/Expand.md) - - [GetAlertRuleDetails200Response](docs/GetAlertRuleDetails200Response.md) - - [GetAlerts200Response](docs/GetAlerts200Response.md) - - [GetAlertsRules200Response](docs/GetAlertsRules200Response.md) - - [GetSuppressionWindows200Response](docs/GetSuppressionWindows200Response.md) - - [IntervalType](docs/IntervalType.md) - - [Link](docs/Link.md) - - [Notification](docs/Notification.md) - - [NotificationEmail](docs/NotificationEmail.md) - - [NotificationThirdParty](docs/NotificationThirdParty.md) - - [NotificationWebhook](docs/NotificationWebhook.md) - - [PaginationLinks](docs/PaginationLinks.md) - - [PaginationLinksLinks](docs/PaginationLinksLinks.md) - - [Repeat](docs/Repeat.md) - - [RepeatType](docs/RepeatType.md) - - [Rule](docs/Rule.md) - - [RuleDetail](docs/RuleDetail.md) - - [RuleDetailUpdate](docs/RuleDetailUpdate.md) - - [RuleLinks](docs/RuleLinks.md) - - [RuleLinksLinks](docs/RuleLinksLinks.md) - - [Rules](docs/Rules.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [Severity](docs/Severity.md) - - [State](docs/State.md) - - [TestDirection](docs/TestDirection.md) - - [TestInterval](docs/TestInterval.md) - - [ThirdPartyIntegrationType](docs/ThirdPartyIntegrationType.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UnexpandedTest](docs/UnexpandedTest.md) - - [WebhookIntegrationType](docs/WebhookIntegrationType.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/alerts_api/alerts_api/__init__.py b/alerts_api/alerts_api/__init__.py deleted file mode 100644 index 118563fd..00000000 --- a/alerts_api/alerts_api/__init__.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 alerts_api.api.alert_rules_api import AlertRulesApi -from alerts_api.api.alert_suppression_windows_api import AlertSuppressionWindowsApi -from alerts_api.api.alerts_api import AlertsApi - -# import ApiClient -from alerts_api.api_response import ApiResponse -from alerts_api.api_client import ApiClient -from alerts_api.configuration import Configuration -from alerts_api.exceptions import OpenApiException -from alerts_api.exceptions import ApiTypeError -from alerts_api.exceptions import ApiValueError -from alerts_api.exceptions import ApiKeyError -from alerts_api.exceptions import ApiAttributeError -from alerts_api.exceptions import ApiException - -# import models into sdk package -from alerts_api.models.alert import Alert -from alerts_api.models.alert_detail import AlertDetail -from alerts_api.models.alert_links import AlertLinks -from alerts_api.models.alert_metric_detail import AlertMetricDetail -from alerts_api.models.alert_metric_detail_end import AlertMetricDetailEnd -from alerts_api.models.alert_metric_detail_start import AlertMetricDetailStart -from alerts_api.models.alert_metrics import AlertMetrics -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_rule import AlertRule -from alerts_api.models.alert_suppression_window import AlertSuppressionWindow -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.alert_suppression_windows import AlertSuppressionWindows -from alerts_api.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner -from alerts_api.models.alert_type import AlertType -from alerts_api.models.alerts import Alerts -from alerts_api.models.app_links import AppLinks -from alerts_api.models.app_links_links import AppLinksLinks -from alerts_api.models.base_alert import BaseAlert -from alerts_api.models.base_test import BaseTest -from alerts_api.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response -from alerts_api.models.days_of_week import DaysOfWeek -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.end_repeat_type import EndRepeatType -from alerts_api.models.error import Error -from alerts_api.models.expand import Expand -from alerts_api.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response -from alerts_api.models.get_alerts200_response import GetAlerts200Response -from alerts_api.models.get_alerts_rules200_response import GetAlertsRules200Response -from alerts_api.models.get_suppression_windows200_response import GetSuppressionWindows200Response -from alerts_api.models.interval_type import IntervalType -from alerts_api.models.link import Link -from alerts_api.models.notification import Notification -from alerts_api.models.notification_email import NotificationEmail -from alerts_api.models.notification_third_party import NotificationThirdParty -from alerts_api.models.notification_webhook import NotificationWebhook -from alerts_api.models.pagination_links import PaginationLinks -from alerts_api.models.pagination_links_links import PaginationLinksLinks -from alerts_api.models.repeat import Repeat -from alerts_api.models.repeat_type import RepeatType -from alerts_api.models.rule import Rule -from alerts_api.models.rule_detail import RuleDetail -from alerts_api.models.rule_detail_update import RuleDetailUpdate -from alerts_api.models.rule_links import RuleLinks -from alerts_api.models.rule_links_links import RuleLinksLinks -from alerts_api.models.rules import Rules -from alerts_api.models.self_links import SelfLinks -from alerts_api.models.self_links_links import SelfLinksLinks -from alerts_api.models.severity import Severity -from alerts_api.models.state import State -from alerts_api.models.test_direction import TestDirection -from alerts_api.models.test_interval import TestInterval -from alerts_api.models.third_party_integration_type import ThirdPartyIntegrationType -from alerts_api.models.unauthorized_error import UnauthorizedError -from alerts_api.models.unexpanded_test import UnexpandedTest -from alerts_api.models.webhook_integration_type import WebhookIntegrationType diff --git a/alerts_api/alerts_api/api/__init__.py b/alerts_api/alerts_api/api/__init__.py deleted file mode 100644 index 72f95fe1..00000000 --- a/alerts_api/alerts_api/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# flake8: noqa - -# import apis into api package -from alerts_api.api.alert_rules_api import AlertRulesApi -from alerts_api.api.alert_suppression_windows_api import AlertSuppressionWindowsApi -from alerts_api.api.alerts_api import AlertsApi - diff --git a/alerts_api/alerts_api/api_client.py b/alerts_api/alerts_api/api_client.py deleted file mode 100644 index c3a80ccc..00000000 --- a/alerts_api/alerts_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from alerts_api.configuration import Configuration -from alerts_api.api_response import ApiResponse -import alerts_api.models -from alerts_api import rest -from alerts_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(alerts_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/alerts_api/alerts_api/api_response.py b/alerts_api/alerts_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/alerts_api/alerts_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/alerts_api/alerts_api/configuration.py b/alerts_api/alerts_api/configuration.py deleted file mode 100644 index 3cf2977c..00000000 --- a/alerts_api/alerts_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("alerts_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/alerts_api/alerts_api/exceptions.py b/alerts_api/alerts_api/exceptions.py deleted file mode 100644 index d38144e7..00000000 --- a/alerts_api/alerts_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/alerts_api/alerts_api/models/__init__.py b/alerts_api/alerts_api/models/__init__.py deleted file mode 100644 index e569d321..00000000 --- a/alerts_api/alerts_api/models/__init__.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from alerts_api.models.alert import Alert -from alerts_api.models.alert_detail import AlertDetail -from alerts_api.models.alert_links import AlertLinks -from alerts_api.models.alert_metric_detail import AlertMetricDetail -from alerts_api.models.alert_metric_detail_end import AlertMetricDetailEnd -from alerts_api.models.alert_metric_detail_start import AlertMetricDetailStart -from alerts_api.models.alert_metrics import AlertMetrics -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_rule import AlertRule -from alerts_api.models.alert_suppression_window import AlertSuppressionWindow -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.alert_suppression_windows import AlertSuppressionWindows -from alerts_api.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner -from alerts_api.models.alert_type import AlertType -from alerts_api.models.alerts import Alerts -from alerts_api.models.app_links import AppLinks -from alerts_api.models.app_links_links import AppLinksLinks -from alerts_api.models.base_alert import BaseAlert -from alerts_api.models.base_test import BaseTest -from alerts_api.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response -from alerts_api.models.days_of_week import DaysOfWeek -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.end_repeat_type import EndRepeatType -from alerts_api.models.error import Error -from alerts_api.models.expand import Expand -from alerts_api.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response -from alerts_api.models.get_alerts200_response import GetAlerts200Response -from alerts_api.models.get_alerts_rules200_response import GetAlertsRules200Response -from alerts_api.models.get_suppression_windows200_response import GetSuppressionWindows200Response -from alerts_api.models.interval_type import IntervalType -from alerts_api.models.link import Link -from alerts_api.models.notification import Notification -from alerts_api.models.notification_email import NotificationEmail -from alerts_api.models.notification_third_party import NotificationThirdParty -from alerts_api.models.notification_webhook import NotificationWebhook -from alerts_api.models.pagination_links import PaginationLinks -from alerts_api.models.pagination_links_links import PaginationLinksLinks -from alerts_api.models.repeat import Repeat -from alerts_api.models.repeat_type import RepeatType -from alerts_api.models.rule import Rule -from alerts_api.models.rule_detail import RuleDetail -from alerts_api.models.rule_detail_update import RuleDetailUpdate -from alerts_api.models.rule_links import RuleLinks -from alerts_api.models.rule_links_links import RuleLinksLinks -from alerts_api.models.rules import Rules -from alerts_api.models.self_links import SelfLinks -from alerts_api.models.self_links_links import SelfLinksLinks -from alerts_api.models.severity import Severity -from alerts_api.models.state import State -from alerts_api.models.test_direction import TestDirection -from alerts_api.models.test_interval import TestInterval -from alerts_api.models.third_party_integration_type import ThirdPartyIntegrationType -from alerts_api.models.unauthorized_error import UnauthorizedError -from alerts_api.models.unexpanded_test import UnexpandedTest -from alerts_api.models.webhook_integration_type import WebhookIntegrationType diff --git a/alerts_api/alerts_api/models/alert.py b/alerts_api/alerts_api/models/alert.py deleted file mode 100644 index 3559c3bc..00000000 --- a/alerts_api/alerts_api/models/alert.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_type import AlertType -from alerts_api.models.rule_links_links import RuleLinksLinks -from alerts_api.models.severity import Severity -from alerts_api.models.state import State -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Alert(BaseModel): - """ - Alert - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.") - alert_type: Optional[AlertType] = Field(default=None, alias="alertType") - 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") - links: Optional[RuleLinksLinks] = Field(default=None, alias="_links") - alert_rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="alertRuleId") - alert_state: Optional[State] = Field(default=None, alias="alertState") - alert_severity: Optional[Severity] = Field(default=None, alias="alertSeverity") - __properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "_links", "alertRuleId", "alertState", "alertSeverity"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Alert 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - "start_date", - "end_date", - "alert_rule_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of Alert 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"), - "alertType": obj.get("alertType"), - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "violationCount": obj.get("violationCount"), - "duration": obj.get("duration"), - "_links": RuleLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "alertRuleId": obj.get("alertRuleId"), - "alertState": obj.get("alertState"), - "alertSeverity": obj.get("alertSeverity") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_detail.py b/alerts_api/alerts_api/models/alert_detail.py deleted file mode 100644 index 600fdcd8..00000000 --- a/alerts_api/alerts_api/models/alert_detail.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_metric_detail import AlertMetricDetail -from alerts_api.models.alert_type import AlertType -from alerts_api.models.rule_links_links import RuleLinksLinks -from alerts_api.models.severity import Severity -from alerts_api.models.state import State -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertDetail(BaseModel): - """ - AlertDetail - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.") - alert_type: Optional[AlertType] = Field(default=None, alias="alertType") - 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") - links: Optional[RuleLinksLinks] = Field(default=None, alias="_links") - state: Optional[State] = None - severity: Optional[Severity] = None - details: Optional[List[AlertMetricDetail]] = None - __properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "_links", "state", "severity", "details"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertDetail 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - "start_date", - "end_date", - }, - exclude_none=True, - ) - # 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 details (list) - _items = [] - if self.details: - for _item in self.details: - if _item: - _items.append(_item.to_dict()) - _dict['details'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertDetail 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"), - "alertType": obj.get("alertType"), - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "violationCount": obj.get("violationCount"), - "duration": obj.get("duration"), - "_links": RuleLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "state": obj.get("state"), - "severity": obj.get("severity"), - "details": [AlertMetricDetail.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_links.py b/alerts_api/alerts_api/models/alert_links.py deleted file mode 100644 index ed1b49bc..00000000 --- a/alerts_api/alerts_api/models/alert_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.rule_links_links import RuleLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertLinks(BaseModel): - """ - AlertLinks - """ # noqa: E501 - links: Optional[RuleLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of AlertLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": RuleLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_metric_detail.py b/alerts_api/alerts_api/models/alert_metric_detail.py deleted file mode 100644 index 2e48c2d2..00000000 --- a/alerts_api/alerts_api/models/alert_metric_detail.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from alerts_api.models.alert_metric_detail_end import AlertMetricDetailEnd -from alerts_api.models.alert_metric_detail_start import AlertMetricDetailStart -from alerts_api.models.state import State -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertMetricDetail(BaseModel): - """ - AlertMetricDetail - """ # noqa: E501 - end: Optional[AlertMetricDetailEnd] = None - id: Optional[StrictStr] = Field(default=None, description="Unique metric detail id.") - name: Optional[StrictStr] = Field(default=None, description="Geolocation of the alert.") - start: Optional[AlertMetricDetailStart] = None - state: Optional[State] = None - type: Optional[StrictStr] = Field(default=None, description="Type of the alert metric.") - __properties: ClassVar[List[str]] = ["end", "id", "name", "start", "state", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertMetricDetail 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of end - if self.end: - _dict['end'] = self.end.to_dict() - # override the default output from pydantic by calling `to_dict()` of start - if self.start: - _dict['start'] = self.start.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertMetricDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "end": AlertMetricDetailEnd.from_dict(obj.get("end")) if obj.get("end") is not None else None, - "id": obj.get("id"), - "name": obj.get("name"), - "start": AlertMetricDetailStart.from_dict(obj.get("start")) if obj.get("start") is not None else None, - "state": obj.get("state"), - "type": obj.get("type") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_metric_detail_end.py b/alerts_api/alerts_api/models/alert_metric_detail_end.py deleted file mode 100644 index dac7276d..00000000 --- a/alerts_api/alerts_api/models/alert_metric_detail_end.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertMetricDetailEnd(BaseModel): - """ - AlertMetricDetailEnd - """ # noqa: E501 - metrics: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["metrics"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertMetricDetailEnd 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertMetricDetailEnd from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "metrics": obj.get("metrics") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_metric_detail_start.py b/alerts_api/alerts_api/models/alert_metric_detail_start.py deleted file mode 100644 index 22ece30a..00000000 --- a/alerts_api/alerts_api/models/alert_metric_detail_start.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertMetricDetailStart(BaseModel): - """ - AlertMetricDetailStart - """ # noqa: E501 - metrics: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["metrics"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertMetricDetailStart 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertMetricDetailStart from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "metrics": obj.get("metrics") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_metrics.py b/alerts_api/alerts_api/models/alert_metrics.py deleted file mode 100644 index 70f73417..00000000 --- a/alerts_api/alerts_api/models/alert_metrics.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertMetrics(BaseModel): - """ - AlertMetrics - """ # noqa: E501 - metrics: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["metrics"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertMetrics 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertMetrics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "metrics": obj.get("metrics") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_rounds_violation_mode.py b/alerts_api/alerts_api/models/alert_rounds_violation_mode.py deleted file mode 100644 index b829d231..00000000 --- a/alerts_api/alerts_api/models/alert_rounds_violation_mode.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AlertRoundsViolationMode(str, Enum): - """ - `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` - """ - - """ - allowed enum values - """ - EXACT = 'exact' - ANY = 'any' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertRoundsViolationMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/alert_rule.py b/alerts_api/alerts_api/models/alert_rule.py deleted file mode 100644 index 5bce449d..00000000 --- a/alerts_api/alerts_api/models/alert_rule.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_type import AlertType -from alerts_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertRule(BaseModel): - """ - AlertRule - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") - rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") - expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") - direction: Optional[TestDirection] = None - is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") - alert_type: Optional[AlertType] = Field(default=None, alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertRule 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - "rule_name", - "expression", - "is_default", - "minimum_sources", - "minimum_sources_pct", - "rounds_violating_out_of", - "rounds_violating_required", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertRule from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_suppression_window.py b/alerts_api/alerts_api/models/alert_suppression_window.py deleted file mode 100644 index 970f8dc9..00000000 --- a/alerts_api/alerts_api/models/alert_suppression_window.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.repeat import Repeat -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertSuppressionWindow(BaseModel): - """ - AlertSuppressionWindow - """ # noqa: E501 - alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") - name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") - is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") - status: Optional[AlertSuppressionWindowState] = None - start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") - duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") - repeat: Optional[Repeat] = None - end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") - __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertSuppressionWindow 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "alert_suppression_window_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of repeat - if self.repeat: - _dict['repeat'] = self.repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of end_repeat - if self.end_repeat: - _dict['endRepeat'] = self.end_repeat.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertSuppressionWindow from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), - "name": obj.get("name"), - "isEnabled": obj.get("isEnabled"), - "status": obj.get("status"), - "startDate": obj.get("startDate"), - "duration": obj.get("duration"), - "repeat": Repeat.from_dict(obj.get("repeat")) if obj.get("repeat") is not None else None, - "endRepeat": EndRepeat.from_dict(obj.get("endRepeat")) if obj.get("endRepeat") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_suppression_window_request.py b/alerts_api/alerts_api/models/alert_suppression_window_request.py deleted file mode 100644 index 46074214..00000000 --- a/alerts_api/alerts_api/models/alert_suppression_window_request.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.repeat import Repeat -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertSuppressionWindowRequest(BaseModel): - """ - AlertSuppressionWindowRequest - """ # noqa: E501 - alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") - name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") - is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") - status: Optional[AlertSuppressionWindowState] = None - start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") - duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") - repeat: Optional[Repeat] = None - end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") - tests: Optional[List[StrictStr]] = Field(default=None, description="List of tests to assign to the alert suppression window.") - __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertSuppressionWindowRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "alert_suppression_window_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of repeat - if self.repeat: - _dict['repeat'] = self.repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of end_repeat - if self.end_repeat: - _dict['endRepeat'] = self.end_repeat.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertSuppressionWindowRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), - "name": obj.get("name"), - "isEnabled": obj.get("isEnabled"), - "status": obj.get("status"), - "startDate": obj.get("startDate"), - "duration": obj.get("duration"), - "repeat": Repeat.from_dict(obj.get("repeat")) if obj.get("repeat") is not None else None, - "endRepeat": EndRepeat.from_dict(obj.get("endRepeat")) if obj.get("endRepeat") is not None else None, - "tests": obj.get("tests") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_suppression_window_state.py b/alerts_api/alerts_api/models/alert_suppression_window_state.py deleted file mode 100644 index 927b05d4..00000000 --- a/alerts_api/alerts_api/models/alert_suppression_window_state.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AlertSuppressionWindowState(str, Enum): - """ - Indicates the current status of the suppression window. - """ - - """ - allowed enum values - """ - ACTIVE = 'active' - INACTIVE = 'inactive' - ENDED = 'ended' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertSuppressionWindowState from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/alert_suppression_windows.py b/alerts_api/alerts_api/models/alert_suppression_windows.py deleted file mode 100644 index 6403d614..00000000 --- a/alerts_api/alerts_api/models/alert_suppression_windows.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertSuppressionWindows(BaseModel): - """ - Alert suppression windows. - """ # noqa: E501 - alert_suppression_windows: Optional[List[AlertSuppressionWindowsAlertSuppressionWindowsInner]] = Field(default=None, alias="alertSuppressionWindows") - __properties: ClassVar[List[str]] = ["alertSuppressionWindows"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertSuppressionWindows 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_suppression_windows (list) - _items = [] - if self.alert_suppression_windows: - for _item in self.alert_suppression_windows: - if _item: - _items.append(_item.to_dict()) - _dict['alertSuppressionWindows'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertSuppressionWindows from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindows": [AlertSuppressionWindowsAlertSuppressionWindowsInner.from_dict(_item) for _item in obj.get("alertSuppressionWindows")] if obj.get("alertSuppressionWindows") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_suppression_windows_alert_suppression_windows_inner.py b/alerts_api/alerts_api/models/alert_suppression_windows_alert_suppression_windows_inner.py deleted file mode 100644 index 2e8bde06..00000000 --- a/alerts_api/alerts_api/models/alert_suppression_windows_alert_suppression_windows_inner.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.repeat import Repeat -from alerts_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertSuppressionWindowsAlertSuppressionWindowsInner(BaseModel): - """ - AlertSuppressionWindowsAlertSuppressionWindowsInner - """ # noqa: E501 - alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") - name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") - is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") - status: Optional[AlertSuppressionWindowState] = None - start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") - duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") - repeat: Optional[Repeat] = None - end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertSuppressionWindowsAlertSuppressionWindowsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "alert_suppression_window_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of repeat - if self.repeat: - _dict['repeat'] = self.repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of end_repeat - if self.end_repeat: - _dict['endRepeat'] = self.end_repeat.to_dict() - # 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: Dict) -> Self: - """Create an instance of AlertSuppressionWindowsAlertSuppressionWindowsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), - "name": obj.get("name"), - "isEnabled": obj.get("isEnabled"), - "status": obj.get("status"), - "startDate": obj.get("startDate"), - "duration": obj.get("duration"), - "repeat": Repeat.from_dict(obj.get("repeat")) if obj.get("repeat") is not None else None, - "endRepeat": EndRepeat.from_dict(obj.get("endRepeat")) if obj.get("endRepeat") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/alert_type.py b/alerts_api/alerts_api/models/alert_type.py deleted file mode 100644 index 0d66afec..00000000 --- a/alerts_api/alerts_api/models/alert_type.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AlertType(str, Enum): - """ - Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values - """ - - """ - allowed enum values - """ - PAGE_MINUS_LOAD = 'page-load' - HTTP_MINUS_SERVER = 'http-server' - END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' - END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' - VOICE = 'voice' - DNS_MINUS_SERVER = 'dns-server' - DNS_MINUS_TRACE = 'dns-trace' - DNSSEC = 'dnssec' - BGP = 'bgp' - PATH_MINUS_TRACE = 'path-trace' - FTP = 'ftp' - SIP_MINUS_SERVER = 'sip-server' - TRANSACTIONS = 'transactions' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - AGENT = 'agent' - NETWORK_MINUS_OUTAGE = 'network-outage' - APPLICATION_MINUS_OUTAGE = 'application-outage' - DEVICE_MINUS_DEVICE = 'device-device' - DEVICE_MINUS_INTERFACE = 'device-interface' - ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' - ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' - ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' - ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' - ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' - UNKNOWN = 'unknown' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/alerts.py b/alerts_api/alerts_api/models/alerts.py deleted file mode 100644 index db87b127..00000000 --- a/alerts_api/alerts_api/models/alerts.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from alerts_api.models.alert import Alert -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Alerts(BaseModel): - """ - Alerts - """ # noqa: E501 - alerts: Optional[List[Alert]] = None - __properties: ClassVar[List[str]] = ["alerts"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Alerts 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alerts (list) - _items = [] - if self.alerts: - for _item in self.alerts: - if _item: - _items.append(_item.to_dict()) - _dict['alerts'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Alerts from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alerts": [Alert.from_dict(_item) for _item in obj.get("alerts")] if obj.get("alerts") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/app_links.py b/alerts_api/alerts_api/models/app_links.py deleted file mode 100644 index 46e0b13e..00000000 --- a/alerts_api/alerts_api/models/app_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.app_links_links import AppLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AppLinks(BaseModel): - """ - AppLinks - """ # noqa: E501 - links: Optional[AppLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of AppLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": AppLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/app_links_links.py b/alerts_api/alerts_api/models/app_links_links.py deleted file mode 100644 index 40ad5bc5..00000000 --- a/alerts_api/alerts_api/models/app_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AppLinksLinks(BaseModel): - """ - A links object containing the ThousandEyes App link - """ # noqa: E501 - app_link: Optional[Link] = Field(default=None, alias="appLink") - __properties: ClassVar[List[str]] = ["appLink"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app_link - if self.app_link: - _dict['appLink'] = self.app_link.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AppLinksLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appLink": Link.from_dict(obj.get("appLink")) if obj.get("appLink") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/base_alert.py b/alerts_api/alerts_api/models/base_alert.py deleted file mode 100644 index 03ec2c97..00000000 --- a/alerts_api/alerts_api/models/base_alert.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_type import AlertType -from alerts_api.models.rule_links_links import RuleLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BaseAlert(BaseModel): - """ - BaseAlert - """ # noqa: E501 - links: Optional[RuleLinksLinks] = Field(default=None, alias="_links") - id: Optional[StrictStr] = Field(default=None, description="A unique ID for each individual alert occurrence.") - alert_type: Optional[AlertType] = Field(default=None, alias="alertType") - 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") - __properties: ClassVar[List[str]] = ["_links", "id", "alertType", "startDate", "endDate", "violationCount", "duration"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BaseAlert 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - "start_date", - "end_date", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of BaseAlert from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": RuleLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "id": obj.get("id"), - "alertType": obj.get("alertType"), - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "violationCount": obj.get("violationCount"), - "duration": obj.get("duration") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/base_test.py b/alerts_api/alerts_api/models/base_test.py deleted file mode 100644 index 06cd7a43..00000000 --- a/alerts_api/alerts_api/models/base_test.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from alerts_api.models.alert_rule import AlertRule -from alerts_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BaseTest(BaseModel): - """ - BaseTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BaseTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of BaseTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/complete_alert_suppression_window.py b/alerts_api/alerts_api/models/complete_alert_suppression_window.py deleted file mode 100644 index d8f43cbd..00000000 --- a/alerts_api/alerts_api/models/complete_alert_suppression_window.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.base_test import BaseTest -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.repeat import Repeat -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CompleteAlertSuppressionWindow(BaseModel): - """ - CompleteAlertSuppressionWindow - """ # noqa: E501 - alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") - name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") - is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") - status: Optional[AlertSuppressionWindowState] = None - start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") - duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") - repeat: Optional[Repeat] = None - end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") - tests: Optional[List[BaseTest]] = Field(default=None, description="List of tests assigned to the alert suppression window.") - __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CompleteAlertSuppressionWindow 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "alert_suppression_window_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of repeat - if self.repeat: - _dict['repeat'] = self.repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of end_repeat - if self.end_repeat: - _dict['endRepeat'] = self.end_repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CompleteAlertSuppressionWindow from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), - "name": obj.get("name"), - "isEnabled": obj.get("isEnabled"), - "status": obj.get("status"), - "startDate": obj.get("startDate"), - "duration": obj.get("duration"), - "repeat": Repeat.from_dict(obj.get("repeat")) if obj.get("repeat") is not None else None, - "endRepeat": EndRepeat.from_dict(obj.get("endRepeat")) if obj.get("endRepeat") is not None else None, - "tests": [BaseTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/create_alert_rule201_response.py b/alerts_api/alerts_api/models/create_alert_rule201_response.py deleted file mode 100644 index 7124ef0c..00000000 --- a/alerts_api/alerts_api/models/create_alert_rule201_response.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_type import AlertType -from alerts_api.models.notification import Notification -from alerts_api.models.self_links_links import SelfLinksLinks -from alerts_api.models.severity import Severity -from alerts_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateAlertRule201Response(BaseModel): - """ - CreateAlertRule201Response - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") - rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") - expression: StrictStr = Field(description="The expression of the alert rule.") - direction: Optional[TestDirection] = None - notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") - is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") - alert_type: AlertType = Field(alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") - include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") - severity: Optional[Severity] = None - notifications: Optional[Notification] = None - test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "testIds", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateAlertRule201Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of notifications - if self.notifications: - _dict['notifications'] = self.notifications.to_dict() - # 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: Dict) -> Self: - """Create an instance of CreateAlertRule201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "notifyOnClear": obj.get("notifyOnClear"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired"), - "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "severity": obj.get("severity"), - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None, - "testIds": obj.get("testIds"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/create_suppression_windows201_response.py b/alerts_api/alerts_api/models/create_suppression_windows201_response.py deleted file mode 100644 index f3bed4b9..00000000 --- a/alerts_api/alerts_api/models/create_suppression_windows201_response.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState -from alerts_api.models.base_test import BaseTest -from alerts_api.models.end_repeat import EndRepeat -from alerts_api.models.repeat import Repeat -from alerts_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateSuppressionWindows201Response(BaseModel): - """ - CreateSuppressionWindows201Response - """ # noqa: E501 - alert_suppression_window_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the alert suppression window.", alias="alertSuppressionWindowId") - name: Optional[StrictStr] = Field(default=None, description="Name of the alert suppression window.") - is_enabled: Optional[StrictBool] = Field(default=None, description="Set to `false` for `disabled`, `true` for `enabled`.", alias="isEnabled") - status: Optional[AlertSuppressionWindowState] = None - start_date: Optional[datetime] = Field(default=None, description="The date/time when the alert suppression window starts (ISO date-time format).", alias="startDate") - duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the suppression window is active.") - repeat: Optional[Repeat] = None - end_repeat: Optional[EndRepeat] = Field(default=None, alias="endRepeat") - tests: Optional[List[BaseTest]] = Field(default=None, description="List of tests assigned to the alert suppression window.") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["alertSuppressionWindowId", "name", "isEnabled", "status", "startDate", "duration", "repeat", "endRepeat", "tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateSuppressionWindows201Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "alert_suppression_window_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of repeat - if self.repeat: - _dict['repeat'] = self.repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of end_repeat - if self.end_repeat: - _dict['endRepeat'] = self.end_repeat.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of CreateSuppressionWindows201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindowId": obj.get("alertSuppressionWindowId"), - "name": obj.get("name"), - "isEnabled": obj.get("isEnabled"), - "status": obj.get("status"), - "startDate": obj.get("startDate"), - "duration": obj.get("duration"), - "repeat": Repeat.from_dict(obj.get("repeat")) if obj.get("repeat") is not None else None, - "endRepeat": EndRepeat.from_dict(obj.get("endRepeat")) if obj.get("endRepeat") is not None else None, - "tests": [BaseTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/days_of_week.py b/alerts_api/alerts_api/models/days_of_week.py deleted file mode 100644 index 9ff17da6..00000000 --- a/alerts_api/alerts_api/models/days_of_week.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DaysOfWeek(str, Enum): - """ - Specifies the day to activate the alert suppression window. Applicable only when `intervalType` is set to `week`. - """ - - """ - allowed enum values - """ - SUN = 'sun' - MON = 'mon' - TUE = 'tue' - WED = 'wed' - THU = 'thu' - FRI = 'fri' - SAT = 'sat' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DaysOfWeek from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/end_repeat.py b/alerts_api/alerts_api/models/end_repeat.py deleted file mode 100644 index dd37ad99..00000000 --- a/alerts_api/alerts_api/models/end_repeat.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 date -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from alerts_api.models.end_repeat_type import EndRepeatType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndRepeat(BaseModel): - """ - End repeat options. - """ # noqa: E501 - type: Optional[EndRepeatType] = None - count: Optional[StrictInt] = Field(default=None, description="End repeat after number of occurrences, only valid with count type option.") - var_date: Optional[date] = Field(default=None, description="End repeat after specific date, only valid with date type option (ISO date format).", alias="date") - __properties: ClassVar[List[str]] = ["type", "count", "date"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndRepeat 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndRepeat 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"), - "count": obj.get("count"), - "date": obj.get("date") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/end_repeat_type.py b/alerts_api/alerts_api/models/end_repeat_type.py deleted file mode 100644 index 137fa5e3..00000000 --- a/alerts_api/alerts_api/models/end_repeat_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndRepeatType(str, Enum): - """ - End repeat options type. - """ - - """ - allowed enum values - """ - COUNT = 'count' - NEVER = 'never' - DATE = 'date' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndRepeatType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/error.py b/alerts_api/alerts_api/models/error.py deleted file mode 100644 index a5ad162f..00000000 --- a/alerts_api/alerts_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/alerts_api/alerts_api/models/expand.py b/alerts_api/alerts_api/models/expand.py deleted file mode 100644 index a7aaee94..00000000 --- a/alerts_api/alerts_api/models/expand.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - TEST = 'test' - - @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/alerts_api/alerts_api/models/get_alert_rule_details200_response.py b/alerts_api/alerts_api/models/get_alert_rule_details200_response.py deleted file mode 100644 index 25ef573d..00000000 --- a/alerts_api/alerts_api/models/get_alert_rule_details200_response.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_type import AlertType -from alerts_api.models.base_test import BaseTest -from alerts_api.models.notification import Notification -from alerts_api.models.self_links_links import SelfLinksLinks -from alerts_api.models.severity import Severity -from alerts_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAlertRuleDetails200Response(BaseModel): - """ - GetAlertRuleDetails200Response - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") - rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") - expression: StrictStr = Field(description="The expression of the alert rule.") - direction: Optional[TestDirection] = None - notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") - is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") - alert_type: AlertType = Field(alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") - include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") - severity: Optional[Severity] = None - notifications: Optional[Notification] = None - tests: Optional[List[BaseTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAlertRuleDetails200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - "tests", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of notifications - if self.notifications: - _dict['notifications'] = self.notifications.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetAlertRuleDetails200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "notifyOnClear": obj.get("notifyOnClear"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired"), - "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "severity": obj.get("severity"), - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None, - "tests": [BaseTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/get_alerts200_response.py b/alerts_api/alerts_api/models/get_alerts200_response.py deleted file mode 100644 index 8d40f84a..00000000 --- a/alerts_api/alerts_api/models/get_alerts200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.alert import Alert -from alerts_api.models.pagination_links_links import PaginationLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAlerts200Response(BaseModel): - """ - GetAlerts200Response - """ # noqa: E501 - alerts: Optional[List[Alert]] = None - links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["alerts", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAlerts200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alerts (list) - _items = [] - if self.alerts: - for _item in self.alerts: - if _item: - _items.append(_item.to_dict()) - _dict['alerts'] = _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: Dict) -> Self: - """Create an instance of GetAlerts200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alerts": [Alert.from_dict(_item) for _item in obj.get("alerts")] if obj.get("alerts") is not None else None, - "_links": PaginationLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/get_alerts_rules200_response.py b/alerts_api/alerts_api/models/get_alerts_rules200_response.py deleted file mode 100644 index 941e4344..00000000 --- a/alerts_api/alerts_api/models/get_alerts_rules200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.rule import Rule -from alerts_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAlertsRules200Response(BaseModel): - """ - GetAlertsRules200Response - """ # noqa: E501 - alert_rules: Optional[List[Rule]] = Field(default=None, alias="alertRules") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["alertRules", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAlertsRules200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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: Dict) -> Self: - """Create an instance of GetAlertsRules200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertRules": [Rule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/get_suppression_windows200_response.py b/alerts_api/alerts_api/models/get_suppression_windows200_response.py deleted file mode 100644 index 8eb986a7..00000000 --- a/alerts_api/alerts_api/models/get_suppression_windows200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner -from alerts_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetSuppressionWindows200Response(BaseModel): - """ - GetSuppressionWindows200Response - """ # noqa: E501 - alert_suppression_windows: Optional[List[AlertSuppressionWindowsAlertSuppressionWindowsInner]] = Field(default=None, alias="alertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["alertSuppressionWindows", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetSuppressionWindows200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_suppression_windows (list) - _items = [] - if self.alert_suppression_windows: - for _item in self.alert_suppression_windows: - if _item: - _items.append(_item.to_dict()) - _dict['alertSuppressionWindows'] = _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: Dict) -> Self: - """Create an instance of GetSuppressionWindows200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertSuppressionWindows": [AlertSuppressionWindowsAlertSuppressionWindowsInner.from_dict(_item) for _item in obj.get("alertSuppressionWindows")] if obj.get("alertSuppressionWindows") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/interval_type.py b/alerts_api/alerts_api/models/interval_type.py deleted file mode 100644 index 60201230..00000000 --- a/alerts_api/alerts_api/models/interval_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class IntervalType(str, Enum): - """ - Repeat options interval type - """ - - """ - allowed enum values - """ - DAY = 'day' - WEEK = 'week' - MONTH = 'month' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of IntervalType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/link.py b/alerts_api/alerts_api/models/link.py deleted file mode 100644 index 5542fabc..00000000 --- a/alerts_api/alerts_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/alerts_api/alerts_api/models/notification.py b/alerts_api/alerts_api/models/notification.py deleted file mode 100644 index 84ccad01..00000000 --- a/alerts_api/alerts_api/models/notification.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.notification_email import NotificationEmail -from alerts_api.models.notification_third_party import NotificationThirdParty -from alerts_api.models.notification_webhook import NotificationWebhook -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Notification(BaseModel): - """ - Alert notification object. See Alert notification integrations. - """ # noqa: E501 - email: Optional[NotificationEmail] = None - third_party: Optional[List[NotificationThirdParty]] = Field(default=None, description="Third party notifications.", alias="thirdParty") - webhook: Optional[List[NotificationWebhook]] = Field(default=None, description="Webhooks notifications.") - __properties: ClassVar[List[str]] = ["email", "thirdParty", "webhook"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Notification 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of email - if self.email: - _dict['email'] = self.email.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in third_party (list) - _items = [] - if self.third_party: - for _item in self.third_party: - if _item: - _items.append(_item.to_dict()) - _dict['thirdParty'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in webhook (list) - _items = [] - if self.webhook: - for _item in self.webhook: - if _item: - _items.append(_item.to_dict()) - _dict['webhook'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Notification from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": NotificationEmail.from_dict(obj.get("email")) if obj.get("email") is not None else None, - "thirdParty": [NotificationThirdParty.from_dict(_item) for _item in obj.get("thirdParty")] if obj.get("thirdParty") is not None else None, - "webhook": [NotificationWebhook.from_dict(_item) for _item in obj.get("webhook")] if obj.get("webhook") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/notification_email.py b/alerts_api/alerts_api/models/notification_email.py deleted file mode 100644 index 77244e5c..00000000 --- a/alerts_api/alerts_api/models/notification_email.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NotificationEmail(BaseModel): - """ - Email notifications. - """ # noqa: E501 - recipients: Optional[List[StrictStr]] = Field(default=None, description="An array containing the email addresses to receive notifications.") - message: Optional[StrictStr] = Field(default=None, description="Custom text included in alert email notifications sent to recipients.") - __properties: ClassVar[List[str]] = ["recipients", "message"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NotificationEmail 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NotificationEmail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "recipients": obj.get("recipients"), - "message": obj.get("message") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/notification_third_party.py b/alerts_api/alerts_api/models/notification_third_party.py deleted file mode 100644 index 7e5ecdf1..00000000 --- a/alerts_api/alerts_api/models/notification_third_party.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from alerts_api.models.third_party_integration_type import ThirdPartyIntegrationType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NotificationThirdParty(BaseModel): - """ - Webhook notification. - """ # noqa: E501 - integration_id: Optional[List[StrictStr]] = Field(default=None, description="Integration ID.", alias="integrationId") - integration_type: Optional[ThirdPartyIntegrationType] = Field(default=None, alias="integrationType") - __properties: ClassVar[List[str]] = ["integrationId", "integrationType"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NotificationThirdParty 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NotificationThirdParty from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "integrationId": obj.get("integrationId"), - "integrationType": obj.get("integrationType") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/notification_webhook.py b/alerts_api/alerts_api/models/notification_webhook.py deleted file mode 100644 index e5c1de61..00000000 --- a/alerts_api/alerts_api/models/notification_webhook.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from alerts_api.models.webhook_integration_type import WebhookIntegrationType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NotificationWebhook(BaseModel): - """ - Webhook notification. - """ # noqa: E501 - integration_id: Optional[List[StrictStr]] = Field(default=None, description="Integration ID.", alias="integrationId") - integration_type: Optional[WebhookIntegrationType] = Field(default=None, alias="integrationType") - __properties: ClassVar[List[str]] = ["integrationId", "integrationType"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NotificationWebhook 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NotificationWebhook from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "integrationId": obj.get("integrationId"), - "integrationType": obj.get("integrationType") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/pagination_links.py b/alerts_api/alerts_api/models/pagination_links.py deleted file mode 100644 index 94cf25f5..00000000 --- a/alerts_api/alerts_api/models/pagination_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.pagination_links_links import PaginationLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinks(BaseModel): - """ - A links object containing pagination related link(s). - """ # noqa: E501 - links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": PaginationLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/pagination_links_links.py b/alerts_api/alerts_api/models/pagination_links_links.py deleted file mode 100644 index d517d6ee..00000000 --- a/alerts_api/alerts_api/models/pagination_links_links.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from alerts_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinksLinks(BaseModel): - """ - PaginationLinksLinks - """ # noqa: E501 - previous: Optional[Link] = None - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["previous", "next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationLinksLinks 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.get("previous")) if obj.get("previous") is not None else None, - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/repeat.py b/alerts_api/alerts_api/models/repeat.py deleted file mode 100644 index 9bbda0ea..00000000 --- a/alerts_api/alerts_api/models/repeat.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from alerts_api.models.days_of_week import DaysOfWeek -from alerts_api.models.interval_type import IntervalType -from alerts_api.models.repeat_type import RepeatType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Repeat(BaseModel): - """ - Repeat options. - """ # noqa: E501 - type: Optional[RepeatType] = None - interval_type: Optional[IntervalType] = Field(default=None, alias="intervalType") - interval_length: Optional[StrictInt] = Field(default=None, description="Number of `intervalTypes` to wait before reactivating the alert suppression window.", alias="intervalLength") - days_of_week: Optional[List[DaysOfWeek]] = Field(default=None, alias="daysOfWeek") - __properties: ClassVar[List[str]] = ["type", "intervalType", "intervalLength", "daysOfWeek"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Repeat 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Repeat 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"), - "intervalType": obj.get("intervalType"), - "intervalLength": obj.get("intervalLength"), - "daysOfWeek": obj.get("daysOfWeek") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/repeat_type.py b/alerts_api/alerts_api/models/repeat_type.py deleted file mode 100644 index 372e8a88..00000000 --- a/alerts_api/alerts_api/models/repeat_type.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class RepeatType(str, Enum): - """ - Repeat options type. - """ - - """ - allowed enum values - """ - DAY = 'day' - WEEK = 'week' - MONTH = 'month' - CUSTOM = 'custom' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RepeatType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/rule.py b/alerts_api/alerts_api/models/rule.py deleted file mode 100644 index 451cc481..00000000 --- a/alerts_api/alerts_api/models/rule.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_type import AlertType -from alerts_api.models.severity import Severity -from alerts_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Rule(BaseModel): - """ - Rule - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") - rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") - expression: StrictStr = Field(description="The expression of the alert rule.") - direction: Optional[TestDirection] = None - notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") - is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") - alert_type: AlertType = Field(alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") - include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") - severity: Optional[Severity] = None - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Rule 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Rule from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "notifyOnClear": obj.get("notifyOnClear"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired"), - "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "severity": obj.get("severity") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/rule_detail.py b/alerts_api/alerts_api/models/rule_detail.py deleted file mode 100644 index d7a3bfd7..00000000 --- a/alerts_api/alerts_api/models/rule_detail.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_type import AlertType -from alerts_api.models.base_test import BaseTest -from alerts_api.models.notification import Notification -from alerts_api.models.severity import Severity -from alerts_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RuleDetail(BaseModel): - """ - RuleDetail - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") - rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") - expression: StrictStr = Field(description="The expression of the alert rule.") - direction: Optional[TestDirection] = None - notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") - is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") - alert_type: AlertType = Field(alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") - include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") - severity: Optional[Severity] = None - notifications: Optional[Notification] = None - tests: Optional[List[BaseTest]] = None - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RuleDetail 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - "tests", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of notifications - if self.notifications: - _dict['notifications'] = self.notifications.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RuleDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "notifyOnClear": obj.get("notifyOnClear"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired"), - "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "severity": obj.get("severity"), - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None, - "tests": [BaseTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/rule_detail_update.py b/alerts_api/alerts_api/models/rule_detail_update.py deleted file mode 100644 index 151179d4..00000000 --- a/alerts_api/alerts_api/models/rule_detail_update.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from alerts_api.models.alert_type import AlertType -from alerts_api.models.notification import Notification -from alerts_api.models.severity import Severity -from alerts_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RuleDetailUpdate(BaseModel): - """ - RuleDetailUpdate - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule.", alias="ruleId") - rule_name: StrictStr = Field(description="Name of the alert rule.", alias="ruleName") - expression: StrictStr = Field(description="The expression of the alert rule.") - direction: Optional[TestDirection] = None - notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear") - is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault") - alert_type: AlertType = Field(alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: StrictInt = Field(description="Specifies the divisor (y value) in the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: StrictInt = Field(description="Specifies the numerator (x value) in the “X of Y times” condition.", alias="roundsViolatingRequired") - include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes") - severity: Optional[Severity] = None - notifications: Optional[Notification] = None - test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds") - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "severity", "notifications", "testIds"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RuleDetailUpdate 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of notifications - if self.notifications: - _dict['notifications'] = self.notifications.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RuleDetailUpdate from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "notifyOnClear": obj.get("notifyOnClear"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired"), - "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "severity": obj.get("severity"), - "notifications": Notification.from_dict(obj.get("notifications")) if obj.get("notifications") is not None else None, - "testIds": obj.get("testIds") - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/rule_links.py b/alerts_api/alerts_api/models/rule_links.py deleted file mode 100644 index d3e7db61..00000000 --- a/alerts_api/alerts_api/models/rule_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.rule_links_links import RuleLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RuleLinks(BaseModel): - """ - RuleLinks - """ # noqa: E501 - links: Optional[RuleLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RuleLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of RuleLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": RuleLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/rule_links_links.py b/alerts_api/alerts_api/models/rule_links_links.py deleted file mode 100644 index 08632993..00000000 --- a/alerts_api/alerts_api/models/rule_links_links.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from alerts_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RuleLinksLinks(BaseModel): - """ - An object containing the alert rule links. - """ # noqa: E501 - rule: Optional[Link] = None - __properties: ClassVar[List[str]] = ["rule"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RuleLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of rule - if self.rule: - _dict['rule'] = self.rule.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RuleLinksLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rule": Link.from_dict(obj.get("rule")) if obj.get("rule") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/rules.py b/alerts_api/alerts_api/models/rules.py deleted file mode 100644 index 9e7cf940..00000000 --- a/alerts_api/alerts_api/models/rules.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.rule import Rule -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Rules(BaseModel): - """ - Rules - """ # noqa: E501 - alert_rules: Optional[List[Rule]] = Field(default=None, alias="alertRules") - __properties: ClassVar[List[str]] = ["alertRules"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Rules 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Rules from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alertRules": [Rule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/self_links.py b/alerts_api/alerts_api/models/self_links.py deleted file mode 100644 index efd1d030..00000000 --- a/alerts_api/alerts_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/self_links_links.py b/alerts_api/alerts_api/models/self_links_links.py deleted file mode 100644 index d3dc717c..00000000 --- a/alerts_api/alerts_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from alerts_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/severity.py b/alerts_api/alerts_api/models/severity.py deleted file mode 100644 index 340bfa91..00000000 --- a/alerts_api/alerts_api/models/severity.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Severity(str, Enum): - """ - The severity of the alert. - """ - - """ - allowed enum values - """ - INFO = 'info' - MAJOR = 'major' - MINOR = 'minor' - CRITICAL = 'critical' - UNKNOWN = 'unknown' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Severity from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/state.py b/alerts_api/alerts_api/models/state.py deleted file mode 100644 index 2b11e985..00000000 --- a/alerts_api/alerts_api/models/state.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class State(str, Enum): - """ - Current state of the alert. Possible values: clear or trigger. - """ - - """ - allowed enum values - """ - CLEAR = 'clear' - TRIGGER = 'trigger' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of State from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/test_direction.py b/alerts_api/alerts_api/models/test_direction.py deleted file mode 100644 index f657b976..00000000 --- a/alerts_api/alerts_api/models/test_direction.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDirection(str, Enum): - """ - Direction of the test, which affects how results are shown. - """ - - """ - allowed enum values - """ - TO_MINUS_TARGET = 'to-target' - FROM_MINUS_TARGET = 'from-target' - BIDIRECTIONAL = 'bidirectional' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDirection from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/test_interval.py b/alerts_api/alerts_api/models/test_interval.py deleted file mode 100644 index f18ab7c6..00000000 --- a/alerts_api/alerts_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/third_party_integration_type.py b/alerts_api/alerts_api/models/third_party_integration_type.py deleted file mode 100644 index 4f1b2e92..00000000 --- a/alerts_api/alerts_api/models/third_party_integration_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class ThirdPartyIntegrationType(str, Enum): - """ - Integration type. - """ - - """ - allowed enum values - """ - PAGERDUTY = 'pagerduty' - SLACK = 'slack' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ThirdPartyIntegrationType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/models/unauthorized_error.py b/alerts_api/alerts_api/models/unauthorized_error.py deleted file mode 100644 index df99eec3..00000000 --- a/alerts_api/alerts_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/alerts_api/alerts_api/models/unexpanded_test.py b/alerts_api/alerts_api/models/unexpanded_test.py deleted file mode 100644 index fca3e12b..00000000 --- a/alerts_api/alerts_api/models/unexpanded_test.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from alerts_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedTest(BaseModel): - """ - UnexpandedTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True - }) - return _obj - - diff --git a/alerts_api/alerts_api/models/webhook_integration_type.py b/alerts_api/alerts_api/models/webhook_integration_type.py deleted file mode 100644 index eaa3159c..00000000 --- a/alerts_api/alerts_api/models/webhook_integration_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class WebhookIntegrationType(str, Enum): - """ - Integration type. - """ - - """ - allowed enum values - """ - WEBHOOK = 'webhook' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WebhookIntegrationType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/alerts_api/alerts_api/rest.py b/alerts_api/alerts_api/rest.py deleted file mode 100644 index a8bf6fda..00000000 --- a/alerts_api/alerts_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from alerts_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/alerts_api/docs/Alert.md b/alerts_api/docs/Alert.md deleted file mode 100644 index 5785e383..00000000 --- a/alerts_api/docs/Alert.md +++ /dev/null @@ -1,37 +0,0 @@ -# Alert - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | A unique ID for each individual alert occurrence. | [optional] [readonly] -**alert_type** | [**AlertType**](AlertType.md) | | [optional] -**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] -**links** | [**RuleLinksLinks**](RuleLinksLinks.md) | | [optional] -**alert_rule_id** | **str** | Unique ID of the rule. | [optional] [readonly] -**alert_state** | [**State**](State.md) | | [optional] -**alert_severity** | [**Severity**](Severity.md) | | [optional] - -## Example - -```python -from alerts_api.models.alert import Alert - -# TODO update the JSON string below -json = "{}" -# create an instance of Alert from a JSON string -alert_instance = Alert.from_json(json) -# print the JSON string representation of the object -print Alert.to_json() - -# convert the object into a dict -alert_dict = alert_instance.to_dict() -# create an instance of Alert from a dict -alert_form_dict = alert.from_dict(alert_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/alerts_api/docs/AlertRoundsViolationMode.md b/alerts_api/docs/AlertRoundsViolationMode.md deleted file mode 100644 index a4609630..00000000 --- a/alerts_api/docs/AlertRoundsViolationMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# AlertRoundsViolationMode - -`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` - -## 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/alerts_api/docs/AlertRule.md b/alerts_api/docs/AlertRule.md deleted file mode 100644 index e053ad51..00000000 --- a/alerts_api/docs/AlertRule.md +++ /dev/null @@ -1,38 +0,0 @@ -# AlertRule - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] -**rule_name** | **str** | Name of the alert rule | [optional] [readonly] -**expression** | **str** | String expression of alert rule | [optional] [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] -**alert_type** | [**AlertType**](AlertType.md) | | [optional] -**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] -**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] -**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] -**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] -**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] - -## Example - -```python -from alerts_api.models.alert_rule import AlertRule - -# TODO update the JSON string below -json = "{}" -# create an instance of AlertRule from a JSON string -alert_rule_instance = AlertRule.from_json(json) -# print the JSON string representation of the object -print AlertRule.to_json() - -# convert the object into a dict -alert_rule_dict = alert_rule_instance.to_dict() -# create an instance of AlertRule from a dict -alert_rule_form_dict = alert_rule.from_dict(alert_rule_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/alerts_api/docs/AlertType.md b/alerts_api/docs/AlertType.md deleted file mode 100644 index 541a3038..00000000 --- a/alerts_api/docs/AlertType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AlertType - -Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values - -## 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/alerts_api/docs/AppLinks.md b/alerts_api/docs/AppLinks.md deleted file mode 100644 index a05beb3f..00000000 --- a/alerts_api/docs/AppLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# AppLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**AppLinksLinks**](AppLinksLinks.md) | | [optional] - -## Example - -```python -from alerts_api.models.app_links import AppLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of AppLinks from a JSON string -app_links_instance = AppLinks.from_json(json) -# print the JSON string representation of the object -print AppLinks.to_json() - -# convert the object into a dict -app_links_dict = app_links_instance.to_dict() -# create an instance of AppLinks from a dict -app_links_form_dict = app_links.from_dict(app_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/alerts_api/docs/AppLinksLinks.md b/alerts_api/docs/AppLinksLinks.md deleted file mode 100644 index 8909c5c4..00000000 --- a/alerts_api/docs/AppLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# AppLinksLinks - -A links object containing the ThousandEyes App link - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_link** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from alerts_api.models.app_links_links import AppLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of AppLinksLinks from a JSON string -app_links_links_instance = AppLinksLinks.from_json(json) -# print the JSON string representation of the object -print AppLinksLinks.to_json() - -# convert the object into a dict -app_links_links_dict = app_links_links_instance.to_dict() -# create an instance of AppLinksLinks from a dict -app_links_links_form_dict = app_links_links.from_dict(app_links_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/alerts_api/docs/BaseTest.md b/alerts_api/docs/BaseTest.md deleted file mode 100644 index 8dc93850..00000000 --- a/alerts_api/docs/BaseTest.md +++ /dev/null @@ -1,31 +0,0 @@ -# BaseTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] - -## Example - -```python -from alerts_api.models.base_test import BaseTest - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseTest from a JSON string -base_test_instance = BaseTest.from_json(json) -# print the JSON string representation of the object -print BaseTest.to_json() - -# convert the object into a dict -base_test_dict = base_test_instance.to_dict() -# create an instance of BaseTest from a dict -base_test_form_dict = base_test.from_dict(base_test_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/alerts_api/docs/Error.md b/alerts_api/docs/Error.md deleted file mode 100644 index 80301177..00000000 --- a/alerts_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 alerts_api.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_form_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/alerts_api/docs/Expand.md b/alerts_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/alerts_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/alerts_api/docs/Link.md b/alerts_api/docs/Link.md deleted file mode 100644 index 4289c348..00000000 --- a/alerts_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 alerts_api.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_form_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/alerts_api/docs/Notification.md b/alerts_api/docs/Notification.md deleted file mode 100644 index bebecaf4..00000000 --- a/alerts_api/docs/Notification.md +++ /dev/null @@ -1,31 +0,0 @@ -# Notification - -Alert notification object. See Alert notification integrations. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | [**NotificationEmail**](NotificationEmail.md) | | [optional] -**third_party** | [**List[NotificationThirdParty]**](NotificationThirdParty.md) | Third party notifications. | [optional] -**webhook** | [**List[NotificationWebhook]**](NotificationWebhook.md) | Webhooks notifications. | [optional] - -## Example - -```python -from alerts_api.models.notification import Notification - -# TODO update the JSON string below -json = "{}" -# create an instance of Notification from a JSON string -notification_instance = Notification.from_json(json) -# print the JSON string representation of the object -print Notification.to_json() - -# convert the object into a dict -notification_dict = notification_instance.to_dict() -# create an instance of Notification from a dict -notification_form_dict = notification.from_dict(notification_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/alerts_api/docs/PaginationLinks.md b/alerts_api/docs/PaginationLinks.md deleted file mode 100644 index 8c1095b5..00000000 --- a/alerts_api/docs/PaginationLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinks - -A links object containing pagination related link(s). - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] - -## Example - -```python -from alerts_api.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_form_dict = pagination_links.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/alerts_api/docs/PaginationLinksLinks.md b/alerts_api/docs/PaginationLinksLinks.md deleted file mode 100644 index 46be6625..00000000 --- a/alerts_api/docs/PaginationLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinksLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**previous** | [**Link**](Link.md) | | [optional] -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from alerts_api.models.pagination_links_links import PaginationLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationLinksLinks from a JSON string -pagination_links_links_instance = PaginationLinksLinks.from_json(json) -# print the JSON string representation of the object -print PaginationLinksLinks.to_json() - -# convert the object into a dict -pagination_links_links_dict = pagination_links_links_instance.to_dict() -# create an instance of PaginationLinksLinks from a dict -pagination_links_links_form_dict = pagination_links_links.from_dict(pagination_links_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/alerts_api/docs/RuleLinks.md b/alerts_api/docs/RuleLinks.md deleted file mode 100644 index a26ab9d7..00000000 --- a/alerts_api/docs/RuleLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# RuleLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**RuleLinksLinks**](RuleLinksLinks.md) | | [optional] - -## Example - -```python -from alerts_api.models.rule_links import RuleLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of RuleLinks from a JSON string -rule_links_instance = RuleLinks.from_json(json) -# print the JSON string representation of the object -print RuleLinks.to_json() - -# convert the object into a dict -rule_links_dict = rule_links_instance.to_dict() -# create an instance of RuleLinks from a dict -rule_links_form_dict = rule_links.from_dict(rule_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/alerts_api/docs/RuleLinksLinks.md b/alerts_api/docs/RuleLinksLinks.md deleted file mode 100644 index 9e3723d6..00000000 --- a/alerts_api/docs/RuleLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# RuleLinksLinks - -An object containing the alert rule links. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rule** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from alerts_api.models.rule_links_links import RuleLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of RuleLinksLinks from a JSON string -rule_links_links_instance = RuleLinksLinks.from_json(json) -# print the JSON string representation of the object -print RuleLinksLinks.to_json() - -# convert the object into a dict -rule_links_links_dict = rule_links_links_instance.to_dict() -# create an instance of RuleLinksLinks from a dict -rule_links_links_form_dict = rule_links_links.from_dict(rule_links_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/alerts_api/docs/SelfLinks.md b/alerts_api/docs/SelfLinks.md deleted file mode 100644 index 11975293..00000000 --- a/alerts_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from alerts_api.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_form_dict = self_links.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/alerts_api/docs/SelfLinksLinks.md b/alerts_api/docs/SelfLinksLinks.md deleted file mode 100644 index 13033bbf..00000000 --- a/alerts_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from alerts_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/alerts_api/docs/Severity.md b/alerts_api/docs/Severity.md deleted file mode 100644 index 4d7d130f..00000000 --- a/alerts_api/docs/Severity.md +++ /dev/null @@ -1,11 +0,0 @@ -# Severity - -The severity of the alert. - -## 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/alerts_api/docs/TestDirection.md b/alerts_api/docs/TestDirection.md deleted file mode 100644 index 59dab3fb..00000000 --- a/alerts_api/docs/TestDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDirection - -Direction of the test, which affects how results are shown. - -## 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/alerts_api/docs/TestInterval.md b/alerts_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/alerts_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/alerts_api/docs/UnauthorizedError.md b/alerts_api/docs/UnauthorizedError.md deleted file mode 100644 index cd116fef..00000000 --- a/alerts_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from alerts_api.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_form_dict = unauthorized_error.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/alerts_api/docs/UnexpandedTest.md b/alerts_api/docs/UnexpandedTest.md deleted file mode 100644 index c5228c8f..00000000 --- a/alerts_api/docs/UnexpandedTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] - -## Example - -```python -from alerts_api.models.unexpanded_test import UnexpandedTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedTest from a JSON string -unexpanded_test_instance = UnexpandedTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedTest.to_json() - -# convert the object into a dict -unexpanded_test_dict = unexpanded_test_instance.to_dict() -# create an instance of UnexpandedTest from a dict -unexpanded_test_form_dict = unexpanded_test.from_dict(unexpanded_test_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/alerts_api/git_push.sh b/alerts_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/alerts_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/alerts_api/pyproject.toml b/alerts_api/pyproject.toml deleted file mode 100644 index 556da7f7..00000000 --- a/alerts_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "alerts_api" -version = "1.0.0" -description = "Alerts API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Alerts API"] -include = ["alerts_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/alerts_api/setup.py b/alerts_api/setup.py deleted file mode 100644 index 3580872e..00000000 --- a/alerts_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "alerts-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Alerts API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Alerts API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## Overview Manage all alerts, alert rules and alert suppression windows. - """, # noqa: E501 - package_data={"alerts_api": ["py.typed"]}, -) diff --git a/alerts_api/test-requirements.txt b/alerts_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/alerts_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/alerts_api/test/test_alert.py b/alerts_api/test/test_alert.py deleted file mode 100644 index 35e95ab6..00000000 --- a/alerts_api/test/test_alert.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert import Alert - -class TestAlert(unittest.TestCase): - """Alert unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Alert: - """Test Alert - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Alert` - """ - model = Alert() - if include_optional: - return Alert( - id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', - alert_type = 'http-server', - start_date = '2020-04-23T13:43:16Z', - end_date = '2020-04-23T13:43:16Z', - violation_count = 2, - duration = 60, - links = alerts_api.models.rule_links__links.RuleLinks__links( - rule = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - alert_rule_id = '127094', - alert_state = 'active', - alert_severity = 'major' - ) - else: - return Alert( - ) - """ - - def testAlert(self): - """Test Alert""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_detail.py b/alerts_api/test/test_alert_detail.py deleted file mode 100644 index e626892d..00000000 --- a/alerts_api/test/test_alert_detail.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_detail import AlertDetail - -class TestAlertDetail(unittest.TestCase): - """AlertDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertDetail: - """Test AlertDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertDetail` - """ - model = AlertDetail() - if include_optional: - return AlertDetail( - id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', - alert_type = 'http-server', - start_date = '2020-04-23T13:43:16Z', - end_date = '2020-04-23T13:43:16Z', - violation_count = 2, - duration = 60, - links = alerts_api.models.rule_links__links.RuleLinks__links( - rule = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - state = 'active', - severity = 'major', - details = [ - alerts_api.models.alert_metric_detail.AlertMetricDetail( - end = null, - id = '3379', - name = 'Bucharest, Romania', - start = null, - state = 'active', - type = 'cea_agent', ) - ] - ) - else: - return AlertDetail( - ) - """ - - def testAlertDetail(self): - """Test AlertDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_links.py b/alerts_api/test/test_alert_links.py deleted file mode 100644 index dba8c0d5..00000000 --- a/alerts_api/test/test_alert_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_links import AlertLinks - -class TestAlertLinks(unittest.TestCase): - """AlertLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertLinks: - """Test AlertLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertLinks` - """ - model = AlertLinks() - if include_optional: - return AlertLinks( - links = alerts_api.models.rule_links__links.RuleLinks__links( - rule = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return AlertLinks( - ) - """ - - def testAlertLinks(self): - """Test AlertLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_metric_detail.py b/alerts_api/test/test_alert_metric_detail.py deleted file mode 100644 index 4bfc6ecd..00000000 --- a/alerts_api/test/test_alert_metric_detail.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_metric_detail import AlertMetricDetail - -class TestAlertMetricDetail(unittest.TestCase): - """AlertMetricDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertMetricDetail: - """Test AlertMetricDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertMetricDetail` - """ - model = AlertMetricDetail() - if include_optional: - return AlertMetricDetail( - end = None, - id = '3379', - name = 'Bucharest, Romania', - start = None, - state = 'active', - type = 'cea_agent' - ) - else: - return AlertMetricDetail( - ) - """ - - def testAlertMetricDetail(self): - """Test AlertMetricDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_metric_detail_end.py b/alerts_api/test/test_alert_metric_detail_end.py deleted file mode 100644 index 6d60e0c5..00000000 --- a/alerts_api/test/test_alert_metric_detail_end.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_metric_detail_end import AlertMetricDetailEnd - -class TestAlertMetricDetailEnd(unittest.TestCase): - """AlertMetricDetailEnd unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertMetricDetailEnd: - """Test AlertMetricDetailEnd - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertMetricDetailEnd` - """ - model = AlertMetricDetailEnd() - if include_optional: - return AlertMetricDetailEnd( - metrics = '' - ) - else: - return AlertMetricDetailEnd( - ) - """ - - def testAlertMetricDetailEnd(self): - """Test AlertMetricDetailEnd""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_metric_detail_start.py b/alerts_api/test/test_alert_metric_detail_start.py deleted file mode 100644 index 0f68c554..00000000 --- a/alerts_api/test/test_alert_metric_detail_start.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_metric_detail_start import AlertMetricDetailStart - -class TestAlertMetricDetailStart(unittest.TestCase): - """AlertMetricDetailStart unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertMetricDetailStart: - """Test AlertMetricDetailStart - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertMetricDetailStart` - """ - model = AlertMetricDetailStart() - if include_optional: - return AlertMetricDetailStart( - metrics = '' - ) - else: - return AlertMetricDetailStart( - ) - """ - - def testAlertMetricDetailStart(self): - """Test AlertMetricDetailStart""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_metrics.py b/alerts_api/test/test_alert_metrics.py deleted file mode 100644 index 97a2ad7a..00000000 --- a/alerts_api/test/test_alert_metrics.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_metrics import AlertMetrics - -class TestAlertMetrics(unittest.TestCase): - """AlertMetrics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertMetrics: - """Test AlertMetrics - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertMetrics` - """ - model = AlertMetrics() - if include_optional: - return AlertMetrics( - metrics = '' - ) - else: - return AlertMetrics( - ) - """ - - def testAlertMetrics(self): - """Test AlertMetrics""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_rounds_violation_mode.py b/alerts_api/test/test_alert_rounds_violation_mode.py deleted file mode 100644 index 49e94f57..00000000 --- a/alerts_api/test/test_alert_rounds_violation_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode - -class TestAlertRoundsViolationMode(unittest.TestCase): - """AlertRoundsViolationMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAlertRoundsViolationMode(self): - """Test AlertRoundsViolationMode""" - # inst = AlertRoundsViolationMode() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_rule.py b/alerts_api/test/test_alert_rule.py deleted file mode 100644 index 392c0362..00000000 --- a/alerts_api/test/test_alert_rule.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_rule import AlertRule - -class TestAlertRule(unittest.TestCase): - """AlertRule unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertRule: - """Test AlertRule - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertRule` - """ - model = AlertRule() - if include_optional: - return AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2 - ) - else: - return AlertRule( - ) - """ - - def testAlertRule(self): - """Test AlertRule""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_rules_api.py b/alerts_api/test/test_alert_rules_api.py deleted file mode 100644 index b5f37df1..00000000 --- a/alerts_api/test/test_alert_rules_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from alerts_api.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(self) -> None: - """Test case for create_alert_rule - - Create alert rule - """ - pass - - def test_delete_alert_rule(self) -> None: - """Test case for delete_alert_rule - - Delete alert rule - """ - pass - - def test_get_alert_rule_details(self) -> None: - """Test case for get_alert_rule_details - - Retrieve alert rule - """ - pass - - def test_get_alerts_rules(self) -> None: - """Test case for get_alerts_rules - - List alert rules - """ - pass - - def test_update_alert_rule(self) -> None: - """Test case for update_alert_rule - - Update alert rule - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_suppression_window.py b/alerts_api/test/test_alert_suppression_window.py deleted file mode 100644 index ee512662..00000000 --- a/alerts_api/test/test_alert_suppression_window.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_suppression_window import AlertSuppressionWindow - -class TestAlertSuppressionWindow(unittest.TestCase): - """AlertSuppressionWindow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertSuppressionWindow: - """Test AlertSuppressionWindow - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertSuppressionWindow` - """ - model = AlertSuppressionWindow() - if include_optional: - return AlertSuppressionWindow( - alert_suppression_window_id = '2411', - name = 'Monthly maintenance', - is_enabled = False, - status = 'ended', - start_date = '2017-07-01T05:00Z', - duration = 0, - repeat = alerts_api.models.repeat.Repeat( - type = 'week', - interval_type = 'day', - interval_length = 2, - days_of_week = [ - 'sun' - ], ), - end_repeat = alerts_api.models.end_repeat.EndRepeat( - type = 'never', - count = 3, - date = 'Sat Jul 01 01:00:00 BST 2017', ) - ) - else: - return AlertSuppressionWindow( - ) - """ - - def testAlertSuppressionWindow(self): - """Test AlertSuppressionWindow""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_suppression_window_request.py b/alerts_api/test/test_alert_suppression_window_request.py deleted file mode 100644 index c948bf7a..00000000 --- a/alerts_api/test/test_alert_suppression_window_request.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_suppression_window_request import AlertSuppressionWindowRequest - -class TestAlertSuppressionWindowRequest(unittest.TestCase): - """AlertSuppressionWindowRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertSuppressionWindowRequest: - """Test AlertSuppressionWindowRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertSuppressionWindowRequest` - """ - model = AlertSuppressionWindowRequest() - if include_optional: - return AlertSuppressionWindowRequest( - alert_suppression_window_id = '2411', - name = 'Monthly maintenance', - is_enabled = False, - status = 'ended', - start_date = '2017-07-01T05:00Z', - duration = 0, - repeat = alerts_api.models.repeat.Repeat( - type = 'week', - interval_type = 'day', - interval_length = 2, - days_of_week = [ - 'sun' - ], ), - end_repeat = alerts_api.models.end_repeat.EndRepeat( - type = 'never', - count = 3, - date = 'Sat Jul 01 01:00:00 BST 2017', ), - tests = [ - '71687' - ] - ) - else: - return AlertSuppressionWindowRequest( - ) - """ - - def testAlertSuppressionWindowRequest(self): - """Test AlertSuppressionWindowRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_suppression_window_state.py b/alerts_api/test/test_alert_suppression_window_state.py deleted file mode 100644 index 11a59c2d..00000000 --- a/alerts_api/test/test_alert_suppression_window_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_suppression_window_state import AlertSuppressionWindowState - -class TestAlertSuppressionWindowState(unittest.TestCase): - """AlertSuppressionWindowState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAlertSuppressionWindowState(self): - """Test AlertSuppressionWindowState""" - # inst = AlertSuppressionWindowState() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_suppression_windows.py b/alerts_api/test/test_alert_suppression_windows.py deleted file mode 100644 index c758a871..00000000 --- a/alerts_api/test/test_alert_suppression_windows.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_suppression_windows import AlertSuppressionWindows - -class TestAlertSuppressionWindows(unittest.TestCase): - """AlertSuppressionWindows unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertSuppressionWindows: - """Test AlertSuppressionWindows - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertSuppressionWindows` - """ - model = AlertSuppressionWindows() - if include_optional: - return AlertSuppressionWindows( - alert_suppression_windows = [ - null - ] - ) - else: - return AlertSuppressionWindows( - ) - """ - - def testAlertSuppressionWindows(self): - """Test AlertSuppressionWindows""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_suppression_windows_alert_suppression_windows_inner.py b/alerts_api/test/test_alert_suppression_windows_alert_suppression_windows_inner.py deleted file mode 100644 index 9c2ef470..00000000 --- a/alerts_api/test/test_alert_suppression_windows_alert_suppression_windows_inner.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_suppression_windows_alert_suppression_windows_inner import AlertSuppressionWindowsAlertSuppressionWindowsInner - -class TestAlertSuppressionWindowsAlertSuppressionWindowsInner(unittest.TestCase): - """AlertSuppressionWindowsAlertSuppressionWindowsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertSuppressionWindowsAlertSuppressionWindowsInner: - """Test AlertSuppressionWindowsAlertSuppressionWindowsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertSuppressionWindowsAlertSuppressionWindowsInner` - """ - model = AlertSuppressionWindowsAlertSuppressionWindowsInner() - if include_optional: - return AlertSuppressionWindowsAlertSuppressionWindowsInner( - alert_suppression_window_id = '2411', - name = 'Monthly maintenance', - is_enabled = False, - status = 'ended', - start_date = '2017-07-01T05:00Z', - duration = 0, - repeat = alerts_api.models.repeat.Repeat( - type = 'week', - interval_type = 'day', - interval_length = 2, - days_of_week = [ - 'sun' - ], ), - end_repeat = alerts_api.models.end_repeat.EndRepeat( - type = 'never', - count = 3, - date = 'Sat Jul 01 01:00:00 BST 2017', ), - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return AlertSuppressionWindowsAlertSuppressionWindowsInner( - ) - """ - - def testAlertSuppressionWindowsAlertSuppressionWindowsInner(self): - """Test AlertSuppressionWindowsAlertSuppressionWindowsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_suppression_windows_api.py b/alerts_api/test/test_alert_suppression_windows_api.py deleted file mode 100644 index a640a5ad..00000000 --- a/alerts_api/test/test_alert_suppression_windows_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from alerts_api.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_suppression_windows(self) -> None: - """Test case for create_suppression_windows - - Create alert suppression window - """ - pass - - def test_delete_suppression_window(self) -> None: - """Test case for delete_suppression_window - - Delete alert suppression window - """ - pass - - def test_get_suppression_window_details(self) -> None: - """Test case for get_suppression_window_details - - Retrieve alert suppression window - """ - pass - - def test_get_suppression_windows(self) -> None: - """Test case for get_suppression_windows - - List alert suppression windows - """ - pass - - def test_update_suppression_window(self) -> None: - """Test case for update_suppression_window - - Update alert suppression window - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alert_type.py b/alerts_api/test/test_alert_type.py deleted file mode 100644 index 8682be9a..00000000 --- a/alerts_api/test/test_alert_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alert_type import AlertType - -class TestAlertType(unittest.TestCase): - """AlertType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAlertType(self): - """Test AlertType""" - # inst = AlertType() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alerts.py b/alerts_api/test/test_alerts.py deleted file mode 100644 index 246e1a0a..00000000 --- a/alerts_api/test/test_alerts.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.alerts import Alerts - -class TestAlerts(unittest.TestCase): - """Alerts unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Alerts: - """Test Alerts - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Alerts` - """ - model = Alerts() - if include_optional: - return Alerts( - alerts = [ - null - ] - ) - else: - return Alerts( - ) - """ - - def testAlerts(self): - """Test Alerts""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_alerts_api.py b/alerts_api/test/test_alerts_api.py deleted file mode 100644 index d5781f92..00000000 --- a/alerts_api/test/test_alerts_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from alerts_api.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_details(self) -> None: - """Test case for get_alert_details - - Retrieve alert details - """ - pass - - def test_get_alerts(self) -> None: - """Test case for get_alerts - - List active alerts - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_app_links.py b/alerts_api/test/test_app_links.py deleted file mode 100644 index b7422184..00000000 --- a/alerts_api/test/test_app_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.app_links import AppLinks - -class TestAppLinks(unittest.TestCase): - """AppLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AppLinks: - """Test AppLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AppLinks` - """ - model = AppLinks() - if include_optional: - return AppLinks( - links = alerts_api.models.app_links__links.AppLinks__links( - app_link = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return AppLinks( - ) - """ - - def testAppLinks(self): - """Test AppLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_app_links_links.py b/alerts_api/test/test_app_links_links.py deleted file mode 100644 index c9f067ad..00000000 --- a/alerts_api/test/test_app_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.app_links_links import AppLinksLinks - -class TestAppLinksLinks(unittest.TestCase): - """AppLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AppLinksLinks: - """Test AppLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AppLinksLinks` - """ - model = AppLinksLinks() - if include_optional: - return AppLinksLinks( - app_link = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return AppLinksLinks( - ) - """ - - def testAppLinksLinks(self): - """Test AppLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_base_alert.py b/alerts_api/test/test_base_alert.py deleted file mode 100644 index bc1f3025..00000000 --- a/alerts_api/test/test_base_alert.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.base_alert import BaseAlert - -class TestBaseAlert(unittest.TestCase): - """BaseAlert unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseAlert: - """Test BaseAlert - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BaseAlert` - """ - model = BaseAlert() - if include_optional: - return BaseAlert( - links = alerts_api.models.rule_links__links.RuleLinks__links( - rule = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569', - alert_type = 'http-server', - start_date = '2020-04-23T13:43:16Z', - end_date = '2020-04-23T13:43:16Z', - violation_count = 2, - duration = 60 - ) - else: - return BaseAlert( - ) - """ - - def testBaseAlert(self): - """Test BaseAlert""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_base_test.py b/alerts_api/test/test_base_test.py deleted file mode 100644 index 93d889b9..00000000 --- a/alerts_api/test/test_base_test.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.base_test import BaseTest - -class TestBaseTest(unittest.TestCase): - """BaseTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseTest: - """Test BaseTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BaseTest` - """ - model = BaseTest() - if include_optional: - return BaseTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - alerts_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ] - ) - else: - return BaseTest( - ) - """ - - def testBaseTest(self): - """Test BaseTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_complete_alert_suppression_window.py b/alerts_api/test/test_complete_alert_suppression_window.py deleted file mode 100644 index 679a826d..00000000 --- a/alerts_api/test/test_complete_alert_suppression_window.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.complete_alert_suppression_window import CompleteAlertSuppressionWindow - -class TestCompleteAlertSuppressionWindow(unittest.TestCase): - """CompleteAlertSuppressionWindow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompleteAlertSuppressionWindow: - """Test CompleteAlertSuppressionWindow - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompleteAlertSuppressionWindow` - """ - model = CompleteAlertSuppressionWindow() - if include_optional: - return CompleteAlertSuppressionWindow( - alert_suppression_window_id = '2411', - name = 'Monthly maintenance', - is_enabled = False, - status = 'ended', - start_date = '2017-07-01T05:00Z', - duration = 0, - repeat = alerts_api.models.repeat.Repeat( - type = 'week', - interval_type = 'day', - interval_length = 2, - days_of_week = [ - 'sun' - ], ), - end_repeat = alerts_api.models.end_repeat.EndRepeat( - type = 'never', - count = 3, - date = 'Sat Jul 01 01:00:00 BST 2017', ), - tests = [ - null - ] - ) - else: - return CompleteAlertSuppressionWindow( - ) - """ - - def testCompleteAlertSuppressionWindow(self): - """Test CompleteAlertSuppressionWindow""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_create_alert_rule201_response.py b/alerts_api/test/test_create_alert_rule201_response.py deleted file mode 100644 index bda530e0..00000000 --- a/alerts_api/test/test_create_alert_rule201_response.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.create_alert_rule201_response import CreateAlertRule201Response - -class TestCreateAlertRule201Response(unittest.TestCase): - """CreateAlertRule201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateAlertRule201Response: - """Test CreateAlertRule201Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateAlertRule201Response` - """ - model = CreateAlertRule201Response() - if include_optional: - return CreateAlertRule201Response( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major', - notifications = alerts_api.models.notification.Notification( - email = alerts_api.models.notification_email.NotificationEmail( - recipients = noreply@thousandeyes.com, - message = 'Notification message', ), - third_party = [ - alerts_api.models.notification_third_party.NotificationThirdParty( - integration_id = sl-101, - integration_type = 'slack', ) - ], - webhook = [ - alerts_api.models.notification_webhook.NotificationWebhook( - integration_id = wb-201, ) - ], ), - test_ids = [ - '["281474976710706","271659"]' - ], - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return CreateAlertRule201Response( - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - alert_type = 'http-server', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - ) - """ - - def testCreateAlertRule201Response(self): - """Test CreateAlertRule201Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_create_suppression_windows201_response.py b/alerts_api/test/test_create_suppression_windows201_response.py deleted file mode 100644 index 79e7bd91..00000000 --- a/alerts_api/test/test_create_suppression_windows201_response.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.create_suppression_windows201_response import CreateSuppressionWindows201Response - -class TestCreateSuppressionWindows201Response(unittest.TestCase): - """CreateSuppressionWindows201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateSuppressionWindows201Response: - """Test CreateSuppressionWindows201Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateSuppressionWindows201Response` - """ - model = CreateSuppressionWindows201Response() - if include_optional: - return CreateSuppressionWindows201Response( - alert_suppression_window_id = '2411', - name = 'Monthly maintenance', - is_enabled = False, - status = 'ended', - start_date = '2017-07-01T05:00Z', - duration = 0, - repeat = alerts_api.models.repeat.Repeat( - type = 'week', - interval_type = 'day', - interval_length = 2, - days_of_week = [ - 'sun' - ], ), - end_repeat = alerts_api.models.end_repeat.EndRepeat( - type = 'never', - count = 3, - date = 'Sat Jul 01 01:00:00 BST 2017', ), - tests = [ - null - ], - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return CreateSuppressionWindows201Response( - ) - """ - - def testCreateSuppressionWindows201Response(self): - """Test CreateSuppressionWindows201Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_days_of_week.py b/alerts_api/test/test_days_of_week.py deleted file mode 100644 index 90482543..00000000 --- a/alerts_api/test/test_days_of_week.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.days_of_week import DaysOfWeek - -class TestDaysOfWeek(unittest.TestCase): - """DaysOfWeek unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDaysOfWeek(self): - """Test DaysOfWeek""" - # inst = DaysOfWeek() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_end_repeat.py b/alerts_api/test/test_end_repeat.py deleted file mode 100644 index 8cb017c7..00000000 --- a/alerts_api/test/test_end_repeat.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.end_repeat import EndRepeat - -class TestEndRepeat(unittest.TestCase): - """EndRepeat unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndRepeat: - """Test EndRepeat - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndRepeat` - """ - model = EndRepeat() - if include_optional: - return EndRepeat( - type = 'never', - count = 3, - var_date = 'Sat Jul 01 01:00:00 BST 2017' - ) - else: - return EndRepeat( - ) - """ - - def testEndRepeat(self): - """Test EndRepeat""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_end_repeat_type.py b/alerts_api/test/test_end_repeat_type.py deleted file mode 100644 index be74ffac..00000000 --- a/alerts_api/test/test_end_repeat_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.end_repeat_type import EndRepeatType - -class TestEndRepeatType(unittest.TestCase): - """EndRepeatType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndRepeatType(self): - """Test EndRepeatType""" - # inst = EndRepeatType() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_error.py b/alerts_api/test/test_error.py deleted file mode 100644 index cbad9c88..00000000 --- a/alerts_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_expand.py b/alerts_api/test/test_expand.py deleted file mode 100644 index b8903018..00000000 --- a/alerts_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_get_alert_rule_details200_response.py b/alerts_api/test/test_get_alert_rule_details200_response.py deleted file mode 100644 index 8795cb95..00000000 --- a/alerts_api/test/test_get_alert_rule_details200_response.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.get_alert_rule_details200_response import GetAlertRuleDetails200Response - -class TestGetAlertRuleDetails200Response(unittest.TestCase): - """GetAlertRuleDetails200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAlertRuleDetails200Response: - """Test GetAlertRuleDetails200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAlertRuleDetails200Response` - """ - model = GetAlertRuleDetails200Response() - if include_optional: - return GetAlertRuleDetails200Response( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major', - notifications = alerts_api.models.notification.Notification( - email = alerts_api.models.notification_email.NotificationEmail( - recipients = noreply@thousandeyes.com, - message = 'Notification message', ), - third_party = [ - alerts_api.models.notification_third_party.NotificationThirdParty( - integration_id = sl-101, - integration_type = 'slack', ) - ], - webhook = [ - alerts_api.models.notification_webhook.NotificationWebhook( - integration_id = wb-201, ) - ], ), - tests = [ - null - ], - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetAlertRuleDetails200Response( - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - alert_type = 'http-server', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - ) - """ - - def testGetAlertRuleDetails200Response(self): - """Test GetAlertRuleDetails200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_get_alerts200_response.py b/alerts_api/test/test_get_alerts200_response.py deleted file mode 100644 index f82d1c31..00000000 --- a/alerts_api/test/test_get_alerts200_response.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.get_alerts200_response import GetAlerts200Response - -class TestGetAlerts200Response(unittest.TestCase): - """GetAlerts200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAlerts200Response: - """Test GetAlerts200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAlerts200Response` - """ - model = GetAlerts200Response() - if include_optional: - return GetAlerts200Response( - alerts = [ - null - ], - links = alerts_api.models.pagination_links__links.PaginationLinks__links( - previous = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetAlerts200Response( - ) - """ - - def testGetAlerts200Response(self): - """Test GetAlerts200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_get_alerts_rules200_response.py b/alerts_api/test/test_get_alerts_rules200_response.py deleted file mode 100644 index 95e124af..00000000 --- a/alerts_api/test/test_get_alerts_rules200_response.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.get_alerts_rules200_response import GetAlertsRules200Response - -class TestGetAlertsRules200Response(unittest.TestCase): - """GetAlertsRules200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAlertsRules200Response: - """Test GetAlertsRules200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAlertsRules200Response` - """ - model = GetAlertsRules200Response() - if include_optional: - return GetAlertsRules200Response( - alert_rules = [ - alerts_api.models.rule.Rule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major', ) - ], - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetAlertsRules200Response( - ) - """ - - def testGetAlertsRules200Response(self): - """Test GetAlertsRules200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_get_suppression_windows200_response.py b/alerts_api/test/test_get_suppression_windows200_response.py deleted file mode 100644 index 605b2a5d..00000000 --- a/alerts_api/test/test_get_suppression_windows200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.get_suppression_windows200_response import GetSuppressionWindows200Response - -class TestGetSuppressionWindows200Response(unittest.TestCase): - """GetSuppressionWindows200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSuppressionWindows200Response: - """Test GetSuppressionWindows200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetSuppressionWindows200Response` - """ - model = GetSuppressionWindows200Response() - if include_optional: - return GetSuppressionWindows200Response( - alert_suppression_windows = [ - null - ], - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetSuppressionWindows200Response( - ) - """ - - def testGetSuppressionWindows200Response(self): - """Test GetSuppressionWindows200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_interval_type.py b/alerts_api/test/test_interval_type.py deleted file mode 100644 index bf505633..00000000 --- a/alerts_api/test/test_interval_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.interval_type import IntervalType - -class TestIntervalType(unittest.TestCase): - """IntervalType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIntervalType(self): - """Test IntervalType""" - # inst = IntervalType() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_link.py b/alerts_api/test/test_link.py deleted file mode 100644 index 0dc07585..00000000 --- a/alerts_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_notification.py b/alerts_api/test/test_notification.py deleted file mode 100644 index 53d81eaa..00000000 --- a/alerts_api/test/test_notification.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.notification import Notification - -class TestNotification(unittest.TestCase): - """Notification unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Notification: - """Test Notification - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Notification` - """ - model = Notification() - if include_optional: - return Notification( - email = alerts_api.models.notification_email.NotificationEmail( - recipients = noreply@thousandeyes.com, - message = 'Notification message', ), - third_party = [ - alerts_api.models.notification_third_party.NotificationThirdParty( - integration_id = sl-101, - integration_type = 'slack', ) - ], - webhook = [ - alerts_api.models.notification_webhook.NotificationWebhook( - integration_id = wb-201, - integration_type = 'webhook', ) - ] - ) - else: - return Notification( - ) - """ - - def testNotification(self): - """Test Notification""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_notification_email.py b/alerts_api/test/test_notification_email.py deleted file mode 100644 index 32f10977..00000000 --- a/alerts_api/test/test_notification_email.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.notification_email import NotificationEmail - -class TestNotificationEmail(unittest.TestCase): - """NotificationEmail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NotificationEmail: - """Test NotificationEmail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NotificationEmail` - """ - model = NotificationEmail() - if include_optional: - return NotificationEmail( - recipients = noreply@thousandeyes.com, - message = 'Notification message' - ) - else: - return NotificationEmail( - ) - """ - - def testNotificationEmail(self): - """Test NotificationEmail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_notification_third_party.py b/alerts_api/test/test_notification_third_party.py deleted file mode 100644 index 2d629c97..00000000 --- a/alerts_api/test/test_notification_third_party.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.notification_third_party import NotificationThirdParty - -class TestNotificationThirdParty(unittest.TestCase): - """NotificationThirdParty unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NotificationThirdParty: - """Test NotificationThirdParty - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NotificationThirdParty` - """ - model = NotificationThirdParty() - if include_optional: - return NotificationThirdParty( - integration_id = sl-101, - integration_type = 'slack' - ) - else: - return NotificationThirdParty( - ) - """ - - def testNotificationThirdParty(self): - """Test NotificationThirdParty""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_notification_webhook.py b/alerts_api/test/test_notification_webhook.py deleted file mode 100644 index 252d853a..00000000 --- a/alerts_api/test/test_notification_webhook.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.notification_webhook import NotificationWebhook - -class TestNotificationWebhook(unittest.TestCase): - """NotificationWebhook unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NotificationWebhook: - """Test NotificationWebhook - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NotificationWebhook` - """ - model = NotificationWebhook() - if include_optional: - return NotificationWebhook( - integration_id = wb-201, - integration_type = 'webhook' - ) - else: - return NotificationWebhook( - ) - """ - - def testNotificationWebhook(self): - """Test NotificationWebhook""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_pagination_links.py b/alerts_api/test/test_pagination_links.py deleted file mode 100644 index 89dabe31..00000000 --- a/alerts_api/test/test_pagination_links.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.pagination_links import PaginationLinks - -class TestPaginationLinks(unittest.TestCase): - """PaginationLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinks: - """Test PaginationLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinks` - """ - model = PaginationLinks() - if include_optional: - return PaginationLinks( - links = alerts_api.models.pagination_links__links.PaginationLinks__links( - previous = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationLinks( - ) - """ - - def testPaginationLinks(self): - """Test PaginationLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_pagination_links_links.py b/alerts_api/test/test_pagination_links_links.py deleted file mode 100644 index eaa45c71..00000000 --- a/alerts_api/test/test_pagination_links_links.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.pagination_links_links import PaginationLinksLinks - -class TestPaginationLinksLinks(unittest.TestCase): - """PaginationLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinksLinks: - """Test PaginationLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinksLinks` - """ - model = PaginationLinksLinks() - if include_optional: - return PaginationLinksLinks( - previous = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationLinksLinks( - ) - """ - - def testPaginationLinksLinks(self): - """Test PaginationLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_repeat.py b/alerts_api/test/test_repeat.py deleted file mode 100644 index 338136ae..00000000 --- a/alerts_api/test/test_repeat.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.repeat import Repeat - -class TestRepeat(unittest.TestCase): - """Repeat unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Repeat: - """Test Repeat - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Repeat` - """ - model = Repeat() - if include_optional: - return Repeat( - type = 'week', - interval_type = 'day', - interval_length = 2, - days_of_week = [ - 'sun' - ] - ) - else: - return Repeat( - ) - """ - - def testRepeat(self): - """Test Repeat""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_repeat_type.py b/alerts_api/test/test_repeat_type.py deleted file mode 100644 index 1fd3e2df..00000000 --- a/alerts_api/test/test_repeat_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.repeat_type import RepeatType - -class TestRepeatType(unittest.TestCase): - """RepeatType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRepeatType(self): - """Test RepeatType""" - # inst = RepeatType() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_rule.py b/alerts_api/test/test_rule.py deleted file mode 100644 index d77700a1..00000000 --- a/alerts_api/test/test_rule.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.rule import Rule - -class TestRule(unittest.TestCase): - """Rule unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Rule: - """Test Rule - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Rule` - """ - model = Rule() - if include_optional: - return Rule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major' - ) - else: - return Rule( - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - alert_type = 'http-server', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - ) - """ - - def testRule(self): - """Test Rule""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_rule_detail.py b/alerts_api/test/test_rule_detail.py deleted file mode 100644 index 25eeae8f..00000000 --- a/alerts_api/test/test_rule_detail.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.rule_detail import RuleDetail - -class TestRuleDetail(unittest.TestCase): - """RuleDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuleDetail: - """Test RuleDetail - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuleDetail` - """ - model = RuleDetail() - if include_optional: - return RuleDetail( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major', - notifications = alerts_api.models.notification.Notification( - email = alerts_api.models.notification_email.NotificationEmail( - recipients = noreply@thousandeyes.com, - message = 'Notification message', ), - third_party = [ - alerts_api.models.notification_third_party.NotificationThirdParty( - integration_id = sl-101, - integration_type = 'slack', ) - ], - webhook = [ - alerts_api.models.notification_webhook.NotificationWebhook( - integration_id = wb-201, ) - ], ), - tests = [ - null - ] - ) - else: - return RuleDetail( - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - alert_type = 'http-server', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - ) - """ - - def testRuleDetail(self): - """Test RuleDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_rule_detail_update.py b/alerts_api/test/test_rule_detail_update.py deleted file mode 100644 index 10b7164c..00000000 --- a/alerts_api/test/test_rule_detail_update.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.rule_detail_update import RuleDetailUpdate - -class TestRuleDetailUpdate(unittest.TestCase): - """RuleDetailUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuleDetailUpdate: - """Test RuleDetailUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuleDetailUpdate` - """ - model = RuleDetailUpdate() - if include_optional: - return RuleDetailUpdate( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major', - notifications = alerts_api.models.notification.Notification( - email = alerts_api.models.notification_email.NotificationEmail( - recipients = noreply@thousandeyes.com, - message = 'Notification message', ), - third_party = [ - alerts_api.models.notification_third_party.NotificationThirdParty( - integration_id = sl-101, - integration_type = 'slack', ) - ], - webhook = [ - alerts_api.models.notification_webhook.NotificationWebhook( - integration_id = wb-201, ) - ], ), - test_ids = [ - '["281474976710706","271659"]' - ] - ) - else: - return RuleDetailUpdate( - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - alert_type = 'http-server', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - ) - """ - - def testRuleDetailUpdate(self): - """Test RuleDetailUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_rule_links.py b/alerts_api/test/test_rule_links.py deleted file mode 100644 index 73d3d244..00000000 --- a/alerts_api/test/test_rule_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.rule_links import RuleLinks - -class TestRuleLinks(unittest.TestCase): - """RuleLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuleLinks: - """Test RuleLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuleLinks` - """ - model = RuleLinks() - if include_optional: - return RuleLinks( - links = alerts_api.models.rule_links__links.RuleLinks__links( - rule = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return RuleLinks( - ) - """ - - def testRuleLinks(self): - """Test RuleLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_rule_links_links.py b/alerts_api/test/test_rule_links_links.py deleted file mode 100644 index 8e6fcde0..00000000 --- a/alerts_api/test/test_rule_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.rule_links_links import RuleLinksLinks - -class TestRuleLinksLinks(unittest.TestCase): - """RuleLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RuleLinksLinks: - """Test RuleLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RuleLinksLinks` - """ - model = RuleLinksLinks() - if include_optional: - return RuleLinksLinks( - rule = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return RuleLinksLinks( - ) - """ - - def testRuleLinksLinks(self): - """Test RuleLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_rules.py b/alerts_api/test/test_rules.py deleted file mode 100644 index b7e466f4..00000000 --- a/alerts_api/test/test_rules.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.rules import Rules - -class TestRules(unittest.TestCase): - """Rules unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Rules: - """Test Rules - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Rules` - """ - model = Rules() - if include_optional: - return Rules( - alert_rules = [ - alerts_api.models.rule.Rule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - notify_on_clear = True, - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, - include_covered_prefixes = True, - severity = 'major', ) - ] - ) - else: - return Rules( - ) - """ - - def testRules(self): - """Test Rules""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_self_links.py b/alerts_api/test/test_self_links.py deleted file mode 100644 index 24c41b84..00000000 --- a/alerts_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = alerts_api.models.self_links__links.SelfLinks__links( - self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_self_links_links.py b/alerts_api/test/test_self_links_links.py deleted file mode 100644 index afce3685..00000000 --- a/alerts_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = alerts_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_severity.py b/alerts_api/test/test_severity.py deleted file mode 100644 index e389949e..00000000 --- a/alerts_api/test/test_severity.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.severity import Severity - -class TestSeverity(unittest.TestCase): - """Severity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSeverity(self): - """Test Severity""" - # inst = Severity() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_state.py b/alerts_api/test/test_state.py deleted file mode 100644 index bf993235..00000000 --- a/alerts_api/test/test_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.state import State - -class TestState(unittest.TestCase): - """State unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testState(self): - """Test State""" - # inst = State() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_test_direction.py b/alerts_api/test/test_test_direction.py deleted file mode 100644 index 20f91dcc..00000000 --- a/alerts_api/test/test_test_direction.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.test_direction import TestDirection - -class TestTestDirection(unittest.TestCase): - """TestDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDirection(self): - """Test TestDirection""" - # inst = TestDirection() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_test_interval.py b/alerts_api/test/test_test_interval.py deleted file mode 100644 index 9537a33d..00000000 --- a/alerts_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_third_party_integration_type.py b/alerts_api/test/test_third_party_integration_type.py deleted file mode 100644 index 1e38edff..00000000 --- a/alerts_api/test/test_third_party_integration_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.third_party_integration_type import ThirdPartyIntegrationType - -class TestThirdPartyIntegrationType(unittest.TestCase): - """ThirdPartyIntegrationType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testThirdPartyIntegrationType(self): - """Test ThirdPartyIntegrationType""" - # inst = ThirdPartyIntegrationType() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_unauthorized_error.py b/alerts_api/test/test_unauthorized_error.py deleted file mode 100644 index bcdcf3d1..00000000 --- a/alerts_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_unexpanded_test.py b/alerts_api/test/test_unexpanded_test.py deleted file mode 100644 index 049a60a1..00000000 --- a/alerts_api/test/test_unexpanded_test.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.unexpanded_test import UnexpandedTest - -class TestUnexpandedTest(unittest.TestCase): - """UnexpandedTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedTest: - """Test UnexpandedTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedTest` - """ - model = UnexpandedTest() - if include_optional: - return UnexpandedTest( - interval = 120, - alerts_enabled = True, - enabled = True - ) - else: - return UnexpandedTest( - ) - """ - - def testUnexpandedTest(self): - """Test UnexpandedTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/test/test_webhook_integration_type.py b/alerts_api/test/test_webhook_integration_type.py deleted file mode 100644 index dbf6416a..00000000 --- a/alerts_api/test/test_webhook_integration_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Alerts API - - ## Overview Manage all alerts, alert rules and alert suppression windows. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from alerts_api.models.webhook_integration_type import WebhookIntegrationType - -class TestWebhookIntegrationType(unittest.TestCase): - """WebhookIntegrationType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testWebhookIntegrationType(self): - """Test WebhookIntegrationType""" - # inst = WebhookIntegrationType() - -if __name__ == '__main__': - unittest.main() diff --git a/alerts_api/tox.ini b/alerts_api/tox.ini deleted file mode 100644 index 1236a7af..00000000 --- a/alerts_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=alerts_api diff --git a/credentials_api/.gitignore b/credentials/.gitignore similarity index 100% rename from credentials_api/.gitignore rename to credentials/.gitignore diff --git a/credentials_api/.openapi-generator-ignore b/credentials/.openapi-generator-ignore similarity index 100% rename from credentials_api/.openapi-generator-ignore rename to credentials/.openapi-generator-ignore diff --git a/credentials/.openapi-generator/FILES b/credentials/.openapi-generator/FILES new file mode 100644 index 00000000..7d27d3fd --- /dev/null +++ b/credentials/.openapi-generator/FILES @@ -0,0 +1,56 @@ +.gitignore +.openapi-generator-ignore +README.md +credentials/__init__.py +credentials/api/__init__.py +credentials/api/credentials_api.py +credentials/api_client.py +credentials/api_response.py +credentials/configuration.py +credentials/exceptions.py +credentials/models/__init__.py +credentials/models/credential.py +credentials/models/credential_request.py +credentials/models/credential_without_value.py +credentials/models/credentials.py +credentials/models/error.py +credentials/models/get_transaction_tests_credentials_list200_response.py +credentials/models/link.py +credentials/models/self_links.py +credentials/models/self_links_links.py +credentials/models/unauthorized_error.py +credentials/models/validation_error.py +credentials/models/validation_error_all_of_errors.py +credentials/py.typed +credentials/rest.py +docs/Credential.md +docs/CredentialRequest.md +docs/CredentialWithoutValue.md +docs/Credentials.md +docs/CredentialsApi.md +docs/Error.md +docs/GetTransactionTestsCredentialsList200Response.md +docs/Link.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +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_get_transaction_tests_credentials_list200_response.py +test/test_link.py +test/test_self_links.py +test/test_self_links_links.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/credentials/.openapi-generator/VERSION b/credentials/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/credentials/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/credentials/README.md b/credentials/README.md new file mode 100644 index 00000000..fe8db47c --- /dev/null +++ b/credentials/README.md @@ -0,0 +1,146 @@ +# credentials +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). + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import credentials +``` + +### 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 credentials +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import credentials +from credentials.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 = credentials.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 = credentials.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with credentials.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = credentials.CredentialsApi(api_client) + credential_request = credentials.CredentialRequest() # CredentialRequest | + 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 credential + api_response = api_instance.create_transaction_tests_credential(credential_request, aid=aid) + print("The response of CredentialsApi->create_transaction_tests_credential:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling CredentialsApi->create_transaction_tests_credential: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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 + + +## Documentation For Models + + - [Credential](docs/Credential.md) + - [CredentialRequest](docs/CredentialRequest.md) + - [CredentialWithoutValue](docs/CredentialWithoutValue.md) + - [Credentials](docs/Credentials.md) + - [Error](docs/Error.md) + - [GetTransactionTestsCredentialsList200Response](docs/GetTransactionTestsCredentialsList200Response.md) + - [Link](docs/Link.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/credentials/credentials/__init__.py b/credentials/credentials/__init__.py new file mode 100644 index 00000000..1f41a928 --- /dev/null +++ b/credentials/credentials/__init__.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 credentials.api.credentials_api import CredentialsApi + +# import ApiClient +from credentials.api_response import ApiResponse +from credentials.api_client import ApiClient +from credentials.configuration import Configuration +from credentials.exceptions import OpenApiException +from credentials.exceptions import ApiTypeError +from credentials.exceptions import ApiValueError +from credentials.exceptions import ApiKeyError +from credentials.exceptions import ApiAttributeError +from credentials.exceptions import ApiException + +# import models into sdk package +from credentials.models.credential import Credential +from credentials.models.credential_request import CredentialRequest +from credentials.models.credential_without_value import CredentialWithoutValue +from credentials.models.credentials import Credentials +from credentials.models.error import Error +from credentials.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response +from credentials.models.link import Link +from credentials.models.self_links import SelfLinks +from credentials.models.self_links_links import SelfLinksLinks +from credentials.models.unauthorized_error import UnauthorizedError +from credentials.models.validation_error import ValidationError +from credentials.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/credentials/credentials/api/__init__.py b/credentials/credentials/api/__init__.py new file mode 100644 index 00000000..776adccc --- /dev/null +++ b/credentials/credentials/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from credentials.api.credentials_api import CredentialsApi + diff --git a/credentials_api/credentials_api/api/credentials_api.py b/credentials/credentials/api/credentials_api.py similarity index 95% rename from credentials_api/credentials_api/api/credentials_api.py rename to credentials/credentials/api/credentials_api.py index 53defd4e..fc585795 100644 --- a/credentials_api/credentials_api/api/credentials_api.py +++ b/credentials/credentials/api/credentials_api.py @@ -3,40 +3,30 @@ """ Credentials API - ### Overview 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. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from credentials.models.credential import Credential +from credentials.models.credential_request import CredentialRequest +from credentials.models.credential_without_value import CredentialWithoutValue +from credentials.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response -from credentials_api.models.credential import Credential -from credentials_api.models.credential_request import CredentialRequest -from credentials_api.models.credential_without_value import CredentialWithoutValue -from credentials_api.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response - -from credentials_api.api_client import ApiClient -from credentials_api.api_response import ApiResponse -from credentials_api.rest import RESTResponseType +from credentials.api_client import ApiClient, RequestSerialized +from credentials.api_response import ApiResponse +from credentials.rest import RESTResponseType class CredentialsApi: @@ -111,13 +101,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CredentialWithoutValue", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -189,13 +178,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CredentialWithoutValue", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -267,13 +255,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CredentialWithoutValue", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -290,19 +277,18 @@ class CredentialsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -421,7 +407,12 @@ class CredentialsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -492,7 +483,12 @@ class CredentialsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -563,7 +559,12 @@ class CredentialsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -580,19 +581,18 @@ class CredentialsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -611,7 +611,6 @@ class CredentialsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -699,13 +698,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "Credential", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -777,13 +775,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "Credential", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -855,13 +852,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "Credential", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -878,19 +874,18 @@ class CredentialsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -997,8 +992,7 @@ class CredentialsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1070,8 +1064,7 @@ class CredentialsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1143,8 +1136,7 @@ class CredentialsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1160,19 +1152,18 @@ class CredentialsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1281,13 +1272,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CredentialWithoutValue", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1363,13 +1353,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CredentialWithoutValue", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1445,13 +1434,12 @@ class CredentialsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CredentialWithoutValue", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1469,19 +1457,18 @@ class CredentialsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/credentials/credentials/api_client.py b/credentials/credentials/api_client.py new file mode 100644 index 00000000..e892e628 --- /dev/null +++ b/credentials/credentials/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from credentials.configuration import Configuration +from credentials.api_response import ApiResponse, T as ApiResponseT +import credentials.models +from credentials import rest +from credentials.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(credentials.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/credentials/credentials/api_response.py b/credentials/credentials/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/credentials/credentials/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/credentials/credentials/configuration.py b/credentials/credentials/configuration.py new file mode 100644 index 00000000..5819bb8b --- /dev/null +++ b/credentials/credentials/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("credentials") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/credentials/credentials/exceptions.py b/credentials/credentials/exceptions.py new file mode 100644 index 00000000..9a583ac8 --- /dev/null +++ b/credentials/credentials/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/credentials/credentials/models/__init__.py b/credentials/credentials/models/__init__.py new file mode 100644 index 00000000..1fc0f348 --- /dev/null +++ b/credentials/credentials/models/__init__.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from credentials.models.credential import Credential +from credentials.models.credential_request import CredentialRequest +from credentials.models.credential_without_value import CredentialWithoutValue +from credentials.models.credentials import Credentials +from credentials.models.error import Error +from credentials.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response +from credentials.models.link import Link +from credentials.models.self_links import SelfLinks +from credentials.models.self_links_links import SelfLinksLinks +from credentials.models.unauthorized_error import UnauthorizedError +from credentials.models.validation_error import ValidationError +from credentials.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/credentials/credentials/models/credential.py b/credentials/credentials/models/credential.py new file mode 100644 index 00000000..6bb0837f --- /dev/null +++ b/credentials/credentials/models/credential.py @@ -0,0 +1,97 @@ +# 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.2 + 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 credentials.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class Credential(BaseModel): + """ + Credential + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Unique ID of the credential.") + name: Optional[StrictStr] = Field(default=None, description="The name of the credential.") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + value: Optional[StrictStr] = Field(default=None, description="The value of the credential that will be encrypted.") + __properties: ClassVar[List[str]] = ["id", "name", "_links", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Credential 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 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 Credential 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"), + "name": obj.get("name"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "value": obj.get("value") + }) + return _obj + + diff --git a/credentials/credentials/models/credential_request.py b/credentials/credentials/models/credential_request.py new file mode 100644 index 00000000..ec83df10 --- /dev/null +++ b/credentials/credentials/models/credential_request.py @@ -0,0 +1,89 @@ +# 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.2 + 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 CredentialRequest(BaseModel): + """ + CredentialRequest + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the credential.") + value: Optional[StrictStr] = Field(default=None, description="The value of the credential that will be encrypted.") + __properties: ClassVar[List[str]] = ["name", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CredentialRequest 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 CredentialRequest 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"), + "value": obj.get("value") + }) + return _obj + + diff --git a/credentials/credentials/models/credential_without_value.py b/credentials/credentials/models/credential_without_value.py new file mode 100644 index 00000000..46bdd851 --- /dev/null +++ b/credentials/credentials/models/credential_without_value.py @@ -0,0 +1,95 @@ +# 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.2 + 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 credentials.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class CredentialWithoutValue(BaseModel): + """ + CredentialWithoutValue + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + id: Optional[StrictStr] = Field(default=None, description="Unique ID of the credential.") + name: Optional[StrictStr] = Field(default=None, description="The name of the credential.") + __properties: ClassVar[List[str]] = ["_links", "id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CredentialWithoutValue 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 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 CredentialWithoutValue from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "id": obj.get("id"), + "name": obj.get("name") + }) + return _obj + + diff --git a/credentials/credentials/models/credentials.py b/credentials/credentials/models/credentials.py new file mode 100644 index 00000000..2029b3f2 --- /dev/null +++ b/credentials/credentials/models/credentials.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from credentials.models.credential import Credential +from typing import Optional, Set +from typing_extensions import Self + +class Credentials(BaseModel): + """ + Credentials + """ # noqa: E501 + credentials: Optional[List[Credential]] = None + __properties: ClassVar[List[str]] = ["credentials"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Credentials 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 credentials (list) + _items = [] + if self.credentials: + for _item in self.credentials: + if _item: + _items.append(_item.to_dict()) + _dict['credentials'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Credentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None + }) + return _obj + + diff --git a/credentials/credentials/models/error.py b/credentials/credentials/models/error.py new file mode 100644 index 00000000..4489df5c --- /dev/null +++ b/credentials/credentials/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/credentials/credentials/models/get_transaction_tests_credentials_list200_response.py b/credentials/credentials/models/get_transaction_tests_credentials_list200_response.py new file mode 100644 index 00000000..86dbe8b3 --- /dev/null +++ b/credentials/credentials/models/get_transaction_tests_credentials_list200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 credentials.models.credential import Credential +from credentials.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetTransactionTestsCredentialsList200Response(BaseModel): + """ + GetTransactionTestsCredentialsList200Response + """ # noqa: E501 + credentials: Optional[List[Credential]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["credentials", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTransactionTestsCredentialsList200Response 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 credentials (list) + _items = [] + if self.credentials: + for _item in self.credentials: + if _item: + _items.append(_item.to_dict()) + _dict['credentials'] = _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 GetTransactionTestsCredentialsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/credentials/credentials/models/link.py b/credentials/credentials/models/link.py new file mode 100644 index 00000000..0b84c1e9 --- /dev/null +++ b/credentials/credentials/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/credentials/credentials/models/self_links.py b/credentials/credentials/models/self_links.py new file mode 100644 index 00000000..5ba14d36 --- /dev/null +++ b/credentials/credentials/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 credentials.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/credentials/credentials/models/self_links_links.py b/credentials/credentials/models/self_links_links.py new file mode 100644 index 00000000..b7067c12 --- /dev/null +++ b/credentials/credentials/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 credentials.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/credentials/credentials/models/unauthorized_error.py b/credentials/credentials/models/unauthorized_error.py new file mode 100644 index 00000000..dd434a06 --- /dev/null +++ b/credentials/credentials/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/credentials/credentials/models/validation_error.py b/credentials/credentials/models/validation_error.py new file mode 100644 index 00000000..532abb5b --- /dev/null +++ b/credentials/credentials/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 credentials.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/credentials/credentials/models/validation_error_all_of_errors.py b/credentials/credentials/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..ae4136e3 --- /dev/null +++ b/credentials/credentials/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/credentials_api/credentials_api/py.typed b/credentials/credentials/py.typed similarity index 100% rename from credentials_api/credentials_api/py.typed rename to credentials/credentials/py.typed diff --git a/credentials/credentials/rest.py b/credentials/credentials/rest.py new file mode 100644 index 00000000..cc73d424 --- /dev/null +++ b/credentials/credentials/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from credentials.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/credentials_api/docs/Credential.md b/credentials/docs/Credential.md similarity index 86% rename from credentials_api/docs/Credential.md rename to credentials/docs/Credential.md index 2a385016..bf53b3e7 100644 --- a/credentials_api/docs/Credential.md +++ b/credentials/docs/Credential.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique ID of the credential. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from credentials_api.models.credential import Credential +from credentials.models.credential import Credential # TODO update the JSON string below json = "{}" # create an instance of Credential from a JSON string credential_instance = Credential.from_json(json) # print the JSON string representation of the object -print Credential.to_json() +print(Credential.to_json()) # convert the object into a dict credential_dict = credential_instance.to_dict() # create an instance of Credential from a dict -credential_form_dict = credential.from_dict(credential_dict) +credential_from_dict = Credential.from_dict(credential_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/credentials_api/docs/CredentialRequest.md b/credentials/docs/CredentialRequest.md similarity index 81% rename from credentials_api/docs/CredentialRequest.md rename to credentials/docs/CredentialRequest.md index 6415be21..c38b569e 100644 --- a/credentials_api/docs/CredentialRequest.md +++ b/credentials/docs/CredentialRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the credential. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from credentials_api.models.credential_request import CredentialRequest +from credentials.models.credential_request import CredentialRequest # TODO update the JSON string below json = "{}" # create an instance of CredentialRequest from a JSON string credential_request_instance = CredentialRequest.from_json(json) # print the JSON string representation of the object -print CredentialRequest.to_json() +print(CredentialRequest.to_json()) # convert the object into a dict credential_request_dict = credential_request_instance.to_dict() # create an instance of CredentialRequest from a dict -credential_request_form_dict = credential_request.from_dict(credential_request_dict) +credential_request_from_dict = CredentialRequest.from_dict(credential_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/credentials_api/docs/CredentialWithoutValue.md b/credentials/docs/CredentialWithoutValue.md similarity index 80% rename from credentials_api/docs/CredentialWithoutValue.md rename to credentials/docs/CredentialWithoutValue.md index 896c33f6..5af686f9 100644 --- a/credentials_api/docs/CredentialWithoutValue.md +++ b/credentials/docs/CredentialWithoutValue.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from credentials_api.models.credential_without_value import CredentialWithoutValue +from credentials.models.credential_without_value import CredentialWithoutValue # TODO update the JSON string below json = "{}" # create an instance of CredentialWithoutValue from a JSON string credential_without_value_instance = CredentialWithoutValue.from_json(json) # print the JSON string representation of the object -print CredentialWithoutValue.to_json() +print(CredentialWithoutValue.to_json()) # convert the object into a dict credential_without_value_dict = credential_without_value_instance.to_dict() # create an instance of CredentialWithoutValue from a dict -credential_without_value_form_dict = credential_without_value.from_dict(credential_without_value_dict) +credential_without_value_from_dict = CredentialWithoutValue.from_dict(credential_without_value_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/credentials_api/docs/Credentials.md b/credentials/docs/Credentials.md similarity index 82% rename from credentials_api/docs/Credentials.md rename to credentials/docs/Credentials.md index 141fffd0..ad90f374 100644 --- a/credentials_api/docs/Credentials.md +++ b/credentials/docs/Credentials.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **credentials** | [**List[Credential]**](Credential.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from credentials_api.models.credentials import Credentials +from credentials.models.credentials import Credentials # TODO update the JSON string below json = "{}" # create an instance of Credentials from a JSON string credentials_instance = Credentials.from_json(json) # print the JSON string representation of the object -print Credentials.to_json() +print(Credentials.to_json()) # convert the object into a dict credentials_dict = credentials_instance.to_dict() # create an instance of Credentials from a dict -credentials_form_dict = credentials.from_dict(credentials_dict) +credentials_from_dict = Credentials.from_dict(credentials_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/credentials_api/docs/CredentialsApi.md b/credentials/docs/CredentialsApi.md similarity index 86% rename from credentials_api/docs/CredentialsApi.md rename to credentials/docs/CredentialsApi.md index f5ca92ce..4ec9311c 100644 --- a/credentials_api/docs/CredentialsApi.md +++ b/credentials/docs/CredentialsApi.md @@ -1,4 +1,4 @@ -# credentials_api.CredentialsApi +# credentials.CredentialsApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,18 +21,17 @@ Creates a new credential for ThousandEyes transaction tests, based on properties ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import credentials_api -from credentials_api.models.credential_request import CredentialRequest -from credentials_api.models.credential_without_value import CredentialWithoutValue -from credentials_api.rest import ApiException +import credentials +from credentials.models.credential_request import CredentialRequest +from credentials.models.credential_without_value import CredentialWithoutValue +from credentials.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 = credentials_api.Configuration( +configuration = credentials.Configuration( host = "https://api.thousandeyes.com" ) @@ -42,16 +41,16 @@ configuration = credentials_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = credentials_api.Configuration( +configuration = credentials.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with credentials_api.ApiClient(configuration) as api_client: +with credentials.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = credentials_api.CredentialsApi(api_client) - credential_request = credentials_api.CredentialRequest() # CredentialRequest | - aid = '2067' # 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) + api_instance = credentials.CredentialsApi(api_client) + credential_request = credentials.CredentialRequest() # CredentialRequest | + 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 credential @@ -66,6 +65,7 @@ with credentials_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **credential_request** | [**CredentialRequest**](CredentialRequest.md)| | @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -107,16 +108,15 @@ Deletes a ThousandEyes transaction test credential, using the request parameters ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import credentials_api -from credentials_api.rest import ApiException +import credentials +from credentials.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 = credentials_api.Configuration( +configuration = credentials.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = credentials_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = credentials_api.Configuration( +configuration = credentials.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with credentials_api.ApiClient(configuration) as api_client: +with credentials.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = credentials_api.CredentialsApi(api_client) + api_instance = credentials.CredentialsApi(api_client) id = '3247' # str | The ID of the desired credential. - aid = '2067' # 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) + 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 credential @@ -148,6 +148,7 @@ with credentials_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The ID of the desired credential. | @@ -164,9 +165,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -188,17 +190,16 @@ Retrieves detailed information about a ThousandEyes transaction test credential. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import credentials_api -from credentials_api.models.credential import Credential -from credentials_api.rest import ApiException +import credentials +from credentials.models.credential import Credential +from credentials.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 = credentials_api.Configuration( +configuration = credentials.Configuration( host = "https://api.thousandeyes.com" ) @@ -208,16 +209,16 @@ configuration = credentials_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = credentials_api.Configuration( +configuration = credentials.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with credentials_api.ApiClient(configuration) as api_client: +with credentials.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = credentials_api.CredentialsApi(api_client) + api_instance = credentials.CredentialsApi(api_client) id = '3247' # str | The ID of the desired credential. - aid = '2067' # 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) + 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 credential @@ -232,6 +233,7 @@ with credentials_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The ID of the desired credential. | @@ -251,6 +253,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -273,17 +276,16 @@ Retrieves a list of credentials configured in ThousandEyes. Users have access to ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import credentials_api -from credentials_api.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response -from credentials_api.rest import ApiException +import credentials +from credentials.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response +from credentials.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 = credentials_api.Configuration( +configuration = credentials.Configuration( host = "https://api.thousandeyes.com" ) @@ -293,15 +295,15 @@ configuration = credentials_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = credentials_api.Configuration( +configuration = credentials.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with credentials_api.ApiClient(configuration) as api_client: +with credentials.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = credentials_api.CredentialsApi(api_client) - aid = '2067' # 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) + api_instance = credentials.CredentialsApi(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 credentials @@ -316,6 +318,7 @@ with credentials_api.ApiClient(configuration) as api_client: ### 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] @@ -334,6 +337,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -355,18 +359,17 @@ Updates the credential for ThousandEyes transaction tests, based on properties p ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import credentials_api -from credentials_api.models.credential_request import CredentialRequest -from credentials_api.models.credential_without_value import CredentialWithoutValue -from credentials_api.rest import ApiException +import credentials +from credentials.models.credential_request import CredentialRequest +from credentials.models.credential_without_value import CredentialWithoutValue +from credentials.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 = credentials_api.Configuration( +configuration = credentials.Configuration( host = "https://api.thousandeyes.com" ) @@ -376,17 +379,17 @@ configuration = credentials_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = credentials_api.Configuration( +configuration = credentials.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with credentials_api.ApiClient(configuration) as api_client: +with credentials.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = credentials_api.CredentialsApi(api_client) + api_instance = credentials.CredentialsApi(api_client) id = '3247' # str | The ID of the desired credential. - credential_request = credentials_api.CredentialRequest() # CredentialRequest | - aid = '2067' # 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) + credential_request = credentials.CredentialRequest() # CredentialRequest | + 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 credential @@ -401,6 +404,7 @@ with credentials_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The ID of the desired credential. | @@ -421,6 +425,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/credentials/docs/Error.md b/credentials/docs/Error.md new file mode 100644 index 00000000..85333413 --- /dev/null +++ b/credentials/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 credentials.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/credentials/docs/GetTransactionTestsCredentialsList200Response.md b/credentials/docs/GetTransactionTestsCredentialsList200Response.md new file mode 100644 index 00000000..1ce0fd0f --- /dev/null +++ b/credentials/docs/GetTransactionTestsCredentialsList200Response.md @@ -0,0 +1,30 @@ +# GetTransactionTestsCredentialsList200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credentials** | [**List[Credential]**](Credential.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from credentials.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTransactionTestsCredentialsList200Response from a JSON string +get_transaction_tests_credentials_list200_response_instance = GetTransactionTestsCredentialsList200Response.from_json(json) +# print the JSON string representation of the object +print(GetTransactionTestsCredentialsList200Response.to_json()) + +# convert the object into a dict +get_transaction_tests_credentials_list200_response_dict = get_transaction_tests_credentials_list200_response_instance.to_dict() +# create an instance of GetTransactionTestsCredentialsList200Response from a dict +get_transaction_tests_credentials_list200_response_from_dict = GetTransactionTestsCredentialsList200Response.from_dict(get_transaction_tests_credentials_list200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/credentials/docs/Link.md b/credentials/docs/Link.md new file mode 100644 index 00000000..fe7ae014 --- /dev/null +++ b/credentials/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 credentials.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/credentials/docs/SelfLinks.md b/credentials/docs/SelfLinks.md new file mode 100644 index 00000000..27d8e6d2 --- /dev/null +++ b/credentials/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from credentials.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/credentials/docs/SelfLinksLinks.md b/credentials/docs/SelfLinksLinks.md new file mode 100644 index 00000000..02a98232 --- /dev/null +++ b/credentials/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from credentials.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/credentials/docs/UnauthorizedError.md b/credentials/docs/UnauthorizedError.md new file mode 100644 index 00000000..6a86dc0c --- /dev/null +++ b/credentials/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from credentials.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/credentials/docs/ValidationError.md b/credentials/docs/ValidationError.md new file mode 100644 index 00000000..f9407525 --- /dev/null +++ b/credentials/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from credentials.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/credentials/docs/ValidationErrorAllOfErrors.md b/credentials/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..4b6d5ea3 --- /dev/null +++ b/credentials/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from credentials.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/credentials/pyproject.toml b/credentials/pyproject.toml new file mode 100644 index 00000000..c2bb21f7 --- /dev/null +++ b/credentials/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "credentials" +version = "1.0.0" +description = "Credentials API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Credentials API"] +include = ["credentials/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "credentials", + #"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/credentials_api/requirements.txt b/credentials/requirements.txt similarity index 100% rename from credentials_api/requirements.txt rename to credentials/requirements.txt diff --git a/credentials_api/setup.cfg b/credentials/setup.cfg similarity index 100% rename from credentials_api/setup.cfg rename to credentials/setup.cfg diff --git a/credentials/setup.py b/credentials/setup.py new file mode 100644 index 00000000..b1097cae --- /dev/null +++ b/credentials/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "credentials" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Credentials API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/credentials", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Credentials API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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). + """, # noqa: E501 + package_data={"credentials": ["py.typed"]}, +) diff --git a/credentials/test-requirements.txt b/credentials/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/credentials/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/credentials_api/test/__init__.py b/credentials/test/__init__.py similarity index 100% rename from credentials_api/test/__init__.py rename to credentials/test/__init__.py diff --git a/credentials/test/test_credential.py b/credentials/test/test_credential.py new file mode 100644 index 00000000..f6822351 --- /dev/null +++ b/credentials/test/test_credential.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.credential import Credential + +class TestCredential(unittest.TestCase): + """Credential unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Credential: + """Test Credential + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Credential` + """ + model = Credential() + if include_optional: + return Credential( + id = '3247', + name = 'Example Credential', + links = credentials.models.self_links__links.SelfLinks__links( + self = credentials.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + value = 'rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt' + ) + else: + return Credential( + ) + """ + + def testCredential(self): + """Test Credential""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_credential_request.py b/credentials/test/test_credential_request.py new file mode 100644 index 00000000..b9ce963d --- /dev/null +++ b/credentials/test/test_credential_request.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.credential_request import CredentialRequest + +class TestCredentialRequest(unittest.TestCase): + """CredentialRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CredentialRequest: + """Test CredentialRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CredentialRequest` + """ + model = CredentialRequest() + if include_optional: + return CredentialRequest( + name = 'Example Credential 1', + value = 'Example Credential 1 Password' + ) + else: + return CredentialRequest( + ) + """ + + def testCredentialRequest(self): + """Test CredentialRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_credential_without_value.py b/credentials/test/test_credential_without_value.py new file mode 100644 index 00000000..9f681c4d --- /dev/null +++ b/credentials/test/test_credential_without_value.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.credential_without_value import CredentialWithoutValue + +class TestCredentialWithoutValue(unittest.TestCase): + """CredentialWithoutValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CredentialWithoutValue: + """Test CredentialWithoutValue + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CredentialWithoutValue` + """ + model = CredentialWithoutValue() + if include_optional: + return CredentialWithoutValue( + links = credentials.models.self_links__links.SelfLinks__links( + self = credentials.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + id = '3247', + name = 'Example Credential' + ) + else: + return CredentialWithoutValue( + ) + """ + + def testCredentialWithoutValue(self): + """Test CredentialWithoutValue""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_credentials.py b/credentials/test/test_credentials.py new file mode 100644 index 00000000..c69293ad --- /dev/null +++ b/credentials/test/test_credentials.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.credentials import Credentials + +class TestCredentials(unittest.TestCase): + """Credentials unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Credentials: + """Test Credentials + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Credentials` + """ + model = Credentials() + if include_optional: + return Credentials( + credentials = [ + null + ] + ) + else: + return Credentials( + ) + """ + + def testCredentials(self): + """Test Credentials""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_error.py b/credentials/test/test_error.py new file mode 100644 index 00000000..0aecdc47 --- /dev/null +++ b/credentials/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_get_transaction_tests_credentials_list200_response.py b/credentials/test/test_get_transaction_tests_credentials_list200_response.py new file mode 100644 index 00000000..5f907134 --- /dev/null +++ b/credentials/test/test_get_transaction_tests_credentials_list200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response + +class TestGetTransactionTestsCredentialsList200Response(unittest.TestCase): + """GetTransactionTestsCredentialsList200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTransactionTestsCredentialsList200Response: + """Test GetTransactionTestsCredentialsList200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTransactionTestsCredentialsList200Response` + """ + model = GetTransactionTestsCredentialsList200Response() + if include_optional: + return GetTransactionTestsCredentialsList200Response( + credentials = [ + null + ], + links = credentials.models.self_links__links.SelfLinks__links( + self = credentials.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetTransactionTestsCredentialsList200Response( + ) + """ + + def testGetTransactionTestsCredentialsList200Response(self): + """Test GetTransactionTestsCredentialsList200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_link.py b/credentials/test/test_link.py new file mode 100644 index 00000000..51f5a6dc --- /dev/null +++ b/credentials/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_self_links.py b/credentials/test/test_self_links.py new file mode 100644 index 00000000..f4603040 --- /dev/null +++ b/credentials/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = credentials.models.self_links__links.SelfLinks__links( + self = credentials.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_self_links_links.py b/credentials/test/test_self_links_links.py new file mode 100644 index 00000000..dc74828d --- /dev/null +++ b/credentials/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = credentials.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_unauthorized_error.py b/credentials/test/test_unauthorized_error.py new file mode 100644 index 00000000..f79444c3 --- /dev/null +++ b/credentials/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_validation_error.py b/credentials/test/test_validation_error.py new file mode 100644 index 00000000..dc220fe8 --- /dev/null +++ b/credentials/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + credentials.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials/test/test_validation_error_all_of_errors.py b/credentials/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..1a8de011 --- /dev/null +++ b/credentials/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from credentials.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/credentials_api/.github/workflows/python.yml b/credentials_api/.github/workflows/python.yml deleted file mode 100644 index 53cfdd56..00000000 --- a/credentials_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: credentials_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/credentials_api/.gitlab-ci.yml b/credentials_api/.gitlab-ci.yml deleted file mode 100644 index bd25a400..00000000 --- a/credentials_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=credentials_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/credentials_api/.openapi-generator/FILES b/credentials_api/.openapi-generator/FILES deleted file mode 100644 index 481a8f47..00000000 --- a/credentials_api/.openapi-generator/FILES +++ /dev/null @@ -1,56 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -credentials_api/__init__.py -credentials_api/api/__init__.py -credentials_api/api/credentials_api.py -credentials_api/api_client.py -credentials_api/api_response.py -credentials_api/configuration.py -credentials_api/exceptions.py -credentials_api/models/__init__.py -credentials_api/models/credential.py -credentials_api/models/credential_request.py -credentials_api/models/credential_without_value.py -credentials_api/models/credentials.py -credentials_api/models/error.py -credentials_api/models/get_transaction_tests_credentials_list200_response.py -credentials_api/models/link.py -credentials_api/models/self_links.py -credentials_api/models/self_links_links.py -credentials_api/models/unauthorized_error.py -credentials_api/py.typed -credentials_api/rest.py -docs/Credential.md -docs/CredentialRequest.md -docs/CredentialWithoutValue.md -docs/Credentials.md -docs/CredentialsApi.md -docs/Error.md -docs/GetTransactionTestsCredentialsList200Response.md -docs/Link.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/UnauthorizedError.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_credential.py -test/test_credential_request.py -test/test_credential_without_value.py -test/test_credentials.py -test/test_credentials_api.py -test/test_error.py -test/test_get_transaction_tests_credentials_list200_response.py -test/test_link.py -test/test_self_links.py -test/test_self_links_links.py -test/test_unauthorized_error.py -tox.ini diff --git a/credentials_api/.openapi-generator/VERSION b/credentials_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/credentials_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/credentials_api/.travis.yml b/credentials_api/.travis.yml deleted file mode 100644 index 8c436768..00000000 --- a/credentials_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=credentials_api diff --git a/credentials_api/README.md b/credentials_api/README.md deleted file mode 100644 index 6c1cf25f..00000000 --- a/credentials_api/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# credentials-api -### Overview -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. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import credentials_api -``` - -### 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 credentials_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import credentials_api -from credentials_api.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 = credentials_api.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 = credentials_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with credentials_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = credentials_api.CredentialsApi(api_client) - credential_request = credentials_api.CredentialRequest() # CredentialRequest | - aid = '2067' # 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 credential - api_response = api_instance.create_transaction_tests_credential(credential_request, aid=aid) - print("The response of CredentialsApi->create_transaction_tests_credential:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling CredentialsApi->create_transaction_tests_credential: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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 - - -## Documentation For Models - - - [Credential](docs/Credential.md) - - [CredentialRequest](docs/CredentialRequest.md) - - [CredentialWithoutValue](docs/CredentialWithoutValue.md) - - [Credentials](docs/Credentials.md) - - [Error](docs/Error.md) - - [GetTransactionTestsCredentialsList200Response](docs/GetTransactionTestsCredentialsList200Response.md) - - [Link](docs/Link.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/credentials_api/credentials_api/__init__.py b/credentials_api/credentials_api/__init__.py deleted file mode 100644 index 691d37cb..00000000 --- a/credentials_api/credentials_api/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 credentials_api.api.credentials_api import CredentialsApi - -# import ApiClient -from credentials_api.api_response import ApiResponse -from credentials_api.api_client import ApiClient -from credentials_api.configuration import Configuration -from credentials_api.exceptions import OpenApiException -from credentials_api.exceptions import ApiTypeError -from credentials_api.exceptions import ApiValueError -from credentials_api.exceptions import ApiKeyError -from credentials_api.exceptions import ApiAttributeError -from credentials_api.exceptions import ApiException - -# import models into sdk package -from credentials_api.models.credential import Credential -from credentials_api.models.credential_request import CredentialRequest -from credentials_api.models.credential_without_value import CredentialWithoutValue -from credentials_api.models.credentials import Credentials -from credentials_api.models.error import Error -from credentials_api.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response -from credentials_api.models.link import Link -from credentials_api.models.self_links import SelfLinks -from credentials_api.models.self_links_links import SelfLinksLinks -from credentials_api.models.unauthorized_error import UnauthorizedError diff --git a/credentials_api/credentials_api/api/__init__.py b/credentials_api/credentials_api/api/__init__.py deleted file mode 100644 index eed6e36f..00000000 --- a/credentials_api/credentials_api/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from credentials_api.api.credentials_api import CredentialsApi - diff --git a/credentials_api/credentials_api/api_client.py b/credentials_api/credentials_api/api_client.py deleted file mode 100644 index 2be4f30e..00000000 --- a/credentials_api/credentials_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from credentials_api.configuration import Configuration -from credentials_api.api_response import ApiResponse -import credentials_api.models -from credentials_api import rest -from credentials_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(credentials_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/credentials_api/credentials_api/api_response.py b/credentials_api/credentials_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/credentials_api/credentials_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/credentials_api/credentials_api/configuration.py b/credentials_api/credentials_api/configuration.py deleted file mode 100644 index 75b610fb..00000000 --- a/credentials_api/credentials_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("credentials_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/credentials_api/credentials_api/exceptions.py b/credentials_api/credentials_api/exceptions.py deleted file mode 100644 index 1bf1c32f..00000000 --- a/credentials_api/credentials_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/credentials_api/credentials_api/models/__init__.py b/credentials_api/credentials_api/models/__init__.py deleted file mode 100644 index f0b98acd..00000000 --- a/credentials_api/credentials_api/models/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from credentials_api.models.credential import Credential -from credentials_api.models.credential_request import CredentialRequest -from credentials_api.models.credential_without_value import CredentialWithoutValue -from credentials_api.models.credentials import Credentials -from credentials_api.models.error import Error -from credentials_api.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response -from credentials_api.models.link import Link -from credentials_api.models.self_links import SelfLinks -from credentials_api.models.self_links_links import SelfLinksLinks -from credentials_api.models.unauthorized_error import UnauthorizedError diff --git a/credentials_api/credentials_api/models/credential.py b/credentials_api/credentials_api/models/credential.py deleted file mode 100644 index 44cde164..00000000 --- a/credentials_api/credentials_api/models/credential.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from credentials_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Credential(BaseModel): - """ - Credential - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique ID of the credential.") - name: Optional[StrictStr] = Field(default=None, description="The name of the credential.") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - value: Optional[StrictStr] = Field(default=None, description="The value of the credential that will be encrypted.") - __properties: ClassVar[List[str]] = ["id", "name", "_links", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Credential 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of Credential 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"), - "name": obj.get("name"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "value": obj.get("value") - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/credential_request.py b/credentials_api/credentials_api/models/credential_request.py deleted file mode 100644 index 04fe525d..00000000 --- a/credentials_api/credentials_api/models/credential_request.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CredentialRequest(BaseModel): - """ - CredentialRequest - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The name of the credential.") - value: Optional[StrictStr] = Field(default=None, description="The value of the credential that will be encrypted.") - __properties: ClassVar[List[str]] = ["name", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CredentialRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CredentialRequest 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"), - "value": obj.get("value") - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/credential_without_value.py b/credentials_api/credentials_api/models/credential_without_value.py deleted file mode 100644 index 10b70d53..00000000 --- a/credentials_api/credentials_api/models/credential_without_value.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from credentials_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CredentialWithoutValue(BaseModel): - """ - CredentialWithoutValue - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - id: Optional[StrictStr] = Field(default=None, description="Unique ID of the credential.") - name: Optional[StrictStr] = Field(default=None, description="The name of the credential.") - __properties: ClassVar[List[str]] = ["_links", "id", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CredentialWithoutValue 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of CredentialWithoutValue from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "id": obj.get("id"), - "name": obj.get("name") - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/credentials.py b/credentials_api/credentials_api/models/credentials.py deleted file mode 100644 index 17452104..00000000 --- a/credentials_api/credentials_api/models/credentials.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from credentials_api.models.credential import Credential -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Credentials(BaseModel): - """ - Credentials - """ # noqa: E501 - credentials: Optional[List[Credential]] = None - __properties: ClassVar[List[str]] = ["credentials"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Credentials 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in credentials (list) - _items = [] - if self.credentials: - for _item in self.credentials: - if _item: - _items.append(_item.to_dict()) - _dict['credentials'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Credentials from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "credentials": [Credential.from_dict(_item) for _item in obj.get("credentials")] if obj.get("credentials") is not None else None - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/error.py b/credentials_api/credentials_api/models/error.py deleted file mode 100644 index d59f242d..00000000 --- a/credentials_api/credentials_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/credentials_api/credentials_api/models/get_transaction_tests_credentials_list200_response.py b/credentials_api/credentials_api/models/get_transaction_tests_credentials_list200_response.py deleted file mode 100644 index c8c063a2..00000000 --- a/credentials_api/credentials_api/models/get_transaction_tests_credentials_list200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from credentials_api.models.credential import Credential -from credentials_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTransactionTestsCredentialsList200Response(BaseModel): - """ - GetTransactionTestsCredentialsList200Response - """ # noqa: E501 - credentials: Optional[List[Credential]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["credentials", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTransactionTestsCredentialsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in credentials (list) - _items = [] - if self.credentials: - for _item in self.credentials: - if _item: - _items.append(_item.to_dict()) - _dict['credentials'] = _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: Dict) -> Self: - """Create an instance of GetTransactionTestsCredentialsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "credentials": [Credential.from_dict(_item) for _item in obj.get("credentials")] if obj.get("credentials") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/link.py b/credentials_api/credentials_api/models/link.py deleted file mode 100644 index c1ff307b..00000000 --- a/credentials_api/credentials_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/credentials_api/credentials_api/models/self_links.py b/credentials_api/credentials_api/models/self_links.py deleted file mode 100644 index 87cb4b22..00000000 --- a/credentials_api/credentials_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from credentials_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/self_links_links.py b/credentials_api/credentials_api/models/self_links_links.py deleted file mode 100644 index c6fd6766..00000000 --- a/credentials_api/credentials_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from credentials_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/credentials_api/credentials_api/models/unauthorized_error.py b/credentials_api/credentials_api/models/unauthorized_error.py deleted file mode 100644 index adee6320..00000000 --- a/credentials_api/credentials_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/credentials_api/credentials_api/rest.py b/credentials_api/credentials_api/rest.py deleted file mode 100644 index 426cde9e..00000000 --- a/credentials_api/credentials_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from credentials_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/credentials_api/docs/Error.md b/credentials_api/docs/Error.md deleted file mode 100644 index b0e999a9..00000000 --- a/credentials_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 credentials_api.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_form_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/credentials_api/docs/GetTransactionTestsCredentialsList200Response.md b/credentials_api/docs/GetTransactionTestsCredentialsList200Response.md deleted file mode 100644 index 4d6d5aa3..00000000 --- a/credentials_api/docs/GetTransactionTestsCredentialsList200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetTransactionTestsCredentialsList200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**credentials** | [**List[Credential]**](Credential.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from credentials_api.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTransactionTestsCredentialsList200Response from a JSON string -get_transaction_tests_credentials_list200_response_instance = GetTransactionTestsCredentialsList200Response.from_json(json) -# print the JSON string representation of the object -print GetTransactionTestsCredentialsList200Response.to_json() - -# convert the object into a dict -get_transaction_tests_credentials_list200_response_dict = get_transaction_tests_credentials_list200_response_instance.to_dict() -# create an instance of GetTransactionTestsCredentialsList200Response from a dict -get_transaction_tests_credentials_list200_response_form_dict = get_transaction_tests_credentials_list200_response.from_dict(get_transaction_tests_credentials_list200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/credentials_api/docs/Link.md b/credentials_api/docs/Link.md deleted file mode 100644 index 2a8956ed..00000000 --- a/credentials_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 credentials_api.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_form_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/credentials_api/docs/SelfLinks.md b/credentials_api/docs/SelfLinks.md deleted file mode 100644 index 4cc3b87f..00000000 --- a/credentials_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from credentials_api.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_form_dict = self_links.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/credentials_api/docs/SelfLinksLinks.md b/credentials_api/docs/SelfLinksLinks.md deleted file mode 100644 index acfeb095..00000000 --- a/credentials_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from credentials_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/credentials_api/docs/UnauthorizedError.md b/credentials_api/docs/UnauthorizedError.md deleted file mode 100644 index dc39ee5b..00000000 --- a/credentials_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from credentials_api.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_form_dict = unauthorized_error.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/credentials_api/git_push.sh b/credentials_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/credentials_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/credentials_api/pyproject.toml b/credentials_api/pyproject.toml deleted file mode 100644 index e39467de..00000000 --- a/credentials_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "credentials_api" -version = "1.0.0" -description = "Credentials API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Credentials API"] -include = ["credentials_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/credentials_api/setup.py b/credentials_api/setup.py deleted file mode 100644 index 9f2eac3a..00000000 --- a/credentials_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "credentials-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Credentials API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Credentials API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ### Overview 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. - """, # noqa: E501 - package_data={"credentials_api": ["py.typed"]}, -) diff --git a/credentials_api/test-requirements.txt b/credentials_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/credentials_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/credentials_api/test/test_credential.py b/credentials_api/test/test_credential.py deleted file mode 100644 index 3aaaad25..00000000 --- a/credentials_api/test/test_credential.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.credential import Credential - -class TestCredential(unittest.TestCase): - """Credential unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Credential: - """Test Credential - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Credential` - """ - model = Credential() - if include_optional: - return Credential( - id = '3247', - name = 'Example Credential', - links = credentials_api.models.self_links__links.SelfLinks__links( - self = credentials_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - value = 'rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt' - ) - else: - return Credential( - ) - """ - - def testCredential(self): - """Test Credential""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_credential_request.py b/credentials_api/test/test_credential_request.py deleted file mode 100644 index 72a09335..00000000 --- a/credentials_api/test/test_credential_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.credential_request import CredentialRequest - -class TestCredentialRequest(unittest.TestCase): - """CredentialRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CredentialRequest: - """Test CredentialRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CredentialRequest` - """ - model = CredentialRequest() - if include_optional: - return CredentialRequest( - name = 'Example Credential 1', - value = 'Example Credential 1 Password' - ) - else: - return CredentialRequest( - ) - """ - - def testCredentialRequest(self): - """Test CredentialRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_credential_without_value.py b/credentials_api/test/test_credential_without_value.py deleted file mode 100644 index f83ecbd2..00000000 --- a/credentials_api/test/test_credential_without_value.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.credential_without_value import CredentialWithoutValue - -class TestCredentialWithoutValue(unittest.TestCase): - """CredentialWithoutValue unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CredentialWithoutValue: - """Test CredentialWithoutValue - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CredentialWithoutValue` - """ - model = CredentialWithoutValue() - if include_optional: - return CredentialWithoutValue( - links = credentials_api.models.self_links__links.SelfLinks__links( - self = credentials_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - id = '3247', - name = 'Example Credential' - ) - else: - return CredentialWithoutValue( - ) - """ - - def testCredentialWithoutValue(self): - """Test CredentialWithoutValue""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_credentials.py b/credentials_api/test/test_credentials.py deleted file mode 100644 index 140d109f..00000000 --- a/credentials_api/test/test_credentials.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.credentials import Credentials - -class TestCredentials(unittest.TestCase): - """Credentials unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Credentials: - """Test Credentials - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Credentials` - """ - model = Credentials() - if include_optional: - return Credentials( - credentials = [ - null - ] - ) - else: - return Credentials( - ) - """ - - def testCredentials(self): - """Test Credentials""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_credentials_api.py b/credentials_api/test/test_credentials_api.py deleted file mode 100644 index 0beaacee..00000000 --- a/credentials_api/test/test_credentials_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from credentials_api.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_transaction_tests_credential(self) -> None: - """Test case for create_transaction_tests_credential - - Create credential - """ - pass - - def test_delete_transaction_tests_credential(self) -> None: - """Test case for delete_transaction_tests_credential - - Delete credential - """ - pass - - def test_get_transaction_tests_credential_details(self) -> None: - """Test case for get_transaction_tests_credential_details - - Retrieve credential - """ - pass - - def test_get_transaction_tests_credentials_list(self) -> None: - """Test case for get_transaction_tests_credentials_list - - List credentials - """ - pass - - def test_update_transaction_tests_credential(self) -> None: - """Test case for update_transaction_tests_credential - - Update credential - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_error.py b/credentials_api/test/test_error.py deleted file mode 100644 index 84a96848..00000000 --- a/credentials_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_get_transaction_tests_credentials_list200_response.py b/credentials_api/test/test_get_transaction_tests_credentials_list200_response.py deleted file mode 100644 index 23b815e6..00000000 --- a/credentials_api/test/test_get_transaction_tests_credentials_list200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.get_transaction_tests_credentials_list200_response import GetTransactionTestsCredentialsList200Response - -class TestGetTransactionTestsCredentialsList200Response(unittest.TestCase): - """GetTransactionTestsCredentialsList200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTransactionTestsCredentialsList200Response: - """Test GetTransactionTestsCredentialsList200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTransactionTestsCredentialsList200Response` - """ - model = GetTransactionTestsCredentialsList200Response() - if include_optional: - return GetTransactionTestsCredentialsList200Response( - credentials = [ - null - ], - links = credentials_api.models.self_links__links.SelfLinks__links( - self = credentials_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTransactionTestsCredentialsList200Response( - ) - """ - - def testGetTransactionTestsCredentialsList200Response(self): - """Test GetTransactionTestsCredentialsList200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_link.py b/credentials_api/test/test_link.py deleted file mode 100644 index 9617703a..00000000 --- a/credentials_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_self_links.py b/credentials_api/test/test_self_links.py deleted file mode 100644 index f0dcf715..00000000 --- a/credentials_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = credentials_api.models.self_links__links.SelfLinks__links( - self = credentials_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_self_links_links.py b/credentials_api/test/test_self_links_links.py deleted file mode 100644 index 0b61abfc..00000000 --- a/credentials_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = credentials_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/test/test_unauthorized_error.py b/credentials_api/test/test_unauthorized_error.py deleted file mode 100644 index 576caf0b..00000000 --- a/credentials_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Credentials API - - ### Overview 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. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from credentials_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/credentials_api/tox.ini b/credentials_api/tox.ini deleted file mode 100644 index 56be22c5..00000000 --- a/credentials_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=credentials_api diff --git a/dashboards_api/.gitignore b/dashboards/.gitignore similarity index 100% rename from dashboards_api/.gitignore rename to dashboards/.gitignore diff --git a/dashboards_api/.openapi-generator-ignore b/dashboards/.openapi-generator-ignore similarity index 100% rename from dashboards_api/.openapi-generator-ignore rename to dashboards/.openapi-generator-ignore diff --git a/dashboards/.openapi-generator/FILES b/dashboards/.openapi-generator/FILES new file mode 100644 index 00000000..1e9b6d84 --- /dev/null +++ b/dashboards/.openapi-generator/FILES @@ -0,0 +1,381 @@ +.gitignore +.openapi-generator-ignore +README.md +dashboards/__init__.py +dashboards/api/__init__.py +dashboards/api/dashboard_snapshots_api.py +dashboards/api/dashboards_api.py +dashboards/api/dashboards_filters_api.py +dashboards/api_client.py +dashboards/api_response.py +dashboards/configuration.py +dashboards/exceptions.py +dashboards/models/__init__.py +dashboards/models/agent_status_datasource.py +dashboards/models/alert_list_alert_type.py +dashboards/models/alert_list_datasource.py +dashboards/models/api_agent_location.py +dashboards/models/api_agent_status_agent.py +dashboards/models/api_agent_status_ip_info.py +dashboards/models/api_agent_status_summary.py +dashboards/models/api_agent_status_widget.py +dashboards/models/api_agent_widget_show.py +dashboards/models/api_agent_widget_type.py +dashboards/models/api_aggregate_property.py +dashboards/models/api_alert_list_alert.py +dashboards/models/api_alert_list_widget.py +dashboards/models/api_alert_list_widget_all_of_active_within.py +dashboards/models/api_box_and_whiskers_widget.py +dashboards/models/api_color_grid_widget.py +dashboards/models/api_context_filter_request.py +dashboards/models/api_context_filter_response.py +dashboards/models/api_context_filters_response.py +dashboards/models/api_dashboard.py +dashboards/models/api_dashboard_asw.py +dashboards/models/api_dashboard_filter_user_details.py +dashboards/models/api_dashboard_snapshot.py +dashboards/models/api_data_point_group.py +dashboards/models/api_data_source_filter.py +dashboards/models/api_data_source_filters.py +dashboards/models/api_default_timespan.py +dashboards/models/api_duration.py +dashboards/models/api_duration_unit.py +dashboards/models/api_geo_map_widget.py +dashboards/models/api_graphlet_point.py +dashboards/models/api_grouped_barchart_widget.py +dashboards/models/api_multi_metric_column.py +dashboards/models/api_multi_metric_column_data.py +dashboards/models/api_multi_metric_table_widget.py +dashboards/models/api_multi_search_filter_api_test_table_filter_key.py +dashboards/models/api_numbers_card.py +dashboards/models/api_numbers_card_data.py +dashboards/models/api_numbers_card_widget.py +dashboards/models/api_pie_chart_widget.py +dashboards/models/api_report_data_component_label_map.py +dashboards/models/api_report_data_component_label_map_entry.py +dashboards/models/api_report_snapshot_time_span.py +dashboards/models/api_stacked_area_chart_widget.py +dashboards/models/api_stacked_barchart_widget.py +dashboards/models/api_table_widget.py +dashboards/models/api_test_table_data.py +dashboards/models/api_test_table_graphlets_data.py +dashboards/models/api_test_table_widget.py +dashboards/models/api_timeseries_widget.py +dashboards/models/api_widget.py +dashboards/models/api_widget_data_point.py +dashboards/models/api_widget_data_response.py +dashboards/models/api_widget_filter_api_test_table_filter_key.py +dashboards/models/api_widget_fixed_y_scale_prefix.py +dashboards/models/api_widget_measure.py +dashboards/models/api_widget_sort_direction.py +dashboards/models/api_widget_sort_property.py +dashboards/models/api_widgets_data_v2.py +dashboards/models/app_and_self_links.py +dashboards/models/app_and_self_links_links.py +dashboards/models/asw_repeat.py +dashboards/models/asw_repeat_unit.py +dashboards/models/box_and_whiskers_datasource.py +dashboards/models/color_grid_datasource.py +dashboards/models/create_dashboard_snapshot201_response.py +dashboards/models/dashboard.py +dashboards/models/dashboard_global_filter_id.py +dashboards/models/dashboard_links.py +dashboards/models/dashboard_links_links.py +dashboards/models/dashboard_metric.py +dashboards/models/dashboard_metric_direction.py +dashboards/models/dashboard_order.py +dashboards/models/dashboard_snapshot_id.py +dashboards/models/dashboard_snapshots200_response.py +dashboards/models/dashboard_snapshots_page.py +dashboards/models/default_timespan.py +dashboards/models/enterprise_agent_state.py +dashboards/models/error.py +dashboards/models/generate_dashboard_snapshot_request.py +dashboards/models/geo_map_datasource.py +dashboards/models/get_dashboard_data200_response.py +dashboards/models/grouped_bar_chart_datasource.py +dashboards/models/legacy_agent_widget_show.py +dashboards/models/legacy_agent_widget_type.py +dashboards/models/legacy_alert_list_alert_type.py +dashboards/models/legacy_api_dashboard.py +dashboards/models/legacy_dashboard_snapshot.py +dashboards/models/legacy_default_timespan.py +dashboards/models/legacy_duration_unit.py +dashboards/models/legacy_widget_sort_direction.py +dashboards/models/legacy_widget_sort_property.py +dashboards/models/link.py +dashboards/models/metric_group.py +dashboards/models/multi_metrics_table_datasource.py +dashboards/models/numbers_card_datasource.py +dashboards/models/pagination_links.py +dashboards/models/pagination_links_links.py +dashboards/models/pie_chart_datasource.py +dashboards/models/query_window.py +dashboards/models/scalable_widget.py +dashboards/models/self_links.py +dashboards/models/self_links_links.py +dashboards/models/snapshot_data_by_widget200_response.py +dashboards/models/stacked_area_chart_datasource.py +dashboards/models/stacked_bar_chart_datasource.py +dashboards/models/table_datasource.py +dashboards/models/test_table_datasource.py +dashboards/models/test_table_filter_key.py +dashboards/models/test_table_filter_type.py +dashboards/models/timeseries_datasource.py +dashboards/models/unauthorized_error.py +dashboards/models/update_snapshot_expiration_date_api_request.py +dashboards/models/validation_error.py +dashboards/models/validation_error_all_of_errors.py +dashboards/models/visual_mode.py +dashboards/models/widget.py +dashboards/models/widget_measure_type.py +dashboards/models/widget_type.py +dashboards/py.typed +dashboards/rest.py +docs/AgentStatusDatasource.md +docs/AlertListAlertType.md +docs/AlertListDatasource.md +docs/ApiAgentLocation.md +docs/ApiAgentStatusAgent.md +docs/ApiAgentStatusIpInfo.md +docs/ApiAgentStatusSummary.md +docs/ApiAgentStatusWidget.md +docs/ApiAgentWidgetShow.md +docs/ApiAgentWidgetType.md +docs/ApiAggregateProperty.md +docs/ApiAlertListAlert.md +docs/ApiAlertListWidget.md +docs/ApiAlertListWidgetAllOfActiveWithin.md +docs/ApiBoxAndWhiskersWidget.md +docs/ApiColorGridWidget.md +docs/ApiContextFilterRequest.md +docs/ApiContextFilterResponse.md +docs/ApiContextFiltersResponse.md +docs/ApiDashboard.md +docs/ApiDashboardAsw.md +docs/ApiDashboardFilterUserDetails.md +docs/ApiDashboardSnapshot.md +docs/ApiDataPointGroup.md +docs/ApiDataSourceFilter.md +docs/ApiDataSourceFilters.md +docs/ApiDefaultTimespan.md +docs/ApiDuration.md +docs/ApiDurationUnit.md +docs/ApiGeoMapWidget.md +docs/ApiGraphletPoint.md +docs/ApiGroupedBarchartWidget.md +docs/ApiMultiMetricColumn.md +docs/ApiMultiMetricColumnData.md +docs/ApiMultiMetricTableWidget.md +docs/ApiMultiSearchFilterApiTestTableFilterKey.md +docs/ApiNumbersCard.md +docs/ApiNumbersCardData.md +docs/ApiNumbersCardWidget.md +docs/ApiPieChartWidget.md +docs/ApiReportDataComponentLabelMap.md +docs/ApiReportDataComponentLabelMapEntry.md +docs/ApiReportSnapshotTimeSpan.md +docs/ApiStackedAreaChartWidget.md +docs/ApiStackedBarchartWidget.md +docs/ApiTableWidget.md +docs/ApiTestTableData.md +docs/ApiTestTableGraphletsData.md +docs/ApiTestTableWidget.md +docs/ApiTimeseriesWidget.md +docs/ApiWidget.md +docs/ApiWidgetDataPoint.md +docs/ApiWidgetDataResponse.md +docs/ApiWidgetFilterApiTestTableFilterKey.md +docs/ApiWidgetFixedYScalePrefix.md +docs/ApiWidgetMeasure.md +docs/ApiWidgetSortDirection.md +docs/ApiWidgetSortProperty.md +docs/ApiWidgetsDataV2.md +docs/AppAndSelfLinks.md +docs/AppAndSelfLinksLinks.md +docs/AswRepeat.md +docs/AswRepeatUnit.md +docs/BoxAndWhiskersDatasource.md +docs/ColorGridDatasource.md +docs/CreateDashboardSnapshot201Response.md +docs/Dashboard.md +docs/DashboardGlobalFilterId.md +docs/DashboardLinks.md +docs/DashboardLinksLinks.md +docs/DashboardMetric.md +docs/DashboardMetricDirection.md +docs/DashboardOrder.md +docs/DashboardSnapshotId.md +docs/DashboardSnapshots200Response.md +docs/DashboardSnapshotsApi.md +docs/DashboardSnapshotsPage.md +docs/DashboardsApi.md +docs/DashboardsFiltersApi.md +docs/DefaultTimespan.md +docs/EnterpriseAgentState.md +docs/Error.md +docs/GenerateDashboardSnapshotRequest.md +docs/GeoMapDatasource.md +docs/GetDashboardData200Response.md +docs/GroupedBarChartDatasource.md +docs/LegacyAgentWidgetShow.md +docs/LegacyAgentWidgetType.md +docs/LegacyAlertListAlertType.md +docs/LegacyApiDashboard.md +docs/LegacyDashboardSnapshot.md +docs/LegacyDefaultTimespan.md +docs/LegacyDurationUnit.md +docs/LegacyWidgetSortDirection.md +docs/LegacyWidgetSortProperty.md +docs/Link.md +docs/MetricGroup.md +docs/MultiMetricsTableDatasource.md +docs/NumbersCardDatasource.md +docs/PaginationLinks.md +docs/PaginationLinksLinks.md +docs/PieChartDatasource.md +docs/QueryWindow.md +docs/ScalableWidget.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/SnapshotDataByWidget200Response.md +docs/StackedAreaChartDatasource.md +docs/StackedBarChartDatasource.md +docs/TableDatasource.md +docs/TestTableDatasource.md +docs/TestTableFilterKey.md +docs/TestTableFilterType.md +docs/TimeseriesDatasource.md +docs/UnauthorizedError.md +docs/UpdateSnapshotExpirationDateApiRequest.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/VisualMode.md +docs/Widget.md +docs/WidgetMeasureType.md +docs/WidgetType.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.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_alert_list_widget_all_of_active_within.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_point.py +test/test_api_widget_data_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_app_and_self_links_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_create_dashboard_snapshot201_response.py +test/test_dashboard.py +test/test_dashboard_global_filter_id.py +test/test_dashboard_links.py +test/test_dashboard_links_links.py +test/test_dashboard_metric.py +test/test_dashboard_metric_direction.py +test/test_dashboard_order.py +test/test_dashboard_snapshot_id.py +test/test_dashboard_snapshots200_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_get_dashboard_data200_response.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_pagination_links_links.py +test/test_pie_chart_datasource.py +test/test_query_window.py +test/test_scalable_widget.py +test/test_self_links.py +test/test_self_links_links.py +test/test_snapshot_data_by_widget200_response.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_all_of_errors.py +test/test_visual_mode.py +test/test_widget.py +test/test_widget_measure_type.py +test/test_widget_type.py diff --git a/dashboards/.openapi-generator/VERSION b/dashboards/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/dashboards/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/dashboards/README.md b/dashboards/README.md new file mode 100644 index 00000000..ad6fa32a --- /dev/null +++ b/dashboards/README.md @@ -0,0 +1,255 @@ +# dashboards +Manage ThousandEyes Dashboards. + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import dashboards +``` + +### 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 dashboards +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import dashboards +from 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 = dashboards.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 = dashboards.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards.DashboardSnapshotsApi(api_client) + generate_dashboard_snapshot_request = dashboards.GenerateDashboardSnapshotRequest() # GenerateDashboardSnapshotRequest | Request body schema to create a dashboard snapshot. + 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 dashboard snapshot + api_response = api_instance.create_dashboard_snapshot(generate_dashboard_snapshot_request, aid=aid) + print("The response of DashboardSnapshotsApi->create_dashboard_snapshot:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling DashboardSnapshotsApi->create_dashboard_snapshot: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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 +*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* | [**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 + + +## Documentation For Models + + - [AgentStatusDatasource](docs/AgentStatusDatasource.md) + - [AlertListAlertType](docs/AlertListAlertType.md) + - [AlertListDatasource](docs/AlertListDatasource.md) + - [ApiAgentLocation](docs/ApiAgentLocation.md) + - [ApiAgentStatusAgent](docs/ApiAgentStatusAgent.md) + - [ApiAgentStatusIpInfo](docs/ApiAgentStatusIpInfo.md) + - [ApiAgentStatusSummary](docs/ApiAgentStatusSummary.md) + - [ApiAgentStatusWidget](docs/ApiAgentStatusWidget.md) + - [ApiAgentWidgetShow](docs/ApiAgentWidgetShow.md) + - [ApiAgentWidgetType](docs/ApiAgentWidgetType.md) + - [ApiAggregateProperty](docs/ApiAggregateProperty.md) + - [ApiAlertListAlert](docs/ApiAlertListAlert.md) + - [ApiAlertListWidget](docs/ApiAlertListWidget.md) + - [ApiAlertListWidgetAllOfActiveWithin](docs/ApiAlertListWidgetAllOfActiveWithin.md) + - [ApiBoxAndWhiskersWidget](docs/ApiBoxAndWhiskersWidget.md) + - [ApiColorGridWidget](docs/ApiColorGridWidget.md) + - [ApiContextFilterRequest](docs/ApiContextFilterRequest.md) + - [ApiContextFilterResponse](docs/ApiContextFilterResponse.md) + - [ApiContextFiltersResponse](docs/ApiContextFiltersResponse.md) + - [ApiDashboard](docs/ApiDashboard.md) + - [ApiDashboardAsw](docs/ApiDashboardAsw.md) + - [ApiDashboardFilterUserDetails](docs/ApiDashboardFilterUserDetails.md) + - [ApiDashboardSnapshot](docs/ApiDashboardSnapshot.md) + - [ApiDataPointGroup](docs/ApiDataPointGroup.md) + - [ApiDataSourceFilter](docs/ApiDataSourceFilter.md) + - [ApiDataSourceFilters](docs/ApiDataSourceFilters.md) + - [ApiDefaultTimespan](docs/ApiDefaultTimespan.md) + - [ApiDuration](docs/ApiDuration.md) + - [ApiDurationUnit](docs/ApiDurationUnit.md) + - [ApiGeoMapWidget](docs/ApiGeoMapWidget.md) + - [ApiGraphletPoint](docs/ApiGraphletPoint.md) + - [ApiGroupedBarchartWidget](docs/ApiGroupedBarchartWidget.md) + - [ApiMultiMetricColumn](docs/ApiMultiMetricColumn.md) + - [ApiMultiMetricColumnData](docs/ApiMultiMetricColumnData.md) + - [ApiMultiMetricTableWidget](docs/ApiMultiMetricTableWidget.md) + - [ApiMultiSearchFilterApiTestTableFilterKey](docs/ApiMultiSearchFilterApiTestTableFilterKey.md) + - [ApiNumbersCard](docs/ApiNumbersCard.md) + - [ApiNumbersCardData](docs/ApiNumbersCardData.md) + - [ApiNumbersCardWidget](docs/ApiNumbersCardWidget.md) + - [ApiPieChartWidget](docs/ApiPieChartWidget.md) + - [ApiReportDataComponentLabelMap](docs/ApiReportDataComponentLabelMap.md) + - [ApiReportDataComponentLabelMapEntry](docs/ApiReportDataComponentLabelMapEntry.md) + - [ApiReportSnapshotTimeSpan](docs/ApiReportSnapshotTimeSpan.md) + - [ApiStackedAreaChartWidget](docs/ApiStackedAreaChartWidget.md) + - [ApiStackedBarchartWidget](docs/ApiStackedBarchartWidget.md) + - [ApiTableWidget](docs/ApiTableWidget.md) + - [ApiTestTableData](docs/ApiTestTableData.md) + - [ApiTestTableGraphletsData](docs/ApiTestTableGraphletsData.md) + - [ApiTestTableWidget](docs/ApiTestTableWidget.md) + - [ApiTimeseriesWidget](docs/ApiTimeseriesWidget.md) + - [ApiWidget](docs/ApiWidget.md) + - [ApiWidgetDataPoint](docs/ApiWidgetDataPoint.md) + - [ApiWidgetDataResponse](docs/ApiWidgetDataResponse.md) + - [ApiWidgetFilterApiTestTableFilterKey](docs/ApiWidgetFilterApiTestTableFilterKey.md) + - [ApiWidgetFixedYScalePrefix](docs/ApiWidgetFixedYScalePrefix.md) + - [ApiWidgetMeasure](docs/ApiWidgetMeasure.md) + - [ApiWidgetSortDirection](docs/ApiWidgetSortDirection.md) + - [ApiWidgetSortProperty](docs/ApiWidgetSortProperty.md) + - [ApiWidgetsDataV2](docs/ApiWidgetsDataV2.md) + - [AppAndSelfLinks](docs/AppAndSelfLinks.md) + - [AppAndSelfLinksLinks](docs/AppAndSelfLinksLinks.md) + - [AswRepeat](docs/AswRepeat.md) + - [AswRepeatUnit](docs/AswRepeatUnit.md) + - [BoxAndWhiskersDatasource](docs/BoxAndWhiskersDatasource.md) + - [ColorGridDatasource](docs/ColorGridDatasource.md) + - [CreateDashboardSnapshot201Response](docs/CreateDashboardSnapshot201Response.md) + - [Dashboard](docs/Dashboard.md) + - [DashboardGlobalFilterId](docs/DashboardGlobalFilterId.md) + - [DashboardLinks](docs/DashboardLinks.md) + - [DashboardLinksLinks](docs/DashboardLinksLinks.md) + - [DashboardMetric](docs/DashboardMetric.md) + - [DashboardMetricDirection](docs/DashboardMetricDirection.md) + - [DashboardOrder](docs/DashboardOrder.md) + - [DashboardSnapshotId](docs/DashboardSnapshotId.md) + - [DashboardSnapshots200Response](docs/DashboardSnapshots200Response.md) + - [DashboardSnapshotsPage](docs/DashboardSnapshotsPage.md) + - [DefaultTimespan](docs/DefaultTimespan.md) + - [EnterpriseAgentState](docs/EnterpriseAgentState.md) + - [Error](docs/Error.md) + - [GenerateDashboardSnapshotRequest](docs/GenerateDashboardSnapshotRequest.md) + - [GeoMapDatasource](docs/GeoMapDatasource.md) + - [GetDashboardData200Response](docs/GetDashboardData200Response.md) + - [GroupedBarChartDatasource](docs/GroupedBarChartDatasource.md) + - [LegacyAgentWidgetShow](docs/LegacyAgentWidgetShow.md) + - [LegacyAgentWidgetType](docs/LegacyAgentWidgetType.md) + - [LegacyAlertListAlertType](docs/LegacyAlertListAlertType.md) + - [LegacyApiDashboard](docs/LegacyApiDashboard.md) + - [LegacyDashboardSnapshot](docs/LegacyDashboardSnapshot.md) + - [LegacyDefaultTimespan](docs/LegacyDefaultTimespan.md) + - [LegacyDurationUnit](docs/LegacyDurationUnit.md) + - [LegacyWidgetSortDirection](docs/LegacyWidgetSortDirection.md) + - [LegacyWidgetSortProperty](docs/LegacyWidgetSortProperty.md) + - [Link](docs/Link.md) + - [MetricGroup](docs/MetricGroup.md) + - [MultiMetricsTableDatasource](docs/MultiMetricsTableDatasource.md) + - [NumbersCardDatasource](docs/NumbersCardDatasource.md) + - [PaginationLinks](docs/PaginationLinks.md) + - [PaginationLinksLinks](docs/PaginationLinksLinks.md) + - [PieChartDatasource](docs/PieChartDatasource.md) + - [QueryWindow](docs/QueryWindow.md) + - [ScalableWidget](docs/ScalableWidget.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [SnapshotDataByWidget200Response](docs/SnapshotDataByWidget200Response.md) + - [StackedAreaChartDatasource](docs/StackedAreaChartDatasource.md) + - [StackedBarChartDatasource](docs/StackedBarChartDatasource.md) + - [TableDatasource](docs/TableDatasource.md) + - [TestTableDatasource](docs/TestTableDatasource.md) + - [TestTableFilterKey](docs/TestTableFilterKey.md) + - [TestTableFilterType](docs/TestTableFilterType.md) + - [TimeseriesDatasource](docs/TimeseriesDatasource.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UpdateSnapshotExpirationDateApiRequest](docs/UpdateSnapshotExpirationDateApiRequest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [VisualMode](docs/VisualMode.md) + - [Widget](docs/Widget.md) + - [WidgetMeasureType](docs/WidgetMeasureType.md) + - [WidgetType](docs/WidgetType.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/dashboards/dashboards/__init__.py b/dashboards/dashboards/__init__.py new file mode 100644 index 00000000..347c8f5c --- /dev/null +++ b/dashboards/dashboards/__init__.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.api.dashboard_snapshots_api import DashboardSnapshotsApi +from dashboards.api.dashboards_api import DashboardsApi +from dashboards.api.dashboards_filters_api import DashboardsFiltersApi + +# import ApiClient +from dashboards.api_response import ApiResponse +from dashboards.api_client import ApiClient +from dashboards.configuration import Configuration +from dashboards.exceptions import OpenApiException +from dashboards.exceptions import ApiTypeError +from dashboards.exceptions import ApiValueError +from dashboards.exceptions import ApiKeyError +from dashboards.exceptions import ApiAttributeError +from dashboards.exceptions import ApiException + +# import models into sdk package +from dashboards.models.agent_status_datasource import AgentStatusDatasource +from dashboards.models.alert_list_alert_type import AlertListAlertType +from dashboards.models.alert_list_datasource import AlertListDatasource +from dashboards.models.api_agent_location import ApiAgentLocation +from dashboards.models.api_agent_status_agent import ApiAgentStatusAgent +from dashboards.models.api_agent_status_ip_info import ApiAgentStatusIpInfo +from dashboards.models.api_agent_status_summary import ApiAgentStatusSummary +from dashboards.models.api_agent_status_widget import ApiAgentStatusWidget +from dashboards.models.api_agent_widget_show import ApiAgentWidgetShow +from dashboards.models.api_agent_widget_type import ApiAgentWidgetType +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_alert_list_alert import ApiAlertListAlert +from dashboards.models.api_alert_list_widget import ApiAlertListWidget +from dashboards.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin +from dashboards.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget +from dashboards.models.api_color_grid_widget import ApiColorGridWidget +from dashboards.models.api_context_filter_request import ApiContextFilterRequest +from dashboards.models.api_context_filter_response import ApiContextFilterResponse +from dashboards.models.api_context_filters_response import ApiContextFiltersResponse +from dashboards.models.api_dashboard import ApiDashboard +from dashboards.models.api_dashboard_asw import ApiDashboardAsw +from dashboards.models.api_dashboard_filter_user_details import ApiDashboardFilterUserDetails +from dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from dashboards.models.api_data_point_group import ApiDataPointGroup +from dashboards.models.api_data_source_filter import ApiDataSourceFilter +from dashboards.models.api_data_source_filters import ApiDataSourceFilters +from dashboards.models.api_default_timespan import ApiDefaultTimespan +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_duration_unit import ApiDurationUnit +from dashboards.models.api_geo_map_widget import ApiGeoMapWidget +from dashboards.models.api_graphlet_point import ApiGraphletPoint +from dashboards.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget +from dashboards.models.api_multi_metric_column import ApiMultiMetricColumn +from dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData +from dashboards.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget +from dashboards.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey +from dashboards.models.api_numbers_card import ApiNumbersCard +from dashboards.models.api_numbers_card_data import ApiNumbersCardData +from dashboards.models.api_numbers_card_widget import ApiNumbersCardWidget +from dashboards.models.api_pie_chart_widget import ApiPieChartWidget +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry +from dashboards.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan +from dashboards.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget +from dashboards.models.api_stacked_barchart_widget import ApiStackedBarchartWidget +from dashboards.models.api_table_widget import ApiTableWidget +from dashboards.models.api_test_table_data import ApiTestTableData +from dashboards.models.api_test_table_graphlets_data import ApiTestTableGraphletsData +from dashboards.models.api_test_table_widget import ApiTestTableWidget +from dashboards.models.api_timeseries_widget import ApiTimeseriesWidget +from dashboards.models.api_widget import ApiWidget +from dashboards.models.api_widget_data_point import ApiWidgetDataPoint +from dashboards.models.api_widget_data_response import ApiWidgetDataResponse +from dashboards.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.api_widget_sort_direction import ApiWidgetSortDirection +from dashboards.models.api_widget_sort_property import ApiWidgetSortProperty +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from dashboards.models.app_and_self_links import AppAndSelfLinks +from dashboards.models.app_and_self_links_links import AppAndSelfLinksLinks +from dashboards.models.asw_repeat import AswRepeat +from dashboards.models.asw_repeat_unit import AswRepeatUnit +from dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource +from dashboards.models.color_grid_datasource import ColorGridDatasource +from dashboards.models.create_dashboard_snapshot201_response import CreateDashboardSnapshot201Response +from dashboards.models.dashboard import Dashboard +from dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId +from dashboards.models.dashboard_links import DashboardLinks +from dashboards.models.dashboard_links_links import DashboardLinksLinks +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.dashboard_order import DashboardOrder +from dashboards.models.dashboard_snapshot_id import DashboardSnapshotId +from dashboards.models.dashboard_snapshots200_response import DashboardSnapshots200Response +from dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage +from dashboards.models.default_timespan import DefaultTimespan +from dashboards.models.enterprise_agent_state import EnterpriseAgentState +from dashboards.models.error import Error +from dashboards.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest +from dashboards.models.geo_map_datasource import GeoMapDatasource +from dashboards.models.get_dashboard_data200_response import GetDashboardData200Response +from dashboards.models.grouped_bar_chart_datasource import GroupedBarChartDatasource +from dashboards.models.legacy_agent_widget_show import LegacyAgentWidgetShow +from dashboards.models.legacy_agent_widget_type import LegacyAgentWidgetType +from dashboards.models.legacy_alert_list_alert_type import LegacyAlertListAlertType +from dashboards.models.legacy_api_dashboard import LegacyApiDashboard +from dashboards.models.legacy_dashboard_snapshot import LegacyDashboardSnapshot +from dashboards.models.legacy_default_timespan import LegacyDefaultTimespan +from dashboards.models.legacy_duration_unit import LegacyDurationUnit +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.link import Link +from dashboards.models.metric_group import MetricGroup +from dashboards.models.multi_metrics_table_datasource import MultiMetricsTableDatasource +from dashboards.models.numbers_card_datasource import NumbersCardDatasource +from dashboards.models.pagination_links import PaginationLinks +from dashboards.models.pagination_links_links import PaginationLinksLinks +from dashboards.models.pie_chart_datasource import PieChartDatasource +from dashboards.models.query_window import QueryWindow +from dashboards.models.scalable_widget import ScalableWidget +from dashboards.models.self_links import SelfLinks +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response +from dashboards.models.stacked_area_chart_datasource import StackedAreaChartDatasource +from dashboards.models.stacked_bar_chart_datasource import StackedBarChartDatasource +from dashboards.models.table_datasource import TableDatasource +from dashboards.models.test_table_datasource import TestTableDatasource +from dashboards.models.test_table_filter_key import TestTableFilterKey +from dashboards.models.test_table_filter_type import TestTableFilterType +from dashboards.models.timeseries_datasource import TimeseriesDatasource +from dashboards.models.unauthorized_error import UnauthorizedError +from dashboards.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest +from dashboards.models.validation_error import ValidationError +from dashboards.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from dashboards.models.visual_mode import VisualMode +from dashboards.models.widget import Widget +from dashboards.models.widget_measure_type import WidgetMeasureType +from dashboards.models.widget_type import WidgetType diff --git a/dashboards/dashboards/api/__init__.py b/dashboards/dashboards/api/__init__.py new file mode 100644 index 00000000..be5405ed --- /dev/null +++ b/dashboards/dashboards/api/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa + +# import apis into api package +from dashboards.api.dashboard_snapshots_api import DashboardSnapshotsApi +from dashboards.api.dashboards_api import DashboardsApi +from dashboards.api.dashboards_filters_api import DashboardsFiltersApi + diff --git a/dashboards_api/dashboards_api/api/dashboard_snapshots_api.py b/dashboards/dashboards/api/dashboard_snapshots_api.py similarity index 95% rename from dashboards_api/dashboards_api/api/dashboard_snapshots_api.py rename to dashboards/dashboards/api/dashboard_snapshots_api.py index 53f90c1e..0bd1e863 100644 --- a/dashboards_api/dashboards_api/api/dashboard_snapshots_api.py +++ b/dashboards/dashboards/api/dashboard_snapshots_api.py @@ -3,41 +3,32 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from dashboards.models.create_dashboard_snapshot201_response import CreateDashboardSnapshot201Response +from dashboards.models.dashboard_snapshots200_response import DashboardSnapshots200Response +from dashboards.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest +from dashboards.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response +from dashboards.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -from dashboards_api.models.dashboard_snapshots200_response import DashboardSnapshots200Response -from dashboards_api.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest -from dashboards_api.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response -from dashboards_api.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest - -from dashboards_api.api_client import ApiClient -from dashboards_api.api_response import ApiResponse -from dashboards_api.rest import RESTResponseType +from dashboards.api_client import ApiClient, RequestSerialized +from dashboards.api_response import ApiResponse +from dashboards.rest import RESTResponseType class DashboardSnapshotsApi: @@ -70,7 +61,7 @@ class DashboardSnapshotsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiDashboardSnapshot: + ) -> CreateDashboardSnapshot201Response: """Create dashboard snapshot Creates a new dashboard snapshot within your account group. The `Edit Snapshots` permission is required to use this endpoint. @@ -111,14 +102,13 @@ class DashboardSnapshotsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiDashboardSnapshot", - '400': "Error", + '201': "CreateDashboardSnapshot201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -148,7 +138,7 @@ class DashboardSnapshotsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiDashboardSnapshot]: + ) -> ApiResponse[CreateDashboardSnapshot201Response]: """Create dashboard snapshot Creates a new dashboard snapshot within your account group. The `Edit Snapshots` permission is required to use this endpoint. @@ -189,14 +179,13 @@ class DashboardSnapshotsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiDashboardSnapshot", - '400': "Error", + '201': "CreateDashboardSnapshot201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -267,14 +256,13 @@ class DashboardSnapshotsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiDashboardSnapshot", - '400': "Error", + '201': "CreateDashboardSnapshot201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -291,19 +279,18 @@ class DashboardSnapshotsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -423,13 +410,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiDashboardSnapshot", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -501,13 +487,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiDashboardSnapshot", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -579,13 +564,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiDashboardSnapshot", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -602,19 +586,18 @@ class DashboardSnapshotsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -667,7 +650,7 @@ class DashboardSnapshotsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -689,7 +672,7 @@ class DashboardSnapshotsApi: :type aid: str :param dashboard_id: :type dashboard_id: str - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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 @@ -725,13 +708,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "DashboardSnapshots200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -749,7 +731,7 @@ class DashboardSnapshotsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -771,7 +753,7 @@ class DashboardSnapshotsApi: :type aid: str :param dashboard_id: :type dashboard_id: str - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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 @@ -807,13 +789,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "DashboardSnapshots200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -831,7 +812,7 @@ class DashboardSnapshotsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -853,7 +834,7 @@ class DashboardSnapshotsApi: :type aid: str :param dashboard_id: :type dashboard_id: str - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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 @@ -889,13 +870,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "DashboardSnapshots200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -913,19 +893,18 @@ class DashboardSnapshotsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1037,7 +1016,13 @@ class DashboardSnapshotsApi: ) _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, @@ -1108,7 +1093,13 @@ class DashboardSnapshotsApi: ) _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, @@ -1179,7 +1170,13 @@ class DashboardSnapshotsApi: ) _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, @@ -1196,19 +1193,18 @@ class DashboardSnapshotsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1227,7 +1223,6 @@ class DashboardSnapshotsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -1319,13 +1314,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "SnapshotDataByWidget200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1401,13 +1395,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "SnapshotDataByWidget200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1483,13 +1476,12 @@ class DashboardSnapshotsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "SnapshotDataByWidget200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1507,19 +1499,18 @@ class DashboardSnapshotsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1631,7 +1622,13 @@ class DashboardSnapshotsApi: ) _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, @@ -1706,7 +1703,13 @@ class DashboardSnapshotsApi: ) _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, @@ -1781,7 +1784,13 @@ class DashboardSnapshotsApi: ) _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, @@ -1799,19 +1808,18 @@ class DashboardSnapshotsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1832,7 +1840,6 @@ class DashboardSnapshotsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) diff --git a/dashboards_api/dashboards_api/api/dashboards_api.py b/dashboards/dashboards/api/dashboards_api.py similarity index 95% rename from dashboards_api/dashboards_api/api/dashboards_api.py rename to dashboards/dashboards/api/dashboards_api.py index 8de6a087..aeb98108 100644 --- a/dashboards_api/dashboards_api/api/dashboards_api.py +++ b/dashboards/dashboards/api/dashboards_api.py @@ -3,41 +3,31 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictFloat, StrictInt, StrictStr, field_validator - +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import List, Optional, Union +from typing_extensions import Annotated +from dashboards.models.api_dashboard import ApiDashboard +from dashboards.models.dashboard import Dashboard +from dashboards.models.dashboard_order import DashboardOrder +from dashboards.models.get_dashboard_data200_response import GetDashboardData200Response -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.models.dashboard_order import DashboardOrder -from dashboards_api.models.get_dashboard_data200_response import GetDashboardData200Response - -from dashboards_api.api_client import ApiClient -from dashboards_api.api_response import ApiResponse -from dashboards_api.rest import RESTResponseType +from dashboards.api_client import ApiClient, RequestSerialized +from dashboards.api_response import ApiResponse +from dashboards.rest import RESTResponseType class DashboardsApi: @@ -56,7 +46,7 @@ class DashboardsApi: @validate_call def create_dashboard( self, - api_dashboard: Annotated[ApiDashboard, Field(description="Request body schema to create a dashboard.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -70,13 +60,13 @@ class DashboardsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiDashboard: + ) -> Dashboard: """Create dashboard - Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` premission (Regular User). + Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). - :param api_dashboard: Request body schema to create a dashboard. (required) - :type api_dashboard: ApiDashboard + :param dashboard: Request body schema to create a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -102,7 +92,7 @@ class DashboardsApi: """ # noqa: E501 _param = self._create_dashboard_serialize( - api_dashboard=api_dashboard, + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -111,14 +101,13 @@ class DashboardsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiDashboard", - '400': "Error", + '201': "Dashboard", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -134,7 +123,7 @@ class DashboardsApi: @validate_call def create_dashboard_with_http_info( self, - api_dashboard: Annotated[ApiDashboard, Field(description="Request body schema to create a dashboard.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -148,13 +137,13 @@ class DashboardsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiDashboard]: + ) -> ApiResponse[Dashboard]: """Create dashboard - Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` premission (Regular User). + Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). - :param api_dashboard: Request body schema to create a dashboard. (required) - :type api_dashboard: ApiDashboard + :param dashboard: Request body schema to create a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -180,7 +169,7 @@ class DashboardsApi: """ # noqa: E501 _param = self._create_dashboard_serialize( - api_dashboard=api_dashboard, + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -189,14 +178,13 @@ class DashboardsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiDashboard", - '400': "Error", + '201': "Dashboard", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -212,7 +200,7 @@ class DashboardsApi: @validate_call def create_dashboard_without_preload_content( self, - api_dashboard: Annotated[ApiDashboard, Field(description="Request body schema to create a dashboard.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -229,10 +217,10 @@ class DashboardsApi: ) -> RESTResponseType: """Create dashboard - Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` premission (Regular User). + Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). - :param api_dashboard: Request body schema to create a dashboard. (required) - :type api_dashboard: ApiDashboard + :param dashboard: Request body schema to create a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -258,7 +246,7 @@ class DashboardsApi: """ # noqa: E501 _param = self._create_dashboard_serialize( - api_dashboard=api_dashboard, + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -267,14 +255,13 @@ class DashboardsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiDashboard", - '400': "Error", + '201': "Dashboard", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -285,25 +272,24 @@ class DashboardsApi: def _create_dashboard_serialize( self, - api_dashboard, + dashboard, aid, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -315,8 +301,8 @@ class DashboardsApi: # process the header parameters # process the form parameters # process the body parameter - if api_dashboard is not None: - _body_params = api_dashboard + if dashboard is not None: + _body_params = dashboard # set the HTTP header `Accept` @@ -422,7 +408,13 @@ class DashboardsApi: ) _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, @@ -493,7 +485,13 @@ class DashboardsApi: ) _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, @@ -564,7 +562,13 @@ class DashboardsApi: ) _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, @@ -581,19 +585,18 @@ class DashboardsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -612,7 +615,6 @@ class DashboardsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -700,13 +702,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiDashboard", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -778,13 +779,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiDashboard", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -856,13 +856,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiDashboard", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -879,19 +878,18 @@ class DashboardsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1030,13 +1028,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetDashboardData200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1140,13 +1137,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetDashboardData200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1250,13 +1246,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetDashboardData200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1281,19 +1276,18 @@ class DashboardsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1444,13 +1438,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "List[ApiDashboard]", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1518,13 +1511,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "List[ApiDashboard]", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1592,13 +1584,12 @@ class DashboardsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "List[ApiDashboard]", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1614,19 +1605,18 @@ class DashboardsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1676,7 +1666,7 @@ class DashboardsApi: def update_dashboard( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - api_dashboard: Annotated[ApiDashboard, Field(description="Request body schema to update a dashboard.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -1690,15 +1680,15 @@ class DashboardsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiDashboard: + ) -> Dashboard: """Update dashboard Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param api_dashboard: Request body schema to update a dashboard. (required) - :type api_dashboard: ApiDashboard + :param dashboard: Request body schema to update a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -1725,7 +1715,7 @@ class DashboardsApi: _param = self._update_dashboard_serialize( dashboard_id=dashboard_id, - api_dashboard=api_dashboard, + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1734,14 +1724,13 @@ class DashboardsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboard", - '400': "Error", + '200': "Dashboard", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1758,7 +1747,7 @@ class DashboardsApi: def update_dashboard_with_http_info( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - api_dashboard: Annotated[ApiDashboard, Field(description="Request body schema to update a dashboard.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -1772,15 +1761,15 @@ class DashboardsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiDashboard]: + ) -> ApiResponse[Dashboard]: """Update dashboard Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param api_dashboard: Request body schema to update a dashboard. (required) - :type api_dashboard: ApiDashboard + :param dashboard: Request body schema to update a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -1807,7 +1796,7 @@ class DashboardsApi: _param = self._update_dashboard_serialize( dashboard_id=dashboard_id, - api_dashboard=api_dashboard, + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1816,14 +1805,13 @@ class DashboardsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboard", - '400': "Error", + '200': "Dashboard", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1840,7 +1828,7 @@ class DashboardsApi: def update_dashboard_without_preload_content( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - api_dashboard: Annotated[ApiDashboard, Field(description="Request body schema to update a dashboard.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -1861,8 +1849,8 @@ class DashboardsApi: :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param api_dashboard: Request body schema to update a dashboard. (required) - :type api_dashboard: ApiDashboard + :param dashboard: Request body schema to update a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -1889,7 +1877,7 @@ class DashboardsApi: _param = self._update_dashboard_serialize( dashboard_id=dashboard_id, - api_dashboard=api_dashboard, + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1898,14 +1886,13 @@ class DashboardsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboard", - '400': "Error", + '200': "Dashboard", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1917,25 +1904,24 @@ class DashboardsApi: def _update_dashboard_serialize( self, dashboard_id, - api_dashboard, + dashboard, aid, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1949,8 +1935,8 @@ class DashboardsApi: # process the header parameters # process the form parameters # process the body parameter - if api_dashboard is not None: - _body_params = api_dashboard + if dashboard is not None: + _body_params = dashboard # set the HTTP header `Accept` diff --git a/dashboards/dashboards/api/dashboards_filters_api.py b/dashboards/dashboards/api/dashboards_filters_api.py new file mode 100644 index 00000000..beaadd8d --- /dev/null +++ b/dashboards/dashboards/api/dashboards_filters_api.py @@ -0,0 +1,1553 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from dashboards.models.api_context_filter_request import ApiContextFilterRequest +from dashboards.models.api_context_filter_response import ApiContextFilterResponse +from dashboards.models.api_context_filters_response import ApiContextFiltersResponse + +from dashboards.api_client import ApiClient, RequestSerialized +from dashboards.api_response import ApiResponse +from dashboards.rest import RESTResponseType + + +class DashboardsFiltersApi: + """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() + self.api_client = api_client + + + @validate_call + def create_dashboard_filter( + self, + api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Dashboard filter object to be created and saved")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: + """Create dashboard filter + + Creates a new dashboard filter in your account group. To create a filter, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + + :param api_context_filter_request: Dashboard filter object to be created and saved (required) + :type api_context_filter_request: ApiContextFilterRequest + :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_dashboard_filter_serialize( + api_context_filter_request=api_context_filter_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': "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, + ).data + + + @validate_call + def create_dashboard_filter_with_http_info( + self, + api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Dashboard filter object to be created and saved")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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]: + """Create dashboard filter + + Creates a new dashboard filter in your account group. To create a filter, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + + :param api_context_filter_request: Dashboard filter object to be created and saved (required) + :type api_context_filter_request: ApiContextFilterRequest + :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_dashboard_filter_serialize( + api_context_filter_request=api_context_filter_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': "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, + ) + + + @validate_call + def create_dashboard_filter_without_preload_content( + self, + api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Dashboard filter object to be created and saved")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 dashboard filter + + Creates a new dashboard filter in your account group. To create a filter, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + + :param api_context_filter_request: Dashboard filter object to be created and saved (required) + :type api_context_filter_request: ApiContextFilterRequest + :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_dashboard_filter_serialize( + api_context_filter_request=api_context_filter_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': "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 _create_dashboard_filter_serialize( + self, + api_context_filter_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 api_context_filter_request is not None: + _body_params = api_context_filter_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/dashboards/filters', + 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_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, + ) -> None: + """Delete dashboard filter + + Deletes a dashboard filter using the `filterId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboard filters they have created themselves. + + :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._delete_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]] = { + '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, + ).data + + + @validate_call + def delete_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[None]: + """Delete dashboard filter + + Deletes a dashboard filter using the `filterId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboard filters they have created themselves. + + :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._delete_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]] = { + '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, + ) + + + @validate_call + def delete_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: + """Delete dashboard filter + + Deletes a dashboard filter using the `filterId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboard filters they have created themselves. + + :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._delete_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]] = { + '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_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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + 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_all_dashboard_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, + _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, + ) -> ApiContextFiltersResponse: + """List dashboard filters + + Returns a list of dashboard filters and its context within your account group. + + :param search_pattern: Optional search pattern parameter to filter list of dashboard filters by either name or description values. + :type search_pattern: 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_all_dashboard_filters_serialize( + search_pattern=search_pattern, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiContextFiltersResponse", + '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, + ).data + + + @validate_call + def get_all_dashboard_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, + _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[ApiContextFiltersResponse]: + """List dashboard filters + + Returns a list of dashboard filters and its context within your account group. + + :param search_pattern: Optional search pattern parameter to filter list of dashboard filters by either name or description values. + :type search_pattern: 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_all_dashboard_filters_serialize( + search_pattern=search_pattern, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiContextFiltersResponse", + '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, + ) + + + @validate_call + def get_all_dashboard_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, + _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 filters + + Returns a list of dashboard filters and its context within your account group. + + :param search_pattern: Optional search pattern parameter to filter list of dashboard filters by either name or description values. + :type search_pattern: 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_all_dashboard_filters_serialize( + search_pattern=search_pattern, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiContextFiltersResponse", + '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_all_dashboard_filters_serialize( + self, + search_pattern, + 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 search_pattern is not None: + + _query_params.append(('searchPattern', search_pattern)) + + 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', + 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_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, + ).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, + ) + + + @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( + self, + id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], + api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Updated dashboard filter context object")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: + """Update dashboard filter + + Updates an existing dashboard filter in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboard filters they have created themselves. + + :param id: Unique dashboard filter ID. (required) + :type id: str + :param api_context_filter_request: Updated dashboard filter context object (required) + :type api_context_filter_request: ApiContextFilterRequest + :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_dashboard_filter_by_id_serialize( + id=id, + api_context_filter_request=api_context_filter_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': "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, + ).data + + + @validate_call + def update_dashboard_filter_by_id_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")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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]: + """Update dashboard filter + + Updates an existing dashboard filter in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboard filters they have created themselves. + + :param id: Unique dashboard filter ID. (required) + :type id: str + :param api_context_filter_request: Updated dashboard filter context object (required) + :type api_context_filter_request: ApiContextFilterRequest + :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_dashboard_filter_by_id_serialize( + id=id, + api_context_filter_request=api_context_filter_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': "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, + ) + + + @validate_call + def update_dashboard_filter_by_id_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")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 dashboard filter + + Updates an existing dashboard filter in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboard filters they have created themselves. + + :param id: Unique dashboard filter ID. (required) + :type id: str + :param api_context_filter_request: Updated dashboard filter context object (required) + :type api_context_filter_request: ApiContextFilterRequest + :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_dashboard_filter_by_id_serialize( + id=id, + api_context_filter_request=api_context_filter_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': "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 _update_dashboard_filter_by_id_serialize( + self, + id, + api_context_filter_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 api_context_filter_request is not None: + _body_params = api_context_filter_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='PUT', + 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 + ) + + diff --git a/dashboards/dashboards/api_client.py b/dashboards/dashboards/api_client.py new file mode 100644 index 00000000..4101886e --- /dev/null +++ b/dashboards/dashboards/api_client.py @@ -0,0 +1,770 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from dashboards.configuration import Configuration +from dashboards.api_response import ApiResponse, T as ApiResponseT +import dashboards.models +from dashboards import rest +from dashboards.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(dashboards.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/dashboards/dashboards/api_response.py b/dashboards/dashboards/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/dashboards/dashboards/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/dashboards/dashboards/configuration.py b/dashboards/dashboards/configuration.py new file mode 100644 index 00000000..ec0e75f6 --- /dev/null +++ b/dashboards/dashboards/configuration.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("dashboards") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/dashboards/dashboards/exceptions.py b/dashboards/dashboards/exceptions.py new file mode 100644 index 00000000..abdebc33 --- /dev/null +++ b/dashboards/dashboards/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/dashboards/dashboards/models/__init__.py b/dashboards/dashboards/models/__init__.py new file mode 100644 index 00000000..2c7a25c0 --- /dev/null +++ b/dashboards/dashboards/models/__init__.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +# flake8: noqa +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from dashboards.models.agent_status_datasource import AgentStatusDatasource +from dashboards.models.alert_list_alert_type import AlertListAlertType +from dashboards.models.alert_list_datasource import AlertListDatasource +from dashboards.models.api_agent_location import ApiAgentLocation +from dashboards.models.api_agent_status_agent import ApiAgentStatusAgent +from dashboards.models.api_agent_status_ip_info import ApiAgentStatusIpInfo +from dashboards.models.api_agent_status_summary import ApiAgentStatusSummary +from dashboards.models.api_agent_status_widget import ApiAgentStatusWidget +from dashboards.models.api_agent_widget_show import ApiAgentWidgetShow +from dashboards.models.api_agent_widget_type import ApiAgentWidgetType +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_alert_list_alert import ApiAlertListAlert +from dashboards.models.api_alert_list_widget import ApiAlertListWidget +from dashboards.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin +from dashboards.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget +from dashboards.models.api_color_grid_widget import ApiColorGridWidget +from dashboards.models.api_context_filter_request import ApiContextFilterRequest +from dashboards.models.api_context_filter_response import ApiContextFilterResponse +from dashboards.models.api_context_filters_response import ApiContextFiltersResponse +from dashboards.models.api_dashboard import ApiDashboard +from dashboards.models.api_dashboard_asw import ApiDashboardAsw +from dashboards.models.api_dashboard_filter_user_details import ApiDashboardFilterUserDetails +from dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from dashboards.models.api_data_point_group import ApiDataPointGroup +from dashboards.models.api_data_source_filter import ApiDataSourceFilter +from dashboards.models.api_data_source_filters import ApiDataSourceFilters +from dashboards.models.api_default_timespan import ApiDefaultTimespan +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_duration_unit import ApiDurationUnit +from dashboards.models.api_geo_map_widget import ApiGeoMapWidget +from dashboards.models.api_graphlet_point import ApiGraphletPoint +from dashboards.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget +from dashboards.models.api_multi_metric_column import ApiMultiMetricColumn +from dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData +from dashboards.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget +from dashboards.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey +from dashboards.models.api_numbers_card import ApiNumbersCard +from dashboards.models.api_numbers_card_data import ApiNumbersCardData +from dashboards.models.api_numbers_card_widget import ApiNumbersCardWidget +from dashboards.models.api_pie_chart_widget import ApiPieChartWidget +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry +from dashboards.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan +from dashboards.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget +from dashboards.models.api_stacked_barchart_widget import ApiStackedBarchartWidget +from dashboards.models.api_table_widget import ApiTableWidget +from dashboards.models.api_test_table_data import ApiTestTableData +from dashboards.models.api_test_table_graphlets_data import ApiTestTableGraphletsData +from dashboards.models.api_test_table_widget import ApiTestTableWidget +from dashboards.models.api_timeseries_widget import ApiTimeseriesWidget +from dashboards.models.api_widget import ApiWidget +from dashboards.models.api_widget_data_point import ApiWidgetDataPoint +from dashboards.models.api_widget_data_response import ApiWidgetDataResponse +from dashboards.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.api_widget_sort_direction import ApiWidgetSortDirection +from dashboards.models.api_widget_sort_property import ApiWidgetSortProperty +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from dashboards.models.app_and_self_links import AppAndSelfLinks +from dashboards.models.app_and_self_links_links import AppAndSelfLinksLinks +from dashboards.models.asw_repeat import AswRepeat +from dashboards.models.asw_repeat_unit import AswRepeatUnit +from dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource +from dashboards.models.color_grid_datasource import ColorGridDatasource +from dashboards.models.create_dashboard_snapshot201_response import CreateDashboardSnapshot201Response +from dashboards.models.dashboard import Dashboard +from dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId +from dashboards.models.dashboard_links import DashboardLinks +from dashboards.models.dashboard_links_links import DashboardLinksLinks +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.dashboard_order import DashboardOrder +from dashboards.models.dashboard_snapshot_id import DashboardSnapshotId +from dashboards.models.dashboard_snapshots200_response import DashboardSnapshots200Response +from dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage +from dashboards.models.default_timespan import DefaultTimespan +from dashboards.models.enterprise_agent_state import EnterpriseAgentState +from dashboards.models.error import Error +from dashboards.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest +from dashboards.models.geo_map_datasource import GeoMapDatasource +from dashboards.models.get_dashboard_data200_response import GetDashboardData200Response +from dashboards.models.grouped_bar_chart_datasource import GroupedBarChartDatasource +from dashboards.models.legacy_agent_widget_show import LegacyAgentWidgetShow +from dashboards.models.legacy_agent_widget_type import LegacyAgentWidgetType +from dashboards.models.legacy_alert_list_alert_type import LegacyAlertListAlertType +from dashboards.models.legacy_api_dashboard import LegacyApiDashboard +from dashboards.models.legacy_dashboard_snapshot import LegacyDashboardSnapshot +from dashboards.models.legacy_default_timespan import LegacyDefaultTimespan +from dashboards.models.legacy_duration_unit import LegacyDurationUnit +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.link import Link +from dashboards.models.metric_group import MetricGroup +from dashboards.models.multi_metrics_table_datasource import MultiMetricsTableDatasource +from dashboards.models.numbers_card_datasource import NumbersCardDatasource +from dashboards.models.pagination_links import PaginationLinks +from dashboards.models.pagination_links_links import PaginationLinksLinks +from dashboards.models.pie_chart_datasource import PieChartDatasource +from dashboards.models.query_window import QueryWindow +from dashboards.models.scalable_widget import ScalableWidget +from dashboards.models.self_links import SelfLinks +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response +from dashboards.models.stacked_area_chart_datasource import StackedAreaChartDatasource +from dashboards.models.stacked_bar_chart_datasource import StackedBarChartDatasource +from dashboards.models.table_datasource import TableDatasource +from dashboards.models.test_table_datasource import TestTableDatasource +from dashboards.models.test_table_filter_key import TestTableFilterKey +from dashboards.models.test_table_filter_type import TestTableFilterType +from dashboards.models.timeseries_datasource import TimeseriesDatasource +from dashboards.models.unauthorized_error import UnauthorizedError +from dashboards.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest +from dashboards.models.validation_error import ValidationError +from dashboards.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from dashboards.models.visual_mode import VisualMode +from dashboards.models.widget import Widget +from dashboards.models.widget_measure_type import WidgetMeasureType +from dashboards.models.widget_type import WidgetType diff --git a/dashboards_api/dashboards_api/models/agent_status_datasource.py b/dashboards/dashboards/models/agent_status_datasource.py similarity index 83% rename from dashboards_api/dashboards_api/models/agent_status_datasource.py rename to dashboards/dashboards/models/agent_status_datasource.py index 8a00ca44..f027d89a 100644 --- a/dashboards_api/dashboards_api/models/agent_status_datasource.py +++ b/dashboards/dashboards/models/agent_status_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AgentStatusDatasource(str, Enum): @@ -37,6 +29,7 @@ class AgentStatusDatasource(str, Enum): ALERTS = 'ALERTS' DEVICES = 'DEVICES' DNSP = 'DNSP' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' diff --git a/dashboards/dashboards/models/alert_list_alert_type.py b/dashboards/dashboards/models/alert_list_alert_type.py new file mode 100644 index 00000000..fc034df4 --- /dev/null +++ b/dashboards/dashboards/models/alert_list_alert_type.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 AlertListAlertType(str, Enum): + """ + Name of the alert type + """ + + """ + allowed enum values + """ + NETWORK_MINUS_END_MINUS_TO_MINUS_END_MINUS_SERVER = 'network-end-to-end-server' + NETWORK_MINUS_END_MINUS_TO_MINUS_END_MINUS_AGENT = 'network-end-to-end-agent' + NETWORK_MINUS_PATH_MINUS_TRACE = 'network-path-trace' + DNS_MINUS_SERVER = 'dns-server' + DNS_MINUS_TRACE = 'dns-trace' + DNSSEC = 'dnssec' + DNS_MINUS_PLUS_MINUS_DOMAIN = 'dns-plus-domain' + DNS_MINUS_PLUS_MINUS_SERVER = 'dns-plus-server' + WEB_MINUS_HTTP_MINUS_SERVER = 'web-http-server' + WEB_MINUS_PAGE_MINUS_LOAD = 'web-page-load' + WEB_MINUS_TRANSACTION_MINUS_CLASSIC = 'web-transaction-classic' + WEB_MINUS_TRANSACTION = 'web-transaction' + WEB_MINUS_FTP_MINUS_SERVER = 'web-ftp-server' + VOICE_MINUS_SIP_MINUS_SERVER = 'voice-sip-server' + VOICE_MINUS_RTP_MINUS_STREAM = 'voice-rtp-stream' + DEVICE = 'device' + DEVICE_MINUS_INTERFACE = 'device-interface' + ENDPOINT_MINUS_END_MINUS_TO_MINUS_END_MINUS_SERVER = 'endpoint-end-to-end-server' + ENDPOINT_MINUS_WEB_MINUS_HTTP_MINUS_SERVER = 'endpoint-web-http-server' + ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' + BROWSER_MINUS_SESSION_MINUS_AGENT = 'browser-session-agent' + BROWSER_MINUS_SESSION_MINUS_APPLICATION = 'browser-session-application' + ROUTING_MINUS_BGP = 'routing-bgp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertListAlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards_api/dashboards_api/models/alert_list_datasource.py b/dashboards/dashboards/models/alert_list_datasource.py similarity index 83% rename from dashboards_api/dashboards_api/models/alert_list_datasource.py rename to dashboards/dashboards/models/alert_list_datasource.py index 15c8960c..3f6c3aa7 100644 --- a/dashboards_api/dashboards_api/models/alert_list_datasource.py +++ b/dashboards/dashboards/models/alert_list_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AlertListDatasource(str, Enum): @@ -37,6 +29,7 @@ class AlertListDatasource(str, Enum): ALERTS = 'ALERTS' DEVICES = 'DEVICES' DNSP = 'DNSP' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' diff --git a/dashboards_api/dashboards_api/models/api_agent_location.py b/dashboards/dashboards/models/api_agent_location.py similarity index 79% rename from dashboards_api/dashboards_api/models/api_agent_location.py rename to dashboards/dashboards/models/api_agent_location.py index f4aa778a..a8d98642 100644 --- a/dashboards_api/dashboards_api/models/api_agent_location.py +++ b/dashboards/dashboards/models/api_agent_location.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiAgentLocation(BaseModel): """ @@ -35,10 +31,11 @@ class ApiAgentLocation(BaseModel): location_name: Optional[StrictStr] = Field(default=None, description="Name of the agent location.", alias="locationName") __properties: ClassVar[List[str]] = ["latitude", "longitude", "locationName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class ApiAgentLocation(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiAgentLocation from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class ApiAgentLocation(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiAgentLocation from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_agent_status_agent.py b/dashboards/dashboards/models/api_agent_status_agent.py new file mode 100644 index 00000000..4da711e3 --- /dev/null +++ b/dashboards/dashboards/models/api_agent_status_agent.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_agent_location import ApiAgentLocation +from dashboards.models.api_agent_status_ip_info import ApiAgentStatusIpInfo +from dashboards.models.enterprise_agent_state import EnterpriseAgentState +from typing import Optional, Set +from typing_extensions import Self + +class ApiAgentStatusAgent(BaseModel): + """ + Agent shown in agent status widget. + """ # noqa: E501 + agent_id: Optional[StrictStr] = Field(default=None, description="Identifier of the agent.", alias="agentId") + status: Optional[EnterpriseAgentState] = None + ip_info: Optional[ApiAgentStatusIpInfo] = Field(default=None, alias="ipInfo") + agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent", alias="agentName") + location: Optional[ApiAgentLocation] = None + __properties: ClassVar[List[str]] = ["agentId", "status", "ipInfo", "agentName", "location"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAgentStatusAgent 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 ip_info + if self.ip_info: + _dict['ipInfo'] = self.ip_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of location + if self.location: + _dict['location'] = self.location.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAgentStatusAgent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentId": obj.get("agentId"), + "status": obj.get("status"), + "ipInfo": ApiAgentStatusIpInfo.from_dict(obj["ipInfo"]) if obj.get("ipInfo") is not None else None, + "agentName": obj.get("agentName"), + "location": ApiAgentLocation.from_dict(obj["location"]) if obj.get("location") is not None else None + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_agent_status_ip_info.py b/dashboards/dashboards/models/api_agent_status_ip_info.py similarity index 81% rename from dashboards_api/dashboards_api/models/api_agent_status_ip_info.py rename to dashboards/dashboards/models/api_agent_status_ip_info.py index 10cdef11..4cf8da87 100644 --- a/dashboards_api/dashboards_api/models/api_agent_status_ip_info.py +++ b/dashboards/dashboards/models/api_agent_status_ip_info.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiAgentStatusIpInfo(BaseModel): """ @@ -36,10 +32,11 @@ class ApiAgentStatusIpInfo(BaseModel): operative_system_version: Optional[StrictStr] = Field(default=None, alias="operativeSystemVersion") __properties: ClassVar[List[str]] = ["publicIp", "privateIp", "ipv6", "operativeSystemVersion"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class ApiAgentStatusIpInfo(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiAgentStatusIpInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,16 +63,18 @@ class ApiAgentStatusIpInfo(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiAgentStatusIpInfo from a dict""" if obj is None: return None diff --git a/dashboards_api/dashboards_api/models/api_agent_status_summary.py b/dashboards/dashboards/models/api_agent_status_summary.py similarity index 80% rename from dashboards_api/dashboards_api/models/api_agent_status_summary.py rename to dashboards/dashboards/models/api_agent_status_summary.py index 2f111b9c..81b83e72 100644 --- a/dashboards_api/dashboards_api/models/api_agent_status_summary.py +++ b/dashboards/dashboards/models/api_agent_status_summary.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiAgentStatusSummary(BaseModel): """ @@ -35,10 +31,11 @@ class ApiAgentStatusSummary(BaseModel): disabled: Optional[StrictInt] = Field(default=None, description="Shows the number of agents with disabled status.") __properties: ClassVar[List[str]] = ["online", "offline", "disabled"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class ApiAgentStatusSummary(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiAgentStatusSummary from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class ApiAgentStatusSummary(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiAgentStatusSummary from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_agent_status_widget.py b/dashboards/dashboards/models/api_agent_status_widget.py new file mode 100644 index 00000000..c19732de --- /dev/null +++ b/dashboards/dashboards/models/api_agent_status_widget.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.agent_status_datasource import AgentStatusDatasource +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.legacy_agent_widget_show import LegacyAgentWidgetShow +from dashboards.models.legacy_agent_widget_type import LegacyAgentWidgetType +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiAgentStatusWidget(BaseModel): + """ + ApiAgentStatusWidget + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Agent Status widget type.") + agents: Optional[LegacyAgentWidgetType] = None + show: Optional[LegacyAgentWidgetShow] = None + data_source: Optional[AgentStatusDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "agents", "show", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Agent Status$", value): + raise ValueError(r"must validate the regular expression /^Agent Status$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAgentStatusWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiAgentStatusWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "agents": obj.get("agents"), + "show": obj.get("show"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_agent_widget_show.py b/dashboards/dashboards/models/api_agent_widget_show.py new file mode 100644 index 00000000..2dbd31d7 --- /dev/null +++ b/dashboards/dashboards/models/api_agent_widget_show.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ApiAgentWidgetShow(str, Enum): + """ + Ownership of the agent. + """ + + """ + allowed enum values + """ + OWNED = 'owned' + ALL = 'all' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ApiAgentWidgetShow from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/api_agent_widget_type.py b/dashboards/dashboards/models/api_agent_widget_type.py new file mode 100644 index 00000000..87233bb0 --- /dev/null +++ b/dashboards/dashboards/models/api_agent_widget_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ApiAgentWidgetType(str, Enum): + """ + Type of the agent. + """ + + """ + allowed enum values + """ + ENTERPRISE = 'enterprise' + ENDPOINT = 'endpoint' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ApiAgentWidgetType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards_api/dashboards_api/models/api_aggregate_property.py b/dashboards/dashboards/models/api_aggregate_property.py similarity index 94% rename from dashboards_api/dashboards_api/models/api_aggregate_property.py rename to dashboards/dashboards/models/api_aggregate_property.py index 23f9bcb2..c3c669c3 100644 --- a/dashboards_api/dashboards_api/models/api_aggregate_property.py +++ b/dashboards/dashboards/models/api_aggregate_property.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ApiAggregateProperty(str, Enum): diff --git a/dashboards_api/dashboards_api/models/api_alert_list_alert.py b/dashboards/dashboards/models/api_alert_list_alert.py similarity index 82% rename from dashboards_api/dashboards_api/models/api_alert_list_alert.py rename to dashboards/dashboards/models/api_alert_list_alert.py index e4e2a2f2..8c8cda03 100644 --- a/dashboards_api/dashboards_api/models/api_alert_list_alert.py +++ b/dashboards/dashboards/models/api_alert_list_alert.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_alert_list_alert_type import ApiAlertListAlertType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.alert_list_alert_type import AlertListAlertType +from typing import Optional, Set +from typing_extensions import Self class ApiAlertListAlert(BaseModel): """ @@ -36,16 +33,17 @@ class ApiAlertListAlert(BaseModel): rule_id: Optional[StrictStr] = Field(default=None, description="Identifier of the rule.", alias="ruleId") alert_source: Optional[StrictStr] = Field(default=None, description="Name of the agent, monitor or device producing the alert.", alias="alertSource") alert_rule: Optional[StrictStr] = Field(default=None, description="Name of the alert rule that this alert belongs to.", alias="alertRule") - alert_type: Optional[ApiAlertListAlertType] = Field(default=None, alias="alertType") + alert_type: Optional[AlertListAlertType] = Field(default=None, alias="alertType") start_time: Optional[datetime] = Field(default=None, description="UTC date when the alert was first active.", alias="startTime") duration_in_seconds: Optional[StrictInt] = Field(default=None, description="Number of seconds the alert was active. If it’s still active, this number will increase every second.", alias="durationInSeconds") active: Optional[StrictBool] = Field(default=None, description="Set to `true` if alert is active, `false` otherwise.") __properties: ClassVar[List[str]] = ["alertId", "testId", "ruleId", "alertSource", "alertRule", "alertType", "startTime", "durationInSeconds", "active"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ class ApiAlertListAlert(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiAlertListAlert from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +70,18 @@ class ApiAlertListAlert(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiAlertListAlert from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_alert_list_widget.py b/dashboards/dashboards/models/api_alert_list_widget.py new file mode 100644 index 00000000..1f0ff168 --- /dev/null +++ b/dashboards/dashboards/models/api_alert_list_widget.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.alert_list_datasource import AlertListDatasource +from dashboards.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.legacy_alert_list_alert_type import LegacyAlertListAlertType +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiAlertListWidget(BaseModel): + """ + ApiAlertListWidget + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Alert List widget type.") + alert_types: Optional[List[LegacyAlertListAlertType]] = Field(default=None, description="List of alert types configured in the widget, an empty list means all alert types.", alias="alertTypes") + limit_to: Optional[StrictInt] = Field(default=None, description="Limit the number of alerts displayed in the widget.", alias="limitTo") + active_within: Optional[ApiAlertListWidgetAllOfActiveWithin] = Field(default=None, alias="activeWithin") + data_source: Optional[AlertListDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "alertTypes", "limitTo", "activeWithin", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Alert List$", value): + raise ValueError(r"must validate the regular expression /^Alert List$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAlertListWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 active_within + if self.active_within: + _dict['activeWithin'] = self.active_within.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiAlertListWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "alertTypes": obj.get("alertTypes"), + "limitTo": obj.get("limitTo"), + "activeWithin": ApiAlertListWidgetAllOfActiveWithin.from_dict(obj["activeWithin"]) if obj.get("activeWithin") is not None else None, + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_alert_list_widget_all_of_active_within.py b/dashboards/dashboards/models/api_alert_list_widget_all_of_active_within.py similarity index 75% rename from dashboards_api/dashboards_api/models/api_alert_list_widget_all_of_active_within.py rename to dashboards/dashboards/models/api_alert_list_widget_all_of_active_within.py index e9beed2c..e2db6099 100644 --- a/dashboards_api/dashboards_api/models/api_alert_list_widget_all_of_active_within.py +++ b/dashboards/dashboards/models/api_alert_list_widget_all_of_active_within.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,28 +17,25 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from dashboards_api.models.duration_unit import DurationUnit -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.legacy_duration_unit import LegacyDurationUnit +from typing import Optional, Set +from typing_extensions import Self class ApiAlertListWidgetAllOfActiveWithin(BaseModel): """ ApiAlertListWidgetAllOfActiveWithin """ # noqa: E501 value: Optional[StrictInt] = Field(default=None, description="Timespan value.") - unit: Optional[DurationUnit] = None + unit: Optional[LegacyDurationUnit] = None __properties: ClassVar[List[str]] = ["value", "unit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class ApiAlertListWidgetAllOfActiveWithin(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiAlertListWidgetAllOfActiveWithin from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class ApiAlertListWidgetAllOfActiveWithin(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiAlertListWidgetAllOfActiveWithin from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_box_and_whiskers_widget.py b/dashboards/dashboards/models/api_box_and_whiskers_widget.py new file mode 100644 index 00000000..fcc37b7b --- /dev/null +++ b/dashboards/dashboards/models/api_box_and_whiskers_widget.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiBoxAndWhiskersWidget(BaseModel): + """ + A widget that displays a box and whisker plot, mapping data points over time with key statistics: median, range, and quartiles. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") + max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") + unit: Optional[ApiWidgetFixedYScalePrefix] = None + type: Annotated[str, Field(strict=True)] = Field(description="Box and Whiskers widget type.") + group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") + data_source: Optional[BoxAndWhiskersDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "type", "groupBy", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Box and Whiskers$", value): + raise ValueError(r"must validate the regular expression /^Box and Whiskers$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiBoxAndWhiskersWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiBoxAndWhiskersWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "minScale": obj.get("minScale"), + "maxScale": obj.get("maxScale"), + "unit": obj.get("unit"), + "type": obj.get("type"), + "groupBy": obj.get("groupBy"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_color_grid_widget.py b/dashboards/dashboards/models/api_color_grid_widget.py new file mode 100644 index 00000000..d6934e87 --- /dev/null +++ b/dashboards/dashboards/models/api_color_grid_widget.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.color_grid_datasource import ColorGridDatasource +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiColorGridWidget(BaseModel): + """ + The Color Grid widget displays colored cards arranged in rows and columns. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") + max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") + unit: Optional[ApiWidgetFixedYScalePrefix] = None + type: Annotated[str, Field(strict=True)] = Field(description="Color Grid widget type.") + cards: Optional[ApiAggregateProperty] = None + group_cards_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupCardsBy") + columns: Optional[StrictInt] = Field(default=None, description="Number of columns: 1 or 2.") + limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") + sort_by: Optional[LegacyWidgetSortProperty] = Field(default=None, alias="sortBy") + sort_direction: Optional[LegacyWidgetSortDirection] = Field(default=None, alias="sortDirection") + data_source: Optional[ColorGridDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "type", "cards", "groupCardsBy", "columns", "limit", "sortBy", "sortDirection", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Color Grid$", value): + raise ValueError(r"must validate the regular expression /^Color Grid$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiColorGridWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiColorGridWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "minScale": obj.get("minScale"), + "maxScale": obj.get("maxScale"), + "unit": obj.get("unit"), + "type": obj.get("type"), + "cards": obj.get("cards"), + "groupCardsBy": obj.get("groupCardsBy"), + "columns": obj.get("columns"), + "limit": obj.get("limit"), + "sortBy": obj.get("sortBy"), + "sortDirection": obj.get("sortDirection"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_context_filter_request.py b/dashboards/dashboards/models/api_context_filter_request.py new file mode 100644 index 00000000..ad150d3b --- /dev/null +++ b/dashboards/dashboards/models/api_context_filter_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_data_source_filters import ApiDataSourceFilters +from typing import Optional, Set +from typing_extensions import Self + +class ApiContextFilterRequest(BaseModel): + """ + Request containing dashboard filter name, description and context details. + """ # noqa: E501 + context: List[ApiDataSourceFilters] = Field(description="List of filters to be applied to a dashboard.") + name: StrictStr = Field(description="The name of the dashboard filter, this must be unique.") + description: Optional[StrictStr] = Field(default=None, description="An optional description of the filter.") + __properties: ClassVar[List[str]] = ["context", "name", "description"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiContextFilterRequest 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 context (list) + _items = [] + if self.context: + for _item in self.context: + if _item: + _items.append(_item.to_dict()) + _dict['context'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiContextFilterRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "context": [ApiDataSourceFilters.from_dict(_item) for _item in obj["context"]] if obj.get("context") is not None else None, + "name": obj.get("name"), + "description": obj.get("description") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_context_filter_response.py b/dashboards/dashboards/models/api_context_filter_response.py new file mode 100644 index 00000000..d1b90914 --- /dev/null +++ b/dashboards/dashboards/models/api_context_filter_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_dashboard_filter_user_details import ApiDashboardFilterUserDetails +from dashboards.models.api_data_source_filters import ApiDataSourceFilters +from dashboards.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiContextFilterResponse(BaseModel): + """ + Response containing dashboard filter settings and context details. + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + context: List[ApiDataSourceFilters] = Field(description="List of filters to be applied to a dashboard.") + aid: StrictStr = Field(description="Account group ID of the filter.") + id: StrictStr = Field(description="Unique ID of the dashboard filter.") + name: StrictStr = Field(description="The name of the dashboard filter, this must be unique.") + description: Optional[StrictStr] = Field(default=None, description="An optional description of the filter.") + created_by: Optional[ApiDashboardFilterUserDetails] = Field(default=None, alias="createdBy") + modified_date: Optional[datetime] = Field(default=None, description="Timestamp when the filter was last modified.", alias="modifiedDate") + created_date: Optional[datetime] = Field(default=None, description="Timestamp when the filter was created.", alias="createdDate") + modified_by: Optional[ApiDashboardFilterUserDetails] = Field(default=None, alias="modifiedBy") + __properties: ClassVar[List[str]] = ["_links", "context", "aid", "id", "name", "description", "createdBy", "modifiedDate", "createdDate", "modifiedBy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiContextFilterResponse 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 links + if self.links: + _dict['_links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in context (list) + _items = [] + if self.context: + for _item in self.context: + if _item: + _items.append(_item.to_dict()) + _dict['context'] = _items + # override the default output from pydantic by calling `to_dict()` of created_by + if self.created_by: + _dict['createdBy'] = self.created_by.to_dict() + # override the default output from pydantic by calling `to_dict()` of modified_by + if self.modified_by: + _dict['modifiedBy'] = self.modified_by.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiContextFilterResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "context": [ApiDataSourceFilters.from_dict(_item) for _item in obj["context"]] if obj.get("context") is not None else None, + "aid": obj.get("aid"), + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "createdBy": ApiDashboardFilterUserDetails.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None, + "modifiedDate": obj.get("modifiedDate"), + "createdDate": obj.get("createdDate"), + "modifiedBy": ApiDashboardFilterUserDetails.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_context_filters_response.py b/dashboards/dashboards/models/api_context_filters_response.py new file mode 100644 index 00000000..10e4db10 --- /dev/null +++ b/dashboards/dashboards/models/api_context_filters_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_context_filter_response import ApiContextFilterResponse +from typing import Optional, Set +from typing_extensions import Self + +class ApiContextFiltersResponse(BaseModel): + """ + All global dashboard filters saved. + """ # noqa: E501 + dashboard_filters: Optional[List[ApiContextFilterResponse]] = Field(default=None, alias="dashboardFilters") + __properties: ClassVar[List[str]] = ["dashboardFilters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiContextFiltersResponse 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 dashboard_filters (list) + _items = [] + if self.dashboard_filters: + for _item in self.dashboard_filters: + if _item: + _items.append(_item.to_dict()) + _dict['dashboardFilters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiContextFiltersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dashboardFilters": [ApiContextFilterResponse.from_dict(_item) for _item in obj["dashboardFilters"]] if obj.get("dashboardFilters") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_dashboard.py b/dashboards/dashboards/models/api_dashboard.py new file mode 100644 index 00000000..4981c835 --- /dev/null +++ b/dashboards/dashboards/models/api_dashboard.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_widget import ApiWidget +from dashboards.models.dashboard_links_links import DashboardLinksLinks +from dashboards.models.default_timespan import DefaultTimespan +from typing import Optional, Set +from typing_extensions import Self + +class ApiDashboard(BaseModel): + """ + Dashboard upon which this dashboard snapshot is based upon. + """ # noqa: E501 + global_filter_id: Optional[StrictStr] = Field(default=None, description="Default global dashboard filter ID (obtained from `/dashboards/filters` endpoint).", alias="globalFilterId") + account_id: Optional[StrictInt] = Field(default=None, description="Identifier for the account group associated with a dashboard.", alias="accountId") + created_by: Optional[StrictInt] = Field(default=None, description="Identifier for the user that created a dashboard.", alias="createdBy") + modified_by: Optional[StrictInt] = Field(default=None, description="Identifier for the user that last modified a dashboard.", alias="modifiedBy") + modified_date: Optional[StrictStr] = Field(default=None, description="UTC date/time when a dashboard was last modified.", alias="modifiedDate") + global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="globalOverride") + migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="migratedReport") + api_link: Optional[List[Dict[str, Any]]] = Field(default=None, description="A links array containing the self and the snapshots links.", alias="apiLink") + links: Optional[DashboardLinksLinks] = Field(default=None, alias="_links") + dashboard_id: Optional[StrictStr] = Field(default=None, description="Identifier of a dashboard.", alias="dashboardId") + title: Optional[StrictStr] = Field(default=None, description="Title of a dashboard.") + is_built_in: Optional[StrictBool] = Field(default=None, description="Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards.", alias="isBuiltIn") + aid: Optional[StrictStr] = Field(default=None, description="Identifier for the account group associated with a dashboard.") + dashboard_created_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that created a dashboard.", alias="dashboardCreatedBy") + dashboard_modified_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that last modified a dashboard.", alias="dashboardModifiedBy") + dashboard_modified_date: Optional[datetime] = Field(default=None, description="UTC date/time when a dashboard was last modified (ISO date-time format).", alias="dashboardModifiedDate") + is_private: Optional[StrictBool] = Field(default=None, description="A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it.", alias="isPrivate") + is_default_for_user: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the user's default. True for default, false if not.", alias="isDefaultForUser") + is_default_for_account: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the account group's default. True for default, false if not.", alias="isDefaultForAccount") + widgets: Optional[List[ApiWidget]] = None + description: Optional[StrictStr] = Field(default=None, description="A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard.") + default_timespan: Optional[DefaultTimespan] = Field(default=None, alias="defaultTimespan") + is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride") + is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport") + __properties: ClassVar[List[str]] = ["globalFilterId", "accountId", "createdBy", "modifiedBy", "modifiedDate", "globalOverride", "migratedReport", "apiLink", "_links", "dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDashboard 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. + """ + excluded_fields: Set[str] = set([ + "account_id", + "created_by", + "modified_by", + "modified_date", + "migrated_report", + "dashboard_id", + "is_built_in", + "aid", + "dashboard_created_by", + "dashboard_modified_by", + "dashboard_modified_date", + "is_default_for_user", + "is_default_for_account", + "is_migrated_report", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 widgets (list) + _items = [] + if self.widgets: + for _item in self.widgets: + if _item: + _items.append(_item.to_dict()) + _dict['widgets'] = _items + # override the default output from pydantic by calling `to_dict()` of default_timespan + if self.default_timespan: + _dict['defaultTimespan'] = self.default_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiDashboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "globalFilterId": obj.get("globalFilterId"), + "accountId": obj.get("accountId"), + "createdBy": obj.get("createdBy"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "globalOverride": obj.get("globalOverride"), + "migratedReport": obj.get("migratedReport"), + "apiLink": obj.get("apiLink"), + "_links": DashboardLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "dashboardId": obj.get("dashboardId"), + "title": obj.get("title"), + "isBuiltIn": obj.get("isBuiltIn"), + "aid": obj.get("aid"), + "dashboardCreatedBy": obj.get("dashboardCreatedBy"), + "dashboardModifiedBy": obj.get("dashboardModifiedBy"), + "dashboardModifiedDate": obj.get("dashboardModifiedDate"), + "isPrivate": obj.get("isPrivate"), + "isDefaultForUser": obj.get("isDefaultForUser"), + "isDefaultForAccount": obj.get("isDefaultForAccount"), + "widgets": [ApiWidget.from_dict(_item) for _item in obj["widgets"]] if obj.get("widgets") is not None else None, + "description": obj.get("description"), + "defaultTimespan": DefaultTimespan.from_dict(obj["defaultTimespan"]) if obj.get("defaultTimespan") is not None else None, + "isGlobalOverride": obj.get("isGlobalOverride"), + "isMigratedReport": obj.get("isMigratedReport") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_dashboard_asw.py b/dashboards/dashboards/models/api_dashboard_asw.py similarity index 81% rename from dashboards_api/dashboards_api/models/api_dashboard_asw.py rename to dashboards/dashboards/models/api_dashboard_asw.py index 34b2a410..4d13bc13 100644 --- a/dashboards_api/dashboards_api/models/api_dashboard_asw.py +++ b/dashboards/dashboards/models/api_dashboard_asw.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.asw_repeat import AswRepeat -from dashboards_api.models.asw_repeat_unit import AswRepeatUnit -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.asw_repeat import AswRepeat +from dashboards.models.asw_repeat_unit import AswRepeatUnit +from typing import Optional, Set +from typing_extensions import Self class ApiDashboardAsw(BaseModel): """ @@ -42,10 +39,11 @@ class ApiDashboardAsw(BaseModel): repeat_unit: Optional[AswRepeatUnit] = Field(default=None, alias="repeatUnit") __properties: ClassVar[List[str]] = ["id", "name", "testIds", "startTimes", "durationInSeconds", "repeat", "repeatEvery", "repeatUnit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ class ApiDashboardAsw(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiDashboardAsw from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +70,18 @@ class ApiDashboardAsw(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiDashboardAsw from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_dashboard_filter_user_details.py b/dashboards/dashboards/models/api_dashboard_filter_user_details.py new file mode 100644 index 00000000..c383984c --- /dev/null +++ b/dashboards/dashboards/models/api_dashboard_filter_user_details.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ApiDashboardFilterUserDetails(BaseModel): + """ + Details of user who created or modified the filter. + """ # noqa: E501 + uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.") + name: Optional[StrictStr] = Field(default=None, description="Name of the user.") + __properties: ClassVar[List[str]] = ["uid", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDashboardFilterUserDetails 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 ApiDashboardFilterUserDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "uid": obj.get("uid"), + "name": obj.get("name") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_dashboard_snapshot.py b/dashboards/dashboards/models/api_dashboard_snapshot.py new file mode 100644 index 00000000..f1968441 --- /dev/null +++ b/dashboards/dashboards/models/api_dashboard_snapshot.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_dashboard import ApiDashboard +from dashboards.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan +from dashboards.models.api_widget import ApiWidget +from dashboards.models.app_and_self_links_links import AppAndSelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiDashboardSnapshot(BaseModel): + """ + ApiDashboardSnapshot + """ # noqa: E501 + snapshot_id: Optional[StrictStr] = Field(default=None, description="Identifier of the dashboard snapshot.", alias="snapshotId") + account_id: Optional[StrictInt] = Field(default=None, description="Identifier of the account group that the snapshot belongs to.", alias="accountId") + created_date: Optional[StrictStr] = Field(default=None, description="UTC date when dashboard snapshot was created.", alias="createdDate") + expiration_date: Optional[StrictStr] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date.", alias="expirationDate") + permalink: Optional[StrictStr] = Field(default=None, description="Hyperlink to dashboard snapshot in ThousandEyes Application") + api_links: Optional[List[Dict[str, Any]]] = Field(default=None, description="A links array containing the self link.", alias="apiLinks") + links: Optional[AppAndSelfLinksLinks] = Field(default=None, alias="_links") + snapshot_name: Optional[StrictStr] = Field(default=None, description="Name of the dashboard snapshot.", alias="snapshotName") + aid: Optional[StrictStr] = Field(default=None, description="Identifier of the account group that the snapshot belongs to.") + is_shared: Optional[StrictBool] = Field(default=None, description="Set `true` if dashboard snapshot is shared, `false` otherwise.", alias="isShared") + snapshot_created_date: Optional[datetime] = Field(default=None, description="UTC date when dashboard snapshot was created (ISO date-time format).", alias="snapshotCreatedDate") + dashboard: Optional[ApiDashboard] = None + widgets: Optional[List[ApiWidget]] = None + is_scheduled: Optional[StrictBool] = Field(default=None, description="Set `true` if dashboard snapshot was generated from a schedule, `false` otherwise.", alias="isScheduled") + time_span: Optional[ApiReportSnapshotTimeSpan] = Field(default=None, alias="timeSpan") + snapshot_expiration_date: Optional[datetime] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format.", alias="snapshotExpirationDate") + __properties: ClassVar[List[str]] = ["snapshotId", "accountId", "createdDate", "expirationDate", "permalink", "apiLinks", "_links", "snapshotName", "aid", "isShared", "snapshotCreatedDate", "dashboard", "widgets", "isScheduled", "timeSpan", "snapshotExpirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDashboardSnapshot 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 links + if self.links: + _dict['_links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of dashboard + if self.dashboard: + _dict['dashboard'] = self.dashboard.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in widgets (list) + _items = [] + if self.widgets: + for _item in self.widgets: + if _item: + _items.append(_item.to_dict()) + _dict['widgets'] = _items + # override the default output from pydantic by calling `to_dict()` of time_span + if self.time_span: + _dict['timeSpan'] = self.time_span.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiDashboardSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshotId": obj.get("snapshotId"), + "accountId": obj.get("accountId"), + "createdDate": obj.get("createdDate"), + "expirationDate": obj.get("expirationDate"), + "permalink": obj.get("permalink"), + "apiLinks": obj.get("apiLinks"), + "_links": AppAndSelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "snapshotName": obj.get("snapshotName"), + "aid": obj.get("aid"), + "isShared": obj.get("isShared"), + "snapshotCreatedDate": obj.get("snapshotCreatedDate"), + "dashboard": ApiDashboard.from_dict(obj["dashboard"]) if obj.get("dashboard") is not None else None, + "widgets": [ApiWidget.from_dict(_item) for _item in obj["widgets"]] if obj.get("widgets") is not None else None, + "isScheduled": obj.get("isScheduled"), + "timeSpan": ApiReportSnapshotTimeSpan.from_dict(obj["timeSpan"]) if obj.get("timeSpan") is not None else None, + "snapshotExpirationDate": obj.get("snapshotExpirationDate") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_data_point_group.py b/dashboards/dashboards/models/api_data_point_group.py similarity index 79% rename from dashboards_api/dashboards_api/models/api_data_point_group.py rename to dashboards/dashboards/models/api_data_point_group.py index 21d806d1..ea5ece72 100644 --- a/dashboards_api/dashboards_api/models/api_data_point_group.py +++ b/dashboards/dashboards/models/api_data_point_group.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiDataPointGroup(BaseModel): """ @@ -34,10 +30,11 @@ class ApiDataPointGroup(BaseModel): group_value: Optional[StrictStr] = Field(default=None, description="The value of a group.", alias="groupValue") __properties: ClassVar[List[str]] = ["groupProperty", "groupValue"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class ApiDataPointGroup(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiDataPointGroup from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class ApiDataPointGroup(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiDataPointGroup from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_data_source_filter.py b/dashboards/dashboards/models/api_data_source_filter.py new file mode 100644 index 00000000..ee6f89b8 --- /dev/null +++ b/dashboards/dashboards/models/api_data_source_filter.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class ApiDataSourceFilter(BaseModel): + """ + List of different filter properties for a single datasource. + """ # noqa: E501 + filter_id: StrictStr = Field(description="Data source property to filter by.", alias="filterId") + values: List[StrictStr] = Field(description="Values to filter by based on the specified `filterId`.") + metric_ids: List[StrictStr] = Field(description="Dashboard metric associated with the filter property.", alias="metricIds") + __properties: ClassVar[List[str]] = ["filterId", "values", "metricIds"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDataSourceFilter 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 ApiDataSourceFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filterId": obj.get("filterId"), + "values": obj.get("values"), + "metricIds": obj.get("metricIds") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_data_source_filters.py b/dashboards/dashboards/models/api_data_source_filters.py new file mode 100644 index 00000000..5abd5d14 --- /dev/null +++ b/dashboards/dashboards/models/api_data_source_filters.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 +from dashboards.models.api_data_source_filter import ApiDataSourceFilter +from typing import Optional, Set +from typing_extensions import Self + +class ApiDataSourceFilters(BaseModel): + """ + List of different datasource filters. + """ # noqa: E501 + data_source_id: StrictStr = Field(description="Types of data source.", alias="dataSourceId") + filters: List[ApiDataSourceFilter] = Field(description="List of different filter properties.") + __properties: ClassVar[List[str]] = ["dataSourceId", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDataSourceFilters 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 filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiDataSourceFilters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dataSourceId": obj.get("dataSourceId"), + "filters": [ApiDataSourceFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_default_timespan.py b/dashboards/dashboards/models/api_default_timespan.py similarity index 80% rename from dashboards_api/dashboards_api/models/api_default_timespan.py rename to dashboards/dashboards/models/api_default_timespan.py index 90cc702a..c8207bc7 100644 --- a/dashboards_api/dashboards_api/models/api_default_timespan.py +++ b/dashboards/dashboards/models/api_default_timespan.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,13 +18,10 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiDefaultTimespan(BaseModel): """ @@ -35,10 +32,11 @@ class ApiDefaultTimespan(BaseModel): end: Optional[datetime] = Field(default=None, description="UTC end date of the timespan range (ISO date-time format).") __properties: ClassVar[List[str]] = ["duration", "start", "end"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class ApiDefaultTimespan(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiDefaultTimespan from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +63,18 @@ class ApiDefaultTimespan(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiDefaultTimespan from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_duration.py b/dashboards/dashboards/models/api_duration.py new file mode 100644 index 00000000..1a760923 --- /dev/null +++ b/dashboards/dashboards/models/api_duration.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from dashboards.models.legacy_duration_unit import LegacyDurationUnit +from typing import Optional, Set +from typing_extensions import Self + +class ApiDuration(BaseModel): + """ + Specifies a fixed timespan for data aggregation. + """ # noqa: E501 + value: Optional[StrictInt] = Field(default=None, description="Timespan value.") + unit: Optional[LegacyDurationUnit] = None + __properties: ClassVar[List[str]] = ["value", "unit"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiDuration 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 ApiDuration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "unit": obj.get("unit") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_duration_unit.py b/dashboards/dashboards/models/api_duration_unit.py new file mode 100644 index 00000000..80d5fcc6 --- /dev/null +++ b/dashboards/dashboards/models/api_duration_unit.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ApiDurationUnit(str, Enum): + """ + Timespan unit. + """ + + """ + allowed enum values + """ + MINUTE = 'minute' + HOUR = 'hour' + DAY = 'day' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ApiDurationUnit from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/api_geo_map_widget.py b/dashboards/dashboards/models/api_geo_map_widget.py new file mode 100644 index 00000000..f6338596 --- /dev/null +++ b/dashboards/dashboards/models/api_geo_map_widget.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.geo_map_datasource import GeoMapDatasource +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiGeoMapWidget(BaseModel): + """ + Displays data on a geographic map, highlighting information across different regions. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") + max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") + unit: Optional[ApiWidgetFixedYScalePrefix] = None + type: Annotated[str, Field(strict=True)] = Field(description="Map widget type.") + group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") + is_geo_map_per_test: Optional[StrictBool] = Field(default=None, description="Indicates whether a separate map is displayed for each test within the widget. When set to true, individual maps are generated.", alias="isGeoMapPerTest") + sort_by: Optional[LegacyWidgetSortProperty] = Field(default=None, alias="sortBy") + sort_direction: Optional[LegacyWidgetSortDirection] = Field(default=None, alias="sortDirection") + data_source: Optional[GeoMapDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "type", "groupBy", "isGeoMapPerTest", "sortBy", "sortDirection", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Map$", value): + raise ValueError(r"must validate the regular expression /^Map$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiGeoMapWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiGeoMapWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "minScale": obj.get("minScale"), + "maxScale": obj.get("maxScale"), + "unit": obj.get("unit"), + "type": obj.get("type"), + "groupBy": obj.get("groupBy"), + "isGeoMapPerTest": obj.get("isGeoMapPerTest"), + "sortBy": obj.get("sortBy"), + "sortDirection": obj.get("sortDirection"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_graphlet_point.py b/dashboards/dashboards/models/api_graphlet_point.py similarity index 78% rename from dashboards_api/dashboards_api/models/api_graphlet_point.py rename to dashboards/dashboards/models/api_graphlet_point.py index 646965ce..0ed0a62c 100644 --- a/dashboards_api/dashboards_api/models/api_graphlet_point.py +++ b/dashboards/dashboards/models/api_graphlet_point.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiGraphletPoint(BaseModel): """ @@ -34,10 +30,11 @@ class ApiGraphletPoint(BaseModel): y: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Value of the data point.") __properties: ClassVar[List[str]] = ["x", "y"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class ApiGraphletPoint(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiGraphletPoint from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class ApiGraphletPoint(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiGraphletPoint from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_grouped_barchart_widget.py b/dashboards/dashboards/models/api_grouped_barchart_widget.py new file mode 100644 index 00000000..284567de --- /dev/null +++ b/dashboards/dashboards/models/api_grouped_barchart_widget.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.grouped_bar_chart_datasource import GroupedBarChartDatasource +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiGroupedBarchartWidget(BaseModel): + """ + Displays grouped bars, each representing multiple data points. You can configure the bars to align horizontally or vertically. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Bar Chart: Grouped widget type.") + group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") + axis_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="axisGroupBy") + sort_by: Optional[LegacyWidgetSortProperty] = Field(default=None, alias="sortBy") + sort_direction: Optional[LegacyWidgetSortDirection] = Field(default=None, alias="sortDirection") + limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") + show_labels: Optional[StrictBool] = Field(default=None, description="Displays labels on each bar when set to `true`.", alias="showLabels") + is_horizontal_bar_chart: Optional[StrictBool] = Field(default=None, alias="isHorizontalBarChart") + data_source: Optional[GroupedBarChartDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "groupBy", "axisGroupBy", "sortBy", "sortDirection", "limit", "showLabels", "isHorizontalBarChart", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Bar Chart: Grouped$", value): + raise ValueError(r"must validate the regular expression /^Bar Chart: Grouped$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiGroupedBarchartWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiGroupedBarchartWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "groupBy": obj.get("groupBy"), + "axisGroupBy": obj.get("axisGroupBy"), + "sortBy": obj.get("sortBy"), + "sortDirection": obj.get("sortDirection"), + "limit": obj.get("limit"), + "showLabels": obj.get("showLabels"), + "isHorizontalBarChart": obj.get("isHorizontalBarChart"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_multi_metric_column.py b/dashboards/dashboards/models/api_multi_metric_column.py new file mode 100644 index 00000000..889b47a8 --- /dev/null +++ b/dashboards/dashboards/models/api_multi_metric_column.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.multi_metrics_table_datasource import MultiMetricsTableDatasource +from typing import Optional, Set +from typing_extensions import Self + +class ApiMultiMetricColumn(BaseModel): + """ + Defines a column within a table that aggregates and displays various metrics (Multi-Metric table). + """ # noqa: E501 + id: Optional[StrictStr] = None + data_source: Optional[MultiMetricsTableDatasource] = Field(default=None, alias="dataSource") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + __properties: ClassVar[List[str]] = ["id", "dataSource", "metricGroup", "direction", "metric", "filters", "measure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiMultiMetricColumn 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 measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiMultiMetricColumn 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"), + "dataSource": obj.get("dataSource"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_multi_metric_column_data.py b/dashboards/dashboards/models/api_multi_metric_column_data.py similarity index 79% rename from dashboards_api/dashboards_api/models/api_multi_metric_column_data.py rename to dashboards/dashboards/models/api_multi_metric_column_data.py index c2a47da0..ac6c1631 100644 --- a/dashboards_api/dashboards_api/models/api_multi_metric_column_data.py +++ b/dashboards/dashboards/models/api_multi_metric_column_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw -from dashboards_api.models.api_widget_data_point import ApiWidgetDataPoint -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_dashboard_asw import ApiDashboardAsw +from dashboards.models.api_widget_data_point import ApiWidgetDataPoint +from typing import Optional, Set +from typing_extensions import Self class ApiMultiMetricColumnData(BaseModel): """ @@ -39,10 +35,11 @@ class ApiMultiMetricColumnData(BaseModel): alert_suppression_windows: Optional[List[ApiDashboardAsw]] = Field(default=None, alias="alertSuppressionWindows") __properties: ClassVar[List[str]] = ["columnId", "binSize", "points", "status", "alertSuppressionWindows"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class ApiMultiMetricColumnData(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiMultiMetricColumnData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ class ApiMultiMetricColumnData(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in points (list) @@ -92,7 +91,7 @@ class ApiMultiMetricColumnData(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiMultiMetricColumnData from a dict""" if obj is None: return None @@ -103,9 +102,9 @@ class ApiMultiMetricColumnData(BaseModel): _obj = cls.model_validate({ "columnId": obj.get("columnId"), "binSize": obj.get("binSize"), - "points": [ApiWidgetDataPoint.from_dict(_item) for _item in obj.get("points")] if obj.get("points") is not None else None, + "points": [ApiWidgetDataPoint.from_dict(_item) for _item in obj["points"]] if obj.get("points") is not None else None, "status": obj.get("status"), - "alertSuppressionWindows": [ApiDashboardAsw.from_dict(_item) for _item in obj.get("alertSuppressionWindows")] if obj.get("alertSuppressionWindows") is not None else None + "alertSuppressionWindows": [ApiDashboardAsw.from_dict(_item) for _item in obj["alertSuppressionWindows"]] if obj.get("alertSuppressionWindows") is not None else None }) return _obj diff --git a/dashboards/dashboards/models/api_multi_metric_table_widget.py b/dashboards/dashboards/models/api_multi_metric_table_widget.py new file mode 100644 index 00000000..b8cae7c0 --- /dev/null +++ b/dashboards/dashboards/models/api_multi_metric_table_widget.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_multi_metric_column import ApiMultiMetricColumn +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.metric_group import MetricGroup +from dashboards.models.multi_metrics_table_datasource import MultiMetricsTableDatasource +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiMultiMetricTableWidget(BaseModel): + """ + A Multi-Metric table widget with columns, each representing a different metric, offering a comprehensive view rather than restricting to a single metric. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Multi Metric Table widget type.") + compare_to_previous_value: Optional[StrictBool] = Field(default=None, description="Enables comparison of the current metric value with the previous value.", alias="compareToPreviousValue") + row_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="rowGroupBy") + sort_by: Optional[LegacyWidgetSortProperty] = Field(default=None, alias="sortBy") + sort_direction: Optional[LegacyWidgetSortDirection] = Field(default=None, alias="sortDirection") + limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") + multi_metric_columns: Optional[List[ApiMultiMetricColumn]] = Field(default=None, alias="multiMetricColumns") + data_source: Optional[MultiMetricsTableDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "compareToPreviousValue", "rowGroupBy", "sortBy", "sortDirection", "limit", "multiMetricColumns", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Multi Metric Table$", value): + raise ValueError(r"must validate the regular expression /^Multi Metric Table$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiMultiMetricTableWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 multi_metric_columns (list) + _items = [] + if self.multi_metric_columns: + for _item in self.multi_metric_columns: + if _item: + _items.append(_item.to_dict()) + _dict['multiMetricColumns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiMultiMetricTableWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "compareToPreviousValue": obj.get("compareToPreviousValue"), + "rowGroupBy": obj.get("rowGroupBy"), + "sortBy": obj.get("sortBy"), + "sortDirection": obj.get("sortDirection"), + "limit": obj.get("limit"), + "multiMetricColumns": [ApiMultiMetricColumn.from_dict(_item) for _item in obj["multiMetricColumns"]] if obj.get("multiMetricColumns") is not None else None, + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_multi_search_filter_api_test_table_filter_key.py b/dashboards/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py similarity index 77% rename from dashboards_api/dashboards_api/models/api_multi_search_filter_api_test_table_filter_key.py rename to dashboards/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py index 1366a830..2e282b8d 100644 --- a/dashboards_api/dashboards_api/models/api_multi_search_filter_api_test_table_filter_key.py +++ b/dashboards/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from dashboards_api.models.test_table_filter_key import TestTableFilterKey -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.test_table_filter_key import TestTableFilterKey +from typing import Optional, Set +from typing_extensions import Self class ApiMultiSearchFilterApiTestTableFilterKey(BaseModel): """ @@ -34,10 +31,11 @@ class ApiMultiSearchFilterApiTestTableFilterKey(BaseModel): value: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["key", "value"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ class ApiMultiSearchFilterApiTestTableFilterKey(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiMultiSearchFilterApiTestTableFilterKey from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +62,18 @@ class ApiMultiSearchFilterApiTestTableFilterKey(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiMultiSearchFilterApiTestTableFilterKey from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_numbers_card.py b/dashboards/dashboards/models/api_numbers_card.py new file mode 100644 index 00000000..002d7a83 --- /dev/null +++ b/dashboards/dashboards/models/api_numbers_card.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.numbers_card_datasource import NumbersCardDatasource +from typing import Optional, Set +from typing_extensions import Self + +class ApiNumbersCard(BaseModel): + """ + An individual number card within the numbers card widget. + """ # noqa: E501 + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") + max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") + unit: Optional[ApiWidgetFixedYScalePrefix] = None + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + description: Optional[StrictStr] = Field(default=None, description="Description of the number card.") + measure: Optional[ApiWidgetMeasure] = None + compare_to_previous_value: Optional[StrictBool] = Field(default=None, alias="compareToPreviousValue") + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression windows from the widget when set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + data_source: Optional[NumbersCardDatasource] = Field(default=None, alias="dataSource") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + __properties: ClassVar[List[str]] = ["minScale", "maxScale", "unit", "id", "description", "measure", "compareToPreviousValue", "fixedTimespan", "shouldExcludeAlertSuppressionWindows", "dataSource", "metricGroup", "direction", "metric", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNumbersCard 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 measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiNumbersCard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "minScale": obj.get("minScale"), + "maxScale": obj.get("maxScale"), + "unit": obj.get("unit"), + "id": obj.get("id"), + "description": obj.get("description"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "compareToPreviousValue": obj.get("compareToPreviousValue"), + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "dataSource": obj.get("dataSource"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_numbers_card_data.py b/dashboards/dashboards/models/api_numbers_card_data.py similarity index 84% rename from dashboards_api/dashboards_api/models/api_numbers_card_data.py rename to dashboards/dashboards/models/api_numbers_card_data.py index 922d2274..504688f7 100644 --- a/dashboards_api/dashboards_api/models/api_numbers_card_data.py +++ b/dashboards/dashboards/models/api_numbers_card_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_dashboard_asw import ApiDashboardAsw +from typing import Optional, Set +from typing_extensions import Self class ApiNumbersCardData(BaseModel): """ @@ -43,10 +40,11 @@ class ApiNumbersCardData(BaseModel): alert_suppression_windows: Optional[List[ApiDashboardAsw]] = Field(default=None, alias="alertSuppressionWindows") __properties: ClassVar[List[str]] = ["cardId", "startDate", "endDate", "previousValue", "binSize", "timestamp", "numberOfDataPoints", "value", "status", "alertSuppressionWindows"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +57,7 @@ class ApiNumbersCardData(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiNumbersCardData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,10 +71,12 @@ class ApiNumbersCardData(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_suppression_windows (list) @@ -89,7 +89,7 @@ class ApiNumbersCardData(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiNumbersCardData from a dict""" if obj is None: return None @@ -107,7 +107,7 @@ class ApiNumbersCardData(BaseModel): "numberOfDataPoints": obj.get("numberOfDataPoints"), "value": obj.get("value"), "status": obj.get("status"), - "alertSuppressionWindows": [ApiDashboardAsw.from_dict(_item) for _item in obj.get("alertSuppressionWindows")] if obj.get("alertSuppressionWindows") is not None else None + "alertSuppressionWindows": [ApiDashboardAsw.from_dict(_item) for _item in obj["alertSuppressionWindows"]] if obj.get("alertSuppressionWindows") is not None else None }) return _obj diff --git a/dashboards/dashboards/models/api_numbers_card_widget.py b/dashboards/dashboards/models/api_numbers_card_widget.py new file mode 100644 index 00000000..26949e1e --- /dev/null +++ b/dashboards/dashboards/models/api_numbers_card_widget.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_numbers_card import ApiNumbersCard +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.numbers_card_datasource import NumbersCardDatasource +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiNumbersCardWidget(BaseModel): + """ + A widget composed of multiple cards, each presenting a singular metric, such as average packet loss, page load time, or alert count. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Number widget type.") + number_cards: Optional[List[ApiNumbersCard]] = Field(default=None, alias="numberCards") + data_source: Optional[NumbersCardDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "numberCards", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Number$", value): + raise ValueError(r"must validate the regular expression /^Number$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNumbersCardWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 number_cards (list) + _items = [] + if self.number_cards: + for _item in self.number_cards: + if _item: + _items.append(_item.to_dict()) + _dict['numberCards'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiNumbersCardWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "numberCards": [ApiNumbersCard.from_dict(_item) for _item in obj["numberCards"]] if obj.get("numberCards") is not None else None, + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_pie_chart_widget.py b/dashboards/dashboards/models/api_pie_chart_widget.py new file mode 100644 index 00000000..35a52090 --- /dev/null +++ b/dashboards/dashboards/models/api_pie_chart_widget.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.pie_chart_datasource import PieChartDatasource +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiPieChartWidget(BaseModel): + """ + Displays data as segments of a pie, with each slice representing a portion of the total value. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Pie Chart widget type") + group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") + data_source: Optional[PieChartDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "groupBy", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Pie Chart$", value): + raise ValueError(r"must validate the regular expression /^Pie Chart$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiPieChartWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiPieChartWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "groupBy": obj.get("groupBy"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_report_data_component_label_map.py b/dashboards/dashboards/models/api_report_data_component_label_map.py similarity index 77% rename from dashboards_api/dashboards_api/models/api_report_data_component_label_map.py rename to dashboards/dashboards/models/api_report_data_component_label_map.py index d82ee594..154d1e42 100644 --- a/dashboards_api/dashboards_api/models/api_report_data_component_label_map.py +++ b/dashboards/dashboards/models/api_report_data_component_label_map.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from dashboards_api.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry +from typing import Optional, Set +from typing_extensions import Self class ApiReportDataComponentLabelMap(BaseModel): """ @@ -35,10 +31,11 @@ class ApiReportDataComponentLabelMap(BaseModel): group_labels: Optional[List[ApiReportDataComponentLabelMapEntry]] = Field(default=None, description="List of group labels.", alias="groupLabels") __properties: ClassVar[List[str]] = ["groupProperty", "groupLabels"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class ApiReportDataComponentLabelMap(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiReportDataComponentLabelMap from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +62,12 @@ class ApiReportDataComponentLabelMap(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in group_labels (list) @@ -81,7 +80,7 @@ class ApiReportDataComponentLabelMap(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiReportDataComponentLabelMap from a dict""" if obj is None: return None @@ -91,7 +90,7 @@ class ApiReportDataComponentLabelMap(BaseModel): _obj = cls.model_validate({ "groupProperty": obj.get("groupProperty"), - "groupLabels": [ApiReportDataComponentLabelMapEntry.from_dict(_item) for _item in obj.get("groupLabels")] if obj.get("groupLabels") is not None else None + "groupLabels": [ApiReportDataComponentLabelMapEntry.from_dict(_item) for _item in obj["groupLabels"]] if obj.get("groupLabels") is not None else None }) return _obj diff --git a/dashboards_api/dashboards_api/models/api_report_data_component_label_map_entry.py b/dashboards/dashboards/models/api_report_data_component_label_map_entry.py similarity index 79% rename from dashboards_api/dashboards_api/models/api_report_data_component_label_map_entry.py rename to dashboards/dashboards/models/api_report_data_component_label_map_entry.py index f53f1ae5..46f41f27 100644 --- a/dashboards_api/dashboards_api/models/api_report_data_component_label_map_entry.py +++ b/dashboards/dashboards/models/api_report_data_component_label_map_entry.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiReportDataComponentLabelMapEntry(BaseModel): """ @@ -34,10 +30,11 @@ class ApiReportDataComponentLabelMapEntry(BaseModel): group_label: Optional[StrictStr] = Field(default=None, description="Label of the group.", alias="groupLabel") __properties: ClassVar[List[str]] = ["groupId", "groupLabel"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class ApiReportDataComponentLabelMapEntry(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiReportDataComponentLabelMapEntry from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class ApiReportDataComponentLabelMapEntry(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiReportDataComponentLabelMapEntry from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_report_snapshot_time_span.py b/dashboards/dashboards/models/api_report_snapshot_time_span.py new file mode 100644 index 00000000..32a8f487 --- /dev/null +++ b/dashboards/dashboards/models/api_report_snapshot_time_span.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class ApiReportSnapshotTimeSpan(BaseModel): + """ + Time span of the dashboard snapshot. + """ # noqa: E501 + start_date: Optional[StrictStr] = Field(default=None, description="UTC start date of dashboard snapshot.", alias="startDate") + start: Optional[datetime] = Field(default=None, description="UTC start date of dashboard snapshot (ISO date-time format).") + duration: Optional[StrictInt] = Field(default=None, description="Duration of dashboard snapshot in seconds.") + __properties: ClassVar[List[str]] = ["startDate", "start", "duration"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiReportSnapshotTimeSpan 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 ApiReportSnapshotTimeSpan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "start": obj.get("start"), + "duration": obj.get("duration") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_stacked_area_chart_widget.py b/dashboards/dashboards/models/api_stacked_area_chart_widget.py new file mode 100644 index 00000000..a73bd35a --- /dev/null +++ b/dashboards/dashboards/models/api_stacked_area_chart_widget.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.stacked_area_chart_datasource import StackedAreaChartDatasource +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiStackedAreaChartWidget(BaseModel): + """ + Displays line plots over time, stacking quantities vertically to showcase cumulative data trends, similar to stacked bar charts. Ideal for visualizing changes in response times, error counts, and other metrics, revealing the progression of values across a timeline. Use this chart to replace stacked bar charts for temporal data analysis. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") + max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") + unit: Optional[ApiWidgetFixedYScalePrefix] = None + type: Annotated[str, Field(strict=True)] = Field(description="Time Series: Stacked Area widget type") + group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") + data_source: Optional[StackedAreaChartDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "type", "groupBy", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Time Series: Stacked Area$", value): + raise ValueError(r"must validate the regular expression /^Time Series: Stacked Area$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiStackedAreaChartWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiStackedAreaChartWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "minScale": obj.get("minScale"), + "maxScale": obj.get("maxScale"), + "unit": obj.get("unit"), + "type": obj.get("type"), + "groupBy": obj.get("groupBy"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_stacked_barchart_widget.py b/dashboards/dashboards/models/api_stacked_barchart_widget.py new file mode 100644 index 00000000..abf5ed8e --- /dev/null +++ b/dashboards/dashboards/models/api_stacked_barchart_widget.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.stacked_bar_chart_datasource import StackedBarChartDatasource +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiStackedBarchartWidget(BaseModel): + """ + ApiStackedBarchartWidget + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Bar Chart: Stacked widget type.") + axis_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="axisGroupBy") + sort_by: Optional[LegacyWidgetSortProperty] = Field(default=None, alias="sortBy") + sort_direction: Optional[LegacyWidgetSortDirection] = Field(default=None, alias="sortDirection") + limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") + show_labels: Optional[StrictBool] = Field(default=None, alias="showLabels") + is_horizontal_bar_chart: Optional[StrictBool] = Field(default=None, description="Set to `true` to display bars horizontally in the widget.", alias="isHorizontalBarChart") + data_source: Optional[StackedBarChartDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "axisGroupBy", "sortBy", "sortDirection", "limit", "showLabels", "isHorizontalBarChart", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Bar Chart: Stacked$", value): + raise ValueError(r"must validate the regular expression /^Bar Chart: Stacked$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiStackedBarchartWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiStackedBarchartWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "axisGroupBy": obj.get("axisGroupBy"), + "sortBy": obj.get("sortBy"), + "sortDirection": obj.get("sortDirection"), + "limit": obj.get("limit"), + "showLabels": obj.get("showLabels"), + "isHorizontalBarChart": obj.get("isHorizontalBarChart"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_table_widget.py b/dashboards/dashboards/models/api_table_widget.py new file mode 100644 index 00000000..272b59b0 --- /dev/null +++ b/dashboards/dashboards/models/api_table_widget.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.table_datasource import TableDatasource +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiTableWidget(BaseModel): + """ + Organizes data in rows and columns, with options to list by test, geographic location, data source, or aggregated categories. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Table widget type.") + compare_to_previous_value: Optional[StrictBool] = Field(default=None, alias="compareToPreviousValue") + row_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="rowGroupBy") + column_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="columnGroupBy") + sort_by: Optional[LegacyWidgetSortProperty] = Field(default=None, alias="sortBy") + sort_direction: Optional[LegacyWidgetSortDirection] = Field(default=None, alias="sortDirection") + limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") + data_source: Optional[TableDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "compareToPreviousValue", "rowGroupBy", "columnGroupBy", "sortBy", "sortDirection", "limit", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Table$", value): + raise ValueError(r"must validate the regular expression /^Table$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiTableWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiTableWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "compareToPreviousValue": obj.get("compareToPreviousValue"), + "rowGroupBy": obj.get("rowGroupBy"), + "columnGroupBy": obj.get("columnGroupBy"), + "sortBy": obj.get("sortBy"), + "sortDirection": obj.get("sortDirection"), + "limit": obj.get("limit"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_test_table_data.py b/dashboards/dashboards/models/api_test_table_data.py similarity index 81% rename from dashboards_api/dashboards_api/models/api_test_table_data.py rename to dashboards/dashboards/models/api_test_table_data.py index 6e0fcc22..ae6031ce 100644 --- a/dashboards_api/dashboards_api/models/api_test_table_data.py +++ b/dashboards/dashboards/models/api_test_table_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_test_table_graphlets_data import ApiTestTableGraphletsData -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_test_table_graphlets_data import ApiTestTableGraphletsData +from typing import Optional, Set +from typing_extensions import Self class ApiTestTableData(BaseModel): """ @@ -40,10 +36,11 @@ class ApiTestTableData(BaseModel): graphlets: Optional[List[ApiTestTableGraphletsData]] = Field(default=None, description="List of time series points for test metrics in the last 12 hours.") __properties: ClassVar[List[str]] = ["testId", "testName", "target", "testType", "alertCount", "isShared", "graphlets"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ class ApiTestTableData(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiTestTableData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ class ApiTestTableData(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in graphlets (list) @@ -86,7 +85,7 @@ class ApiTestTableData(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiTestTableData from a dict""" if obj is None: return None @@ -101,7 +100,7 @@ class ApiTestTableData(BaseModel): "testType": obj.get("testType"), "alertCount": obj.get("alertCount"), "isShared": obj.get("isShared"), - "graphlets": [ApiTestTableGraphletsData.from_dict(_item) for _item in obj.get("graphlets")] if obj.get("graphlets") is not None else None + "graphlets": [ApiTestTableGraphletsData.from_dict(_item) for _item in obj["graphlets"]] if obj.get("graphlets") is not None else None }) return _obj diff --git a/dashboards_api/dashboards_api/models/api_test_table_graphlets_data.py b/dashboards/dashboards/models/api_test_table_graphlets_data.py similarity index 78% rename from dashboards_api/dashboards_api/models/api_test_table_graphlets_data.py rename to dashboards/dashboards/models/api_test_table_graphlets_data.py index df0de3ea..00b7834d 100644 --- a/dashboards_api/dashboards_api/models/api_test_table_graphlets_data.py +++ b/dashboards/dashboards/models/api_test_table_graphlets_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from dashboards_api.models.api_graphlet_point import ApiGraphletPoint -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_graphlet_point import ApiGraphletPoint +from typing import Optional, Set +from typing_extensions import Self class ApiTestTableGraphletsData(BaseModel): """ @@ -36,10 +32,11 @@ class ApiTestTableGraphletsData(BaseModel): points: Optional[List[ApiGraphletPoint]] = None __properties: ClassVar[List[str]] = ["metric", "testId", "points"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class ApiTestTableGraphletsData(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiTestTableGraphletsData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class ApiTestTableGraphletsData(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in points (list) @@ -82,7 +81,7 @@ class ApiTestTableGraphletsData(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiTestTableGraphletsData from a dict""" if obj is None: return None @@ -93,7 +92,7 @@ class ApiTestTableGraphletsData(BaseModel): _obj = cls.model_validate({ "metric": obj.get("metric"), "testId": obj.get("testId"), - "points": [ApiGraphletPoint.from_dict(_item) for _item in obj.get("points")] if obj.get("points") is not None else None + "points": [ApiGraphletPoint.from_dict(_item) for _item in obj["points"]] if obj.get("points") is not None else None }) return _obj diff --git a/dashboards/dashboards/models/api_test_table_widget.py b/dashboards/dashboards/models/api_test_table_widget.py new file mode 100644 index 00000000..ff1f28cc --- /dev/null +++ b/dashboards/dashboards/models/api_test_table_widget.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.test_table_datasource import TestTableDatasource +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiTestTableWidget(BaseModel): + """ + Displays tests and statuses with options to sort and filter. It can be set to show only certain tests, like those with specific labels or failing tests. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + type: Annotated[str, Field(strict=True)] = Field(description="Test Table widget type,") + filter: Optional[ApiWidgetFilterApiTestTableFilterKey] = None + exclude: Optional[ApiWidgetFilterApiTestTableFilterKey] = None + data_source: Optional[TestTableDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "type", "filter", "exclude", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Test Table$", value): + raise ValueError(r"must validate the regular expression /^Test Table$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiTestTableWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 filter + if self.filter: + _dict['filter'] = self.filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of exclude + if self.exclude: + _dict['exclude'] = self.exclude.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiTestTableWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "filter": ApiWidgetFilterApiTestTableFilterKey.from_dict(obj["filter"]) if obj.get("filter") is not None else None, + "exclude": ApiWidgetFilterApiTestTableFilterKey.from_dict(obj["exclude"]) if obj.get("exclude") is not None else None, + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_timeseries_widget.py b/dashboards/dashboards/models/api_timeseries_widget.py new file mode 100644 index 00000000..e5287135 --- /dev/null +++ b/dashboards/dashboards/models/api_timeseries_widget.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from dashboards.models.api_aggregate_property import ApiAggregateProperty +from dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.timeseries_datasource import TimeseriesDatasource +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class ApiTimeseriesWidget(BaseModel): + """ + The Timeseries widget graphs data over time, with the chosen metric displayed on the vertical axis. vertical axis + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") + max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") + unit: Optional[ApiWidgetFixedYScalePrefix] = None + type: Annotated[str, Field(strict=True)] = Field(description="Time Series: Line widget type.") + show_timeseries_overall_baseline: Optional[StrictBool] = Field(default=None, description="Displays the overall baseline if set to `true`.", alias="showTimeseriesOverallBaseline") + group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") + is_timeseries_one_chart_per_line: Optional[StrictBool] = Field(default=None, description="Displays a separate chart for each line if set to `true`.", alias="isTimeseriesOneChartPerLine") + data_source: Optional[TimeseriesDatasource] = Field(default=None, alias="dataSource") + __properties: ClassVar[List[str]] = ["id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "type", "showTimeseriesOverallBaseline", "groupBy", "isTimeseriesOneChartPerLine", "dataSource"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^Time Series: Line$", value): + raise ValueError(r"must validate the regular expression /^Time Series: Line$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiTimeseriesWidget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + # 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 ApiTimeseriesWidget 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"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "minScale": obj.get("minScale"), + "maxScale": obj.get("maxScale"), + "unit": obj.get("unit"), + "type": obj.get("type"), + "showTimeseriesOverallBaseline": obj.get("showTimeseriesOverallBaseline"), + "groupBy": obj.get("groupBy"), + "isTimeseriesOneChartPerLine": obj.get("isTimeseriesOneChartPerLine"), + "dataSource": obj.get("dataSource") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_widget.py b/dashboards/dashboards/models/api_widget.py similarity index 84% rename from dashboards_api/dashboards_api/models/api_widget.py rename to dashboards/dashboards/models/api_widget.py index 7cf19471..96ca7363 100644 --- a/dashboards_api/dashboards_api/models/api_widget.py +++ b/dashboards/dashboards/models/api_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,34 +13,27 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from dashboards_api.models.api_agent_status_widget import ApiAgentStatusWidget -from dashboards_api.models.api_alert_list_widget import ApiAlertListWidget -from dashboards_api.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget -from dashboards_api.models.api_color_grid_widget import ApiColorGridWidget -from dashboards_api.models.api_geo_map_widget import ApiGeoMapWidget -from dashboards_api.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget -from dashboards_api.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget -from dashboards_api.models.api_numbers_card_widget import ApiNumbersCardWidget -from dashboards_api.models.api_pie_chart_widget import ApiPieChartWidget -from dashboards_api.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget -from dashboards_api.models.api_stacked_barchart_widget import ApiStackedBarchartWidget -from dashboards_api.models.api_table_widget import ApiTableWidget -from dashboards_api.models.api_test_table_widget import ApiTestTableWidget -from dashboards_api.models.api_timeseries_widget import ApiTimeseriesWidget -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal +from dashboards.models.api_agent_status_widget import ApiAgentStatusWidget +from dashboards.models.api_alert_list_widget import ApiAlertListWidget +from dashboards.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget +from dashboards.models.api_color_grid_widget import ApiColorGridWidget +from dashboards.models.api_geo_map_widget import ApiGeoMapWidget +from dashboards.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget +from dashboards.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget +from dashboards.models.api_numbers_card_widget import ApiNumbersCardWidget +from dashboards.models.api_pie_chart_widget import ApiPieChartWidget +from dashboards.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget +from dashboards.models.api_stacked_barchart_widget import ApiStackedBarchartWidget +from dashboards.models.api_table_widget import ApiTableWidget +from dashboards.models.api_test_table_widget import ApiTestTableWidget +from dashboards.models.api_timeseries_widget import ApiTimeseriesWidget from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self APIWIDGET_ONE_OF_SCHEMAS = ["ApiAgentStatusWidget", "ApiAlertListWidget", "ApiBoxAndWhiskersWidget", "ApiColorGridWidget", "ApiGeoMapWidget", "ApiGroupedBarchartWidget", "ApiMultiMetricTableWidget", "ApiNumbersCardWidget", "ApiPieChartWidget", "ApiStackedAreaChartWidget", "ApiStackedBarchartWidget", "ApiTableWidget", "ApiTestTableWidget", "ApiTimeseriesWidget"] @@ -77,11 +70,12 @@ class ApiWidget(BaseModel): # data type: ApiTimeseriesWidget oneof_schema_14_validator: Optional[ApiTimeseriesWidget] = None actual_instance: Optional[Union[ApiAgentStatusWidget, ApiAlertListWidget, ApiBoxAndWhiskersWidget, ApiColorGridWidget, ApiGeoMapWidget, ApiGroupedBarchartWidget, ApiMultiMetricTableWidget, ApiNumbersCardWidget, ApiPieChartWidget, ApiStackedAreaChartWidget, ApiStackedBarchartWidget, ApiTableWidget, ApiTestTableWidget, ApiTimeseriesWidget]] = None - one_of_schemas: List[str] = Literal["ApiAgentStatusWidget", "ApiAlertListWidget", "ApiBoxAndWhiskersWidget", "ApiColorGridWidget", "ApiGeoMapWidget", "ApiGroupedBarchartWidget", "ApiMultiMetricTableWidget", "ApiNumbersCardWidget", "ApiPieChartWidget", "ApiStackedAreaChartWidget", "ApiStackedBarchartWidget", "ApiTableWidget", "ApiTestTableWidget", "ApiTimeseriesWidget"] + one_of_schemas: Set[str] = { "ApiAgentStatusWidget", "ApiAlertListWidget", "ApiBoxAndWhiskersWidget", "ApiColorGridWidget", "ApiGeoMapWidget", "ApiGroupedBarchartWidget", "ApiMultiMetricTableWidget", "ApiNumbersCardWidget", "ApiPieChartWidget", "ApiStackedAreaChartWidget", "ApiStackedBarchartWidget", "ApiTableWidget", "ApiTestTableWidget", "ApiTimeseriesWidget" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -182,7 +176,7 @@ class ApiWidget(BaseModel): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -291,19 +285,17 @@ class ApiWidget(BaseModel): if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], ApiAgentStatusWidget, ApiAlertListWidget, ApiBoxAndWhiskersWidget, ApiColorGridWidget, ApiGeoMapWidget, ApiGroupedBarchartWidget, ApiMultiMetricTableWidget, ApiNumbersCardWidget, ApiPieChartWidget, ApiStackedAreaChartWidget, ApiStackedBarchartWidget, ApiTableWidget, ApiTestTableWidget, ApiTimeseriesWidget]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/dashboards_api/dashboards_api/models/api_widget_data_point.py b/dashboards/dashboards/models/api_widget_data_point.py similarity index 79% rename from dashboards_api/dashboards_api/models/api_widget_data_point.py rename to dashboards/dashboards/models/api_widget_data_point.py index 6f401d54..21fa0acd 100644 --- a/dashboards_api/dashboards_api/models/api_widget_data_point.py +++ b/dashboards/dashboards/models/api_widget_data_point.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from dashboards_api.models.api_data_point_group import ApiDataPointGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_data_point_group import ApiDataPointGroup +from typing import Optional, Set +from typing_extensions import Self class ApiWidgetDataPoint(BaseModel): """ @@ -37,10 +33,11 @@ class ApiWidgetDataPoint(BaseModel): groups: Optional[List[ApiDataPointGroup]] = None __properties: ClassVar[List[str]] = ["timestamp", "numberOfDataPoints", "value", "groups"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class ApiWidgetDataPoint(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiWidgetDataPoint from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ class ApiWidgetDataPoint(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in groups (list) @@ -83,7 +82,7 @@ class ApiWidgetDataPoint(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiWidgetDataPoint from a dict""" if obj is None: return None @@ -95,7 +94,7 @@ class ApiWidgetDataPoint(BaseModel): "timestamp": obj.get("timestamp"), "numberOfDataPoints": obj.get("numberOfDataPoints"), "value": obj.get("value"), - "groups": [ApiDataPointGroup.from_dict(_item) for _item in obj.get("groups")] if obj.get("groups") is not None else None + "groups": [ApiDataPointGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None }) return _obj diff --git a/dashboards/dashboards/models/api_widget_data_response.py b/dashboards/dashboards/models/api_widget_data_response.py new file mode 100644 index 00000000..9d33f1ed --- /dev/null +++ b/dashboards/dashboards/models/api_widget_data_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from typing import Optional, Set +from typing_extensions import Self + +class ApiWidgetDataResponse(BaseModel): + """ + Response of a widget data request. + """ # noqa: E501 + group_labels: Optional[List[ApiReportDataComponentLabelMap]] = Field(default=None, alias="groupLabels") + bin_size: Optional[StrictInt] = Field(default=None, description="Duration of each bin.", alias="binSize") + data: Optional[ApiWidgetsDataV2] = None + __properties: ClassVar[List[str]] = ["groupLabels", "binSize", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiWidgetDataResponse 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 group_labels (list) + _items = [] + if self.group_labels: + for _item in self.group_labels: + if _item: + _items.append(_item.to_dict()) + _dict['groupLabels'] = _items + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiWidgetDataResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "groupLabels": [ApiReportDataComponentLabelMap.from_dict(_item) for _item in obj["groupLabels"]] if obj.get("groupLabels") is not None else None, + "binSize": obj.get("binSize"), + "data": ApiWidgetsDataV2.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/api_widget_filter_api_test_table_filter_key.py b/dashboards/dashboards/models/api_widget_filter_api_test_table_filter_key.py new file mode 100644 index 00000000..d485b381 --- /dev/null +++ b/dashboards/dashboards/models/api_widget_filter_api_test_table_filter_key.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from dashboards.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey +from dashboards.models.test_table_filter_type import TestTableFilterType +from typing import Optional, Set +from typing_extensions import Self + +class ApiWidgetFilterApiTestTableFilterKey(BaseModel): + """ + ApiWidgetFilterApiTestTableFilterKey + """ # noqa: E501 + filters: Optional[List[ApiMultiSearchFilterApiTestTableFilterKey]] = None + type: Optional[TestTableFilterType] = None + __properties: ClassVar[List[str]] = ["filters", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiWidgetFilterApiTestTableFilterKey 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 filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiWidgetFilterApiTestTableFilterKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filters": [ApiMultiSearchFilterApiTestTableFilterKey.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "type": obj.get("type") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/api_widget_fixed_y_scale_prefix.py b/dashboards/dashboards/models/api_widget_fixed_y_scale_prefix.py similarity index 76% rename from dashboards_api/dashboards_api/models/api_widget_fixed_y_scale_prefix.py rename to dashboards/dashboards/models/api_widget_fixed_y_scale_prefix.py index 370951dd..356c526e 100644 --- a/dashboards_api/dashboards_api/models/api_widget_fixed_y_scale_prefix.py +++ b/dashboards/dashboards/models/api_widget_fixed_y_scale_prefix.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ApiWidgetFixedYScalePrefix(str, Enum): diff --git a/dashboards_api/dashboards_api/models/api_widget_measure.py b/dashboards/dashboards/models/api_widget_measure.py similarity index 77% rename from dashboards_api/dashboards_api/models/api_widget_measure.py rename to dashboards/dashboards/models/api_widget_measure.py index 3f30006c..a965eb89 100644 --- a/dashboards_api/dashboards_api/models/api_widget_measure.py +++ b/dashboards/dashboards/models/api_widget_measure.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from dashboards_api.models.widget_measure_type import WidgetMeasureType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.widget_measure_type import WidgetMeasureType +from typing import Optional, Set +from typing_extensions import Self class ApiWidgetMeasure(BaseModel): """ @@ -35,10 +31,11 @@ class ApiWidgetMeasure(BaseModel): percentile_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The percentile value to use when `type == NTH_PERCENTILE`.", alias="percentileValue") __properties: ClassVar[List[str]] = ["type", "percentileValue"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class ApiWidgetMeasure(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiWidgetMeasure from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class ApiWidgetMeasure(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiWidgetMeasure from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/api_widget_sort_direction.py b/dashboards/dashboards/models/api_widget_sort_direction.py new file mode 100644 index 00000000..be9789e3 --- /dev/null +++ b/dashboards/dashboards/models/api_widget_sort_direction.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ApiWidgetSortDirection(str, Enum): + """ + Specifies the order in which cards are sorted. + """ + + """ + allowed enum values + """ + ASCENDING = 'ascending' + DESCENDING = 'descending' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ApiWidgetSortDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/api_widget_sort_property.py b/dashboards/dashboards/models/api_widget_sort_property.py new file mode 100644 index 00000000..c38d1d4f --- /dev/null +++ b/dashboards/dashboards/models/api_widget_sort_property.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ApiWidgetSortProperty(str, Enum): + """ + Determines the card sorting criterion. + """ + + """ + allowed enum values + """ + ALPHABETICAL = 'alphabetical' + VALUE = 'value' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ApiWidgetSortProperty from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards_api/dashboards_api/models/api_widgets_data_v2.py b/dashboards/dashboards/models/api_widgets_data_v2.py similarity index 77% rename from dashboards_api/dashboards_api/models/api_widgets_data_v2.py rename to dashboards/dashboards/models/api_widgets_data_v2.py index 8baccdee..03c1a6ce 100644 --- a/dashboards_api/dashboards_api/models/api_widgets_data_v2.py +++ b/dashboards/dashboards/models/api_widgets_data_v2.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,22 +17,18 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_agent_status_agent import ApiAgentStatusAgent -from dashboards_api.models.api_agent_status_summary import ApiAgentStatusSummary -from dashboards_api.models.api_alert_list_alert import ApiAlertListAlert -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw -from dashboards_api.models.api_multi_metric_column_data import ApiMultiMetricColumnData -from dashboards_api.models.api_numbers_card_data import ApiNumbersCardData -from dashboards_api.models.api_test_table_data import ApiTestTableData -from dashboards_api.models.api_widget_data_point import ApiWidgetDataPoint -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_agent_status_agent import ApiAgentStatusAgent +from dashboards.models.api_agent_status_summary import ApiAgentStatusSummary +from dashboards.models.api_alert_list_alert import ApiAlertListAlert +from dashboards.models.api_dashboard_asw import ApiDashboardAsw +from dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData +from dashboards.models.api_numbers_card_data import ApiNumbersCardData +from dashboards.models.api_test_table_data import ApiTestTableData +from dashboards.models.api_widget_data_point import ApiWidgetDataPoint +from typing import Optional, Set +from typing_extensions import Self class ApiWidgetsDataV2(BaseModel): """ @@ -52,10 +48,11 @@ class ApiWidgetsDataV2(BaseModel): status: Optional[StrictStr] = Field(default=None, description="Message for not fully configured card or no data.") __properties: ClassVar[List[str]] = ["cards", "columns", "points", "tests", "startRound", "alertSuppressionWindows", "totalAlerts", "activeAlerts", "alerts", "summary", "agents", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +65,7 @@ class ApiWidgetsDataV2(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiWidgetsDataV2 from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,10 +79,12 @@ class ApiWidgetsDataV2(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in cards (list) @@ -143,7 +142,7 @@ class ApiWidgetsDataV2(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiWidgetsDataV2 from a dict""" if obj is None: return None @@ -152,17 +151,17 @@ class ApiWidgetsDataV2(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "cards": [ApiNumbersCardData.from_dict(_item) for _item in obj.get("cards")] if obj.get("cards") is not None else None, - "columns": [ApiMultiMetricColumnData.from_dict(_item) for _item in obj.get("columns")] if obj.get("columns") is not None else None, - "points": [ApiWidgetDataPoint.from_dict(_item) for _item in obj.get("points")] if obj.get("points") is not None else None, - "tests": [ApiTestTableData.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, + "cards": [ApiNumbersCardData.from_dict(_item) for _item in obj["cards"]] if obj.get("cards") is not None else None, + "columns": [ApiMultiMetricColumnData.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, + "points": [ApiWidgetDataPoint.from_dict(_item) for _item in obj["points"]] if obj.get("points") is not None else None, + "tests": [ApiTestTableData.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, "startRound": obj.get("startRound"), - "alertSuppressionWindows": [ApiDashboardAsw.from_dict(_item) for _item in obj.get("alertSuppressionWindows")] if obj.get("alertSuppressionWindows") is not None else None, + "alertSuppressionWindows": [ApiDashboardAsw.from_dict(_item) for _item in obj["alertSuppressionWindows"]] if obj.get("alertSuppressionWindows") is not None else None, "totalAlerts": obj.get("totalAlerts"), "activeAlerts": obj.get("activeAlerts"), - "alerts": [ApiAlertListAlert.from_dict(_item) for _item in obj.get("alerts")] if obj.get("alerts") is not None else None, - "summary": ApiAgentStatusSummary.from_dict(obj.get("summary")) if obj.get("summary") is not None else None, - "agents": [ApiAgentStatusAgent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "alerts": [ApiAlertListAlert.from_dict(_item) for _item in obj["alerts"]] if obj.get("alerts") is not None else None, + "summary": ApiAgentStatusSummary.from_dict(obj["summary"]) if obj.get("summary") is not None else None, + "agents": [ApiAgentStatusAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "status": obj.get("status") }) return _obj diff --git a/dashboards/dashboards/models/app_and_self_links.py b/dashboards/dashboards/models/app_and_self_links.py new file mode 100644 index 00000000..75d2db88 --- /dev/null +++ b/dashboards/dashboards/models/app_and_self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.app_and_self_links_links import AppAndSelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class AppAndSelfLinks(BaseModel): + """ + AppAndSelfLinks + """ # noqa: E501 + links: Optional[AppAndSelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppAndSelfLinks 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 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 AppAndSelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": AppAndSelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/app_and_self_links_links.py b/dashboards/dashboards/models/app_and_self_links_links.py new file mode 100644 index 00000000..58edfdf6 --- /dev/null +++ b/dashboards/dashboards/models/app_and_self_links_links.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class AppAndSelfLinksLinks(BaseModel): + """ + A links object containing the ThousandEyes App link + """ # noqa: E501 + app_link: Optional[Link] = Field(default=None, alias="appLink") + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["appLink", "self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppAndSelfLinksLinks 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 app_link + if self.app_link: + _dict['appLink'] = self.app_link.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 AppAndSelfLinksLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appLink": Link.from_dict(obj["appLink"]) if obj.get("appLink") 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/dashboards_api/dashboards_api/models/asw_repeat.py b/dashboards/dashboards/models/asw_repeat.py similarity index 79% rename from dashboards_api/dashboards_api/models/asw_repeat.py rename to dashboards/dashboards/models/asw_repeat.py index d76e8414..1a1166bb 100644 --- a/dashboards_api/dashboards_api/models/asw_repeat.py +++ b/dashboards/dashboards/models/asw_repeat.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class AswRepeat(str, Enum): diff --git a/dashboards/dashboards/models/asw_repeat_unit.py b/dashboards/dashboards/models/asw_repeat_unit.py new file mode 100644 index 00000000..9ad9f793 --- /dev/null +++ b/dashboards/dashboards/models/asw_repeat_unit.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 AswRepeatUnit(str, Enum): + """ + AswRepeatUnit + """ + + """ + allowed enum values + """ + DAY = 'day' + WEEK = 'week' + MONTH = 'month' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AswRepeatUnit from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards_api/dashboards_api/models/box_and_whiskers_datasource.py b/dashboards/dashboards/models/box_and_whiskers_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/box_and_whiskers_datasource.py rename to dashboards/dashboards/models/box_and_whiskers_datasource.py index 05046fac..b9231c14 100644 --- a/dashboards_api/dashboards_api/models/box_and_whiskers_datasource.py +++ b/dashboards/dashboards/models/box_and_whiskers_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class BoxAndWhiskersDatasource(str, Enum): @@ -37,6 +29,7 @@ class BoxAndWhiskersDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards_api/dashboards_api/models/color_grid_datasource.py b/dashboards/dashboards/models/color_grid_datasource.py similarity index 83% rename from dashboards_api/dashboards_api/models/color_grid_datasource.py rename to dashboards/dashboards/models/color_grid_datasource.py index 6d53ccff..6239f440 100644 --- a/dashboards_api/dashboards_api/models/color_grid_datasource.py +++ b/dashboards/dashboards/models/color_grid_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ColorGridDatasource(str, Enum): @@ -38,6 +30,7 @@ class ColorGridDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards/dashboards/models/create_dashboard_snapshot201_response.py b/dashboards/dashboards/models/create_dashboard_snapshot201_response.py new file mode 100644 index 00000000..217a1920 --- /dev/null +++ b/dashboards/dashboards/models/create_dashboard_snapshot201_response.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class CreateDashboardSnapshot201Response(BaseModel): + """ + CreateDashboardSnapshot201Response + """ # noqa: E501 + snapshot_id: Optional[StrictStr] = Field(default=None, description="Identifier of the dashboard snapshot.", alias="snapshotId") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["snapshotId", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateDashboardSnapshot201Response 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 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 CreateDashboardSnapshot201Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshotId": obj.get("snapshotId"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/dashboard.py b/dashboards/dashboards/models/dashboard.py new file mode 100644 index 00000000..e2b8d972 --- /dev/null +++ b/dashboards/dashboards/models/dashboard.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from dashboards.models.api_widget import ApiWidget +from dashboards.models.dashboard_links_links import DashboardLinksLinks +from dashboards.models.default_timespan import DefaultTimespan +from typing import Optional, Set +from typing_extensions import Self + +class Dashboard(BaseModel): + """ + Dashboard upon which this dashboard snapshot is based upon. + """ # noqa: E501 + global_filter_id: Optional[StrictStr] = Field(default=None, description="Default global dashboard filter ID (obtained from `/dashboards/filters` endpoint).", alias="globalFilterId") + links: Optional[DashboardLinksLinks] = Field(default=None, alias="_links") + dashboard_id: Optional[StrictStr] = Field(default=None, description="Identifier of a dashboard.", alias="dashboardId") + title: Optional[StrictStr] = Field(default=None, description="Title of a dashboard.") + is_built_in: Optional[StrictBool] = Field(default=None, description="Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards.", alias="isBuiltIn") + aid: Optional[StrictStr] = Field(default=None, description="Identifier for the account group associated with a dashboard.") + created_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that created a dashboard.", alias="createdBy") + modified_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that last modified a dashboard.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC date/time when a dashboard was last modified (ISO date-time format).", alias="modifiedDate") + is_private: Optional[StrictBool] = Field(default=None, description="A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it.", alias="isPrivate") + is_default_for_user: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the user's default. True for default, false if not.", alias="isDefaultForUser") + is_default_for_account: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the account group's default. True for default, false if not.", alias="isDefaultForAccount") + widgets: Optional[List[ApiWidget]] = None + description: Optional[StrictStr] = Field(default=None, description="A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard.") + default_timespan: Optional[DefaultTimespan] = Field(default=None, alias="defaultTimespan") + is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride") + is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport") + __properties: ClassVar[List[str]] = ["globalFilterId", "_links", "dashboardId", "title", "isBuiltIn", "aid", "createdBy", "modifiedBy", "modifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Dashboard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "dashboard_id", + "is_built_in", + "aid", + "created_by", + "modified_by", + "modified_date", + "is_default_for_user", + "is_default_for_account", + "is_migrated_report", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 widgets (list) + _items = [] + if self.widgets: + for _item in self.widgets: + if _item: + _items.append(_item.to_dict()) + _dict['widgets'] = _items + # override the default output from pydantic by calling `to_dict()` of default_timespan + if self.default_timespan: + _dict['defaultTimespan'] = self.default_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Dashboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "globalFilterId": obj.get("globalFilterId"), + "_links": DashboardLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "dashboardId": obj.get("dashboardId"), + "title": obj.get("title"), + "isBuiltIn": obj.get("isBuiltIn"), + "aid": obj.get("aid"), + "createdBy": obj.get("createdBy"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "isPrivate": obj.get("isPrivate"), + "isDefaultForUser": obj.get("isDefaultForUser"), + "isDefaultForAccount": obj.get("isDefaultForAccount"), + "widgets": [ApiWidget.from_dict(_item) for _item in obj["widgets"]] if obj.get("widgets") is not None else None, + "description": obj.get("description"), + "defaultTimespan": DefaultTimespan.from_dict(obj["defaultTimespan"]) if obj.get("defaultTimespan") is not None else None, + "isGlobalOverride": obj.get("isGlobalOverride"), + "isMigratedReport": obj.get("isMigratedReport") + }) + return _obj + + diff --git a/dashboards/dashboards/models/dashboard_global_filter_id.py b/dashboards/dashboards/models/dashboard_global_filter_id.py new file mode 100644 index 00000000..302e49be --- /dev/null +++ b/dashboards/dashboards/models/dashboard_global_filter_id.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 DashboardGlobalFilterId(BaseModel): + """ + DashboardGlobalFilterId + """ # noqa: E501 + global_filter_id: Optional[StrictStr] = Field(default=None, description="Default global dashboard filter ID (obtained from `/dashboards/filters` endpoint).", alias="globalFilterId") + __properties: ClassVar[List[str]] = ["globalFilterId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardGlobalFilterId 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 DashboardGlobalFilterId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "globalFilterId": obj.get("globalFilterId") + }) + return _obj + + diff --git a/dashboards/dashboards/models/dashboard_links.py b/dashboards/dashboards/models/dashboard_links.py new file mode 100644 index 00000000..98a14e1b --- /dev/null +++ b/dashboards/dashboards/models/dashboard_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.dashboard_links_links import DashboardLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class DashboardLinks(BaseModel): + """ + A links object containing the self and the snapshots links. + """ # noqa: E501 + links: Optional[DashboardLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardLinks 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 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 DashboardLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": DashboardLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/dashboard_links_links.py b/dashboards/dashboards/models/dashboard_links_links.py new file mode 100644 index 00000000..83ccdea2 --- /dev/null +++ b/dashboards/dashboards/models/dashboard_links_links.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class DashboardLinksLinks(BaseModel): + """ + DashboardLinksLinks + """ # noqa: E501 + var_self: Optional[Link] = Field(default=None, alias="self") + snapshots: Optional[Link] = None + __properties: ClassVar[List[str]] = ["self", "snapshots"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardLinksLinks 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() + # override the default output from pydantic by calling `to_dict()` of snapshots + if self.snapshots: + _dict['snapshots'] = self.snapshots.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardLinksLinks 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, + "snapshots": Link.from_dict(obj["snapshots"]) if obj.get("snapshots") is not None else None + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/dashboard_metric.py b/dashboards/dashboards/models/dashboard_metric.py similarity index 93% rename from dashboards_api/dashboards_api/models/dashboard_metric.py rename to dashboards/dashboards/models/dashboard_metric.py index e5a98d2a..4adb59f3 100644 --- a/dashboards_api/dashboards_api/models/dashboard_metric.py +++ b/dashboards/dashboards/models/dashboard_metric.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class DashboardMetric(str, Enum): @@ -119,6 +111,18 @@ class DashboardMetric(str, Enum): TRANSACTION_PAGE_TIME = 'TRANSACTION_PAGE_TIME' TRANSACTION_PAGE_LOAD_TIME = 'TRANSACTION_PAGE_LOAD_TIME' TRANSACTION_PAGE_LOAD_DOM_TIME = 'TRANSACTION_PAGE_LOAD_DOM_TIME' + API_TRANSACTION_TIME = 'API_TRANSACTION_TIME' + API_REQUEST_CALL_TIME = 'API_REQUEST_CALL_TIME' + API_REQUEST_DNS_TIME = 'API_REQUEST_DNS_TIME' + API_REQUEST_CONNECT_TIME = 'API_REQUEST_CONNECT_TIME' + API_REQUEST_SSL_TIME = 'API_REQUEST_SSL_TIME' + API_REQUEST_SEND_TIME = 'API_REQUEST_SEND_TIME' + API_REQUEST_WAIT_TIME = 'API_REQUEST_WAIT_TIME' + API_REQUEST_BLOCK_TIME = 'API_REQUEST_BLOCK_TIME' + API_REQUEST_RECEIVE_TIME = 'API_REQUEST_RECEIVE_TIME' + API_REQUEST_ASSERT_ERROR_COUNT = 'API_REQUEST_ASSERT_ERROR_COUNT' + API_REQUEST_COMPLETION = 'API_REQUEST_COMPLETION' + API_REQUEST_OTHER_ERROR_COUNT = 'API_REQUEST_OTHER_ERROR_COUNT' VOIP_DISCARDS = 'VOIP_DISCARDS' VOIP_LATENCY = 'VOIP_LATENCY' VOIP_LOSS = 'VOIP_LOSS' diff --git a/dashboards_api/dashboards_api/models/dashboard_metric_direction.py b/dashboards/dashboards/models/dashboard_metric_direction.py similarity index 75% rename from dashboards_api/dashboards_api/models/dashboard_metric_direction.py rename to dashboards/dashboards/models/dashboard_metric_direction.py index da689ead..3e88f358 100644 --- a/dashboards_api/dashboards_api/models/dashboard_metric_direction.py +++ b/dashboards/dashboards/models/dashboard_metric_direction.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class DashboardMetricDirection(str, Enum): diff --git a/dashboards/dashboards/models/dashboard_order.py b/dashboards/dashboards/models/dashboard_order.py new file mode 100644 index 00000000..2873ae0f --- /dev/null +++ b/dashboards/dashboards/models/dashboard_order.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 DashboardOrder(str, Enum): + """ + DashboardOrder + """ + + """ + allowed enum values + """ + ASC = 'asc' + DESC = 'desc' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardOrder from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/dashboard_snapshot_id.py b/dashboards/dashboards/models/dashboard_snapshot_id.py new file mode 100644 index 00000000..50a6f8fa --- /dev/null +++ b/dashboards/dashboards/models/dashboard_snapshot_id.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 DashboardSnapshotId(BaseModel): + """ + DashboardSnapshotId + """ # noqa: E501 + snapshot_id: Optional[StrictStr] = Field(default=None, description="Identifier of the dashboard snapshot.", alias="snapshotId") + __properties: ClassVar[List[str]] = ["snapshotId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardSnapshotId 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 DashboardSnapshotId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshotId": obj.get("snapshotId") + }) + return _obj + + diff --git a/dashboards/dashboards/models/dashboard_snapshots200_response.py b/dashboards/dashboards/models/dashboard_snapshots200_response.py new file mode 100644 index 00000000..0fe08fb4 --- /dev/null +++ b/dashboards/dashboards/models/dashboard_snapshots200_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from dashboards.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class DashboardSnapshots200Response(BaseModel): + """ + DashboardSnapshots200Response + """ # noqa: E501 + pages: Optional[Dict[str, Any]] = None + dashboard_snapshots: Optional[List[ApiDashboardSnapshot]] = Field(default=None, alias="dashboardSnapshots") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["pages", "dashboardSnapshots", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardSnapshots200Response 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 dashboard_snapshots (list) + _items = [] + if self.dashboard_snapshots: + for _item in self.dashboard_snapshots: + if _item: + _items.append(_item.to_dict()) + _dict['dashboardSnapshots'] = _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 DashboardSnapshots200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pages": obj.get("pages"), + "dashboardSnapshots": [ApiDashboardSnapshot.from_dict(_item) for _item in obj["dashboardSnapshots"]] if obj.get("dashboardSnapshots") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/dashboard_snapshots_page.py b/dashboards/dashboards/models/dashboard_snapshots_page.py new file mode 100644 index 00000000..b20630a6 --- /dev/null +++ b/dashboards/dashboards/models/dashboard_snapshots_page.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from typing import Optional, Set +from typing_extensions import Self + +class DashboardSnapshotsPage(BaseModel): + """ + Dashboard snapshots page. + """ # noqa: E501 + pages: Optional[Dict[str, Any]] = None + dashboard_snapshots: Optional[List[ApiDashboardSnapshot]] = Field(default=None, alias="dashboardSnapshots") + __properties: ClassVar[List[str]] = ["pages", "dashboardSnapshots"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardSnapshotsPage 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 dashboard_snapshots (list) + _items = [] + if self.dashboard_snapshots: + for _item in self.dashboard_snapshots: + if _item: + _items.append(_item.to_dict()) + _dict['dashboardSnapshots'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardSnapshotsPage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pages": obj.get("pages"), + "dashboardSnapshots": [ApiDashboardSnapshot.from_dict(_item) for _item in obj["dashboardSnapshots"]] if obj.get("dashboardSnapshots") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/default_timespan.py b/dashboards/dashboards/models/default_timespan.py new file mode 100644 index 00000000..01c0827a --- /dev/null +++ b/dashboards/dashboards/models/default_timespan.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class DefaultTimespan(BaseModel): + """ + DefaultTimespan + """ # noqa: E501 + timespan_duration: Optional[StrictInt] = Field(default=None, description="Relative timespan in seconds.", alias="timespanDuration") + timespan_start: Optional[StrictStr] = Field(default=None, description="UTC start date of the timespan range.", alias="timespanStart") + timespan_end: Optional[StrictStr] = Field(default=None, description="UTC end date of the timespan range.", alias="timespanEnd") + duration: Optional[StrictInt] = Field(default=None, description="Relative timespan in seconds.") + start: Optional[datetime] = Field(default=None, description="UTC start date of the timespan range (ISO date-time format).") + end: Optional[datetime] = Field(default=None, description="UTC end date of the timespan range (ISO date-time format).") + __properties: ClassVar[List[str]] = ["timespanDuration", "timespanStart", "timespanEnd", "duration", "start", "end"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DefaultTimespan 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 DefaultTimespan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timespanDuration": obj.get("timespanDuration"), + "timespanStart": obj.get("timespanStart"), + "timespanEnd": obj.get("timespanEnd"), + "duration": obj.get("duration"), + "start": obj.get("start"), + "end": obj.get("end") + }) + return _obj + + diff --git a/dashboards/dashboards/models/enterprise_agent_state.py b/dashboards/dashboards/models/enterprise_agent_state.py new file mode 100644 index 00000000..30bac9dd --- /dev/null +++ b/dashboards/dashboards/models/enterprise_agent_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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/dashboards/dashboards/models/error.py b/dashboards/dashboards/models/error.py new file mode 100644 index 00000000..35d786e9 --- /dev/null +++ b/dashboards/dashboards/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/dashboards_api/dashboards_api/models/generate_dashboard_snapshot_request.py b/dashboards/dashboards/models/generate_dashboard_snapshot_request.py similarity index 85% rename from dashboards_api/dashboards_api/models/generate_dashboard_snapshot_request.py rename to dashboards/dashboards/models/generate_dashboard_snapshot_request.py index 143a1c2b..0170b378 100644 --- a/dashboards_api/dashboards_api/models/generate_dashboard_snapshot_request.py +++ b/dashboards/dashboards/models/generate_dashboard_snapshot_request.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,13 +18,10 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GenerateDashboardSnapshotRequest(BaseModel): """ @@ -39,10 +36,11 @@ class GenerateDashboardSnapshotRequest(BaseModel): expiration_date: Optional[datetime] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format.", alias="expirationDate") __properties: ClassVar[List[str]] = ["startDate", "endDate", "displayName", "dashboardId", "anonymizeData", "timezone", "expirationDate"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ class GenerateDashboardSnapshotRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GenerateDashboardSnapshotRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +67,18 @@ class GenerateDashboardSnapshotRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GenerateDashboardSnapshotRequest from a dict""" if obj is None: return None diff --git a/dashboards_api/dashboards_api/models/geo_map_datasource.py b/dashboards/dashboards/models/geo_map_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/geo_map_datasource.py rename to dashboards/dashboards/models/geo_map_datasource.py index a20c8a98..5d13f608 100644 --- a/dashboards_api/dashboards_api/models/geo_map_datasource.py +++ b/dashboards/dashboards/models/geo_map_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class GeoMapDatasource(str, Enum): @@ -36,6 +28,7 @@ class GeoMapDatasource(str, Enum): """ ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards/dashboards/models/get_dashboard_data200_response.py b/dashboards/dashboards/models/get_dashboard_data200_response.py new file mode 100644 index 00000000..a3055205 --- /dev/null +++ b/dashboards/dashboards/models/get_dashboard_data200_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from dashboards.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetDashboardData200Response(BaseModel): + """ + GetDashboardData200Response + """ # noqa: E501 + 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") + group_labels: Optional[List[ApiReportDataComponentLabelMap]] = Field(default=None, alias="groupLabels") + bin_size: Optional[StrictInt] = Field(default=None, description="Duration of each bin.", alias="binSize") + data: Optional[ApiWidgetsDataV2] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "groupLabels", "binSize", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDashboardData200Response 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 group_labels (list) + _items = [] + if self.group_labels: + for _item in self.group_labels: + if _item: + _items.append(_item.to_dict()) + _dict['groupLabels'] = _items + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # 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 GetDashboardData200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "groupLabels": [ApiReportDataComponentLabelMap.from_dict(_item) for _item in obj["groupLabels"]] if obj.get("groupLabels") is not None else None, + "binSize": obj.get("binSize"), + "data": ApiWidgetsDataV2.from_dict(obj["data"]) if obj.get("data") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/grouped_bar_chart_datasource.py b/dashboards/dashboards/models/grouped_bar_chart_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/grouped_bar_chart_datasource.py rename to dashboards/dashboards/models/grouped_bar_chart_datasource.py index 5cb1eee2..832450be 100644 --- a/dashboards_api/dashboards_api/models/grouped_bar_chart_datasource.py +++ b/dashboards/dashboards/models/grouped_bar_chart_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class GroupedBarChartDatasource(str, Enum): @@ -37,6 +29,7 @@ class GroupedBarChartDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards/dashboards/models/legacy_agent_widget_show.py b/dashboards/dashboards/models/legacy_agent_widget_show.py new file mode 100644 index 00000000..5efdf1e4 --- /dev/null +++ b/dashboards/dashboards/models/legacy_agent_widget_show.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyAgentWidgetShow(str, Enum): + """ + Ownership of the agent. + """ + + """ + allowed enum values + """ + OWNED_AGENTS = 'Owned Agents' + ALL_ASSIGNED_AGENTS = 'All Assigned Agents' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LegacyAgentWidgetShow from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/legacy_agent_widget_type.py b/dashboards/dashboards/models/legacy_agent_widget_type.py new file mode 100644 index 00000000..f76c3657 --- /dev/null +++ b/dashboards/dashboards/models/legacy_agent_widget_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyAgentWidgetType(str, Enum): + """ + Type of the agent. + """ + + """ + allowed enum values + """ + ENTERPRISE_AGENTS = 'Enterprise Agents' + ENDPOINT_AGENTS = 'Endpoint Agents' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LegacyAgentWidgetType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/legacy_alert_list_alert_type.py b/dashboards/dashboards/models/legacy_alert_list_alert_type.py new file mode 100644 index 00000000..b0071b89 --- /dev/null +++ b/dashboards/dashboards/models/legacy_alert_list_alert_type.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyAlertListAlertType(str, Enum): + """ + Name of the alert type + """ + + """ + allowed enum values + """ + NETWORK_MINUS__END_MINUS_TO_MINUS_END_LEFT_PARENTHESIS_SERVER_RIGHT_PARENTHESIS = 'Network - End-to-End (Server)' + NETWORK_MINUS__END_MINUS_TO_MINUS_END_LEFT_PARENTHESIS_AGENT_RIGHT_PARENTHESIS = 'Network - End-to-End (Agent)' + NETWORK_MINUS__PATH_TRACE = 'Network - Path Trace' + DNS_SERVER = 'DNS Server' + DNS_TRACE = 'DNS Trace' + DNSSEC = 'DNSSEC' + DNS_PLUS__DOMAIN = 'DNS+ Domain' + DNS_PLUS__SERVER = 'DNS+ Server' + WEB_MINUS__HTTP_SERVER = 'Web - HTTP Server' + WEB_MINUS__PAGE_LOAD = 'Web - Page Load' + WEB_MINUS__TRANSACTION_LEFT_PARENTHESIS_CLASSIC_RIGHT_PARENTHESIS = 'Web - Transaction (Classic)' + WEB_MINUS__TRANSACTION = 'Web - Transaction' + WEB_MINUS__FTP_SERVER = 'Web - FTP Server' + VOICE_MINUS__SIP_SERVER = 'Voice - SIP Server' + VOICE_MINUS__RTP_STREAM = 'Voice - RTP Stream' + DEVICE = 'Device' + DEVICE_INTERFACE = 'Device Interface' + ENDPOINT_MINUS__END_MINUS_TO_MINUS_END_LEFT_PARENTHESIS_SERVER_RIGHT_PARENTHESIS = 'Endpoint - End-to-End (Server)' + ENDPOINT_WEB_MINUS__HTTP_SERVER = 'EndpointWeb - HTTP Server' + ENDPOINT_MINUS__PATH_TRACE = 'Endpoint - Path Trace' + BROWSER_SESSIONS_MINUS__AGENT = 'Browser Sessions - Agent' + BROWSER_SESSIONS_MINUS__APPLICATION = 'Browser Sessions - Application' + ROUTING_MINUS__BGP = 'Routing - BGP' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LegacyAlertListAlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/legacy_api_dashboard.py b/dashboards/dashboards/models/legacy_api_dashboard.py new file mode 100644 index 00000000..a8050675 --- /dev/null +++ b/dashboards/dashboards/models/legacy_api_dashboard.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LegacyApiDashboard(BaseModel): + """ + LegacyApiDashboard + """ # noqa: E501 + account_id: Optional[StrictInt] = Field(default=None, description="Identifier for the account group associated with a dashboard.", alias="accountId") + created_by: Optional[StrictInt] = Field(default=None, description="Identifier for the user that created a dashboard.", alias="createdBy") + modified_by: Optional[StrictInt] = Field(default=None, description="Identifier for the user that last modified a dashboard.", alias="modifiedBy") + modified_date: Optional[StrictStr] = Field(default=None, description="UTC date/time when a dashboard was last modified.", alias="modifiedDate") + global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="globalOverride") + migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="migratedReport") + api_link: Optional[List[Dict[str, Any]]] = Field(default=None, description="A links array containing the self and the snapshots links.", alias="apiLink") + __properties: ClassVar[List[str]] = ["accountId", "createdBy", "modifiedBy", "modifiedDate", "globalOverride", "migratedReport", "apiLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LegacyApiDashboard 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. + """ + excluded_fields: Set[str] = set([ + "account_id", + "created_by", + "modified_by", + "modified_date", + "migrated_report", + ]) + + _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 LegacyApiDashboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountId": obj.get("accountId"), + "createdBy": obj.get("createdBy"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "globalOverride": obj.get("globalOverride"), + "migratedReport": obj.get("migratedReport"), + "apiLink": obj.get("apiLink") + }) + return _obj + + diff --git a/dashboards/dashboards/models/legacy_dashboard_snapshot.py b/dashboards/dashboards/models/legacy_dashboard_snapshot.py new file mode 100644 index 00000000..91133a79 --- /dev/null +++ b/dashboards/dashboards/models/legacy_dashboard_snapshot.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyDashboardSnapshot(BaseModel): + """ + LegacyDashboardSnapshot + """ # noqa: E501 + account_id: Optional[StrictInt] = Field(default=None, description="Identifier of the account group that the snapshot belongs to.", alias="accountId") + created_date: Optional[StrictStr] = Field(default=None, description="UTC date when dashboard snapshot was created.", alias="createdDate") + expiration_date: Optional[StrictStr] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date.", alias="expirationDate") + permalink: Optional[StrictStr] = Field(default=None, description="Hyperlink to dashboard snapshot in ThousandEyes Application") + api_links: Optional[List[Dict[str, Any]]] = Field(default=None, description="A links array containing the self link.", alias="apiLinks") + __properties: ClassVar[List[str]] = ["accountId", "createdDate", "expirationDate", "permalink", "apiLinks"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LegacyDashboardSnapshot 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 LegacyDashboardSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountId": obj.get("accountId"), + "createdDate": obj.get("createdDate"), + "expirationDate": obj.get("expirationDate"), + "permalink": obj.get("permalink"), + "apiLinks": obj.get("apiLinks") + }) + return _obj + + diff --git a/dashboards/dashboards/models/legacy_default_timespan.py b/dashboards/dashboards/models/legacy_default_timespan.py new file mode 100644 index 00000000..3735d26b --- /dev/null +++ b/dashboards/dashboards/models/legacy_default_timespan.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyDefaultTimespan(BaseModel): + """ + LegacyDefaultTimespan + """ # noqa: E501 + timespan_duration: Optional[StrictInt] = Field(default=None, description="Relative timespan in seconds.", alias="timespanDuration") + timespan_start: Optional[StrictStr] = Field(default=None, description="UTC start date of the timespan range.", alias="timespanStart") + timespan_end: Optional[StrictStr] = Field(default=None, description="UTC end date of the timespan range.", alias="timespanEnd") + __properties: ClassVar[List[str]] = ["timespanDuration", "timespanStart", "timespanEnd"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LegacyDefaultTimespan 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 LegacyDefaultTimespan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timespanDuration": obj.get("timespanDuration"), + "timespanStart": obj.get("timespanStart"), + "timespanEnd": obj.get("timespanEnd") + }) + return _obj + + diff --git a/dashboards/dashboards/models/legacy_duration_unit.py b/dashboards/dashboards/models/legacy_duration_unit.py new file mode 100644 index 00000000..3cdbd257 --- /dev/null +++ b/dashboards/dashboards/models/legacy_duration_unit.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyDurationUnit(str, Enum): + """ + Timespan unit. + """ + + """ + allowed enum values + """ + MINUTES = 'Minutes' + HOURS = 'Hours' + DAYS = 'Days' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LegacyDurationUnit from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/legacy_widget_sort_direction.py b/dashboards/dashboards/models/legacy_widget_sort_direction.py new file mode 100644 index 00000000..81d30ad4 --- /dev/null +++ b/dashboards/dashboards/models/legacy_widget_sort_direction.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyWidgetSortDirection(str, Enum): + """ + Specifies the order in which cards are sorted. + """ + + """ + allowed enum values + """ + ASCENDING = 'Ascending' + DESCENDING = 'Descending' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LegacyWidgetSortDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/legacy_widget_sort_property.py b/dashboards/dashboards/models/legacy_widget_sort_property.py new file mode 100644 index 00000000..c9ddc833 --- /dev/null +++ b/dashboards/dashboards/models/legacy_widget_sort_property.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 LegacyWidgetSortProperty(str, Enum): + """ + Determines the card sorting criterion. + """ + + """ + allowed enum values + """ + ALPHABETICAL = 'Alphabetical' + VALUE = 'Value' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of LegacyWidgetSortProperty from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/link.py b/dashboards/dashboards/models/link.py new file mode 100644 index 00000000..a222f411 --- /dev/null +++ b/dashboards/dashboards/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/dashboards_api/dashboards_api/models/metric_group.py b/dashboards/dashboards/models/metric_group.py similarity index 88% rename from dashboards_api/dashboards_api/models/metric_group.py rename to dashboards/dashboards/models/metric_group.py index b4902a14..30e1efd7 100644 --- a/dashboards_api/dashboards_api/models/metric_group.py +++ b/dashboards/dashboards/models/metric_group.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class MetricGroup(str, Enum): @@ -41,8 +33,9 @@ class MetricGroup(str, Enum): PAGE_LOAD = 'PAGE_LOAD' TRANSACTIONS_CLASSIC = 'TRANSACTIONS_CLASSIC' TRANSACTIONS = 'TRANSACTIONS' + API = 'API' ENDPOINT_BROWSER_SESSION_NETWORK = 'ENDPOINT_BROWSER_SESSION_NETWORK' - ENDPOINT_BROWSER_SESSION_SYSTEMK = 'ENDPOINT_BROWSER_SESSION_SYSTEMK' + ENDPOINT_BROWSER_SESSION_SYSTEM = 'ENDPOINT_BROWSER_SESSION_SYSTEM' ENDPOINT_BROWSER_SESSION_VISITED_PAGES = 'ENDPOINT_BROWSER_SESSION_VISITED_PAGES' ENDPOINT_SCHEDULED_TEST_HTTP_SERVER = 'ENDPOINT_SCHEDULED_TEST_HTTP_SERVER' ENDPOINT_SCHEDULED_TEST_NETWORK = 'ENDPOINT_SCHEDULED_TEST_NETWORK' diff --git a/dashboards_api/dashboards_api/models/multi_metrics_table_datasource.py b/dashboards/dashboards/models/multi_metrics_table_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/multi_metrics_table_datasource.py rename to dashboards/dashboards/models/multi_metrics_table_datasource.py index 61d60ddc..85b3108b 100644 --- a/dashboards_api/dashboards_api/models/multi_metrics_table_datasource.py +++ b/dashboards/dashboards/models/multi_metrics_table_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class MultiMetricsTableDatasource(str, Enum): @@ -37,6 +29,7 @@ class MultiMetricsTableDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards_api/dashboards_api/models/numbers_card_datasource.py b/dashboards/dashboards/models/numbers_card_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/numbers_card_datasource.py rename to dashboards/dashboards/models/numbers_card_datasource.py index 2e50a7a6..3821a114 100644 --- a/dashboards_api/dashboards_api/models/numbers_card_datasource.py +++ b/dashboards/dashboards/models/numbers_card_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class NumbersCardDatasource(str, Enum): @@ -37,6 +29,7 @@ class NumbersCardDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards/dashboards/models/pagination_links.py b/dashboards/dashboards/models/pagination_links.py new file mode 100644 index 00000000..2e7c3dbb --- /dev/null +++ b/dashboards/dashboards/models/pagination_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/pagination_links_links.py b/dashboards/dashboards/models/pagination_links_links.py new file mode 100644 index 00000000..96b049ea --- /dev/null +++ b/dashboards/dashboards/models/pagination_links_links.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinksLinks(BaseModel): + """ + PaginationLinksLinks + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationLinksLinks 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 PaginationLinksLinks 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/dashboards_api/dashboards_api/models/pie_chart_datasource.py b/dashboards/dashboards/models/pie_chart_datasource.py similarity index 77% rename from dashboards_api/dashboards_api/models/pie_chart_datasource.py rename to dashboards/dashboards/models/pie_chart_datasource.py index 67276815..1a050af6 100644 --- a/dashboards_api/dashboards_api/models/pie_chart_datasource.py +++ b/dashboards/dashboards/models/pie_chart_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class PieChartDatasource(str, Enum): @@ -35,6 +27,7 @@ class PieChartDatasource(str, Enum): allowed enum values """ CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' diff --git a/dashboards/dashboards/models/query_window.py b/dashboards/dashboards/models/query_window.py new file mode 100644 index 00000000..fbc7ee84 --- /dev/null +++ b/dashboards/dashboards/models/query_window.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class QueryWindow(BaseModel): + """ + QueryWindow + """ # noqa: E501 + 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") + __properties: ClassVar[List[str]] = ["startDate", "endDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueryWindow 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, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueryWindow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/scalable_widget.py b/dashboards/dashboards/models/scalable_widget.py similarity index 75% rename from dashboards_api/dashboards_api/models/scalable_widget.py rename to dashboards/dashboards/models/scalable_widget.py index 10c3425d..9b3324eb 100644 --- a/dashboards_api/dashboards_api/models/scalable_widget.py +++ b/dashboards/dashboards/models/scalable_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,29 +17,26 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix +from typing import Optional, Set +from typing_extensions import Self class ScalableWidget(BaseModel): """ ScalableWidget """ # noqa: E501 - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") + min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum scale configured in the widget.", alias="minScale") max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") unit: Optional[ApiWidgetFixedYScalePrefix] = None __properties: ClassVar[List[str]] = ["minScale", "maxScale", "unit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class ScalableWidget(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ScalableWidget from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,16 +63,18 @@ class ScalableWidget(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ScalableWidget from a dict""" if obj is None: return None diff --git a/dashboards/dashboards/models/self_links.py b/dashboards/dashboards/models/self_links.py new file mode 100644 index 00000000..a33afc95 --- /dev/null +++ b/dashboards/dashboards/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/self_links_links.py b/dashboards/dashboards/models/self_links_links.py new file mode 100644 index 00000000..1065bd0c --- /dev/null +++ b/dashboards/dashboards/models/self_links_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/dashboards/dashboards/models/snapshot_data_by_widget200_response.py b/dashboards/dashboards/models/snapshot_data_by_widget200_response.py new file mode 100644 index 00000000..b80ed88b --- /dev/null +++ b/dashboards/dashboards/models/snapshot_data_by_widget200_response.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from dashboards.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SnapshotDataByWidget200Response(BaseModel): + """ + SnapshotDataByWidget200Response + """ # noqa: E501 + 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") + group_labels: Optional[List[ApiReportDataComponentLabelMap]] = Field(default=None, alias="groupLabels") + bin_size: Optional[StrictInt] = Field(default=None, description="Duration of each bin.", alias="binSize") + data: Optional[ApiWidgetsDataV2] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "groupLabels", "binSize", "data", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SnapshotDataByWidget200Response 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 group_labels (list) + _items = [] + if self.group_labels: + for _item in self.group_labels: + if _item: + _items.append(_item.to_dict()) + _dict['groupLabels'] = _items + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # 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 SnapshotDataByWidget200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "groupLabels": [ApiReportDataComponentLabelMap.from_dict(_item) for _item in obj["groupLabels"]] if obj.get("groupLabels") is not None else None, + "binSize": obj.get("binSize"), + "data": ApiWidgetsDataV2.from_dict(obj["data"]) if obj.get("data") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/stacked_area_chart_datasource.py b/dashboards/dashboards/models/stacked_area_chart_datasource.py similarity index 77% rename from dashboards_api/dashboards_api/models/stacked_area_chart_datasource.py rename to dashboards/dashboards/models/stacked_area_chart_datasource.py index 28ec7479..27388c35 100644 --- a/dashboards_api/dashboards_api/models/stacked_area_chart_datasource.py +++ b/dashboards/dashboards/models/stacked_area_chart_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class StackedAreaChartDatasource(str, Enum): @@ -35,6 +27,7 @@ class StackedAreaChartDatasource(str, Enum): allowed enum values """ CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' diff --git a/dashboards_api/dashboards_api/models/stacked_bar_chart_datasource.py b/dashboards/dashboards/models/stacked_bar_chart_datasource.py similarity index 77% rename from dashboards_api/dashboards_api/models/stacked_bar_chart_datasource.py rename to dashboards/dashboards/models/stacked_bar_chart_datasource.py index d543b201..2614d033 100644 --- a/dashboards_api/dashboards_api/models/stacked_bar_chart_datasource.py +++ b/dashboards/dashboards/models/stacked_bar_chart_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class StackedBarChartDatasource(str, Enum): @@ -35,6 +27,7 @@ class StackedBarChartDatasource(str, Enum): allowed enum values """ CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' diff --git a/dashboards_api/dashboards_api/models/table_datasource.py b/dashboards/dashboards/models/table_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/table_datasource.py rename to dashboards/dashboards/models/table_datasource.py index a01eba86..d9226472 100644 --- a/dashboards_api/dashboards_api/models/table_datasource.py +++ b/dashboards/dashboards/models/table_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class TableDatasource(str, Enum): @@ -37,6 +29,7 @@ class TableDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards/dashboards/models/test_table_datasource.py b/dashboards/dashboards/models/test_table_datasource.py new file mode 100644 index 00000000..767d8e44 --- /dev/null +++ b/dashboards/dashboards/models/test_table_datasource.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 TestTableDatasource(str, Enum): + """ + Datasource of the test table widget. + """ + + """ + allowed enum values + """ + ALERTS = 'ALERTS' + DEVICES = 'DEVICES' + DNSP = 'DNSP' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' + ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' + ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' + ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' + ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' + ENDPOINT_LOCAL_NETWORK_WIRELESS = 'ENDPOINT_LOCAL_NETWORK_WIRELESS' + ROUTING = 'ROUTING' + CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' + INTERNET_INSIGHTS = 'INTERNET_INSIGHTS' + APPDYNAMICS_SERVICE_HEALTH = 'APPDYNAMICS_SERVICE_HEALTH' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestTableDatasource from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards_api/dashboards_api/models/test_table_filter_key.py b/dashboards/dashboards/models/test_table_filter_key.py similarity index 76% rename from dashboards_api/dashboards_api/models/test_table_filter_key.py rename to dashboards/dashboards/models/test_table_filter_key.py index 21907130..52a3a7e1 100644 --- a/dashboards_api/dashboards_api/models/test_table_filter_key.py +++ b/dashboards/dashboards/models/test_table_filter_key.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class TestTableFilterKey(str, Enum): diff --git a/dashboards/dashboards/models/test_table_filter_type.py b/dashboards/dashboards/models/test_table_filter_type.py new file mode 100644 index 00000000..8af51bd4 --- /dev/null +++ b/dashboards/dashboards/models/test_table_filter_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 TestTableFilterType(str, Enum): + """ + TestTableFilterType + """ + + """ + allowed enum values + """ + ALL = 'all' + ANY = 'any' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestTableFilterType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards_api/dashboards_api/models/timeseries_datasource.py b/dashboards/dashboards/models/timeseries_datasource.py similarity index 82% rename from dashboards_api/dashboards_api/models/timeseries_datasource.py rename to dashboards/dashboards/models/timeseries_datasource.py index 8c00de61..07a3c4d6 100644 --- a/dashboards_api/dashboards_api/models/timeseries_datasource.py +++ b/dashboards/dashboards/models/timeseries_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class TimeseriesDatasource(str, Enum): @@ -37,6 +29,7 @@ class TimeseriesDatasource(str, Enum): ALERTS = 'ALERTS' CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' DEVICES = 'DEVICES' + ENDPOINT_AGENTS = 'ENDPOINT_AGENTS' ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' diff --git a/dashboards/dashboards/models/unauthorized_error.py b/dashboards/dashboards/models/unauthorized_error.py new file mode 100644 index 00000000..9a39ddd0 --- /dev/null +++ b/dashboards/dashboards/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/dashboards/dashboards/models/update_snapshot_expiration_date_api_request.py b/dashboards/dashboards/models/update_snapshot_expiration_date_api_request.py new file mode 100644 index 00000000..845fcb7f --- /dev/null +++ b/dashboards/dashboards/models/update_snapshot_expiration_date_api_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class UpdateSnapshotExpirationDateApiRequest(BaseModel): + """ + Request to update the expiration date of a snapshot. + """ # noqa: E501 + snapshot_expiration_date: Optional[datetime] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format.", alias="snapshotExpirationDate") + expiration_date: Optional[StrictStr] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date.", alias="expirationDate") + __properties: ClassVar[List[str]] = ["snapshotExpirationDate", "expirationDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateSnapshotExpirationDateApiRequest 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 UpdateSnapshotExpirationDateApiRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshotExpirationDate": obj.get("snapshotExpirationDate"), + "expirationDate": obj.get("expirationDate") + }) + return _obj + + diff --git a/dashboards/dashboards/models/validation_error.py b/dashboards/dashboards/models/validation_error.py new file mode 100644 index 00000000..ea27a926 --- /dev/null +++ b/dashboards/dashboards/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/dashboards/dashboards/models/validation_error_all_of_errors.py b/dashboards/dashboards/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..ec75d337 --- /dev/null +++ b/dashboards/dashboards/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/dashboards/dashboards/models/visual_mode.py b/dashboards/dashboards/models/visual_mode.py new file mode 100644 index 00000000..6294c3b9 --- /dev/null +++ b/dashboards/dashboards/models/visual_mode.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 VisualMode(str, Enum): + """ + Visual mode in the UI. Either full or half the width of the window. + """ + + """ + allowed enum values + """ + FULL = 'Full' + HALF_SCREEN = 'Half screen' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of VisualMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/dashboards/dashboards/models/widget.py b/dashboards/dashboards/models/widget.py new file mode 100644 index 00000000..38a303f3 --- /dev/null +++ b/dashboards/dashboards/models/widget.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + 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 dashboards.models.api_duration import ApiDuration +from dashboards.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection +from dashboards.models.metric_group import MetricGroup +from dashboards.models.self_links_links import SelfLinksLinks +from dashboards.models.visual_mode import VisualMode +from typing import Optional, Set +from typing_extensions import Self + +class Widget(BaseModel): + """ + Widget + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") + title: Optional[StrictStr] = Field(default=None, description="Title of the widget") + visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") + embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") + is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") + metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") + direction: Optional[DashboardMetricDirection] = None + metric: Optional[DashboardMetric] = None + filters: Optional[Dict[str, List[Any]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property.") + measure: Optional[ApiWidgetMeasure] = None + fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") + api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") + should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") + __properties: ClassVar[List[str]] = ["_links", "id", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Widget 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([ + "id", + "embed_url", + "api_link", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 measure + if self.measure: + _dict['measure'] = self.measure.to_dict() + # override the default output from pydantic by calling `to_dict()` of fixed_timespan + if self.fixed_timespan: + _dict['fixedTimespan'] = self.fixed_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Widget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "id": obj.get("id"), + "title": obj.get("title"), + "visualMode": obj.get("visualMode"), + "embedUrl": obj.get("embedUrl"), + "isEmbedded": obj.get("isEmbedded"), + "metricGroup": obj.get("metricGroup"), + "direction": obj.get("direction"), + "metric": obj.get("metric"), + "filters": obj.get("filters"), + "measure": ApiWidgetMeasure.from_dict(obj["measure"]) if obj.get("measure") is not None else None, + "fixedTimespan": ApiDuration.from_dict(obj["fixedTimespan"]) if obj.get("fixedTimespan") is not None else None, + "apiLink": obj.get("apiLink"), + "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows") + }) + return _obj + + diff --git a/dashboards_api/dashboards_api/models/widget_measure_type.py b/dashboards/dashboards/models/widget_measure_type.py similarity index 79% rename from dashboards_api/dashboards_api/models/widget_measure_type.py rename to dashboards/dashboards/models/widget_measure_type.py index b7d05158..55a4ce3f 100644 --- a/dashboards_api/dashboards_api/models/widget_measure_type.py +++ b/dashboards/dashboards/models/widget_measure_type.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class WidgetMeasureType(str, Enum): diff --git a/dashboards_api/dashboards_api/models/widget_type.py b/dashboards/dashboards/models/widget_type.py similarity index 82% rename from dashboards_api/dashboards_api/models/widget_type.py rename to dashboards/dashboards/models/widget_type.py index 84c163ca..add426dd 100644 --- a/dashboards_api/dashboards_api/models/widget_type.py +++ b/dashboards/dashboards/models/widget_type.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class WidgetType(str, Enum): diff --git a/dashboards_api/dashboards_api/py.typed b/dashboards/dashboards/py.typed similarity index 100% rename from dashboards_api/dashboards_api/py.typed rename to dashboards/dashboards/py.typed diff --git a/dashboards/dashboards/rest.py b/dashboards/dashboards/rest.py new file mode 100644 index 00000000..b5b3c195 --- /dev/null +++ b/dashboards/dashboards/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from dashboards.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/dashboards_api/docs/AgentStatusDatasource.md b/dashboards/docs/AgentStatusDatasource.md similarity index 99% rename from dashboards_api/docs/AgentStatusDatasource.md rename to dashboards/docs/AgentStatusDatasource.md index af1f0156..e1bf3489 100644 --- a/dashboards_api/docs/AgentStatusDatasource.md +++ b/dashboards/docs/AgentStatusDatasource.md @@ -3,6 +3,7 @@ Datasource of the agent to retrieve status. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/AlertListAlertType.md b/dashboards/docs/AlertListAlertType.md new file mode 100644 index 00000000..37fafeb8 --- /dev/null +++ b/dashboards/docs/AlertListAlertType.md @@ -0,0 +1,12 @@ +# AlertListAlertType + +Name of the alert type + +## 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/dashboards_api/docs/AlertListDatasource.md b/dashboards/docs/AlertListDatasource.md similarity index 99% rename from dashboards_api/docs/AlertListDatasource.md rename to dashboards/docs/AlertListDatasource.md index cc00957a..67f3f7ef 100644 --- a/dashboards_api/docs/AlertListDatasource.md +++ b/dashboards/docs/AlertListDatasource.md @@ -3,6 +3,7 @@ Datasource of the alert list. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/ApiAgentLocation.md b/dashboards/docs/ApiAgentLocation.md similarity index 83% rename from dashboards_api/docs/ApiAgentLocation.md rename to dashboards/docs/ApiAgentLocation.md index a2babd4f..5989cf36 100644 --- a/dashboards_api/docs/ApiAgentLocation.md +++ b/dashboards/docs/ApiAgentLocation.md @@ -3,6 +3,7 @@ Location of the agent. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **latitude** | **float** | Latitude of the agent. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_agent_location import ApiAgentLocation +from dashboards.models.api_agent_location import ApiAgentLocation # TODO update the JSON string below json = "{}" # create an instance of ApiAgentLocation from a JSON string api_agent_location_instance = ApiAgentLocation.from_json(json) # print the JSON string representation of the object -print ApiAgentLocation.to_json() +print(ApiAgentLocation.to_json()) # convert the object into a dict api_agent_location_dict = api_agent_location_instance.to_dict() # create an instance of ApiAgentLocation from a dict -api_agent_location_form_dict = api_agent_location.from_dict(api_agent_location_dict) +api_agent_location_from_dict = ApiAgentLocation.from_dict(api_agent_location_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/dashboards_api/docs/ApiAgentStatusAgent.md b/dashboards/docs/ApiAgentStatusAgent.md similarity index 84% rename from dashboards_api/docs/ApiAgentStatusAgent.md rename to dashboards/docs/ApiAgentStatusAgent.md index f99b4579..1c4e6fd4 100644 --- a/dashboards_api/docs/ApiAgentStatusAgent.md +++ b/dashboards/docs/ApiAgentStatusAgent.md @@ -3,6 +3,7 @@ Agent shown in agent status widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Identifier of the agent. | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_agent_status_agent import ApiAgentStatusAgent +from dashboards.models.api_agent_status_agent import ApiAgentStatusAgent # TODO update the JSON string below json = "{}" # create an instance of ApiAgentStatusAgent from a JSON string api_agent_status_agent_instance = ApiAgentStatusAgent.from_json(json) # print the JSON string representation of the object -print ApiAgentStatusAgent.to_json() +print(ApiAgentStatusAgent.to_json()) # convert the object into a dict api_agent_status_agent_dict = api_agent_status_agent_instance.to_dict() # create an instance of ApiAgentStatusAgent from a dict -api_agent_status_agent_form_dict = api_agent_status_agent.from_dict(api_agent_status_agent_dict) +api_agent_status_agent_from_dict = ApiAgentStatusAgent.from_dict(api_agent_status_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/dashboards_api/docs/ApiAgentStatusIpInfo.md b/dashboards/docs/ApiAgentStatusIpInfo.md similarity index 81% rename from dashboards_api/docs/ApiAgentStatusIpInfo.md rename to dashboards/docs/ApiAgentStatusIpInfo.md index f8da582b..9c07c191 100644 --- a/dashboards_api/docs/ApiAgentStatusIpInfo.md +++ b/dashboards/docs/ApiAgentStatusIpInfo.md @@ -3,6 +3,7 @@ IP information of the agent. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **public_ip** | **str** | Public IP of the agent. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_agent_status_ip_info import ApiAgentStatusIpInfo +from dashboards.models.api_agent_status_ip_info import ApiAgentStatusIpInfo # TODO update the JSON string below json = "{}" # create an instance of ApiAgentStatusIpInfo from a JSON string api_agent_status_ip_info_instance = ApiAgentStatusIpInfo.from_json(json) # print the JSON string representation of the object -print ApiAgentStatusIpInfo.to_json() +print(ApiAgentStatusIpInfo.to_json()) # convert the object into a dict api_agent_status_ip_info_dict = api_agent_status_ip_info_instance.to_dict() # create an instance of ApiAgentStatusIpInfo from a dict -api_agent_status_ip_info_form_dict = api_agent_status_ip_info.from_dict(api_agent_status_ip_info_dict) +api_agent_status_ip_info_from_dict = ApiAgentStatusIpInfo.from_dict(api_agent_status_ip_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/dashboards_api/docs/ApiAgentStatusSummary.md b/dashboards/docs/ApiAgentStatusSummary.md similarity index 82% rename from dashboards_api/docs/ApiAgentStatusSummary.md rename to dashboards/docs/ApiAgentStatusSummary.md index dcdd23a5..9d1f4c1a 100644 --- a/dashboards_api/docs/ApiAgentStatusSummary.md +++ b/dashboards/docs/ApiAgentStatusSummary.md @@ -3,6 +3,7 @@ Summary of the agent status. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **online** | **int** | Shows the number of agents with an online status. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_agent_status_summary import ApiAgentStatusSummary +from dashboards.models.api_agent_status_summary import ApiAgentStatusSummary # TODO update the JSON string below json = "{}" # create an instance of ApiAgentStatusSummary from a JSON string api_agent_status_summary_instance = ApiAgentStatusSummary.from_json(json) # print the JSON string representation of the object -print ApiAgentStatusSummary.to_json() +print(ApiAgentStatusSummary.to_json()) # convert the object into a dict api_agent_status_summary_dict = api_agent_status_summary_instance.to_dict() # create an instance of ApiAgentStatusSummary from a dict -api_agent_status_summary_form_dict = api_agent_status_summary.from_dict(api_agent_status_summary_dict) +api_agent_status_summary_from_dict = ApiAgentStatusSummary.from_dict(api_agent_status_summary_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/dashboards/docs/ApiAgentStatusWidget.md b/dashboards/docs/ApiAgentStatusWidget.md new file mode 100644 index 00000000..1ade5fa6 --- /dev/null +++ b/dashboards/docs/ApiAgentStatusWidget.md @@ -0,0 +1,46 @@ +# ApiAgentStatusWidget + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Identifier of the widget. | [optional] [readonly] +**title** | **str** | Title of the widget | [optional] +**visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] +**embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] +**is_embedded** | **bool** | Set to `true` if widget is marked as embedded; otherwise, set to `false`. | [optional] +**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] +**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] +**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] +**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] +**fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] +**api_link** | **str** | | [optional] [readonly] +**should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Agent Status widget type. | +**agents** | [**LegacyAgentWidgetType**](LegacyAgentWidgetType.md) | | [optional] +**show** | [**LegacyAgentWidgetShow**](LegacyAgentWidgetShow.md) | | [optional] +**data_source** | [**AgentStatusDatasource**](AgentStatusDatasource.md) | | [optional] + +## Example + +```python +from dashboards.models.api_agent_status_widget import ApiAgentStatusWidget + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiAgentStatusWidget from a JSON string +api_agent_status_widget_instance = ApiAgentStatusWidget.from_json(json) +# print the JSON string representation of the object +print(ApiAgentStatusWidget.to_json()) + +# convert the object into a dict +api_agent_status_widget_dict = api_agent_status_widget_instance.to_dict() +# create an instance of ApiAgentStatusWidget from a dict +api_agent_status_widget_from_dict = ApiAgentStatusWidget.from_dict(api_agent_status_widget_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/dashboards/docs/ApiAgentWidgetShow.md b/dashboards/docs/ApiAgentWidgetShow.md new file mode 100644 index 00000000..ad666be6 --- /dev/null +++ b/dashboards/docs/ApiAgentWidgetShow.md @@ -0,0 +1,12 @@ +# ApiAgentWidgetShow + +Ownership 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/dashboards/docs/ApiAgentWidgetType.md b/dashboards/docs/ApiAgentWidgetType.md new file mode 100644 index 00000000..0be0c87f --- /dev/null +++ b/dashboards/docs/ApiAgentWidgetType.md @@ -0,0 +1,12 @@ +# ApiAgentWidgetType + +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/dashboards_api/docs/ApiAggregateProperty.md b/dashboards/docs/ApiAggregateProperty.md similarity index 99% rename from dashboards_api/docs/ApiAggregateProperty.md rename to dashboards/docs/ApiAggregateProperty.md index ee4e9122..40209081 100644 --- a/dashboards_api/docs/ApiAggregateProperty.md +++ b/dashboards/docs/ApiAggregateProperty.md @@ -3,6 +3,7 @@ Defines the property by which to aggregate the metric. Metrics are grouped based on unique values of the chosen property. Selecting `ALL` aggregates the data into a single group. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/ApiAlertListAlert.md b/dashboards/docs/ApiAlertListAlert.md similarity index 83% rename from dashboards_api/docs/ApiAlertListAlert.md rename to dashboards/docs/ApiAlertListAlert.md index fc8571b7..84af2644 100644 --- a/dashboards_api/docs/ApiAlertListAlert.md +++ b/dashboards/docs/ApiAlertListAlert.md @@ -3,6 +3,7 @@ Alert shown in the alert list widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **alert_id** | **str** | Identifier of the alert. | [optional] @@ -10,7 +11,7 @@ Name | Type | Description | Notes **rule_id** | **str** | Identifier of the rule. | [optional] **alert_source** | **str** | Name of the agent, monitor or device producing the alert. | [optional] **alert_rule** | **str** | Name of the alert rule that this alert belongs to. | [optional] -**alert_type** | [**ApiAlertListAlertType**](ApiAlertListAlertType.md) | | [optional] +**alert_type** | [**AlertListAlertType**](AlertListAlertType.md) | | [optional] **start_time** | **datetime** | UTC date when the alert was first active. | [optional] **duration_in_seconds** | **int** | Number of seconds the alert was active. If it’s still active, this number will increase every second. | [optional] **active** | **bool** | Set to `true` if alert is active, `false` otherwise. | [optional] @@ -18,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_alert_list_alert import ApiAlertListAlert +from dashboards.models.api_alert_list_alert import ApiAlertListAlert # TODO update the JSON string below json = "{}" # create an instance of ApiAlertListAlert from a JSON string api_alert_list_alert_instance = ApiAlertListAlert.from_json(json) # print the JSON string representation of the object -print ApiAlertListAlert.to_json() +print(ApiAlertListAlert.to_json()) # convert the object into a dict api_alert_list_alert_dict = api_alert_list_alert_instance.to_dict() # create an instance of ApiAlertListAlert from a dict -api_alert_list_alert_form_dict = api_alert_list_alert.from_dict(api_alert_list_alert_dict) +api_alert_list_alert_from_dict = ApiAlertListAlert.from_dict(api_alert_list_alert_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/dashboards_api/docs/ApiAlertListWidget.md b/dashboards/docs/ApiAlertListWidget.md similarity index 75% rename from dashboards_api/docs/ApiAlertListWidget.md rename to dashboards/docs/ApiAlertListWidget.md index 29a56910..01a67563 100644 --- a/dashboards_api/docs/ApiAlertListWidget.md +++ b/dashboards/docs/ApiAlertListWidget.md @@ -2,10 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -13,13 +13,14 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**alert_types** | [**List[ApiAlertListAlertType]**](ApiAlertListAlertType.md) | List of alert types configured in the widget, an empty list means all alert types. | [optional] +**type** | **str** | Alert List widget type. | +**alert_types** | [**List[LegacyAlertListAlertType]**](LegacyAlertListAlertType.md) | List of alert types configured in the widget, an empty list means all alert types. | [optional] **limit_to** | **int** | Limit the number of alerts displayed in the widget. | [optional] **active_within** | [**ApiAlertListWidgetAllOfActiveWithin**](ApiAlertListWidgetAllOfActiveWithin.md) | | [optional] **data_source** | [**AlertListDatasource**](AlertListDatasource.md) | | [optional] @@ -27,19 +28,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_alert_list_widget import ApiAlertListWidget +from dashboards.models.api_alert_list_widget import ApiAlertListWidget # TODO update the JSON string below json = "{}" # create an instance of ApiAlertListWidget from a JSON string api_alert_list_widget_instance = ApiAlertListWidget.from_json(json) # print the JSON string representation of the object -print ApiAlertListWidget.to_json() +print(ApiAlertListWidget.to_json()) # convert the object into a dict api_alert_list_widget_dict = api_alert_list_widget_instance.to_dict() # create an instance of ApiAlertListWidget from a dict -api_alert_list_widget_form_dict = api_alert_list_widget.from_dict(api_alert_list_widget_dict) +api_alert_list_widget_from_dict = ApiAlertListWidget.from_dict(api_alert_list_widget_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/dashboards/docs/ApiAlertListWidgetAllOfActiveWithin.md b/dashboards/docs/ApiAlertListWidgetAllOfActiveWithin.md new file mode 100644 index 00000000..be1c40c1 --- /dev/null +++ b/dashboards/docs/ApiAlertListWidgetAllOfActiveWithin.md @@ -0,0 +1,30 @@ +# ApiAlertListWidgetAllOfActiveWithin + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | Timespan value. | [optional] +**unit** | [**LegacyDurationUnit**](LegacyDurationUnit.md) | | [optional] + +## Example + +```python +from dashboards.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiAlertListWidgetAllOfActiveWithin from a JSON string +api_alert_list_widget_all_of_active_within_instance = ApiAlertListWidgetAllOfActiveWithin.from_json(json) +# print the JSON string representation of the object +print(ApiAlertListWidgetAllOfActiveWithin.to_json()) + +# convert the object into a dict +api_alert_list_widget_all_of_active_within_dict = api_alert_list_widget_all_of_active_within_instance.to_dict() +# create an instance of ApiAlertListWidgetAllOfActiveWithin from a dict +api_alert_list_widget_all_of_active_within_from_dict = ApiAlertListWidgetAllOfActiveWithin.from_dict(api_alert_list_widget_all_of_active_within_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/dashboards_api/docs/ApiBoxAndWhiskersWidget.md b/dashboards/docs/ApiBoxAndWhiskersWidget.md similarity index 79% rename from dashboards_api/docs/ApiBoxAndWhiskersWidget.md rename to dashboards/docs/ApiBoxAndWhiskersWidget.md index 4eab8cf2..b07e06d3 100644 --- a/dashboards_api/docs/ApiBoxAndWhiskersWidget.md +++ b/dashboards/docs/ApiBoxAndWhiskersWidget.md @@ -3,10 +3,10 @@ A widget that displays a box and whisker plot, mapping data points over time with key statistics: median, range, and quartiles. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,34 +14,35 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] +**type** | **str** | Box and Whiskers widget type. | **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **data_source** | [**BoxAndWhiskersDatasource**](BoxAndWhiskersDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget +from dashboards.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget # TODO update the JSON string below json = "{}" # create an instance of ApiBoxAndWhiskersWidget from a JSON string api_box_and_whiskers_widget_instance = ApiBoxAndWhiskersWidget.from_json(json) # print the JSON string representation of the object -print ApiBoxAndWhiskersWidget.to_json() +print(ApiBoxAndWhiskersWidget.to_json()) # convert the object into a dict api_box_and_whiskers_widget_dict = api_box_and_whiskers_widget_instance.to_dict() # create an instance of ApiBoxAndWhiskersWidget from a dict -api_box_and_whiskers_widget_form_dict = api_box_and_whiskers_widget.from_dict(api_box_and_whiskers_widget_dict) +api_box_and_whiskers_widget_from_dict = ApiBoxAndWhiskersWidget.from_dict(api_box_and_whiskers_widget_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/dashboards_api/docs/ApiColorGridWidget.md b/dashboards/docs/ApiColorGridWidget.md similarity index 76% rename from dashboards_api/docs/ApiColorGridWidget.md rename to dashboards/docs/ApiColorGridWidget.md index dc1f6cd0..a53e67f3 100644 --- a/dashboards_api/docs/ApiColorGridWidget.md +++ b/dashboards/docs/ApiColorGridWidget.md @@ -3,10 +3,10 @@ The Color Grid widget displays colored cards arranged in rows and columns. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,39 +14,40 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] +**type** | **str** | Color Grid widget type. | **cards** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **group_cards_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **columns** | **int** | Number of columns: 1 or 2. | [optional] **limit** | **int** | Limit configured in the widget. | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **data_source** | [**ColorGridDatasource**](ColorGridDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_color_grid_widget import ApiColorGridWidget +from dashboards.models.api_color_grid_widget import ApiColorGridWidget # TODO update the JSON string below json = "{}" # create an instance of ApiColorGridWidget from a JSON string api_color_grid_widget_instance = ApiColorGridWidget.from_json(json) # print the JSON string representation of the object -print ApiColorGridWidget.to_json() +print(ApiColorGridWidget.to_json()) # convert the object into a dict api_color_grid_widget_dict = api_color_grid_widget_instance.to_dict() # create an instance of ApiColorGridWidget from a dict -api_color_grid_widget_form_dict = api_color_grid_widget.from_dict(api_color_grid_widget_dict) +api_color_grid_widget_from_dict = ApiColorGridWidget.from_dict(api_color_grid_widget_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/dashboards/docs/ApiContextFilterRequest.md b/dashboards/docs/ApiContextFilterRequest.md new file mode 100644 index 00000000..cb2625c7 --- /dev/null +++ b/dashboards/docs/ApiContextFilterRequest.md @@ -0,0 +1,32 @@ +# ApiContextFilterRequest + +Request containing dashboard filter name, description and context details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**List[ApiDataSourceFilters]**](ApiDataSourceFilters.md) | List of filters to be applied to a dashboard. | +**name** | **str** | The name of the dashboard filter, this must be unique. | +**description** | **str** | An optional description of the filter. | [optional] + +## Example + +```python +from dashboards.models.api_context_filter_request import ApiContextFilterRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiContextFilterRequest from a JSON string +api_context_filter_request_instance = ApiContextFilterRequest.from_json(json) +# print the JSON string representation of the object +print(ApiContextFilterRequest.to_json()) + +# convert the object into a dict +api_context_filter_request_dict = api_context_filter_request_instance.to_dict() +# create an instance of ApiContextFilterRequest from a dict +api_context_filter_request_from_dict = ApiContextFilterRequest.from_dict(api_context_filter_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/dashboards/docs/ApiContextFilterResponse.md b/dashboards/docs/ApiContextFilterResponse.md new file mode 100644 index 00000000..f2989cc2 --- /dev/null +++ b/dashboards/docs/ApiContextFilterResponse.md @@ -0,0 +1,39 @@ +# ApiContextFilterResponse + +Response containing dashboard filter settings and context details. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**context** | [**List[ApiDataSourceFilters]**](ApiDataSourceFilters.md) | List of filters to be applied to a dashboard. | +**aid** | **str** | Account group ID of the filter. | +**id** | **str** | Unique ID of the dashboard filter. | +**name** | **str** | The name of the dashboard filter, this must be unique. | +**description** | **str** | An optional description of the filter. | [optional] +**created_by** | [**ApiDashboardFilterUserDetails**](ApiDashboardFilterUserDetails.md) | | [optional] +**modified_date** | **datetime** | Timestamp when the filter was last modified. | [optional] +**created_date** | **datetime** | Timestamp when the filter was created. | [optional] +**modified_by** | [**ApiDashboardFilterUserDetails**](ApiDashboardFilterUserDetails.md) | | [optional] + +## Example + +```python +from dashboards.models.api_context_filter_response import ApiContextFilterResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiContextFilterResponse from a JSON string +api_context_filter_response_instance = ApiContextFilterResponse.from_json(json) +# print the JSON string representation of the object +print(ApiContextFilterResponse.to_json()) + +# convert the object into a dict +api_context_filter_response_dict = api_context_filter_response_instance.to_dict() +# create an instance of ApiContextFilterResponse from a dict +api_context_filter_response_from_dict = ApiContextFilterResponse.from_dict(api_context_filter_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards/docs/ApiContextFiltersResponse.md b/dashboards/docs/ApiContextFiltersResponse.md new file mode 100644 index 00000000..18962ff8 --- /dev/null +++ b/dashboards/docs/ApiContextFiltersResponse.md @@ -0,0 +1,30 @@ +# ApiContextFiltersResponse + +All global dashboard filters saved. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dashboard_filters** | [**List[ApiContextFilterResponse]**](ApiContextFilterResponse.md) | | [optional] + +## Example + +```python +from dashboards.models.api_context_filters_response import ApiContextFiltersResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiContextFiltersResponse from a JSON string +api_context_filters_response_instance = ApiContextFiltersResponse.from_json(json) +# print the JSON string representation of the object +print(ApiContextFiltersResponse.to_json()) + +# convert the object into a dict +api_context_filters_response_dict = api_context_filters_response_instance.to_dict() +# create an instance of ApiContextFiltersResponse from a dict +api_context_filters_response_from_dict = ApiContextFiltersResponse.from_dict(api_context_filters_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards/docs/ApiDashboard.md b/dashboards/docs/ApiDashboard.md new file mode 100644 index 00000000..c24278ae --- /dev/null +++ b/dashboards/docs/ApiDashboard.md @@ -0,0 +1,53 @@ +# ApiDashboard + +Dashboard upon which this dashboard snapshot is based upon. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**global_filter_id** | **str** | Default global dashboard filter ID (obtained from `/dashboards/filters` endpoint). | [optional] +**account_id** | **int** | Identifier for the account group associated with a dashboard. | [optional] [readonly] +**created_by** | **int** | Identifier for the user that created a dashboard. | [optional] [readonly] +**modified_by** | **int** | Identifier for the user that last modified a dashboard. | [optional] [readonly] +**modified_date** | **str** | UTC date/time when a dashboard was last modified. | [optional] [readonly] +**global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] +**migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] +**api_link** | **List[Dict[str, object]]** | A links array containing the self and the snapshots links. | [optional] +**links** | [**DashboardLinksLinks**](DashboardLinksLinks.md) | | [optional] +**dashboard_id** | **str** | Identifier of a dashboard. | [optional] [readonly] +**title** | **str** | Title of a dashboard. | [optional] +**is_built_in** | **bool** | Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards. | [optional] [readonly] +**aid** | **str** | Identifier for the account group associated with a dashboard. | [optional] [readonly] +**dashboard_created_by** | **str** | Identifier for the user that created a dashboard. | [optional] [readonly] +**dashboard_modified_by** | **str** | Identifier for the user that last modified a dashboard. | [optional] [readonly] +**dashboard_modified_date** | **datetime** | UTC date/time when a dashboard was last modified (ISO date-time format). | [optional] [readonly] +**is_private** | **bool** | A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it. | [optional] +**is_default_for_user** | **bool** | Indicates whether this dashboard is the user's default. True for default, false if not. | [optional] [readonly] +**is_default_for_account** | **bool** | Indicates whether this dashboard is the account group's default. True for default, false if not. | [optional] [readonly] +**widgets** | [**List[ApiWidget]**](ApiWidget.md) | | [optional] +**description** | **str** | A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard. | [optional] +**default_timespan** | [**DefaultTimespan**](DefaultTimespan.md) | | [optional] +**is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] +**is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] + +## Example + +```python +from dashboards.models.api_dashboard import ApiDashboard + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDashboard from a JSON string +api_dashboard_instance = ApiDashboard.from_json(json) +# print the JSON string representation of the object +print(ApiDashboard.to_json()) + +# convert the object into a dict +api_dashboard_dict = api_dashboard_instance.to_dict() +# create an instance of ApiDashboard from a dict +api_dashboard_from_dict = ApiDashboard.from_dict(api_dashboard_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/dashboards_api/docs/ApiDashboardAsw.md b/dashboards/docs/ApiDashboardAsw.md similarity index 86% rename from dashboards_api/docs/ApiDashboardAsw.md rename to dashboards/docs/ApiDashboardAsw.md index 3145be33..f04f5651 100644 --- a/dashboards_api/docs/ApiDashboardAsw.md +++ b/dashboards/docs/ApiDashboardAsw.md @@ -3,6 +3,7 @@ Alert suppression window shown in a widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Identifier of the alert suppression window. | [optional] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw +from dashboards.models.api_dashboard_asw import ApiDashboardAsw # TODO update the JSON string below json = "{}" # create an instance of ApiDashboardAsw from a JSON string api_dashboard_asw_instance = ApiDashboardAsw.from_json(json) # print the JSON string representation of the object -print ApiDashboardAsw.to_json() +print(ApiDashboardAsw.to_json()) # convert the object into a dict api_dashboard_asw_dict = api_dashboard_asw_instance.to_dict() # create an instance of ApiDashboardAsw from a dict -api_dashboard_asw_form_dict = api_dashboard_asw.from_dict(api_dashboard_asw_dict) +api_dashboard_asw_from_dict = ApiDashboardAsw.from_dict(api_dashboard_asw_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/dashboards/docs/ApiDashboardFilterUserDetails.md b/dashboards/docs/ApiDashboardFilterUserDetails.md new file mode 100644 index 00000000..c9fe1744 --- /dev/null +++ b/dashboards/docs/ApiDashboardFilterUserDetails.md @@ -0,0 +1,31 @@ +# ApiDashboardFilterUserDetails + +Details of user who created or modified the filter. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | Unique ID of the user. | [optional] +**name** | **str** | Name of the user. | [optional] + +## Example + +```python +from dashboards.models.api_dashboard_filter_user_details import ApiDashboardFilterUserDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDashboardFilterUserDetails from a JSON string +api_dashboard_filter_user_details_instance = ApiDashboardFilterUserDetails.from_json(json) +# print the JSON string representation of the object +print(ApiDashboardFilterUserDetails.to_json()) + +# convert the object into a dict +api_dashboard_filter_user_details_dict = api_dashboard_filter_user_details_instance.to_dict() +# create an instance of ApiDashboardFilterUserDetails from a dict +api_dashboard_filter_user_details_from_dict = ApiDashboardFilterUserDetails.from_dict(api_dashboard_filter_user_details_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/dashboards/docs/ApiDashboardSnapshot.md b/dashboards/docs/ApiDashboardSnapshot.md new file mode 100644 index 00000000..905ed405 --- /dev/null +++ b/dashboards/docs/ApiDashboardSnapshot.md @@ -0,0 +1,44 @@ +# ApiDashboardSnapshot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_id** | **str** | Identifier of the dashboard snapshot. | [optional] +**account_id** | **int** | Identifier of the account group that the snapshot belongs to. | [optional] +**created_date** | **str** | UTC date when dashboard snapshot was created. | [optional] +**expiration_date** | **str** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date. | [optional] +**permalink** | **str** | Hyperlink to dashboard snapshot in ThousandEyes Application | [optional] +**api_links** | **List[Dict[str, object]]** | A links array containing the self link. | [optional] +**links** | [**AppAndSelfLinksLinks**](AppAndSelfLinksLinks.md) | | [optional] +**snapshot_name** | **str** | Name of the dashboard snapshot. | [optional] +**aid** | **str** | Identifier of the account group that the snapshot belongs to. | [optional] +**is_shared** | **bool** | Set `true` if dashboard snapshot is shared, `false` otherwise. | [optional] +**snapshot_created_date** | **datetime** | UTC date when dashboard snapshot was created (ISO date-time format). | [optional] +**dashboard** | [**ApiDashboard**](ApiDashboard.md) | | [optional] +**widgets** | [**List[ApiWidget]**](ApiWidget.md) | | [optional] +**is_scheduled** | **bool** | Set `true` if dashboard snapshot was generated from a schedule, `false` otherwise. | [optional] +**time_span** | [**ApiReportSnapshotTimeSpan**](ApiReportSnapshotTimeSpan.md) | | [optional] +**snapshot_expiration_date** | **datetime** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format. | [optional] + +## Example + +```python +from dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDashboardSnapshot from a JSON string +api_dashboard_snapshot_instance = ApiDashboardSnapshot.from_json(json) +# print the JSON string representation of the object +print(ApiDashboardSnapshot.to_json()) + +# convert the object into a dict +api_dashboard_snapshot_dict = api_dashboard_snapshot_instance.to_dict() +# create an instance of ApiDashboardSnapshot from a dict +api_dashboard_snapshot_from_dict = ApiDashboardSnapshot.from_dict(api_dashboard_snapshot_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/dashboards_api/docs/ApiDataPointGroup.md b/dashboards/docs/ApiDataPointGroup.md similarity index 82% rename from dashboards_api/docs/ApiDataPointGroup.md rename to dashboards/docs/ApiDataPointGroup.md index 12fa9edc..83460885 100644 --- a/dashboards_api/docs/ApiDataPointGroup.md +++ b/dashboards/docs/ApiDataPointGroup.md @@ -3,6 +3,7 @@ Group of data points. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **group_property** | **str** | Defines the criterion used to aggregate data points under specific group values. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_data_point_group import ApiDataPointGroup +from dashboards.models.api_data_point_group import ApiDataPointGroup # TODO update the JSON string below json = "{}" # create an instance of ApiDataPointGroup from a JSON string api_data_point_group_instance = ApiDataPointGroup.from_json(json) # print the JSON string representation of the object -print ApiDataPointGroup.to_json() +print(ApiDataPointGroup.to_json()) # convert the object into a dict api_data_point_group_dict = api_data_point_group_instance.to_dict() # create an instance of ApiDataPointGroup from a dict -api_data_point_group_form_dict = api_data_point_group.from_dict(api_data_point_group_dict) +api_data_point_group_from_dict = ApiDataPointGroup.from_dict(api_data_point_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/dashboards/docs/ApiDataSourceFilter.md b/dashboards/docs/ApiDataSourceFilter.md new file mode 100644 index 00000000..d0df36b2 --- /dev/null +++ b/dashboards/docs/ApiDataSourceFilter.md @@ -0,0 +1,32 @@ +# ApiDataSourceFilter + +List of different filter properties for a single datasource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_id** | **str** | Data source property to filter by. | +**values** | **List[str]** | Values to filter by based on the specified `filterId`. | +**metric_ids** | **List[str]** | Dashboard metric associated with the filter property. | + +## Example + +```python +from dashboards.models.api_data_source_filter import ApiDataSourceFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDataSourceFilter from a JSON string +api_data_source_filter_instance = ApiDataSourceFilter.from_json(json) +# print the JSON string representation of the object +print(ApiDataSourceFilter.to_json()) + +# convert the object into a dict +api_data_source_filter_dict = api_data_source_filter_instance.to_dict() +# create an instance of ApiDataSourceFilter from a dict +api_data_source_filter_from_dict = ApiDataSourceFilter.from_dict(api_data_source_filter_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/dashboards/docs/ApiDataSourceFilters.md b/dashboards/docs/ApiDataSourceFilters.md new file mode 100644 index 00000000..59133b70 --- /dev/null +++ b/dashboards/docs/ApiDataSourceFilters.md @@ -0,0 +1,31 @@ +# ApiDataSourceFilters + +List of different datasource filters. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_source_id** | **str** | Types of data source. | +**filters** | [**List[ApiDataSourceFilter]**](ApiDataSourceFilter.md) | List of different filter properties. | + +## Example + +```python +from dashboards.models.api_data_source_filters import ApiDataSourceFilters + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDataSourceFilters from a JSON string +api_data_source_filters_instance = ApiDataSourceFilters.from_json(json) +# print the JSON string representation of the object +print(ApiDataSourceFilters.to_json()) + +# convert the object into a dict +api_data_source_filters_dict = api_data_source_filters_instance.to_dict() +# create an instance of ApiDataSourceFilters from a dict +api_data_source_filters_from_dict = ApiDataSourceFilters.from_dict(api_data_source_filters_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards_api/docs/ApiDefaultTimespan.md b/dashboards/docs/ApiDefaultTimespan.md similarity index 83% rename from dashboards_api/docs/ApiDefaultTimespan.md rename to dashboards/docs/ApiDefaultTimespan.md index 707b59e2..58695865 100644 --- a/dashboards_api/docs/ApiDefaultTimespan.md +++ b/dashboards/docs/ApiDefaultTimespan.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **duration** | **int** | Relative timespan in seconds. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_default_timespan import ApiDefaultTimespan +from dashboards.models.api_default_timespan import ApiDefaultTimespan # TODO update the JSON string below json = "{}" # create an instance of ApiDefaultTimespan from a JSON string api_default_timespan_instance = ApiDefaultTimespan.from_json(json) # print the JSON string representation of the object -print ApiDefaultTimespan.to_json() +print(ApiDefaultTimespan.to_json()) # convert the object into a dict api_default_timespan_dict = api_default_timespan_instance.to_dict() # create an instance of ApiDefaultTimespan from a dict -api_default_timespan_form_dict = api_default_timespan.from_dict(api_default_timespan_dict) +api_default_timespan_from_dict = ApiDefaultTimespan.from_dict(api_default_timespan_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/dashboards/docs/ApiDuration.md b/dashboards/docs/ApiDuration.md new file mode 100644 index 00000000..fa73e902 --- /dev/null +++ b/dashboards/docs/ApiDuration.md @@ -0,0 +1,31 @@ +# ApiDuration + +Specifies a fixed timespan for data aggregation. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | Timespan value. | [optional] +**unit** | [**LegacyDurationUnit**](LegacyDurationUnit.md) | | [optional] + +## Example + +```python +from dashboards.models.api_duration import ApiDuration + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiDuration from a JSON string +api_duration_instance = ApiDuration.from_json(json) +# print the JSON string representation of the object +print(ApiDuration.to_json()) + +# convert the object into a dict +api_duration_dict = api_duration_instance.to_dict() +# create an instance of ApiDuration from a dict +api_duration_from_dict = ApiDuration.from_dict(api_duration_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/dashboards/docs/ApiDurationUnit.md b/dashboards/docs/ApiDurationUnit.md new file mode 100644 index 00000000..27792c65 --- /dev/null +++ b/dashboards/docs/ApiDurationUnit.md @@ -0,0 +1,12 @@ +# ApiDurationUnit + +Timespan unit. + +## 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/dashboards_api/docs/ApiGeoMapWidget.md b/dashboards/docs/ApiGeoMapWidget.md similarity index 76% rename from dashboards_api/docs/ApiGeoMapWidget.md rename to dashboards/docs/ApiGeoMapWidget.md index 10451c03..153dce2a 100644 --- a/dashboards_api/docs/ApiGeoMapWidget.md +++ b/dashboards/docs/ApiGeoMapWidget.md @@ -3,10 +3,10 @@ Displays data on a geographic map, highlighting information across different regions. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,37 +14,38 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] +**type** | **str** | Map widget type. | **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **is_geo_map_per_test** | **bool** | Indicates whether a separate map is displayed for each test within the widget. When set to true, individual maps are generated. | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **data_source** | [**GeoMapDatasource**](GeoMapDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_geo_map_widget import ApiGeoMapWidget +from dashboards.models.api_geo_map_widget import ApiGeoMapWidget # TODO update the JSON string below json = "{}" # create an instance of ApiGeoMapWidget from a JSON string api_geo_map_widget_instance = ApiGeoMapWidget.from_json(json) # print the JSON string representation of the object -print ApiGeoMapWidget.to_json() +print(ApiGeoMapWidget.to_json()) # convert the object into a dict api_geo_map_widget_dict = api_geo_map_widget_instance.to_dict() # create an instance of ApiGeoMapWidget from a dict -api_geo_map_widget_form_dict = api_geo_map_widget.from_dict(api_geo_map_widget_dict) +api_geo_map_widget_from_dict = ApiGeoMapWidget.from_dict(api_geo_map_widget_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/dashboards_api/docs/ApiGraphletPoint.md b/dashboards/docs/ApiGraphletPoint.md similarity index 81% rename from dashboards_api/docs/ApiGraphletPoint.md rename to dashboards/docs/ApiGraphletPoint.md index f13a16ae..3d29aea7 100644 --- a/dashboards_api/docs/ApiGraphletPoint.md +++ b/dashboards/docs/ApiGraphletPoint.md @@ -3,6 +3,7 @@ A data point on a graphlet. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **x** | **int** | Timestamp of the data point. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_graphlet_point import ApiGraphletPoint +from dashboards.models.api_graphlet_point import ApiGraphletPoint # TODO update the JSON string below json = "{}" # create an instance of ApiGraphletPoint from a JSON string api_graphlet_point_instance = ApiGraphletPoint.from_json(json) # print the JSON string representation of the object -print ApiGraphletPoint.to_json() +print(ApiGraphletPoint.to_json()) # convert the object into a dict api_graphlet_point_dict = api_graphlet_point_instance.to_dict() # create an instance of ApiGraphletPoint from a dict -api_graphlet_point_form_dict = api_graphlet_point.from_dict(api_graphlet_point_dict) +api_graphlet_point_from_dict = ApiGraphletPoint.from_dict(api_graphlet_point_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/dashboards_api/docs/ApiGroupedBarchartWidget.md b/dashboards/docs/ApiGroupedBarchartWidget.md similarity index 77% rename from dashboards_api/docs/ApiGroupedBarchartWidget.md rename to dashboards/docs/ApiGroupedBarchartWidget.md index b96f199e..e35501b4 100644 --- a/dashboards_api/docs/ApiGroupedBarchartWidget.md +++ b/dashboards/docs/ApiGroupedBarchartWidget.md @@ -3,10 +3,10 @@ Displays grouped bars, each representing multiple data points. You can configure the bars to align horizontally or vertically. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,16 +14,17 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Bar Chart: Grouped widget type. | **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **axis_group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **limit** | **int** | Limit configured in the widget. | [optional] **show_labels** | **bool** | Displays labels on each bar when set to `true`. | [optional] **is_horizontal_bar_chart** | **bool** | | [optional] @@ -32,19 +33,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget +from dashboards.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget # TODO update the JSON string below json = "{}" # create an instance of ApiGroupedBarchartWidget from a JSON string api_grouped_barchart_widget_instance = ApiGroupedBarchartWidget.from_json(json) # print the JSON string representation of the object -print ApiGroupedBarchartWidget.to_json() +print(ApiGroupedBarchartWidget.to_json()) # convert the object into a dict api_grouped_barchart_widget_dict = api_grouped_barchart_widget_instance.to_dict() # create an instance of ApiGroupedBarchartWidget from a dict -api_grouped_barchart_widget_form_dict = api_grouped_barchart_widget.from_dict(api_grouped_barchart_widget_dict) +api_grouped_barchart_widget_from_dict = ApiGroupedBarchartWidget.from_dict(api_grouped_barchart_widget_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/dashboards/docs/ApiMultiMetricColumn.md b/dashboards/docs/ApiMultiMetricColumn.md new file mode 100644 index 00000000..7706b65e --- /dev/null +++ b/dashboards/docs/ApiMultiMetricColumn.md @@ -0,0 +1,36 @@ +# ApiMultiMetricColumn + +Defines a column within a table that aggregates and displays various metrics (Multi-Metric table). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**data_source** | [**MultiMetricsTableDatasource**](MultiMetricsTableDatasource.md) | | [optional] +**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] +**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] +**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] +**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] + +## Example + +```python +from dashboards.models.api_multi_metric_column import ApiMultiMetricColumn + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiMultiMetricColumn from a JSON string +api_multi_metric_column_instance = ApiMultiMetricColumn.from_json(json) +# print the JSON string representation of the object +print(ApiMultiMetricColumn.to_json()) + +# convert the object into a dict +api_multi_metric_column_dict = api_multi_metric_column_instance.to_dict() +# create an instance of ApiMultiMetricColumn from a dict +api_multi_metric_column_from_dict = ApiMultiMetricColumn.from_dict(api_multi_metric_column_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/dashboards_api/docs/ApiMultiMetricColumnData.md b/dashboards/docs/ApiMultiMetricColumnData.md similarity index 83% rename from dashboards_api/docs/ApiMultiMetricColumnData.md rename to dashboards/docs/ApiMultiMetricColumnData.md index b123389a..ef6e1e5e 100644 --- a/dashboards_api/docs/ApiMultiMetricColumnData.md +++ b/dashboards/docs/ApiMultiMetricColumnData.md @@ -3,6 +3,7 @@ The data presented within a single column of a Multi-Metric table. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **column_id** | **str** | Identifier of the column. | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_multi_metric_column_data import ApiMultiMetricColumnData +from dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData # TODO update the JSON string below json = "{}" # create an instance of ApiMultiMetricColumnData from a JSON string api_multi_metric_column_data_instance = ApiMultiMetricColumnData.from_json(json) # print the JSON string representation of the object -print ApiMultiMetricColumnData.to_json() +print(ApiMultiMetricColumnData.to_json()) # convert the object into a dict api_multi_metric_column_data_dict = api_multi_metric_column_data_instance.to_dict() # create an instance of ApiMultiMetricColumnData from a dict -api_multi_metric_column_data_form_dict = api_multi_metric_column_data.from_dict(api_multi_metric_column_data_dict) +api_multi_metric_column_data_from_dict = ApiMultiMetricColumnData.from_dict(api_multi_metric_column_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/dashboards_api/docs/ApiMultiMetricTableWidget.md b/dashboards/docs/ApiMultiMetricTableWidget.md similarity index 77% rename from dashboards_api/docs/ApiMultiMetricTableWidget.md rename to dashboards/docs/ApiMultiMetricTableWidget.md index a5fe4234..cc4839de 100644 --- a/dashboards_api/docs/ApiMultiMetricTableWidget.md +++ b/dashboards/docs/ApiMultiMetricTableWidget.md @@ -3,10 +3,10 @@ A Multi-Metric table widget with columns, each representing a different metric, offering a comprehensive view rather than restricting to a single metric. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,16 +14,17 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Multi Metric Table widget type. | **compare_to_previous_value** | **bool** | Enables comparison of the current metric value with the previous value. | [optional] **row_group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **limit** | **int** | Limit configured in the widget. | [optional] **multi_metric_columns** | [**List[ApiMultiMetricColumn]**](ApiMultiMetricColumn.md) | | [optional] **data_source** | [**MultiMetricsTableDatasource**](MultiMetricsTableDatasource.md) | | [optional] @@ -31,19 +32,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget +from dashboards.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget # TODO update the JSON string below json = "{}" # create an instance of ApiMultiMetricTableWidget from a JSON string api_multi_metric_table_widget_instance = ApiMultiMetricTableWidget.from_json(json) # print the JSON string representation of the object -print ApiMultiMetricTableWidget.to_json() +print(ApiMultiMetricTableWidget.to_json()) # convert the object into a dict api_multi_metric_table_widget_dict = api_multi_metric_table_widget_instance.to_dict() # create an instance of ApiMultiMetricTableWidget from a dict -api_multi_metric_table_widget_form_dict = api_multi_metric_table_widget.from_dict(api_multi_metric_table_widget_dict) +api_multi_metric_table_widget_from_dict = ApiMultiMetricTableWidget.from_dict(api_multi_metric_table_widget_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/dashboards_api/docs/ApiMultiSearchFilterApiTestTableFilterKey.md b/dashboards/docs/ApiMultiSearchFilterApiTestTableFilterKey.md similarity index 75% rename from dashboards_api/docs/ApiMultiSearchFilterApiTestTableFilterKey.md rename to dashboards/docs/ApiMultiSearchFilterApiTestTableFilterKey.md index e0264733..add11223 100644 --- a/dashboards_api/docs/ApiMultiSearchFilterApiTestTableFilterKey.md +++ b/dashboards/docs/ApiMultiSearchFilterApiTestTableFilterKey.md @@ -3,6 +3,7 @@ A multi search filter key within the Multi-Metric table widget. The key represents the filter name, and the value specifies the filter value. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key** | [**TestTableFilterKey**](TestTableFilterKey.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey +from dashboards.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey # TODO update the JSON string below json = "{}" # create an instance of ApiMultiSearchFilterApiTestTableFilterKey from a JSON string api_multi_search_filter_api_test_table_filter_key_instance = ApiMultiSearchFilterApiTestTableFilterKey.from_json(json) # print the JSON string representation of the object -print ApiMultiSearchFilterApiTestTableFilterKey.to_json() +print(ApiMultiSearchFilterApiTestTableFilterKey.to_json()) # convert the object into a dict api_multi_search_filter_api_test_table_filter_key_dict = api_multi_search_filter_api_test_table_filter_key_instance.to_dict() # create an instance of ApiMultiSearchFilterApiTestTableFilterKey from a dict -api_multi_search_filter_api_test_table_filter_key_form_dict = api_multi_search_filter_api_test_table_filter_key.from_dict(api_multi_search_filter_api_test_table_filter_key_dict) +api_multi_search_filter_api_test_table_filter_key_from_dict = ApiMultiSearchFilterApiTestTableFilterKey.from_dict(api_multi_search_filter_api_test_table_filter_key_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/dashboards/docs/ApiNumbersCard.md b/dashboards/docs/ApiNumbersCard.md new file mode 100644 index 00000000..c245b116 --- /dev/null +++ b/dashboards/docs/ApiNumbersCard.md @@ -0,0 +1,43 @@ +# ApiNumbersCard + +An individual number card within the numbers card widget. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] +**max_scale** | **float** | Maximum scale configured in the widget. | [optional] +**unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] +**description** | **str** | Description of the number card. | [optional] +**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] +**compare_to_previous_value** | **bool** | | [optional] +**fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] +**should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression windows from the widget when set to `true`. | [optional] +**data_source** | [**NumbersCardDatasource**](NumbersCardDatasource.md) | | [optional] +**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] +**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] +**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] + +## Example + +```python +from dashboards.models.api_numbers_card import ApiNumbersCard + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiNumbersCard from a JSON string +api_numbers_card_instance = ApiNumbersCard.from_json(json) +# print the JSON string representation of the object +print(ApiNumbersCard.to_json()) + +# convert the object into a dict +api_numbers_card_dict = api_numbers_card_instance.to_dict() +# create an instance of ApiNumbersCard from a dict +api_numbers_card_from_dict = ApiNumbersCard.from_dict(api_numbers_card_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/dashboards_api/docs/ApiNumbersCardData.md b/dashboards/docs/ApiNumbersCardData.md similarity index 89% rename from dashboards_api/docs/ApiNumbersCardData.md rename to dashboards/docs/ApiNumbersCardData.md index faba9e7e..a5013c8f 100644 --- a/dashboards_api/docs/ApiNumbersCardData.md +++ b/dashboards/docs/ApiNumbersCardData.md @@ -3,6 +3,7 @@ The data displayed on a numbers card. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **card_id** | **str** | Identifier of the card. | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_numbers_card_data import ApiNumbersCardData +from dashboards.models.api_numbers_card_data import ApiNumbersCardData # TODO update the JSON string below json = "{}" # create an instance of ApiNumbersCardData from a JSON string api_numbers_card_data_instance = ApiNumbersCardData.from_json(json) # print the JSON string representation of the object -print ApiNumbersCardData.to_json() +print(ApiNumbersCardData.to_json()) # convert the object into a dict api_numbers_card_data_dict = api_numbers_card_data_instance.to_dict() # create an instance of ApiNumbersCardData from a dict -api_numbers_card_data_form_dict = api_numbers_card_data.from_dict(api_numbers_card_data_dict) +api_numbers_card_data_from_dict = ApiNumbersCardData.from_dict(api_numbers_card_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/dashboards_api/docs/ApiNumbersCardWidget.md b/dashboards/docs/ApiNumbersCardWidget.md similarity index 80% rename from dashboards_api/docs/ApiNumbersCardWidget.md rename to dashboards/docs/ApiNumbersCardWidget.md index 37c6c1c9..4f694f1d 100644 --- a/dashboards_api/docs/ApiNumbersCardWidget.md +++ b/dashboards/docs/ApiNumbersCardWidget.md @@ -3,10 +3,10 @@ A widget composed of multiple cards, each presenting a singular metric, such as average packet loss, page load time, or alert count. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,31 +14,32 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Number widget type. | **number_cards** | [**List[ApiNumbersCard]**](ApiNumbersCard.md) | | [optional] **data_source** | [**NumbersCardDatasource**](NumbersCardDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_numbers_card_widget import ApiNumbersCardWidget +from dashboards.models.api_numbers_card_widget import ApiNumbersCardWidget # TODO update the JSON string below json = "{}" # create an instance of ApiNumbersCardWidget from a JSON string api_numbers_card_widget_instance = ApiNumbersCardWidget.from_json(json) # print the JSON string representation of the object -print ApiNumbersCardWidget.to_json() +print(ApiNumbersCardWidget.to_json()) # convert the object into a dict api_numbers_card_widget_dict = api_numbers_card_widget_instance.to_dict() # create an instance of ApiNumbersCardWidget from a dict -api_numbers_card_widget_form_dict = api_numbers_card_widget.from_dict(api_numbers_card_widget_dict) +api_numbers_card_widget_from_dict = ApiNumbersCardWidget.from_dict(api_numbers_card_widget_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/dashboards_api/docs/ApiPieChartWidget.md b/dashboards/docs/ApiPieChartWidget.md similarity index 80% rename from dashboards_api/docs/ApiPieChartWidget.md rename to dashboards/docs/ApiPieChartWidget.md index 930446fb..8acdf71a 100644 --- a/dashboards_api/docs/ApiPieChartWidget.md +++ b/dashboards/docs/ApiPieChartWidget.md @@ -3,10 +3,10 @@ Displays data as segments of a pie, with each slice representing a portion of the total value. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,31 +14,32 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Pie Chart widget type | **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **data_source** | [**PieChartDatasource**](PieChartDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_pie_chart_widget import ApiPieChartWidget +from dashboards.models.api_pie_chart_widget import ApiPieChartWidget # TODO update the JSON string below json = "{}" # create an instance of ApiPieChartWidget from a JSON string api_pie_chart_widget_instance = ApiPieChartWidget.from_json(json) # print the JSON string representation of the object -print ApiPieChartWidget.to_json() +print(ApiPieChartWidget.to_json()) # convert the object into a dict api_pie_chart_widget_dict = api_pie_chart_widget_instance.to_dict() # create an instance of ApiPieChartWidget from a dict -api_pie_chart_widget_form_dict = api_pie_chart_widget.from_dict(api_pie_chart_widget_dict) +api_pie_chart_widget_from_dict = ApiPieChartWidget.from_dict(api_pie_chart_widget_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/dashboards_api/docs/ApiReportDataComponentLabelMap.md b/dashboards/docs/ApiReportDataComponentLabelMap.md similarity index 79% rename from dashboards_api/docs/ApiReportDataComponentLabelMap.md rename to dashboards/docs/ApiReportDataComponentLabelMap.md index bbe721a4..269715b4 100644 --- a/dashboards_api/docs/ApiReportDataComponentLabelMap.md +++ b/dashboards/docs/ApiReportDataComponentLabelMap.md @@ -3,6 +3,7 @@ Map of group labels. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **group_property** | **str** | Defines the criterion used to aggregate data points under specific group values. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap # TODO update the JSON string below json = "{}" # create an instance of ApiReportDataComponentLabelMap from a JSON string api_report_data_component_label_map_instance = ApiReportDataComponentLabelMap.from_json(json) # print the JSON string representation of the object -print ApiReportDataComponentLabelMap.to_json() +print(ApiReportDataComponentLabelMap.to_json()) # convert the object into a dict api_report_data_component_label_map_dict = api_report_data_component_label_map_instance.to_dict() # create an instance of ApiReportDataComponentLabelMap from a dict -api_report_data_component_label_map_form_dict = api_report_data_component_label_map.from_dict(api_report_data_component_label_map_dict) +api_report_data_component_label_map_from_dict = ApiReportDataComponentLabelMap.from_dict(api_report_data_component_label_map_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/dashboards_api/docs/ApiReportDataComponentLabelMapEntry.md b/dashboards/docs/ApiReportDataComponentLabelMapEntry.md similarity index 76% rename from dashboards_api/docs/ApiReportDataComponentLabelMapEntry.md rename to dashboards/docs/ApiReportDataComponentLabelMapEntry.md index 8036caca..efc29278 100644 --- a/dashboards_api/docs/ApiReportDataComponentLabelMapEntry.md +++ b/dashboards/docs/ApiReportDataComponentLabelMapEntry.md @@ -3,6 +3,7 @@ Represents a mapping entry of a group label. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **group_id** | **str** | Identifier of the group. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry +from dashboards.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry # TODO update the JSON string below json = "{}" # create an instance of ApiReportDataComponentLabelMapEntry from a JSON string api_report_data_component_label_map_entry_instance = ApiReportDataComponentLabelMapEntry.from_json(json) # print the JSON string representation of the object -print ApiReportDataComponentLabelMapEntry.to_json() +print(ApiReportDataComponentLabelMapEntry.to_json()) # convert the object into a dict api_report_data_component_label_map_entry_dict = api_report_data_component_label_map_entry_instance.to_dict() # create an instance of ApiReportDataComponentLabelMapEntry from a dict -api_report_data_component_label_map_entry_form_dict = api_report_data_component_label_map_entry.from_dict(api_report_data_component_label_map_entry_dict) +api_report_data_component_label_map_entry_from_dict = ApiReportDataComponentLabelMapEntry.from_dict(api_report_data_component_label_map_entry_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/dashboards_api/docs/ApiReportSnapshotTimeSpan.md b/dashboards/docs/ApiReportSnapshotTimeSpan.md similarity index 75% rename from dashboards_api/docs/ApiReportSnapshotTimeSpan.md rename to dashboards/docs/ApiReportSnapshotTimeSpan.md index fd33df93..f6cf689a 100644 --- a/dashboards_api/docs/ApiReportSnapshotTimeSpan.md +++ b/dashboards/docs/ApiReportSnapshotTimeSpan.md @@ -3,27 +3,29 @@ Time span of the dashboard snapshot. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**start_date** | **str** | UTC start date of dashboard snapshot. | [optional] **start** | **datetime** | UTC start date of dashboard snapshot (ISO date-time format). | [optional] **duration** | **int** | Duration of dashboard snapshot in seconds. | [optional] ## Example ```python -from dashboards_api.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan +from dashboards.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan # TODO update the JSON string below json = "{}" # create an instance of ApiReportSnapshotTimeSpan from a JSON string api_report_snapshot_time_span_instance = ApiReportSnapshotTimeSpan.from_json(json) # print the JSON string representation of the object -print ApiReportSnapshotTimeSpan.to_json() +print(ApiReportSnapshotTimeSpan.to_json()) # convert the object into a dict api_report_snapshot_time_span_dict = api_report_snapshot_time_span_instance.to_dict() # create an instance of ApiReportSnapshotTimeSpan from a dict -api_report_snapshot_time_span_form_dict = api_report_snapshot_time_span.from_dict(api_report_snapshot_time_span_dict) +api_report_snapshot_time_span_from_dict = ApiReportSnapshotTimeSpan.from_dict(api_report_snapshot_time_span_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/dashboards_api/docs/ApiStackedAreaChartWidget.md b/dashboards/docs/ApiStackedAreaChartWidget.md similarity index 80% rename from dashboards_api/docs/ApiStackedAreaChartWidget.md rename to dashboards/docs/ApiStackedAreaChartWidget.md index 2070f645..7c415377 100644 --- a/dashboards_api/docs/ApiStackedAreaChartWidget.md +++ b/dashboards/docs/ApiStackedAreaChartWidget.md @@ -3,10 +3,10 @@ Displays line plots over time, stacking quantities vertically to showcase cumulative data trends, similar to stacked bar charts. Ideal for visualizing changes in response times, error counts, and other metrics, revealing the progression of values across a timeline. Use this chart to replace stacked bar charts for temporal data analysis. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,34 +14,35 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] +**type** | **str** | Time Series: Stacked Area widget type | **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **data_source** | [**StackedAreaChartDatasource**](StackedAreaChartDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget +from dashboards.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget # TODO update the JSON string below json = "{}" # create an instance of ApiStackedAreaChartWidget from a JSON string api_stacked_area_chart_widget_instance = ApiStackedAreaChartWidget.from_json(json) # print the JSON string representation of the object -print ApiStackedAreaChartWidget.to_json() +print(ApiStackedAreaChartWidget.to_json()) # convert the object into a dict api_stacked_area_chart_widget_dict = api_stacked_area_chart_widget_instance.to_dict() # create an instance of ApiStackedAreaChartWidget from a dict -api_stacked_area_chart_widget_form_dict = api_stacked_area_chart_widget.from_dict(api_stacked_area_chart_widget_dict) +api_stacked_area_chart_widget_from_dict = ApiStackedAreaChartWidget.from_dict(api_stacked_area_chart_widget_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/dashboards_api/docs/ApiStackedBarchartWidget.md b/dashboards/docs/ApiStackedBarchartWidget.md similarity index 75% rename from dashboards_api/docs/ApiStackedBarchartWidget.md rename to dashboards/docs/ApiStackedBarchartWidget.md index abbb9a28..3bddbf9e 100644 --- a/dashboards_api/docs/ApiStackedBarchartWidget.md +++ b/dashboards/docs/ApiStackedBarchartWidget.md @@ -2,10 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -13,15 +13,16 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Bar Chart: Stacked widget type. | **axis_group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **limit** | **int** | Limit configured in the widget. | [optional] **show_labels** | **bool** | | [optional] **is_horizontal_bar_chart** | **bool** | Set to `true` to display bars horizontally in the widget. | [optional] @@ -30,19 +31,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_stacked_barchart_widget import ApiStackedBarchartWidget +from dashboards.models.api_stacked_barchart_widget import ApiStackedBarchartWidget # TODO update the JSON string below json = "{}" # create an instance of ApiStackedBarchartWidget from a JSON string api_stacked_barchart_widget_instance = ApiStackedBarchartWidget.from_json(json) # print the JSON string representation of the object -print ApiStackedBarchartWidget.to_json() +print(ApiStackedBarchartWidget.to_json()) # convert the object into a dict api_stacked_barchart_widget_dict = api_stacked_barchart_widget_instance.to_dict() # create an instance of ApiStackedBarchartWidget from a dict -api_stacked_barchart_widget_form_dict = api_stacked_barchart_widget.from_dict(api_stacked_barchart_widget_dict) +api_stacked_barchart_widget_from_dict = ApiStackedBarchartWidget.from_dict(api_stacked_barchart_widget_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/dashboards_api/docs/ApiTableWidget.md b/dashboards/docs/ApiTableWidget.md similarity index 77% rename from dashboards_api/docs/ApiTableWidget.md rename to dashboards/docs/ApiTableWidget.md index 61e23f15..673ce3a9 100644 --- a/dashboards_api/docs/ApiTableWidget.md +++ b/dashboards/docs/ApiTableWidget.md @@ -3,10 +3,10 @@ Organizes data in rows and columns, with options to list by test, geographic location, data source, or aggregated categories. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,36 +14,37 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Table widget type. | **compare_to_previous_value** | **bool** | | [optional] **row_group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **column_group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **limit** | **int** | Limit configured in the widget. | [optional] **data_source** | [**TableDatasource**](TableDatasource.md) | | [optional] ## Example ```python -from dashboards_api.models.api_table_widget import ApiTableWidget +from dashboards.models.api_table_widget import ApiTableWidget # TODO update the JSON string below json = "{}" # create an instance of ApiTableWidget from a JSON string api_table_widget_instance = ApiTableWidget.from_json(json) # print the JSON string representation of the object -print ApiTableWidget.to_json() +print(ApiTableWidget.to_json()) # convert the object into a dict api_table_widget_dict = api_table_widget_instance.to_dict() # create an instance of ApiTableWidget from a dict -api_table_widget_form_dict = api_table_widget.from_dict(api_table_widget_dict) +api_table_widget_from_dict = ApiTableWidget.from_dict(api_table_widget_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/dashboards_api/docs/ApiTestTableData.md b/dashboards/docs/ApiTestTableData.md similarity index 87% rename from dashboards_api/docs/ApiTestTableData.md rename to dashboards/docs/ApiTestTableData.md index 496d7b01..caf86496 100644 --- a/dashboards_api/docs/ApiTestTableData.md +++ b/dashboards/docs/ApiTestTableData.md @@ -3,6 +3,7 @@ Data shown in a test table widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **test_id** | **str** | Identifier of the test. | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_test_table_data import ApiTestTableData +from dashboards.models.api_test_table_data import ApiTestTableData # TODO update the JSON string below json = "{}" # create an instance of ApiTestTableData from a JSON string api_test_table_data_instance = ApiTestTableData.from_json(json) # print the JSON string representation of the object -print ApiTestTableData.to_json() +print(ApiTestTableData.to_json()) # convert the object into a dict api_test_table_data_dict = api_test_table_data_instance.to_dict() # create an instance of ApiTestTableData from a dict -api_test_table_data_form_dict = api_test_table_data.from_dict(api_test_table_data_dict) +api_test_table_data_from_dict = ApiTestTableData.from_dict(api_test_table_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/dashboards_api/docs/ApiTestTableGraphletsData.md b/dashboards/docs/ApiTestTableGraphletsData.md similarity index 80% rename from dashboards_api/docs/ApiTestTableGraphletsData.md rename to dashboards/docs/ApiTestTableGraphletsData.md index cf8cf87f..9f16ce96 100644 --- a/dashboards_api/docs/ApiTestTableGraphletsData.md +++ b/dashboards/docs/ApiTestTableGraphletsData.md @@ -3,6 +3,7 @@ Information displayed within a mini-graph associated with a specific test in a table. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **metric** | **str** | Name of the metric. | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_test_table_graphlets_data import ApiTestTableGraphletsData +from dashboards.models.api_test_table_graphlets_data import ApiTestTableGraphletsData # TODO update the JSON string below json = "{}" # create an instance of ApiTestTableGraphletsData from a JSON string api_test_table_graphlets_data_instance = ApiTestTableGraphletsData.from_json(json) # print the JSON string representation of the object -print ApiTestTableGraphletsData.to_json() +print(ApiTestTableGraphletsData.to_json()) # convert the object into a dict api_test_table_graphlets_data_dict = api_test_table_graphlets_data_instance.to_dict() # create an instance of ApiTestTableGraphletsData from a dict -api_test_table_graphlets_data_form_dict = api_test_table_graphlets_data.from_dict(api_test_table_graphlets_data_dict) +api_test_table_graphlets_data_from_dict = ApiTestTableGraphletsData.from_dict(api_test_table_graphlets_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/dashboards_api/docs/ApiTestTableWidget.md b/dashboards/docs/ApiTestTableWidget.md similarity index 81% rename from dashboards_api/docs/ApiTestTableWidget.md rename to dashboards/docs/ApiTestTableWidget.md index 2887eb8d..6a7ff044 100644 --- a/dashboards_api/docs/ApiTestTableWidget.md +++ b/dashboards/docs/ApiTestTableWidget.md @@ -3,10 +3,10 @@ Displays tests and statuses with options to sort and filter. It can be set to show only certain tests, like those with specific labels or failing tests. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,12 +14,13 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**type** | **str** | Test Table widget type, | **filter** | [**ApiWidgetFilterApiTestTableFilterKey**](ApiWidgetFilterApiTestTableFilterKey.md) | | [optional] **exclude** | [**ApiWidgetFilterApiTestTableFilterKey**](ApiWidgetFilterApiTestTableFilterKey.md) | | [optional] **data_source** | [**TestTableDatasource**](TestTableDatasource.md) | | [optional] @@ -27,19 +28,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_test_table_widget import ApiTestTableWidget +from dashboards.models.api_test_table_widget import ApiTestTableWidget # TODO update the JSON string below json = "{}" # create an instance of ApiTestTableWidget from a JSON string api_test_table_widget_instance = ApiTestTableWidget.from_json(json) # print the JSON string representation of the object -print ApiTestTableWidget.to_json() +print(ApiTestTableWidget.to_json()) # convert the object into a dict api_test_table_widget_dict = api_test_table_widget_instance.to_dict() # create an instance of ApiTestTableWidget from a dict -api_test_table_widget_form_dict = api_test_table_widget.from_dict(api_test_table_widget_dict) +api_test_table_widget_from_dict = ApiTestTableWidget.from_dict(api_test_table_widget_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/dashboards_api/docs/ApiTimeseriesWidget.md b/dashboards/docs/ApiTimeseriesWidget.md similarity index 81% rename from dashboards_api/docs/ApiTimeseriesWidget.md rename to dashboards/docs/ApiTimeseriesWidget.md index 3b09ef8c..aeb147b7 100644 --- a/dashboards_api/docs/ApiTimeseriesWidget.md +++ b/dashboards/docs/ApiTimeseriesWidget.md @@ -3,10 +3,10 @@ The Timeseries widget graphs data over time, with the chosen metric displayed on the vertical axis. vertical axis ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,15 +14,16 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] +**type** | **str** | Time Series: Line widget type. | **show_timeseries_overall_baseline** | **bool** | Displays the overall baseline if set to `true`. | [optional] **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **is_timeseries_one_chart_per_line** | **bool** | Displays a separate chart for each line if set to `true`. | [optional] @@ -31,19 +32,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_timeseries_widget import ApiTimeseriesWidget +from dashboards.models.api_timeseries_widget import ApiTimeseriesWidget # TODO update the JSON string below json = "{}" # create an instance of ApiTimeseriesWidget from a JSON string api_timeseries_widget_instance = ApiTimeseriesWidget.from_json(json) # print the JSON string representation of the object -print ApiTimeseriesWidget.to_json() +print(ApiTimeseriesWidget.to_json()) # convert the object into a dict api_timeseries_widget_dict = api_timeseries_widget_instance.to_dict() # create an instance of ApiTimeseriesWidget from a dict -api_timeseries_widget_form_dict = api_timeseries_widget.from_dict(api_timeseries_widget_dict) +api_timeseries_widget_from_dict = ApiTimeseriesWidget.from_dict(api_timeseries_widget_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/dashboards_api/docs/ApiWidget.md b/dashboards/docs/ApiWidget.md similarity index 78% rename from dashboards_api/docs/ApiWidget.md rename to dashboards/docs/ApiWidget.md index d7a27bd9..9076f5af 100644 --- a/dashboards_api/docs/ApiWidget.md +++ b/dashboards/docs/ApiWidget.md @@ -2,10 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -13,19 +13,20 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] **should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**agents** | [**AgentWidgetType**](AgentWidgetType.md) | | [optional] -**show** | [**AgentWidgetShow**](AgentWidgetShow.md) | | [optional] +**type** | **str** | Time Series: Line widget type. | +**agents** | [**LegacyAgentWidgetType**](LegacyAgentWidgetType.md) | | [optional] +**show** | [**LegacyAgentWidgetShow**](LegacyAgentWidgetShow.md) | | [optional] **data_source** | [**TimeseriesDatasource**](TimeseriesDatasource.md) | | [optional] -**alert_types** | [**List[ApiAlertListAlertType]**](ApiAlertListAlertType.md) | List of alert types configured in the widget, an empty list means all alert types. | [optional] +**alert_types** | [**List[LegacyAlertListAlertType]**](LegacyAlertListAlertType.md) | List of alert types configured in the widget, an empty list means all alert types. | [optional] **limit_to** | **int** | Limit the number of alerts displayed in the widget. | [optional] **active_within** | [**ApiAlertListWidgetAllOfActiveWithin**](ApiAlertListWidgetAllOfActiveWithin.md) | | [optional] -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] **group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] @@ -33,8 +34,8 @@ Name | Type | Description | Notes **group_cards_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **columns** | **int** | Number of columns: 1 or 2. | [optional] **limit** | **int** | Limit configured in the widget. | [optional] -**sort_by** | [**WidgetSortProperty**](WidgetSortProperty.md) | | [optional] -**sort_direction** | [**WidgetSortDirection**](WidgetSortDirection.md) | | [optional] +**sort_by** | [**LegacyWidgetSortProperty**](LegacyWidgetSortProperty.md) | | [optional] +**sort_direction** | [**LegacyWidgetSortDirection**](LegacyWidgetSortDirection.md) | | [optional] **is_geo_map_per_test** | **bool** | Indicates whether a separate map is displayed for each test within the widget. When set to true, individual maps are generated. | [optional] **axis_group_by** | [**ApiAggregateProperty**](ApiAggregateProperty.md) | | [optional] **show_labels** | **bool** | | [optional] @@ -52,19 +53,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_widget import ApiWidget +from dashboards.models.api_widget import ApiWidget # TODO update the JSON string below json = "{}" # create an instance of ApiWidget from a JSON string api_widget_instance = ApiWidget.from_json(json) # print the JSON string representation of the object -print ApiWidget.to_json() +print(ApiWidget.to_json()) # convert the object into a dict api_widget_dict = api_widget_instance.to_dict() # create an instance of ApiWidget from a dict -api_widget_form_dict = api_widget.from_dict(api_widget_dict) +api_widget_from_dict = ApiWidget.from_dict(api_widget_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/dashboards_api/docs/ApiWidgetDataPoint.md b/dashboards/docs/ApiWidgetDataPoint.md similarity index 84% rename from dashboards_api/docs/ApiWidgetDataPoint.md rename to dashboards/docs/ApiWidgetDataPoint.md index 2d473fab..06405612 100644 --- a/dashboards_api/docs/ApiWidgetDataPoint.md +++ b/dashboards/docs/ApiWidgetDataPoint.md @@ -3,6 +3,7 @@ Data point of a widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timestamp** | **int** | Timestamp of the aggregated data point. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_widget_data_point import ApiWidgetDataPoint +from dashboards.models.api_widget_data_point import ApiWidgetDataPoint # TODO update the JSON string below json = "{}" # create an instance of ApiWidgetDataPoint from a JSON string api_widget_data_point_instance = ApiWidgetDataPoint.from_json(json) # print the JSON string representation of the object -print ApiWidgetDataPoint.to_json() +print(ApiWidgetDataPoint.to_json()) # convert the object into a dict api_widget_data_point_dict = api_widget_data_point_instance.to_dict() # create an instance of ApiWidgetDataPoint from a dict -api_widget_data_point_form_dict = api_widget_data_point.from_dict(api_widget_data_point_dict) +api_widget_data_point_from_dict = ApiWidgetDataPoint.from_dict(api_widget_data_point_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/dashboards_api/docs/ApiWidgetDataResponse.md b/dashboards/docs/ApiWidgetDataResponse.md similarity index 82% rename from dashboards_api/docs/ApiWidgetDataResponse.md rename to dashboards/docs/ApiWidgetDataResponse.md index f30ed88d..844fc361 100644 --- a/dashboards_api/docs/ApiWidgetDataResponse.md +++ b/dashboards/docs/ApiWidgetDataResponse.md @@ -3,6 +3,7 @@ Response of a widget data request. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **group_labels** | [**List[ApiReportDataComponentLabelMap]**](ApiReportDataComponentLabelMap.md) | | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_widget_data_response import ApiWidgetDataResponse +from dashboards.models.api_widget_data_response import ApiWidgetDataResponse # TODO update the JSON string below json = "{}" # create an instance of ApiWidgetDataResponse from a JSON string api_widget_data_response_instance = ApiWidgetDataResponse.from_json(json) # print the JSON string representation of the object -print ApiWidgetDataResponse.to_json() +print(ApiWidgetDataResponse.to_json()) # convert the object into a dict api_widget_data_response_dict = api_widget_data_response_instance.to_dict() # create an instance of ApiWidgetDataResponse from a dict -api_widget_data_response_form_dict = api_widget_data_response.from_dict(api_widget_data_response_dict) +api_widget_data_response_from_dict = ApiWidgetDataResponse.from_dict(api_widget_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/dashboards_api/docs/ApiWidgetFilterApiTestTableFilterKey.md b/dashboards/docs/ApiWidgetFilterApiTestTableFilterKey.md similarity index 76% rename from dashboards_api/docs/ApiWidgetFilterApiTestTableFilterKey.md rename to dashboards/docs/ApiWidgetFilterApiTestTableFilterKey.md index dc7ecb8b..9814c94e 100644 --- a/dashboards_api/docs/ApiWidgetFilterApiTestTableFilterKey.md +++ b/dashboards/docs/ApiWidgetFilterApiTestTableFilterKey.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **filters** | [**List[ApiMultiSearchFilterApiTestTableFilterKey]**](ApiMultiSearchFilterApiTestTableFilterKey.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey +from dashboards.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey # TODO update the JSON string below json = "{}" # create an instance of ApiWidgetFilterApiTestTableFilterKey from a JSON string api_widget_filter_api_test_table_filter_key_instance = ApiWidgetFilterApiTestTableFilterKey.from_json(json) # print the JSON string representation of the object -print ApiWidgetFilterApiTestTableFilterKey.to_json() +print(ApiWidgetFilterApiTestTableFilterKey.to_json()) # convert the object into a dict api_widget_filter_api_test_table_filter_key_dict = api_widget_filter_api_test_table_filter_key_instance.to_dict() # create an instance of ApiWidgetFilterApiTestTableFilterKey from a dict -api_widget_filter_api_test_table_filter_key_form_dict = api_widget_filter_api_test_table_filter_key.from_dict(api_widget_filter_api_test_table_filter_key_dict) +api_widget_filter_api_test_table_filter_key_from_dict = ApiWidgetFilterApiTestTableFilterKey.from_dict(api_widget_filter_api_test_table_filter_key_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/dashboards_api/docs/ApiWidgetFixedYScalePrefix.md b/dashboards/docs/ApiWidgetFixedYScalePrefix.md similarity index 99% rename from dashboards_api/docs/ApiWidgetFixedYScalePrefix.md rename to dashboards/docs/ApiWidgetFixedYScalePrefix.md index 7f02bca8..df367bcd 100644 --- a/dashboards_api/docs/ApiWidgetFixedYScalePrefix.md +++ b/dashboards/docs/ApiWidgetFixedYScalePrefix.md @@ -3,6 +3,7 @@ Prefix denoting the unit of measurement for the fixed Y-axis scale. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/ApiWidgetMeasure.md b/dashboards/docs/ApiWidgetMeasure.md similarity index 83% rename from dashboards_api/docs/ApiWidgetMeasure.md rename to dashboards/docs/ApiWidgetMeasure.md index 6ad2b6c9..3dcdc6ea 100644 --- a/dashboards_api/docs/ApiWidgetMeasure.md +++ b/dashboards/docs/ApiWidgetMeasure.md @@ -3,6 +3,7 @@ Determines how to aggregate the the metric. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**WidgetMeasureType**](WidgetMeasureType.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.api_widget_measure import ApiWidgetMeasure # TODO update the JSON string below json = "{}" # create an instance of ApiWidgetMeasure from a JSON string api_widget_measure_instance = ApiWidgetMeasure.from_json(json) # print the JSON string representation of the object -print ApiWidgetMeasure.to_json() +print(ApiWidgetMeasure.to_json()) # convert the object into a dict api_widget_measure_dict = api_widget_measure_instance.to_dict() # create an instance of ApiWidgetMeasure from a dict -api_widget_measure_form_dict = api_widget_measure.from_dict(api_widget_measure_dict) +api_widget_measure_from_dict = ApiWidgetMeasure.from_dict(api_widget_measure_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/dashboards/docs/ApiWidgetSortDirection.md b/dashboards/docs/ApiWidgetSortDirection.md new file mode 100644 index 00000000..5945898b --- /dev/null +++ b/dashboards/docs/ApiWidgetSortDirection.md @@ -0,0 +1,12 @@ +# ApiWidgetSortDirection + +Specifies the order in which cards are sorted. + +## 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/dashboards/docs/ApiWidgetSortProperty.md b/dashboards/docs/ApiWidgetSortProperty.md new file mode 100644 index 00000000..7d2d34e7 --- /dev/null +++ b/dashboards/docs/ApiWidgetSortProperty.md @@ -0,0 +1,12 @@ +# ApiWidgetSortProperty + +Determines the card sorting criterion. + +## 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/dashboards_api/docs/ApiWidgetsDataV2.md b/dashboards/docs/ApiWidgetsDataV2.md similarity index 90% rename from dashboards_api/docs/ApiWidgetsDataV2.md rename to dashboards/docs/ApiWidgetsDataV2.md index e375e7fb..4c15078b 100644 --- a/dashboards_api/docs/ApiWidgetsDataV2.md +++ b/dashboards/docs/ApiWidgetsDataV2.md @@ -3,6 +3,7 @@ Data of a widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cards** | [**List[ApiNumbersCardData]**](ApiNumbersCardData.md) | | [optional] @@ -21,19 +22,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 # TODO update the JSON string below json = "{}" # create an instance of ApiWidgetsDataV2 from a JSON string api_widgets_data_v2_instance = ApiWidgetsDataV2.from_json(json) # print the JSON string representation of the object -print ApiWidgetsDataV2.to_json() +print(ApiWidgetsDataV2.to_json()) # convert the object into a dict api_widgets_data_v2_dict = api_widgets_data_v2_instance.to_dict() # create an instance of ApiWidgetsDataV2 from a dict -api_widgets_data_v2_form_dict = api_widgets_data_v2.from_dict(api_widgets_data_v2_dict) +api_widgets_data_v2_from_dict = ApiWidgetsDataV2.from_dict(api_widgets_data_v2_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/dashboards/docs/AppAndSelfLinks.md b/dashboards/docs/AppAndSelfLinks.md new file mode 100644 index 00000000..73839cc6 --- /dev/null +++ b/dashboards/docs/AppAndSelfLinks.md @@ -0,0 +1,29 @@ +# AppAndSelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**AppAndSelfLinksLinks**](AppAndSelfLinksLinks.md) | | [optional] + +## Example + +```python +from dashboards.models.app_and_self_links import AppAndSelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AppAndSelfLinks from a JSON string +app_and_self_links_instance = AppAndSelfLinks.from_json(json) +# print the JSON string representation of the object +print(AppAndSelfLinks.to_json()) + +# convert the object into a dict +app_and_self_links_dict = app_and_self_links_instance.to_dict() +# create an instance of AppAndSelfLinks from a dict +app_and_self_links_from_dict = AppAndSelfLinks.from_dict(app_and_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/dashboards/docs/AppAndSelfLinksLinks.md b/dashboards/docs/AppAndSelfLinksLinks.md new file mode 100644 index 00000000..3950d761 --- /dev/null +++ b/dashboards/docs/AppAndSelfLinksLinks.md @@ -0,0 +1,31 @@ +# AppAndSelfLinksLinks + +A links object containing the ThousandEyes App link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_link** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from dashboards.models.app_and_self_links_links import AppAndSelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AppAndSelfLinksLinks from a JSON string +app_and_self_links_links_instance = AppAndSelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(AppAndSelfLinksLinks.to_json()) + +# convert the object into a dict +app_and_self_links_links_dict = app_and_self_links_links_instance.to_dict() +# create an instance of AppAndSelfLinksLinks from a dict +app_and_self_links_links_from_dict = AppAndSelfLinksLinks.from_dict(app_and_self_links_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/dashboards_api/docs/AswRepeat.md b/dashboards/docs/AswRepeat.md similarity index 99% rename from dashboards_api/docs/AswRepeat.md rename to dashboards/docs/AswRepeat.md index 9b64db4e..1ff55e9e 100644 --- a/dashboards_api/docs/AswRepeat.md +++ b/dashboards/docs/AswRepeat.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/AswRepeatUnit.md b/dashboards/docs/AswRepeatUnit.md similarity index 99% rename from dashboards_api/docs/AswRepeatUnit.md rename to dashboards/docs/AswRepeatUnit.md index 6e5d3dfe..33401069 100644 --- a/dashboards_api/docs/AswRepeatUnit.md +++ b/dashboards/docs/AswRepeatUnit.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/BoxAndWhiskersDatasource.md b/dashboards/docs/BoxAndWhiskersDatasource.md similarity index 99% rename from dashboards_api/docs/BoxAndWhiskersDatasource.md rename to dashboards/docs/BoxAndWhiskersDatasource.md index 6e2e6c6c..40c7947e 100644 --- a/dashboards_api/docs/BoxAndWhiskersDatasource.md +++ b/dashboards/docs/BoxAndWhiskersDatasource.md @@ -3,6 +3,7 @@ Datasource of the box and whiskers widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/ColorGridDatasource.md b/dashboards/docs/ColorGridDatasource.md similarity index 99% rename from dashboards_api/docs/ColorGridDatasource.md rename to dashboards/docs/ColorGridDatasource.md index 40c06ada..219ca2fa 100644 --- a/dashboards_api/docs/ColorGridDatasource.md +++ b/dashboards/docs/ColorGridDatasource.md @@ -3,6 +3,7 @@ Datasource of the color grid widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/CreateDashboardSnapshot201Response.md b/dashboards/docs/CreateDashboardSnapshot201Response.md new file mode 100644 index 00000000..a5438109 --- /dev/null +++ b/dashboards/docs/CreateDashboardSnapshot201Response.md @@ -0,0 +1,30 @@ +# CreateDashboardSnapshot201Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_id** | **str** | Identifier of the dashboard snapshot. | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from dashboards.models.create_dashboard_snapshot201_response import CreateDashboardSnapshot201Response + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateDashboardSnapshot201Response from a JSON string +create_dashboard_snapshot201_response_instance = CreateDashboardSnapshot201Response.from_json(json) +# print the JSON string representation of the object +print(CreateDashboardSnapshot201Response.to_json()) + +# convert the object into a dict +create_dashboard_snapshot201_response_dict = create_dashboard_snapshot201_response_instance.to_dict() +# create an instance of CreateDashboardSnapshot201Response from a dict +create_dashboard_snapshot201_response_from_dict = CreateDashboardSnapshot201Response.from_dict(create_dashboard_snapshot201_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards/docs/Dashboard.md b/dashboards/docs/Dashboard.md new file mode 100644 index 00000000..0bdd5dac --- /dev/null +++ b/dashboards/docs/Dashboard.md @@ -0,0 +1,46 @@ +# Dashboard + +Dashboard upon which this dashboard snapshot is based upon. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**global_filter_id** | **str** | Default global dashboard filter ID (obtained from `/dashboards/filters` endpoint). | [optional] +**links** | [**DashboardLinksLinks**](DashboardLinksLinks.md) | | [optional] +**dashboard_id** | **str** | Identifier of a dashboard. | [optional] [readonly] +**title** | **str** | Title of a dashboard. | [optional] +**is_built_in** | **bool** | Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards. | [optional] [readonly] +**aid** | **str** | Identifier for the account group associated with a dashboard. | [optional] [readonly] +**created_by** | **str** | Identifier for the user that created a dashboard. | [optional] [readonly] +**modified_by** | **str** | Identifier for the user that last modified a dashboard. | [optional] [readonly] +**modified_date** | **datetime** | UTC date/time when a dashboard was last modified (ISO date-time format). | [optional] [readonly] +**is_private** | **bool** | A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it. | [optional] +**is_default_for_user** | **bool** | Indicates whether this dashboard is the user's default. True for default, false if not. | [optional] [readonly] +**is_default_for_account** | **bool** | Indicates whether this dashboard is the account group's default. True for default, false if not. | [optional] [readonly] +**widgets** | [**List[ApiWidget]**](ApiWidget.md) | | [optional] +**description** | **str** | A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard. | [optional] +**default_timespan** | [**DefaultTimespan**](DefaultTimespan.md) | | [optional] +**is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] +**is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] + +## Example + +```python +from dashboards.models.dashboard import Dashboard + +# TODO update the JSON string below +json = "{}" +# create an instance of Dashboard from a JSON string +dashboard_instance = Dashboard.from_json(json) +# print the JSON string representation of the object +print(Dashboard.to_json()) + +# convert the object into a dict +dashboard_dict = dashboard_instance.to_dict() +# create an instance of Dashboard from a dict +dashboard_from_dict = Dashboard.from_dict(dashboard_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/dashboards/docs/DashboardGlobalFilterId.md b/dashboards/docs/DashboardGlobalFilterId.md new file mode 100644 index 00000000..120d37b6 --- /dev/null +++ b/dashboards/docs/DashboardGlobalFilterId.md @@ -0,0 +1,29 @@ +# DashboardGlobalFilterId + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**global_filter_id** | **str** | Default global dashboard filter ID (obtained from `/dashboards/filters` endpoint). | [optional] + +## Example + +```python +from dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardGlobalFilterId from a JSON string +dashboard_global_filter_id_instance = DashboardGlobalFilterId.from_json(json) +# print the JSON string representation of the object +print(DashboardGlobalFilterId.to_json()) + +# convert the object into a dict +dashboard_global_filter_id_dict = dashboard_global_filter_id_instance.to_dict() +# create an instance of DashboardGlobalFilterId from a dict +dashboard_global_filter_id_from_dict = DashboardGlobalFilterId.from_dict(dashboard_global_filter_id_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/dashboards_api/docs/DashboardLinks.md b/dashboards/docs/DashboardLinks.md similarity index 82% rename from dashboards_api/docs/DashboardLinks.md rename to dashboards/docs/DashboardLinks.md index 8bd46291..f208fe86 100644 --- a/dashboards_api/docs/DashboardLinks.md +++ b/dashboards/docs/DashboardLinks.md @@ -3,6 +3,7 @@ A links object containing the self and the snapshots links. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**DashboardLinksLinks**](DashboardLinksLinks.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.dashboard_links import DashboardLinks +from dashboards.models.dashboard_links import DashboardLinks # TODO update the JSON string below json = "{}" # create an instance of DashboardLinks from a JSON string dashboard_links_instance = DashboardLinks.from_json(json) # print the JSON string representation of the object -print DashboardLinks.to_json() +print(DashboardLinks.to_json()) # convert the object into a dict dashboard_links_dict = dashboard_links_instance.to_dict() # create an instance of DashboardLinks from a dict -dashboard_links_form_dict = dashboard_links.from_dict(dashboard_links_dict) +dashboard_links_from_dict = DashboardLinks.from_dict(dashboard_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/dashboards_api/docs/DashboardLinksLinks.md b/dashboards/docs/DashboardLinksLinks.md similarity index 79% rename from dashboards_api/docs/DashboardLinksLinks.md rename to dashboards/docs/DashboardLinksLinks.md index 18da6dcd..b5c03f8f 100644 --- a/dashboards_api/docs/DashboardLinksLinks.md +++ b/dashboards/docs/DashboardLinksLinks.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_self** | [**Link**](Link.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks +from dashboards.models.dashboard_links_links import DashboardLinksLinks # TODO update the JSON string below json = "{}" # create an instance of DashboardLinksLinks from a JSON string dashboard_links_links_instance = DashboardLinksLinks.from_json(json) # print the JSON string representation of the object -print DashboardLinksLinks.to_json() +print(DashboardLinksLinks.to_json()) # convert the object into a dict dashboard_links_links_dict = dashboard_links_links_instance.to_dict() # create an instance of DashboardLinksLinks from a dict -dashboard_links_links_form_dict = dashboard_links_links.from_dict(dashboard_links_links_dict) +dashboard_links_links_from_dict = DashboardLinksLinks.from_dict(dashboard_links_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/dashboards_api/docs/DashboardMetric.md b/dashboards/docs/DashboardMetric.md similarity index 99% rename from dashboards_api/docs/DashboardMetric.md rename to dashboards/docs/DashboardMetric.md index cbb0ca18..a3744324 100644 --- a/dashboards_api/docs/DashboardMetric.md +++ b/dashboards/docs/DashboardMetric.md @@ -3,6 +3,7 @@ Indicates the specific metric in the report, determined by the layer, test type, and metric values. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/DashboardMetricDirection.md b/dashboards/docs/DashboardMetricDirection.md similarity index 99% rename from dashboards_api/docs/DashboardMetricDirection.md rename to dashboards/docs/DashboardMetricDirection.md index 211b1c06..7f61734d 100644 --- a/dashboards_api/docs/DashboardMetricDirection.md +++ b/dashboards/docs/DashboardMetricDirection.md @@ -3,6 +3,7 @@ Direction of agent to agent metric. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/DashboardOrder.md b/dashboards/docs/DashboardOrder.md similarity index 99% rename from dashboards_api/docs/DashboardOrder.md rename to dashboards/docs/DashboardOrder.md index f48c1964..f732ac4d 100644 --- a/dashboards_api/docs/DashboardOrder.md +++ b/dashboards/docs/DashboardOrder.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/DashboardSnapshotId.md b/dashboards/docs/DashboardSnapshotId.md new file mode 100644 index 00000000..16a6f5fb --- /dev/null +++ b/dashboards/docs/DashboardSnapshotId.md @@ -0,0 +1,29 @@ +# DashboardSnapshotId + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_id** | **str** | Identifier of the dashboard snapshot. | [optional] + +## Example + +```python +from dashboards.models.dashboard_snapshot_id import DashboardSnapshotId + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardSnapshotId from a JSON string +dashboard_snapshot_id_instance = DashboardSnapshotId.from_json(json) +# print the JSON string representation of the object +print(DashboardSnapshotId.to_json()) + +# convert the object into a dict +dashboard_snapshot_id_dict = dashboard_snapshot_id_instance.to_dict() +# create an instance of DashboardSnapshotId from a dict +dashboard_snapshot_id_from_dict = DashboardSnapshotId.from_dict(dashboard_snapshot_id_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/dashboards_api/docs/DashboardSnapshots200Response.md b/dashboards/docs/DashboardSnapshots200Response.md similarity index 75% rename from dashboards_api/docs/DashboardSnapshots200Response.md rename to dashboards/docs/DashboardSnapshots200Response.md index c075b6a8..9ae1a6cd 100644 --- a/dashboards_api/docs/DashboardSnapshots200Response.md +++ b/dashboards/docs/DashboardSnapshots200Response.md @@ -2,27 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**pages** | **Dict[str, object]** | | [optional] **dashboard_snapshots** | [**List[ApiDashboardSnapshot]**](ApiDashboardSnapshot.md) | | [optional] **links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from dashboards_api.models.dashboard_snapshots200_response import DashboardSnapshots200Response +from dashboards.models.dashboard_snapshots200_response import DashboardSnapshots200Response # TODO update the JSON string below json = "{}" # create an instance of DashboardSnapshots200Response from a JSON string dashboard_snapshots200_response_instance = DashboardSnapshots200Response.from_json(json) # print the JSON string representation of the object -print DashboardSnapshots200Response.to_json() +print(DashboardSnapshots200Response.to_json()) # convert the object into a dict dashboard_snapshots200_response_dict = dashboard_snapshots200_response_instance.to_dict() # create an instance of DashboardSnapshots200Response from a dict -dashboard_snapshots200_response_form_dict = dashboard_snapshots200_response.from_dict(dashboard_snapshots200_response_dict) +dashboard_snapshots200_response_from_dict = DashboardSnapshots200Response.from_dict(dashboard_snapshots200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/dashboards_api/docs/DashboardSnapshotsApi.md b/dashboards/docs/DashboardSnapshotsApi.md similarity index 85% rename from dashboards_api/docs/DashboardSnapshotsApi.md rename to dashboards/docs/DashboardSnapshotsApi.md index 315e26ad..71d46e64 100644 --- a/dashboards_api/docs/DashboardSnapshotsApi.md +++ b/dashboards/docs/DashboardSnapshotsApi.md @@ -1,4 +1,4 @@ -# dashboards_api.DashboardSnapshotsApi +# dashboards.DashboardSnapshotsApi All URIs are relative to *https://api.thousandeyes.com* @@ -13,7 +13,7 @@ Method | HTTP request | Description # **create_dashboard_snapshot** -> ApiDashboardSnapshot create_dashboard_snapshot(generate_dashboard_snapshot_request, aid=aid) +> CreateDashboardSnapshot201Response create_dashboard_snapshot(generate_dashboard_snapshot_request, aid=aid) Create dashboard snapshot @@ -22,18 +22,17 @@ Creates a new dashboard snapshot within your account group. The `Edit Snapshots` ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -from dashboards_api.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.create_dashboard_snapshot201_response import CreateDashboardSnapshot201Response +from dashboards.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,16 +42,16 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) - generate_dashboard_snapshot_request = dashboards_api.GenerateDashboardSnapshotRequest() # GenerateDashboardSnapshotRequest | Request body schema to create a dashboard snapshot. - aid = '2067' # 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) + api_instance = dashboards.DashboardSnapshotsApi(api_client) + generate_dashboard_snapshot_request = dashboards.GenerateDashboardSnapshotRequest() # GenerateDashboardSnapshotRequest | Request body schema to create a dashboard snapshot. + 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 dashboard snapshot @@ -67,6 +66,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **generate_dashboard_snapshot_request** | [**GenerateDashboardSnapshotRequest**](GenerateDashboardSnapshotRequest.md)| Request body schema to create a dashboard snapshot. | @@ -74,7 +74,7 @@ Name | Type | Description | Notes ### Return type -[**ApiDashboardSnapshot**](ApiDashboardSnapshot.md) +[**CreateDashboardSnapshot201Response**](CreateDashboardSnapshot201Response.md) ### Authorization @@ -86,6 +86,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -108,17 +109,16 @@ This endpoint returns a list of widgets configured in dashboard snapshot configu ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -128,16 +128,16 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) + api_instance = 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 = '2067' # 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) + 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 @@ -152,6 +152,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **snapshot_id** | **str**| A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. | @@ -171,6 +172,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -193,17 +195,16 @@ Returns a list of dashboard snapshots within your account group. Use this data t ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.dashboard_snapshots200_response import DashboardSnapshots200Response -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.dashboard_snapshots200_response import DashboardSnapshots200Response +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -213,17 +214,17 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) - aid = '2067' # 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) + api_instance = 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 `_links` instead of this parameter. (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 @@ -238,11 +239,12 @@ with dashboards_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -258,6 +260,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -280,16 +283,15 @@ Deletes a dashboard snapshot using the `snapshotId` provided in the request. Use ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.rest import ApiException +import dashboards +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -299,16 +301,16 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) + api_instance = 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 = '2067' # 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) + aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) try: # Delete dashboard snapshot @@ -321,6 +323,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **snapshot_id** | **str**| A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. | @@ -337,9 +340,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -362,17 +366,16 @@ Returns actual metrics used in the generation of a dashboard snapshot. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -382,17 +385,17 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) + api_instance = 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. widget_id = 'unpmg' # str | A Identifier for a widget. - aid = '2067' # 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) + 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 data @@ -407,6 +410,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **snapshot_id** | **str**| A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. | @@ -427,6 +431,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -449,17 +454,16 @@ Updates the expiration date of a dashboard snapshot. The `Edit snapshots` permis ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -469,17 +473,17 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) + api_instance = 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. - update_snapshot_expiration_date_api_request = dashboards_api.UpdateSnapshotExpirationDateApiRequest() # UpdateSnapshotExpirationDateApiRequest | Request body schema to update a snapshot expiration. - aid = '2067' # 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) + update_snapshot_expiration_date_api_request = dashboards.UpdateSnapshotExpirationDateApiRequest() # UpdateSnapshotExpirationDateApiRequest | Request body schema to update a snapshot expiration. + 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 snapshot expiration @@ -492,6 +496,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **snapshot_id** | **str**| A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. | @@ -509,9 +514,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/hal+json - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | diff --git a/dashboards_api/docs/DashboardSnapshotsPage.md b/dashboards/docs/DashboardSnapshotsPage.md similarity index 76% rename from dashboards_api/docs/DashboardSnapshotsPage.md rename to dashboards/docs/DashboardSnapshotsPage.md index bd59d371..0cc47464 100644 --- a/dashboards_api/docs/DashboardSnapshotsPage.md +++ b/dashboards/docs/DashboardSnapshotsPage.md @@ -3,26 +3,28 @@ Dashboard snapshots page. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**pages** | **Dict[str, object]** | | [optional] **dashboard_snapshots** | [**List[ApiDashboardSnapshot]**](ApiDashboardSnapshot.md) | | [optional] ## Example ```python -from dashboards_api.models.dashboard_snapshots_page import DashboardSnapshotsPage +from dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage # TODO update the JSON string below json = "{}" # create an instance of DashboardSnapshotsPage from a JSON string dashboard_snapshots_page_instance = DashboardSnapshotsPage.from_json(json) # print the JSON string representation of the object -print DashboardSnapshotsPage.to_json() +print(DashboardSnapshotsPage.to_json()) # convert the object into a dict dashboard_snapshots_page_dict = dashboard_snapshots_page_instance.to_dict() # create an instance of DashboardSnapshotsPage from a dict -dashboard_snapshots_page_form_dict = dashboard_snapshots_page.from_dict(dashboard_snapshots_page_dict) +dashboard_snapshots_page_from_dict = DashboardSnapshotsPage.from_dict(dashboard_snapshots_page_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/dashboards_api/docs/DashboardsApi.md b/dashboards/docs/DashboardsApi.md similarity index 86% rename from dashboards_api/docs/DashboardsApi.md rename to dashboards/docs/DashboardsApi.md index bb4fd6d1..04139e36 100644 --- a/dashboards_api/docs/DashboardsApi.md +++ b/dashboards/docs/DashboardsApi.md @@ -1,4 +1,4 @@ -# dashboards_api.DashboardsApi +# dashboards.DashboardsApi All URIs are relative to *https://api.thousandeyes.com* @@ -13,26 +13,25 @@ Method | HTTP request | Description # **create_dashboard** -> ApiDashboard create_dashboard(api_dashboard, aid=aid) +> Dashboard create_dashboard(dashboard, aid=aid) Create dashboard -Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` premission (Regular User). +Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.dashboard import Dashboard +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -42,20 +41,20 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardsApi(api_client) - api_dashboard = dashboards_api.ApiDashboard() # ApiDashboard | Request body schema to create a dashboard. - aid = '2067' # 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) + api_instance = dashboards.DashboardsApi(api_client) + dashboard = dashboards.Dashboard() # Dashboard | Request body schema to create a dashboard. + 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 dashboard - api_response = api_instance.create_dashboard(api_dashboard, aid=aid) + api_response = api_instance.create_dashboard(dashboard, aid=aid) print("The response of DashboardsApi->create_dashboard:\n") pprint(api_response) except Exception as e: @@ -66,14 +65,15 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **api_dashboard** | [**ApiDashboard**](ApiDashboard.md)| Request body schema to create a dashboard. | + **dashboard** | [**Dashboard**](Dashboard.md)| Request body schema to create a dashboard. | **aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] ### Return type -[**ApiDashboard**](ApiDashboard.md) +[**Dashboard**](Dashboard.md) ### Authorization @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -107,16 +108,15 @@ Deletes a dashboard using the `dashboardId` provided in the request. **Note**: ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.rest import ApiException +import dashboards +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardsApi(api_client) + api_instance = dashboards.DashboardsApi(api_client) dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. - aid = '2067' # 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) + aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) try: # Delete dashboard @@ -148,6 +148,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | @@ -164,9 +165,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -189,17 +191,16 @@ Returns a list of widgets within a dashboard, along with the dashboard's metadat ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.api_dashboard import ApiDashboard +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -209,16 +210,16 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardsApi(api_client) + api_instance = dashboards.DashboardsApi(api_client) dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. - aid = '2067' # 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) + 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 @@ -233,6 +234,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | @@ -252,6 +254,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -274,18 +277,17 @@ Returns the raw data displayed within a widget in the dashboard. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.dashboard_order import DashboardOrder -from dashboards_api.models.get_dashboard_data200_response import GetDashboardData200Response -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.dashboard_order import DashboardOrder +from dashboards.models.get_dashboard_data200_response import GetDashboardData200Response +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -295,24 +297,24 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardsApi(api_client) + api_instance = dashboards.DashboardsApi(api_client) dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. widget_id = 'unpmg' # str | A Identifier for a widget. - aid = '2067' # 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) + 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) max = 10 # float | Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. (optional) cursor = 'bGFzdFJvdW5kSWQ9MTY4MTQxMDQ4MA' # str | An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. (optional) sort = 'alertStatus' # str | Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. (optional) - order = dashboards_api.DashboardOrder() # DashboardOrder | Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. (optional) + order = dashboards.DashboardOrder() # DashboardOrder | Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. (optional) try: # Retrieve dashboard widget data @@ -327,6 +329,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | @@ -354,6 +357,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -376,17 +380,16 @@ Returns a list of dashboards and their settings within your account group. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.api_dashboard import ApiDashboard +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -396,15 +399,15 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardsApi(api_client) - aid = '2067' # 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) + api_instance = dashboards.DashboardsApi(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 dashboards @@ -419,6 +422,7 @@ with dashboards_api.ApiClient(configuration) as api_client: ### 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] @@ -437,6 +441,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -450,7 +455,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_dashboard** -> ApiDashboard update_dashboard(dashboard_id, api_dashboard, aid=aid) +> Dashboard update_dashboard(dashboard_id, dashboard, aid=aid) Update dashboard @@ -459,17 +464,16 @@ Updates an existing dashboard in your account group. **Note**: * Users with t ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import dashboards_api -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.rest import ApiException +import dashboards +from dashboards.models.dashboard import Dashboard +from 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 = dashboards_api.Configuration( +configuration = dashboards.Configuration( host = "https://api.thousandeyes.com" ) @@ -479,21 +483,21 @@ configuration = dashboards_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = dashboards_api.Configuration( +configuration = dashboards.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: +with dashboards.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = dashboards_api.DashboardsApi(api_client) + api_instance = dashboards.DashboardsApi(api_client) dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. - api_dashboard = dashboards_api.ApiDashboard() # ApiDashboard | Request body schema to update a dashboard. - aid = '2067' # 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 = dashboards.Dashboard() # Dashboard | Request body schema to update a dashboard. + 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 dashboard - api_response = api_instance.update_dashboard(dashboard_id, api_dashboard, aid=aid) + api_response = api_instance.update_dashboard(dashboard_id, dashboard, aid=aid) print("The response of DashboardsApi->update_dashboard:\n") pprint(api_response) except Exception as e: @@ -504,15 +508,16 @@ with dashboards_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | - **api_dashboard** | [**ApiDashboard**](ApiDashboard.md)| Request body schema to update a dashboard. | + **dashboard** | [**Dashboard**](Dashboard.md)| Request body schema to update a dashboard. | **aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] ### Return type -[**ApiDashboard**](ApiDashboard.md) +[**Dashboard**](Dashboard.md) ### Authorization @@ -524,6 +529,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/dashboards/docs/DashboardsFiltersApi.md b/dashboards/docs/DashboardsFiltersApi.md new file mode 100644 index 00000000..0848670b --- /dev/null +++ b/dashboards/docs/DashboardsFiltersApi.md @@ -0,0 +1,444 @@ +# dashboards.DashboardsFiltersApi + +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 + + +# **create_dashboard_filter** +> ApiContextFilterResponse create_dashboard_filter(api_context_filter_request, aid=aid) + +Create dashboard filter + +Creates a new dashboard filter in your account group. To create a filter, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import dashboards +from dashboards.models.api_context_filter_request import ApiContextFilterRequest +from dashboards.models.api_context_filter_response import ApiContextFilterResponse +from 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 = dashboards.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 = dashboards.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards.DashboardsFiltersApi(api_client) + api_context_filter_request = dashboards.ApiContextFilterRequest() # ApiContextFilterRequest | Dashboard filter object to be created and saved + 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 dashboard filter + api_response = api_instance.create_dashboard_filter(api_context_filter_request, aid=aid) + print("The response of DashboardsFiltersApi->create_dashboard_filter:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsFiltersApi->create_dashboard_filter: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **api_context_filter_request** | [**ApiContextFilterRequest**](ApiContextFilterRequest.md)| Dashboard filter object to be created and saved | + **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 + +[**ApiContextFilterResponse**](ApiContextFilterResponse.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 | - | +**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_filter_by_id** +> delete_dashboard_filter_by_id(id, aid=aid) + +Delete dashboard filter + +Deletes a dashboard filter using the `filterId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboard filters they have created themselves. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import dashboards +from 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 = dashboards.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 = dashboards.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards.DashboardsFiltersApi(api_client) + id = '65bc18e8f2073a4a469cd958' # str | Unique dashboard filter 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: + # Delete dashboard filter + api_instance.delete_dashboard_filter_by_id(id, aid=aid) + except Exception as e: + print("Exception when calling DashboardsFiltersApi->delete_dashboard_filter_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Unique dashboard filter 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 + +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 | - | + +[[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 dashboards +from dashboards.models.api_context_filters_response import ApiContextFiltersResponse +from 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 = dashboards.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 = dashboards.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 + +Returns a list of data source filters and their metadata within the dashboard filter. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import dashboards +from dashboards.models.api_context_filter_response import ApiContextFilterResponse +from 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 = dashboards.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 = dashboards.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards.DashboardsFiltersApi(api_client) + id = '65bc18e8f2073a4a469cd958' # str | Unique dashboard filter 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsFiltersApi->get_dashboard_filter_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Unique dashboard filter 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 + +[**ApiContextFilterResponse**](ApiContextFilterResponse.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) + +# **update_dashboard_filter_by_id** +> ApiContextFilterResponse update_dashboard_filter_by_id(id, api_context_filter_request, aid=aid) + +Update dashboard filter + +Updates an existing dashboard filter in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard filter. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboard filters they have created themselves. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import dashboards +from dashboards.models.api_context_filter_request import ApiContextFilterRequest +from dashboards.models.api_context_filter_response import ApiContextFilterResponse +from 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 = dashboards.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 = dashboards.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards.DashboardsFiltersApi(api_client) + id = '65bc18e8f2073a4a469cd958' # str | Unique dashboard filter ID. + api_context_filter_request = dashboards.ApiContextFilterRequest() # ApiContextFilterRequest | Updated dashboard filter context object + 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsFiltersApi->update_dashboard_filter_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Unique dashboard filter ID. | + **api_context_filter_request** | [**ApiContextFilterRequest**](ApiContextFilterRequest.md)| Updated dashboard filter context object | + **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 + +[**ApiContextFilterResponse**](ApiContextFilterResponse.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 | - | + +[[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/dashboards/docs/DefaultTimespan.md b/dashboards/docs/DefaultTimespan.md new file mode 100644 index 00000000..fbd8ea5f --- /dev/null +++ b/dashboards/docs/DefaultTimespan.md @@ -0,0 +1,34 @@ +# DefaultTimespan + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timespan_duration** | **int** | Relative timespan in seconds. | [optional] +**timespan_start** | **str** | UTC start date of the timespan range. | [optional] +**timespan_end** | **str** | UTC end date of the timespan range. | [optional] +**duration** | **int** | Relative timespan in seconds. | [optional] +**start** | **datetime** | UTC start date of the timespan range (ISO date-time format). | [optional] +**end** | **datetime** | UTC end date of the timespan range (ISO date-time format). | [optional] + +## Example + +```python +from dashboards.models.default_timespan import DefaultTimespan + +# TODO update the JSON string below +json = "{}" +# create an instance of DefaultTimespan from a JSON string +default_timespan_instance = DefaultTimespan.from_json(json) +# print the JSON string representation of the object +print(DefaultTimespan.to_json()) + +# convert the object into a dict +default_timespan_dict = default_timespan_instance.to_dict() +# create an instance of DefaultTimespan from a dict +default_timespan_from_dict = DefaultTimespan.from_dict(default_timespan_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards/docs/EnterpriseAgentState.md b/dashboards/docs/EnterpriseAgentState.md new file mode 100644 index 00000000..476c1c54 --- /dev/null +++ b/dashboards/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/dashboards/docs/Error.md b/dashboards/docs/Error.md new file mode 100644 index 00000000..032c5932 --- /dev/null +++ b/dashboards/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 dashboards.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/dashboards_api/docs/GenerateDashboardSnapshotRequest.md b/dashboards/docs/GenerateDashboardSnapshotRequest.md similarity index 85% rename from dashboards_api/docs/GenerateDashboardSnapshotRequest.md rename to dashboards/docs/GenerateDashboardSnapshotRequest.md index dbb4dadb..6dc8caec 100644 --- a/dashboards_api/docs/GenerateDashboardSnapshotRequest.md +++ b/dashboards/docs/GenerateDashboardSnapshotRequest.md @@ -3,6 +3,7 @@ Request to generate a snapshot from a dashboard. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_date** | **datetime** | Date and time to start aggregating data (ISO date-time format). | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest +from dashboards.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest # TODO update the JSON string below json = "{}" # create an instance of GenerateDashboardSnapshotRequest from a JSON string generate_dashboard_snapshot_request_instance = GenerateDashboardSnapshotRequest.from_json(json) # print the JSON string representation of the object -print GenerateDashboardSnapshotRequest.to_json() +print(GenerateDashboardSnapshotRequest.to_json()) # convert the object into a dict generate_dashboard_snapshot_request_dict = generate_dashboard_snapshot_request_instance.to_dict() # create an instance of GenerateDashboardSnapshotRequest from a dict -generate_dashboard_snapshot_request_form_dict = generate_dashboard_snapshot_request.from_dict(generate_dashboard_snapshot_request_dict) +generate_dashboard_snapshot_request_from_dict = GenerateDashboardSnapshotRequest.from_dict(generate_dashboard_snapshot_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/dashboards_api/docs/GeoMapDatasource.md b/dashboards/docs/GeoMapDatasource.md similarity index 99% rename from dashboards_api/docs/GeoMapDatasource.md rename to dashboards/docs/GeoMapDatasource.md index 9ebf6b11..768b0c43 100644 --- a/dashboards_api/docs/GeoMapDatasource.md +++ b/dashboards/docs/GeoMapDatasource.md @@ -3,6 +3,7 @@ Datasource of the geo map widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/GetDashboardData200Response.md b/dashboards/docs/GetDashboardData200Response.md similarity index 82% rename from dashboards_api/docs/GetDashboardData200Response.md rename to dashboards/docs/GetDashboardData200Response.md index 93832298..f89ad0cb 100644 --- a/dashboards_api/docs/GetDashboardData200Response.md +++ b/dashboards/docs/GetDashboardData200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] @@ -9,24 +10,24 @@ Name | Type | Description | Notes **group_labels** | [**List[ApiReportDataComponentLabelMap]**](ApiReportDataComponentLabelMap.md) | | [optional] **bin_size** | **int** | Duration of each bin. | [optional] **data** | [**ApiWidgetsDataV2**](ApiWidgetsDataV2.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from dashboards_api.models.get_dashboard_data200_response import GetDashboardData200Response +from dashboards.models.get_dashboard_data200_response import GetDashboardData200Response # TODO update the JSON string below json = "{}" # create an instance of GetDashboardData200Response from a JSON string get_dashboard_data200_response_instance = GetDashboardData200Response.from_json(json) # print the JSON string representation of the object -print GetDashboardData200Response.to_json() +print(GetDashboardData200Response.to_json()) # convert the object into a dict get_dashboard_data200_response_dict = get_dashboard_data200_response_instance.to_dict() # create an instance of GetDashboardData200Response from a dict -get_dashboard_data200_response_form_dict = get_dashboard_data200_response.from_dict(get_dashboard_data200_response_dict) +get_dashboard_data200_response_from_dict = GetDashboardData200Response.from_dict(get_dashboard_data200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/dashboards_api/docs/GroupedBarChartDatasource.md b/dashboards/docs/GroupedBarChartDatasource.md similarity index 99% rename from dashboards_api/docs/GroupedBarChartDatasource.md rename to dashboards/docs/GroupedBarChartDatasource.md index 72eb4e3d..a1316ed4 100644 --- a/dashboards_api/docs/GroupedBarChartDatasource.md +++ b/dashboards/docs/GroupedBarChartDatasource.md @@ -3,6 +3,7 @@ Datasource of the grouped bar chart widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/LegacyAgentWidgetShow.md b/dashboards/docs/LegacyAgentWidgetShow.md new file mode 100644 index 00000000..3b956454 --- /dev/null +++ b/dashboards/docs/LegacyAgentWidgetShow.md @@ -0,0 +1,12 @@ +# LegacyAgentWidgetShow + +Ownership 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/dashboards/docs/LegacyAgentWidgetType.md b/dashboards/docs/LegacyAgentWidgetType.md new file mode 100644 index 00000000..0e1a3a1e --- /dev/null +++ b/dashboards/docs/LegacyAgentWidgetType.md @@ -0,0 +1,12 @@ +# LegacyAgentWidgetType + +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/dashboards/docs/LegacyAlertListAlertType.md b/dashboards/docs/LegacyAlertListAlertType.md new file mode 100644 index 00000000..995d4db3 --- /dev/null +++ b/dashboards/docs/LegacyAlertListAlertType.md @@ -0,0 +1,12 @@ +# LegacyAlertListAlertType + +Name of the alert type + +## 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/dashboards/docs/LegacyApiDashboard.md b/dashboards/docs/LegacyApiDashboard.md new file mode 100644 index 00000000..6010c7f9 --- /dev/null +++ b/dashboards/docs/LegacyApiDashboard.md @@ -0,0 +1,35 @@ +# LegacyApiDashboard + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **int** | Identifier for the account group associated with a dashboard. | [optional] [readonly] +**created_by** | **int** | Identifier for the user that created a dashboard. | [optional] [readonly] +**modified_by** | **int** | Identifier for the user that last modified a dashboard. | [optional] [readonly] +**modified_date** | **str** | UTC date/time when a dashboard was last modified. | [optional] [readonly] +**global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] +**migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] +**api_link** | **List[Dict[str, object]]** | A links array containing the self and the snapshots links. | [optional] + +## Example + +```python +from dashboards.models.legacy_api_dashboard import LegacyApiDashboard + +# TODO update the JSON string below +json = "{}" +# create an instance of LegacyApiDashboard from a JSON string +legacy_api_dashboard_instance = LegacyApiDashboard.from_json(json) +# print the JSON string representation of the object +print(LegacyApiDashboard.to_json()) + +# convert the object into a dict +legacy_api_dashboard_dict = legacy_api_dashboard_instance.to_dict() +# create an instance of LegacyApiDashboard from a dict +legacy_api_dashboard_from_dict = LegacyApiDashboard.from_dict(legacy_api_dashboard_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/dashboards/docs/LegacyDashboardSnapshot.md b/dashboards/docs/LegacyDashboardSnapshot.md new file mode 100644 index 00000000..c6632522 --- /dev/null +++ b/dashboards/docs/LegacyDashboardSnapshot.md @@ -0,0 +1,33 @@ +# LegacyDashboardSnapshot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **int** | Identifier of the account group that the snapshot belongs to. | [optional] +**created_date** | **str** | UTC date when dashboard snapshot was created. | [optional] +**expiration_date** | **str** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date. | [optional] +**permalink** | **str** | Hyperlink to dashboard snapshot in ThousandEyes Application | [optional] +**api_links** | **List[Dict[str, object]]** | A links array containing the self link. | [optional] + +## Example + +```python +from dashboards.models.legacy_dashboard_snapshot import LegacyDashboardSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of LegacyDashboardSnapshot from a JSON string +legacy_dashboard_snapshot_instance = LegacyDashboardSnapshot.from_json(json) +# print the JSON string representation of the object +print(LegacyDashboardSnapshot.to_json()) + +# convert the object into a dict +legacy_dashboard_snapshot_dict = legacy_dashboard_snapshot_instance.to_dict() +# create an instance of LegacyDashboardSnapshot from a dict +legacy_dashboard_snapshot_from_dict = LegacyDashboardSnapshot.from_dict(legacy_dashboard_snapshot_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/dashboards/docs/LegacyDefaultTimespan.md b/dashboards/docs/LegacyDefaultTimespan.md new file mode 100644 index 00000000..952f964d --- /dev/null +++ b/dashboards/docs/LegacyDefaultTimespan.md @@ -0,0 +1,31 @@ +# LegacyDefaultTimespan + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timespan_duration** | **int** | Relative timespan in seconds. | [optional] +**timespan_start** | **str** | UTC start date of the timespan range. | [optional] +**timespan_end** | **str** | UTC end date of the timespan range. | [optional] + +## Example + +```python +from dashboards.models.legacy_default_timespan import LegacyDefaultTimespan + +# TODO update the JSON string below +json = "{}" +# create an instance of LegacyDefaultTimespan from a JSON string +legacy_default_timespan_instance = LegacyDefaultTimespan.from_json(json) +# print the JSON string representation of the object +print(LegacyDefaultTimespan.to_json()) + +# convert the object into a dict +legacy_default_timespan_dict = legacy_default_timespan_instance.to_dict() +# create an instance of LegacyDefaultTimespan from a dict +legacy_default_timespan_from_dict = LegacyDefaultTimespan.from_dict(legacy_default_timespan_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards/docs/LegacyDurationUnit.md b/dashboards/docs/LegacyDurationUnit.md new file mode 100644 index 00000000..19cc7b23 --- /dev/null +++ b/dashboards/docs/LegacyDurationUnit.md @@ -0,0 +1,12 @@ +# LegacyDurationUnit + +Timespan unit. + +## 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/dashboards/docs/LegacyWidgetSortDirection.md b/dashboards/docs/LegacyWidgetSortDirection.md new file mode 100644 index 00000000..2ec57381 --- /dev/null +++ b/dashboards/docs/LegacyWidgetSortDirection.md @@ -0,0 +1,12 @@ +# LegacyWidgetSortDirection + +Specifies the order in which cards are sorted. + +## 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/dashboards/docs/LegacyWidgetSortProperty.md b/dashboards/docs/LegacyWidgetSortProperty.md new file mode 100644 index 00000000..164df8a7 --- /dev/null +++ b/dashboards/docs/LegacyWidgetSortProperty.md @@ -0,0 +1,12 @@ +# LegacyWidgetSortProperty + +Determines the card sorting criterion. + +## 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/dashboards/docs/Link.md b/dashboards/docs/Link.md new file mode 100644 index 00000000..e4d19c44 --- /dev/null +++ b/dashboards/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 dashboards.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/dashboards_api/docs/MetricGroup.md b/dashboards/docs/MetricGroup.md similarity index 99% rename from dashboards_api/docs/MetricGroup.md rename to dashboards/docs/MetricGroup.md index 8642e9b7..9b9bfac6 100644 --- a/dashboards_api/docs/MetricGroup.md +++ b/dashboards/docs/MetricGroup.md @@ -3,6 +3,7 @@ Metric group of widget as it appears in the UI. Note: may not be required in some cases. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/MultiMetricsTableDatasource.md b/dashboards/docs/MultiMetricsTableDatasource.md similarity index 99% rename from dashboards_api/docs/MultiMetricsTableDatasource.md rename to dashboards/docs/MultiMetricsTableDatasource.md index 53d2a7e4..60b92027 100644 --- a/dashboards_api/docs/MultiMetricsTableDatasource.md +++ b/dashboards/docs/MultiMetricsTableDatasource.md @@ -3,6 +3,7 @@ Datasource of the Multi-Metrics table widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/NumbersCardDatasource.md b/dashboards/docs/NumbersCardDatasource.md similarity index 99% rename from dashboards_api/docs/NumbersCardDatasource.md rename to dashboards/docs/NumbersCardDatasource.md index ba8fe7db..4f82a450 100644 --- a/dashboards_api/docs/NumbersCardDatasource.md +++ b/dashboards/docs/NumbersCardDatasource.md @@ -3,6 +3,7 @@ Datasource of the numbers card widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/PaginationLinks.md b/dashboards/docs/PaginationLinks.md new file mode 100644 index 00000000..58125dda --- /dev/null +++ b/dashboards/docs/PaginationLinks.md @@ -0,0 +1,30 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from dashboards.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/dashboards/docs/PaginationLinksLinks.md b/dashboards/docs/PaginationLinksLinks.md new file mode 100644 index 00000000..9d85984b --- /dev/null +++ b/dashboards/docs/PaginationLinksLinks.md @@ -0,0 +1,31 @@ +# PaginationLinksLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from dashboards.models.pagination_links_links import PaginationLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinksLinks from a JSON string +pagination_links_links_instance = PaginationLinksLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinksLinks.to_json()) + +# convert the object into a dict +pagination_links_links_dict = pagination_links_links_instance.to_dict() +# create an instance of PaginationLinksLinks from a dict +pagination_links_links_from_dict = PaginationLinksLinks.from_dict(pagination_links_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/dashboards_api/docs/PieChartDatasource.md b/dashboards/docs/PieChartDatasource.md similarity index 99% rename from dashboards_api/docs/PieChartDatasource.md rename to dashboards/docs/PieChartDatasource.md index ff19a93b..837ae304 100644 --- a/dashboards_api/docs/PieChartDatasource.md +++ b/dashboards/docs/PieChartDatasource.md @@ -3,6 +3,7 @@ Datasource of the pie chart widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/QueryWindow.md b/dashboards/docs/QueryWindow.md new file mode 100644 index 00000000..52dd4015 --- /dev/null +++ b/dashboards/docs/QueryWindow.md @@ -0,0 +1,30 @@ +# QueryWindow + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +## Example + +```python +from dashboards.models.query_window import QueryWindow + +# TODO update the JSON string below +json = "{}" +# create an instance of QueryWindow from a JSON string +query_window_instance = QueryWindow.from_json(json) +# print the JSON string representation of the object +print(QueryWindow.to_json()) + +# convert the object into a dict +query_window_dict = query_window_instance.to_dict() +# create an instance of QueryWindow from a dict +query_window_from_dict = QueryWindow.from_dict(query_window_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/dashboards_api/docs/ScalableWidget.md b/dashboards/docs/ScalableWidget.md similarity index 78% rename from dashboards_api/docs/ScalableWidget.md rename to dashboards/docs/ScalableWidget.md index 8eb397af..f0c2b544 100644 --- a/dashboards_api/docs/ScalableWidget.md +++ b/dashboards/docs/ScalableWidget.md @@ -2,28 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] +**min_scale** | **float** | Minimum scale configured in the widget. | [optional] **max_scale** | **float** | Maximum scale configured in the widget. | [optional] **unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] ## Example ```python -from dashboards_api.models.scalable_widget import ScalableWidget +from dashboards.models.scalable_widget import ScalableWidget # TODO update the JSON string below json = "{}" # create an instance of ScalableWidget from a JSON string scalable_widget_instance = ScalableWidget.from_json(json) # print the JSON string representation of the object -print ScalableWidget.to_json() +print(ScalableWidget.to_json()) # convert the object into a dict scalable_widget_dict = scalable_widget_instance.to_dict() # create an instance of ScalableWidget from a dict -scalable_widget_form_dict = scalable_widget.from_dict(scalable_widget_dict) +scalable_widget_from_dict = ScalableWidget.from_dict(scalable_widget_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/dashboards/docs/SelfLinks.md b/dashboards/docs/SelfLinks.md new file mode 100644 index 00000000..e37b8a3c --- /dev/null +++ b/dashboards/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from dashboards.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/dashboards/docs/SelfLinksLinks.md b/dashboards/docs/SelfLinksLinks.md new file mode 100644 index 00000000..aa2bddfd --- /dev/null +++ b/dashboards/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from dashboards.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/dashboards/docs/SnapshotDataByWidget200Response.md b/dashboards/docs/SnapshotDataByWidget200Response.md new file mode 100644 index 00000000..a92516af --- /dev/null +++ b/dashboards/docs/SnapshotDataByWidget200Response.md @@ -0,0 +1,34 @@ +# SnapshotDataByWidget200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**group_labels** | [**List[ApiReportDataComponentLabelMap]**](ApiReportDataComponentLabelMap.md) | | [optional] +**bin_size** | **int** | Duration of each bin. | [optional] +**data** | [**ApiWidgetsDataV2**](ApiWidgetsDataV2.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from dashboards.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SnapshotDataByWidget200Response from a JSON string +snapshot_data_by_widget200_response_instance = SnapshotDataByWidget200Response.from_json(json) +# print the JSON string representation of the object +print(SnapshotDataByWidget200Response.to_json()) + +# convert the object into a dict +snapshot_data_by_widget200_response_dict = snapshot_data_by_widget200_response_instance.to_dict() +# create an instance of SnapshotDataByWidget200Response from a dict +snapshot_data_by_widget200_response_from_dict = SnapshotDataByWidget200Response.from_dict(snapshot_data_by_widget200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/dashboards_api/docs/StackedAreaChartDatasource.md b/dashboards/docs/StackedAreaChartDatasource.md similarity index 99% rename from dashboards_api/docs/StackedAreaChartDatasource.md rename to dashboards/docs/StackedAreaChartDatasource.md index 3e67f815..d12f28af 100644 --- a/dashboards_api/docs/StackedAreaChartDatasource.md +++ b/dashboards/docs/StackedAreaChartDatasource.md @@ -3,6 +3,7 @@ Datasource of the stacked area chart widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/StackedBarChartDatasource.md b/dashboards/docs/StackedBarChartDatasource.md similarity index 99% rename from dashboards_api/docs/StackedBarChartDatasource.md rename to dashboards/docs/StackedBarChartDatasource.md index 28553e3a..478d1a22 100644 --- a/dashboards_api/docs/StackedBarChartDatasource.md +++ b/dashboards/docs/StackedBarChartDatasource.md @@ -3,6 +3,7 @@ Datasource of the stacked bar chart widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/TableDatasource.md b/dashboards/docs/TableDatasource.md similarity index 99% rename from dashboards_api/docs/TableDatasource.md rename to dashboards/docs/TableDatasource.md index 134e4b04..f0e9b974 100644 --- a/dashboards_api/docs/TableDatasource.md +++ b/dashboards/docs/TableDatasource.md @@ -3,6 +3,7 @@ Datasource of the table widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/TestTableDatasource.md b/dashboards/docs/TestTableDatasource.md similarity index 99% rename from dashboards_api/docs/TestTableDatasource.md rename to dashboards/docs/TestTableDatasource.md index de2f787a..aca5e694 100644 --- a/dashboards_api/docs/TestTableDatasource.md +++ b/dashboards/docs/TestTableDatasource.md @@ -3,6 +3,7 @@ Datasource of the test table widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/TestTableFilterKey.md b/dashboards/docs/TestTableFilterKey.md similarity index 99% rename from dashboards_api/docs/TestTableFilterKey.md rename to dashboards/docs/TestTableFilterKey.md index 342a3be9..bd3764f0 100644 --- a/dashboards_api/docs/TestTableFilterKey.md +++ b/dashboards/docs/TestTableFilterKey.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/TestTableFilterType.md b/dashboards/docs/TestTableFilterType.md similarity index 99% rename from dashboards_api/docs/TestTableFilterType.md rename to dashboards/docs/TestTableFilterType.md index 193d53b4..198fbf78 100644 --- a/dashboards_api/docs/TestTableFilterType.md +++ b/dashboards/docs/TestTableFilterType.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/TimeseriesDatasource.md b/dashboards/docs/TimeseriesDatasource.md similarity index 99% rename from dashboards_api/docs/TimeseriesDatasource.md rename to dashboards/docs/TimeseriesDatasource.md index baa1ef6c..95119e13 100644 --- a/dashboards_api/docs/TimeseriesDatasource.md +++ b/dashboards/docs/TimeseriesDatasource.md @@ -3,6 +3,7 @@ Datasource of the Timeseries widget. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/docs/UnauthorizedError.md b/dashboards/docs/UnauthorizedError.md new file mode 100644 index 00000000..d8b6734f --- /dev/null +++ b/dashboards/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from dashboards.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/dashboards/docs/UpdateSnapshotExpirationDateApiRequest.md b/dashboards/docs/UpdateSnapshotExpirationDateApiRequest.md new file mode 100644 index 00000000..98cbf481 --- /dev/null +++ b/dashboards/docs/UpdateSnapshotExpirationDateApiRequest.md @@ -0,0 +1,31 @@ +# UpdateSnapshotExpirationDateApiRequest + +Request to update the expiration date of a snapshot. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_expiration_date** | **datetime** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format. | [optional] +**expiration_date** | **str** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date. | [optional] + +## Example + +```python +from dashboards.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSnapshotExpirationDateApiRequest from a JSON string +update_snapshot_expiration_date_api_request_instance = UpdateSnapshotExpirationDateApiRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateSnapshotExpirationDateApiRequest.to_json()) + +# convert the object into a dict +update_snapshot_expiration_date_api_request_dict = update_snapshot_expiration_date_api_request_instance.to_dict() +# create an instance of UpdateSnapshotExpirationDateApiRequest from a dict +update_snapshot_expiration_date_api_request_from_dict = UpdateSnapshotExpirationDateApiRequest.from_dict(update_snapshot_expiration_date_api_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/dashboards/docs/ValidationError.md b/dashboards/docs/ValidationError.md new file mode 100644 index 00000000..d3d2def1 --- /dev/null +++ b/dashboards/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from dashboards.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/dashboards/docs/ValidationErrorAllOfErrors.md b/dashboards/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..535d54b4 --- /dev/null +++ b/dashboards/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from dashboards.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/dashboards_api/docs/VisualMode.md b/dashboards/docs/VisualMode.md similarity index 99% rename from dashboards_api/docs/VisualMode.md rename to dashboards/docs/VisualMode.md index 70cb7c16..c7f866c9 100644 --- a/dashboards_api/docs/VisualMode.md +++ b/dashboards/docs/VisualMode.md @@ -3,6 +3,7 @@ Visual mode in the UI. Either full or half the width of the window. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/Widget.md b/dashboards/docs/Widget.md similarity index 81% rename from dashboards_api/docs/Widget.md rename to dashboards/docs/Widget.md index e7971fca..960ec26a 100644 --- a/dashboards_api/docs/Widget.md +++ b/dashboards/docs/Widget.md @@ -2,11 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] +**id** | **str** | Identifier of the widget. | [optional] [readonly] **title** | **str** | Title of the widget | [optional] **visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] **embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] @@ -14,7 +14,7 @@ Name | Type | Description | Notes **metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] **direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] **metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] +**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like `AGENT`, `ENDPOINT_MACHINE_ID`, `TEST`, `MONITOR`, etc. The `filterValue` represents an identifier array of the selected property. | [optional] **measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] **fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] **api_link** | **str** | | [optional] [readonly] @@ -23,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from dashboards_api.models.widget import Widget +from dashboards.models.widget import Widget # TODO update the JSON string below json = "{}" # create an instance of Widget from a JSON string widget_instance = Widget.from_json(json) # print the JSON string representation of the object -print Widget.to_json() +print(Widget.to_json()) # convert the object into a dict widget_dict = widget_instance.to_dict() # create an instance of Widget from a dict -widget_form_dict = widget.from_dict(widget_dict) +widget_from_dict = Widget.from_dict(widget_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/dashboards_api/docs/WidgetMeasureType.md b/dashboards/docs/WidgetMeasureType.md similarity index 99% rename from dashboards_api/docs/WidgetMeasureType.md rename to dashboards/docs/WidgetMeasureType.md index 3a0add14..9feb5356 100644 --- a/dashboards_api/docs/WidgetMeasureType.md +++ b/dashboards/docs/WidgetMeasureType.md @@ -3,6 +3,7 @@ Determines how to aggregate the the metric. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards_api/docs/WidgetType.md b/dashboards/docs/WidgetType.md similarity index 99% rename from dashboards_api/docs/WidgetType.md rename to dashboards/docs/WidgetType.md index 5eedae42..fa6104a7 100644 --- a/dashboards_api/docs/WidgetType.md +++ b/dashboards/docs/WidgetType.md @@ -3,6 +3,7 @@ Type of the Widget ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/dashboards/pyproject.toml b/dashboards/pyproject.toml new file mode 100644 index 00000000..6da46d20 --- /dev/null +++ b/dashboards/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "dashboards" +version = "1.0.0" +description = "Dashboards API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Dashboards API"] +include = ["dashboards/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "dashboards", + #"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/dashboards_api/requirements.txt b/dashboards/requirements.txt similarity index 100% rename from dashboards_api/requirements.txt rename to dashboards/requirements.txt diff --git a/dashboards_api/setup.cfg b/dashboards/setup.cfg similarity index 100% rename from dashboards_api/setup.cfg rename to dashboards/setup.cfg diff --git a/dashboards/setup.py b/dashboards/setup.py new file mode 100644 index 00000000..756af166 --- /dev/null +++ b/dashboards/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "dashboards" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Dashboards API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/dashboards", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Dashboards API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + Manage ThousandEyes Dashboards. + """, # noqa: E501 + package_data={"dashboards": ["py.typed"]}, +) diff --git a/dashboards/test-requirements.txt b/dashboards/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/dashboards/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/dashboards_api/test/__init__.py b/dashboards/test/__init__.py similarity index 100% rename from dashboards_api/test/__init__.py rename to dashboards/test/__init__.py diff --git a/dashboards/test/test_agent_status_datasource.py b/dashboards/test/test_agent_status_datasource.py new file mode 100644 index 00000000..c5cae587 --- /dev/null +++ b/dashboards/test/test_agent_status_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.agent_status_datasource import AgentStatusDatasource + +class TestAgentStatusDatasource(unittest.TestCase): + """AgentStatusDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAgentStatusDatasource(self): + """Test AgentStatusDatasource""" + # inst = AgentStatusDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_alert_list_alert_type.py b/dashboards/test/test_alert_list_alert_type.py new file mode 100644 index 00000000..2e51e766 --- /dev/null +++ b/dashboards/test/test_alert_list_alert_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.alert_list_alert_type import AlertListAlertType + +class TestAlertListAlertType(unittest.TestCase): + """AlertListAlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertListAlertType(self): + """Test AlertListAlertType""" + # inst = AlertListAlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_alert_list_datasource.py b/dashboards/test/test_alert_list_datasource.py new file mode 100644 index 00000000..a1ed9585 --- /dev/null +++ b/dashboards/test/test_alert_list_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.alert_list_datasource import AlertListDatasource + +class TestAlertListDatasource(unittest.TestCase): + """AlertListDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertListDatasource(self): + """Test AlertListDatasource""" + # inst = AlertListDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_agent_location.py b/dashboards/test/test_api_agent_location.py similarity index 88% rename from dashboards_api/test/test_api_agent_location.py rename to dashboards/test/test_api_agent_location.py index cd21b857..ac54f177 100644 --- a/dashboards_api/test/test_api_agent_location.py +++ b/dashboards/test/test_api_agent_location.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_agent_location import ApiAgentLocation +from dashboards.models.api_agent_location import ApiAgentLocation class TestApiAgentLocation(unittest.TestCase): """ApiAgentLocation unit test stubs""" diff --git a/dashboards_api/test/test_api_agent_status_agent.py b/dashboards/test/test_api_agent_status_agent.py similarity index 82% rename from dashboards_api/test/test_api_agent_status_agent.py rename to dashboards/test/test_api_agent_status_agent.py index 20a16d0f..bab33769 100644 --- a/dashboards_api/test/test_api_agent_status_agent.py +++ b/dashboards/test/test_api_agent_status_agent.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_agent_status_agent import ApiAgentStatusAgent +from dashboards.models.api_agent_status_agent import ApiAgentStatusAgent class TestApiAgentStatusAgent(unittest.TestCase): """ApiAgentStatusAgent unit test stubs""" @@ -38,13 +37,13 @@ class TestApiAgentStatusAgent(unittest.TestCase): return ApiAgentStatusAgent( agent_id = '6522', status = 'online', - ip_info = dashboards_api.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( + ip_info = dashboards.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( public_ip = '172.58.92.31', private_ip = '172.58.92.31', ipv6 = '', operative_system_version = '', ), agent_name = '0c3898000117', - location = dashboards_api.models.api_agent_location.ApiAgentLocation( + location = dashboards.models.api_agent_location.ApiAgentLocation( latitude = 37.77493, longitude = -122.41942, location_name = 'San Francisco, California, US', ) diff --git a/dashboards_api/test/test_api_agent_status_ip_info.py b/dashboards/test/test_api_agent_status_ip_info.py similarity index 88% rename from dashboards_api/test/test_api_agent_status_ip_info.py rename to dashboards/test/test_api_agent_status_ip_info.py index d20f326f..1e2239aa 100644 --- a/dashboards_api/test/test_api_agent_status_ip_info.py +++ b/dashboards/test/test_api_agent_status_ip_info.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_agent_status_ip_info import ApiAgentStatusIpInfo +from dashboards.models.api_agent_status_ip_info import ApiAgentStatusIpInfo class TestApiAgentStatusIpInfo(unittest.TestCase): """ApiAgentStatusIpInfo unit test stubs""" diff --git a/dashboards_api/test/test_api_agent_status_summary.py b/dashboards/test/test_api_agent_status_summary.py similarity index 87% rename from dashboards_api/test/test_api_agent_status_summary.py rename to dashboards/test/test_api_agent_status_summary.py index 71557a3a..82ef9ccd 100644 --- a/dashboards_api/test/test_api_agent_status_summary.py +++ b/dashboards/test/test_api_agent_status_summary.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_agent_status_summary import ApiAgentStatusSummary +from dashboards.models.api_agent_status_summary import ApiAgentStatusSummary class TestApiAgentStatusSummary(unittest.TestCase): """ApiAgentStatusSummary unit test stubs""" diff --git a/dashboards/test/test_api_agent_status_widget.py b/dashboards/test/test_api_agent_status_widget.py new file mode 100644 index 00000000..16eeee6a --- /dev/null +++ b/dashboards/test/test_api_agent_status_widget.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_agent_status_widget import ApiAgentStatusWidget + +class TestApiAgentStatusWidget(unittest.TestCase): + """ApiAgentStatusWidget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiAgentStatusWidget: + """Test ApiAgentStatusWidget + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiAgentStatusWidget` + """ + model = ApiAgentStatusWidget() + if include_optional: + return ApiAgentStatusWidget( + id = '1234', + title = 'Widget Title', + visual_mode = 'Full', + embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', + is_embedded = True, + metric_group = 'BGP', + direction = 'FROM_TARGET', + metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, + measure = MEAN, + fixed_timespan = dashboards.models.api_duration.ApiDuration( + value = 10, + unit = 'Days', ), + api_link = '', + should_exclude_alert_suppression_windows = True, + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + type = 'Agent Status', + agents = 'Enterprise Agents', + show = 'Owned Agents', + data_source = 'ENDPOINT_AGENTS' + ) + else: + return ApiAgentStatusWidget( + type = 'Agent Status', + ) + """ + + def testApiAgentStatusWidget(self): + """Test ApiAgentStatusWidget""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_agent_widget_show.py b/dashboards/test/test_api_agent_widget_show.py new file mode 100644 index 00000000..36e0f25e --- /dev/null +++ b/dashboards/test/test_api_agent_widget_show.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_agent_widget_show import ApiAgentWidgetShow + +class TestApiAgentWidgetShow(unittest.TestCase): + """ApiAgentWidgetShow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiAgentWidgetShow(self): + """Test ApiAgentWidgetShow""" + # inst = ApiAgentWidgetShow() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_agent_widget_type.py b/dashboards/test/test_api_agent_widget_type.py new file mode 100644 index 00000000..7ac34d88 --- /dev/null +++ b/dashboards/test/test_api_agent_widget_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_agent_widget_type import ApiAgentWidgetType + +class TestApiAgentWidgetType(unittest.TestCase): + """ApiAgentWidgetType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiAgentWidgetType(self): + """Test ApiAgentWidgetType""" + # inst = ApiAgentWidgetType() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_aggregate_property.py b/dashboards/test/test_api_aggregate_property.py new file mode 100644 index 00000000..12a990e5 --- /dev/null +++ b/dashboards/test/test_api_aggregate_property.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_aggregate_property import ApiAggregateProperty + +class TestApiAggregateProperty(unittest.TestCase): + """ApiAggregateProperty unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiAggregateProperty(self): + """Test ApiAggregateProperty""" + # inst = ApiAggregateProperty() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_alert_list_alert.py b/dashboards/test/test_api_alert_list_alert.py similarity index 86% rename from dashboards_api/test/test_api_alert_list_alert.py rename to dashboards/test/test_api_alert_list_alert.py index da60fbac..514bb331 100644 --- a/dashboards_api/test/test_api_alert_list_alert.py +++ b/dashboards/test/test_api_alert_list_alert.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_alert_list_alert import ApiAlertListAlert +from dashboards.models.api_alert_list_alert import ApiAlertListAlert class TestApiAlertListAlert(unittest.TestCase): """ApiAlertListAlert unit test stubs""" @@ -41,7 +40,7 @@ class TestApiAlertListAlert(unittest.TestCase): rule_id = '281724', alert_source = 'Http Test', alert_rule = 'Http Test Rule', - alert_type = 'Network - End-to-End (Server)', + alert_type = 'network-end-to-end-server', start_time = '2023-06-02T08:54Z', duration_in_seconds = 25, active = True diff --git a/dashboards_api/test/test_api_alert_list_widget.py b/dashboards/test/test_api_alert_list_widget.py similarity index 78% rename from dashboards_api/test/test_api_alert_list_widget.py rename to dashboards/test/test_api_alert_list_widget.py index eb40a163..236d8ee3 100644 --- a/dashboards_api/test/test_api_alert_list_widget.py +++ b/dashboards/test/test_api_alert_list_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_alert_list_widget import ApiAlertListWidget +from dashboards.models.api_alert_list_widget import ApiAlertListWidget class TestApiAlertListWidget(unittest.TestCase): """ApiAlertListWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiAlertListWidget(unittest.TestCase): if include_optional: return ApiAlertListWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiAlertListWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,15 +60,17 @@ class TestApiAlertListWidget(unittest.TestCase): profile = '', title = '', hreflang = '', ), ), + type = 'Alert List', alert_types = [ 'Network - End-to-End (Server)' ], limit_to = 15, active_within = None, - data_source = 'ENDPOINT_AST_TEST' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiAlertListWidget( + type = 'Alert List', ) """ diff --git a/dashboards_api/test/test_api_alert_list_widget_all_of_active_within.py b/dashboards/test/test_api_alert_list_widget_all_of_active_within.py similarity index 85% rename from dashboards_api/test/test_api_alert_list_widget_all_of_active_within.py rename to dashboards/test/test_api_alert_list_widget_all_of_active_within.py index a16b9a2a..2f9078b4 100644 --- a/dashboards_api/test/test_api_alert_list_widget_all_of_active_within.py +++ b/dashboards/test/test_api_alert_list_widget_all_of_active_within.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin +from dashboards.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin class TestApiAlertListWidgetAllOfActiveWithin(unittest.TestCase): """ApiAlertListWidgetAllOfActiveWithin unit test stubs""" @@ -37,7 +36,7 @@ class TestApiAlertListWidgetAllOfActiveWithin(unittest.TestCase): if include_optional: return ApiAlertListWidgetAllOfActiveWithin( value = 10, - unit = 'hour' + unit = 'Days' ) else: return ApiAlertListWidgetAllOfActiveWithin( diff --git a/dashboards_api/test/test_api_box_and_whiskers_widget.py b/dashboards/test/test_api_box_and_whiskers_widget.py similarity index 79% rename from dashboards_api/test/test_api_box_and_whiskers_widget.py rename to dashboards/test/test_api_box_and_whiskers_widget.py index a00a4beb..f10db8d8 100644 --- a/dashboards_api/test/test_api_box_and_whiskers_widget.py +++ b/dashboards/test/test_api_box_and_whiskers_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget +from dashboards.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget class TestApiBoxAndWhiskersWidget(unittest.TestCase): """ApiBoxAndWhiskersWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiBoxAndWhiskersWidget(unittest.TestCase): if include_optional: return ApiBoxAndWhiskersWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiBoxAndWhiskersWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -65,11 +63,13 @@ class TestApiBoxAndWhiskersWidget(unittest.TestCase): min_scale = 1.0, max_scale = 100.0, unit = 'Mbps', + type = 'Box and Whiskers', group_by = 'ALL', data_source = 'INTERNET_INSIGHTS' ) else: return ApiBoxAndWhiskersWidget( + type = 'Box and Whiskers', ) """ diff --git a/dashboards_api/test/test_api_color_grid_widget.py b/dashboards/test/test_api_color_grid_widget.py similarity index 80% rename from dashboards_api/test/test_api_color_grid_widget.py rename to dashboards/test/test_api_color_grid_widget.py index d8c10c4f..645386b9 100644 --- a/dashboards_api/test/test_api_color_grid_widget.py +++ b/dashboards/test/test_api_color_grid_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_color_grid_widget import ApiColorGridWidget +from dashboards.models.api_color_grid_widget import ApiColorGridWidget class TestApiColorGridWidget(unittest.TestCase): """ApiColorGridWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiColorGridWidget(unittest.TestCase): if include_optional: return ApiColorGridWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiColorGridWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -65,6 +63,7 @@ class TestApiColorGridWidget(unittest.TestCase): min_scale = 1.0, max_scale = 100.0, unit = 'Mbps', + type = 'Color Grid', cards = 'ALL', group_cards_by = 'ALL', columns = 1, @@ -75,6 +74,7 @@ class TestApiColorGridWidget(unittest.TestCase): ) else: return ApiColorGridWidget( + type = 'Color Grid', ) """ diff --git a/dashboards/test/test_api_context_filter_request.py b/dashboards/test/test_api_context_filter_request.py new file mode 100644 index 00000000..4a9af78b --- /dev/null +++ b/dashboards/test/test_api_context_filter_request.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_context_filter_request import ApiContextFilterRequest + +class TestApiContextFilterRequest(unittest.TestCase): + """ApiContextFilterRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiContextFilterRequest: + """Test ApiContextFilterRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiContextFilterRequest` + """ + model = ApiContextFilterRequest() + if include_optional: + return ApiContextFilterRequest( + context = [ + dashboards.models.api_data_source_filters.ApiDataSourceFilters( + data_source_id = 'VIRTUAL_AGENT', + filters = [ + dashboards.models.api_data_source_filter.ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], ) + ], ) + ], + name = 'cea-filter', + description = 'Global filter for CEA widgets' + ) + else: + return ApiContextFilterRequest( + context = [ + dashboards.models.api_data_source_filters.ApiDataSourceFilters( + data_source_id = 'VIRTUAL_AGENT', + filters = [ + dashboards.models.api_data_source_filter.ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], ) + ], ) + ], + name = 'cea-filter', + ) + """ + + def testApiContextFilterRequest(self): + """Test ApiContextFilterRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_context_filter_response.py b/dashboards/test/test_api_context_filter_response.py new file mode 100644 index 00000000..4d8f52f1 --- /dev/null +++ b/dashboards/test/test_api_context_filter_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_context_filter_response import ApiContextFilterResponse + +class TestApiContextFilterResponse(unittest.TestCase): + """ApiContextFilterResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiContextFilterResponse: + """Test ApiContextFilterResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiContextFilterResponse` + """ + model = ApiContextFilterResponse() + if include_optional: + return ApiContextFilterResponse( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + context = [ + dashboards.models.api_data_source_filters.ApiDataSourceFilters( + data_source_id = 'VIRTUAL_AGENT', + filters = [ + dashboards.models.api_data_source_filter.ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], ) + ], ) + ], + aid = '11', + id = '65bc18e8f2073a4a469cd958', + name = 'cea-filter', + description = 'Global filter for CEA widgets', + created_by = dashboards.models.api_dashboard_filter_user_details.ApiDashboardFilterUserDetails( + uid = '1', + name = 'Test User', ), + modified_date = '2024-02-01T22:19:19Z', + created_date = '2024-02-01T22:19:19Z', + modified_by = dashboards.models.api_dashboard_filter_user_details.ApiDashboardFilterUserDetails( + uid = '1', + name = 'Test User', ) + ) + else: + return ApiContextFilterResponse( + context = [ + dashboards.models.api_data_source_filters.ApiDataSourceFilters( + data_source_id = 'VIRTUAL_AGENT', + filters = [ + dashboards.models.api_data_source_filter.ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], ) + ], ) + ], + aid = '11', + id = '65bc18e8f2073a4a469cd958', + name = 'cea-filter', + ) + """ + + def testApiContextFilterResponse(self): + """Test ApiContextFilterResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_context_filters_response.py b/dashboards/test/test_api_context_filters_response.py new file mode 100644 index 00000000..bbc72f35 --- /dev/null +++ b/dashboards/test/test_api_context_filters_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_context_filters_response import ApiContextFiltersResponse + +class TestApiContextFiltersResponse(unittest.TestCase): + """ApiContextFiltersResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiContextFiltersResponse: + """Test ApiContextFiltersResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiContextFiltersResponse` + """ + model = ApiContextFiltersResponse() + if include_optional: + return ApiContextFiltersResponse( + dashboard_filters = [ + null + ] + ) + else: + return ApiContextFiltersResponse( + ) + """ + + def testApiContextFiltersResponse(self): + """Test ApiContextFiltersResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_dashboard.py b/dashboards/test/test_api_dashboard.py similarity index 75% rename from dashboards_api/test/test_api_dashboard.py rename to dashboards/test/test_api_dashboard.py index 78d966d3..73771315 100644 --- a/dashboards_api/test/test_api_dashboard.py +++ b/dashboards/test/test_api_dashboard.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_dashboard import ApiDashboard +from dashboards.models.api_dashboard import ApiDashboard class TestApiDashboard(unittest.TestCase): """ApiDashboard unit test stubs""" @@ -36,8 +35,18 @@ class TestApiDashboard(unittest.TestCase): model = ApiDashboard() if include_optional: return ApiDashboard( - links = dashboards_api.models.dashboard_links__links.DashboardLinks__links( - self = dashboards_api.models.link.Link( + global_filter_id = '65babd9bb90bf55b17c96c8d', + account_id = 1234, + created_by = 1, + modified_by = 1, + modified_date = '2023-05-16 10:14:28', + global_override = True, + migrated_report = False, + api_link = [ + { } + ], + links = dashboards.models.dashboard_links__links.DashboardLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -46,7 +55,7 @@ class TestApiDashboard(unittest.TestCase): profile = '', title = '', hreflang = '', ), - snapshots = dashboards_api.models.link.Link( + snapshots = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -58,7 +67,7 @@ class TestApiDashboard(unittest.TestCase): dashboard_id = '5e1f7a99143ae6004fdc3bb4', title = 'HTTP Server Widgets', is_built_in = True, - aid = '75', + aid = '1234', dashboard_created_by = '1', dashboard_modified_by = '1', dashboard_modified_date = '2023-05-16T10:14:28Z', @@ -69,10 +78,7 @@ class TestApiDashboard(unittest.TestCase): null ], description = 'HTTP Server Widgets', - default_timespan = dashboards_api.models.api_default_timespan.ApiDefaultTimespan( - duration = 7200, - start = '2023-05-16T10:14:28Z', - end = '2023-05-16T11:14:28Z', ), + default_timespan = None, is_global_override = True, is_migrated_report = False ) diff --git a/dashboards_api/test/test_api_dashboard_asw.py b/dashboards/test/test_api_dashboard_asw.py similarity index 89% rename from dashboards_api/test/test_api_dashboard_asw.py rename to dashboards/test/test_api_dashboard_asw.py index 475eb913..a0b54ddd 100644 --- a/dashboards_api/test/test_api_dashboard_asw.py +++ b/dashboards/test/test_api_dashboard_asw.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw +from dashboards.models.api_dashboard_asw import ApiDashboardAsw class TestApiDashboardAsw(unittest.TestCase): """ApiDashboardAsw unit test stubs""" diff --git a/dashboards/test/test_api_dashboard_filter_user_details.py b/dashboards/test/test_api_dashboard_filter_user_details.py new file mode 100644 index 00000000..4d6f269b --- /dev/null +++ b/dashboards/test/test_api_dashboard_filter_user_details.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_dashboard_filter_user_details import ApiDashboardFilterUserDetails + +class TestApiDashboardFilterUserDetails(unittest.TestCase): + """ApiDashboardFilterUserDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiDashboardFilterUserDetails: + """Test ApiDashboardFilterUserDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiDashboardFilterUserDetails` + """ + model = ApiDashboardFilterUserDetails() + if include_optional: + return ApiDashboardFilterUserDetails( + uid = '1', + name = 'Test User' + ) + else: + return ApiDashboardFilterUserDetails( + ) + """ + + def testApiDashboardFilterUserDetails(self): + """Test ApiDashboardFilterUserDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_dashboard_snapshot.py b/dashboards/test/test_api_dashboard_snapshot.py new file mode 100644 index 00000000..64b51a3f --- /dev/null +++ b/dashboards/test/test_api_dashboard_snapshot.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot + +class TestApiDashboardSnapshot(unittest.TestCase): + """ApiDashboardSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiDashboardSnapshot: + """Test ApiDashboardSnapshot + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiDashboardSnapshot` + """ + model = ApiDashboardSnapshot() + if include_optional: + return ApiDashboardSnapshot( + snapshot_id = 'd28bb71f-5a47-4783-8f12-d4b115e61b0c', + account_id = 1234, + created_date = '2023-05-16 10:14:28', + expiration_date = '2023-05-16 10:14:28', + permalink = 'https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c', + api_links = [ + { } + ], + links = dashboards.models.app_and_self_links__links.AppAndSelfLinks__links( + app_link = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + snapshot_name = 'HTTP Server Dashboard Snapshot', + aid = '1234', + is_shared = True, + snapshot_created_date = '2023-05-16T10:14:28Z', + dashboard = None, + widgets = [ + null + ], + is_scheduled = True, + time_span = dashboards.models.api_report_snapshot_time_span.ApiReportSnapshotTimeSpan( + start_date = '2023-05-16 10:14:28', + start = '2023-05-16T10:14:28Z', + duration = 60, ), + snapshot_expiration_date = '2023-05-16T10:14:28Z' + ) + else: + return ApiDashboardSnapshot( + ) + """ + + def testApiDashboardSnapshot(self): + """Test ApiDashboardSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_data_point_group.py b/dashboards/test/test_api_data_point_group.py similarity index 87% rename from dashboards_api/test/test_api_data_point_group.py rename to dashboards/test/test_api_data_point_group.py index 684b03e8..ec360da2 100644 --- a/dashboards_api/test/test_api_data_point_group.py +++ b/dashboards/test/test_api_data_point_group.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_data_point_group import ApiDataPointGroup +from dashboards.models.api_data_point_group import ApiDataPointGroup class TestApiDataPointGroup(unittest.TestCase): """ApiDataPointGroup unit test stubs""" diff --git a/dashboards/test/test_api_data_source_filter.py b/dashboards/test/test_api_data_source_filter.py new file mode 100644 index 00000000..4fc0d44b --- /dev/null +++ b/dashboards/test/test_api_data_source_filter.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_data_source_filter import ApiDataSourceFilter + +class TestApiDataSourceFilter(unittest.TestCase): + """ApiDataSourceFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiDataSourceFilter: + """Test ApiDataSourceFilter + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiDataSourceFilter` + """ + model = ApiDataSourceFilter() + if include_optional: + return ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"] + ) + else: + return ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], + ) + """ + + def testApiDataSourceFilter(self): + """Test ApiDataSourceFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_data_source_filters.py b/dashboards/test/test_api_data_source_filters.py new file mode 100644 index 00000000..ece1da34 --- /dev/null +++ b/dashboards/test/test_api_data_source_filters.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_data_source_filters import ApiDataSourceFilters + +class TestApiDataSourceFilters(unittest.TestCase): + """ApiDataSourceFilters unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiDataSourceFilters: + """Test ApiDataSourceFilters + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiDataSourceFilters` + """ + model = ApiDataSourceFilters() + if include_optional: + return ApiDataSourceFilters( + data_source_id = 'VIRTUAL_AGENT', + filters = [ + dashboards.models.api_data_source_filter.ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], ) + ] + ) + else: + return ApiDataSourceFilters( + data_source_id = 'VIRTUAL_AGENT', + filters = [ + dashboards.models.api_data_source_filter.ApiDataSourceFilter( + filter_id = 'TEST_LABEL', + values = ["45862","59749"], + metric_ids = ["WEB_PAGE_LOAD_COMPLETION_RATE","WEB_TTFB","WEB_AVAILABILITY"], ) + ], + ) + """ + + def testApiDataSourceFilters(self): + """Test ApiDataSourceFilters""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_default_timespan.py b/dashboards/test/test_api_default_timespan.py similarity index 88% rename from dashboards_api/test/test_api_default_timespan.py rename to dashboards/test/test_api_default_timespan.py index b88fdbe7..b367e827 100644 --- a/dashboards_api/test/test_api_default_timespan.py +++ b/dashboards/test/test_api_default_timespan.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_default_timespan import ApiDefaultTimespan +from dashboards.models.api_default_timespan import ApiDefaultTimespan class TestApiDefaultTimespan(unittest.TestCase): """ApiDefaultTimespan unit test stubs""" diff --git a/dashboards_api/test/test_api_duration.py b/dashboards/test/test_api_duration.py similarity index 85% rename from dashboards_api/test/test_api_duration.py rename to dashboards/test/test_api_duration.py index 9082cb9d..fcd24d5e 100644 --- a/dashboards_api/test/test_api_duration.py +++ b/dashboards/test/test_api_duration.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_duration import ApiDuration +from dashboards.models.api_duration import ApiDuration class TestApiDuration(unittest.TestCase): """ApiDuration unit test stubs""" @@ -37,7 +36,7 @@ class TestApiDuration(unittest.TestCase): if include_optional: return ApiDuration( value = 10, - unit = 'hour' + unit = 'Days' ) else: return ApiDuration( diff --git a/dashboards/test/test_api_duration_unit.py b/dashboards/test/test_api_duration_unit.py new file mode 100644 index 00000000..916923c0 --- /dev/null +++ b/dashboards/test/test_api_duration_unit.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_duration_unit import ApiDurationUnit + +class TestApiDurationUnit(unittest.TestCase): + """ApiDurationUnit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiDurationUnit(self): + """Test ApiDurationUnit""" + # inst = ApiDurationUnit() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_geo_map_widget.py b/dashboards/test/test_api_geo_map_widget.py similarity index 80% rename from dashboards_api/test/test_api_geo_map_widget.py rename to dashboards/test/test_api_geo_map_widget.py index 3e2ae4c9..85d6b272 100644 --- a/dashboards_api/test/test_api_geo_map_widget.py +++ b/dashboards/test/test_api_geo_map_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_geo_map_widget import ApiGeoMapWidget +from dashboards.models.api_geo_map_widget import ApiGeoMapWidget class TestApiGeoMapWidget(unittest.TestCase): """ApiGeoMapWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiGeoMapWidget(unittest.TestCase): if include_optional: return ApiGeoMapWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiGeoMapWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -65,6 +63,7 @@ class TestApiGeoMapWidget(unittest.TestCase): min_scale = 1.0, max_scale = 100.0, unit = 'Mbps', + type = 'Map', group_by = 'ALL', is_geo_map_per_test = True, sort_by = 'alphabetical', @@ -73,6 +72,7 @@ class TestApiGeoMapWidget(unittest.TestCase): ) else: return ApiGeoMapWidget( + type = 'Map', ) """ diff --git a/dashboards_api/test/test_api_graphlet_point.py b/dashboards/test/test_api_graphlet_point.py similarity index 87% rename from dashboards_api/test/test_api_graphlet_point.py rename to dashboards/test/test_api_graphlet_point.py index 49162209..24a2e9cd 100644 --- a/dashboards_api/test/test_api_graphlet_point.py +++ b/dashboards/test/test_api_graphlet_point.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_graphlet_point import ApiGraphletPoint +from dashboards.models.api_graphlet_point import ApiGraphletPoint class TestApiGraphletPoint(unittest.TestCase): """ApiGraphletPoint unit test stubs""" diff --git a/dashboards_api/test/test_api_grouped_barchart_widget.py b/dashboards/test/test_api_grouped_barchart_widget.py similarity index 78% rename from dashboards_api/test/test_api_grouped_barchart_widget.py rename to dashboards/test/test_api_grouped_barchart_widget.py index 025218ef..48c6da79 100644 --- a/dashboards_api/test/test_api_grouped_barchart_widget.py +++ b/dashboards/test/test_api_grouped_barchart_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget +from dashboards.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget class TestApiGroupedBarchartWidget(unittest.TestCase): """ApiGroupedBarchartWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiGroupedBarchartWidget(unittest.TestCase): if include_optional: return ApiGroupedBarchartWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiGroupedBarchartWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,6 +60,7 @@ class TestApiGroupedBarchartWidget(unittest.TestCase): profile = '', title = '', hreflang = '', ), ), + type = 'Bar Chart: Grouped', group_by = 'ALL', axis_group_by = 'ALL', sort_by = 'alphabetical', @@ -69,10 +68,11 @@ class TestApiGroupedBarchartWidget(unittest.TestCase): limit = 10, show_labels = True, is_horizontal_bar_chart = True, - data_source = 'ENDPOINT_SCHEDULED_TEST' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiGroupedBarchartWidget( + type = 'Bar Chart: Grouped', ) """ diff --git a/dashboards_api/test/test_api_multi_metric_column.py b/dashboards/test/test_api_multi_metric_column.py similarity index 79% rename from dashboards_api/test/test_api_multi_metric_column.py rename to dashboards/test/test_api_multi_metric_column.py index 8d9cf488..881818a6 100644 --- a/dashboards_api/test/test_api_multi_metric_column.py +++ b/dashboards/test/test_api_multi_metric_column.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_multi_metric_column import ApiMultiMetricColumn +from dashboards.models.api_multi_metric_column import ApiMultiMetricColumn class TestApiMultiMetricColumn(unittest.TestCase): """ApiMultiMetricColumn unit test stubs""" @@ -37,15 +36,11 @@ class TestApiMultiMetricColumn(unittest.TestCase): if include_optional: return ApiMultiMetricColumn( id = '', - data_source = 'ENDPOINT_SCHEDULED_TEST', + data_source = 'ENDPOINT_AGENTS', metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = { - 'key' : [ - None - ] - }, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN ) else: diff --git a/dashboards_api/test/test_api_multi_metric_column_data.py b/dashboards/test/test_api_multi_metric_column_data.py similarity index 83% rename from dashboards_api/test/test_api_multi_metric_column_data.py rename to dashboards/test/test_api_multi_metric_column_data.py index 6380d85a..49023e0e 100644 --- a/dashboards_api/test/test_api_multi_metric_column_data.py +++ b/dashboards/test/test_api_multi_metric_column_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_multi_metric_column_data import ApiMultiMetricColumnData +from dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData class TestApiMultiMetricColumnData(unittest.TestCase): """ApiMultiMetricColumnData unit test stubs""" @@ -39,19 +38,19 @@ class TestApiMultiMetricColumnData(unittest.TestCase): column_id = '938to', bin_size = 3600, points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( + dashboards.models.api_data_point_group.ApiDataPointGroup( group_property = 'COUNTRY', group_value = 'US', ) ], ) ], status = 'No data', alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], diff --git a/dashboards/test/test_api_multi_metric_table_widget.py b/dashboards/test/test_api_multi_metric_table_widget.py new file mode 100644 index 00000000..65ca389b --- /dev/null +++ b/dashboards/test/test_api_multi_metric_table_widget.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget + +class TestApiMultiMetricTableWidget(unittest.TestCase): + """ApiMultiMetricTableWidget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiMultiMetricTableWidget: + """Test ApiMultiMetricTableWidget + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiMultiMetricTableWidget` + """ + model = ApiMultiMetricTableWidget() + if include_optional: + return ApiMultiMetricTableWidget( + id = '1234', + title = 'Widget Title', + visual_mode = 'Full', + embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', + is_embedded = True, + metric_group = 'BGP', + direction = 'FROM_TARGET', + metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, + measure = MEAN, + fixed_timespan = dashboards.models.api_duration.ApiDuration( + value = 10, + unit = 'Days', ), + api_link = '', + should_exclude_alert_suppression_windows = True, + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + type = 'Multi Metric Table', + compare_to_previous_value = True, + row_group_by = 'ALL', + sort_by = 'alphabetical', + sort_direction = 'ascending', + limit = 10, + multi_metric_columns = [ + dashboards.models.api_multi_metric_column.ApiMultiMetricColumn( + id = '', + data_source = 'ENDPOINT_AGENTS', + metric_group = 'BGP', + direction = 'FROM_TARGET', + metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, + measure = MEAN, ) + ], + data_source = 'ENDPOINT_AGENTS' + ) + else: + return ApiMultiMetricTableWidget( + type = 'Multi Metric Table', + ) + """ + + def testApiMultiMetricTableWidget(self): + """Test ApiMultiMetricTableWidget""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_multi_search_filter_api_test_table_filter_key.py b/dashboards/test/test_api_multi_search_filter_api_test_table_filter_key.py similarity index 86% rename from dashboards_api/test/test_api_multi_search_filter_api_test_table_filter_key.py rename to dashboards/test/test_api_multi_search_filter_api_test_table_filter_key.py index 06e88274..082f7187 100644 --- a/dashboards_api/test/test_api_multi_search_filter_api_test_table_filter_key.py +++ b/dashboards/test/test_api_multi_search_filter_api_test_table_filter_key.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey +from dashboards.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey class TestApiMultiSearchFilterApiTestTableFilterKey(unittest.TestCase): """ApiMultiSearchFilterApiTestTableFilterKey unit test stubs""" diff --git a/dashboards_api/test/test_api_numbers_card.py b/dashboards/test/test_api_numbers_card.py similarity index 77% rename from dashboards_api/test/test_api_numbers_card.py rename to dashboards/test/test_api_numbers_card.py index 5f9a99c4..33545f2e 100644 --- a/dashboards_api/test/test_api_numbers_card.py +++ b/dashboards/test/test_api_numbers_card.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_numbers_card import ApiNumbersCard +from dashboards.models.api_numbers_card import ApiNumbersCard class TestApiNumbersCard(unittest.TestCase): """ApiNumbersCard unit test stubs""" @@ -43,17 +42,15 @@ class TestApiNumbersCard(unittest.TestCase): description = 'Widget Title', measure = MEAN, compare_to_previous_value = True, - fixed_timespan = None, + fixed_timespan = dashboards.models.api_duration.ApiDuration( + value = 10, + unit = 'Days', ), should_exclude_alert_suppression_windows = True, - data_source = 'ENDPOINT_BROWSER_SESSION', + data_source = 'ENDPOINT_AGENTS', metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = { - 'key' : [ - None - ] - } + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]} ) else: return ApiNumbersCard( diff --git a/dashboards_api/test/test_api_numbers_card_data.py b/dashboards/test/test_api_numbers_card_data.py similarity index 88% rename from dashboards_api/test/test_api_numbers_card_data.py rename to dashboards/test/test_api_numbers_card_data.py index 279c22d7..872a8d73 100644 --- a/dashboards_api/test/test_api_numbers_card_data.py +++ b/dashboards/test/test_api_numbers_card_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_numbers_card_data import ApiNumbersCardData +from dashboards.models.api_numbers_card_data import ApiNumbersCardData class TestApiNumbersCardData(unittest.TestCase): """ApiNumbersCardData unit test stubs""" @@ -46,7 +45,7 @@ class TestApiNumbersCardData(unittest.TestCase): value = 100.0, status = 'No data', alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], diff --git a/dashboards_api/test/test_api_numbers_card_widget.py b/dashboards/test/test_api_numbers_card_widget.py similarity index 75% rename from dashboards_api/test/test_api_numbers_card_widget.py rename to dashboards/test/test_api_numbers_card_widget.py index 8878915e..a3307e54 100644 --- a/dashboards_api/test/test_api_numbers_card_widget.py +++ b/dashboards/test/test_api_numbers_card_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_numbers_card_widget import ApiNumbersCardWidget +from dashboards.models.api_numbers_card_widget import ApiNumbersCardWidget class TestApiNumbersCardWidget(unittest.TestCase): """ApiNumbersCardWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiNumbersCardWidget(unittest.TestCase): if include_optional: return ApiNumbersCardWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiNumbersCardWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,13 +60,15 @@ class TestApiNumbersCardWidget(unittest.TestCase): profile = '', title = '', hreflang = '', ), ), + type = 'Number', number_cards = [ - dashboards_api.models.api_numbers_card.ApiNumbersCard() + dashboards.models.api_numbers_card.ApiNumbersCard() ], - data_source = 'ENDPOINT_BROWSER_SESSION' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiNumbersCardWidget( + type = 'Number', ) """ diff --git a/dashboards_api/test/test_api_pie_chart_widget.py b/dashboards/test/test_api_pie_chart_widget.py similarity index 78% rename from dashboards_api/test/test_api_pie_chart_widget.py rename to dashboards/test/test_api_pie_chart_widget.py index df1c80a7..1be2c690 100644 --- a/dashboards_api/test/test_api_pie_chart_widget.py +++ b/dashboards/test/test_api_pie_chart_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_pie_chart_widget import ApiPieChartWidget +from dashboards.models.api_pie_chart_widget import ApiPieChartWidget class TestApiPieChartWidget(unittest.TestCase): """ApiPieChartWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiPieChartWidget(unittest.TestCase): if include_optional: return ApiPieChartWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiPieChartWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,11 +60,13 @@ class TestApiPieChartWidget(unittest.TestCase): profile = '', title = '', hreflang = '', ), ), + type = 'Pie Chart', group_by = 'ALL', - data_source = 'ENDPOINT_BROWSER_SESSION' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiPieChartWidget( + type = 'Pie Chart', ) """ diff --git a/dashboards_api/test/test_api_report_data_component_label_map.py b/dashboards/test/test_api_report_data_component_label_map.py similarity index 82% rename from dashboards_api/test/test_api_report_data_component_label_map.py rename to dashboards/test/test_api_report_data_component_label_map.py index 9df101a2..b335cec1 100644 --- a/dashboards_api/test/test_api_report_data_component_label_map.py +++ b/dashboards/test/test_api_report_data_component_label_map.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap +from dashboards.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap class TestApiReportDataComponentLabelMap(unittest.TestCase): """ApiReportDataComponentLabelMap unit test stubs""" @@ -38,7 +37,7 @@ class TestApiReportDataComponentLabelMap(unittest.TestCase): return ApiReportDataComponentLabelMap( group_property = 'AGENT', group_labels = [ - dashboards_api.models.api_report_data_component_label_map_entry.ApiReportDataComponentLabelMapEntry( + dashboards.models.api_report_data_component_label_map_entry.ApiReportDataComponentLabelMapEntry( group_id = '2565', group_label = 'San Francisco, CA', ) ] diff --git a/dashboards_api/test/test_api_report_data_component_label_map_entry.py b/dashboards/test/test_api_report_data_component_label_map_entry.py similarity index 87% rename from dashboards_api/test/test_api_report_data_component_label_map_entry.py rename to dashboards/test/test_api_report_data_component_label_map_entry.py index e62d673c..957e8744 100644 --- a/dashboards_api/test/test_api_report_data_component_label_map_entry.py +++ b/dashboards/test/test_api_report_data_component_label_map_entry.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry +from dashboards.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry class TestApiReportDataComponentLabelMapEntry(unittest.TestCase): """ApiReportDataComponentLabelMapEntry unit test stubs""" diff --git a/dashboards_api/test/test_api_report_snapshot_time_span.py b/dashboards/test/test_api_report_snapshot_time_span.py similarity index 85% rename from dashboards_api/test/test_api_report_snapshot_time_span.py rename to dashboards/test/test_api_report_snapshot_time_span.py index 8a8fc6ff..8b02bd30 100644 --- a/dashboards_api/test/test_api_report_snapshot_time_span.py +++ b/dashboards/test/test_api_report_snapshot_time_span.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan +from dashboards.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan class TestApiReportSnapshotTimeSpan(unittest.TestCase): """ApiReportSnapshotTimeSpan unit test stubs""" @@ -36,6 +35,7 @@ class TestApiReportSnapshotTimeSpan(unittest.TestCase): model = ApiReportSnapshotTimeSpan() if include_optional: return ApiReportSnapshotTimeSpan( + start_date = '2023-05-16 10:14:28', start = '2023-05-16T10:14:28Z', duration = 60 ) diff --git a/dashboards_api/test/test_api_stacked_area_chart_widget.py b/dashboards/test/test_api_stacked_area_chart_widget.py similarity index 77% rename from dashboards_api/test/test_api_stacked_area_chart_widget.py rename to dashboards/test/test_api_stacked_area_chart_widget.py index dc67b7e1..d2456741 100644 --- a/dashboards_api/test/test_api_stacked_area_chart_widget.py +++ b/dashboards/test/test_api_stacked_area_chart_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget +from dashboards.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget class TestApiStackedAreaChartWidget(unittest.TestCase): """ApiStackedAreaChartWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiStackedAreaChartWidget(unittest.TestCase): if include_optional: return ApiStackedAreaChartWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiStackedAreaChartWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -65,11 +63,13 @@ class TestApiStackedAreaChartWidget(unittest.TestCase): min_scale = 1.0, max_scale = 100.0, unit = 'Mbps', + type = 'Time Series: Stacked Area', group_by = 'ALL', - data_source = 'ENDPOINT_BROWSER_SESSION' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiStackedAreaChartWidget( + type = 'Time Series: Stacked Area', ) """ diff --git a/dashboards_api/test/test_api_stacked_barchart_widget.py b/dashboards/test/test_api_stacked_barchart_widget.py similarity index 78% rename from dashboards_api/test/test_api_stacked_barchart_widget.py rename to dashboards/test/test_api_stacked_barchart_widget.py index 55e414d7..8f578fc1 100644 --- a/dashboards_api/test/test_api_stacked_barchart_widget.py +++ b/dashboards/test/test_api_stacked_barchart_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_stacked_barchart_widget import ApiStackedBarchartWidget +from dashboards.models.api_stacked_barchart_widget import ApiStackedBarchartWidget class TestApiStackedBarchartWidget(unittest.TestCase): """ApiStackedBarchartWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiStackedBarchartWidget(unittest.TestCase): if include_optional: return ApiStackedBarchartWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiStackedBarchartWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,16 +60,18 @@ class TestApiStackedBarchartWidget(unittest.TestCase): profile = '', title = '', hreflang = '', ), ), + type = 'Bar Chart: Stacked', axis_group_by = 'ALL', sort_by = 'alphabetical', sort_direction = 'ascending', limit = 10, show_labels = True, is_horizontal_bar_chart = True, - data_source = 'ENDPOINT_BROWSER_SESSION' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiStackedBarchartWidget( + type = 'Bar Chart: Stacked', ) """ diff --git a/dashboards_api/test/test_api_table_widget.py b/dashboards/test/test_api_table_widget.py similarity index 78% rename from dashboards_api/test/test_api_table_widget.py rename to dashboards/test/test_api_table_widget.py index 8b2791dc..d6de31fb 100644 --- a/dashboards_api/test/test_api_table_widget.py +++ b/dashboards/test/test_api_table_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_table_widget import ApiTableWidget +from dashboards.models.api_table_widget import ApiTableWidget class TestApiTableWidget(unittest.TestCase): """ApiTableWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiTableWidget(unittest.TestCase): if include_optional: return ApiTableWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiTableWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,16 +60,18 @@ class TestApiTableWidget(unittest.TestCase): profile = '', title = '', hreflang = '', ), ), + type = 'Table', compare_to_previous_value = True, row_group_by = 'ALL', column_group_by = 'ALL', sort_by = 'alphabetical', sort_direction = 'ascending', limit = 10, - data_source = 'ENDPOINT_LOCAL_NETWORK' + data_source = 'ENDPOINT_AGENTS' ) else: return ApiTableWidget( + type = 'Table', ) """ diff --git a/dashboards_api/test/test_api_test_table_data.py b/dashboards/test/test_api_test_table_data.py similarity index 82% rename from dashboards_api/test/test_api_test_table_data.py rename to dashboards/test/test_api_test_table_data.py index a2cb7c2b..f40bceb3 100644 --- a/dashboards_api/test/test_api_test_table_data.py +++ b/dashboards/test/test_api_test_table_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_test_table_data import ApiTestTableData +from dashboards.models.api_test_table_data import ApiTestTableData class TestApiTestTableData(unittest.TestCase): """ApiTestTableData unit test stubs""" @@ -43,11 +42,11 @@ class TestApiTestTableData(unittest.TestCase): alert_count = 398, is_shared = True, graphlets = [ - dashboards_api.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( + dashboards.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( metric = 'Availability', test_id = '68257', points = [ - dashboards_api.models.api_graphlet_point.ApiGraphletPoint( + dashboards.models.api_graphlet_point.ApiGraphletPoint( x = 1580403900, y = 128.249, ) ], ) diff --git a/dashboards_api/test/test_api_test_table_graphlets_data.py b/dashboards/test/test_api_test_table_graphlets_data.py similarity index 84% rename from dashboards_api/test/test_api_test_table_graphlets_data.py rename to dashboards/test/test_api_test_table_graphlets_data.py index 0791d951..e0543acf 100644 --- a/dashboards_api/test/test_api_test_table_graphlets_data.py +++ b/dashboards/test/test_api_test_table_graphlets_data.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_test_table_graphlets_data import ApiTestTableGraphletsData +from dashboards.models.api_test_table_graphlets_data import ApiTestTableGraphletsData class TestApiTestTableGraphletsData(unittest.TestCase): """ApiTestTableGraphletsData unit test stubs""" @@ -39,7 +38,7 @@ class TestApiTestTableGraphletsData(unittest.TestCase): metric = 'Availability', test_id = '68257', points = [ - dashboards_api.models.api_graphlet_point.ApiGraphletPoint( + dashboards.models.api_graphlet_point.ApiGraphletPoint( x = 1580403900, y = 128.249, ) ] diff --git a/dashboards/test/test_api_test_table_widget.py b/dashboards/test/test_api_test_table_widget.py new file mode 100644 index 00000000..30509c8f --- /dev/null +++ b/dashboards/test/test_api_test_table_widget.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_test_table_widget import ApiTestTableWidget + +class TestApiTestTableWidget(unittest.TestCase): + """ApiTestTableWidget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiTestTableWidget: + """Test ApiTestTableWidget + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiTestTableWidget` + """ + model = ApiTestTableWidget() + if include_optional: + return ApiTestTableWidget( + id = '1234', + title = 'Widget Title', + visual_mode = 'Full', + embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', + is_embedded = True, + metric_group = 'BGP', + direction = 'FROM_TARGET', + metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, + measure = MEAN, + fixed_timespan = dashboards.models.api_duration.ApiDuration( + value = 10, + unit = 'Days', ), + api_link = '', + should_exclude_alert_suppression_windows = True, + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + type = 'Test Table', + filter = dashboards.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( + filters = [ + dashboards.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( + key = 'Target', + value = '', ) + ], + type = 'all', ), + exclude = dashboards.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( + filters = [ + dashboards.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( + key = 'Target', + value = '', ) + ], + type = 'all', ), + data_source = 'CLOUD_AND_ENTERPRISE_AGENTS' + ) + else: + return ApiTestTableWidget( + type = 'Test Table', + ) + """ + + def testApiTestTableWidget(self): + """Test ApiTestTableWidget""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_timeseries_widget.py b/dashboards/test/test_api_timeseries_widget.py similarity index 80% rename from dashboards_api/test/test_api_timeseries_widget.py rename to dashboards/test/test_api_timeseries_widget.py index e43284ab..ddea4af9 100644 --- a/dashboards_api/test/test_api_timeseries_widget.py +++ b/dashboards/test/test_api_timeseries_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_timeseries_widget import ApiTimeseriesWidget +from dashboards.models.api_timeseries_widget import ApiTimeseriesWidget class TestApiTimeseriesWidget(unittest.TestCase): """ApiTimeseriesWidget unit test stubs""" @@ -37,7 +36,6 @@ class TestApiTimeseriesWidget(unittest.TestCase): if include_optional: return ApiTimeseriesWidget( id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -45,15 +43,15 @@ class TestApiTimeseriesWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -65,6 +63,7 @@ class TestApiTimeseriesWidget(unittest.TestCase): min_scale = 1.0, max_scale = 100.0, unit = 'Mbps', + type = 'Time Series: Line', show_timeseries_overall_baseline = True, group_by = 'ALL', is_timeseries_one_chart_per_line = True, @@ -72,6 +71,7 @@ class TestApiTimeseriesWidget(unittest.TestCase): ) else: return ApiTimeseriesWidget( + type = 'Time Series: Line', ) """ diff --git a/dashboards/test/test_api_widget.py b/dashboards/test/test_api_widget.py new file mode 100644 index 00000000..9bd98fa1 --- /dev/null +++ b/dashboards/test/test_api_widget.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_widget import ApiWidget + +class TestApiWidget(unittest.TestCase): + """ApiWidget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiWidget: + """Test ApiWidget + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiWidget` + """ + model = ApiWidget() + if include_optional: + return ApiWidget( + id = '1234', + title = 'Widget Title', + visual_mode = 'Full', + embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', + is_embedded = True, + metric_group = 'BGP', + direction = 'FROM_TARGET', + metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, + measure = MEAN, + fixed_timespan = dashboards.models.api_duration.ApiDuration( + value = 10, + unit = 'Days', ), + api_link = '', + should_exclude_alert_suppression_windows = True, + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + type = 'Time Series: Line', + agents = 'Enterprise Agents', + show = 'Owned Agents', + data_source = 'CLOUD_AND_ENTERPRISE_AGENTS', + alert_types = [ + 'Network - End-to-End (Server)' + ], + limit_to = 15, + active_within = None, + min_scale = 1.0, + max_scale = 100.0, + unit = 'Mbps', + group_by = 'ALL', + cards = 'ALL', + group_cards_by = 'ALL', + columns = 1, + limit = 10, + sort_by = 'alphabetical', + sort_direction = 'ascending', + is_geo_map_per_test = True, + axis_group_by = 'ALL', + show_labels = True, + is_horizontal_bar_chart = True, + compare_to_previous_value = True, + row_group_by = 'ALL', + multi_metric_columns = [ + dashboards.models.api_multi_metric_column.ApiMultiMetricColumn( + id = '', + data_source = 'ENDPOINT_AGENTS', + metric_group = 'BGP', + direction = 'FROM_TARGET', + metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, + measure = MEAN, ) + ], + number_cards = [ + dashboards.models.api_numbers_card.ApiNumbersCard() + ], + column_group_by = 'ALL', + filter = dashboards.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( + filters = [ + dashboards.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( + key = 'Target', + value = '', ) + ], + type = 'all', ), + exclude = dashboards.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( + filters = [ + dashboards.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( + key = 'Target', + value = '', ) + ], + type = 'all', ), + show_timeseries_overall_baseline = True, + is_timeseries_one_chart_per_line = True + ) + else: + return ApiWidget( + type = 'Time Series: Line', + ) + """ + + def testApiWidget(self): + """Test ApiWidget""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_widget_data_point.py b/dashboards/test/test_api_widget_data_point.py similarity index 84% rename from dashboards_api/test/test_api_widget_data_point.py rename to dashboards/test/test_api_widget_data_point.py index 93939a17..28a2ef41 100644 --- a/dashboards_api/test/test_api_widget_data_point.py +++ b/dashboards/test/test_api_widget_data_point.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_widget_data_point import ApiWidgetDataPoint +from dashboards.models.api_widget_data_point import ApiWidgetDataPoint class TestApiWidgetDataPoint(unittest.TestCase): """ApiWidgetDataPoint unit test stubs""" @@ -40,7 +39,7 @@ class TestApiWidgetDataPoint(unittest.TestCase): number_of_data_points = 23304, value = 100.0, groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( + dashboards.models.api_data_point_group.ApiDataPointGroup( group_property = 'COUNTRY', group_value = 'US', ) ] diff --git a/dashboards_api/test/test_api_widget_data_response.py b/dashboards/test/test_api_widget_data_response.py similarity index 76% rename from dashboards_api/test/test_api_widget_data_response.py rename to dashboards/test/test_api_widget_data_response.py index d307df93..3aa758b0 100644 --- a/dashboards_api/test/test_api_widget_data_response.py +++ b/dashboards/test/test_api_widget_data_response.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_widget_data_response import ApiWidgetDataResponse +from dashboards.models.api_widget_data_response import ApiWidgetDataResponse class TestApiWidgetDataResponse(unittest.TestCase): """ApiWidgetDataResponse unit test stubs""" @@ -37,18 +36,18 @@ class TestApiWidgetDataResponse(unittest.TestCase): if include_optional: return ApiWidgetDataResponse( group_labels = [ - dashboards_api.models.api_report_data_component_label_map.ApiReportDataComponentLabelMap( + dashboards.models.api_report_data_component_label_map.ApiReportDataComponentLabelMap( group_property = 'AGENT', group_labels = [ - dashboards_api.models.api_report_data_component_label_map_entry.ApiReportDataComponentLabelMapEntry( + dashboards.models.api_report_data_component_label_map_entry.ApiReportDataComponentLabelMapEntry( group_id = '2565', group_label = 'San Francisco, CA', ) ], ) ], bin_size = 3600, - data = dashboards_api.models.api_widgets_data_v2.ApiWidgetsDataV2( + data = dashboards.models.api_widgets_data_v2.ApiWidgetsDataV2( cards = [ - dashboards_api.models.api_numbers_card_data.ApiNumbersCardData( + dashboards.models.api_numbers_card_data.ApiNumbersCardData( card_id = 'lrxxr', start_date = '2023-05-16T10:14:28Z', end_date = '2023-05-16T10:14:28Z', @@ -59,7 +58,7 @@ class TestApiWidgetDataResponse(unittest.TestCase): value = 100.0, status = 'No data', alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -71,16 +70,16 @@ class TestApiWidgetDataResponse(unittest.TestCase): ], ) ], columns = [ - dashboards_api.models.api_multi_metric_column_data.ApiMultiMetricColumnData( + dashboards.models.api_multi_metric_column_data.ApiMultiMetricColumnData( column_id = '938to', bin_size = 3600, points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( + dashboards.models.api_data_point_group.ApiDataPointGroup( group_property = 'COUNTRY', group_value = 'US', ) ], ) @@ -88,13 +87,13 @@ class TestApiWidgetDataResponse(unittest.TestCase): status = 'No data', ) ], points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, ) ], tests = [ - dashboards_api.models.api_test_table_data.ApiTestTableData( + dashboards.models.api_test_table_data.ApiTestTableData( test_id = '68256', test_name = 'Http Test Name', target = 'www.google.com', @@ -102,14 +101,14 @@ class TestApiWidgetDataResponse(unittest.TestCase): alert_count = 398, is_shared = True, graphlets = [ - dashboards_api.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( + dashboards.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( metric = 'Availability', test_id = '68257', ) ], ) ], start_round = 1384309800, alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -120,32 +119,32 @@ class TestApiWidgetDataResponse(unittest.TestCase): total_alerts = 500, active_alerts = 483, alerts = [ - dashboards_api.models.api_alert_list_alert.ApiAlertListAlert( + dashboards.models.api_alert_list_alert.ApiAlertListAlert( alert_id = '2004945', test_id = '56512', rule_id = '281724', alert_source = 'Http Test', alert_rule = 'Http Test Rule', - alert_type = 'Network - End-to-End (Server)', + alert_type = 'network-end-to-end-server', start_time = '2023-06-02T08:54Z', duration_in_seconds = 25, active = True, ) ], - summary = dashboards_api.models.api_agent_status_summary.ApiAgentStatusSummary( + summary = dashboards.models.api_agent_status_summary.ApiAgentStatusSummary( online = 10, offline = 2, disabled = 3, ), agents = [ - dashboards_api.models.api_agent_status_agent.ApiAgentStatusAgent( + dashboards.models.api_agent_status_agent.ApiAgentStatusAgent( agent_id = '6522', status = 'online', - ip_info = dashboards_api.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( + ip_info = dashboards.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( public_ip = '172.58.92.31', private_ip = '172.58.92.31', ipv6 = '', operative_system_version = '', ), agent_name = '0c3898000117', - location = dashboards_api.models.api_agent_location.ApiAgentLocation( + location = dashboards.models.api_agent_location.ApiAgentLocation( latitude = 37.77493, longitude = -122.41942, location_name = 'San Francisco, California, US', ), ) diff --git a/dashboards_api/test/test_api_widget_filter_api_test_table_filter_key.py b/dashboards/test/test_api_widget_filter_api_test_table_filter_key.py similarity index 81% rename from dashboards_api/test/test_api_widget_filter_api_test_table_filter_key.py rename to dashboards/test/test_api_widget_filter_api_test_table_filter_key.py index 543452fb..078f0739 100644 --- a/dashboards_api/test/test_api_widget_filter_api_test_table_filter_key.py +++ b/dashboards/test/test_api_widget_filter_api_test_table_filter_key.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey +from dashboards.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey class TestApiWidgetFilterApiTestTableFilterKey(unittest.TestCase): """ApiWidgetFilterApiTestTableFilterKey unit test stubs""" @@ -37,7 +36,7 @@ class TestApiWidgetFilterApiTestTableFilterKey(unittest.TestCase): if include_optional: return ApiWidgetFilterApiTestTableFilterKey( filters = [ - dashboards_api.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( + dashboards.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( key = 'Target', value = '', ) ], diff --git a/dashboards/test/test_api_widget_fixed_y_scale_prefix.py b/dashboards/test/test_api_widget_fixed_y_scale_prefix.py new file mode 100644 index 00000000..098535bc --- /dev/null +++ b/dashboards/test/test_api_widget_fixed_y_scale_prefix.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix + +class TestApiWidgetFixedYScalePrefix(unittest.TestCase): + """ApiWidgetFixedYScalePrefix unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiWidgetFixedYScalePrefix(self): + """Test ApiWidgetFixedYScalePrefix""" + # inst = ApiWidgetFixedYScalePrefix() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_widget_measure.py b/dashboards/test/test_api_widget_measure.py similarity index 87% rename from dashboards_api/test/test_api_widget_measure.py rename to dashboards/test/test_api_widget_measure.py index 0063fe4a..03c0fe60 100644 --- a/dashboards_api/test/test_api_widget_measure.py +++ b/dashboards/test/test_api_widget_measure.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure +from dashboards.models.api_widget_measure import ApiWidgetMeasure class TestApiWidgetMeasure(unittest.TestCase): """ApiWidgetMeasure unit test stubs""" diff --git a/dashboards/test/test_api_widget_sort_direction.py b/dashboards/test/test_api_widget_sort_direction.py new file mode 100644 index 00000000..c2c768e3 --- /dev/null +++ b/dashboards/test/test_api_widget_sort_direction.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_widget_sort_direction import ApiWidgetSortDirection + +class TestApiWidgetSortDirection(unittest.TestCase): + """ApiWidgetSortDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiWidgetSortDirection(self): + """Test ApiWidgetSortDirection""" + # inst = ApiWidgetSortDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_api_widget_sort_property.py b/dashboards/test/test_api_widget_sort_property.py new file mode 100644 index 00000000..6570f827 --- /dev/null +++ b/dashboards/test/test_api_widget_sort_property.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.api_widget_sort_property import ApiWidgetSortProperty + +class TestApiWidgetSortProperty(unittest.TestCase): + """ApiWidgetSortProperty unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiWidgetSortProperty(self): + """Test ApiWidgetSortProperty""" + # inst = ApiWidgetSortProperty() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_api_widgets_data_v2.py b/dashboards/test/test_api_widgets_data_v2.py similarity index 77% rename from dashboards_api/test/test_api_widgets_data_v2.py rename to dashboards/test/test_api_widgets_data_v2.py index 80f20a06..9030ec06 100644 --- a/dashboards_api/test/test_api_widgets_data_v2.py +++ b/dashboards/test/test_api_widgets_data_v2.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 +from dashboards.models.api_widgets_data_v2 import ApiWidgetsDataV2 class TestApiWidgetsDataV2(unittest.TestCase): """ApiWidgetsDataV2 unit test stubs""" @@ -37,7 +36,7 @@ class TestApiWidgetsDataV2(unittest.TestCase): if include_optional: return ApiWidgetsDataV2( cards = [ - dashboards_api.models.api_numbers_card_data.ApiNumbersCardData( + dashboards.models.api_numbers_card_data.ApiNumbersCardData( card_id = 'lrxxr', start_date = '2023-05-16T10:14:28Z', end_date = '2023-05-16T10:14:28Z', @@ -48,7 +47,7 @@ class TestApiWidgetsDataV2(unittest.TestCase): value = 100.0, status = 'No data', alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -60,23 +59,23 @@ class TestApiWidgetsDataV2(unittest.TestCase): ], ) ], columns = [ - dashboards_api.models.api_multi_metric_column_data.ApiMultiMetricColumnData( + dashboards.models.api_multi_metric_column_data.ApiMultiMetricColumnData( column_id = '938to', bin_size = 3600, points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( + dashboards.models.api_data_point_group.ApiDataPointGroup( group_property = 'COUNTRY', group_value = 'US', ) ], ) ], status = 'No data', alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -88,18 +87,18 @@ class TestApiWidgetsDataV2(unittest.TestCase): ], ) ], points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( + dashboards.models.api_data_point_group.ApiDataPointGroup( group_property = 'COUNTRY', group_value = 'US', ) ], ) ], tests = [ - dashboards_api.models.api_test_table_data.ApiTestTableData( + dashboards.models.api_test_table_data.ApiTestTableData( test_id = '68256', test_name = 'Http Test Name', target = 'www.google.com', @@ -107,11 +106,11 @@ class TestApiWidgetsDataV2(unittest.TestCase): alert_count = 398, is_shared = True, graphlets = [ - dashboards_api.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( + dashboards.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( metric = 'Availability', test_id = '68257', points = [ - dashboards_api.models.api_graphlet_point.ApiGraphletPoint( + dashboards.models.api_graphlet_point.ApiGraphletPoint( x = 1580403900, y = 128.249, ) ], ) @@ -119,7 +118,7 @@ class TestApiWidgetsDataV2(unittest.TestCase): ], start_round = 1384309800, alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -132,32 +131,32 @@ class TestApiWidgetsDataV2(unittest.TestCase): total_alerts = 500, active_alerts = 483, alerts = [ - dashboards_api.models.api_alert_list_alert.ApiAlertListAlert( + dashboards.models.api_alert_list_alert.ApiAlertListAlert( alert_id = '2004945', test_id = '56512', rule_id = '281724', alert_source = 'Http Test', alert_rule = 'Http Test Rule', - alert_type = 'Network - End-to-End (Server)', + alert_type = 'network-end-to-end-server', start_time = '2023-06-02T08:54Z', duration_in_seconds = 25, active = True, ) ], - summary = dashboards_api.models.api_agent_status_summary.ApiAgentStatusSummary( + summary = dashboards.models.api_agent_status_summary.ApiAgentStatusSummary( online = 10, offline = 2, disabled = 3, ), agents = [ - dashboards_api.models.api_agent_status_agent.ApiAgentStatusAgent( + dashboards.models.api_agent_status_agent.ApiAgentStatusAgent( agent_id = '6522', status = 'online', - ip_info = dashboards_api.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( + ip_info = dashboards.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( public_ip = '172.58.92.31', private_ip = '172.58.92.31', ipv6 = '', operative_system_version = '', ), agent_name = '0c3898000117', - location = dashboards_api.models.api_agent_location.ApiAgentLocation( + location = dashboards.models.api_agent_location.ApiAgentLocation( latitude = 37.77493, longitude = -122.41942, location_name = 'San Francisco, California, US', ), ) diff --git a/dashboards/test/test_app_and_self_links.py b/dashboards/test/test_app_and_self_links.py new file mode 100644 index 00000000..0b2eb11f --- /dev/null +++ b/dashboards/test/test_app_and_self_links.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.app_and_self_links import AppAndSelfLinks + +class TestAppAndSelfLinks(unittest.TestCase): + """AppAndSelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppAndSelfLinks: + """Test AppAndSelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppAndSelfLinks` + """ + model = AppAndSelfLinks() + if include_optional: + return AppAndSelfLinks( + links = dashboards.models.app_and_self_links__links.AppAndSelfLinks__links( + app_link = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return AppAndSelfLinks( + ) + """ + + def testAppAndSelfLinks(self): + """Test AppAndSelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_app_and_self_links_links.py b/dashboards/test/test_app_and_self_links_links.py new file mode 100644 index 00000000..a17d0615 --- /dev/null +++ b/dashboards/test/test_app_and_self_links_links.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.app_and_self_links_links import AppAndSelfLinksLinks + +class TestAppAndSelfLinksLinks(unittest.TestCase): + """AppAndSelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppAndSelfLinksLinks: + """Test AppAndSelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppAndSelfLinksLinks` + """ + model = AppAndSelfLinksLinks() + if include_optional: + return AppAndSelfLinksLinks( + app_link = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return AppAndSelfLinksLinks( + ) + """ + + def testAppAndSelfLinksLinks(self): + """Test AppAndSelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_asw_repeat.py b/dashboards/test/test_asw_repeat.py similarity index 75% rename from dashboards_api/test/test_asw_repeat.py rename to dashboards/test/test_asw_repeat.py index 6d1deaf9..4a72b5cc 100644 --- a/dashboards_api/test/test_asw_repeat.py +++ b/dashboards/test/test_asw_repeat.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.asw_repeat import AswRepeat +from dashboards.models.asw_repeat import AswRepeat class TestAswRepeat(unittest.TestCase): """AswRepeat unit test stubs""" diff --git a/dashboards_api/test/test_asw_repeat_unit.py b/dashboards/test/test_asw_repeat_unit.py similarity index 75% rename from dashboards_api/test/test_asw_repeat_unit.py rename to dashboards/test/test_asw_repeat_unit.py index 53fb0c74..41263ecb 100644 --- a/dashboards_api/test/test_asw_repeat_unit.py +++ b/dashboards/test/test_asw_repeat_unit.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.asw_repeat_unit import AswRepeatUnit +from dashboards.models.asw_repeat_unit import AswRepeatUnit class TestAswRepeatUnit(unittest.TestCase): """AswRepeatUnit unit test stubs""" diff --git a/dashboards/test/test_box_and_whiskers_datasource.py b/dashboards/test/test_box_and_whiskers_datasource.py new file mode 100644 index 00000000..ef4a4f75 --- /dev/null +++ b/dashboards/test/test_box_and_whiskers_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource + +class TestBoxAndWhiskersDatasource(unittest.TestCase): + """BoxAndWhiskersDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBoxAndWhiskersDatasource(self): + """Test BoxAndWhiskersDatasource""" + # inst = BoxAndWhiskersDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_color_grid_datasource.py b/dashboards/test/test_color_grid_datasource.py new file mode 100644 index 00000000..0d1282dd --- /dev/null +++ b/dashboards/test/test_color_grid_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.color_grid_datasource import ColorGridDatasource + +class TestColorGridDatasource(unittest.TestCase): + """ColorGridDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testColorGridDatasource(self): + """Test ColorGridDatasource""" + # inst = ColorGridDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_create_dashboard_snapshot201_response.py b/dashboards/test/test_create_dashboard_snapshot201_response.py new file mode 100644 index 00000000..73fdc835 --- /dev/null +++ b/dashboards/test/test_create_dashboard_snapshot201_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.create_dashboard_snapshot201_response import CreateDashboardSnapshot201Response + +class TestCreateDashboardSnapshot201Response(unittest.TestCase): + """CreateDashboardSnapshot201Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateDashboardSnapshot201Response: + """Test CreateDashboardSnapshot201Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateDashboardSnapshot201Response` + """ + model = CreateDashboardSnapshot201Response() + if include_optional: + return CreateDashboardSnapshot201Response( + snapshot_id = 'd28bb71f-5a47-4783-8f12-d4b115e61b0c', + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return CreateDashboardSnapshot201Response( + ) + """ + + def testCreateDashboardSnapshot201Response(self): + """Test CreateDashboardSnapshot201Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_dashboard.py b/dashboards/test/test_dashboard.py new file mode 100644 index 00000000..c2735c23 --- /dev/null +++ b/dashboards/test/test_dashboard.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.dashboard import Dashboard + +class TestDashboard(unittest.TestCase): + """Dashboard unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Dashboard: + """Test Dashboard + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Dashboard` + """ + model = Dashboard() + if include_optional: + return Dashboard( + global_filter_id = '65babd9bb90bf55b17c96c8d', + links = dashboards.models.dashboard_links__links.DashboardLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + snapshots = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + dashboard_id = '5e1f7a99143ae6004fdc3bb4', + title = 'HTTP Server Widgets', + is_built_in = True, + aid = '1234', + created_by = '1', + modified_by = '1', + modified_date = '2023-05-16T10:14:28Z', + is_private = True, + is_default_for_user = True, + is_default_for_account = False, + widgets = [ + null + ], + description = 'HTTP Server Widgets', + default_timespan = None, + is_global_override = True, + is_migrated_report = False + ) + else: + return Dashboard( + ) + """ + + def testDashboard(self): + """Test Dashboard""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_dashboard_global_filter_id.py b/dashboards/test/test_dashboard_global_filter_id.py new file mode 100644 index 00000000..98c69aa1 --- /dev/null +++ b/dashboards/test/test_dashboard_global_filter_id.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId + +class TestDashboardGlobalFilterId(unittest.TestCase): + """DashboardGlobalFilterId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DashboardGlobalFilterId: + """Test DashboardGlobalFilterId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DashboardGlobalFilterId` + """ + model = DashboardGlobalFilterId() + if include_optional: + return DashboardGlobalFilterId( + global_filter_id = '65babd9bb90bf55b17c96c8d' + ) + else: + return DashboardGlobalFilterId( + ) + """ + + def testDashboardGlobalFilterId(self): + """Test DashboardGlobalFilterId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_dashboard_links.py b/dashboards/test/test_dashboard_links.py similarity index 83% rename from dashboards_api/test/test_dashboard_links.py rename to dashboards/test/test_dashboard_links.py index ef71ac6b..4d0a93b5 100644 --- a/dashboards_api/test/test_dashboard_links.py +++ b/dashboards/test/test_dashboard_links.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.dashboard_links import DashboardLinks +from dashboards.models.dashboard_links import DashboardLinks class TestDashboardLinks(unittest.TestCase): """DashboardLinks unit test stubs""" @@ -36,8 +35,8 @@ class TestDashboardLinks(unittest.TestCase): model = DashboardLinks() if include_optional: return DashboardLinks( - links = dashboards_api.models.dashboard_links__links.DashboardLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.dashboard_links__links.DashboardLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -46,7 +45,7 @@ class TestDashboardLinks(unittest.TestCase): profile = '', title = '', hreflang = '', ), - snapshots = dashboards_api.models.link.Link( + snapshots = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/dashboards_api/test/test_dashboard_links_links.py b/dashboards/test/test_dashboard_links_links.py similarity index 86% rename from dashboards_api/test/test_dashboard_links_links.py rename to dashboards/test/test_dashboard_links_links.py index 17bee187..e1833f96 100644 --- a/dashboards_api/test/test_dashboard_links_links.py +++ b/dashboards/test/test_dashboard_links_links.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks +from dashboards.models.dashboard_links_links import DashboardLinksLinks class TestDashboardLinksLinks(unittest.TestCase): """DashboardLinksLinks unit test stubs""" @@ -36,7 +35,7 @@ class TestDashboardLinksLinks(unittest.TestCase): model = DashboardLinksLinks() if include_optional: return DashboardLinksLinks( - var_self = dashboards_api.models.link.Link( + var_self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -45,7 +44,7 @@ class TestDashboardLinksLinks(unittest.TestCase): profile = '', title = '', hreflang = '', ), - snapshots = dashboards_api.models.link.Link( + snapshots = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/dashboards_api/test/test_dashboard_metric.py b/dashboards/test/test_dashboard_metric.py similarity index 75% rename from dashboards_api/test/test_dashboard_metric.py rename to dashboards/test/test_dashboard_metric.py index 72d1ad2e..5376472d 100644 --- a/dashboards_api/test/test_dashboard_metric.py +++ b/dashboards/test/test_dashboard_metric.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.dashboard_metric import DashboardMetric +from dashboards.models.dashboard_metric import DashboardMetric class TestDashboardMetric(unittest.TestCase): """DashboardMetric unit test stubs""" diff --git a/dashboards/test/test_dashboard_metric_direction.py b/dashboards/test/test_dashboard_metric_direction.py new file mode 100644 index 00000000..b6f9f267 --- /dev/null +++ b/dashboards/test/test_dashboard_metric_direction.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.dashboard_metric_direction import DashboardMetricDirection + +class TestDashboardMetricDirection(unittest.TestCase): + """DashboardMetricDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDashboardMetricDirection(self): + """Test DashboardMetricDirection""" + # inst = DashboardMetricDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_dashboard_order.py b/dashboards/test/test_dashboard_order.py similarity index 75% rename from dashboards_api/test/test_dashboard_order.py rename to dashboards/test/test_dashboard_order.py index 01c7db51..724678dc 100644 --- a/dashboards_api/test/test_dashboard_order.py +++ b/dashboards/test/test_dashboard_order.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.dashboard_order import DashboardOrder +from dashboards.models.dashboard_order import DashboardOrder class TestDashboardOrder(unittest.TestCase): """DashboardOrder unit test stubs""" diff --git a/dashboards/test/test_dashboard_snapshot_id.py b/dashboards/test/test_dashboard_snapshot_id.py new file mode 100644 index 00000000..f8c76eab --- /dev/null +++ b/dashboards/test/test_dashboard_snapshot_id.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.dashboard_snapshot_id import DashboardSnapshotId + +class TestDashboardSnapshotId(unittest.TestCase): + """DashboardSnapshotId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DashboardSnapshotId: + """Test DashboardSnapshotId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DashboardSnapshotId` + """ + model = DashboardSnapshotId() + if include_optional: + return DashboardSnapshotId( + snapshot_id = 'd28bb71f-5a47-4783-8f12-d4b115e61b0c' + ) + else: + return DashboardSnapshotId( + ) + """ + + def testDashboardSnapshotId(self): + """Test DashboardSnapshotId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_dashboard_snapshots200_response.py b/dashboards/test/test_dashboard_snapshots200_response.py similarity index 80% rename from dashboards_api/test/test_dashboard_snapshots200_response.py rename to dashboards/test/test_dashboard_snapshots200_response.py index 251067d4..98b5be3a 100644 --- a/dashboards_api/test/test_dashboard_snapshots200_response.py +++ b/dashboards/test/test_dashboard_snapshots200_response.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.dashboard_snapshots200_response import DashboardSnapshots200Response +from dashboards.models.dashboard_snapshots200_response import DashboardSnapshots200Response class TestDashboardSnapshots200Response(unittest.TestCase): """DashboardSnapshots200Response unit test stubs""" @@ -36,11 +35,12 @@ class TestDashboardSnapshots200Response(unittest.TestCase): model = DashboardSnapshots200Response() if include_optional: return DashboardSnapshots200Response( + pages = { }, dashboard_snapshots = [ null ], - links = dashboards_api.models.pagination_links__links.PaginationLinks__links( - previous = dashboards_api.models.link.Link( + links = dashboards.models.pagination_links__links.PaginationLinks__links( + previous = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -49,7 +49,7 @@ class TestDashboardSnapshots200Response(unittest.TestCase): profile = '', title = '', hreflang = '', ), - next = dashboards_api.models.link.Link( + next = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -57,7 +57,8 @@ class TestDashboardSnapshots200Response(unittest.TestCase): name = '', profile = '', title = '', - hreflang = '', ), ) + hreflang = '', ), + self = , ) ) else: return DashboardSnapshots200Response( diff --git a/dashboards_api/test/test_dashboard_snapshots_page.py b/dashboards/test/test_dashboard_snapshots_page.py similarity index 87% rename from dashboards_api/test/test_dashboard_snapshots_page.py rename to dashboards/test/test_dashboard_snapshots_page.py index a0e9bf15..a3908828 100644 --- a/dashboards_api/test/test_dashboard_snapshots_page.py +++ b/dashboards/test/test_dashboard_snapshots_page.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.dashboard_snapshots_page import DashboardSnapshotsPage +from dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage class TestDashboardSnapshotsPage(unittest.TestCase): """DashboardSnapshotsPage unit test stubs""" @@ -36,6 +35,7 @@ class TestDashboardSnapshotsPage(unittest.TestCase): model = DashboardSnapshotsPage() if include_optional: return DashboardSnapshotsPage( + pages = { }, dashboard_snapshots = [ null ] diff --git a/dashboards/test/test_default_timespan.py b/dashboards/test/test_default_timespan.py new file mode 100644 index 00000000..4b48f9f1 --- /dev/null +++ b/dashboards/test/test_default_timespan.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.default_timespan import DefaultTimespan + +class TestDefaultTimespan(unittest.TestCase): + """DefaultTimespan unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DefaultTimespan: + """Test DefaultTimespan + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DefaultTimespan` + """ + model = DefaultTimespan() + if include_optional: + return DefaultTimespan( + timespan_duration = 7200, + timespan_start = '2023-05-16 10:14:28', + timespan_end = '2023-05-16 11:14:28', + duration = 7200, + start = '2023-05-16T10:14:28Z', + end = '2023-05-16T11:14:28Z' + ) + else: + return DefaultTimespan( + ) + """ + + def testDefaultTimespan(self): + """Test DefaultTimespan""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_enterprise_agent_state.py b/dashboards/test/test_enterprise_agent_state.py new file mode 100644 index 00000000..7491b2be --- /dev/null +++ b/dashboards/test/test_enterprise_agent_state.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.enterprise_agent_state import EnterpriseAgentState + +class TestEnterpriseAgentState(unittest.TestCase): + """EnterpriseAgentState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEnterpriseAgentState(self): + """Test EnterpriseAgentState""" + # inst = EnterpriseAgentState() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_error.py b/dashboards/test/test_error.py new file mode 100644 index 00000000..9df0c934 --- /dev/null +++ b/dashboards/test/test_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_generate_dashboard_snapshot_request.py b/dashboards/test/test_generate_dashboard_snapshot_request.py similarity index 89% rename from dashboards_api/test/test_generate_dashboard_snapshot_request.py rename to dashboards/test/test_generate_dashboard_snapshot_request.py index 7b8fac1b..d41afc94 100644 --- a/dashboards_api/test/test_generate_dashboard_snapshot_request.py +++ b/dashboards/test/test_generate_dashboard_snapshot_request.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest +from dashboards.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest class TestGenerateDashboardSnapshotRequest(unittest.TestCase): """GenerateDashboardSnapshotRequest unit test stubs""" diff --git a/dashboards_api/test/test_geo_map_datasource.py b/dashboards/test/test_geo_map_datasource.py similarity index 75% rename from dashboards_api/test/test_geo_map_datasource.py rename to dashboards/test/test_geo_map_datasource.py index 866ff8b6..6f3afec4 100644 --- a/dashboards_api/test/test_geo_map_datasource.py +++ b/dashboards/test/test_geo_map_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.geo_map_datasource import GeoMapDatasource +from dashboards.models.geo_map_datasource import GeoMapDatasource class TestGeoMapDatasource(unittest.TestCase): """GeoMapDatasource unit test stubs""" diff --git a/dashboards/test/test_get_dashboard_data200_response.py b/dashboards/test/test_get_dashboard_data200_response.py new file mode 100644 index 00000000..81a90f52 --- /dev/null +++ b/dashboards/test/test_get_dashboard_data200_response.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.get_dashboard_data200_response import GetDashboardData200Response + +class TestGetDashboardData200Response(unittest.TestCase): + """GetDashboardData200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDashboardData200Response: + """Test GetDashboardData200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDashboardData200Response` + """ + model = GetDashboardData200Response() + if include_optional: + return GetDashboardData200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + group_labels = [ + dashboards.models.api_report_data_component_label_map.ApiReportDataComponentLabelMap( + group_property = 'AGENT', ) + ], + bin_size = 3600, + data = dashboards.models.api_widgets_data_v2.ApiWidgetsDataV2( + cards = [ + dashboards.models.api_numbers_card_data.ApiNumbersCardData( + card_id = 'lrxxr', + start_date = '2023-05-16T10:14:28Z', + end_date = '2023-05-16T10:14:28Z', + previous_value = 500.0, + bin_size = 3600, + timestamp = 1567620000, + number_of_data_points = 24192, + value = 100.0, + status = 'No data', + alert_suppression_windows = [ + dashboards.models.api_dashboard_asw.ApiDashboardAsw( + id = '281474976710662', + name = 'Test dashboards', + test_ids = ["281474976710661"], + start_times = ["2023-05-16T10:14:28Z"], + duration_in_seconds = 7200, + repeat = 'custom', + repeat_every = 5, + repeat_unit = 'week', ) + ], ) + ], + columns = [ + dashboards.models.api_multi_metric_column_data.ApiMultiMetricColumnData( + column_id = '938to', + bin_size = 3600, + points = [ + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( + timestamp = 1567620000, + number_of_data_points = 23304, + value = 100.0, + groups = [ + dashboards.models.api_data_point_group.ApiDataPointGroup( + group_property = 'COUNTRY', + group_value = 'US', ) + ], ) + ], + status = 'No data', ) + ], + points = [ + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( + timestamp = 1567620000, + number_of_data_points = 23304, + value = 100.0, ) + ], + tests = [ + dashboards.models.api_test_table_data.ApiTestTableData( + test_id = '68256', + test_name = 'Http Test Name', + target = 'www.google.com', + test_type = 'Web - HTTP Server', + alert_count = 398, + is_shared = True, + graphlets = [ + dashboards.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( + metric = 'Availability', + test_id = '68257', ) + ], ) + ], + start_round = 1384309800, + alert_suppression_windows = [ + dashboards.models.api_dashboard_asw.ApiDashboardAsw( + id = '281474976710662', + name = 'Test dashboards', + test_ids = ["281474976710661"], + start_times = ["2023-05-16T10:14:28Z"], + duration_in_seconds = 7200, + repeat_every = 5, ) + ], + total_alerts = 500, + active_alerts = 483, + alerts = [ + dashboards.models.api_alert_list_alert.ApiAlertListAlert( + alert_id = '2004945', + test_id = '56512', + rule_id = '281724', + alert_source = 'Http Test', + alert_rule = 'Http Test Rule', + alert_type = 'network-end-to-end-server', + start_time = '2023-06-02T08:54Z', + duration_in_seconds = 25, + active = True, ) + ], + summary = dashboards.models.api_agent_status_summary.ApiAgentStatusSummary( + online = 10, + offline = 2, + disabled = 3, ), + agents = [ + dashboards.models.api_agent_status_agent.ApiAgentStatusAgent( + agent_id = '6522', + status = 'online', + ip_info = dashboards.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( + public_ip = '172.58.92.31', + private_ip = '172.58.92.31', + ipv6 = '', + operative_system_version = '', ), + agent_name = '0c3898000117', + location = dashboards.models.api_agent_location.ApiAgentLocation( + latitude = 37.77493, + longitude = -122.41942, + location_name = 'San Francisco, California, US', ), ) + ], + status = 'No data', ), + links = dashboards.models.pagination_links__links.PaginationLinks__links( + previous = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetDashboardData200Response( + ) + """ + + def testGetDashboardData200Response(self): + """Test GetDashboardData200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_grouped_bar_chart_datasource.py b/dashboards/test/test_grouped_bar_chart_datasource.py new file mode 100644 index 00000000..c9afcf09 --- /dev/null +++ b/dashboards/test/test_grouped_bar_chart_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.grouped_bar_chart_datasource import GroupedBarChartDatasource + +class TestGroupedBarChartDatasource(unittest.TestCase): + """GroupedBarChartDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroupedBarChartDatasource(self): + """Test GroupedBarChartDatasource""" + # inst = GroupedBarChartDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_agent_widget_show.py b/dashboards/test/test_legacy_agent_widget_show.py new file mode 100644 index 00000000..9ba05c36 --- /dev/null +++ b/dashboards/test/test_legacy_agent_widget_show.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_agent_widget_show import LegacyAgentWidgetShow + +class TestLegacyAgentWidgetShow(unittest.TestCase): + """LegacyAgentWidgetShow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLegacyAgentWidgetShow(self): + """Test LegacyAgentWidgetShow""" + # inst = LegacyAgentWidgetShow() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_agent_widget_type.py b/dashboards/test/test_legacy_agent_widget_type.py new file mode 100644 index 00000000..9fd41883 --- /dev/null +++ b/dashboards/test/test_legacy_agent_widget_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_agent_widget_type import LegacyAgentWidgetType + +class TestLegacyAgentWidgetType(unittest.TestCase): + """LegacyAgentWidgetType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLegacyAgentWidgetType(self): + """Test LegacyAgentWidgetType""" + # inst = LegacyAgentWidgetType() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_alert_list_alert_type.py b/dashboards/test/test_legacy_alert_list_alert_type.py new file mode 100644 index 00000000..b0f3c3fa --- /dev/null +++ b/dashboards/test/test_legacy_alert_list_alert_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_alert_list_alert_type import LegacyAlertListAlertType + +class TestLegacyAlertListAlertType(unittest.TestCase): + """LegacyAlertListAlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLegacyAlertListAlertType(self): + """Test LegacyAlertListAlertType""" + # inst = LegacyAlertListAlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_api_dashboard.py b/dashboards/test/test_legacy_api_dashboard.py new file mode 100644 index 00000000..cd084929 --- /dev/null +++ b/dashboards/test/test_legacy_api_dashboard.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_api_dashboard import LegacyApiDashboard + +class TestLegacyApiDashboard(unittest.TestCase): + """LegacyApiDashboard unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LegacyApiDashboard: + """Test LegacyApiDashboard + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LegacyApiDashboard` + """ + model = LegacyApiDashboard() + if include_optional: + return LegacyApiDashboard( + account_id = 1234, + created_by = 1, + modified_by = 1, + modified_date = '2023-05-16 10:14:28', + global_override = True, + migrated_report = False, + api_link = [ + { } + ] + ) + else: + return LegacyApiDashboard( + ) + """ + + def testLegacyApiDashboard(self): + """Test LegacyApiDashboard""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_dashboard_snapshot.py b/dashboards/test/test_legacy_dashboard_snapshot.py new file mode 100644 index 00000000..2ca1c83d --- /dev/null +++ b/dashboards/test/test_legacy_dashboard_snapshot.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_dashboard_snapshot import LegacyDashboardSnapshot + +class TestLegacyDashboardSnapshot(unittest.TestCase): + """LegacyDashboardSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LegacyDashboardSnapshot: + """Test LegacyDashboardSnapshot + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LegacyDashboardSnapshot` + """ + model = LegacyDashboardSnapshot() + if include_optional: + return LegacyDashboardSnapshot( + account_id = 1234, + created_date = '2023-05-16 10:14:28', + expiration_date = '2023-05-16 10:14:28', + permalink = 'https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c', + api_links = [ + { } + ] + ) + else: + return LegacyDashboardSnapshot( + ) + """ + + def testLegacyDashboardSnapshot(self): + """Test LegacyDashboardSnapshot""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_default_timespan.py b/dashboards/test/test_legacy_default_timespan.py new file mode 100644 index 00000000..55ef318c --- /dev/null +++ b/dashboards/test/test_legacy_default_timespan.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_default_timespan import LegacyDefaultTimespan + +class TestLegacyDefaultTimespan(unittest.TestCase): + """LegacyDefaultTimespan unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LegacyDefaultTimespan: + """Test LegacyDefaultTimespan + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `LegacyDefaultTimespan` + """ + model = LegacyDefaultTimespan() + if include_optional: + return LegacyDefaultTimespan( + timespan_duration = 7200, + timespan_start = '2023-05-16 10:14:28', + timespan_end = '2023-05-16 11:14:28' + ) + else: + return LegacyDefaultTimespan( + ) + """ + + def testLegacyDefaultTimespan(self): + """Test LegacyDefaultTimespan""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_duration_unit.py b/dashboards/test/test_legacy_duration_unit.py new file mode 100644 index 00000000..15fb1e14 --- /dev/null +++ b/dashboards/test/test_legacy_duration_unit.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_duration_unit import LegacyDurationUnit + +class TestLegacyDurationUnit(unittest.TestCase): + """LegacyDurationUnit unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLegacyDurationUnit(self): + """Test LegacyDurationUnit""" + # inst = LegacyDurationUnit() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_widget_sort_direction.py b/dashboards/test/test_legacy_widget_sort_direction.py new file mode 100644 index 00000000..933df4e3 --- /dev/null +++ b/dashboards/test/test_legacy_widget_sort_direction.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_widget_sort_direction import LegacyWidgetSortDirection + +class TestLegacyWidgetSortDirection(unittest.TestCase): + """LegacyWidgetSortDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLegacyWidgetSortDirection(self): + """Test LegacyWidgetSortDirection""" + # inst = LegacyWidgetSortDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_legacy_widget_sort_property.py b/dashboards/test/test_legacy_widget_sort_property.py new file mode 100644 index 00000000..90d7898c --- /dev/null +++ b/dashboards/test/test_legacy_widget_sort_property.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.legacy_widget_sort_property import LegacyWidgetSortProperty + +class TestLegacyWidgetSortProperty(unittest.TestCase): + """LegacyWidgetSortProperty unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLegacyWidgetSortProperty(self): + """Test LegacyWidgetSortProperty""" + # inst = LegacyWidgetSortProperty() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_link.py b/dashboards/test/test_link.py new file mode 100644 index 00000000..8b4c3520 --- /dev/null +++ b/dashboards/test/test_link.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_metric_group.py b/dashboards/test/test_metric_group.py similarity index 75% rename from dashboards_api/test/test_metric_group.py rename to dashboards/test/test_metric_group.py index cdff6c8c..a3d9783f 100644 --- a/dashboards_api/test/test_metric_group.py +++ b/dashboards/test/test_metric_group.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.metric_group import MetricGroup +from dashboards.models.metric_group import MetricGroup class TestMetricGroup(unittest.TestCase): """MetricGroup unit test stubs""" diff --git a/dashboards/test/test_multi_metrics_table_datasource.py b/dashboards/test/test_multi_metrics_table_datasource.py new file mode 100644 index 00000000..f426952f --- /dev/null +++ b/dashboards/test/test_multi_metrics_table_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.multi_metrics_table_datasource import MultiMetricsTableDatasource + +class TestMultiMetricsTableDatasource(unittest.TestCase): + """MultiMetricsTableDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMultiMetricsTableDatasource(self): + """Test MultiMetricsTableDatasource""" + # inst = MultiMetricsTableDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_numbers_card_datasource.py b/dashboards/test/test_numbers_card_datasource.py new file mode 100644 index 00000000..15648d33 --- /dev/null +++ b/dashboards/test/test_numbers_card_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.numbers_card_datasource import NumbersCardDatasource + +class TestNumbersCardDatasource(unittest.TestCase): + """NumbersCardDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNumbersCardDatasource(self): + """Test NumbersCardDatasource""" + # inst = NumbersCardDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_pagination_links.py b/dashboards/test/test_pagination_links.py new file mode 100644 index 00000000..6f2f6784 --- /dev/null +++ b/dashboards/test/test_pagination_links.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.pagination_links import PaginationLinks + +class TestPaginationLinks(unittest.TestCase): + """PaginationLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinks: + """Test PaginationLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinks` + """ + model = PaginationLinks() + if include_optional: + return PaginationLinks( + links = dashboards.models.pagination_links__links.PaginationLinks__links( + previous = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return PaginationLinks( + ) + """ + + def testPaginationLinks(self): + """Test PaginationLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_pagination_links_links.py b/dashboards/test/test_pagination_links_links.py new file mode 100644 index 00000000..66a34f69 --- /dev/null +++ b/dashboards/test/test_pagination_links_links.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.pagination_links_links import PaginationLinksLinks + +class TestPaginationLinksLinks(unittest.TestCase): + """PaginationLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinksLinks: + """Test PaginationLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinksLinks` + """ + model = PaginationLinksLinks() + if include_optional: + return PaginationLinksLinks( + previous = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationLinksLinks( + ) + """ + + def testPaginationLinksLinks(self): + """Test PaginationLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_pie_chart_datasource.py b/dashboards/test/test_pie_chart_datasource.py new file mode 100644 index 00000000..67b3c104 --- /dev/null +++ b/dashboards/test/test_pie_chart_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.pie_chart_datasource import PieChartDatasource + +class TestPieChartDatasource(unittest.TestCase): + """PieChartDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPieChartDatasource(self): + """Test PieChartDatasource""" + # inst = PieChartDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_query_window.py b/dashboards/test/test_query_window.py new file mode 100644 index 00000000..6d7d5393 --- /dev/null +++ b/dashboards/test/test_query_window.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.query_window import QueryWindow + +class TestQueryWindow(unittest.TestCase): + """QueryWindow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QueryWindow: + """Test QueryWindow + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QueryWindow` + """ + model = QueryWindow() + if include_optional: + return QueryWindow( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z' + ) + else: + return QueryWindow( + ) + """ + + def testQueryWindow(self): + """Test QueryWindow""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_scalable_widget.py b/dashboards/test/test_scalable_widget.py similarity index 88% rename from dashboards_api/test/test_scalable_widget.py rename to dashboards/test/test_scalable_widget.py index b5f60eec..46a7c410 100644 --- a/dashboards_api/test/test_scalable_widget.py +++ b/dashboards/test/test_scalable_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.scalable_widget import ScalableWidget +from dashboards.models.scalable_widget import ScalableWidget class TestScalableWidget(unittest.TestCase): """ScalableWidget unit test stubs""" diff --git a/dashboards/test/test_self_links.py b/dashboards/test/test_self_links.py new file mode 100644 index 00000000..ad91bb5f --- /dev/null +++ b/dashboards/test/test_self_links.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_self_links_links.py b/dashboards/test/test_self_links_links.py new file mode 100644 index 00000000..9d2d5f77 --- /dev/null +++ b/dashboards/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = dashboards.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_snapshot_data_by_widget200_response.py b/dashboards/test/test_snapshot_data_by_widget200_response.py similarity index 76% rename from dashboards_api/test/test_snapshot_data_by_widget200_response.py rename to dashboards/test/test_snapshot_data_by_widget200_response.py index da5e7084..b48a9ed2 100644 --- a/dashboards_api/test/test_snapshot_data_by_widget200_response.py +++ b/dashboards/test/test_snapshot_data_by_widget200_response.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response +from dashboards.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response class TestSnapshotDataByWidget200Response(unittest.TestCase): """SnapshotDataByWidget200Response unit test stubs""" @@ -36,14 +35,16 @@ class TestSnapshotDataByWidget200Response(unittest.TestCase): model = SnapshotDataByWidget200Response() if include_optional: return SnapshotDataByWidget200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', group_labels = [ - dashboards_api.models.api_report_data_component_label_map.ApiReportDataComponentLabelMap( + dashboards.models.api_report_data_component_label_map.ApiReportDataComponentLabelMap( group_property = 'AGENT', ) ], bin_size = 3600, - data = dashboards_api.models.api_widgets_data_v2.ApiWidgetsDataV2( + data = dashboards.models.api_widgets_data_v2.ApiWidgetsDataV2( cards = [ - dashboards_api.models.api_numbers_card_data.ApiNumbersCardData( + dashboards.models.api_numbers_card_data.ApiNumbersCardData( card_id = 'lrxxr', start_date = '2023-05-16T10:14:28Z', end_date = '2023-05-16T10:14:28Z', @@ -54,7 +55,7 @@ class TestSnapshotDataByWidget200Response(unittest.TestCase): value = 100.0, status = 'No data', alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -66,16 +67,16 @@ class TestSnapshotDataByWidget200Response(unittest.TestCase): ], ) ], columns = [ - dashboards_api.models.api_multi_metric_column_data.ApiMultiMetricColumnData( + dashboards.models.api_multi_metric_column_data.ApiMultiMetricColumnData( column_id = '938to', bin_size = 3600, points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( + dashboards.models.api_data_point_group.ApiDataPointGroup( group_property = 'COUNTRY', group_value = 'US', ) ], ) @@ -83,13 +84,13 @@ class TestSnapshotDataByWidget200Response(unittest.TestCase): status = 'No data', ) ], points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( + dashboards.models.api_widget_data_point.ApiWidgetDataPoint( timestamp = 1567620000, number_of_data_points = 23304, value = 100.0, ) ], tests = [ - dashboards_api.models.api_test_table_data.ApiTestTableData( + dashboards.models.api_test_table_data.ApiTestTableData( test_id = '68256', test_name = 'Http Test Name', target = 'www.google.com', @@ -97,14 +98,14 @@ class TestSnapshotDataByWidget200Response(unittest.TestCase): alert_count = 398, is_shared = True, graphlets = [ - dashboards_api.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( + dashboards.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( metric = 'Availability', test_id = '68257', ) ], ) ], start_round = 1384309800, alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( + dashboards.models.api_dashboard_asw.ApiDashboardAsw( id = '281474976710662', name = 'Test dashboards', test_ids = ["281474976710661"], @@ -115,39 +116,39 @@ class TestSnapshotDataByWidget200Response(unittest.TestCase): total_alerts = 500, active_alerts = 483, alerts = [ - dashboards_api.models.api_alert_list_alert.ApiAlertListAlert( + dashboards.models.api_alert_list_alert.ApiAlertListAlert( alert_id = '2004945', test_id = '56512', rule_id = '281724', alert_source = 'Http Test', alert_rule = 'Http Test Rule', - alert_type = 'Network - End-to-End (Server)', + alert_type = 'network-end-to-end-server', start_time = '2023-06-02T08:54Z', duration_in_seconds = 25, active = True, ) ], - summary = dashboards_api.models.api_agent_status_summary.ApiAgentStatusSummary( + summary = dashboards.models.api_agent_status_summary.ApiAgentStatusSummary( online = 10, offline = 2, disabled = 3, ), agents = [ - dashboards_api.models.api_agent_status_agent.ApiAgentStatusAgent( + dashboards.models.api_agent_status_agent.ApiAgentStatusAgent( agent_id = '6522', status = 'online', - ip_info = dashboards_api.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( + ip_info = dashboards.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( public_ip = '172.58.92.31', private_ip = '172.58.92.31', ipv6 = '', operative_system_version = '', ), agent_name = '0c3898000117', - location = dashboards_api.models.api_agent_location.ApiAgentLocation( + location = dashboards.models.api_agent_location.ApiAgentLocation( latitude = 37.77493, longitude = -122.41942, location_name = 'San Francisco, California, US', ), ) ], status = 'No data', ), - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/dashboards/test/test_stacked_area_chart_datasource.py b/dashboards/test/test_stacked_area_chart_datasource.py new file mode 100644 index 00000000..0030fad1 --- /dev/null +++ b/dashboards/test/test_stacked_area_chart_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.stacked_area_chart_datasource import StackedAreaChartDatasource + +class TestStackedAreaChartDatasource(unittest.TestCase): + """StackedAreaChartDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStackedAreaChartDatasource(self): + """Test StackedAreaChartDatasource""" + # inst = StackedAreaChartDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_stacked_bar_chart_datasource.py b/dashboards/test/test_stacked_bar_chart_datasource.py new file mode 100644 index 00000000..e1b142d7 --- /dev/null +++ b/dashboards/test/test_stacked_bar_chart_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.stacked_bar_chart_datasource import StackedBarChartDatasource + +class TestStackedBarChartDatasource(unittest.TestCase): + """StackedBarChartDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStackedBarChartDatasource(self): + """Test StackedBarChartDatasource""" + # inst = StackedBarChartDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_table_datasource.py b/dashboards/test/test_table_datasource.py new file mode 100644 index 00000000..ca185d2d --- /dev/null +++ b/dashboards/test/test_table_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.table_datasource import TableDatasource + +class TestTableDatasource(unittest.TestCase): + """TableDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTableDatasource(self): + """Test TableDatasource""" + # inst = TableDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_test_table_datasource.py b/dashboards/test/test_test_table_datasource.py new file mode 100644 index 00000000..aa560afe --- /dev/null +++ b/dashboards/test/test_test_table_datasource.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.test_table_datasource import TestTableDatasource + +class TestTestTableDatasource(unittest.TestCase): + """TestTableDatasource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestTableDatasource(self): + """Test TestTableDatasource""" + # inst = TestTableDatasource() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_test_table_filter_key.py b/dashboards/test/test_test_table_filter_key.py new file mode 100644 index 00000000..309d5413 --- /dev/null +++ b/dashboards/test/test_test_table_filter_key.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.test_table_filter_key import TestTableFilterKey + +class TestTestTableFilterKey(unittest.TestCase): + """TestTableFilterKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestTableFilterKey(self): + """Test TestTableFilterKey""" + # inst = TestTableFilterKey() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_test_table_filter_type.py b/dashboards/test/test_test_table_filter_type.py new file mode 100644 index 00000000..e1f10d63 --- /dev/null +++ b/dashboards/test/test_test_table_filter_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.test_table_filter_type import TestTableFilterType + +class TestTestTableFilterType(unittest.TestCase): + """TestTableFilterType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestTableFilterType(self): + """Test TestTableFilterType""" + # inst = TestTableFilterType() + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_timeseries_datasource.py b/dashboards/test/test_timeseries_datasource.py similarity index 75% rename from dashboards_api/test/test_timeseries_datasource.py rename to dashboards/test/test_timeseries_datasource.py index 6b78ef85..8d42b9ec 100644 --- a/dashboards_api/test/test_timeseries_datasource.py +++ b/dashboards/test/test_timeseries_datasource.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.timeseries_datasource import TimeseriesDatasource +from dashboards.models.timeseries_datasource import TimeseriesDatasource class TestTimeseriesDatasource(unittest.TestCase): """TimeseriesDatasource unit test stubs""" diff --git a/dashboards/test/test_unauthorized_error.py b/dashboards/test/test_unauthorized_error.py new file mode 100644 index 00000000..4bcccf9f --- /dev/null +++ b/dashboards/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_update_snapshot_expiration_date_api_request.py b/dashboards/test/test_update_snapshot_expiration_date_api_request.py similarity index 84% rename from dashboards_api/test/test_update_snapshot_expiration_date_api_request.py rename to dashboards/test/test_update_snapshot_expiration_date_api_request.py index caa6d396..340d80ea 100644 --- a/dashboards_api/test/test_update_snapshot_expiration_date_api_request.py +++ b/dashboards/test/test_update_snapshot_expiration_date_api_request.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest +from dashboards.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest class TestUpdateSnapshotExpirationDateApiRequest(unittest.TestCase): """UpdateSnapshotExpirationDateApiRequest unit test stubs""" @@ -36,7 +35,8 @@ class TestUpdateSnapshotExpirationDateApiRequest(unittest.TestCase): model = UpdateSnapshotExpirationDateApiRequest() if include_optional: return UpdateSnapshotExpirationDateApiRequest( - snapshot_expiration_date = '2023-05-16T10:14:28Z' + snapshot_expiration_date = '2023-05-16T10:14:28Z', + expiration_date = '2023-05-16 10:14:28' ) else: return UpdateSnapshotExpirationDateApiRequest( diff --git a/dashboards/test/test_validation_error.py b/dashboards/test/test_validation_error.py new file mode 100644 index 00000000..803950b3 --- /dev/null +++ b/dashboards/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + dashboards.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards/test/test_validation_error_all_of_errors.py b/dashboards/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..697b7b24 --- /dev/null +++ b/dashboards/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from dashboards.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/dashboards_api/test/test_visual_mode.py b/dashboards/test/test_visual_mode.py similarity index 75% rename from dashboards_api/test/test_visual_mode.py rename to dashboards/test/test_visual_mode.py index 1c2bd056..10ce734f 100644 --- a/dashboards_api/test/test_visual_mode.py +++ b/dashboards/test/test_visual_mode.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.visual_mode import VisualMode +from dashboards.models.visual_mode import VisualMode class TestVisualMode(unittest.TestCase): """VisualMode unit test stubs""" diff --git a/dashboards_api/test/test_widget.py b/dashboards/test/test_widget.py similarity index 80% rename from dashboards_api/test/test_widget.py rename to dashboards/test/test_widget.py index 67acb485..b9a217c1 100644 --- a/dashboards_api/test/test_widget.py +++ b/dashboards/test/test_widget.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.widget import Widget +from dashboards.models.widget import Widget class TestWidget(unittest.TestCase): """Widget unit test stubs""" @@ -36,8 +35,8 @@ class TestWidget(unittest.TestCase): model = Widget() if include_optional: return Widget( - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( + links = dashboards.models.self_links__links.SelfLinks__links( + self = dashboards.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -47,7 +46,6 @@ class TestWidget(unittest.TestCase): title = '', hreflang = '', ), ), id = '1234', - type = 'Pie Chart', title = 'Widget Title', visual_mode = 'Full', embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', @@ -55,11 +53,11 @@ class TestWidget(unittest.TestCase): metric_group = 'BGP', direction = 'FROM_TARGET', metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {"Tests":["5187"]}, + filters = {"TEST":[5187,5227],"ENDPOINT_MACHINE_ID":["fbd0050c-07f7-43f7-9631-14b32f096962"]}, measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( + fixed_timespan = dashboards.models.api_duration.ApiDuration( value = 10, - unit = 'hour', ), + unit = 'Days', ), api_link = '', should_exclude_alert_suppression_windows = True ) diff --git a/dashboards_api/test/test_widget_measure_type.py b/dashboards/test/test_widget_measure_type.py similarity index 75% rename from dashboards_api/test/test_widget_measure_type.py rename to dashboards/test/test_widget_measure_type.py index 27c54d68..34c25120 100644 --- a/dashboards_api/test/test_widget_measure_type.py +++ b/dashboards/test/test_widget_measure_type.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.widget_measure_type import WidgetMeasureType +from dashboards.models.widget_measure_type import WidgetMeasureType class TestWidgetMeasureType(unittest.TestCase): """WidgetMeasureType unit test stubs""" diff --git a/dashboards_api/test/test_widget_type.py b/dashboards/test/test_widget_type.py similarity index 75% rename from dashboards_api/test/test_widget_type.py rename to dashboards/test/test_widget_type.py index 40e014b3..baccc5a9 100644 --- a/dashboards_api/test/test_widget_type.py +++ b/dashboards/test/test_widget_type.py @@ -3,9 +3,9 @@ """ Dashboards API - Manage ThousandEyes Dashboards + Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from dashboards_api.models.widget_type import WidgetType +from dashboards.models.widget_type import WidgetType class TestWidgetType(unittest.TestCase): """WidgetType unit test stubs""" diff --git a/dashboards_api/.github/workflows/python.yml b/dashboards_api/.github/workflows/python.yml deleted file mode 100644 index fe2abfbc..00000000 --- a/dashboards_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: dashboards_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/dashboards_api/.gitlab-ci.yml b/dashboards_api/.gitlab-ci.yml deleted file mode 100644 index f1e9dcb7..00000000 --- a/dashboards_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=dashboards_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/dashboards_api/.openapi-generator/FILES b/dashboards_api/.openapi-generator/FILES deleted file mode 100644 index 25df37ae..00000000 --- a/dashboards_api/.openapi-generator/FILES +++ /dev/null @@ -1,326 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -dashboards_api/__init__.py -dashboards_api/api/__init__.py -dashboards_api/api/dashboard_snapshots_api.py -dashboards_api/api/dashboards_api.py -dashboards_api/api_client.py -dashboards_api/api_response.py -dashboards_api/configuration.py -dashboards_api/exceptions.py -dashboards_api/models/__init__.py -dashboards_api/models/agent_status_datasource.py -dashboards_api/models/agent_widget_show.py -dashboards_api/models/agent_widget_type.py -dashboards_api/models/alert_list_datasource.py -dashboards_api/models/api_agent_location.py -dashboards_api/models/api_agent_status_agent.py -dashboards_api/models/api_agent_status_ip_info.py -dashboards_api/models/api_agent_status_summary.py -dashboards_api/models/api_agent_status_widget.py -dashboards_api/models/api_aggregate_property.py -dashboards_api/models/api_alert_list_alert.py -dashboards_api/models/api_alert_list_alert_type.py -dashboards_api/models/api_alert_list_widget.py -dashboards_api/models/api_alert_list_widget_all_of_active_within.py -dashboards_api/models/api_box_and_whiskers_widget.py -dashboards_api/models/api_color_grid_widget.py -dashboards_api/models/api_dashboard.py -dashboards_api/models/api_dashboard_asw.py -dashboards_api/models/api_dashboard_snapshot.py -dashboards_api/models/api_dashboard_snapshot_all_of_dashboard.py -dashboards_api/models/api_data_point_group.py -dashboards_api/models/api_default_timespan.py -dashboards_api/models/api_duration.py -dashboards_api/models/api_geo_map_widget.py -dashboards_api/models/api_graphlet_point.py -dashboards_api/models/api_grouped_barchart_widget.py -dashboards_api/models/api_multi_metric_column.py -dashboards_api/models/api_multi_metric_column_data.py -dashboards_api/models/api_multi_metric_table_widget.py -dashboards_api/models/api_multi_search_filter_api_test_table_filter_key.py -dashboards_api/models/api_numbers_card.py -dashboards_api/models/api_numbers_card_all_of_fixed_timespan.py -dashboards_api/models/api_numbers_card_data.py -dashboards_api/models/api_numbers_card_widget.py -dashboards_api/models/api_pie_chart_widget.py -dashboards_api/models/api_report_data_component_label_map.py -dashboards_api/models/api_report_data_component_label_map_entry.py -dashboards_api/models/api_report_snapshot_time_span.py -dashboards_api/models/api_stacked_area_chart_widget.py -dashboards_api/models/api_stacked_barchart_widget.py -dashboards_api/models/api_table_widget.py -dashboards_api/models/api_test_table_data.py -dashboards_api/models/api_test_table_graphlets_data.py -dashboards_api/models/api_test_table_widget.py -dashboards_api/models/api_timeseries_widget.py -dashboards_api/models/api_widget.py -dashboards_api/models/api_widget_data_point.py -dashboards_api/models/api_widget_data_response.py -dashboards_api/models/api_widget_filter_api_test_table_filter_key.py -dashboards_api/models/api_widget_fixed_y_scale_prefix.py -dashboards_api/models/api_widget_measure.py -dashboards_api/models/api_widgets_data_v2.py -dashboards_api/models/asw_repeat.py -dashboards_api/models/asw_repeat_unit.py -dashboards_api/models/box_and_whiskers_datasource.py -dashboards_api/models/color_grid_datasource.py -dashboards_api/models/dashboard_links.py -dashboards_api/models/dashboard_links_links.py -dashboards_api/models/dashboard_metric.py -dashboards_api/models/dashboard_metric_direction.py -dashboards_api/models/dashboard_order.py -dashboards_api/models/dashboard_snapshot_links.py -dashboards_api/models/dashboard_snapshot_links_links.py -dashboards_api/models/dashboard_snapshots200_response.py -dashboards_api/models/dashboard_snapshots_page.py -dashboards_api/models/duration_unit.py -dashboards_api/models/enterprise_agent_state.py -dashboards_api/models/error.py -dashboards_api/models/generate_dashboard_snapshot_request.py -dashboards_api/models/geo_map_datasource.py -dashboards_api/models/get_dashboard_data200_response.py -dashboards_api/models/grouped_bar_chart_datasource.py -dashboards_api/models/link.py -dashboards_api/models/metric_group.py -dashboards_api/models/multi_metrics_table_datasource.py -dashboards_api/models/numbers_card_datasource.py -dashboards_api/models/pagination_links.py -dashboards_api/models/pagination_links_links.py -dashboards_api/models/pie_chart_datasource.py -dashboards_api/models/query_window.py -dashboards_api/models/scalable_widget.py -dashboards_api/models/self_links.py -dashboards_api/models/self_links_links.py -dashboards_api/models/snapshot_data_by_widget200_response.py -dashboards_api/models/stacked_area_chart_datasource.py -dashboards_api/models/stacked_bar_chart_datasource.py -dashboards_api/models/table_datasource.py -dashboards_api/models/test_table_datasource.py -dashboards_api/models/test_table_filter_key.py -dashboards_api/models/test_table_filter_type.py -dashboards_api/models/timeseries_datasource.py -dashboards_api/models/unauthorized_error.py -dashboards_api/models/update_snapshot_expiration_date_api_request.py -dashboards_api/models/visual_mode.py -dashboards_api/models/widget.py -dashboards_api/models/widget_measure_type.py -dashboards_api/models/widget_sort_direction.py -dashboards_api/models/widget_sort_property.py -dashboards_api/models/widget_type.py -dashboards_api/py.typed -dashboards_api/rest.py -docs/AgentStatusDatasource.md -docs/AgentWidgetShow.md -docs/AgentWidgetType.md -docs/AlertListDatasource.md -docs/ApiAgentLocation.md -docs/ApiAgentStatusAgent.md -docs/ApiAgentStatusIpInfo.md -docs/ApiAgentStatusSummary.md -docs/ApiAgentStatusWidget.md -docs/ApiAggregateProperty.md -docs/ApiAlertListAlert.md -docs/ApiAlertListAlertType.md -docs/ApiAlertListWidget.md -docs/ApiAlertListWidgetAllOfActiveWithin.md -docs/ApiBoxAndWhiskersWidget.md -docs/ApiColorGridWidget.md -docs/ApiDashboard.md -docs/ApiDashboardAsw.md -docs/ApiDashboardSnapshot.md -docs/ApiDashboardSnapshotAllOfDashboard.md -docs/ApiDataPointGroup.md -docs/ApiDefaultTimespan.md -docs/ApiDuration.md -docs/ApiGeoMapWidget.md -docs/ApiGraphletPoint.md -docs/ApiGroupedBarchartWidget.md -docs/ApiMultiMetricColumn.md -docs/ApiMultiMetricColumnData.md -docs/ApiMultiMetricTableWidget.md -docs/ApiMultiSearchFilterApiTestTableFilterKey.md -docs/ApiNumbersCard.md -docs/ApiNumbersCardAllOfFixedTimespan.md -docs/ApiNumbersCardData.md -docs/ApiNumbersCardWidget.md -docs/ApiPieChartWidget.md -docs/ApiReportDataComponentLabelMap.md -docs/ApiReportDataComponentLabelMapEntry.md -docs/ApiReportSnapshotTimeSpan.md -docs/ApiStackedAreaChartWidget.md -docs/ApiStackedBarchartWidget.md -docs/ApiTableWidget.md -docs/ApiTestTableData.md -docs/ApiTestTableGraphletsData.md -docs/ApiTestTableWidget.md -docs/ApiTimeseriesWidget.md -docs/ApiWidget.md -docs/ApiWidgetDataPoint.md -docs/ApiWidgetDataResponse.md -docs/ApiWidgetFilterApiTestTableFilterKey.md -docs/ApiWidgetFixedYScalePrefix.md -docs/ApiWidgetMeasure.md -docs/ApiWidgetsDataV2.md -docs/AswRepeat.md -docs/AswRepeatUnit.md -docs/BoxAndWhiskersDatasource.md -docs/ColorGridDatasource.md -docs/DashboardLinks.md -docs/DashboardLinksLinks.md -docs/DashboardMetric.md -docs/DashboardMetricDirection.md -docs/DashboardOrder.md -docs/DashboardSnapshotLinks.md -docs/DashboardSnapshotLinksLinks.md -docs/DashboardSnapshots200Response.md -docs/DashboardSnapshotsApi.md -docs/DashboardSnapshotsPage.md -docs/DashboardsApi.md -docs/DurationUnit.md -docs/EnterpriseAgentState.md -docs/Error.md -docs/GenerateDashboardSnapshotRequest.md -docs/GeoMapDatasource.md -docs/GetDashboardData200Response.md -docs/GroupedBarChartDatasource.md -docs/Link.md -docs/MetricGroup.md -docs/MultiMetricsTableDatasource.md -docs/NumbersCardDatasource.md -docs/PaginationLinks.md -docs/PaginationLinksLinks.md -docs/PieChartDatasource.md -docs/QueryWindow.md -docs/ScalableWidget.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SnapshotDataByWidget200Response.md -docs/StackedAreaChartDatasource.md -docs/StackedBarChartDatasource.md -docs/TableDatasource.md -docs/TestTableDatasource.md -docs/TestTableFilterKey.md -docs/TestTableFilterType.md -docs/TimeseriesDatasource.md -docs/UnauthorizedError.md -docs/UpdateSnapshotExpirationDateApiRequest.md -docs/VisualMode.md -docs/Widget.md -docs/WidgetMeasureType.md -docs/WidgetSortDirection.md -docs/WidgetSortProperty.md -docs/WidgetType.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_agent_status_datasource.py -test/test_agent_widget_show.py -test/test_agent_widget_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_aggregate_property.py -test/test_api_alert_list_alert.py -test/test_api_alert_list_alert_type.py -test/test_api_alert_list_widget.py -test/test_api_alert_list_widget_all_of_active_within.py -test/test_api_box_and_whiskers_widget.py -test/test_api_color_grid_widget.py -test/test_api_dashboard.py -test/test_api_dashboard_asw.py -test/test_api_dashboard_snapshot.py -test/test_api_dashboard_snapshot_all_of_dashboard.py -test/test_api_data_point_group.py -test/test_api_default_timespan.py -test/test_api_duration.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_all_of_fixed_timespan.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_point.py -test/test_api_widget_data_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_widgets_data_v2.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_links.py -test/test_dashboard_links_links.py -test/test_dashboard_metric.py -test/test_dashboard_metric_direction.py -test/test_dashboard_order.py -test/test_dashboard_snapshot_links.py -test/test_dashboard_snapshot_links_links.py -test/test_dashboard_snapshots200_response.py -test/test_dashboard_snapshots_api.py -test/test_dashboard_snapshots_page.py -test/test_dashboards_api.py -test/test_duration_unit.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_get_dashboard_data200_response.py -test/test_grouped_bar_chart_datasource.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_pagination_links_links.py -test/test_pie_chart_datasource.py -test/test_query_window.py -test/test_scalable_widget.py -test/test_self_links.py -test/test_self_links_links.py -test/test_snapshot_data_by_widget200_response.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_visual_mode.py -test/test_widget.py -test/test_widget_measure_type.py -test/test_widget_sort_direction.py -test/test_widget_sort_property.py -test/test_widget_type.py -tox.ini diff --git a/dashboards_api/.openapi-generator/VERSION b/dashboards_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/dashboards_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/dashboards_api/.travis.yml b/dashboards_api/.travis.yml deleted file mode 100644 index c132d17f..00000000 --- a/dashboards_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=dashboards_api diff --git a/dashboards_api/README.md b/dashboards_api/README.md deleted file mode 100644 index 8ac5e896..00000000 --- a/dashboards_api/README.md +++ /dev/null @@ -1,230 +0,0 @@ -# dashboards-api -Manage ThousandEyes Dashboards - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import dashboards_api -``` - -### 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 dashboards_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import dashboards_api -from dashboards_api.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 = dashboards_api.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 = dashboards_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with dashboards_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = dashboards_api.DashboardSnapshotsApi(api_client) - generate_dashboard_snapshot_request = dashboards_api.GenerateDashboardSnapshotRequest() # GenerateDashboardSnapshotRequest | Request body schema to create a dashboard snapshot. - aid = '2067' # 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 dashboard snapshot - api_response = api_instance.create_dashboard_snapshot(generate_dashboard_snapshot_request, aid=aid) - print("The response of DashboardSnapshotsApi->create_dashboard_snapshot:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling DashboardSnapshotsApi->create_dashboard_snapshot: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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 -*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* | [**update_dashboard**](docs/DashboardsApi.md#update_dashboard) | **PUT** /v7/dashboards/{dashboardId} | Update dashboard - - -## Documentation For Models - - - [AgentStatusDatasource](docs/AgentStatusDatasource.md) - - [AgentWidgetShow](docs/AgentWidgetShow.md) - - [AgentWidgetType](docs/AgentWidgetType.md) - - [AlertListDatasource](docs/AlertListDatasource.md) - - [ApiAgentLocation](docs/ApiAgentLocation.md) - - [ApiAgentStatusAgent](docs/ApiAgentStatusAgent.md) - - [ApiAgentStatusIpInfo](docs/ApiAgentStatusIpInfo.md) - - [ApiAgentStatusSummary](docs/ApiAgentStatusSummary.md) - - [ApiAgentStatusWidget](docs/ApiAgentStatusWidget.md) - - [ApiAggregateProperty](docs/ApiAggregateProperty.md) - - [ApiAlertListAlert](docs/ApiAlertListAlert.md) - - [ApiAlertListAlertType](docs/ApiAlertListAlertType.md) - - [ApiAlertListWidget](docs/ApiAlertListWidget.md) - - [ApiAlertListWidgetAllOfActiveWithin](docs/ApiAlertListWidgetAllOfActiveWithin.md) - - [ApiBoxAndWhiskersWidget](docs/ApiBoxAndWhiskersWidget.md) - - [ApiColorGridWidget](docs/ApiColorGridWidget.md) - - [ApiDashboard](docs/ApiDashboard.md) - - [ApiDashboardAsw](docs/ApiDashboardAsw.md) - - [ApiDashboardSnapshot](docs/ApiDashboardSnapshot.md) - - [ApiDashboardSnapshotAllOfDashboard](docs/ApiDashboardSnapshotAllOfDashboard.md) - - [ApiDataPointGroup](docs/ApiDataPointGroup.md) - - [ApiDefaultTimespan](docs/ApiDefaultTimespan.md) - - [ApiDuration](docs/ApiDuration.md) - - [ApiGeoMapWidget](docs/ApiGeoMapWidget.md) - - [ApiGraphletPoint](docs/ApiGraphletPoint.md) - - [ApiGroupedBarchartWidget](docs/ApiGroupedBarchartWidget.md) - - [ApiMultiMetricColumn](docs/ApiMultiMetricColumn.md) - - [ApiMultiMetricColumnData](docs/ApiMultiMetricColumnData.md) - - [ApiMultiMetricTableWidget](docs/ApiMultiMetricTableWidget.md) - - [ApiMultiSearchFilterApiTestTableFilterKey](docs/ApiMultiSearchFilterApiTestTableFilterKey.md) - - [ApiNumbersCard](docs/ApiNumbersCard.md) - - [ApiNumbersCardAllOfFixedTimespan](docs/ApiNumbersCardAllOfFixedTimespan.md) - - [ApiNumbersCardData](docs/ApiNumbersCardData.md) - - [ApiNumbersCardWidget](docs/ApiNumbersCardWidget.md) - - [ApiPieChartWidget](docs/ApiPieChartWidget.md) - - [ApiReportDataComponentLabelMap](docs/ApiReportDataComponentLabelMap.md) - - [ApiReportDataComponentLabelMapEntry](docs/ApiReportDataComponentLabelMapEntry.md) - - [ApiReportSnapshotTimeSpan](docs/ApiReportSnapshotTimeSpan.md) - - [ApiStackedAreaChartWidget](docs/ApiStackedAreaChartWidget.md) - - [ApiStackedBarchartWidget](docs/ApiStackedBarchartWidget.md) - - [ApiTableWidget](docs/ApiTableWidget.md) - - [ApiTestTableData](docs/ApiTestTableData.md) - - [ApiTestTableGraphletsData](docs/ApiTestTableGraphletsData.md) - - [ApiTestTableWidget](docs/ApiTestTableWidget.md) - - [ApiTimeseriesWidget](docs/ApiTimeseriesWidget.md) - - [ApiWidget](docs/ApiWidget.md) - - [ApiWidgetDataPoint](docs/ApiWidgetDataPoint.md) - - [ApiWidgetDataResponse](docs/ApiWidgetDataResponse.md) - - [ApiWidgetFilterApiTestTableFilterKey](docs/ApiWidgetFilterApiTestTableFilterKey.md) - - [ApiWidgetFixedYScalePrefix](docs/ApiWidgetFixedYScalePrefix.md) - - [ApiWidgetMeasure](docs/ApiWidgetMeasure.md) - - [ApiWidgetsDataV2](docs/ApiWidgetsDataV2.md) - - [AswRepeat](docs/AswRepeat.md) - - [AswRepeatUnit](docs/AswRepeatUnit.md) - - [BoxAndWhiskersDatasource](docs/BoxAndWhiskersDatasource.md) - - [ColorGridDatasource](docs/ColorGridDatasource.md) - - [DashboardLinks](docs/DashboardLinks.md) - - [DashboardLinksLinks](docs/DashboardLinksLinks.md) - - [DashboardMetric](docs/DashboardMetric.md) - - [DashboardMetricDirection](docs/DashboardMetricDirection.md) - - [DashboardOrder](docs/DashboardOrder.md) - - [DashboardSnapshotLinks](docs/DashboardSnapshotLinks.md) - - [DashboardSnapshotLinksLinks](docs/DashboardSnapshotLinksLinks.md) - - [DashboardSnapshots200Response](docs/DashboardSnapshots200Response.md) - - [DashboardSnapshotsPage](docs/DashboardSnapshotsPage.md) - - [DurationUnit](docs/DurationUnit.md) - - [EnterpriseAgentState](docs/EnterpriseAgentState.md) - - [Error](docs/Error.md) - - [GenerateDashboardSnapshotRequest](docs/GenerateDashboardSnapshotRequest.md) - - [GeoMapDatasource](docs/GeoMapDatasource.md) - - [GetDashboardData200Response](docs/GetDashboardData200Response.md) - - [GroupedBarChartDatasource](docs/GroupedBarChartDatasource.md) - - [Link](docs/Link.md) - - [MetricGroup](docs/MetricGroup.md) - - [MultiMetricsTableDatasource](docs/MultiMetricsTableDatasource.md) - - [NumbersCardDatasource](docs/NumbersCardDatasource.md) - - [PaginationLinks](docs/PaginationLinks.md) - - [PaginationLinksLinks](docs/PaginationLinksLinks.md) - - [PieChartDatasource](docs/PieChartDatasource.md) - - [QueryWindow](docs/QueryWindow.md) - - [ScalableWidget](docs/ScalableWidget.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SnapshotDataByWidget200Response](docs/SnapshotDataByWidget200Response.md) - - [StackedAreaChartDatasource](docs/StackedAreaChartDatasource.md) - - [StackedBarChartDatasource](docs/StackedBarChartDatasource.md) - - [TableDatasource](docs/TableDatasource.md) - - [TestTableDatasource](docs/TestTableDatasource.md) - - [TestTableFilterKey](docs/TestTableFilterKey.md) - - [TestTableFilterType](docs/TestTableFilterType.md) - - [TimeseriesDatasource](docs/TimeseriesDatasource.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UpdateSnapshotExpirationDateApiRequest](docs/UpdateSnapshotExpirationDateApiRequest.md) - - [VisualMode](docs/VisualMode.md) - - [Widget](docs/Widget.md) - - [WidgetMeasureType](docs/WidgetMeasureType.md) - - [WidgetSortDirection](docs/WidgetSortDirection.md) - - [WidgetSortProperty](docs/WidgetSortProperty.md) - - [WidgetType](docs/WidgetType.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/dashboards_api/dashboards_api/__init__.py b/dashboards_api/dashboards_api/__init__.py deleted file mode 100644 index 967e4fa3..00000000 --- a/dashboards_api/dashboards_api/__init__.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 dashboards_api.api.dashboard_snapshots_api import DashboardSnapshotsApi -from dashboards_api.api.dashboards_api import DashboardsApi - -# import ApiClient -from dashboards_api.api_response import ApiResponse -from dashboards_api.api_client import ApiClient -from dashboards_api.configuration import Configuration -from dashboards_api.exceptions import OpenApiException -from dashboards_api.exceptions import ApiTypeError -from dashboards_api.exceptions import ApiValueError -from dashboards_api.exceptions import ApiKeyError -from dashboards_api.exceptions import ApiAttributeError -from dashboards_api.exceptions import ApiException - -# import models into sdk package -from dashboards_api.models.agent_status_datasource import AgentStatusDatasource -from dashboards_api.models.agent_widget_show import AgentWidgetShow -from dashboards_api.models.agent_widget_type import AgentWidgetType -from dashboards_api.models.alert_list_datasource import AlertListDatasource -from dashboards_api.models.api_agent_location import ApiAgentLocation -from dashboards_api.models.api_agent_status_agent import ApiAgentStatusAgent -from dashboards_api.models.api_agent_status_ip_info import ApiAgentStatusIpInfo -from dashboards_api.models.api_agent_status_summary import ApiAgentStatusSummary -from dashboards_api.models.api_agent_status_widget import ApiAgentStatusWidget -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_alert_list_alert import ApiAlertListAlert -from dashboards_api.models.api_alert_list_alert_type import ApiAlertListAlertType -from dashboards_api.models.api_alert_list_widget import ApiAlertListWidget -from dashboards_api.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin -from dashboards_api.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget -from dashboards_api.models.api_color_grid_widget import ApiColorGridWidget -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -from dashboards_api.models.api_dashboard_snapshot_all_of_dashboard import ApiDashboardSnapshotAllOfDashboard -from dashboards_api.models.api_data_point_group import ApiDataPointGroup -from dashboards_api.models.api_default_timespan import ApiDefaultTimespan -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_geo_map_widget import ApiGeoMapWidget -from dashboards_api.models.api_graphlet_point import ApiGraphletPoint -from dashboards_api.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget -from dashboards_api.models.api_multi_metric_column import ApiMultiMetricColumn -from dashboards_api.models.api_multi_metric_column_data import ApiMultiMetricColumnData -from dashboards_api.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget -from dashboards_api.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey -from dashboards_api.models.api_numbers_card import ApiNumbersCard -from dashboards_api.models.api_numbers_card_all_of_fixed_timespan import ApiNumbersCardAllOfFixedTimespan -from dashboards_api.models.api_numbers_card_data import ApiNumbersCardData -from dashboards_api.models.api_numbers_card_widget import ApiNumbersCardWidget -from dashboards_api.models.api_pie_chart_widget import ApiPieChartWidget -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap -from dashboards_api.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry -from dashboards_api.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan -from dashboards_api.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget -from dashboards_api.models.api_stacked_barchart_widget import ApiStackedBarchartWidget -from dashboards_api.models.api_table_widget import ApiTableWidget -from dashboards_api.models.api_test_table_data import ApiTestTableData -from dashboards_api.models.api_test_table_graphlets_data import ApiTestTableGraphletsData -from dashboards_api.models.api_test_table_widget import ApiTestTableWidget -from dashboards_api.models.api_timeseries_widget import ApiTimeseriesWidget -from dashboards_api.models.api_widget import ApiWidget -from dashboards_api.models.api_widget_data_point import ApiWidgetDataPoint -from dashboards_api.models.api_widget_data_response import ApiWidgetDataResponse -from dashboards_api.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 -from dashboards_api.models.asw_repeat import AswRepeat -from dashboards_api.models.asw_repeat_unit import AswRepeatUnit -from dashboards_api.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource -from dashboards_api.models.color_grid_datasource import ColorGridDatasource -from dashboards_api.models.dashboard_links import DashboardLinks -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.dashboard_order import DashboardOrder -from dashboards_api.models.dashboard_snapshot_links import DashboardSnapshotLinks -from dashboards_api.models.dashboard_snapshot_links_links import DashboardSnapshotLinksLinks -from dashboards_api.models.dashboard_snapshots200_response import DashboardSnapshots200Response -from dashboards_api.models.dashboard_snapshots_page import DashboardSnapshotsPage -from dashboards_api.models.duration_unit import DurationUnit -from dashboards_api.models.enterprise_agent_state import EnterpriseAgentState -from dashboards_api.models.error import Error -from dashboards_api.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest -from dashboards_api.models.geo_map_datasource import GeoMapDatasource -from dashboards_api.models.get_dashboard_data200_response import GetDashboardData200Response -from dashboards_api.models.grouped_bar_chart_datasource import GroupedBarChartDatasource -from dashboards_api.models.link import Link -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.multi_metrics_table_datasource import MultiMetricsTableDatasource -from dashboards_api.models.numbers_card_datasource import NumbersCardDatasource -from dashboards_api.models.pagination_links import PaginationLinks -from dashboards_api.models.pagination_links_links import PaginationLinksLinks -from dashboards_api.models.pie_chart_datasource import PieChartDatasource -from dashboards_api.models.query_window import QueryWindow -from dashboards_api.models.scalable_widget import ScalableWidget -from dashboards_api.models.self_links import SelfLinks -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response -from dashboards_api.models.stacked_area_chart_datasource import StackedAreaChartDatasource -from dashboards_api.models.stacked_bar_chart_datasource import StackedBarChartDatasource -from dashboards_api.models.table_datasource import TableDatasource -from dashboards_api.models.test_table_datasource import TestTableDatasource -from dashboards_api.models.test_table_filter_key import TestTableFilterKey -from dashboards_api.models.test_table_filter_type import TestTableFilterType -from dashboards_api.models.timeseries_datasource import TimeseriesDatasource -from dashboards_api.models.unauthorized_error import UnauthorizedError -from dashboards_api.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget import Widget -from dashboards_api.models.widget_measure_type import WidgetMeasureType -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType diff --git a/dashboards_api/dashboards_api/api/__init__.py b/dashboards_api/dashboards_api/api/__init__.py deleted file mode 100644 index a1304364..00000000 --- a/dashboards_api/dashboards_api/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# flake8: noqa - -# import apis into api package -from dashboards_api.api.dashboard_snapshots_api import DashboardSnapshotsApi -from dashboards_api.api.dashboards_api import DashboardsApi - diff --git a/dashboards_api/dashboards_api/api_client.py b/dashboards_api/dashboards_api/api_client.py deleted file mode 100644 index 5651b7d3..00000000 --- a/dashboards_api/dashboards_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from dashboards_api.configuration import Configuration -from dashboards_api.api_response import ApiResponse -import dashboards_api.models -from dashboards_api import rest -from dashboards_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(dashboards_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/dashboards_api/dashboards_api/api_response.py b/dashboards_api/dashboards_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/dashboards_api/dashboards_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/dashboards_api/dashboards_api/configuration.py b/dashboards_api/dashboards_api/configuration.py deleted file mode 100644 index db3f594a..00000000 --- a/dashboards_api/dashboards_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("dashboards_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/dashboards_api/dashboards_api/exceptions.py b/dashboards_api/dashboards_api/exceptions.py deleted file mode 100644 index 35a18e29..00000000 --- a/dashboards_api/dashboards_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/dashboards_api/dashboards_api/models/__init__.py b/dashboards_api/dashboards_api/models/__init__.py deleted file mode 100644 index acca9f38..00000000 --- a/dashboards_api/dashboards_api/models/__init__.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from dashboards_api.models.agent_status_datasource import AgentStatusDatasource -from dashboards_api.models.agent_widget_show import AgentWidgetShow -from dashboards_api.models.agent_widget_type import AgentWidgetType -from dashboards_api.models.alert_list_datasource import AlertListDatasource -from dashboards_api.models.api_agent_location import ApiAgentLocation -from dashboards_api.models.api_agent_status_agent import ApiAgentStatusAgent -from dashboards_api.models.api_agent_status_ip_info import ApiAgentStatusIpInfo -from dashboards_api.models.api_agent_status_summary import ApiAgentStatusSummary -from dashboards_api.models.api_agent_status_widget import ApiAgentStatusWidget -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_alert_list_alert import ApiAlertListAlert -from dashboards_api.models.api_alert_list_alert_type import ApiAlertListAlertType -from dashboards_api.models.api_alert_list_widget import ApiAlertListWidget -from dashboards_api.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin -from dashboards_api.models.api_box_and_whiskers_widget import ApiBoxAndWhiskersWidget -from dashboards_api.models.api_color_grid_widget import ApiColorGridWidget -from dashboards_api.models.api_dashboard import ApiDashboard -from dashboards_api.models.api_dashboard_asw import ApiDashboardAsw -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -from dashboards_api.models.api_dashboard_snapshot_all_of_dashboard import ApiDashboardSnapshotAllOfDashboard -from dashboards_api.models.api_data_point_group import ApiDataPointGroup -from dashboards_api.models.api_default_timespan import ApiDefaultTimespan -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_geo_map_widget import ApiGeoMapWidget -from dashboards_api.models.api_graphlet_point import ApiGraphletPoint -from dashboards_api.models.api_grouped_barchart_widget import ApiGroupedBarchartWidget -from dashboards_api.models.api_multi_metric_column import ApiMultiMetricColumn -from dashboards_api.models.api_multi_metric_column_data import ApiMultiMetricColumnData -from dashboards_api.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget -from dashboards_api.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey -from dashboards_api.models.api_numbers_card import ApiNumbersCard -from dashboards_api.models.api_numbers_card_all_of_fixed_timespan import ApiNumbersCardAllOfFixedTimespan -from dashboards_api.models.api_numbers_card_data import ApiNumbersCardData -from dashboards_api.models.api_numbers_card_widget import ApiNumbersCardWidget -from dashboards_api.models.api_pie_chart_widget import ApiPieChartWidget -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap -from dashboards_api.models.api_report_data_component_label_map_entry import ApiReportDataComponentLabelMapEntry -from dashboards_api.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan -from dashboards_api.models.api_stacked_area_chart_widget import ApiStackedAreaChartWidget -from dashboards_api.models.api_stacked_barchart_widget import ApiStackedBarchartWidget -from dashboards_api.models.api_table_widget import ApiTableWidget -from dashboards_api.models.api_test_table_data import ApiTestTableData -from dashboards_api.models.api_test_table_graphlets_data import ApiTestTableGraphletsData -from dashboards_api.models.api_test_table_widget import ApiTestTableWidget -from dashboards_api.models.api_timeseries_widget import ApiTimeseriesWidget -from dashboards_api.models.api_widget import ApiWidget -from dashboards_api.models.api_widget_data_point import ApiWidgetDataPoint -from dashboards_api.models.api_widget_data_response import ApiWidgetDataResponse -from dashboards_api.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 -from dashboards_api.models.asw_repeat import AswRepeat -from dashboards_api.models.asw_repeat_unit import AswRepeatUnit -from dashboards_api.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource -from dashboards_api.models.color_grid_datasource import ColorGridDatasource -from dashboards_api.models.dashboard_links import DashboardLinks -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.dashboard_order import DashboardOrder -from dashboards_api.models.dashboard_snapshot_links import DashboardSnapshotLinks -from dashboards_api.models.dashboard_snapshot_links_links import DashboardSnapshotLinksLinks -from dashboards_api.models.dashboard_snapshots200_response import DashboardSnapshots200Response -from dashboards_api.models.dashboard_snapshots_page import DashboardSnapshotsPage -from dashboards_api.models.duration_unit import DurationUnit -from dashboards_api.models.enterprise_agent_state import EnterpriseAgentState -from dashboards_api.models.error import Error -from dashboards_api.models.generate_dashboard_snapshot_request import GenerateDashboardSnapshotRequest -from dashboards_api.models.geo_map_datasource import GeoMapDatasource -from dashboards_api.models.get_dashboard_data200_response import GetDashboardData200Response -from dashboards_api.models.grouped_bar_chart_datasource import GroupedBarChartDatasource -from dashboards_api.models.link import Link -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.multi_metrics_table_datasource import MultiMetricsTableDatasource -from dashboards_api.models.numbers_card_datasource import NumbersCardDatasource -from dashboards_api.models.pagination_links import PaginationLinks -from dashboards_api.models.pagination_links_links import PaginationLinksLinks -from dashboards_api.models.pie_chart_datasource import PieChartDatasource -from dashboards_api.models.query_window import QueryWindow -from dashboards_api.models.scalable_widget import ScalableWidget -from dashboards_api.models.self_links import SelfLinks -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response -from dashboards_api.models.stacked_area_chart_datasource import StackedAreaChartDatasource -from dashboards_api.models.stacked_bar_chart_datasource import StackedBarChartDatasource -from dashboards_api.models.table_datasource import TableDatasource -from dashboards_api.models.test_table_datasource import TestTableDatasource -from dashboards_api.models.test_table_filter_key import TestTableFilterKey -from dashboards_api.models.test_table_filter_type import TestTableFilterType -from dashboards_api.models.timeseries_datasource import TimeseriesDatasource -from dashboards_api.models.unauthorized_error import UnauthorizedError -from dashboards_api.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget import Widget -from dashboards_api.models.widget_measure_type import WidgetMeasureType -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType diff --git a/dashboards_api/dashboards_api/models/agent_widget_show.py b/dashboards_api/dashboards_api/models/agent_widget_show.py deleted file mode 100644 index 9335221b..00000000 --- a/dashboards_api/dashboards_api/models/agent_widget_show.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentWidgetShow(str, Enum): - """ - Ownership of the agent. - """ - - """ - allowed enum values - """ - OWNED = 'owned' - ALL = 'all' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentWidgetShow from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/agent_widget_type.py b/dashboards_api/dashboards_api/models/agent_widget_type.py deleted file mode 100644 index f5593dd6..00000000 --- a/dashboards_api/dashboards_api/models/agent_widget_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentWidgetType(str, Enum): - """ - Type of the agent. - """ - - """ - allowed enum values - """ - ENTERPRISE = 'enterprise' - ENDPOINT = 'endpoint' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentWidgetType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/api_agent_status_agent.py b/dashboards_api/dashboards_api/models/api_agent_status_agent.py deleted file mode 100644 index 0fa61802..00000000 --- a/dashboards_api/dashboards_api/models/api_agent_status_agent.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from dashboards_api.models.api_agent_location import ApiAgentLocation -from dashboards_api.models.api_agent_status_ip_info import ApiAgentStatusIpInfo -from dashboards_api.models.enterprise_agent_state import EnterpriseAgentState -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiAgentStatusAgent(BaseModel): - """ - Agent shown in agent status widget. - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Identifier of the agent.", alias="agentId") - status: Optional[EnterpriseAgentState] = None - ip_info: Optional[ApiAgentStatusIpInfo] = Field(default=None, alias="ipInfo") - agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent", alias="agentName") - location: Optional[ApiAgentLocation] = None - __properties: ClassVar[List[str]] = ["agentId", "status", "ipInfo", "agentName", "location"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAgentStatusAgent 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of ip_info - if self.ip_info: - _dict['ipInfo'] = self.ip_info.to_dict() - # override the default output from pydantic by calling `to_dict()` of location - if self.location: - _dict['location'] = self.location.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiAgentStatusAgent from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "status": obj.get("status"), - "ipInfo": ApiAgentStatusIpInfo.from_dict(obj.get("ipInfo")) if obj.get("ipInfo") is not None else None, - "agentName": obj.get("agentName"), - "location": ApiAgentLocation.from_dict(obj.get("location")) if obj.get("location") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_agent_status_widget.py b/dashboards_api/dashboards_api/models/api_agent_status_widget.py deleted file mode 100644 index 0016c5c9..00000000 --- a/dashboards_api/dashboards_api/models/api_agent_status_widget.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.agent_status_datasource import AgentStatusDatasource -from dashboards_api.models.agent_widget_show import AgentWidgetShow -from dashboards_api.models.agent_widget_type import AgentWidgetType -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiAgentStatusWidget(BaseModel): - """ - ApiAgentStatusWidget - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - agents: Optional[AgentWidgetType] = None - show: Optional[AgentWidgetShow] = None - data_source: Optional[AgentStatusDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "agents", "show", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAgentStatusWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiAgentStatusWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agents": obj.get("agents"), - "show": obj.get("show"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_alert_list_alert_type.py b/dashboards_api/dashboards_api/models/api_alert_list_alert_type.py deleted file mode 100644 index bebb36c1..00000000 --- a/dashboards_api/dashboards_api/models/api_alert_list_alert_type.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class ApiAlertListAlertType(str, Enum): - """ - Name of the alert type - """ - - """ - allowed enum values - """ - NETWORK_MINUS__END_MINUS_TO_MINUS_END_LEFT_PARENTHESIS_SERVER_RIGHT_PARENTHESIS = 'Network - End-to-End (Server)' - NETWORK_MINUS_END_MINUS_TO_MINUS_END_MINUS_SERVER = 'network-end-to-end-server' - NETWORK_MINUS__END_MINUS_TO_MINUS_END_LEFT_PARENTHESIS_AGENT_RIGHT_PARENTHESIS = 'Network - End-to-End (Agent)' - NETWORK_MINUS_END_MINUS_TO_MINUS_END_MINUS_AGENT = 'network-end-to-end-agent' - NETWORK_MINUS__PATH_TRACE = 'Network - Path Trace' - NETWORK_MINUS_PATH_MINUS_TRACE = 'network-path-trace' - DNS_SERVER = 'DNS Server' - DNS_MINUS_SERVER = 'dns-server' - DNS_TRACE = 'DNS Trace' - DNS_MINUS_TRACE = 'dns-trace' - DNSSEC = 'DNSSEC' - DNSSEC = 'dnssec' - DNS_PLUS__DOMAIN = 'DNS+ Domain' - DNS_MINUS_PLUS_MINUS_DOMAIN = 'dns-plus-domain' - DNS_PLUS__SERVER = 'DNS+ Server' - DNS_MINUS_PLUS_MINUS_SERVER = 'dns-plus-server' - WEB_MINUS__HTTP_SERVER = 'Web - HTTP Server' - WEB_MINUS_HTTP_MINUS_SERVER = 'web-http-server' - WEB_MINUS__PAGE_LOAD = 'Web - Page Load' - WEB_MINUS_PAGE_MINUS_LOAD = 'web-page-load' - WEB_MINUS__TRANSACTION_LEFT_PARENTHESIS_CLASSIC_RIGHT_PARENTHESIS = 'Web - Transaction (Classic)' - WEB_MINUS_TRANSACTION_MINUS_CLASSIC = 'web-transaction-classic' - WEB_MINUS__TRANSACTION = 'Web - Transaction' - WEB_MINUS_TRANSACTION = 'web-transaction' - WEB_MINUS__FTP_SERVER = 'Web - FTP Server' - WEB_MINUS_FTP_MINUS_SERVER = 'web-ftp-server' - VOICE_MINUS__SIP_SERVER = 'Voice - SIP Server' - VOICE_MINUS_SIP_MINUS_SERVER = 'voice-sip-server' - VOICE_MINUS__RTP_STREAM = 'Voice - RTP Stream' - VOICE_MINUS_RTP_MINUS_STREAM = 'voice-rtp-stream' - DEVICE = 'Device' - DEVICE = 'device' - DEVICE_INTERFACE = 'Device Interface' - DEVICE_MINUS_INTERFACE = 'device-interface' - ENDPOINT_MINUS__END_MINUS_TO_MINUS_END_LEFT_PARENTHESIS_SERVER_RIGHT_PARENTHESIS = 'Endpoint - End-to-End (Server)' - ENDPOINT_MINUS_END_MINUS_TO_MINUS_END_MINUS_SERVER = 'endpoint-end-to-end-server' - ENDPOINT_WEB_MINUS__HTTP_SERVER = 'EndpointWeb - HTTP Server' - ENDPOINT_MINUS_WEB_MINUS_HTTP_MINUS_SERVER = 'endpoint-web-http-server' - ENDPOINT_MINUS__PATH_TRACE = 'Endpoint - Path Trace' - ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' - BROWSER_SESSIONS_MINUS__AGENT = 'Browser Sessions - Agent' - BROWSER_MINUS_SESSION_MINUS_AGENT = 'browser-session-agent' - BROWSER_SESSIONS_MINUS__APPLICATION = 'Browser Sessions - Application' - BROWSER_MINUS_SESSION_MINUS_APPLICATION = 'browser-session-application' - ROUTING_MINUS__BGP = 'Routing - BGP' - ROUTING_MINUS_BGP = 'routing-bgp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAlertListAlertType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/api_alert_list_widget.py b/dashboards_api/dashboards_api/models/api_alert_list_widget.py deleted file mode 100644 index 78af362a..00000000 --- a/dashboards_api/dashboards_api/models/api_alert_list_widget.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.alert_list_datasource import AlertListDatasource -from dashboards_api.models.api_alert_list_alert_type import ApiAlertListAlertType -from dashboards_api.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiAlertListWidget(BaseModel): - """ - ApiAlertListWidget - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - alert_types: Optional[List[ApiAlertListAlertType]] = Field(default=None, description="List of alert types configured in the widget, an empty list means all alert types.", alias="alertTypes") - limit_to: Optional[StrictInt] = Field(default=None, description="Limit the number of alerts displayed in the widget.", alias="limitTo") - active_within: Optional[ApiAlertListWidgetAllOfActiveWithin] = Field(default=None, alias="activeWithin") - data_source: Optional[AlertListDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "alertTypes", "limitTo", "activeWithin", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAlertListWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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 active_within - if self.active_within: - _dict['activeWithin'] = self.active_within.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiAlertListWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "alertTypes": obj.get("alertTypes"), - "limitTo": obj.get("limitTo"), - "activeWithin": ApiAlertListWidgetAllOfActiveWithin.from_dict(obj.get("activeWithin")) if obj.get("activeWithin") is not None else None, - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_box_and_whiskers_widget.py b/dashboards_api/dashboards_api/models/api_box_and_whiskers_widget.py deleted file mode 100644 index 24c2076b..00000000 --- a/dashboards_api/dashboards_api/models/api_box_and_whiskers_widget.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiBoxAndWhiskersWidget(BaseModel): - """ - A widget that displays a box and whisker plot, mapping data points over time with key statistics: median, range, and quartiles. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") - max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") - unit: Optional[ApiWidgetFixedYScalePrefix] = None - group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") - data_source: Optional[BoxAndWhiskersDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "groupBy", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiBoxAndWhiskersWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiBoxAndWhiskersWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "minScale": obj.get("minScale"), - "maxScale": obj.get("maxScale"), - "unit": obj.get("unit"), - "groupBy": obj.get("groupBy"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_color_grid_widget.py b/dashboards_api/dashboards_api/models/api_color_grid_widget.py deleted file mode 100644 index 94cdbb1f..00000000 --- a/dashboards_api/dashboards_api/models/api_color_grid_widget.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.color_grid_datasource import ColorGridDatasource -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiColorGridWidget(BaseModel): - """ - The Color Grid widget displays colored cards arranged in rows and columns. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") - max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") - unit: Optional[ApiWidgetFixedYScalePrefix] = None - cards: Optional[ApiAggregateProperty] = None - group_cards_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupCardsBy") - columns: Optional[StrictInt] = Field(default=None, description="Number of columns: 1 or 2.") - limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") - sort_by: Optional[WidgetSortProperty] = Field(default=None, alias="sortBy") - sort_direction: Optional[WidgetSortDirection] = Field(default=None, alias="sortDirection") - data_source: Optional[ColorGridDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "cards", "groupCardsBy", "columns", "limit", "sortBy", "sortDirection", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiColorGridWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiColorGridWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "minScale": obj.get("minScale"), - "maxScale": obj.get("maxScale"), - "unit": obj.get("unit"), - "cards": obj.get("cards"), - "groupCardsBy": obj.get("groupCardsBy"), - "columns": obj.get("columns"), - "limit": obj.get("limit"), - "sortBy": obj.get("sortBy"), - "sortDirection": obj.get("sortDirection"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_dashboard.py b/dashboards_api/dashboards_api/models/api_dashboard.py deleted file mode 100644 index b0e02380..00000000 --- a/dashboards_api/dashboards_api/models/api_dashboard.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_default_timespan import ApiDefaultTimespan -from dashboards_api.models.api_widget import ApiWidget -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiDashboard(BaseModel): - """ - ApiDashboard - """ # noqa: E501 - links: Optional[DashboardLinksLinks] = Field(default=None, alias="_links") - dashboard_id: Optional[StrictStr] = Field(default=None, description="Identifier of a dashboard.", alias="dashboardId") - title: Optional[StrictStr] = Field(default=None, description="Title of a dashboard.") - is_built_in: Optional[StrictBool] = Field(default=None, description="Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards.", alias="isBuiltIn") - aid: Optional[StrictStr] = Field(default=None, description="Identifier for the account group associated with a dashboard.") - dashboard_created_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that created a dashboard.", alias="dashboardCreatedBy") - dashboard_modified_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that last modified a dashboard.", alias="dashboardModifiedBy") - dashboard_modified_date: Optional[datetime] = Field(default=None, description="UTC date/time when a dashboard was last modified (ISO date-time format).", alias="dashboardModifiedDate") - is_private: Optional[StrictBool] = Field(default=None, description="A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it.", alias="isPrivate") - is_default_for_user: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the user's default. True for default, false if not.", alias="isDefaultForUser") - is_default_for_account: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the account group's default. True for default, false if not.", alias="isDefaultForAccount") - widgets: Optional[List[ApiWidget]] = None - description: Optional[StrictStr] = Field(default=None, description="A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard.") - default_timespan: Optional[ApiDefaultTimespan] = Field(default=None, alias="defaultTimespan") - is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride") - is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport") - __properties: ClassVar[List[str]] = ["_links", "dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiDashboard 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "dashboard_id", - "is_built_in", - "aid", - "dashboard_created_by", - "dashboard_modified_by", - "dashboard_modified_date", - "is_default_for_user", - "is_default_for_account", - "is_migrated_report", - }, - exclude_none=True, - ) - # 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 widgets (list) - _items = [] - if self.widgets: - for _item in self.widgets: - if _item: - _items.append(_item.to_dict()) - _dict['widgets'] = _items - # override the default output from pydantic by calling `to_dict()` of default_timespan - if self.default_timespan: - _dict['defaultTimespan'] = self.default_timespan.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiDashboard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DashboardLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "dashboardId": obj.get("dashboardId"), - "title": obj.get("title"), - "isBuiltIn": obj.get("isBuiltIn"), - "aid": obj.get("aid"), - "dashboardCreatedBy": obj.get("dashboardCreatedBy"), - "dashboardModifiedBy": obj.get("dashboardModifiedBy"), - "dashboardModifiedDate": obj.get("dashboardModifiedDate"), - "isPrivate": obj.get("isPrivate"), - "isDefaultForUser": obj.get("isDefaultForUser"), - "isDefaultForAccount": obj.get("isDefaultForAccount"), - "widgets": [ApiWidget.from_dict(_item) for _item in obj.get("widgets")] if obj.get("widgets") is not None else None, - "description": obj.get("description"), - "defaultTimespan": ApiDefaultTimespan.from_dict(obj.get("defaultTimespan")) if obj.get("defaultTimespan") is not None else None, - "isGlobalOverride": obj.get("isGlobalOverride"), - "isMigratedReport": obj.get("isMigratedReport") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_dashboard_snapshot.py b/dashboards_api/dashboards_api/models/api_dashboard_snapshot.py deleted file mode 100644 index 7bb235e0..00000000 --- a/dashboards_api/dashboards_api/models/api_dashboard_snapshot.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_dashboard_snapshot_all_of_dashboard import ApiDashboardSnapshotAllOfDashboard -from dashboards_api.models.api_report_snapshot_time_span import ApiReportSnapshotTimeSpan -from dashboards_api.models.api_widget import ApiWidget -from dashboards_api.models.dashboard_snapshot_links_links import DashboardSnapshotLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiDashboardSnapshot(BaseModel): - """ - ApiDashboardSnapshot - """ # noqa: E501 - links: Optional[DashboardSnapshotLinksLinks] = Field(default=None, alias="_links") - snapshot_id: Optional[StrictStr] = Field(default=None, description="Identifier of the dashboard snapshot.", alias="snapshotId") - snapshot_name: Optional[StrictStr] = Field(default=None, description="Name of the dashboard snapshot.", alias="snapshotName") - aid: Optional[StrictStr] = Field(default=None, description="Identifier of the account group that the snapshot belongs to.") - is_shared: Optional[StrictBool] = Field(default=None, description="Set `true` if dashboard snapshot is shared, `false` otherwise.", alias="isShared") - snapshot_created_date: Optional[datetime] = Field(default=None, description="UTC date when dashboard snapshot was created (ISO date-time format).", alias="snapshotCreatedDate") - dashboard: Optional[ApiDashboardSnapshotAllOfDashboard] = None - widgets: Optional[List[ApiWidget]] = None - is_scheduled: Optional[StrictBool] = Field(default=None, description="Set `true` if dashboard snapshot was generated from a schedule, `false` otherwise.", alias="isScheduled") - time_span: Optional[ApiReportSnapshotTimeSpan] = Field(default=None, alias="timeSpan") - snapshot_expiration_date: Optional[datetime] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format.", alias="snapshotExpirationDate") - __properties: ClassVar[List[str]] = ["_links", "snapshotId", "snapshotName", "aid", "isShared", "snapshotCreatedDate", "dashboard", "widgets", "isScheduled", "timeSpan", "snapshotExpirationDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiDashboardSnapshot 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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 dashboard - if self.dashboard: - _dict['dashboard'] = self.dashboard.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in widgets (list) - _items = [] - if self.widgets: - for _item in self.widgets: - if _item: - _items.append(_item.to_dict()) - _dict['widgets'] = _items - # override the default output from pydantic by calling `to_dict()` of time_span - if self.time_span: - _dict['timeSpan'] = self.time_span.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiDashboardSnapshot from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DashboardSnapshotLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "snapshotId": obj.get("snapshotId"), - "snapshotName": obj.get("snapshotName"), - "aid": obj.get("aid"), - "isShared": obj.get("isShared"), - "snapshotCreatedDate": obj.get("snapshotCreatedDate"), - "dashboard": ApiDashboardSnapshotAllOfDashboard.from_dict(obj.get("dashboard")) if obj.get("dashboard") is not None else None, - "widgets": [ApiWidget.from_dict(_item) for _item in obj.get("widgets")] if obj.get("widgets") is not None else None, - "isScheduled": obj.get("isScheduled"), - "timeSpan": ApiReportSnapshotTimeSpan.from_dict(obj.get("timeSpan")) if obj.get("timeSpan") is not None else None, - "snapshotExpirationDate": obj.get("snapshotExpirationDate") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_dashboard_snapshot_all_of_dashboard.py b/dashboards_api/dashboards_api/models/api_dashboard_snapshot_all_of_dashboard.py deleted file mode 100644 index 1d8af97c..00000000 --- a/dashboards_api/dashboards_api/models/api_dashboard_snapshot_all_of_dashboard.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_default_timespan import ApiDefaultTimespan -from dashboards_api.models.api_widget import ApiWidget -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiDashboardSnapshotAllOfDashboard(BaseModel): - """ - ApiDashboardSnapshotAllOfDashboard - """ # noqa: E501 - dashboard_id: Optional[StrictStr] = Field(default=None, description="Identifier of a dashboard.", alias="dashboardId") - title: Optional[StrictStr] = Field(default=None, description="Title of a dashboard.") - is_built_in: Optional[StrictBool] = Field(default=None, description="Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards.", alias="isBuiltIn") - aid: Optional[StrictStr] = Field(default=None, description="Identifier for the account group associated with a dashboard.") - dashboard_created_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that created a dashboard.", alias="dashboardCreatedBy") - dashboard_modified_by: Optional[StrictStr] = Field(default=None, description="Identifier for the user that last modified a dashboard.", alias="dashboardModifiedBy") - dashboard_modified_date: Optional[datetime] = Field(default=None, description="UTC date/time when a dashboard was last modified (ISO date-time format).", alias="dashboardModifiedDate") - is_private: Optional[StrictBool] = Field(default=None, description="A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it.", alias="isPrivate") - is_default_for_user: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the user's default. True for default, false if not.", alias="isDefaultForUser") - is_default_for_account: Optional[StrictBool] = Field(default=None, description="Indicates whether this dashboard is the account group's default. True for default, false if not.", alias="isDefaultForAccount") - widgets: Optional[List[ApiWidget]] = None - description: Optional[StrictStr] = Field(default=None, description="A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard.") - default_timespan: Optional[ApiDefaultTimespan] = Field(default=None, alias="defaultTimespan") - is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride") - is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport") - links: Optional[DashboardLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiDashboardSnapshotAllOfDashboard 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "dashboard_id", - "is_built_in", - "aid", - "dashboard_created_by", - "dashboard_modified_by", - "dashboard_modified_date", - "is_default_for_user", - "is_default_for_account", - "is_migrated_report", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in widgets (list) - _items = [] - if self.widgets: - for _item in self.widgets: - if _item: - _items.append(_item.to_dict()) - _dict['widgets'] = _items - # override the default output from pydantic by calling `to_dict()` of default_timespan - if self.default_timespan: - _dict['defaultTimespan'] = self.default_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiDashboardSnapshotAllOfDashboard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dashboardId": obj.get("dashboardId"), - "title": obj.get("title"), - "isBuiltIn": obj.get("isBuiltIn"), - "aid": obj.get("aid"), - "dashboardCreatedBy": obj.get("dashboardCreatedBy"), - "dashboardModifiedBy": obj.get("dashboardModifiedBy"), - "dashboardModifiedDate": obj.get("dashboardModifiedDate"), - "isPrivate": obj.get("isPrivate"), - "isDefaultForUser": obj.get("isDefaultForUser"), - "isDefaultForAccount": obj.get("isDefaultForAccount"), - "widgets": [ApiWidget.from_dict(_item) for _item in obj.get("widgets")] if obj.get("widgets") is not None else None, - "description": obj.get("description"), - "defaultTimespan": ApiDefaultTimespan.from_dict(obj.get("defaultTimespan")) if obj.get("defaultTimespan") is not None else None, - "isGlobalOverride": obj.get("isGlobalOverride"), - "isMigratedReport": obj.get("isMigratedReport"), - "_links": DashboardLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_duration.py b/dashboards_api/dashboards_api/models/api_duration.py deleted file mode 100644 index 1b1f5634..00000000 --- a/dashboards_api/dashboards_api/models/api_duration.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from dashboards_api.models.duration_unit import DurationUnit -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiDuration(BaseModel): - """ - ApiDuration - """ # noqa: E501 - value: Optional[StrictInt] = Field(default=None, description="Timespan value.") - unit: Optional[DurationUnit] = None - __properties: ClassVar[List[str]] = ["value", "unit"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiDuration 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiDuration from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "value": obj.get("value"), - "unit": obj.get("unit") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_geo_map_widget.py b/dashboards_api/dashboards_api/models/api_geo_map_widget.py deleted file mode 100644 index 42b6c7d3..00000000 --- a/dashboards_api/dashboards_api/models/api_geo_map_widget.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.geo_map_datasource import GeoMapDatasource -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiGeoMapWidget(BaseModel): - """ - Displays data on a geographic map, highlighting information across different regions. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") - max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") - unit: Optional[ApiWidgetFixedYScalePrefix] = None - group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") - is_geo_map_per_test: Optional[StrictBool] = Field(default=None, description="Indicates whether a separate map is displayed for each test within the widget. When set to true, individual maps are generated.", alias="isGeoMapPerTest") - sort_by: Optional[WidgetSortProperty] = Field(default=None, alias="sortBy") - sort_direction: Optional[WidgetSortDirection] = Field(default=None, alias="sortDirection") - data_source: Optional[GeoMapDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "groupBy", "isGeoMapPerTest", "sortBy", "sortDirection", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiGeoMapWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiGeoMapWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "minScale": obj.get("minScale"), - "maxScale": obj.get("maxScale"), - "unit": obj.get("unit"), - "groupBy": obj.get("groupBy"), - "isGeoMapPerTest": obj.get("isGeoMapPerTest"), - "sortBy": obj.get("sortBy"), - "sortDirection": obj.get("sortDirection"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_grouped_barchart_widget.py b/dashboards_api/dashboards_api/models/api_grouped_barchart_widget.py deleted file mode 100644 index dfb6f06f..00000000 --- a/dashboards_api/dashboards_api/models/api_grouped_barchart_widget.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.grouped_bar_chart_datasource import GroupedBarChartDatasource -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiGroupedBarchartWidget(BaseModel): - """ - Displays grouped bars, each representing multiple data points. You can configure the bars to align horizontally or vertically. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") - axis_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="axisGroupBy") - sort_by: Optional[WidgetSortProperty] = Field(default=None, alias="sortBy") - sort_direction: Optional[WidgetSortDirection] = Field(default=None, alias="sortDirection") - limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") - show_labels: Optional[StrictBool] = Field(default=None, description="Displays labels on each bar when set to `true`.", alias="showLabels") - is_horizontal_bar_chart: Optional[StrictBool] = Field(default=None, alias="isHorizontalBarChart") - data_source: Optional[GroupedBarChartDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "groupBy", "axisGroupBy", "sortBy", "sortDirection", "limit", "showLabels", "isHorizontalBarChart", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiGroupedBarchartWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiGroupedBarchartWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "groupBy": obj.get("groupBy"), - "axisGroupBy": obj.get("axisGroupBy"), - "sortBy": obj.get("sortBy"), - "sortDirection": obj.get("sortDirection"), - "limit": obj.get("limit"), - "showLabels": obj.get("showLabels"), - "isHorizontalBarChart": obj.get("isHorizontalBarChart"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_multi_metric_column.py b/dashboards_api/dashboards_api/models/api_multi_metric_column.py deleted file mode 100644 index 65192830..00000000 --- a/dashboards_api/dashboards_api/models/api_multi_metric_column.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictStr -from pydantic import Field -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.multi_metrics_table_datasource import MultiMetricsTableDatasource -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiMultiMetricColumn(BaseModel): - """ - Defines a column within a table that aggregates and displays various metrics (Multi-Metric table). - """ # noqa: E501 - id: Optional[StrictStr] = None - data_source: Optional[MultiMetricsTableDatasource] = Field(default=None, alias="dataSource") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = None - measure: Optional[ApiWidgetMeasure] = None - __properties: ClassVar[List[str]] = ["id", "dataSource", "metricGroup", "direction", "metric", "filters", "measure"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiMultiMetricColumn 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiMultiMetricColumn 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"), - "dataSource": obj.get("dataSource"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_multi_metric_table_widget.py b/dashboards_api/dashboards_api/models/api_multi_metric_table_widget.py deleted file mode 100644 index 00b1f94e..00000000 --- a/dashboards_api/dashboards_api/models/api_multi_metric_table_widget.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_multi_metric_column import ApiMultiMetricColumn -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.multi_metrics_table_datasource import MultiMetricsTableDatasource -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiMultiMetricTableWidget(BaseModel): - """ - A Multi-Metric table widget with columns, each representing a different metric, offering a comprehensive view rather than restricting to a single metric. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - compare_to_previous_value: Optional[StrictBool] = Field(default=None, description="Enables comparison of the current metric value with the previous value.", alias="compareToPreviousValue") - row_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="rowGroupBy") - sort_by: Optional[WidgetSortProperty] = Field(default=None, alias="sortBy") - sort_direction: Optional[WidgetSortDirection] = Field(default=None, alias="sortDirection") - limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") - multi_metric_columns: Optional[List[ApiMultiMetricColumn]] = Field(default=None, alias="multiMetricColumns") - data_source: Optional[MultiMetricsTableDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "compareToPreviousValue", "rowGroupBy", "sortBy", "sortDirection", "limit", "multiMetricColumns", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiMultiMetricTableWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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 multi_metric_columns (list) - _items = [] - if self.multi_metric_columns: - for _item in self.multi_metric_columns: - if _item: - _items.append(_item.to_dict()) - _dict['multiMetricColumns'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiMultiMetricTableWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "compareToPreviousValue": obj.get("compareToPreviousValue"), - "rowGroupBy": obj.get("rowGroupBy"), - "sortBy": obj.get("sortBy"), - "sortDirection": obj.get("sortDirection"), - "limit": obj.get("limit"), - "multiMetricColumns": [ApiMultiMetricColumn.from_dict(_item) for _item in obj.get("multiMetricColumns")] if obj.get("multiMetricColumns") is not None else None, - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_numbers_card.py b/dashboards_api/dashboards_api/models/api_numbers_card.py deleted file mode 100644 index 3f3937c7..00000000 --- a/dashboards_api/dashboards_api/models/api_numbers_card.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_numbers_card_all_of_fixed_timespan import ApiNumbersCardAllOfFixedTimespan -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.numbers_card_datasource import NumbersCardDatasource -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiNumbersCard(BaseModel): - """ - An individual number card within the numbers card widget. - """ # noqa: E501 - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") - max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") - unit: Optional[ApiWidgetFixedYScalePrefix] = None - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - description: Optional[StrictStr] = Field(default=None, description="Description of the number card.") - measure: Optional[ApiWidgetMeasure] = None - compare_to_previous_value: Optional[StrictBool] = Field(default=None, alias="compareToPreviousValue") - fixed_timespan: Optional[ApiNumbersCardAllOfFixedTimespan] = Field(default=None, alias="fixedTimespan") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression windows from the widget when set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - data_source: Optional[NumbersCardDatasource] = Field(default=None, alias="dataSource") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="Filters to apply to the widget.") - __properties: ClassVar[List[str]] = ["minScale", "maxScale", "unit", "id", "description", "measure", "compareToPreviousValue", "fixedTimespan", "shouldExcludeAlertSuppressionWindows", "dataSource", "metricGroup", "direction", "metric", "filters"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiNumbersCard 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiNumbersCard from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "minScale": obj.get("minScale"), - "maxScale": obj.get("maxScale"), - "unit": obj.get("unit"), - "id": obj.get("id"), - "description": obj.get("description"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "compareToPreviousValue": obj.get("compareToPreviousValue"), - "fixedTimespan": ApiNumbersCardAllOfFixedTimespan.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "dataSource": obj.get("dataSource"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_numbers_card_all_of_fixed_timespan.py b/dashboards_api/dashboards_api/models/api_numbers_card_all_of_fixed_timespan.py deleted file mode 100644 index 5f139589..00000000 --- a/dashboards_api/dashboards_api/models/api_numbers_card_all_of_fixed_timespan.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from dashboards_api.models.duration_unit import DurationUnit -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiNumbersCardAllOfFixedTimespan(BaseModel): - """ - ApiNumbersCardAllOfFixedTimespan - """ # noqa: E501 - value: Optional[StrictInt] = Field(default=None, description="Timespan value.") - unit: Optional[DurationUnit] = None - __properties: ClassVar[List[str]] = ["value", "unit"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiNumbersCardAllOfFixedTimespan 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiNumbersCardAllOfFixedTimespan from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "value": obj.get("value"), - "unit": obj.get("unit") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_numbers_card_widget.py b/dashboards_api/dashboards_api/models/api_numbers_card_widget.py deleted file mode 100644 index 76ec1991..00000000 --- a/dashboards_api/dashboards_api/models/api_numbers_card_widget.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_numbers_card import ApiNumbersCard -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.numbers_card_datasource import NumbersCardDatasource -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiNumbersCardWidget(BaseModel): - """ - A widget composed of multiple cards, each presenting a singular metric, such as average packet loss, page load time, or alert count. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - number_cards: Optional[List[ApiNumbersCard]] = Field(default=None, alias="numberCards") - data_source: Optional[NumbersCardDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "numberCards", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiNumbersCardWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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 number_cards (list) - _items = [] - if self.number_cards: - for _item in self.number_cards: - if _item: - _items.append(_item.to_dict()) - _dict['numberCards'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiNumbersCardWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "numberCards": [ApiNumbersCard.from_dict(_item) for _item in obj.get("numberCards")] if obj.get("numberCards") is not None else None, - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_pie_chart_widget.py b/dashboards_api/dashboards_api/models/api_pie_chart_widget.py deleted file mode 100644 index a9543671..00000000 --- a/dashboards_api/dashboards_api/models/api_pie_chart_widget.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.pie_chart_datasource import PieChartDatasource -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiPieChartWidget(BaseModel): - """ - Displays data as segments of a pie, with each slice representing a portion of the total value. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") - data_source: Optional[PieChartDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "groupBy", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiPieChartWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiPieChartWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "groupBy": obj.get("groupBy"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_report_snapshot_time_span.py b/dashboards_api/dashboards_api/models/api_report_snapshot_time_span.py deleted file mode 100644 index 5ad64b24..00000000 --- a/dashboards_api/dashboards_api/models/api_report_snapshot_time_span.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiReportSnapshotTimeSpan(BaseModel): - """ - Time span of the dashboard snapshot. - """ # noqa: E501 - start: Optional[datetime] = Field(default=None, description="UTC start date of dashboard snapshot (ISO date-time format).") - duration: Optional[StrictInt] = Field(default=None, description="Duration of dashboard snapshot in seconds.") - __properties: ClassVar[List[str]] = ["start", "duration"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiReportSnapshotTimeSpan 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiReportSnapshotTimeSpan from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "start": obj.get("start"), - "duration": obj.get("duration") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_stacked_area_chart_widget.py b/dashboards_api/dashboards_api/models/api_stacked_area_chart_widget.py deleted file mode 100644 index 96a6518b..00000000 --- a/dashboards_api/dashboards_api/models/api_stacked_area_chart_widget.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.stacked_area_chart_datasource import StackedAreaChartDatasource -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiStackedAreaChartWidget(BaseModel): - """ - Displays line plots over time, stacking quantities vertically to showcase cumulative data trends, similar to stacked bar charts. Ideal for visualizing changes in response times, error counts, and other metrics, revealing the progression of values across a timeline. Use this chart to replace stacked bar charts for temporal data analysis. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") - max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") - unit: Optional[ApiWidgetFixedYScalePrefix] = None - group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") - data_source: Optional[StackedAreaChartDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "groupBy", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiStackedAreaChartWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiStackedAreaChartWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "minScale": obj.get("minScale"), - "maxScale": obj.get("maxScale"), - "unit": obj.get("unit"), - "groupBy": obj.get("groupBy"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_stacked_barchart_widget.py b/dashboards_api/dashboards_api/models/api_stacked_barchart_widget.py deleted file mode 100644 index 6c51bd00..00000000 --- a/dashboards_api/dashboards_api/models/api_stacked_barchart_widget.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.stacked_bar_chart_datasource import StackedBarChartDatasource -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiStackedBarchartWidget(BaseModel): - """ - ApiStackedBarchartWidget - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - axis_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="axisGroupBy") - sort_by: Optional[WidgetSortProperty] = Field(default=None, alias="sortBy") - sort_direction: Optional[WidgetSortDirection] = Field(default=None, alias="sortDirection") - limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") - show_labels: Optional[StrictBool] = Field(default=None, alias="showLabels") - is_horizontal_bar_chart: Optional[StrictBool] = Field(default=None, description="Set to `true` to display bars horizontally in the widget.", alias="isHorizontalBarChart") - data_source: Optional[StackedBarChartDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "axisGroupBy", "sortBy", "sortDirection", "limit", "showLabels", "isHorizontalBarChart", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiStackedBarchartWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiStackedBarchartWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "axisGroupBy": obj.get("axisGroupBy"), - "sortBy": obj.get("sortBy"), - "sortDirection": obj.get("sortDirection"), - "limit": obj.get("limit"), - "showLabels": obj.get("showLabels"), - "isHorizontalBarChart": obj.get("isHorizontalBarChart"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_table_widget.py b/dashboards_api/dashboards_api/models/api_table_widget.py deleted file mode 100644 index a4bcdd04..00000000 --- a/dashboards_api/dashboards_api/models/api_table_widget.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.table_datasource import TableDatasource -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_sort_direction import WidgetSortDirection -from dashboards_api.models.widget_sort_property import WidgetSortProperty -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiTableWidget(BaseModel): - """ - Organizes data in rows and columns, with options to list by test, geographic location, data source, or aggregated categories. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - compare_to_previous_value: Optional[StrictBool] = Field(default=None, alias="compareToPreviousValue") - row_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="rowGroupBy") - column_group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="columnGroupBy") - sort_by: Optional[WidgetSortProperty] = Field(default=None, alias="sortBy") - sort_direction: Optional[WidgetSortDirection] = Field(default=None, alias="sortDirection") - limit: Optional[StrictInt] = Field(default=None, description="Limit configured in the widget.") - data_source: Optional[TableDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "compareToPreviousValue", "rowGroupBy", "columnGroupBy", "sortBy", "sortDirection", "limit", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiTableWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiTableWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "compareToPreviousValue": obj.get("compareToPreviousValue"), - "rowGroupBy": obj.get("rowGroupBy"), - "columnGroupBy": obj.get("columnGroupBy"), - "sortBy": obj.get("sortBy"), - "sortDirection": obj.get("sortDirection"), - "limit": obj.get("limit"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_test_table_widget.py b/dashboards_api/dashboards_api/models/api_test_table_widget.py deleted file mode 100644 index b1a62ba5..00000000 --- a/dashboards_api/dashboards_api/models/api_test_table_widget.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_filter_api_test_table_filter_key import ApiWidgetFilterApiTestTableFilterKey -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.test_table_datasource import TestTableDatasource -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiTestTableWidget(BaseModel): - """ - Displays tests and statuses with options to sort and filter. It can be set to show only certain tests, like those with specific labels or failing tests. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - filter: Optional[ApiWidgetFilterApiTestTableFilterKey] = None - exclude: Optional[ApiWidgetFilterApiTestTableFilterKey] = None - data_source: Optional[TestTableDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "filter", "exclude", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiTestTableWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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 filter - if self.filter: - _dict['filter'] = self.filter.to_dict() - # override the default output from pydantic by calling `to_dict()` of exclude - if self.exclude: - _dict['exclude'] = self.exclude.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiTestTableWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "filter": ApiWidgetFilterApiTestTableFilterKey.from_dict(obj.get("filter")) if obj.get("filter") is not None else None, - "exclude": ApiWidgetFilterApiTestTableFilterKey.from_dict(obj.get("exclude")) if obj.get("exclude") is not None else None, - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_timeseries_widget.py b/dashboards_api/dashboards_api/models/api_timeseries_widget.py deleted file mode 100644 index 553b3ed7..00000000 --- a/dashboards_api/dashboards_api/models/api_timeseries_widget.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.timeseries_datasource import TimeseriesDatasource -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiTimeseriesWidget(BaseModel): - """ - The Timeseries widget graphs data over time, with the chosen metric displayed on the vertical axis. vertical axis - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - min_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mininum scale configured in the widget.", alias="minScale") - max_scale: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum scale configured in the widget.", alias="maxScale") - unit: Optional[ApiWidgetFixedYScalePrefix] = None - show_timeseries_overall_baseline: Optional[StrictBool] = Field(default=None, description="Displays the overall baseline if set to `true`.", alias="showTimeseriesOverallBaseline") - group_by: Optional[ApiAggregateProperty] = Field(default=None, alias="groupBy") - is_timeseries_one_chart_per_line: Optional[StrictBool] = Field(default=None, description="Displays a separate chart for each line if set to `true`.", alias="isTimeseriesOneChartPerLine") - data_source: Optional[TimeseriesDatasource] = Field(default=None, alias="dataSource") - __properties: ClassVar[List[str]] = ["id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows", "_links", "minScale", "maxScale", "unit", "showTimeseriesOverallBaseline", "groupBy", "isTimeseriesOneChartPerLine", "dataSource"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiTimeseriesWidget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - # 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: Dict) -> Self: - """Create an instance of ApiTimeseriesWidget 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"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "minScale": obj.get("minScale"), - "maxScale": obj.get("maxScale"), - "unit": obj.get("unit"), - "showTimeseriesOverallBaseline": obj.get("showTimeseriesOverallBaseline"), - "groupBy": obj.get("groupBy"), - "isTimeseriesOneChartPerLine": obj.get("isTimeseriesOneChartPerLine"), - "dataSource": obj.get("dataSource") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_widget_data_response.py b/dashboards_api/dashboards_api/models/api_widget_data_response.py deleted file mode 100644 index 59fa7d6e..00000000 --- a/dashboards_api/dashboards_api/models/api_widget_data_response.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiWidgetDataResponse(BaseModel): - """ - Response of a widget data request. - """ # noqa: E501 - group_labels: Optional[List[ApiReportDataComponentLabelMap]] = Field(default=None, alias="groupLabels") - bin_size: Optional[StrictInt] = Field(default=None, description="Duration of each bin.", alias="binSize") - data: Optional[ApiWidgetsDataV2] = None - __properties: ClassVar[List[str]] = ["groupLabels", "binSize", "data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiWidgetDataResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in group_labels (list) - _items = [] - if self.group_labels: - for _item in self.group_labels: - if _item: - _items.append(_item.to_dict()) - _dict['groupLabels'] = _items - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiWidgetDataResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "groupLabels": [ApiReportDataComponentLabelMap.from_dict(_item) for _item in obj.get("groupLabels")] if obj.get("groupLabels") is not None else None, - "binSize": obj.get("binSize"), - "data": ApiWidgetsDataV2.from_dict(obj.get("data")) if obj.get("data") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/api_widget_filter_api_test_table_filter_key.py b/dashboards_api/dashboards_api/models/api_widget_filter_api_test_table_filter_key.py deleted file mode 100644 index f30e6bf0..00000000 --- a/dashboards_api/dashboards_api/models/api_widget_filter_api_test_table_filter_key.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from dashboards_api.models.api_multi_search_filter_api_test_table_filter_key import ApiMultiSearchFilterApiTestTableFilterKey -from dashboards_api.models.test_table_filter_type import TestTableFilterType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiWidgetFilterApiTestTableFilterKey(BaseModel): - """ - ApiWidgetFilterApiTestTableFilterKey - """ # noqa: E501 - filters: Optional[List[ApiMultiSearchFilterApiTestTableFilterKey]] = None - type: Optional[TestTableFilterType] = None - __properties: ClassVar[List[str]] = ["filters", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiWidgetFilterApiTestTableFilterKey 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in filters (list) - _items = [] - if self.filters: - for _item in self.filters: - if _item: - _items.append(_item.to_dict()) - _dict['filters'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiWidgetFilterApiTestTableFilterKey from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "filters": [ApiMultiSearchFilterApiTestTableFilterKey.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None, - "type": obj.get("type") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/asw_repeat_unit.py b/dashboards_api/dashboards_api/models/asw_repeat_unit.py deleted file mode 100644 index 1a1d6b8d..00000000 --- a/dashboards_api/dashboards_api/models/asw_repeat_unit.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AswRepeatUnit(str, Enum): - """ - AswRepeatUnit - """ - - """ - allowed enum values - """ - DAY = 'day' - WEEK = 'week' - MONTH = 'month' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AswRepeatUnit from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/dashboard_links.py b/dashboards_api/dashboards_api/models/dashboard_links.py deleted file mode 100644 index c55e7982..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.dashboard_links_links import DashboardLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DashboardLinks(BaseModel): - """ - A links object containing the self and the snapshots links. - """ # noqa: E501 - links: Optional[DashboardLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of DashboardLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DashboardLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/dashboard_links_links.py b/dashboards_api/dashboards_api/models/dashboard_links_links.py deleted file mode 100644 index dfeba751..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_links_links.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DashboardLinksLinks(BaseModel): - """ - DashboardLinksLinks - """ # noqa: E501 - var_self: Optional[Link] = Field(default=None, alias="self") - snapshots: Optional[Link] = None - __properties: ClassVar[List[str]] = ["self", "snapshots"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of snapshots - if self.snapshots: - _dict['snapshots'] = self.snapshots.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DashboardLinksLinks 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.get("self")) if obj.get("self") is not None else None, - "snapshots": Link.from_dict(obj.get("snapshots")) if obj.get("snapshots") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/dashboard_order.py b/dashboards_api/dashboards_api/models/dashboard_order.py deleted file mode 100644 index c5af9316..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_order.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DashboardOrder(str, Enum): - """ - DashboardOrder - """ - - """ - allowed enum values - """ - ASC = 'asc' - DESC = 'desc' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardOrder from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/dashboard_snapshot_links.py b/dashboards_api/dashboards_api/models/dashboard_snapshot_links.py deleted file mode 100644 index bb36ebf9..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_snapshot_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.dashboard_snapshot_links_links import DashboardSnapshotLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DashboardSnapshotLinks(BaseModel): - """ - A links object containing the self link. - """ # noqa: E501 - links: Optional[DashboardSnapshotLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardSnapshotLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of DashboardSnapshotLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DashboardSnapshotLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/dashboard_snapshot_links_links.py b/dashboards_api/dashboards_api/models/dashboard_snapshot_links_links.py deleted file mode 100644 index a4f41b61..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_snapshot_links_links.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DashboardSnapshotLinksLinks(BaseModel): - """ - DashboardSnapshotLinksLinks - """ # noqa: E501 - var_self: Optional[Link] = Field(default=None, alias="self") - app_link: Optional[Link] = Field(default=None, alias="appLink") - __properties: ClassVar[List[str]] = ["self", "appLink"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardSnapshotLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of app_link - if self.app_link: - _dict['appLink'] = self.app_link.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DashboardSnapshotLinksLinks 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.get("self")) if obj.get("self") is not None else None, - "appLink": Link.from_dict(obj.get("appLink")) if obj.get("appLink") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/dashboard_snapshots200_response.py b/dashboards_api/dashboards_api/models/dashboard_snapshots200_response.py deleted file mode 100644 index 27256715..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_snapshots200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -from dashboards_api.models.pagination_links_links import PaginationLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DashboardSnapshots200Response(BaseModel): - """ - DashboardSnapshots200Response - """ # noqa: E501 - dashboard_snapshots: Optional[List[ApiDashboardSnapshot]] = Field(default=None, alias="dashboardSnapshots") - links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["dashboardSnapshots", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardSnapshots200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in dashboard_snapshots (list) - _items = [] - if self.dashboard_snapshots: - for _item in self.dashboard_snapshots: - if _item: - _items.append(_item.to_dict()) - _dict['dashboardSnapshots'] = _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: Dict) -> Self: - """Create an instance of DashboardSnapshots200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dashboardSnapshots": [ApiDashboardSnapshot.from_dict(_item) for _item in obj.get("dashboardSnapshots")] if obj.get("dashboardSnapshots") is not None else None, - "_links": PaginationLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/dashboard_snapshots_page.py b/dashboards_api/dashboards_api/models/dashboard_snapshots_page.py deleted file mode 100644 index d2281b48..00000000 --- a/dashboards_api/dashboards_api/models/dashboard_snapshots_page.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DashboardSnapshotsPage(BaseModel): - """ - Dashboard snapshots page. - """ # noqa: E501 - dashboard_snapshots: Optional[List[ApiDashboardSnapshot]] = Field(default=None, alias="dashboardSnapshots") - __properties: ClassVar[List[str]] = ["dashboardSnapshots"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DashboardSnapshotsPage 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in dashboard_snapshots (list) - _items = [] - if self.dashboard_snapshots: - for _item in self.dashboard_snapshots: - if _item: - _items.append(_item.to_dict()) - _dict['dashboardSnapshots'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DashboardSnapshotsPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dashboardSnapshots": [ApiDashboardSnapshot.from_dict(_item) for _item in obj.get("dashboardSnapshots")] if obj.get("dashboardSnapshots") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/duration_unit.py b/dashboards_api/dashboards_api/models/duration_unit.py deleted file mode 100644 index 1b16d490..00000000 --- a/dashboards_api/dashboards_api/models/duration_unit.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DurationUnit(str, Enum): - """ - Timespan unit. - """ - - """ - allowed enum values - """ - MINUTE = 'minute' - HOUR = 'hour' - DAY = 'day' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DurationUnit from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/enterprise_agent_state.py b/dashboards_api/dashboards_api/models/enterprise_agent_state.py deleted file mode 100644 index 58e960e0..00000000 --- a/dashboards_api/dashboards_api/models/enterprise_agent_state.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/dashboards_api/dashboards_api/models/error.py b/dashboards_api/dashboards_api/models/error.py deleted file mode 100644 index 6e004f07..00000000 --- a/dashboards_api/dashboards_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/dashboards_api/dashboards_api/models/get_dashboard_data200_response.py b/dashboards_api/dashboards_api/models/get_dashboard_data200_response.py deleted file mode 100644 index e355e9a1..00000000 --- a/dashboards_api/dashboards_api/models/get_dashboard_data200_response.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 -from dashboards_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDashboardData200Response(BaseModel): - """ - GetDashboardData200Response - """ # noqa: E501 - 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") - group_labels: Optional[List[ApiReportDataComponentLabelMap]] = Field(default=None, alias="groupLabels") - bin_size: Optional[StrictInt] = Field(default=None, description="Duration of each bin.", alias="binSize") - data: Optional[ApiWidgetsDataV2] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["startDate", "endDate", "groupLabels", "binSize", "data", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDashboardData200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in group_labels (list) - _items = [] - if self.group_labels: - for _item in self.group_labels: - if _item: - _items.append(_item.to_dict()) - _dict['groupLabels'] = _items - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetDashboardData200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "groupLabels": [ApiReportDataComponentLabelMap.from_dict(_item) for _item in obj.get("groupLabels")] if obj.get("groupLabels") is not None else None, - "binSize": obj.get("binSize"), - "data": ApiWidgetsDataV2.from_dict(obj.get("data")) if obj.get("data") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/link.py b/dashboards_api/dashboards_api/models/link.py deleted file mode 100644 index 1e5a4d36..00000000 --- a/dashboards_api/dashboards_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/dashboards_api/dashboards_api/models/pagination_links.py b/dashboards_api/dashboards_api/models/pagination_links.py deleted file mode 100644 index a701eb68..00000000 --- a/dashboards_api/dashboards_api/models/pagination_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.pagination_links_links import PaginationLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinks(BaseModel): - """ - A links object containing pagination related link(s). - """ # noqa: E501 - links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": PaginationLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/pagination_links_links.py b/dashboards_api/dashboards_api/models/pagination_links_links.py deleted file mode 100644 index cefa15be..00000000 --- a/dashboards_api/dashboards_api/models/pagination_links_links.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from dashboards_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinksLinks(BaseModel): - """ - PaginationLinksLinks - """ # noqa: E501 - previous: Optional[Link] = None - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["previous", "next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationLinksLinks 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.get("previous")) if obj.get("previous") is not None else None, - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/query_window.py b/dashboards_api/dashboards_api/models/query_window.py deleted file mode 100644 index 38122fa0..00000000 --- a/dashboards_api/dashboards_api/models/query_window.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QueryWindow(BaseModel): - """ - QueryWindow - """ # noqa: E501 - 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") - __properties: ClassVar[List[str]] = ["startDate", "endDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QueryWindow 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QueryWindow from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/self_links.py b/dashboards_api/dashboards_api/models/self_links.py deleted file mode 100644 index b29b821a..00000000 --- a/dashboards_api/dashboards_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/self_links_links.py b/dashboards_api/dashboards_api/models/self_links_links.py deleted file mode 100644 index ecd3521f..00000000 --- a/dashboards_api/dashboards_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from dashboards_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/snapshot_data_by_widget200_response.py b/dashboards_api/dashboards_api/models/snapshot_data_by_widget200_response.py deleted file mode 100644 index 8066daaa..00000000 --- a/dashboards_api/dashboards_api/models/snapshot_data_by_widget200_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from dashboards_api.models.api_report_data_component_label_map import ApiReportDataComponentLabelMap -from dashboards_api.models.api_widgets_data_v2 import ApiWidgetsDataV2 -from dashboards_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SnapshotDataByWidget200Response(BaseModel): - """ - SnapshotDataByWidget200Response - """ # noqa: E501 - group_labels: Optional[List[ApiReportDataComponentLabelMap]] = Field(default=None, alias="groupLabels") - bin_size: Optional[StrictInt] = Field(default=None, description="Duration of each bin.", alias="binSize") - data: Optional[ApiWidgetsDataV2] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["groupLabels", "binSize", "data", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SnapshotDataByWidget200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in group_labels (list) - _items = [] - if self.group_labels: - for _item in self.group_labels: - if _item: - _items.append(_item.to_dict()) - _dict['groupLabels'] = _items - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # 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: Dict) -> Self: - """Create an instance of SnapshotDataByWidget200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "groupLabels": [ApiReportDataComponentLabelMap.from_dict(_item) for _item in obj.get("groupLabels")] if obj.get("groupLabels") is not None else None, - "binSize": obj.get("binSize"), - "data": ApiWidgetsDataV2.from_dict(obj.get("data")) if obj.get("data") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/test_table_datasource.py b/dashboards_api/dashboards_api/models/test_table_datasource.py deleted file mode 100644 index a674b22d..00000000 --- a/dashboards_api/dashboards_api/models/test_table_datasource.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestTableDatasource(str, Enum): - """ - Datasource of the test table widget. - """ - - """ - allowed enum values - """ - ALERTS = 'ALERTS' - DEVICES = 'DEVICES' - DNSP = 'DNSP' - ENDPOINT_SCHEDULED_TEST = 'ENDPOINT_SCHEDULED_TEST' - ENDPOINT_AST_TEST = 'ENDPOINT_AST_TEST' - ENDPOINT_BROWSER_SESSION = 'ENDPOINT_BROWSER_SESSION' - ENDPOINT_LOCAL_NETWORK = 'ENDPOINT_LOCAL_NETWORK' - ENDPOINT_LOCAL_NETWORK_WIRELESS = 'ENDPOINT_LOCAL_NETWORK_WIRELESS' - ROUTING = 'ROUTING' - CLOUD_AND_ENTERPRISE_AGENTS = 'CLOUD_AND_ENTERPRISE_AGENTS' - INTERNET_INSIGHTS = 'INTERNET_INSIGHTS' - APPDYNAMICS_SERVICE_HEALTH = 'APPDYNAMICS_SERVICE_HEALTH' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTableDatasource from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/test_table_filter_type.py b/dashboards_api/dashboards_api/models/test_table_filter_type.py deleted file mode 100644 index e412dd95..00000000 --- a/dashboards_api/dashboards_api/models/test_table_filter_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestTableFilterType(str, Enum): - """ - TestTableFilterType - """ - - """ - allowed enum values - """ - ALL = 'all' - ANY = 'any' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTableFilterType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/unauthorized_error.py b/dashboards_api/dashboards_api/models/unauthorized_error.py deleted file mode 100644 index a99b706b..00000000 --- a/dashboards_api/dashboards_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/dashboards_api/dashboards_api/models/update_snapshot_expiration_date_api_request.py b/dashboards_api/dashboards_api/models/update_snapshot_expiration_date_api_request.py deleted file mode 100644 index 5cb917b1..00000000 --- a/dashboards_api/dashboards_api/models/update_snapshot_expiration_date_api_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdateSnapshotExpirationDateApiRequest(BaseModel): - """ - Request to update the expiration date of a snapshot. - """ # noqa: E501 - snapshot_expiration_date: Optional[datetime] = Field(default=None, description="Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format.", alias="snapshotExpirationDate") - __properties: ClassVar[List[str]] = ["snapshotExpirationDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdateSnapshotExpirationDateApiRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UpdateSnapshotExpirationDateApiRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "snapshotExpirationDate": obj.get("snapshotExpirationDate") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/visual_mode.py b/dashboards_api/dashboards_api/models/visual_mode.py deleted file mode 100644 index 38d57bbc..00000000 --- a/dashboards_api/dashboards_api/models/visual_mode.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class VisualMode(str, Enum): - """ - Visual mode in the UI. Either full or half the width of the window. - """ - - """ - allowed enum values - """ - FULL = 'Full' - HALF_SCREEN = 'Half screen' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VisualMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/widget.py b/dashboards_api/dashboards_api/models/widget.py deleted file mode 100644 index 0c4291a8..00000000 --- a/dashboards_api/dashboards_api/models/widget.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from dashboards_api.models.api_duration import ApiDuration -from dashboards_api.models.api_widget_measure import ApiWidgetMeasure -from dashboards_api.models.dashboard_metric import DashboardMetric -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection -from dashboards_api.models.metric_group import MetricGroup -from dashboards_api.models.self_links_links import SelfLinksLinks -from dashboards_api.models.visual_mode import VisualMode -from dashboards_api.models.widget_type import WidgetType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Widget(BaseModel): - """ - Widget - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - id: Optional[StrictStr] = Field(default=None, description="Identifier of the widget.") - type: Optional[WidgetType] = None - title: Optional[StrictStr] = Field(default=None, description="Title of the widget") - visual_mode: Optional[VisualMode] = Field(default=None, alias="visualMode") - embed_url: Optional[StrictStr] = Field(default=None, description="When `isEmbedded` is set to `true`, an `embedUrl` is provided.", alias="embedUrl") - is_embedded: Optional[StrictBool] = Field(default=None, description="Set to `true` if widget is marked as embedded; otherwise, set to `false`.", alias="isEmbedded") - metric_group: Optional[MetricGroup] = Field(default=None, alias="metricGroup") - direction: Optional[DashboardMetricDirection] = None - metric: Optional[DashboardMetric] = None - filters: Optional[Dict[str, List[Union[str, Any]]]] = Field(default=None, description="(Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property.") - measure: Optional[ApiWidgetMeasure] = None - fixed_timespan: Optional[ApiDuration] = Field(default=None, alias="fixedTimespan") - api_link: Optional[StrictStr] = Field(default=None, alias="apiLink") - should_exclude_alert_suppression_windows: Optional[StrictBool] = Field(default=None, description="Excludes alert suppression window data if set to `true`.", alias="shouldExcludeAlertSuppressionWindows") - __properties: ClassVar[List[str]] = ["_links", "id", "type", "title", "visualMode", "embedUrl", "isEmbedded", "metricGroup", "direction", "metric", "filters", "measure", "fixedTimespan", "apiLink", "shouldExcludeAlertSuppressionWindows"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Widget 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "embed_url", - "api_link", - }, - exclude_none=True, - ) - # 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 measure - if self.measure: - _dict['measure'] = self.measure.to_dict() - # override the default output from pydantic by calling `to_dict()` of fixed_timespan - if self.fixed_timespan: - _dict['fixedTimespan'] = self.fixed_timespan.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Widget from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "id": obj.get("id"), - "type": obj.get("type"), - "title": obj.get("title"), - "visualMode": obj.get("visualMode"), - "embedUrl": obj.get("embedUrl"), - "isEmbedded": obj.get("isEmbedded"), - "metricGroup": obj.get("metricGroup"), - "direction": obj.get("direction"), - "metric": obj.get("metric"), - "filters": obj.get("filters"), - "measure": ApiWidgetMeasure.from_dict(obj.get("measure")) if obj.get("measure") is not None else None, - "fixedTimespan": ApiDuration.from_dict(obj.get("fixedTimespan")) if obj.get("fixedTimespan") is not None else None, - "apiLink": obj.get("apiLink"), - "shouldExcludeAlertSuppressionWindows": obj.get("shouldExcludeAlertSuppressionWindows") - }) - return _obj - - diff --git a/dashboards_api/dashboards_api/models/widget_sort_direction.py b/dashboards_api/dashboards_api/models/widget_sort_direction.py deleted file mode 100644 index 7271694b..00000000 --- a/dashboards_api/dashboards_api/models/widget_sort_direction.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class WidgetSortDirection(str, Enum): - """ - Specifies the order in which cards are sorted. - """ - - """ - allowed enum values - """ - ASCENDING = 'ascending' - DESCENDING = 'descending' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WidgetSortDirection from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/models/widget_sort_property.py b/dashboards_api/dashboards_api/models/widget_sort_property.py deleted file mode 100644 index 4c6affb1..00000000 --- a/dashboards_api/dashboards_api/models/widget_sort_property.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class WidgetSortProperty(str, Enum): - """ - Determines the card sorting criterion. - """ - - """ - allowed enum values - """ - ALPHABETICAL = 'alphabetical' - VALUE = 'value' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WidgetSortProperty from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/dashboards_api/dashboards_api/rest.py b/dashboards_api/dashboards_api/rest.py deleted file mode 100644 index 690891f9..00000000 --- a/dashboards_api/dashboards_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from dashboards_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/dashboards_api/docs/AgentWidgetShow.md b/dashboards_api/docs/AgentWidgetShow.md deleted file mode 100644 index 865d5470..00000000 --- a/dashboards_api/docs/AgentWidgetShow.md +++ /dev/null @@ -1,11 +0,0 @@ -# AgentWidgetShow - -Ownership 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/dashboards_api/docs/AgentWidgetType.md b/dashboards_api/docs/AgentWidgetType.md deleted file mode 100644 index c777de33..00000000 --- a/dashboards_api/docs/AgentWidgetType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AgentWidgetType - -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/dashboards_api/docs/ApiAgentStatusWidget.md b/dashboards_api/docs/ApiAgentStatusWidget.md deleted file mode 100644 index 85bb9b7e..00000000 --- a/dashboards_api/docs/ApiAgentStatusWidget.md +++ /dev/null @@ -1,45 +0,0 @@ -# ApiAgentStatusWidget - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Identifier of the widget. | [optional] -**type** | [**WidgetType**](WidgetType.md) | | [optional] -**title** | **str** | Title of the widget | [optional] -**visual_mode** | [**VisualMode**](VisualMode.md) | | [optional] -**embed_url** | **str** | When `isEmbedded` is set to `true`, an `embedUrl` is provided. | [optional] [readonly] -**is_embedded** | **bool** | Set to `true` if widget is marked as embedded; otherwise, set to `false`. | [optional] -**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] -**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] -**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | (Optional) Specifies the filters applied to the widget. When present, the `filters` property displays. Each filter object has two properties: `filterProperty` and `filterValue`. The `filterProperty` can be values like Agents, Agent Groups, Tests, Monitors, etc. The `filterValue` represents theIdentifierof the selected property. | [optional] -**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] -**fixed_timespan** | [**ApiDuration**](ApiDuration.md) | | [optional] -**api_link** | **str** | | [optional] [readonly] -**should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression window data if set to `true`. | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**agents** | [**AgentWidgetType**](AgentWidgetType.md) | | [optional] -**show** | [**AgentWidgetShow**](AgentWidgetShow.md) | | [optional] -**data_source** | [**AgentStatusDatasource**](AgentStatusDatasource.md) | | [optional] - -## Example - -```python -from dashboards_api.models.api_agent_status_widget import ApiAgentStatusWidget - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiAgentStatusWidget from a JSON string -api_agent_status_widget_instance = ApiAgentStatusWidget.from_json(json) -# print the JSON string representation of the object -print ApiAgentStatusWidget.to_json() - -# convert the object into a dict -api_agent_status_widget_dict = api_agent_status_widget_instance.to_dict() -# create an instance of ApiAgentStatusWidget from a dict -api_agent_status_widget_form_dict = api_agent_status_widget.from_dict(api_agent_status_widget_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/dashboards_api/docs/ApiAlertListAlertType.md b/dashboards_api/docs/ApiAlertListAlertType.md deleted file mode 100644 index 00479cf9..00000000 --- a/dashboards_api/docs/ApiAlertListAlertType.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApiAlertListAlertType - -Name of the alert type - -## 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/dashboards_api/docs/ApiAlertListWidgetAllOfActiveWithin.md b/dashboards_api/docs/ApiAlertListWidgetAllOfActiveWithin.md deleted file mode 100644 index 0c599206..00000000 --- a/dashboards_api/docs/ApiAlertListWidgetAllOfActiveWithin.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiAlertListWidgetAllOfActiveWithin - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **int** | Timespan value. | [optional] -**unit** | [**DurationUnit**](DurationUnit.md) | | [optional] - -## Example - -```python -from dashboards_api.models.api_alert_list_widget_all_of_active_within import ApiAlertListWidgetAllOfActiveWithin - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiAlertListWidgetAllOfActiveWithin from a JSON string -api_alert_list_widget_all_of_active_within_instance = ApiAlertListWidgetAllOfActiveWithin.from_json(json) -# print the JSON string representation of the object -print ApiAlertListWidgetAllOfActiveWithin.to_json() - -# convert the object into a dict -api_alert_list_widget_all_of_active_within_dict = api_alert_list_widget_all_of_active_within_instance.to_dict() -# create an instance of ApiAlertListWidgetAllOfActiveWithin from a dict -api_alert_list_widget_all_of_active_within_form_dict = api_alert_list_widget_all_of_active_within.from_dict(api_alert_list_widget_all_of_active_within_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/dashboards_api/docs/ApiDashboard.md b/dashboards_api/docs/ApiDashboard.md deleted file mode 100644 index 2874e0ef..00000000 --- a/dashboards_api/docs/ApiDashboard.md +++ /dev/null @@ -1,43 +0,0 @@ -# ApiDashboard - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**DashboardLinksLinks**](DashboardLinksLinks.md) | | [optional] -**dashboard_id** | **str** | Identifier of a dashboard. | [optional] [readonly] -**title** | **str** | Title of a dashboard. | [optional] -**is_built_in** | **bool** | Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards. | [optional] [readonly] -**aid** | **str** | Identifier for the account group associated with a dashboard. | [optional] [readonly] -**dashboard_created_by** | **str** | Identifier for the user that created a dashboard. | [optional] [readonly] -**dashboard_modified_by** | **str** | Identifier for the user that last modified a dashboard. | [optional] [readonly] -**dashboard_modified_date** | **datetime** | UTC date/time when a dashboard was last modified (ISO date-time format). | [optional] [readonly] -**is_private** | **bool** | A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it. | [optional] -**is_default_for_user** | **bool** | Indicates whether this dashboard is the user's default. True for default, false if not. | [optional] [readonly] -**is_default_for_account** | **bool** | Indicates whether this dashboard is the account group's default. True for default, false if not. | [optional] [readonly] -**widgets** | [**List[ApiWidget]**](ApiWidget.md) | | [optional] -**description** | **str** | A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard. | [optional] -**default_timespan** | [**ApiDefaultTimespan**](ApiDefaultTimespan.md) | | [optional] -**is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] -**is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] - -## Example - -```python -from dashboards_api.models.api_dashboard import ApiDashboard - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiDashboard from a JSON string -api_dashboard_instance = ApiDashboard.from_json(json) -# print the JSON string representation of the object -print ApiDashboard.to_json() - -# convert the object into a dict -api_dashboard_dict = api_dashboard_instance.to_dict() -# create an instance of ApiDashboard from a dict -api_dashboard_form_dict = api_dashboard.from_dict(api_dashboard_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/dashboards_api/docs/ApiDashboardSnapshot.md b/dashboards_api/docs/ApiDashboardSnapshot.md deleted file mode 100644 index 254c45fe..00000000 --- a/dashboards_api/docs/ApiDashboardSnapshot.md +++ /dev/null @@ -1,38 +0,0 @@ -# ApiDashboardSnapshot - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**DashboardSnapshotLinksLinks**](DashboardSnapshotLinksLinks.md) | | [optional] -**snapshot_id** | **str** | Identifier of the dashboard snapshot. | [optional] -**snapshot_name** | **str** | Name of the dashboard snapshot. | [optional] -**aid** | **str** | Identifier of the account group that the snapshot belongs to. | [optional] -**is_shared** | **bool** | Set `true` if dashboard snapshot is shared, `false` otherwise. | [optional] -**snapshot_created_date** | **datetime** | UTC date when dashboard snapshot was created (ISO date-time format). | [optional] -**dashboard** | [**ApiDashboardSnapshotAllOfDashboard**](ApiDashboardSnapshotAllOfDashboard.md) | | [optional] -**widgets** | [**List[ApiWidget]**](ApiWidget.md) | | [optional] -**is_scheduled** | **bool** | Set `true` if dashboard snapshot was generated from a schedule, `false` otherwise. | [optional] -**time_span** | [**ApiReportSnapshotTimeSpan**](ApiReportSnapshotTimeSpan.md) | | [optional] -**snapshot_expiration_date** | **datetime** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format. | [optional] - -## Example - -```python -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiDashboardSnapshot from a JSON string -api_dashboard_snapshot_instance = ApiDashboardSnapshot.from_json(json) -# print the JSON string representation of the object -print ApiDashboardSnapshot.to_json() - -# convert the object into a dict -api_dashboard_snapshot_dict = api_dashboard_snapshot_instance.to_dict() -# create an instance of ApiDashboardSnapshot from a dict -api_dashboard_snapshot_form_dict = api_dashboard_snapshot.from_dict(api_dashboard_snapshot_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/dashboards_api/docs/ApiDashboardSnapshotAllOfDashboard.md b/dashboards_api/docs/ApiDashboardSnapshotAllOfDashboard.md deleted file mode 100644 index 7ae8ef96..00000000 --- a/dashboards_api/docs/ApiDashboardSnapshotAllOfDashboard.md +++ /dev/null @@ -1,43 +0,0 @@ -# ApiDashboardSnapshotAllOfDashboard - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dashboard_id** | **str** | Identifier of a dashboard. | [optional] [readonly] -**title** | **str** | Title of a dashboard. | [optional] -**is_built_in** | **bool** | Indicates if a dashboard is built-in. True for built-in dashboards, false for user-created dashboards. | [optional] [readonly] -**aid** | **str** | Identifier for the account group associated with a dashboard. | [optional] [readonly] -**dashboard_created_by** | **str** | Identifier for the user that created a dashboard. | [optional] [readonly] -**dashboard_modified_by** | **str** | Identifier for the user that last modified a dashboard. | [optional] [readonly] -**dashboard_modified_date** | **datetime** | UTC date/time when a dashboard was last modified (ISO date-time format). | [optional] [readonly] -**is_private** | **bool** | A dashboard can be viewed by other users in the account. If true, only the creator of the dashboard may view it. If false, all users in the same account may view it. | [optional] -**is_default_for_user** | **bool** | Indicates whether this dashboard is the user's default. True for default, false if not. | [optional] [readonly] -**is_default_for_account** | **bool** | Indicates whether this dashboard is the account group's default. True for default, false if not. | [optional] [readonly] -**widgets** | [**List[ApiWidget]**](ApiWidget.md) | | [optional] -**description** | **str** | A text description of the dashboard's purpose and functionality. This information assists users in understanding the dashboard but isn't displayed when viewing a dashboard. | [optional] -**default_timespan** | [**ApiDefaultTimespan**](ApiDefaultTimespan.md) | | [optional] -**is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] -**is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] -**links** | [**DashboardLinksLinks**](DashboardLinksLinks.md) | | [optional] - -## Example - -```python -from dashboards_api.models.api_dashboard_snapshot_all_of_dashboard import ApiDashboardSnapshotAllOfDashboard - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiDashboardSnapshotAllOfDashboard from a JSON string -api_dashboard_snapshot_all_of_dashboard_instance = ApiDashboardSnapshotAllOfDashboard.from_json(json) -# print the JSON string representation of the object -print ApiDashboardSnapshotAllOfDashboard.to_json() - -# convert the object into a dict -api_dashboard_snapshot_all_of_dashboard_dict = api_dashboard_snapshot_all_of_dashboard_instance.to_dict() -# create an instance of ApiDashboardSnapshotAllOfDashboard from a dict -api_dashboard_snapshot_all_of_dashboard_form_dict = api_dashboard_snapshot_all_of_dashboard.from_dict(api_dashboard_snapshot_all_of_dashboard_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/dashboards_api/docs/ApiDuration.md b/dashboards_api/docs/ApiDuration.md deleted file mode 100644 index aa2ea107..00000000 --- a/dashboards_api/docs/ApiDuration.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiDuration - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **int** | Timespan value. | [optional] -**unit** | [**DurationUnit**](DurationUnit.md) | | [optional] - -## Example - -```python -from dashboards_api.models.api_duration import ApiDuration - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiDuration from a JSON string -api_duration_instance = ApiDuration.from_json(json) -# print the JSON string representation of the object -print ApiDuration.to_json() - -# convert the object into a dict -api_duration_dict = api_duration_instance.to_dict() -# create an instance of ApiDuration from a dict -api_duration_form_dict = api_duration.from_dict(api_duration_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/dashboards_api/docs/ApiMultiMetricColumn.md b/dashboards_api/docs/ApiMultiMetricColumn.md deleted file mode 100644 index dd948409..00000000 --- a/dashboards_api/docs/ApiMultiMetricColumn.md +++ /dev/null @@ -1,35 +0,0 @@ -# ApiMultiMetricColumn - -Defines a column within a table that aggregates and displays various metrics (Multi-Metric table). - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**data_source** | [**MultiMetricsTableDatasource**](MultiMetricsTableDatasource.md) | | [optional] -**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] -**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] -**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | | [optional] -**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] - -## Example - -```python -from dashboards_api.models.api_multi_metric_column import ApiMultiMetricColumn - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiMultiMetricColumn from a JSON string -api_multi_metric_column_instance = ApiMultiMetricColumn.from_json(json) -# print the JSON string representation of the object -print ApiMultiMetricColumn.to_json() - -# convert the object into a dict -api_multi_metric_column_dict = api_multi_metric_column_instance.to_dict() -# create an instance of ApiMultiMetricColumn from a dict -api_multi_metric_column_form_dict = api_multi_metric_column.from_dict(api_multi_metric_column_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/dashboards_api/docs/ApiNumbersCard.md b/dashboards_api/docs/ApiNumbersCard.md deleted file mode 100644 index 219116af..00000000 --- a/dashboards_api/docs/ApiNumbersCard.md +++ /dev/null @@ -1,42 +0,0 @@ -# ApiNumbersCard - -An individual number card within the numbers card widget. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**min_scale** | **float** | Mininum scale configured in the widget. | [optional] -**max_scale** | **float** | Maximum scale configured in the widget. | [optional] -**unit** | [**ApiWidgetFixedYScalePrefix**](ApiWidgetFixedYScalePrefix.md) | | [optional] -**id** | **str** | Identifier of the widget. | [optional] -**description** | **str** | Description of the number card. | [optional] -**measure** | [**ApiWidgetMeasure**](ApiWidgetMeasure.md) | | [optional] -**compare_to_previous_value** | **bool** | | [optional] -**fixed_timespan** | [**ApiNumbersCardAllOfFixedTimespan**](ApiNumbersCardAllOfFixedTimespan.md) | | [optional] -**should_exclude_alert_suppression_windows** | **bool** | Excludes alert suppression windows from the widget when set to `true`. | [optional] -**data_source** | [**NumbersCardDatasource**](NumbersCardDatasource.md) | | [optional] -**metric_group** | [**MetricGroup**](MetricGroup.md) | | [optional] -**direction** | [**DashboardMetricDirection**](DashboardMetricDirection.md) | | [optional] -**metric** | [**DashboardMetric**](DashboardMetric.md) | | [optional] -**filters** | **Dict[str, List[object]]** | Filters to apply to the widget. | [optional] - -## Example - -```python -from dashboards_api.models.api_numbers_card import ApiNumbersCard - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiNumbersCard from a JSON string -api_numbers_card_instance = ApiNumbersCard.from_json(json) -# print the JSON string representation of the object -print ApiNumbersCard.to_json() - -# convert the object into a dict -api_numbers_card_dict = api_numbers_card_instance.to_dict() -# create an instance of ApiNumbersCard from a dict -api_numbers_card_form_dict = api_numbers_card.from_dict(api_numbers_card_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/dashboards_api/docs/ApiNumbersCardAllOfFixedTimespan.md b/dashboards_api/docs/ApiNumbersCardAllOfFixedTimespan.md deleted file mode 100644 index b30db568..00000000 --- a/dashboards_api/docs/ApiNumbersCardAllOfFixedTimespan.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiNumbersCardAllOfFixedTimespan - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **int** | Timespan value. | [optional] -**unit** | [**DurationUnit**](DurationUnit.md) | | [optional] - -## Example - -```python -from dashboards_api.models.api_numbers_card_all_of_fixed_timespan import ApiNumbersCardAllOfFixedTimespan - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiNumbersCardAllOfFixedTimespan from a JSON string -api_numbers_card_all_of_fixed_timespan_instance = ApiNumbersCardAllOfFixedTimespan.from_json(json) -# print the JSON string representation of the object -print ApiNumbersCardAllOfFixedTimespan.to_json() - -# convert the object into a dict -api_numbers_card_all_of_fixed_timespan_dict = api_numbers_card_all_of_fixed_timespan_instance.to_dict() -# create an instance of ApiNumbersCardAllOfFixedTimespan from a dict -api_numbers_card_all_of_fixed_timespan_form_dict = api_numbers_card_all_of_fixed_timespan.from_dict(api_numbers_card_all_of_fixed_timespan_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/dashboards_api/docs/DashboardSnapshotLinks.md b/dashboards_api/docs/DashboardSnapshotLinks.md deleted file mode 100644 index d723de5d..00000000 --- a/dashboards_api/docs/DashboardSnapshotLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# DashboardSnapshotLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**DashboardSnapshotLinksLinks**](DashboardSnapshotLinksLinks.md) | | [optional] - -## Example - -```python -from dashboards_api.models.dashboard_snapshot_links import DashboardSnapshotLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of DashboardSnapshotLinks from a JSON string -dashboard_snapshot_links_instance = DashboardSnapshotLinks.from_json(json) -# print the JSON string representation of the object -print DashboardSnapshotLinks.to_json() - -# convert the object into a dict -dashboard_snapshot_links_dict = dashboard_snapshot_links_instance.to_dict() -# create an instance of DashboardSnapshotLinks from a dict -dashboard_snapshot_links_form_dict = dashboard_snapshot_links.from_dict(dashboard_snapshot_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/dashboards_api/docs/DashboardSnapshotLinksLinks.md b/dashboards_api/docs/DashboardSnapshotLinksLinks.md deleted file mode 100644 index 063dccff..00000000 --- a/dashboards_api/docs/DashboardSnapshotLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# DashboardSnapshotLinksLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] -**app_link** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from dashboards_api.models.dashboard_snapshot_links_links import DashboardSnapshotLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of DashboardSnapshotLinksLinks from a JSON string -dashboard_snapshot_links_links_instance = DashboardSnapshotLinksLinks.from_json(json) -# print the JSON string representation of the object -print DashboardSnapshotLinksLinks.to_json() - -# convert the object into a dict -dashboard_snapshot_links_links_dict = dashboard_snapshot_links_links_instance.to_dict() -# create an instance of DashboardSnapshotLinksLinks from a dict -dashboard_snapshot_links_links_form_dict = dashboard_snapshot_links_links.from_dict(dashboard_snapshot_links_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/dashboards_api/docs/DurationUnit.md b/dashboards_api/docs/DurationUnit.md deleted file mode 100644 index 2664e06f..00000000 --- a/dashboards_api/docs/DurationUnit.md +++ /dev/null @@ -1,11 +0,0 @@ -# DurationUnit - -Timespan unit. - -## 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/dashboards_api/docs/EnterpriseAgentState.md b/dashboards_api/docs/EnterpriseAgentState.md deleted file mode 100644 index a9ec4b61..00000000 --- a/dashboards_api/docs/EnterpriseAgentState.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/dashboards_api/docs/Error.md b/dashboards_api/docs/Error.md deleted file mode 100644 index 104fce5a..00000000 --- a/dashboards_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 dashboards_api.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_form_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/dashboards_api/docs/Link.md b/dashboards_api/docs/Link.md deleted file mode 100644 index ae5285be..00000000 --- a/dashboards_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 dashboards_api.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_form_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/dashboards_api/docs/PaginationLinks.md b/dashboards_api/docs/PaginationLinks.md deleted file mode 100644 index c25719a9..00000000 --- a/dashboards_api/docs/PaginationLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinks - -A links object containing pagination related link(s). - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] - -## Example - -```python -from dashboards_api.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_form_dict = pagination_links.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/dashboards_api/docs/PaginationLinksLinks.md b/dashboards_api/docs/PaginationLinksLinks.md deleted file mode 100644 index ae195131..00000000 --- a/dashboards_api/docs/PaginationLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinksLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**previous** | [**Link**](Link.md) | | [optional] -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from dashboards_api.models.pagination_links_links import PaginationLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationLinksLinks from a JSON string -pagination_links_links_instance = PaginationLinksLinks.from_json(json) -# print the JSON string representation of the object -print PaginationLinksLinks.to_json() - -# convert the object into a dict -pagination_links_links_dict = pagination_links_links_instance.to_dict() -# create an instance of PaginationLinksLinks from a dict -pagination_links_links_form_dict = pagination_links_links.from_dict(pagination_links_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/dashboards_api/docs/QueryWindow.md b/dashboards_api/docs/QueryWindow.md deleted file mode 100644 index b1b66646..00000000 --- a/dashboards_api/docs/QueryWindow.md +++ /dev/null @@ -1,29 +0,0 @@ -# QueryWindow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -## Example - -```python -from dashboards_api.models.query_window import QueryWindow - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryWindow from a JSON string -query_window_instance = QueryWindow.from_json(json) -# print the JSON string representation of the object -print QueryWindow.to_json() - -# convert the object into a dict -query_window_dict = query_window_instance.to_dict() -# create an instance of QueryWindow from a dict -query_window_form_dict = query_window.from_dict(query_window_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/dashboards_api/docs/SelfLinks.md b/dashboards_api/docs/SelfLinks.md deleted file mode 100644 index 4081cb23..00000000 --- a/dashboards_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from dashboards_api.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_form_dict = self_links.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/dashboards_api/docs/SelfLinksLinks.md b/dashboards_api/docs/SelfLinksLinks.md deleted file mode 100644 index 6c0ec51e..00000000 --- a/dashboards_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from dashboards_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/dashboards_api/docs/SnapshotDataByWidget200Response.md b/dashboards_api/docs/SnapshotDataByWidget200Response.md deleted file mode 100644 index e908df5e..00000000 --- a/dashboards_api/docs/SnapshotDataByWidget200Response.md +++ /dev/null @@ -1,31 +0,0 @@ -# SnapshotDataByWidget200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**group_labels** | [**List[ApiReportDataComponentLabelMap]**](ApiReportDataComponentLabelMap.md) | | [optional] -**bin_size** | **int** | Duration of each bin. | [optional] -**data** | [**ApiWidgetsDataV2**](ApiWidgetsDataV2.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from dashboards_api.models.snapshot_data_by_widget200_response import SnapshotDataByWidget200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of SnapshotDataByWidget200Response from a JSON string -snapshot_data_by_widget200_response_instance = SnapshotDataByWidget200Response.from_json(json) -# print the JSON string representation of the object -print SnapshotDataByWidget200Response.to_json() - -# convert the object into a dict -snapshot_data_by_widget200_response_dict = snapshot_data_by_widget200_response_instance.to_dict() -# create an instance of SnapshotDataByWidget200Response from a dict -snapshot_data_by_widget200_response_form_dict = snapshot_data_by_widget200_response.from_dict(snapshot_data_by_widget200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/dashboards_api/docs/UnauthorizedError.md b/dashboards_api/docs/UnauthorizedError.md deleted file mode 100644 index 6487f257..00000000 --- a/dashboards_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from dashboards_api.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_form_dict = unauthorized_error.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/dashboards_api/docs/UpdateSnapshotExpirationDateApiRequest.md b/dashboards_api/docs/UpdateSnapshotExpirationDateApiRequest.md deleted file mode 100644 index b8380c2c..00000000 --- a/dashboards_api/docs/UpdateSnapshotExpirationDateApiRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# UpdateSnapshotExpirationDateApiRequest - -Request to update the expiration date of a snapshot. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**snapshot_expiration_date** | **datetime** | Expiration date of the snapshot. If unspecified, the snapshot expires 1 year from its creation date. The expiration date must be set within 5 years from the current date and adhere to the ISO date-time format. | [optional] - -## Example - -```python -from dashboards_api.models.update_snapshot_expiration_date_api_request import UpdateSnapshotExpirationDateApiRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSnapshotExpirationDateApiRequest from a JSON string -update_snapshot_expiration_date_api_request_instance = UpdateSnapshotExpirationDateApiRequest.from_json(json) -# print the JSON string representation of the object -print UpdateSnapshotExpirationDateApiRequest.to_json() - -# convert the object into a dict -update_snapshot_expiration_date_api_request_dict = update_snapshot_expiration_date_api_request_instance.to_dict() -# create an instance of UpdateSnapshotExpirationDateApiRequest from a dict -update_snapshot_expiration_date_api_request_form_dict = update_snapshot_expiration_date_api_request.from_dict(update_snapshot_expiration_date_api_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/dashboards_api/docs/WidgetSortDirection.md b/dashboards_api/docs/WidgetSortDirection.md deleted file mode 100644 index 16c31cab..00000000 --- a/dashboards_api/docs/WidgetSortDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# WidgetSortDirection - -Specifies the order in which cards are sorted. - -## 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/dashboards_api/docs/WidgetSortProperty.md b/dashboards_api/docs/WidgetSortProperty.md deleted file mode 100644 index c3dc41d9..00000000 --- a/dashboards_api/docs/WidgetSortProperty.md +++ /dev/null @@ -1,11 +0,0 @@ -# WidgetSortProperty - -Determines the card sorting criterion. - -## 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/dashboards_api/git_push.sh b/dashboards_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/dashboards_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/dashboards_api/pyproject.toml b/dashboards_api/pyproject.toml deleted file mode 100644 index de103c62..00000000 --- a/dashboards_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "dashboards_api" -version = "1.0.0" -description = "Dashboards API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Dashboards API"] -include = ["dashboards_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/dashboards_api/setup.py b/dashboards_api/setup.py deleted file mode 100644 index 7d684d32..00000000 --- a/dashboards_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "dashboards-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Dashboards API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Dashboards API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Manage ThousandEyes Dashboards - """, # noqa: E501 - package_data={"dashboards_api": ["py.typed"]}, -) diff --git a/dashboards_api/test-requirements.txt b/dashboards_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/dashboards_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/dashboards_api/test/test_agent_status_datasource.py b/dashboards_api/test/test_agent_status_datasource.py deleted file mode 100644 index 02d8e6bc..00000000 --- a/dashboards_api/test/test_agent_status_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.agent_status_datasource import AgentStatusDatasource - -class TestAgentStatusDatasource(unittest.TestCase): - """AgentStatusDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentStatusDatasource(self): - """Test AgentStatusDatasource""" - # inst = AgentStatusDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_agent_widget_show.py b/dashboards_api/test/test_agent_widget_show.py deleted file mode 100644 index dcec15b7..00000000 --- a/dashboards_api/test/test_agent_widget_show.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.agent_widget_show import AgentWidgetShow - -class TestAgentWidgetShow(unittest.TestCase): - """AgentWidgetShow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentWidgetShow(self): - """Test AgentWidgetShow""" - # inst = AgentWidgetShow() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_agent_widget_type.py b/dashboards_api/test/test_agent_widget_type.py deleted file mode 100644 index 9f085189..00000000 --- a/dashboards_api/test/test_agent_widget_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.agent_widget_type import AgentWidgetType - -class TestAgentWidgetType(unittest.TestCase): - """AgentWidgetType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentWidgetType(self): - """Test AgentWidgetType""" - # inst = AgentWidgetType() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_alert_list_datasource.py b/dashboards_api/test/test_alert_list_datasource.py deleted file mode 100644 index 9a1d4bb1..00000000 --- a/dashboards_api/test/test_alert_list_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.alert_list_datasource import AlertListDatasource - -class TestAlertListDatasource(unittest.TestCase): - """AlertListDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAlertListDatasource(self): - """Test AlertListDatasource""" - # inst = AlertListDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_agent_status_widget.py b/dashboards_api/test/test_api_agent_status_widget.py deleted file mode 100644 index b46e9286..00000000 --- a/dashboards_api/test/test_api_agent_status_widget.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_agent_status_widget import ApiAgentStatusWidget - -class TestApiAgentStatusWidget(unittest.TestCase): - """ApiAgentStatusWidget unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiAgentStatusWidget: - """Test ApiAgentStatusWidget - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiAgentStatusWidget` - """ - model = ApiAgentStatusWidget() - if include_optional: - return ApiAgentStatusWidget( - id = '1234', - type = 'Pie Chart', - title = 'Widget Title', - visual_mode = 'Full', - embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', - is_embedded = True, - metric_group = 'BGP', - direction = 'FROM_TARGET', - metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, - measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( - value = 10, - unit = 'hour', ), - api_link = '', - should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - agents = 'endpoint', - show = 'owned', - data_source = 'ENDPOINT_AST_TEST' - ) - else: - return ApiAgentStatusWidget( - ) - """ - - def testApiAgentStatusWidget(self): - """Test ApiAgentStatusWidget""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_aggregate_property.py b/dashboards_api/test/test_api_aggregate_property.py deleted file mode 100644 index 9b40ac46..00000000 --- a/dashboards_api/test/test_api_aggregate_property.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_aggregate_property import ApiAggregateProperty - -class TestApiAggregateProperty(unittest.TestCase): - """ApiAggregateProperty unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApiAggregateProperty(self): - """Test ApiAggregateProperty""" - # inst = ApiAggregateProperty() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_alert_list_alert_type.py b/dashboards_api/test/test_api_alert_list_alert_type.py deleted file mode 100644 index 61296734..00000000 --- a/dashboards_api/test/test_api_alert_list_alert_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_alert_list_alert_type import ApiAlertListAlertType - -class TestApiAlertListAlertType(unittest.TestCase): - """ApiAlertListAlertType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApiAlertListAlertType(self): - """Test ApiAlertListAlertType""" - # inst = ApiAlertListAlertType() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_dashboard_snapshot.py b/dashboards_api/test/test_api_dashboard_snapshot.py deleted file mode 100644 index b28d6629..00000000 --- a/dashboards_api/test/test_api_dashboard_snapshot.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_dashboard_snapshot import ApiDashboardSnapshot - -class TestApiDashboardSnapshot(unittest.TestCase): - """ApiDashboardSnapshot unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiDashboardSnapshot: - """Test ApiDashboardSnapshot - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiDashboardSnapshot` - """ - model = ApiDashboardSnapshot() - if include_optional: - return ApiDashboardSnapshot( - links = dashboards_api.models.dashboard_snapshot_links__links.DashboardSnapshotLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - app_link = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - snapshot_id = 'd28bb71f-5a47-4783-8f12-d4b115e61b0c', - snapshot_name = 'HTTP Server Dashboard Snapshot', - aid = '10', - is_shared = True, - snapshot_created_date = '2023-05-16T10:14:28Z', - dashboard = None, - widgets = [ - null - ], - is_scheduled = True, - time_span = dashboards_api.models.api_report_snapshot_time_span.ApiReportSnapshotTimeSpan( - start = '2023-05-16T10:14:28Z', - duration = 60, ), - snapshot_expiration_date = '2023-05-16T10:14:28Z' - ) - else: - return ApiDashboardSnapshot( - ) - """ - - def testApiDashboardSnapshot(self): - """Test ApiDashboardSnapshot""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_dashboard_snapshot_all_of_dashboard.py b/dashboards_api/test/test_api_dashboard_snapshot_all_of_dashboard.py deleted file mode 100644 index 1704c909..00000000 --- a/dashboards_api/test/test_api_dashboard_snapshot_all_of_dashboard.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_dashboard_snapshot_all_of_dashboard import ApiDashboardSnapshotAllOfDashboard - -class TestApiDashboardSnapshotAllOfDashboard(unittest.TestCase): - """ApiDashboardSnapshotAllOfDashboard unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiDashboardSnapshotAllOfDashboard: - """Test ApiDashboardSnapshotAllOfDashboard - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiDashboardSnapshotAllOfDashboard` - """ - model = ApiDashboardSnapshotAllOfDashboard() - if include_optional: - return ApiDashboardSnapshotAllOfDashboard( - dashboard_id = '5e1f7a99143ae6004fdc3bb4', - title = 'HTTP Server Widgets', - is_built_in = True, - aid = '75', - dashboard_created_by = '1', - dashboard_modified_by = '1', - dashboard_modified_date = '2023-05-16T10:14:28Z', - is_private = True, - is_default_for_user = True, - is_default_for_account = False, - widgets = [ - null - ], - description = 'HTTP Server Widgets', - default_timespan = dashboards_api.models.api_default_timespan.ApiDefaultTimespan( - duration = 7200, - start = '2023-05-16T10:14:28Z', - end = '2023-05-16T11:14:28Z', ), - is_global_override = True, - is_migrated_report = False, - links = dashboards_api.models.dashboard_links__links.DashboardLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - snapshots = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return ApiDashboardSnapshotAllOfDashboard( - ) - """ - - def testApiDashboardSnapshotAllOfDashboard(self): - """Test ApiDashboardSnapshotAllOfDashboard""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_multi_metric_table_widget.py b/dashboards_api/test/test_api_multi_metric_table_widget.py deleted file mode 100644 index e6b17d18..00000000 --- a/dashboards_api/test/test_api_multi_metric_table_widget.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_multi_metric_table_widget import ApiMultiMetricTableWidget - -class TestApiMultiMetricTableWidget(unittest.TestCase): - """ApiMultiMetricTableWidget unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiMultiMetricTableWidget: - """Test ApiMultiMetricTableWidget - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiMultiMetricTableWidget` - """ - model = ApiMultiMetricTableWidget() - if include_optional: - return ApiMultiMetricTableWidget( - id = '1234', - type = 'Pie Chart', - title = 'Widget Title', - visual_mode = 'Full', - embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', - is_embedded = True, - metric_group = 'BGP', - direction = 'FROM_TARGET', - metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, - measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( - value = 10, - unit = 'hour', ), - api_link = '', - should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - compare_to_previous_value = True, - row_group_by = 'ALL', - sort_by = 'alphabetical', - sort_direction = 'ascending', - limit = 10, - multi_metric_columns = [ - dashboards_api.models.api_multi_metric_column.ApiMultiMetricColumn( - id = '', - data_source = 'ENDPOINT_SCHEDULED_TEST', - metric_group = 'BGP', - direction = 'FROM_TARGET', - metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = { - 'key' : [ - None - ] - }, - measure = MEAN, ) - ], - data_source = 'ENDPOINT_SCHEDULED_TEST' - ) - else: - return ApiMultiMetricTableWidget( - ) - """ - - def testApiMultiMetricTableWidget(self): - """Test ApiMultiMetricTableWidget""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_numbers_card_all_of_fixed_timespan.py b/dashboards_api/test/test_api_numbers_card_all_of_fixed_timespan.py deleted file mode 100644 index f5a299a0..00000000 --- a/dashboards_api/test/test_api_numbers_card_all_of_fixed_timespan.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_numbers_card_all_of_fixed_timespan import ApiNumbersCardAllOfFixedTimespan - -class TestApiNumbersCardAllOfFixedTimespan(unittest.TestCase): - """ApiNumbersCardAllOfFixedTimespan unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiNumbersCardAllOfFixedTimespan: - """Test ApiNumbersCardAllOfFixedTimespan - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiNumbersCardAllOfFixedTimespan` - """ - model = ApiNumbersCardAllOfFixedTimespan() - if include_optional: - return ApiNumbersCardAllOfFixedTimespan( - value = 10, - unit = 'hour' - ) - else: - return ApiNumbersCardAllOfFixedTimespan( - ) - """ - - def testApiNumbersCardAllOfFixedTimespan(self): - """Test ApiNumbersCardAllOfFixedTimespan""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_test_table_widget.py b/dashboards_api/test/test_api_test_table_widget.py deleted file mode 100644 index c5fb28cc..00000000 --- a/dashboards_api/test/test_api_test_table_widget.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_test_table_widget import ApiTestTableWidget - -class TestApiTestTableWidget(unittest.TestCase): - """ApiTestTableWidget unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiTestTableWidget: - """Test ApiTestTableWidget - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiTestTableWidget` - """ - model = ApiTestTableWidget() - if include_optional: - return ApiTestTableWidget( - id = '1234', - type = 'Pie Chart', - title = 'Widget Title', - visual_mode = 'Full', - embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', - is_embedded = True, - metric_group = 'BGP', - direction = 'FROM_TARGET', - metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, - measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( - value = 10, - unit = 'hour', ), - api_link = '', - should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - filter = dashboards_api.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( - filters = [ - dashboards_api.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( - key = 'Target', - value = '', ) - ], - type = 'all', ), - exclude = dashboards_api.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( - filters = [ - dashboards_api.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( - key = 'Target', - value = '', ) - ], - type = 'all', ), - data_source = 'ENDPOINT_BROWSER_SESSION' - ) - else: - return ApiTestTableWidget( - ) - """ - - def testApiTestTableWidget(self): - """Test ApiTestTableWidget""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_widget.py b/dashboards_api/test/test_api_widget.py deleted file mode 100644 index aa3a7f1e..00000000 --- a/dashboards_api/test/test_api_widget.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_widget import ApiWidget - -class TestApiWidget(unittest.TestCase): - """ApiWidget unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiWidget: - """Test ApiWidget - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiWidget` - """ - model = ApiWidget() - if include_optional: - return ApiWidget( - id = '1234', - type = 'Pie Chart', - title = 'Widget Title', - visual_mode = 'Full', - embed_url = 'https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f', - is_embedded = True, - metric_group = 'BGP', - direction = 'FROM_TARGET', - metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = {Tests=[5187]}, - measure = MEAN, - fixed_timespan = dashboards_api.models.api_duration.ApiDuration( - value = 10, - unit = 'hour', ), - api_link = '', - should_exclude_alert_suppression_windows = True, - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - agents = 'endpoint', - show = 'owned', - data_source = 'CLOUD_AND_ENTERPRISE_AGENTS', - alert_types = [ - 'Network - End-to-End (Server)' - ], - limit_to = 15, - active_within = None, - min_scale = 1.0, - max_scale = 100.0, - unit = 'Mbps', - group_by = 'ALL', - cards = 'ALL', - group_cards_by = 'ALL', - columns = 1, - limit = 10, - sort_by = 'alphabetical', - sort_direction = 'ascending', - is_geo_map_per_test = True, - axis_group_by = 'ALL', - show_labels = True, - is_horizontal_bar_chart = True, - compare_to_previous_value = True, - row_group_by = 'ALL', - multi_metric_columns = [ - dashboards_api.models.api_multi_metric_column.ApiMultiMetricColumn( - id = '', - data_source = 'ENDPOINT_SCHEDULED_TEST', - metric_group = 'BGP', - direction = 'FROM_TARGET', - metric = 'ENDPOINT_GATEWAY_CPU_LOAD_PERCENT', - filters = { - 'key' : [ - None - ] - }, - measure = MEAN, ) - ], - number_cards = [ - dashboards_api.models.api_numbers_card.ApiNumbersCard() - ], - column_group_by = 'ALL', - filter = dashboards_api.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( - filters = [ - dashboards_api.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( - key = 'Target', - value = '', ) - ], - type = 'all', ), - exclude = dashboards_api.models.api_widget_filter_api_test_table_filter_key.ApiWidgetFilterApiTestTableFilterKey( - filters = [ - dashboards_api.models.api_multi_search_filter_api_test_table_filter_key.ApiMultiSearchFilterApiTestTableFilterKey( - key = 'Target', - value = '', ) - ], - type = 'all', ), - show_timeseries_overall_baseline = True, - is_timeseries_one_chart_per_line = True - ) - else: - return ApiWidget( - ) - """ - - def testApiWidget(self): - """Test ApiWidget""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_api_widget_fixed_y_scale_prefix.py b/dashboards_api/test/test_api_widget_fixed_y_scale_prefix.py deleted file mode 100644 index a5412ad5..00000000 --- a/dashboards_api/test/test_api_widget_fixed_y_scale_prefix.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.api_widget_fixed_y_scale_prefix import ApiWidgetFixedYScalePrefix - -class TestApiWidgetFixedYScalePrefix(unittest.TestCase): - """ApiWidgetFixedYScalePrefix unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testApiWidgetFixedYScalePrefix(self): - """Test ApiWidgetFixedYScalePrefix""" - # inst = ApiWidgetFixedYScalePrefix() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_box_and_whiskers_datasource.py b/dashboards_api/test/test_box_and_whiskers_datasource.py deleted file mode 100644 index 1970c226..00000000 --- a/dashboards_api/test/test_box_and_whiskers_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource - -class TestBoxAndWhiskersDatasource(unittest.TestCase): - """BoxAndWhiskersDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBoxAndWhiskersDatasource(self): - """Test BoxAndWhiskersDatasource""" - # inst = BoxAndWhiskersDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_color_grid_datasource.py b/dashboards_api/test/test_color_grid_datasource.py deleted file mode 100644 index 74ed578a..00000000 --- a/dashboards_api/test/test_color_grid_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.color_grid_datasource import ColorGridDatasource - -class TestColorGridDatasource(unittest.TestCase): - """ColorGridDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testColorGridDatasource(self): - """Test ColorGridDatasource""" - # inst = ColorGridDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_dashboard_metric_direction.py b/dashboards_api/test/test_dashboard_metric_direction.py deleted file mode 100644 index bd5aa6d5..00000000 --- a/dashboards_api/test/test_dashboard_metric_direction.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.dashboard_metric_direction import DashboardMetricDirection - -class TestDashboardMetricDirection(unittest.TestCase): - """DashboardMetricDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDashboardMetricDirection(self): - """Test DashboardMetricDirection""" - # inst = DashboardMetricDirection() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_dashboard_snapshot_links.py b/dashboards_api/test/test_dashboard_snapshot_links.py deleted file mode 100644 index 2474ebeb..00000000 --- a/dashboards_api/test/test_dashboard_snapshot_links.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.dashboard_snapshot_links import DashboardSnapshotLinks - -class TestDashboardSnapshotLinks(unittest.TestCase): - """DashboardSnapshotLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DashboardSnapshotLinks: - """Test DashboardSnapshotLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DashboardSnapshotLinks` - """ - model = DashboardSnapshotLinks() - if include_optional: - return DashboardSnapshotLinks( - links = dashboards_api.models.dashboard_snapshot_links__links.DashboardSnapshotLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - app_link = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return DashboardSnapshotLinks( - ) - """ - - def testDashboardSnapshotLinks(self): - """Test DashboardSnapshotLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_dashboard_snapshot_links_links.py b/dashboards_api/test/test_dashboard_snapshot_links_links.py deleted file mode 100644 index 68479487..00000000 --- a/dashboards_api/test/test_dashboard_snapshot_links_links.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.dashboard_snapshot_links_links import DashboardSnapshotLinksLinks - -class TestDashboardSnapshotLinksLinks(unittest.TestCase): - """DashboardSnapshotLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DashboardSnapshotLinksLinks: - """Test DashboardSnapshotLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DashboardSnapshotLinksLinks` - """ - model = DashboardSnapshotLinksLinks() - if include_optional: - return DashboardSnapshotLinksLinks( - var_self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - app_link = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return DashboardSnapshotLinksLinks( - ) - """ - - def testDashboardSnapshotLinksLinks(self): - """Test DashboardSnapshotLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_dashboard_snapshots_api.py b/dashboards_api/test/test_dashboard_snapshots_api.py deleted file mode 100644 index 939d6835..00000000 --- a/dashboards_api/test/test_dashboard_snapshots_api.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from dashboards_api.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(self) -> None: - """Test case for create_dashboard_snapshot - - Create dashboard snapshot - """ - pass - - def test_dashboard_snapshot_by_id(self) -> None: - """Test case for dashboard_snapshot_by_id - - Retrieve dashboard snapshot - """ - pass - - def test_dashboard_snapshots(self) -> None: - """Test case for dashboard_snapshots - - List dashboard snapshots - """ - pass - - def test_delete_dashboard_snapshot(self) -> None: - """Test case for delete_dashboard_snapshot - - Delete dashboard snapshot - """ - pass - - def test_snapshot_data_by_widget(self) -> None: - """Test case for snapshot_data_by_widget - - Retrieve dashboard snapshot data - """ - pass - - def test_update_snapshot_expiration_date(self) -> None: - """Test case for update_snapshot_expiration_date - - Update snapshot expiration - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_dashboards_api.py b/dashboards_api/test/test_dashboards_api.py deleted file mode 100644 index 6aa61195..00000000 --- a/dashboards_api/test/test_dashboards_api.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from dashboards_api.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(self) -> None: - """Test case for create_dashboard - - Create dashboard - """ - pass - - def test_delete_dashboard(self) -> None: - """Test case for delete_dashboard - - Delete dashboard - """ - pass - - def test_get_dashboard_by_id(self) -> None: - """Test case for get_dashboard_by_id - - Retrieve dashboard - """ - pass - - def test_get_dashboard_data(self) -> None: - """Test case for get_dashboard_data - - Retrieve dashboard widget data - """ - pass - - def test_get_dashboards_for_user(self) -> None: - """Test case for get_dashboards_for_user - - List dashboards - """ - pass - - def test_update_dashboard(self) -> None: - """Test case for update_dashboard - - Update dashboard - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_duration_unit.py b/dashboards_api/test/test_duration_unit.py deleted file mode 100644 index c76c3440..00000000 --- a/dashboards_api/test/test_duration_unit.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.duration_unit import DurationUnit - -class TestDurationUnit(unittest.TestCase): - """DurationUnit unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDurationUnit(self): - """Test DurationUnit""" - # inst = DurationUnit() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_enterprise_agent_state.py b/dashboards_api/test/test_enterprise_agent_state.py deleted file mode 100644 index 7e978cd1..00000000 --- a/dashboards_api/test/test_enterprise_agent_state.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.enterprise_agent_state import EnterpriseAgentState - -class TestEnterpriseAgentState(unittest.TestCase): - """EnterpriseAgentState unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnterpriseAgentState(self): - """Test EnterpriseAgentState""" - # inst = EnterpriseAgentState() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_error.py b/dashboards_api/test/test_error.py deleted file mode 100644 index 1b7642c8..00000000 --- a/dashboards_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_get_dashboard_data200_response.py b/dashboards_api/test/test_get_dashboard_data200_response.py deleted file mode 100644 index 8c08148f..00000000 --- a/dashboards_api/test/test_get_dashboard_data200_response.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.get_dashboard_data200_response import GetDashboardData200Response - -class TestGetDashboardData200Response(unittest.TestCase): - """GetDashboardData200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDashboardData200Response: - """Test GetDashboardData200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDashboardData200Response` - """ - model = GetDashboardData200Response() - if include_optional: - return GetDashboardData200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - group_labels = [ - dashboards_api.models.api_report_data_component_label_map.ApiReportDataComponentLabelMap( - group_property = 'AGENT', ) - ], - bin_size = 3600, - data = dashboards_api.models.api_widgets_data_v2.ApiWidgetsDataV2( - cards = [ - dashboards_api.models.api_numbers_card_data.ApiNumbersCardData( - card_id = 'lrxxr', - start_date = '2023-05-16T10:14:28Z', - end_date = '2023-05-16T10:14:28Z', - previous_value = 500.0, - bin_size = 3600, - timestamp = 1567620000, - number_of_data_points = 24192, - value = 100.0, - status = 'No data', - alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( - id = '281474976710662', - name = 'Test dashboards', - test_ids = ["281474976710661"], - start_times = ["2023-05-16T10:14:28Z"], - duration_in_seconds = 7200, - repeat = 'custom', - repeat_every = 5, - repeat_unit = 'week', ) - ], ) - ], - columns = [ - dashboards_api.models.api_multi_metric_column_data.ApiMultiMetricColumnData( - column_id = '938to', - bin_size = 3600, - points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( - timestamp = 1567620000, - number_of_data_points = 23304, - value = 100.0, - groups = [ - dashboards_api.models.api_data_point_group.ApiDataPointGroup( - group_property = 'COUNTRY', - group_value = 'US', ) - ], ) - ], - status = 'No data', ) - ], - points = [ - dashboards_api.models.api_widget_data_point.ApiWidgetDataPoint( - timestamp = 1567620000, - number_of_data_points = 23304, - value = 100.0, ) - ], - tests = [ - dashboards_api.models.api_test_table_data.ApiTestTableData( - test_id = '68256', - test_name = 'Http Test Name', - target = 'www.google.com', - test_type = 'Web - HTTP Server', - alert_count = 398, - is_shared = True, - graphlets = [ - dashboards_api.models.api_test_table_graphlets_data.ApiTestTableGraphletsData( - metric = 'Availability', - test_id = '68257', ) - ], ) - ], - start_round = 1384309800, - alert_suppression_windows = [ - dashboards_api.models.api_dashboard_asw.ApiDashboardAsw( - id = '281474976710662', - name = 'Test dashboards', - test_ids = ["281474976710661"], - start_times = ["2023-05-16T10:14:28Z"], - duration_in_seconds = 7200, - repeat_every = 5, ) - ], - total_alerts = 500, - active_alerts = 483, - alerts = [ - dashboards_api.models.api_alert_list_alert.ApiAlertListAlert( - alert_id = '2004945', - test_id = '56512', - rule_id = '281724', - alert_source = 'Http Test', - alert_rule = 'Http Test Rule', - alert_type = 'Network - End-to-End (Server)', - start_time = '2023-06-02T08:54Z', - duration_in_seconds = 25, - active = True, ) - ], - summary = dashboards_api.models.api_agent_status_summary.ApiAgentStatusSummary( - online = 10, - offline = 2, - disabled = 3, ), - agents = [ - dashboards_api.models.api_agent_status_agent.ApiAgentStatusAgent( - agent_id = '6522', - status = 'online', - ip_info = dashboards_api.models.api_agent_status_ip_info.ApiAgentStatusIpInfo( - public_ip = '172.58.92.31', - private_ip = '172.58.92.31', - ipv6 = '', - operative_system_version = '', ), - agent_name = '0c3898000117', - location = dashboards_api.models.api_agent_location.ApiAgentLocation( - latitude = 37.77493, - longitude = -122.41942, - location_name = 'San Francisco, California, US', ), ) - ], - status = 'No data', ), - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetDashboardData200Response( - ) - """ - - def testGetDashboardData200Response(self): - """Test GetDashboardData200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_grouped_bar_chart_datasource.py b/dashboards_api/test/test_grouped_bar_chart_datasource.py deleted file mode 100644 index 5a5aa414..00000000 --- a/dashboards_api/test/test_grouped_bar_chart_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.grouped_bar_chart_datasource import GroupedBarChartDatasource - -class TestGroupedBarChartDatasource(unittest.TestCase): - """GroupedBarChartDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGroupedBarChartDatasource(self): - """Test GroupedBarChartDatasource""" - # inst = GroupedBarChartDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_link.py b/dashboards_api/test/test_link.py deleted file mode 100644 index 26c6a732..00000000 --- a/dashboards_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_multi_metrics_table_datasource.py b/dashboards_api/test/test_multi_metrics_table_datasource.py deleted file mode 100644 index 928d9963..00000000 --- a/dashboards_api/test/test_multi_metrics_table_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.multi_metrics_table_datasource import MultiMetricsTableDatasource - -class TestMultiMetricsTableDatasource(unittest.TestCase): - """MultiMetricsTableDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMultiMetricsTableDatasource(self): - """Test MultiMetricsTableDatasource""" - # inst = MultiMetricsTableDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_numbers_card_datasource.py b/dashboards_api/test/test_numbers_card_datasource.py deleted file mode 100644 index 3e8c03a2..00000000 --- a/dashboards_api/test/test_numbers_card_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.numbers_card_datasource import NumbersCardDatasource - -class TestNumbersCardDatasource(unittest.TestCase): - """NumbersCardDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNumbersCardDatasource(self): - """Test NumbersCardDatasource""" - # inst = NumbersCardDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_pagination_links.py b/dashboards_api/test/test_pagination_links.py deleted file mode 100644 index 522519a2..00000000 --- a/dashboards_api/test/test_pagination_links.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.pagination_links import PaginationLinks - -class TestPaginationLinks(unittest.TestCase): - """PaginationLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinks: - """Test PaginationLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinks` - """ - model = PaginationLinks() - if include_optional: - return PaginationLinks( - links = dashboards_api.models.pagination_links__links.PaginationLinks__links( - previous = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationLinks( - ) - """ - - def testPaginationLinks(self): - """Test PaginationLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_pagination_links_links.py b/dashboards_api/test/test_pagination_links_links.py deleted file mode 100644 index 2816e576..00000000 --- a/dashboards_api/test/test_pagination_links_links.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.pagination_links_links import PaginationLinksLinks - -class TestPaginationLinksLinks(unittest.TestCase): - """PaginationLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinksLinks: - """Test PaginationLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinksLinks` - """ - model = PaginationLinksLinks() - if include_optional: - return PaginationLinksLinks( - previous = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationLinksLinks( - ) - """ - - def testPaginationLinksLinks(self): - """Test PaginationLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_pie_chart_datasource.py b/dashboards_api/test/test_pie_chart_datasource.py deleted file mode 100644 index e60651c6..00000000 --- a/dashboards_api/test/test_pie_chart_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.pie_chart_datasource import PieChartDatasource - -class TestPieChartDatasource(unittest.TestCase): - """PieChartDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPieChartDatasource(self): - """Test PieChartDatasource""" - # inst = PieChartDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_query_window.py b/dashboards_api/test/test_query_window.py deleted file mode 100644 index b6294573..00000000 --- a/dashboards_api/test/test_query_window.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.query_window import QueryWindow - -class TestQueryWindow(unittest.TestCase): - """QueryWindow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryWindow: - """Test QueryWindow - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryWindow` - """ - model = QueryWindow() - if include_optional: - return QueryWindow( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z' - ) - else: - return QueryWindow( - ) - """ - - def testQueryWindow(self): - """Test QueryWindow""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_self_links.py b/dashboards_api/test/test_self_links.py deleted file mode 100644 index 7679e88a..00000000 --- a/dashboards_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = dashboards_api.models.self_links__links.SelfLinks__links( - self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_self_links_links.py b/dashboards_api/test/test_self_links_links.py deleted file mode 100644 index e63764b7..00000000 --- a/dashboards_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = dashboards_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_stacked_area_chart_datasource.py b/dashboards_api/test/test_stacked_area_chart_datasource.py deleted file mode 100644 index 1f21ee44..00000000 --- a/dashboards_api/test/test_stacked_area_chart_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.stacked_area_chart_datasource import StackedAreaChartDatasource - -class TestStackedAreaChartDatasource(unittest.TestCase): - """StackedAreaChartDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStackedAreaChartDatasource(self): - """Test StackedAreaChartDatasource""" - # inst = StackedAreaChartDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_stacked_bar_chart_datasource.py b/dashboards_api/test/test_stacked_bar_chart_datasource.py deleted file mode 100644 index 4a73f4af..00000000 --- a/dashboards_api/test/test_stacked_bar_chart_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.stacked_bar_chart_datasource import StackedBarChartDatasource - -class TestStackedBarChartDatasource(unittest.TestCase): - """StackedBarChartDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStackedBarChartDatasource(self): - """Test StackedBarChartDatasource""" - # inst = StackedBarChartDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_table_datasource.py b/dashboards_api/test/test_table_datasource.py deleted file mode 100644 index 3ce0d9c6..00000000 --- a/dashboards_api/test/test_table_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.table_datasource import TableDatasource - -class TestTableDatasource(unittest.TestCase): - """TableDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTableDatasource(self): - """Test TableDatasource""" - # inst = TableDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_test_table_datasource.py b/dashboards_api/test/test_test_table_datasource.py deleted file mode 100644 index 35d88261..00000000 --- a/dashboards_api/test/test_test_table_datasource.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.test_table_datasource import TestTableDatasource - -class TestTestTableDatasource(unittest.TestCase): - """TestTableDatasource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestTableDatasource(self): - """Test TestTableDatasource""" - # inst = TestTableDatasource() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_test_table_filter_key.py b/dashboards_api/test/test_test_table_filter_key.py deleted file mode 100644 index 00d31b18..00000000 --- a/dashboards_api/test/test_test_table_filter_key.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.test_table_filter_key import TestTableFilterKey - -class TestTestTableFilterKey(unittest.TestCase): - """TestTableFilterKey unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestTableFilterKey(self): - """Test TestTableFilterKey""" - # inst = TestTableFilterKey() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_test_table_filter_type.py b/dashboards_api/test/test_test_table_filter_type.py deleted file mode 100644 index 0f8a1fd5..00000000 --- a/dashboards_api/test/test_test_table_filter_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.test_table_filter_type import TestTableFilterType - -class TestTestTableFilterType(unittest.TestCase): - """TestTableFilterType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestTableFilterType(self): - """Test TestTableFilterType""" - # inst = TestTableFilterType() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_unauthorized_error.py b/dashboards_api/test/test_unauthorized_error.py deleted file mode 100644 index 2c7a4abf..00000000 --- a/dashboards_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_widget_sort_direction.py b/dashboards_api/test/test_widget_sort_direction.py deleted file mode 100644 index 708b7f63..00000000 --- a/dashboards_api/test/test_widget_sort_direction.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.widget_sort_direction import WidgetSortDirection - -class TestWidgetSortDirection(unittest.TestCase): - """WidgetSortDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testWidgetSortDirection(self): - """Test WidgetSortDirection""" - # inst = WidgetSortDirection() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/test/test_widget_sort_property.py b/dashboards_api/test/test_widget_sort_property.py deleted file mode 100644 index 3f843da0..00000000 --- a/dashboards_api/test/test_widget_sort_property.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Dashboards API - - Manage ThousandEyes Dashboards - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from dashboards_api.models.widget_sort_property import WidgetSortProperty - -class TestWidgetSortProperty(unittest.TestCase): - """WidgetSortProperty unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testWidgetSortProperty(self): - """Test WidgetSortProperty""" - # inst = WidgetSortProperty() - -if __name__ == '__main__': - unittest.main() diff --git a/dashboards_api/tox.ini b/dashboards_api/tox.ini deleted file mode 100644 index 36415774..00000000 --- a/dashboards_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=dashboards_api diff --git a/endpoint/agents_api/.github/workflows/python.yml b/endpoint/agents_api/.github/workflows/python.yml deleted file mode 100644 index 129fc497..00000000 --- a/endpoint/agents_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: agents_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/endpoint/agents_api/.gitlab-ci.yml b/endpoint/agents_api/.gitlab-ci.yml deleted file mode 100644 index 337432fd..00000000 --- a/endpoint/agents_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=agents_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/endpoint/agents_api/.openapi-generator/FILES b/endpoint/agents_api/.openapi-generator/FILES deleted file mode 100644 index 257a9366..00000000 --- a/endpoint/agents_api/.openapi-generator/FILES +++ /dev/null @@ -1,158 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -agents_api/__init__.py -agents_api/api/__init__.py -agents_api/api/administrative_endpoints_api.py -agents_api/api/manage_agents_api.py -agents_api/api/transfer_api.py -agents_api/api_client.py -agents_api/api_response.py -agents_api/configuration.py -agents_api/exceptions.py -agents_api/models/__init__.py -agents_api/models/account_group_id.py -agents_api/models/address_profile.py -agents_api/models/address_type.py -agents_api/models/agent_license_type.py -agents_api/models/agent_search_request.py -agents_api/models/agent_search_request_search_filters.py -agents_api/models/agent_transfer.py -agents_api/models/agent_transfer_request.py -agents_api/models/browser_type.py -agents_api/models/endpoint_agent.py -agents_api/models/endpoint_agent_aid.py -agents_api/models/endpoint_agent_bulk_transfer207_response.py -agents_api/models/endpoint_agent_bulk_transfer207_response_items_inner.py -agents_api/models/endpoint_agent_bulk_transfer_request.py -agents_api/models/endpoint_agent_get200_response.py -agents_api/models/endpoint_agent_location.py -agents_api/models/endpoint_agent_update.py -agents_api/models/endpoint_agents.py -agents_api/models/endpoint_agents_agents_inner.py -agents_api/models/endpoint_agents_connection_string200_response.py -agents_api/models/endpoint_agents_list200_response.py -agents_api/models/endpoint_agents_search200_response.py -agents_api/models/endpoint_asn_details.py -agents_api/models/endpoint_browser_extension.py -agents_api/models/endpoint_client.py -agents_api/models/endpoint_user_profile.py -agents_api/models/endpoint_vpn_profile.py -agents_api/models/error.py -agents_api/models/ethernet_profile.py -agents_api/models/expand.py -agents_api/models/interface_hardware_type.py -agents_api/models/interface_profile.py -agents_api/models/link.py -agents_api/models/pagination_next_link.py -agents_api/models/pagination_next_link_links.py -agents_api/models/platform.py -agents_api/models/self_links.py -agents_api/models/self_links_links.py -agents_api/models/status.py -agents_api/models/unauthorized_error.py -agents_api/models/vpn_type.py -agents_api/models/wireless_profile.py -agents_api/py.typed -agents_api/rest.py -docs/AccountGroupId.md -docs/AddressProfile.md -docs/AddressType.md -docs/AdministrativeEndpointsApi.md -docs/AgentLicenseType.md -docs/AgentSearchRequest.md -docs/AgentSearchRequestSearchFilters.md -docs/AgentTransfer.md -docs/AgentTransferRequest.md -docs/BrowserType.md -docs/EndpointAgent.md -docs/EndpointAgentAid.md -docs/EndpointAgentBulkTransfer207Response.md -docs/EndpointAgentBulkTransfer207ResponseItemsInner.md -docs/EndpointAgentBulkTransferRequest.md -docs/EndpointAgentGet200Response.md -docs/EndpointAgentLocation.md -docs/EndpointAgentUpdate.md -docs/EndpointAgents.md -docs/EndpointAgentsAgentsInner.md -docs/EndpointAgentsConnectionString200Response.md -docs/EndpointAgentsList200Response.md -docs/EndpointAgentsSearch200Response.md -docs/EndpointAsnDetails.md -docs/EndpointBrowserExtension.md -docs/EndpointClient.md -docs/EndpointUserProfile.md -docs/EndpointVpnProfile.md -docs/Error.md -docs/EthernetProfile.md -docs/Expand.md -docs/InterfaceHardwareType.md -docs/InterfaceProfile.md -docs/Link.md -docs/ManageAgentsApi.md -docs/PaginationNextLink.md -docs/PaginationNextLinkLinks.md -docs/Platform.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/Status.md -docs/TransferApi.md -docs/UnauthorizedError.md -docs/VpnType.md -docs/WirelessProfile.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group_id.py -test/test_address_profile.py -test/test_address_type.py -test/test_administrative_endpoints_api.py -test/test_agent_license_type.py -test/test_agent_search_request.py -test/test_agent_search_request_search_filters.py -test/test_agent_transfer.py -test/test_agent_transfer_request.py -test/test_browser_type.py -test/test_endpoint_agent.py -test/test_endpoint_agent_aid.py -test/test_endpoint_agent_bulk_transfer207_response.py -test/test_endpoint_agent_bulk_transfer207_response_items_inner.py -test/test_endpoint_agent_bulk_transfer_request.py -test/test_endpoint_agent_get200_response.py -test/test_endpoint_agent_location.py -test/test_endpoint_agent_update.py -test/test_endpoint_agents.py -test/test_endpoint_agents_agents_inner.py -test/test_endpoint_agents_connection_string200_response.py -test/test_endpoint_agents_list200_response.py -test/test_endpoint_agents_search200_response.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_interface_hardware_type.py -test/test_interface_profile.py -test/test_link.py -test/test_manage_agents_api.py -test/test_pagination_next_link.py -test/test_pagination_next_link_links.py -test/test_platform.py -test/test_self_links.py -test/test_self_links_links.py -test/test_status.py -test/test_transfer_api.py -test/test_unauthorized_error.py -test/test_vpn_type.py -test/test_wireless_profile.py -tox.ini diff --git a/endpoint/agents_api/.openapi-generator/VERSION b/endpoint/agents_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/endpoint/agents_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/endpoint/agents_api/.travis.yml b/endpoint/agents_api/.travis.yml deleted file mode 100644 index 7ade2997..00000000 --- a/endpoint/agents_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=agents_api diff --git a/endpoint/agents_api/README.md b/endpoint/agents_api/README.md deleted file mode 100644 index 1c5b1205..00000000 --- a/endpoint/agents_api/README.md +++ /dev/null @@ -1,170 +0,0 @@ -# agents-api -Manage ThousandEyes Endpoint Agents using this API. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import agents_api -``` - -### 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 agents_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import agents_api -from agents_api.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 = agents_api.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 = agents_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agents_api.AdministrativeEndpointsApi(api_client) - aid = '2067' # 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 agent connection string - api_response = api_instance.endpoint_agents_connection_string(aid=aid) - print("The response of AdministrativeEndpointsApi->endpoint_agents_connection_string:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling AdministrativeEndpointsApi->endpoint_agents_connection_string: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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 - - -## Documentation For Models - - - [AccountGroupId](docs/AccountGroupId.md) - - [AddressProfile](docs/AddressProfile.md) - - [AddressType](docs/AddressType.md) - - [AgentLicenseType](docs/AgentLicenseType.md) - - [AgentSearchRequest](docs/AgentSearchRequest.md) - - [AgentSearchRequestSearchFilters](docs/AgentSearchRequestSearchFilters.md) - - [AgentTransfer](docs/AgentTransfer.md) - - [AgentTransferRequest](docs/AgentTransferRequest.md) - - [BrowserType](docs/BrowserType.md) - - [EndpointAgent](docs/EndpointAgent.md) - - [EndpointAgentAid](docs/EndpointAgentAid.md) - - [EndpointAgentBulkTransfer207Response](docs/EndpointAgentBulkTransfer207Response.md) - - [EndpointAgentBulkTransfer207ResponseItemsInner](docs/EndpointAgentBulkTransfer207ResponseItemsInner.md) - - [EndpointAgentBulkTransferRequest](docs/EndpointAgentBulkTransferRequest.md) - - [EndpointAgentGet200Response](docs/EndpointAgentGet200Response.md) - - [EndpointAgentLocation](docs/EndpointAgentLocation.md) - - [EndpointAgentUpdate](docs/EndpointAgentUpdate.md) - - [EndpointAgents](docs/EndpointAgents.md) - - [EndpointAgentsAgentsInner](docs/EndpointAgentsAgentsInner.md) - - [EndpointAgentsConnectionString200Response](docs/EndpointAgentsConnectionString200Response.md) - - [EndpointAgentsList200Response](docs/EndpointAgentsList200Response.md) - - [EndpointAgentsSearch200Response](docs/EndpointAgentsSearch200Response.md) - - [EndpointAsnDetails](docs/EndpointAsnDetails.md) - - [EndpointBrowserExtension](docs/EndpointBrowserExtension.md) - - [EndpointClient](docs/EndpointClient.md) - - [EndpointUserProfile](docs/EndpointUserProfile.md) - - [EndpointVpnProfile](docs/EndpointVpnProfile.md) - - [Error](docs/Error.md) - - [EthernetProfile](docs/EthernetProfile.md) - - [Expand](docs/Expand.md) - - [InterfaceHardwareType](docs/InterfaceHardwareType.md) - - [InterfaceProfile](docs/InterfaceProfile.md) - - [Link](docs/Link.md) - - [PaginationNextLink](docs/PaginationNextLink.md) - - [PaginationNextLinkLinks](docs/PaginationNextLinkLinks.md) - - [Platform](docs/Platform.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [Status](docs/Status.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [VpnType](docs/VpnType.md) - - [WirelessProfile](docs/WirelessProfile.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/endpoint/agents_api/agents_api/__init__.py b/endpoint/agents_api/agents_api/__init__.py deleted file mode 100644 index 6e0e40eb..00000000 --- a/endpoint/agents_api/agents_api/__init__.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 agents_api.api.administrative_endpoints_api import AdministrativeEndpointsApi -from agents_api.api.manage_agents_api import ManageAgentsApi -from agents_api.api.transfer_api import TransferApi - -# import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.api_client import ApiClient -from agents_api.configuration import Configuration -from agents_api.exceptions import OpenApiException -from agents_api.exceptions import ApiTypeError -from agents_api.exceptions import ApiValueError -from agents_api.exceptions import ApiKeyError -from agents_api.exceptions import ApiAttributeError -from agents_api.exceptions import ApiException - -# import models into sdk package -from agents_api.models.account_group_id import AccountGroupId -from agents_api.models.address_profile import AddressProfile -from agents_api.models.address_type import AddressType -from agents_api.models.agent_license_type import AgentLicenseType -from agents_api.models.agent_search_request import AgentSearchRequest -from agents_api.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters -from agents_api.models.agent_transfer import AgentTransfer -from agents_api.models.agent_transfer_request import AgentTransferRequest -from agents_api.models.browser_type import BrowserType -from agents_api.models.endpoint_agent import EndpointAgent -from agents_api.models.endpoint_agent_aid import EndpointAgentAid -from agents_api.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response -from agents_api.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner -from agents_api.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.models.endpoint_agent_location import EndpointAgentLocation -from agents_api.models.endpoint_agent_update import EndpointAgentUpdate -from agents_api.models.endpoint_agents import EndpointAgents -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner -from agents_api.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response -from agents_api.models.endpoint_agents_list200_response import EndpointAgentsList200Response -from agents_api.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response -from agents_api.models.endpoint_asn_details import EndpointAsnDetails -from agents_api.models.endpoint_browser_extension import EndpointBrowserExtension -from agents_api.models.endpoint_client import EndpointClient -from agents_api.models.endpoint_user_profile import EndpointUserProfile -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile -from agents_api.models.error import Error -from agents_api.models.ethernet_profile import EthernetProfile -from agents_api.models.expand import Expand -from agents_api.models.interface_hardware_type import InterfaceHardwareType -from agents_api.models.interface_profile import InterfaceProfile -from agents_api.models.link import Link -from agents_api.models.pagination_next_link import PaginationNextLink -from agents_api.models.pagination_next_link_links import PaginationNextLinkLinks -from agents_api.models.platform import Platform -from agents_api.models.self_links import SelfLinks -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.status import Status -from agents_api.models.unauthorized_error import UnauthorizedError -from agents_api.models.vpn_type import VpnType -from agents_api.models.wireless_profile import WirelessProfile diff --git a/endpoint/agents_api/agents_api/api/__init__.py b/endpoint/agents_api/agents_api/api/__init__.py deleted file mode 100644 index e6d20dcb..00000000 --- a/endpoint/agents_api/agents_api/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# flake8: noqa - -# import apis into api package -from agents_api.api.administrative_endpoints_api import AdministrativeEndpointsApi -from agents_api.api.manage_agents_api import ManageAgentsApi -from agents_api.api.transfer_api import TransferApi - diff --git a/endpoint/agents_api/agents_api/api_client.py b/endpoint/agents_api/agents_api/api_client.py deleted file mode 100644 index cab7c5b0..00000000 --- a/endpoint/agents_api/agents_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from agents_api.configuration import Configuration -from agents_api.api_response import ApiResponse -import agents_api.models -from agents_api import rest -from agents_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(agents_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/endpoint/agents_api/agents_api/api_response.py b/endpoint/agents_api/agents_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/endpoint/agents_api/agents_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/endpoint/agents_api/agents_api/configuration.py b/endpoint/agents_api/agents_api/configuration.py deleted file mode 100644 index a57db30e..00000000 --- a/endpoint/agents_api/agents_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("agents_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/endpoint/agents_api/agents_api/exceptions.py b/endpoint/agents_api/agents_api/exceptions.py deleted file mode 100644 index 07dd45ce..00000000 --- a/endpoint/agents_api/agents_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/endpoint/agents_api/agents_api/models/__init__.py b/endpoint/agents_api/agents_api/models/__init__.py deleted file mode 100644 index 3791e077..00000000 --- a/endpoint/agents_api/agents_api/models/__init__.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from agents_api.models.account_group_id import AccountGroupId -from agents_api.models.address_profile import AddressProfile -from agents_api.models.address_type import AddressType -from agents_api.models.agent_license_type import AgentLicenseType -from agents_api.models.agent_search_request import AgentSearchRequest -from agents_api.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters -from agents_api.models.agent_transfer import AgentTransfer -from agents_api.models.agent_transfer_request import AgentTransferRequest -from agents_api.models.browser_type import BrowserType -from agents_api.models.endpoint_agent import EndpointAgent -from agents_api.models.endpoint_agent_aid import EndpointAgentAid -from agents_api.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response -from agents_api.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner -from agents_api.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.models.endpoint_agent_location import EndpointAgentLocation -from agents_api.models.endpoint_agent_update import EndpointAgentUpdate -from agents_api.models.endpoint_agents import EndpointAgents -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner -from agents_api.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response -from agents_api.models.endpoint_agents_list200_response import EndpointAgentsList200Response -from agents_api.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response -from agents_api.models.endpoint_asn_details import EndpointAsnDetails -from agents_api.models.endpoint_browser_extension import EndpointBrowserExtension -from agents_api.models.endpoint_client import EndpointClient -from agents_api.models.endpoint_user_profile import EndpointUserProfile -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile -from agents_api.models.error import Error -from agents_api.models.ethernet_profile import EthernetProfile -from agents_api.models.expand import Expand -from agents_api.models.interface_hardware_type import InterfaceHardwareType -from agents_api.models.interface_profile import InterfaceProfile -from agents_api.models.link import Link -from agents_api.models.pagination_next_link import PaginationNextLink -from agents_api.models.pagination_next_link_links import PaginationNextLinkLinks -from agents_api.models.platform import Platform -from agents_api.models.self_links import SelfLinks -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.status import Status -from agents_api.models.unauthorized_error import UnauthorizedError -from agents_api.models.vpn_type import VpnType -from agents_api.models.wireless_profile import WirelessProfile diff --git a/endpoint/agents_api/agents_api/models/account_group_id.py b/endpoint/agents_api/agents_api/models/account_group_id.py deleted file mode 100644 index eb22a6b0..00000000 --- a/endpoint/agents_api/agents_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/address_type.py b/endpoint/agents_api/agents_api/models/address_type.py deleted file mode 100644 index 010e0682..00000000 --- a/endpoint/agents_api/agents_api/models/address_type.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AddressType(str, Enum): - """ - AddressType - """ - - """ - allowed enum values - """ - LOOPBACK = 'loopback' - UNSPECIFIED = 'unspecified' - UNIQUE_MINUS_LOCAL = 'unique-local' - LINK_MINUS_LOCAL = 'link-local' - UNIQUE_MINUS_GLOBAL = 'unique-global' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AddressType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/agent_license_type.py b/endpoint/agents_api/agents_api/models/agent_license_type.py deleted file mode 100644 index 83079402..00000000 --- a/endpoint/agents_api/agents_api/models/agent_license_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentLicenseType(str, Enum): - """ - AgentLicenseType - """ - - """ - allowed enum values - """ - ESSENTIALS = 'essentials' - ADVANTAGE = 'advantage' - EMBEDDED = 'embedded' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentLicenseType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/agent_search_request.py b/endpoint/agents_api/agents_api/models/agent_search_request.py deleted file mode 100644 index 8e0ccc66..00000000 --- a/endpoint/agents_api/agents_api/models/agent_search_request.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentSearchRequest(BaseModel): - """ - Parameters for filtering a list of agents. - """ # noqa: E501 - search_filters: Optional[AgentSearchRequestSearchFilters] = Field(default=None, alias="searchFilters") - __properties: ClassVar[List[str]] = ["searchFilters"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentSearchRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of search_filters - if self.search_filters: - _dict['searchFilters'] = self.search_filters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AgentSearchRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "searchFilters": AgentSearchRequestSearchFilters.from_dict(obj.get("searchFilters")) if obj.get("searchFilters") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/agent_transfer_request.py b/endpoint/agents_api/agents_api/models/agent_transfer_request.py deleted file mode 100644 index 4053c092..00000000 --- a/endpoint/agents_api/agents_api/models/agent_transfer_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentTransferRequest(BaseModel): - """ - AgentTransferRequest - """ # noqa: E501 - to_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.", alias="toAid") - __properties: ClassVar[List[str]] = ["toAid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentTransferRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AgentTransferRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "toAid": obj.get("toAid") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/browser_type.py b/endpoint/agents_api/agents_api/models/browser_type.py deleted file mode 100644 index c1c1fcad..00000000 --- a/endpoint/agents_api/agents_api/models/browser_type.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class BrowserType(str, Enum): - """ - BrowserType - """ - - """ - allowed enum values - """ - CHROME = 'chrome' - CHROME_MINUS_CANARY = 'chrome-canary' - CHROMIUM = 'chromium' - IE = 'ie' - EDGE = 'edge' - UNKNOWN = 'unknown' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BrowserType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_aid.py b/endpoint/agents_api/agents_api/models/endpoint_agent_aid.py deleted file mode 100644 index 04eb316f..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_aid.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentAid(BaseModel): - """ - EndpointAgentAid - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentAid 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentAid 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") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response.py b/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response.py deleted file mode 100644 index 7388f74f..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from agents_api.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentBulkTransfer207Response(BaseModel): - """ - EndpointAgentBulkTransfer207Response - """ # noqa: E501 - items: Optional[List[EndpointAgentBulkTransfer207ResponseItemsInner]] = None - __properties: ClassVar[List[str]] = ["items"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentBulkTransfer207Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item in self.items: - if _item: - _items.append(_item.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentBulkTransfer207Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [EndpointAgentBulkTransfer207ResponseItemsInner.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer_request.py b/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer_request.py deleted file mode 100644 index f0b00d87..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from agents_api.models.agent_transfer import AgentTransfer -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentBulkTransferRequest(BaseModel): - """ - EndpointAgentBulkTransferRequest - """ # noqa: E501 - transfers: Optional[List[AgentTransfer]] = None - __properties: ClassVar[List[str]] = ["transfers"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentBulkTransferRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in transfers (list) - _items = [] - if self.transfers: - for _item in self.transfers: - if _item: - _items.append(_item.to_dict()) - _dict['transfers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentBulkTransferRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "transfers": [AgentTransfer.from_dict(_item) for _item in obj.get("transfers")] if obj.get("transfers") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_location.py b/endpoint/agents_api/agents_api/models/endpoint_agent_location.py deleted file mode 100644 index 72273a41..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_location.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentLocation(BaseModel): - """ - Approximate location of the agent. - """ # noqa: E501 - latitude: Optional[Union[StrictFloat, StrictInt]] = None - longitude: Optional[Union[StrictFloat, StrictInt]] = None - location_name: Optional[StrictStr] = Field(default=None, alias="locationName") - __properties: ClassVar[List[str]] = ["latitude", "longitude", "locationName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentLocation 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "latitude", - "longitude", - "location_name", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentLocation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "latitude": obj.get("latitude"), - "longitude": obj.get("longitude"), - "locationName": obj.get("locationName") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_update.py b/endpoint/agents_api/agents_api/models/endpoint_agent_update.py deleted file mode 100644 index 232aa15c..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_update.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.agent_license_type import AgentLicenseType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentUpdate(BaseModel): - """ - The `EndpointAgentUpdate` object contains supported fields for updates. - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="New agent name.") - license_type: Optional[List[AgentLicenseType]] = Field(default=None, description="New license type.", alias="licenseType") - __properties: ClassVar[List[str]] = ["name", "licenseType"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentUpdate 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "name", - "license_type", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentUpdate 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"), - "licenseType": obj.get("licenseType") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agents.py b/endpoint/agents_api/agents_api/models/endpoint_agents.py deleted file mode 100644 index d94eba28..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agents.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgents(BaseModel): - """ - A list of `EndpointAgents`. - """ # noqa: E501 - total_agents: Optional[StrictInt] = Field(default=None, description="The total number of agents.", alias="totalAgents") - agents: Optional[List[EndpointAgentsAgentsInner]] = None - __properties: ClassVar[List[str]] = ["totalAgents", "agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgents 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of EndpointAgents from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "totalAgents": obj.get("totalAgents"), - "agents": [EndpointAgentsAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agents_connection_string200_response.py b/endpoint/agents_api/agents_api/models/endpoint_agents_connection_string200_response.py deleted file mode 100644 index e4768912..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agents_connection_string200_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentsConnectionString200Response(BaseModel): - """ - EndpointAgentsConnectionString200Response - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - connection_string: Optional[StrictStr] = Field(default=None, description="The connection string is used for some integrations and other client types. ", alias="connectionString") - __properties: ClassVar[List[str]] = ["_links", "connectionString"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentsConnectionString200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of EndpointAgentsConnectionString200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "connectionString": obj.get("connectionString") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agents_list200_response.py b/endpoint/agents_api/agents_api/models/endpoint_agents_list200_response.py deleted file mode 100644 index 0d1ccbea..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agents_list200_response.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentsList200Response(BaseModel): - """ - EndpointAgentsList200Response - """ # noqa: E501 - total_agents: Optional[StrictInt] = Field(default=None, description="The total number of agents.", alias="totalAgents") - agents: Optional[List[EndpointAgentsAgentsInner]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["totalAgents", "agents", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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 - # 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: Dict) -> Self: - """Create an instance of EndpointAgentsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "totalAgents": obj.get("totalAgents"), - "agents": [EndpointAgentsAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_agents_search200_response.py b/endpoint/agents_api/agents_api/models/endpoint_agents_search200_response.py deleted file mode 100644 index 93e29db4..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_agents_search200_response.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner -from agents_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentsSearch200Response(BaseModel): - """ - EndpointAgentsSearch200Response - """ # noqa: E501 - total_agents: Optional[StrictInt] = Field(default=None, description="The total number of agents.", alias="totalAgents") - agents: Optional[List[EndpointAgentsAgentsInner]] = None - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["totalAgents", "agents", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentsSearch200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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 - # 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: Dict) -> Self: - """Create an instance of EndpointAgentsSearch200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "totalAgents": obj.get("totalAgents"), - "agents": [EndpointAgentsAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_asn_details.py b/endpoint/agents_api/agents_api/models/endpoint_asn_details.py deleted file mode 100644 index b8445f4e..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_asn_details.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAsnDetails(BaseModel): - """ - EndpointAsnDetails - """ # noqa: E501 - as_number: StrictInt = Field(description="Autonomous system number.", alias="asNumber") - as_name: Optional[StrictStr] = Field(default=None, description="Name of autonomous system.", alias="asName") - __properties: ClassVar[List[str]] = ["asNumber", "asName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAsnDetails 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAsnDetails from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "asNumber": obj.get("asNumber"), - "asName": obj.get("asName") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_client.py b/endpoint/agents_api/agents_api/models/endpoint_client.py deleted file mode 100644 index 43443d02..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_client.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.endpoint_browser_extension import EndpointBrowserExtension -from agents_api.models.endpoint_user_profile import EndpointUserProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointClient(BaseModel): - """ - Information about the user who has the agent installed. - """ # noqa: E501 - user_profile: Optional[EndpointUserProfile] = Field(default=None, alias="userProfile") - browser_extensions: Optional[List[EndpointBrowserExtension]] = Field(default=None, alias="browserExtensions") - __properties: ClassVar[List[str]] = ["userProfile", "browserExtensions"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointClient 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of user_profile - if self.user_profile: - _dict['userProfile'] = self.user_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in browser_extensions (list) - _items = [] - if self.browser_extensions: - for _item in self.browser_extensions: - if _item: - _items.append(_item.to_dict()) - _dict['browserExtensions'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointClient from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "userProfile": EndpointUserProfile.from_dict(obj.get("userProfile")) if obj.get("userProfile") is not None else None, - "browserExtensions": [EndpointBrowserExtension.from_dict(_item) for _item in obj.get("browserExtensions")] if obj.get("browserExtensions") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/endpoint_user_profile.py b/endpoint/agents_api/agents_api/models/endpoint_user_profile.py deleted file mode 100644 index a807c9e5..00000000 --- a/endpoint/agents_api/agents_api/models/endpoint_user_profile.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointUserProfile(BaseModel): - """ - EndpointUserProfile - """ # noqa: E501 - user_name: StrictStr = Field(alias="userName") - __properties: ClassVar[List[str]] = ["userName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointUserProfile 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointUserProfile from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "userName": obj.get("userName") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/error.py b/endpoint/agents_api/agents_api/models/error.py deleted file mode 100644 index 5394767f..00000000 --- a/endpoint/agents_api/agents_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/agents_api/agents_api/models/ethernet_profile.py b/endpoint/agents_api/agents_api/models/ethernet_profile.py deleted file mode 100644 index 243da20a..00000000 --- a/endpoint/agents_api/agents_api/models/ethernet_profile.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EthernetProfile(BaseModel): - """ - Information about the ethernet connectivity of this device. Only present if the hardware type is `ethernet`. - """ # noqa: E501 - link_speed: Optional[StrictInt] = Field(default=None, description="Link speed in Mbps.", alias="linkSpeed") - __properties: ClassVar[List[str]] = ["linkSpeed"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EthernetProfile 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EthernetProfile from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "linkSpeed": obj.get("linkSpeed") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/expand.py b/endpoint/agents_api/agents_api/models/expand.py deleted file mode 100644 index ab64edd0..00000000 --- a/endpoint/agents_api/agents_api/models/expand.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - CLIENTS = 'clients' - VPNPROFILES = 'vpnProfiles' - NETWORKINTERFACEPROFILES = 'networkInterfaceProfiles' - - @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/endpoint/agents_api/agents_api/models/interface_hardware_type.py b/endpoint/agents_api/agents_api/models/interface_hardware_type.py deleted file mode 100644 index 66766196..00000000 --- a/endpoint/agents_api/agents_api/models/interface_hardware_type.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class InterfaceHardwareType(str, Enum): - """ - InterfaceHardwareType - """ - - """ - allowed enum values - """ - UNKNOWN = 'unknown' - WIRELESS = 'wireless' - ETHERNET = 'ethernet' - MODEM = 'modem' - VIRTUAL = 'virtual' - LOOPBACK = 'loopback' - OTHER = 'other' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InterfaceHardwareType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/interface_profile.py b/endpoint/agents_api/agents_api/models/interface_profile.py deleted file mode 100644 index bc4b406c..00000000 --- a/endpoint/agents_api/agents_api/models/interface_profile.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.address_profile import AddressProfile -from agents_api.models.ethernet_profile import EthernetProfile -from agents_api.models.interface_hardware_type import InterfaceHardwareType -from agents_api.models.wireless_profile import WirelessProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class InterfaceProfile(BaseModel): - """ - InterfaceProfile - """ # noqa: E501 - interface_name: Optional[StrictStr] = Field(default=None, alias="interfaceName") - address_profiles: Optional[List[AddressProfile]] = Field(default=None, alias="addressProfiles") - hardware_type: Optional[InterfaceHardwareType] = Field(default=None, alias="hardwareType") - ethernet_profile: Optional[EthernetProfile] = Field(default=None, alias="ethernetProfile") - wireless_profile: Optional[WirelessProfile] = Field(default=None, alias="wirelessProfile") - __properties: ClassVar[List[str]] = ["interfaceName", "addressProfiles", "hardwareType", "ethernetProfile", "wirelessProfile"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InterfaceProfile 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in address_profiles (list) - _items = [] - if self.address_profiles: - for _item in self.address_profiles: - if _item: - _items.append(_item.to_dict()) - _dict['addressProfiles'] = _items - # override the default output from pydantic by calling `to_dict()` of ethernet_profile - if self.ethernet_profile: - _dict['ethernetProfile'] = self.ethernet_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of wireless_profile - if self.wireless_profile: - _dict['wirelessProfile'] = self.wireless_profile.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of InterfaceProfile 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"), - "addressProfiles": [AddressProfile.from_dict(_item) for _item in obj.get("addressProfiles")] if obj.get("addressProfiles") is not None else None, - "hardwareType": obj.get("hardwareType"), - "ethernetProfile": EthernetProfile.from_dict(obj.get("ethernetProfile")) if obj.get("ethernetProfile") is not None else None, - "wirelessProfile": WirelessProfile.from_dict(obj.get("wirelessProfile")) if obj.get("wirelessProfile") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/link.py b/endpoint/agents_api/agents_api/models/link.py deleted file mode 100644 index 7e7d93c5..00000000 --- a/endpoint/agents_api/agents_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/agents_api/agents_api/models/pagination_next_link.py b/endpoint/agents_api/agents_api/models/pagination_next_link.py deleted file mode 100644 index 73782882..00000000 --- a/endpoint/agents_api/agents_api/models/pagination_next_link.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationNextLink(BaseModel): - """ - A links object containing a related link for forward pagination. - """ # noqa: E501 - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationNextLink 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of PaginationNextLink from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/pagination_next_link_links.py b/endpoint/agents_api/agents_api/models/pagination_next_link_links.py deleted file mode 100644 index 74a209e8..00000000 --- a/endpoint/agents_api/agents_api/models/pagination_next_link_links.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from agents_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationNextLinkLinks(BaseModel): - """ - PaginationNextLinkLinks - """ # noqa: E501 - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationNextLinkLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of next - if self.next: - _dict['next'] = self.next.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationNextLinkLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/platform.py b/endpoint/agents_api/agents_api/models/platform.py deleted file mode 100644 index 312fad5f..00000000 --- a/endpoint/agents_api/agents_api/models/platform.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Platform(str, Enum): - """ - OS platform types - """ - - """ - allowed enum values - """ - WINDOWS = 'windows' - LINUX = 'linux' - MAC = 'mac' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Platform from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/self_links.py b/endpoint/agents_api/agents_api/models/self_links.py deleted file mode 100644 index 1b5e7f57..00000000 --- a/endpoint/agents_api/agents_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/self_links_links.py b/endpoint/agents_api/agents_api/models/self_links_links.py deleted file mode 100644 index f67e1655..00000000 --- a/endpoint/agents_api/agents_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from agents_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/models/status.py b/endpoint/agents_api/agents_api/models/status.py deleted file mode 100644 index 00fb1605..00000000 --- a/endpoint/agents_api/agents_api/models/status.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Status(str, Enum): - """ - Status of the endpoint agent in ThousandEyes. Disabled agents don't report data. - """ - - """ - allowed enum values - """ - ENABLED = 'enabled' - DISABLED = 'disabled' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Status from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/unauthorized_error.py b/endpoint/agents_api/agents_api/models/unauthorized_error.py deleted file mode 100644 index 2a84560d..00000000 --- a/endpoint/agents_api/agents_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/agents_api/agents_api/models/vpn_type.py b/endpoint/agents_api/agents_api/models/vpn_type.py deleted file mode 100644 index 3a002e97..00000000 --- a/endpoint/agents_api/agents_api/models/vpn_type.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class VpnType(str, Enum): - """ - Name of the VPN provider. - """ - - """ - allowed enum values - """ - CISCO_MINUS_ANYCONNECT = 'cisco-anyconnect' - PALO_MINUS_ALTO_MINUS_GLOBALPROTECT = 'palo-alto-globalprotect' - IVANTI_MINUS_CONNECT_MINUS_SECURE = 'ivanti-connect-secure' - ZSCALER_MINUS_INTERNET_MINUS_ACCESS = 'zscaler-internet-access' - F5_MINUS_BIG_MINUS_IP = 'f5-big-ip' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VpnType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/agents_api/agents_api/models/wireless_profile.py b/endpoint/agents_api/agents_api/models/wireless_profile.py deleted file mode 100644 index d2cfe295..00000000 --- a/endpoint/agents_api/agents_api/models/wireless_profile.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class WirelessProfile(BaseModel): - """ - WirelessProfile - """ # noqa: E501 - bssid: Optional[StrictStr] = None - ssid: Optional[StrictStr] = None - rssi: Optional[StrictInt] = None - channel: Optional[StrictInt] = None - phy_mode: Optional[StrictStr] = Field(default=None, alias="phyMode") - __properties: ClassVar[List[str]] = ["bssid", "ssid", "rssi", "channel", "phyMode"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WirelessProfile 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of WirelessProfile from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "bssid": obj.get("bssid"), - "ssid": obj.get("ssid"), - "rssi": obj.get("rssi"), - "channel": obj.get("channel"), - "phyMode": obj.get("phyMode") - }) - return _obj - - diff --git a/endpoint/agents_api/agents_api/rest.py b/endpoint/agents_api/agents_api/rest.py deleted file mode 100644 index bd0ef88d..00000000 --- a/endpoint/agents_api/agents_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from agents_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/endpoint/agents_api/docs/AccountGroupId.md b/endpoint/agents_api/docs/AccountGroupId.md deleted file mode 100644 index 37c02068..00000000 --- a/endpoint/agents_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from agents_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/endpoint/agents_api/docs/AgentSearchRequest.md b/endpoint/agents_api/docs/AgentSearchRequest.md deleted file mode 100644 index 1de0847f..00000000 --- a/endpoint/agents_api/docs/AgentSearchRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# AgentSearchRequest - -Parameters for filtering a list of agents. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**search_filters** | [**AgentSearchRequestSearchFilters**](AgentSearchRequestSearchFilters.md) | | [optional] - -## Example - -```python -from agents_api.models.agent_search_request import AgentSearchRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentSearchRequest from a JSON string -agent_search_request_instance = AgentSearchRequest.from_json(json) -# print the JSON string representation of the object -print AgentSearchRequest.to_json() - -# convert the object into a dict -agent_search_request_dict = agent_search_request_instance.to_dict() -# create an instance of AgentSearchRequest from a dict -agent_search_request_form_dict = agent_search_request.from_dict(agent_search_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/endpoint/agents_api/docs/EndpointAgentAid.md b/endpoint/agents_api/docs/EndpointAgentAid.md deleted file mode 100644 index 5c871099..00000000 --- a/endpoint/agents_api/docs/EndpointAgentAid.md +++ /dev/null @@ -1,28 +0,0 @@ -# EndpointAgentAid - - -## 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] - -## Example - -```python -from agents_api.models.endpoint_agent_aid import EndpointAgentAid - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentAid from a JSON string -endpoint_agent_aid_instance = EndpointAgentAid.from_json(json) -# print the JSON string representation of the object -print EndpointAgentAid.to_json() - -# convert the object into a dict -endpoint_agent_aid_dict = endpoint_agent_aid_instance.to_dict() -# create an instance of EndpointAgentAid from a dict -endpoint_agent_aid_form_dict = endpoint_agent_aid.from_dict(endpoint_agent_aid_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/endpoint/agents_api/docs/EndpointAgentUpdate.md b/endpoint/agents_api/docs/EndpointAgentUpdate.md deleted file mode 100644 index 0205754f..00000000 --- a/endpoint/agents_api/docs/EndpointAgentUpdate.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointAgentUpdate - -The `EndpointAgentUpdate` object contains supported fields for updates. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | New agent name. | [optional] [readonly] -**license_type** | [**List[AgentLicenseType]**](AgentLicenseType.md) | New license type. | [optional] [readonly] - -## Example - -```python -from agents_api.models.endpoint_agent_update import EndpointAgentUpdate - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentUpdate from a JSON string -endpoint_agent_update_instance = EndpointAgentUpdate.from_json(json) -# print the JSON string representation of the object -print EndpointAgentUpdate.to_json() - -# convert the object into a dict -endpoint_agent_update_dict = endpoint_agent_update_instance.to_dict() -# create an instance of EndpointAgentUpdate from a dict -endpoint_agent_update_form_dict = endpoint_agent_update.from_dict(endpoint_agent_update_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/endpoint/agents_api/docs/EndpointAgentsList200Response.md b/endpoint/agents_api/docs/EndpointAgentsList200Response.md deleted file mode 100644 index dc39e207..00000000 --- a/endpoint/agents_api/docs/EndpointAgentsList200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointAgentsList200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total_agents** | **int** | The total number of agents. | [optional] -**agents** | [**List[EndpointAgentsAgentsInner]**](EndpointAgentsAgentsInner.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from agents_api.models.endpoint_agents_list200_response import EndpointAgentsList200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentsList200Response from a JSON string -endpoint_agents_list200_response_instance = EndpointAgentsList200Response.from_json(json) -# print the JSON string representation of the object -print EndpointAgentsList200Response.to_json() - -# convert the object into a dict -endpoint_agents_list200_response_dict = endpoint_agents_list200_response_instance.to_dict() -# create an instance of EndpointAgentsList200Response from a dict -endpoint_agents_list200_response_form_dict = endpoint_agents_list200_response.from_dict(endpoint_agents_list200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/agents_api/docs/Error.md b/endpoint/agents_api/docs/Error.md deleted file mode 100644 index 41bf6718..00000000 --- a/endpoint/agents_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 agents_api.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_form_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/endpoint/agents_api/docs/EthernetProfile.md b/endpoint/agents_api/docs/EthernetProfile.md deleted file mode 100644 index ac54a7f2..00000000 --- a/endpoint/agents_api/docs/EthernetProfile.md +++ /dev/null @@ -1,29 +0,0 @@ -# EthernetProfile - -Information about the ethernet connectivity of this device. Only present if the hardware type is `ethernet`. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**link_speed** | **int** | Link speed in Mbps. | [optional] - -## Example - -```python -from agents_api.models.ethernet_profile import EthernetProfile - -# TODO update the JSON string below -json = "{}" -# create an instance of EthernetProfile from a JSON string -ethernet_profile_instance = EthernetProfile.from_json(json) -# print the JSON string representation of the object -print EthernetProfile.to_json() - -# convert the object into a dict -ethernet_profile_dict = ethernet_profile_instance.to_dict() -# create an instance of EthernetProfile from a dict -ethernet_profile_form_dict = ethernet_profile.from_dict(ethernet_profile_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/endpoint/agents_api/docs/Expand.md b/endpoint/agents_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/endpoint/agents_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/endpoint/agents_api/docs/InterfaceHardwareType.md b/endpoint/agents_api/docs/InterfaceHardwareType.md deleted file mode 100644 index b4967774..00000000 --- a/endpoint/agents_api/docs/InterfaceHardwareType.md +++ /dev/null @@ -1,10 +0,0 @@ -# InterfaceHardwareType - - -## 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/endpoint/agents_api/docs/Link.md b/endpoint/agents_api/docs/Link.md deleted file mode 100644 index b158dd4c..00000000 --- a/endpoint/agents_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 agents_api.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_form_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/endpoint/agents_api/docs/PaginationNextLink.md b/endpoint/agents_api/docs/PaginationNextLink.md deleted file mode 100644 index 0b02c80f..00000000 --- a/endpoint/agents_api/docs/PaginationNextLink.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationNextLink - -A links object containing a related link for forward pagination. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] - -## Example - -```python -from agents_api.models.pagination_next_link import PaginationNextLink - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationNextLink from a JSON string -pagination_next_link_instance = PaginationNextLink.from_json(json) -# print the JSON string representation of the object -print PaginationNextLink.to_json() - -# convert the object into a dict -pagination_next_link_dict = pagination_next_link_instance.to_dict() -# create an instance of PaginationNextLink from a dict -pagination_next_link_form_dict = pagination_next_link.from_dict(pagination_next_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/endpoint/agents_api/docs/PaginationNextLinkLinks.md b/endpoint/agents_api/docs/PaginationNextLinkLinks.md deleted file mode 100644 index 0d9aa5b6..00000000 --- a/endpoint/agents_api/docs/PaginationNextLinkLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# PaginationNextLinkLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from agents_api.models.pagination_next_link_links import PaginationNextLinkLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationNextLinkLinks from a JSON string -pagination_next_link_links_instance = PaginationNextLinkLinks.from_json(json) -# print the JSON string representation of the object -print PaginationNextLinkLinks.to_json() - -# convert the object into a dict -pagination_next_link_links_dict = pagination_next_link_links_instance.to_dict() -# create an instance of PaginationNextLinkLinks from a dict -pagination_next_link_links_form_dict = pagination_next_link_links.from_dict(pagination_next_link_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/endpoint/agents_api/docs/Platform.md b/endpoint/agents_api/docs/Platform.md deleted file mode 100644 index 0fda6780..00000000 --- a/endpoint/agents_api/docs/Platform.md +++ /dev/null @@ -1,11 +0,0 @@ -# Platform - -OS platform types - -## 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/endpoint/agents_api/docs/SelfLinks.md b/endpoint/agents_api/docs/SelfLinks.md deleted file mode 100644 index 152ab3c6..00000000 --- a/endpoint/agents_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from agents_api.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_form_dict = self_links.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/endpoint/agents_api/docs/SelfLinksLinks.md b/endpoint/agents_api/docs/SelfLinksLinks.md deleted file mode 100644 index e01ac6f9..00000000 --- a/endpoint/agents_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from agents_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/endpoint/agents_api/docs/UnauthorizedError.md b/endpoint/agents_api/docs/UnauthorizedError.md deleted file mode 100644 index 8f5ab602..00000000 --- a/endpoint/agents_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from agents_api.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_form_dict = unauthorized_error.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/endpoint/agents_api/docs/VpnType.md b/endpoint/agents_api/docs/VpnType.md deleted file mode 100644 index 5531185b..00000000 --- a/endpoint/agents_api/docs/VpnType.md +++ /dev/null @@ -1,11 +0,0 @@ -# VpnType - -Name of the VPN provider. - -## 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/endpoint/agents_api/git_push.sh b/endpoint/agents_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/endpoint/agents_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/endpoint/agents_api/pyproject.toml b/endpoint/agents_api/pyproject.toml deleted file mode 100644 index 17a57f6c..00000000 --- a/endpoint/agents_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "agents_api" -version = "1.0.0" -description = "Endpoint Agents API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Agents API"] -include = ["agents_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/endpoint/agents_api/setup.py b/endpoint/agents_api/setup.py deleted file mode 100644 index e47e947c..00000000 --- a/endpoint/agents_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "agents-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Endpoint Agents API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Endpoint Agents API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Manage ThousandEyes Endpoint Agents using this API. - """, # noqa: E501 - package_data={"agents_api": ["py.typed"]}, -) diff --git a/endpoint/agents_api/test-requirements.txt b/endpoint/agents_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/endpoint/agents_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/endpoint/agents_api/test/test_account_group_id.py b/endpoint/agents_api/test/test_account_group_id.py deleted file mode 100644 index e4b6da5e..00000000 --- a/endpoint/agents_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_address_type.py b/endpoint/agents_api/test/test_address_type.py deleted file mode 100644 index 4c1128d5..00000000 --- a/endpoint/agents_api/test/test_address_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.address_type import AddressType - -class TestAddressType(unittest.TestCase): - """AddressType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAddressType(self): - """Test AddressType""" - # inst = AddressType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_administrative_endpoints_api.py b/endpoint/agents_api/test/test_administrative_endpoints_api.py deleted file mode 100644 index fe1dae94..00000000 --- a/endpoint/agents_api/test/test_administrative_endpoints_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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_endpoint_agents_connection_string(self) -> None: - """Test case for endpoint_agents_connection_string - - Get agent connection string - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_agent_license_type.py b/endpoint/agents_api/test/test_agent_license_type.py deleted file mode 100644 index db5567ee..00000000 --- a/endpoint/agents_api/test/test_agent_license_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.agent_license_type import AgentLicenseType - -class TestAgentLicenseType(unittest.TestCase): - """AgentLicenseType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentLicenseType(self): - """Test AgentLicenseType""" - # inst = AgentLicenseType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_agent_search_request.py b/endpoint/agents_api/test/test_agent_search_request.py deleted file mode 100644 index 96f732a5..00000000 --- a/endpoint/agents_api/test/test_agent_search_request.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.agent_search_request import AgentSearchRequest - -class TestAgentSearchRequest(unittest.TestCase): - """AgentSearchRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentSearchRequest: - """Test AgentSearchRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentSearchRequest` - """ - model = AgentSearchRequest() - if include_optional: - return AgentSearchRequest( - search_filters = agents_api.models.agent_search_request_search_filters.AgentSearchRequest_searchFilters( - agent_name = [ - 'myagent-1234' - ], - computer_name = [ - 'DESKTOP-45AE8' - ], - username = ["picard"], - platform = [ - 'mac' - ], - os_version = [ - 'Version 10.15.2' - ], - location_country_iso = [ - 'FR' - ], - location_subdivision1_code = [ - 'ENG' - ], - location_city = [ - 'Paris' - ], ) - ) - else: - return AgentSearchRequest( - ) - """ - - def testAgentSearchRequest(self): - """Test AgentSearchRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_browser_type.py b/endpoint/agents_api/test/test_browser_type.py deleted file mode 100644 index 9e5b6bf4..00000000 --- a/endpoint/agents_api/test/test_browser_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.browser_type import BrowserType - -class TestBrowserType(unittest.TestCase): - """BrowserType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testBrowserType(self): - """Test BrowserType""" - # inst = BrowserType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_agent_aid.py b/endpoint/agents_api/test/test_endpoint_agent_aid.py deleted file mode 100644 index af537b60..00000000 --- a/endpoint/agents_api/test/test_endpoint_agent_aid.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.endpoint_agent_aid import EndpointAgentAid - -class TestEndpointAgentAid(unittest.TestCase): - """EndpointAgentAid unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentAid: - """Test EndpointAgentAid - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentAid` - """ - model = EndpointAgentAid() - if include_optional: - return EndpointAgentAid( - aid = '11' - ) - else: - return EndpointAgentAid( - ) - """ - - def testEndpointAgentAid(self): - """Test EndpointAgentAid""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response.py b/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response.py deleted file mode 100644 index 227f3397..00000000 --- a/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response - -class TestEndpointAgentBulkTransfer207Response(unittest.TestCase): - """EndpointAgentBulkTransfer207Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentBulkTransfer207Response: - """Test EndpointAgentBulkTransfer207Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentBulkTransfer207Response` - """ - model = EndpointAgentBulkTransfer207Response() - if include_optional: - return EndpointAgentBulkTransfer207Response( - items = [{"status":200,"detail":"Initiated","request":{"agentId":"5d0764ac-7e42-4ec8-a0d4-39fc53edccba","fromAid":"234","toAid":"222"}},{"status":400,"detail":"Missing from-account id","request":{"agentId":"5d0764ac-7e42-4ec8-a0d5-39fc53ed1234","fromAid":"xxx","toAid":"222"}},{"status":403,"detail":"User does not have permission on 'to' aid","request":{"agentId":"5d0764ac-7e42-4ec8-a0d5-39fc53ed7890","fromAid":"555","toAid":"444"}}] - ) - else: - return EndpointAgentBulkTransfer207Response( - ) - """ - - def testEndpointAgentBulkTransfer207Response(self): - """Test EndpointAgentBulkTransfer207Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_agents_list200_response.py b/endpoint/agents_api/test/test_endpoint_agents_list200_response.py deleted file mode 100644 index 46bebe99..00000000 --- a/endpoint/agents_api/test/test_endpoint_agents_list200_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.endpoint_agents_list200_response import EndpointAgentsList200Response - -class TestEndpointAgentsList200Response(unittest.TestCase): - """EndpointAgentsList200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentsList200Response: - """Test EndpointAgentsList200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentsList200Response` - """ - model = EndpointAgentsList200Response() - if include_optional: - return EndpointAgentsList200Response( - total_agents = 1, - agents = [ - null - ], - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return EndpointAgentsList200Response( - ) - """ - - def testEndpointAgentsList200Response(self): - """Test EndpointAgentsList200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_client.py b/endpoint/agents_api/test/test_endpoint_client.py deleted file mode 100644 index a4416053..00000000 --- a/endpoint/agents_api/test/test_endpoint_client.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.endpoint_client import EndpointClient - -class TestEndpointClient(unittest.TestCase): - """EndpointClient unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointClient: - """Test EndpointClient - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointClient` - """ - model = EndpointClient() - if include_optional: - return EndpointClient( - user_profile = agents_api.models.endpoint_user_profile.EndpointUserProfile( - user_name = 'joeblogs32', ), - browser_extensions = [ - agents_api.models.endpoint_browser_extension.EndpointBrowserExtension( - browser = 'edge', - profile = 'Profile 1', - version = '0.123.0', - enabled = True, - active = True, - error = '', ) - ] - ) - else: - return EndpointClient( - ) - """ - - def testEndpointClient(self): - """Test EndpointClient""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_error.py b/endpoint/agents_api/test/test_error.py deleted file mode 100644 index fb05306c..00000000 --- a/endpoint/agents_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_ethernet_profile.py b/endpoint/agents_api/test/test_ethernet_profile.py deleted file mode 100644 index 270862ed..00000000 --- a/endpoint/agents_api/test/test_ethernet_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.ethernet_profile import EthernetProfile - -class TestEthernetProfile(unittest.TestCase): - """EthernetProfile unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EthernetProfile: - """Test EthernetProfile - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EthernetProfile` - """ - model = EthernetProfile() - if include_optional: - return EthernetProfile( - link_speed = 56 - ) - else: - return EthernetProfile( - ) - """ - - def testEthernetProfile(self): - """Test EthernetProfile""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_expand.py b/endpoint/agents_api/test/test_expand.py deleted file mode 100644 index 9d64b07f..00000000 --- a/endpoint/agents_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_interface_hardware_type.py b/endpoint/agents_api/test/test_interface_hardware_type.py deleted file mode 100644 index ea2d37c5..00000000 --- a/endpoint/agents_api/test/test_interface_hardware_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.interface_hardware_type import InterfaceHardwareType - -class TestInterfaceHardwareType(unittest.TestCase): - """InterfaceHardwareType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInterfaceHardwareType(self): - """Test InterfaceHardwareType""" - # inst = InterfaceHardwareType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_link.py b/endpoint/agents_api/test/test_link.py deleted file mode 100644 index 8aa424cf..00000000 --- a/endpoint/agents_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_manage_agents_api.py b/endpoint/agents_api/test/test_manage_agents_api.py deleted file mode 100644 index 8e5f0e47..00000000 --- a/endpoint/agents_api/test/test_manage_agents_api.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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_endpoint_agent_delete(self) -> None: - """Test case for endpoint_agent_delete - - Delete endpoint agent - """ - pass - - def test_endpoint_agent_disable(self) -> None: - """Test case for endpoint_agent_disable - - Disable endpoint agent - """ - pass - - def test_endpoint_agent_enable(self) -> None: - """Test case for endpoint_agent_enable - - Enable endpoint agent - """ - pass - - def test_endpoint_agent_get(self) -> None: - """Test case for endpoint_agent_get - - Retrieve endpoint agent - """ - pass - - def test_endpoint_agent_update(self) -> None: - """Test case for endpoint_agent_update - - Update endpoint agent - """ - pass - - def test_endpoint_agents_list(self) -> None: - """Test case for endpoint_agents_list - - List endpoint agents - """ - pass - - def test_endpoint_agents_search(self) -> None: - """Test case for endpoint_agents_search - - Filter endpoint agents - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_pagination_next_link.py b/endpoint/agents_api/test/test_pagination_next_link.py deleted file mode 100644 index d10c3308..00000000 --- a/endpoint/agents_api/test/test_pagination_next_link.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.pagination_next_link import PaginationNextLink - -class TestPaginationNextLink(unittest.TestCase): - """PaginationNextLink unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationNextLink: - """Test PaginationNextLink - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationNextLink` - """ - model = PaginationNextLink() - if include_optional: - return PaginationNextLink( - links = agents_api.models.pagination_next_link__links.PaginationNextLink__links( - next = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationNextLink( - ) - """ - - def testPaginationNextLink(self): - """Test PaginationNextLink""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_pagination_next_link_links.py b/endpoint/agents_api/test/test_pagination_next_link_links.py deleted file mode 100644 index 872e6f65..00000000 --- a/endpoint/agents_api/test/test_pagination_next_link_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.pagination_next_link_links import PaginationNextLinkLinks - -class TestPaginationNextLinkLinks(unittest.TestCase): - """PaginationNextLinkLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationNextLinkLinks: - """Test PaginationNextLinkLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationNextLinkLinks` - """ - model = PaginationNextLinkLinks() - if include_optional: - return PaginationNextLinkLinks( - next = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationNextLinkLinks( - ) - """ - - def testPaginationNextLinkLinks(self): - """Test PaginationNextLinkLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_platform.py b/endpoint/agents_api/test/test_platform.py deleted file mode 100644 index 2ce83238..00000000 --- a/endpoint/agents_api/test/test_platform.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.platform import Platform - -class TestPlatform(unittest.TestCase): - """Platform unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPlatform(self): - """Test Platform""" - # inst = Platform() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_self_links.py b/endpoint/agents_api/test/test_self_links.py deleted file mode 100644 index 3159f93f..00000000 --- a/endpoint/agents_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_self_links_links.py b/endpoint/agents_api/test/test_self_links_links.py deleted file mode 100644 index 022bcc76..00000000 --- a/endpoint/agents_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = agents_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_status.py b/endpoint/agents_api/test/test_status.py deleted file mode 100644 index d385c737..00000000 --- a/endpoint/agents_api/test/test_status.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.status import Status - -class TestStatus(unittest.TestCase): - """Status unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStatus(self): - """Test Status""" - # inst = Status() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_transfer_api.py b/endpoint/agents_api/test/test_transfer_api.py deleted file mode 100644 index cba30a5d..00000000 --- a/endpoint/agents_api/test/test_transfer_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agents_api.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_endpoint_agent_bulk_transfer(self) -> None: - """Test case for endpoint_agent_bulk_transfer - - Bulk transfer agents - """ - pass - - def test_endpoint_agent_single_transfer(self) -> None: - """Test case for endpoint_agent_single_transfer - - Transfer endpoint agent - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_unauthorized_error.py b/endpoint/agents_api/test/test_unauthorized_error.py deleted file mode 100644 index ee0e8d6a..00000000 --- a/endpoint/agents_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/test/test_vpn_type.py b/endpoint/agents_api/test/test_vpn_type.py deleted file mode 100644 index a97d1db9..00000000 --- a/endpoint/agents_api/test/test_vpn_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agents API - - Manage ThousandEyes Endpoint Agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from agents_api.models.vpn_type import VpnType - -class TestVpnType(unittest.TestCase): - """VpnType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVpnType(self): - """Test VpnType""" - # inst = VpnType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/agents_api/tox.ini b/endpoint/agents_api/tox.ini deleted file mode 100644 index 5d4caa48..00000000 --- a/endpoint/agents_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=agents_api diff --git a/endpoint/instant_tests_api/.github/workflows/python.yml b/endpoint/instant_tests_api/.github/workflows/python.yml deleted file mode 100644 index c5de856c..00000000 --- a/endpoint/instant_tests_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: instant_tests_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/endpoint/instant_tests_api/.gitlab-ci.yml b/endpoint/instant_tests_api/.gitlab-ci.yml deleted file mode 100644 index 735f324a..00000000 --- a/endpoint/instant_tests_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=instant_tests_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/endpoint/instant_tests_api/.openapi-generator/FILES b/endpoint/instant_tests_api/.openapi-generator/FILES deleted file mode 100644 index 4b822f1e..00000000 --- a/endpoint/instant_tests_api/.openapi-generator/FILES +++ /dev/null @@ -1,125 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AccountGroupId.md -docs/AgentLabelsSelectorType.md -docs/AgentToServerInstantScheduledTestApi.md -docs/AllAgentsSelectorType.md -docs/EndpointAgentLabelsSelectorConfig.md -docs/EndpointAgentSelectorConfig.md -docs/EndpointAgentToServerInstantTest.md -docs/EndpointAgentToServerTest.md -docs/EndpointAgentToServerType.md -docs/EndpointAllAgentsSelectorConfig.md -docs/EndpointHttpServerBaseTest.md -docs/EndpointHttpServerInstantTest.md -docs/EndpointHttpServerTest.md -docs/EndpointHttpServerType.md -docs/EndpointInstantTest.md -docs/EndpointScheduledTestType.md -docs/EndpointSpecificAgentsSelectorConfig.md -docs/EndpointTest.md -docs/EndpointTestAgentSelectorType.md -docs/EndpointTestAid.md -docs/EndpointTestAuthType.md -docs/EndpointTestLinks.md -docs/EndpointTestLinksSelf.md -docs/EndpointTestLinksTestResults.md -docs/EndpointTestProtocol.md -docs/Error.md -docs/HttpServerInstantScheduledTestApi.md -docs/Link.md -docs/RunExistingTestApi.md -docs/SpecificAgentsSelectorType.md -docs/TestInterval.md -docs/TestProbeMode.md -docs/TestSslVersionId.md -docs/UnauthorizedError.md -git_push.sh -instant_tests_api/__init__.py -instant_tests_api/api/__init__.py -instant_tests_api/api/agent_to_server_instant_scheduled_test_api.py -instant_tests_api/api/http_server_instant_scheduled_test_api.py -instant_tests_api/api/run_existing_test_api.py -instant_tests_api/api_client.py -instant_tests_api/api_response.py -instant_tests_api/configuration.py -instant_tests_api/exceptions.py -instant_tests_api/models/__init__.py -instant_tests_api/models/account_group_id.py -instant_tests_api/models/agent_labels_selector_type.py -instant_tests_api/models/all_agents_selector_type.py -instant_tests_api/models/endpoint_agent_labels_selector_config.py -instant_tests_api/models/endpoint_agent_selector_config.py -instant_tests_api/models/endpoint_agent_to_server_instant_test.py -instant_tests_api/models/endpoint_agent_to_server_test.py -instant_tests_api/models/endpoint_agent_to_server_type.py -instant_tests_api/models/endpoint_all_agents_selector_config.py -instant_tests_api/models/endpoint_http_server_base_test.py -instant_tests_api/models/endpoint_http_server_instant_test.py -instant_tests_api/models/endpoint_http_server_test.py -instant_tests_api/models/endpoint_http_server_type.py -instant_tests_api/models/endpoint_instant_test.py -instant_tests_api/models/endpoint_scheduled_test_type.py -instant_tests_api/models/endpoint_specific_agents_selector_config.py -instant_tests_api/models/endpoint_test.py -instant_tests_api/models/endpoint_test_agent_selector_type.py -instant_tests_api/models/endpoint_test_aid.py -instant_tests_api/models/endpoint_test_auth_type.py -instant_tests_api/models/endpoint_test_links.py -instant_tests_api/models/endpoint_test_links_self.py -instant_tests_api/models/endpoint_test_links_test_results.py -instant_tests_api/models/endpoint_test_protocol.py -instant_tests_api/models/error.py -instant_tests_api/models/link.py -instant_tests_api/models/specific_agents_selector_type.py -instant_tests_api/models/test_interval.py -instant_tests_api/models/test_probe_mode.py -instant_tests_api/models/test_ssl_version_id.py -instant_tests_api/models/unauthorized_error.py -instant_tests_api/py.typed -instant_tests_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group_id.py -test/test_agent_labels_selector_type.py -test/test_agent_to_server_instant_scheduled_test_api.py -test/test_all_agents_selector_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_agent_to_server_type.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_http_server_type.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_aid.py -test/test_endpoint_test_auth_type.py -test/test_endpoint_test_links.py -test/test_endpoint_test_links_self.py -test/test_endpoint_test_links_test_results.py -test/test_endpoint_test_protocol.py -test/test_error.py -test/test_http_server_instant_scheduled_test_api.py -test/test_link.py -test/test_run_existing_test_api.py -test/test_specific_agents_selector_type.py -test/test_test_interval.py -test/test_test_probe_mode.py -test/test_test_ssl_version_id.py -test/test_unauthorized_error.py -tox.ini diff --git a/endpoint/instant_tests_api/.openapi-generator/VERSION b/endpoint/instant_tests_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/endpoint/instant_tests_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/endpoint/instant_tests_api/.travis.yml b/endpoint/instant_tests_api/.travis.yml deleted file mode 100644 index 41362426..00000000 --- a/endpoint/instant_tests_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=instant_tests_api diff --git a/endpoint/instant_tests_api/README.md b/endpoint/instant_tests_api/README.md deleted file mode 100644 index 16651cb5..00000000 --- a/endpoint/instant_tests_api/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# instant-tests-api - -### Overview - -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. - - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import instant_tests_api -``` - -### 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 instant_tests_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import instant_tests_api -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.AgentToServerInstantScheduledTestApi(api_client) - endpoint_agent_to_server_instant_test = instant_tests_api.EndpointAgentToServerInstantTest() # EndpointAgentToServerInstantTest | - aid = '2067' # 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: - # 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") - pprint(api_response) - except ApiException as e: - print("Exception when calling AgentToServerInstantScheduledTestApi->post_agent_to_server_instant_test: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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 - - -## Documentation For Models - - - [AccountGroupId](docs/AccountGroupId.md) - - [AgentLabelsSelectorType](docs/AgentLabelsSelectorType.md) - - [AllAgentsSelectorType](docs/AllAgentsSelectorType.md) - - [EndpointAgentLabelsSelectorConfig](docs/EndpointAgentLabelsSelectorConfig.md) - - [EndpointAgentSelectorConfig](docs/EndpointAgentSelectorConfig.md) - - [EndpointAgentToServerInstantTest](docs/EndpointAgentToServerInstantTest.md) - - [EndpointAgentToServerTest](docs/EndpointAgentToServerTest.md) - - [EndpointAgentToServerType](docs/EndpointAgentToServerType.md) - - [EndpointAllAgentsSelectorConfig](docs/EndpointAllAgentsSelectorConfig.md) - - [EndpointHttpServerBaseTest](docs/EndpointHttpServerBaseTest.md) - - [EndpointHttpServerInstantTest](docs/EndpointHttpServerInstantTest.md) - - [EndpointHttpServerTest](docs/EndpointHttpServerTest.md) - - [EndpointHttpServerType](docs/EndpointHttpServerType.md) - - [EndpointInstantTest](docs/EndpointInstantTest.md) - - [EndpointScheduledTestType](docs/EndpointScheduledTestType.md) - - [EndpointSpecificAgentsSelectorConfig](docs/EndpointSpecificAgentsSelectorConfig.md) - - [EndpointTest](docs/EndpointTest.md) - - [EndpointTestAgentSelectorType](docs/EndpointTestAgentSelectorType.md) - - [EndpointTestAid](docs/EndpointTestAid.md) - - [EndpointTestAuthType](docs/EndpointTestAuthType.md) - - [EndpointTestLinks](docs/EndpointTestLinks.md) - - [EndpointTestLinksSelf](docs/EndpointTestLinksSelf.md) - - [EndpointTestLinksTestResults](docs/EndpointTestLinksTestResults.md) - - [EndpointTestProtocol](docs/EndpointTestProtocol.md) - - [Error](docs/Error.md) - - [Link](docs/Link.md) - - [SpecificAgentsSelectorType](docs/SpecificAgentsSelectorType.md) - - [TestInterval](docs/TestInterval.md) - - [TestProbeMode](docs/TestProbeMode.md) - - [TestSslVersionId](docs/TestSslVersionId.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/endpoint/instant_tests_api/docs/AccountGroupId.md b/endpoint/instant_tests_api/docs/AccountGroupId.md deleted file mode 100644 index 3e2b9169..00000000 --- a/endpoint/instant_tests_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from instant_tests_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/endpoint/instant_tests_api/docs/AgentLabelsSelectorType.md b/endpoint/instant_tests_api/docs/AgentLabelsSelectorType.md deleted file mode 100644 index aa3d0399..00000000 --- a/endpoint/instant_tests_api/docs/AgentLabelsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AgentLabelsSelectorType - - -## 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/endpoint/instant_tests_api/docs/AllAgentsSelectorType.md b/endpoint/instant_tests_api/docs/AllAgentsSelectorType.md deleted file mode 100644 index 049c7eec..00000000 --- a/endpoint/instant_tests_api/docs/AllAgentsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AllAgentsSelectorType - - -## 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/endpoint/instant_tests_api/docs/EndpointAgentLabelsSelectorConfig.md b/endpoint/instant_tests_api/docs/EndpointAgentLabelsSelectorConfig.md deleted file mode 100644 index 2c562da2..00000000 --- a/endpoint/instant_tests_api/docs/EndpointAgentLabelsSelectorConfig.md +++ /dev/null @@ -1,31 +0,0 @@ -# EndpointAgentLabelsSelectorConfig - -Agent labels selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**AgentLabelsSelectorType**](AgentLabelsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentLabelsSelectorConfig from a JSON string -endpoint_agent_labels_selector_config_instance = EndpointAgentLabelsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAgentLabelsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_agent_labels_selector_config_dict = endpoint_agent_labels_selector_config_instance.to_dict() -# create an instance of EndpointAgentLabelsSelectorConfig from a dict -endpoint_agent_labels_selector_config_form_dict = endpoint_agent_labels_selector_config.from_dict(endpoint_agent_labels_selector_config_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/endpoint/instant_tests_api/docs/EndpointAgentSelectorConfig.md b/endpoint/instant_tests_api/docs/EndpointAgentSelectorConfig.md deleted file mode 100644 index 0188ce48..00000000 --- a/endpoint/instant_tests_api/docs/EndpointAgentSelectorConfig.md +++ /dev/null @@ -1,32 +0,0 @@ -# EndpointAgentSelectorConfig - -Agents selection object based on agentSelectorType. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**SpecificAgentsSelectorType**](SpecificAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentSelectorConfig from a JSON string -endpoint_agent_selector_config_instance = EndpointAgentSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAgentSelectorConfig.to_json() - -# convert the object into a dict -endpoint_agent_selector_config_dict = endpoint_agent_selector_config_instance.to_dict() -# create an instance of EndpointAgentSelectorConfig from a dict -endpoint_agent_selector_config_form_dict = endpoint_agent_selector_config.from_dict(endpoint_agent_selector_config_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/endpoint/instant_tests_api/docs/EndpointAgentToServerInstantTest.md b/endpoint/instant_tests_api/docs/EndpointAgentToServerInstantTest.md deleted file mode 100644 index d3c1f60e..00000000 --- a/endpoint/instant_tests_api/docs/EndpointAgentToServerInstantTest.md +++ /dev/null @@ -1,36 +0,0 @@ -# EndpointAgentToServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**test_name** | **str** | Name of the test. | -**server_name** | **str** | A server address without a protocol or IP address. | - -## Example - -```python -from instant_tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentToServerInstantTest from a JSON string -endpoint_agent_to_server_instant_test_instance = EndpointAgentToServerInstantTest.from_json(json) -# print the JSON string representation of the object -print EndpointAgentToServerInstantTest.to_json() - -# convert the object into a dict -endpoint_agent_to_server_instant_test_dict = endpoint_agent_to_server_instant_test_instance.to_dict() -# create an instance of EndpointAgentToServerInstantTest from a dict -endpoint_agent_to_server_instant_test_form_dict = endpoint_agent_to_server_instant_test.from_dict(endpoint_agent_to_server_instant_test_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/endpoint/instant_tests_api/docs/EndpointAgentToServerTest.md b/endpoint/instant_tests_api/docs/EndpointAgentToServerTest.md deleted file mode 100644 index 9ae110cd..00000000 --- a/endpoint/instant_tests_api/docs/EndpointAgentToServerTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# EndpointAgentToServerTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointAgentToServerType**](EndpointAgentToServerType.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentToServerTest from a JSON string -endpoint_agent_to_server_test_instance = EndpointAgentToServerTest.from_json(json) -# print the JSON string representation of the object -print EndpointAgentToServerTest.to_json() - -# convert the object into a dict -endpoint_agent_to_server_test_dict = endpoint_agent_to_server_test_instance.to_dict() -# create an instance of EndpointAgentToServerTest from a dict -endpoint_agent_to_server_test_form_dict = endpoint_agent_to_server_test.from_dict(endpoint_agent_to_server_test_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/endpoint/instant_tests_api/docs/EndpointAgentToServerType.md b/endpoint/instant_tests_api/docs/EndpointAgentToServerType.md deleted file mode 100644 index a2abd7c3..00000000 --- a/endpoint/instant_tests_api/docs/EndpointAgentToServerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointAgentToServerType - -Type of test being queried. - -## 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/endpoint/instant_tests_api/docs/EndpointAllAgentsSelectorConfig.md b/endpoint/instant_tests_api/docs/EndpointAllAgentsSelectorConfig.md deleted file mode 100644 index c105be9f..00000000 --- a/endpoint/instant_tests_api/docs/EndpointAllAgentsSelectorConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointAllAgentsSelectorConfig - -Any agent selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**AllAgentsSelectorType**](AllAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAllAgentsSelectorConfig from a JSON string -endpoint_all_agents_selector_config_instance = EndpointAllAgentsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAllAgentsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_all_agents_selector_config_dict = endpoint_all_agents_selector_config_instance.to_dict() -# create an instance of EndpointAllAgentsSelectorConfig from a dict -endpoint_all_agents_selector_config_form_dict = endpoint_all_agents_selector_config.from_dict(endpoint_all_agents_selector_config_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/endpoint/instant_tests_api/docs/EndpointHttpServerBaseTest.md b/endpoint/instant_tests_api/docs/EndpointHttpServerBaseTest.md deleted file mode 100644 index c17e85f8..00000000 --- a/endpoint/instant_tests_api/docs/EndpointHttpServerBaseTest.md +++ /dev/null @@ -1,36 +0,0 @@ -# EndpointHttpServerBaseTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerBaseTest from a JSON string -endpoint_http_server_base_test_instance = EndpointHttpServerBaseTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerBaseTest.to_json() - -# convert the object into a dict -endpoint_http_server_base_test_dict = endpoint_http_server_base_test_instance.to_dict() -# create an instance of EndpointHttpServerBaseTest from a dict -endpoint_http_server_base_test_form_dict = endpoint_http_server_base_test.from_dict(endpoint_http_server_base_test_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/endpoint/instant_tests_api/docs/EndpointHttpServerInstantTest.md b/endpoint/instant_tests_api/docs/EndpointHttpServerInstantTest.md deleted file mode 100644 index b9a8da72..00000000 --- a/endpoint/instant_tests_api/docs/EndpointHttpServerInstantTest.md +++ /dev/null @@ -1,46 +0,0 @@ -# EndpointHttpServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**test_name** | **str** | Name of the test. | -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | -**target_response_time** | **int** | Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red). | -**password** | **str** | Password for Basic/NTLM authentication. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerInstantTest from a JSON string -endpoint_http_server_instant_test_instance = EndpointHttpServerInstantTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerInstantTest.to_json() - -# convert the object into a dict -endpoint_http_server_instant_test_dict = endpoint_http_server_instant_test_instance.to_dict() -# create an instance of EndpointHttpServerInstantTest from a dict -endpoint_http_server_instant_test_form_dict = endpoint_http_server_instant_test.from_dict(endpoint_http_server_instant_test_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/endpoint/instant_tests_api/docs/EndpointHttpServerTest.md b/endpoint/instant_tests_api/docs/EndpointHttpServerTest.md deleted file mode 100644 index 9df472ae..00000000 --- a/endpoint/instant_tests_api/docs/EndpointHttpServerTest.md +++ /dev/null @@ -1,58 +0,0 @@ -# EndpointHttpServerTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointHttpServerType**](EndpointHttpServerType.md) | | [optional] -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.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] -**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] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_http_server_test import EndpointHttpServerTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerTest from a JSON string -endpoint_http_server_test_instance = EndpointHttpServerTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerTest.to_json() - -# convert the object into a dict -endpoint_http_server_test_dict = endpoint_http_server_test_instance.to_dict() -# create an instance of EndpointHttpServerTest from a dict -endpoint_http_server_test_form_dict = endpoint_http_server_test.from_dict(endpoint_http_server_test_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/endpoint/instant_tests_api/docs/EndpointHttpServerType.md b/endpoint/instant_tests_api/docs/EndpointHttpServerType.md deleted file mode 100644 index 1cf13c82..00000000 --- a/endpoint/instant_tests_api/docs/EndpointHttpServerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointHttpServerType - -Type of test being queried. - -## 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/endpoint/instant_tests_api/docs/EndpointInstantTest.md b/endpoint/instant_tests_api/docs/EndpointInstantTest.md deleted file mode 100644 index f1465ca9..00000000 --- a/endpoint/instant_tests_api/docs/EndpointInstantTest.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**test_name** | **str** | Name of the test. | - -## Example - -```python -from instant_tests_api.models.endpoint_instant_test import EndpointInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointInstantTest from a JSON string -endpoint_instant_test_instance = EndpointInstantTest.from_json(json) -# print the JSON string representation of the object -print EndpointInstantTest.to_json() - -# convert the object into a dict -endpoint_instant_test_dict = endpoint_instant_test_instance.to_dict() -# create an instance of EndpointInstantTest from a dict -endpoint_instant_test_form_dict = endpoint_instant_test.from_dict(endpoint_instant_test_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/endpoint/instant_tests_api/docs/EndpointScheduledTestType.md b/endpoint/instant_tests_api/docs/EndpointScheduledTestType.md deleted file mode 100644 index 4fb1f891..00000000 --- a/endpoint/instant_tests_api/docs/EndpointScheduledTestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointScheduledTestType - -Type of test being queried. - -## 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/endpoint/instant_tests_api/docs/EndpointSpecificAgentsSelectorConfig.md b/endpoint/instant_tests_api/docs/EndpointSpecificAgentsSelectorConfig.md deleted file mode 100644 index cd0d6788..00000000 --- a/endpoint/instant_tests_api/docs/EndpointSpecificAgentsSelectorConfig.md +++ /dev/null @@ -1,31 +0,0 @@ -# EndpointSpecificAgentsSelectorConfig - -Specific agents selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**SpecificAgentsSelectorType**](SpecificAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointSpecificAgentsSelectorConfig from a JSON string -endpoint_specific_agents_selector_config_instance = EndpointSpecificAgentsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointSpecificAgentsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_specific_agents_selector_config_dict = endpoint_specific_agents_selector_config_instance.to_dict() -# create an instance of EndpointSpecificAgentsSelectorConfig from a dict -endpoint_specific_agents_selector_config_form_dict = endpoint_specific_agents_selector_config.from_dict(endpoint_specific_agents_selector_config_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/endpoint/instant_tests_api/docs/EndpointTest.md b/endpoint/instant_tests_api/docs/EndpointTest.md deleted file mode 100644 index 63377120..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# EndpointTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointScheduledTestType**](EndpointScheduledTestType.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_test import EndpointTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTest from a JSON string -endpoint_test_instance = EndpointTest.from_json(json) -# print the JSON string representation of the object -print EndpointTest.to_json() - -# convert the object into a dict -endpoint_test_dict = endpoint_test_instance.to_dict() -# create an instance of EndpointTest from a dict -endpoint_test_form_dict = endpoint_test.from_dict(endpoint_test_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/endpoint/instant_tests_api/docs/EndpointTestAgentSelectorType.md b/endpoint/instant_tests_api/docs/EndpointTestAgentSelectorType.md deleted file mode 100644 index cac1391f..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestAgentSelectorType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestAgentSelectorType - -Retrieve either all available agents, a specific list of agents, or a list of agent labels. - -## 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/endpoint/instant_tests_api/docs/EndpointTestAid.md b/endpoint/instant_tests_api/docs/EndpointTestAid.md deleted file mode 100644 index 7e89bd0d..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestAid.md +++ /dev/null @@ -1,28 +0,0 @@ -# EndpointTestAid - - -## 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] - -## Example - -```python -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestAid from a JSON string -endpoint_test_aid_instance = EndpointTestAid.from_json(json) -# print the JSON string representation of the object -print EndpointTestAid.to_json() - -# convert the object into a dict -endpoint_test_aid_dict = endpoint_test_aid_instance.to_dict() -# create an instance of EndpointTestAid from a dict -endpoint_test_aid_form_dict = endpoint_test_aid.from_dict(endpoint_test_aid_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/endpoint/instant_tests_api/docs/EndpointTestAuthType.md b/endpoint/instant_tests_api/docs/EndpointTestAuthType.md deleted file mode 100644 index 979915c2..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestAuthType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestAuthType - -HTTP authentication type. - -## 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/endpoint/instant_tests_api/docs/EndpointTestLinks.md b/endpoint/instant_tests_api/docs/EndpointTestLinks.md deleted file mode 100644 index ade77b57..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointTestLinks - -A list of links that can be accessed to get more information. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**EndpointTestLinksSelf**](EndpointTestLinksSelf.md) | | [optional] -**test_results** | [**EndpointTestLinksTestResults**](EndpointTestLinksTestResults.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinks from a JSON string -endpoint_test_links_instance = EndpointTestLinks.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinks.to_json() - -# convert the object into a dict -endpoint_test_links_dict = endpoint_test_links_instance.to_dict() -# create an instance of EndpointTestLinks from a dict -endpoint_test_links_form_dict = endpoint_test_links.from_dict(endpoint_test_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/endpoint/instant_tests_api/docs/EndpointTestLinksSelf.md b/endpoint/instant_tests_api/docs/EndpointTestLinksSelf.md deleted file mode 100644 index 89cbd87e..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointTestLinksSelf - - -## 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 instant_tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinksSelf from a JSON string -endpoint_test_links_self_instance = EndpointTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinksSelf.to_json() - -# convert the object into a dict -endpoint_test_links_self_dict = endpoint_test_links_self_instance.to_dict() -# create an instance of EndpointTestLinksSelf from a dict -endpoint_test_links_self_form_dict = endpoint_test_links_self.from_dict(endpoint_test_links_self_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/endpoint/instant_tests_api/docs/EndpointTestLinksTestResults.md b/endpoint/instant_tests_api/docs/EndpointTestLinksTestResults.md deleted file mode 100644 index 437f3828..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointTestLinksTestResults - - -## 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 instant_tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinksTestResults from a JSON string -endpoint_test_links_test_results_instance = EndpointTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinksTestResults.to_json() - -# convert the object into a dict -endpoint_test_links_test_results_dict = endpoint_test_links_test_results_instance.to_dict() -# create an instance of EndpointTestLinksTestResults from a dict -endpoint_test_links_test_results_form_dict = endpoint_test_links_test_results.from_dict(endpoint_test_links_test_results_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/endpoint/instant_tests_api/docs/EndpointTestProtocol.md b/endpoint/instant_tests_api/docs/EndpointTestProtocol.md deleted file mode 100644 index c1e002b3..00000000 --- a/endpoint/instant_tests_api/docs/EndpointTestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestProtocol - -Protocol used to perform the test. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/instant_tests_api/docs/Error.md b/endpoint/instant_tests_api/docs/Error.md deleted file mode 100644 index 275b872e..00000000 --- a/endpoint/instant_tests_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 instant_tests_api.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_form_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/endpoint/instant_tests_api/docs/Link.md b/endpoint/instant_tests_api/docs/Link.md deleted file mode 100644 index f51d6f48..00000000 --- a/endpoint/instant_tests_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 instant_tests_api.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_form_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/endpoint/instant_tests_api/docs/SpecificAgentsSelectorType.md b/endpoint/instant_tests_api/docs/SpecificAgentsSelectorType.md deleted file mode 100644 index e0b875a0..00000000 --- a/endpoint/instant_tests_api/docs/SpecificAgentsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecificAgentsSelectorType - - -## 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/endpoint/instant_tests_api/docs/TestInterval.md b/endpoint/instant_tests_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/endpoint/instant_tests_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/endpoint/instant_tests_api/docs/TestProbeMode.md b/endpoint/instant_tests_api/docs/TestProbeMode.md deleted file mode 100644 index 2e0ad614..00000000 --- a/endpoint/instant_tests_api/docs/TestProbeMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProbeMode - -Probe mode used by network test, only valid when the protocol is set to TCP. - -## 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/endpoint/instant_tests_api/docs/TestSslVersionId.md b/endpoint/instant_tests_api/docs/TestSslVersionId.md deleted file mode 100644 index fb9ac0f8..00000000 --- a/endpoint/instant_tests_api/docs/TestSslVersionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestSslVersionId - -SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - -## 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/endpoint/instant_tests_api/docs/UnauthorizedError.md b/endpoint/instant_tests_api/docs/UnauthorizedError.md deleted file mode 100644 index cf19fdd4..00000000 --- a/endpoint/instant_tests_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from instant_tests_api.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_form_dict = unauthorized_error.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/endpoint/instant_tests_api/git_push.sh b/endpoint/instant_tests_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/endpoint/instant_tests_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/endpoint/instant_tests_api/instant_tests_api/__init__.py b/endpoint/instant_tests_api/instant_tests_api/__init__.py deleted file mode 100644 index 35a17e33..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/__init__.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 instant_tests_api.api.agent_to_server_instant_scheduled_test_api import AgentToServerInstantScheduledTestApi -from instant_tests_api.api.http_server_instant_scheduled_test_api import HttpServerInstantScheduledTestApi -from instant_tests_api.api.run_existing_test_api import RunExistingTestApi - -# import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.api_client import ApiClient -from instant_tests_api.configuration import Configuration -from instant_tests_api.exceptions import OpenApiException -from instant_tests_api.exceptions import ApiTypeError -from instant_tests_api.exceptions import ApiValueError -from instant_tests_api.exceptions import ApiKeyError -from instant_tests_api.exceptions import ApiAttributeError -from instant_tests_api.exceptions import ApiException - -# import models into sdk package -from instant_tests_api.models.account_group_id import AccountGroupId -from instant_tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType -from instant_tests_api.models.all_agents_selector_type import AllAgentsSelectorType -from instant_tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from instant_tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest -from instant_tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from instant_tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from instant_tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from instant_tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest -from instant_tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest -from instant_tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from instant_tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from instant_tests_api.models.endpoint_instant_test import EndpointInstantTest -from instant_tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from instant_tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from instant_tests_api.models.endpoint_test import EndpointTest -from instant_tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid -from instant_tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks -from instant_tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from instant_tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.error import Error -from instant_tests_api.models.link import Link -from instant_tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -from instant_tests_api.models.test_interval import TestInterval -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unauthorized_error import UnauthorizedError diff --git a/endpoint/instant_tests_api/instant_tests_api/api/__init__.py b/endpoint/instant_tests_api/instant_tests_api/api/__init__.py deleted file mode 100644 index 4265f9c1..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# flake8: noqa - -# import apis into api package -from instant_tests_api.api.agent_to_server_instant_scheduled_test_api import AgentToServerInstantScheduledTestApi -from instant_tests_api.api.http_server_instant_scheduled_test_api import HttpServerInstantScheduledTestApi -from instant_tests_api.api.run_existing_test_api import RunExistingTestApi - diff --git a/endpoint/instant_tests_api/instant_tests_api/api_client.py b/endpoint/instant_tests_api/instant_tests_api/api_client.py deleted file mode 100644 index 775d71cc..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from instant_tests_api.configuration import Configuration -from instant_tests_api.api_response import ApiResponse -import instant_tests_api.models -from instant_tests_api import rest -from instant_tests_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(instant_tests_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/endpoint/instant_tests_api/instant_tests_api/api_response.py b/endpoint/instant_tests_api/instant_tests_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/endpoint/instant_tests_api/instant_tests_api/configuration.py b/endpoint/instant_tests_api/instant_tests_api/configuration.py deleted file mode 100644 index 217ef6c8..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("instant_tests_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/endpoint/instant_tests_api/instant_tests_api/exceptions.py b/endpoint/instant_tests_api/instant_tests_api/exceptions.py deleted file mode 100644 index 1baf4e9d..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/endpoint/instant_tests_api/instant_tests_api/models/__init__.py b/endpoint/instant_tests_api/instant_tests_api/models/__init__.py deleted file mode 100644 index cc5924ce..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from instant_tests_api.models.account_group_id import AccountGroupId -from instant_tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType -from instant_tests_api.models.all_agents_selector_type import AllAgentsSelectorType -from instant_tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from instant_tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest -from instant_tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from instant_tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from instant_tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from instant_tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest -from instant_tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest -from instant_tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from instant_tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from instant_tests_api.models.endpoint_instant_test import EndpointInstantTest -from instant_tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from instant_tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from instant_tests_api.models.endpoint_test import EndpointTest -from instant_tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid -from instant_tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks -from instant_tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from instant_tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.error import Error -from instant_tests_api.models.link import Link -from instant_tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -from instant_tests_api.models.test_interval import TestInterval -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unauthorized_error import UnauthorizedError diff --git a/endpoint/instant_tests_api/instant_tests_api/models/account_group_id.py b/endpoint/instant_tests_api/instant_tests_api/models/account_group_id.py deleted file mode 100644 index 213b3c77..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/agent_labels_selector_type.py b/endpoint/instant_tests_api/instant_tests_api/models/agent_labels_selector_type.py deleted file mode 100644 index 654f7e4e..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/agent_labels_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentLabelsSelectorType(str, Enum): - """ - AgentLabelsSelectorType - """ - - """ - allowed enum values - """ - AGENT_MINUS_LABELS = 'agent-labels' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentLabelsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/all_agents_selector_type.py b/endpoint/instant_tests_api/instant_tests_api/models/all_agents_selector_type.py deleted file mode 100644 index b4784e1a..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/all_agents_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AllAgentsSelectorType(str, Enum): - """ - AllAgentsSelectorType - """ - - """ - allowed enum values - """ - ALL_MINUS_AGENTS = 'all-agents' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AllAgentsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_labels_selector_config.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_labels_selector_config.py deleted file mode 100644 index 54829dfd..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_labels_selector_config.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentLabelsSelectorConfig(BaseModel): - """ - Agent labels selection object. - """ # noqa: E501 - agent_selector_type: Optional[AgentLabelsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "endpointAgentLabels"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentLabelsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentLabelsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines"), - "endpointAgentLabels": obj.get("endpointAgentLabels") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_selector_config.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_selector_config.py deleted file mode 100644 index fe18d264..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_selector_config.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from instant_tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from instant_tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from instant_tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -ENDPOINTAGENTSELECTORCONFIG_ONE_OF_SCHEMAS = ["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] - -class EndpointAgentSelectorConfig(BaseModel): - """ - Agents selection object based on agentSelectorType. - """ - # data type: EndpointAllAgentsSelectorConfig - oneof_schema_1_validator: Optional[EndpointAllAgentsSelectorConfig] = None - # data type: EndpointAgentLabelsSelectorConfig - oneof_schema_2_validator: Optional[EndpointAgentLabelsSelectorConfig] = None - # data type: EndpointSpecificAgentsSelectorConfig - oneof_schema_3_validator: Optional[EndpointSpecificAgentsSelectorConfig] = None - actual_instance: Optional[Union[EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]] = None - one_of_schemas: List[str] = Literal["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] - - model_config = { - "validate_assignment": True - } - - - discriminator_value_class_map: Dict[str, str] = { - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EndpointAgentSelectorConfig.model_construct() - error_messages = [] - match = 0 - # validate data type: EndpointAllAgentsSelectorConfig - if not isinstance(v, EndpointAllAgentsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAllAgentsSelectorConfig`") - else: - match += 1 - # validate data type: EndpointAgentLabelsSelectorConfig - if not isinstance(v, EndpointAgentLabelsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAgentLabelsSelectorConfig`") - else: - match += 1 - # validate data type: EndpointSpecificAgentsSelectorConfig - if not isinstance(v, EndpointSpecificAgentsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointSpecificAgentsSelectorConfig`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into EndpointAllAgentsSelectorConfig - try: - instance.actual_instance = EndpointAllAgentsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EndpointAgentLabelsSelectorConfig - try: - instance.actual_instance = EndpointAgentLabelsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EndpointSpecificAgentsSelectorConfig - try: - instance.actual_instance = EndpointSpecificAgentsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_instant_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_instant_test.py deleted file mode 100644 index 0607fb1c..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_instant_test.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentToServerInstantTest(BaseModel): - """ - EndpointAgentToServerInstantTest - """ # noqa: E501 - agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - test_name: StrictStr = Field(description="Name of the test.", alias="testName") - server_name: StrictStr = Field(description="A server address without a protocol or IP address.", alias="serverName") - __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "serverName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentToServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines"), - "port": obj.get("port"), - "testName": obj.get("testName"), - "serverName": obj.get("serverName") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_test.py deleted file mode 100644 index 42389ec0..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_test.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from instant_tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentToServerTest(BaseModel): - """ - EndpointAgentToServerTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointAgentToServerType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentToServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_type.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_type.py deleted file mode 100644 index b57a88bc..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_agent_to_server_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointAgentToServerType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_all_agents_selector_config.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_all_agents_selector_config.py deleted file mode 100644 index ed9567fc..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_all_agents_selector_config.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.all_agents_selector_type import AllAgentsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAllAgentsSelectorConfig(BaseModel): - """ - Any agent selection object. - """ # noqa: E501 - agent_selector_type: Optional[AllAgentsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAllAgentsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAllAgentsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_base_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_base_test.py deleted file mode 100644 index b50a0326..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_base_test.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from instant_tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerBaseTest(BaseModel): - """ - EndpointHttpServerBaseTest - """ # noqa: E501 - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - protocol: Optional[EndpointTestProtocol] = None - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") - __properties: ClassVar[List[str]] = ["authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerBaseTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerBaseTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authType": obj.get("authType"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "protocol": obj.get("protocol"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_instant_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_instant_test.py deleted file mode 100644 index d6d7ec8f..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_instant_test.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from instant_tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerInstantTest(BaseModel): - """ - EndpointHttpServerInstantTest - """ # noqa: E501 - agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - test_name: StrictStr = Field(description="Name of the test.", alias="testName") - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - http_time_limit: StrictInt = Field(description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - protocol: Optional[EndpointTestProtocol] = None - url: StrictStr = Field(description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: TestSslVersionId = Field(alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - verify_certificate: StrictBool = Field(description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") - target_response_time: StrictInt = Field(description="Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red).", alias="targetResponseTime") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "targetResponseTime", "password"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines"), - "port": obj.get("port"), - "testName": obj.get("testName"), - "authType": obj.get("authType"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "protocol": obj.get("protocol"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate"), - "targetResponseTime": obj.get("targetResponseTime"), - "password": obj.get("password") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_test.py deleted file mode 100644 index 5607c9df..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_test.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from instant_tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid -from instant_tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.test_interval import TestInterval -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerTest(BaseModel): - """ - EndpointHttpServerTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointHttpServerType] = None - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - 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") - 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") - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - "ssl_version", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type"), - "authType": obj.get("authType"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate"), - "contentRegex": obj.get("contentRegex"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "postBody": obj.get("postBody"), - "sslVersion": obj.get("sslVersion"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_type.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_type.py deleted file mode 100644 index 0533c284..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_http_server_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointHttpServerType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - HTTP_MINUS_SERVER = 'http-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_instant_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_instant_test.py deleted file mode 100644 index 2feb718f..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_instant_test.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointInstantTest(BaseModel): - """ - EndpointInstantTest - """ # noqa: E501 - agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - test_name: StrictStr = Field(description="Name of the test.", alias="testName") - __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines"), - "port": obj.get("port"), - "testName": obj.get("testName") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_scheduled_test_type.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_scheduled_test_type.py deleted file mode 100644 index 332f64d6..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_scheduled_test_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointScheduledTestType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - HTTP_MINUS_SERVER = 'http-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointScheduledTestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_specific_agents_selector_config.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_specific_agents_selector_config.py deleted file mode 100644 index 3013d543..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_specific_agents_selector_config.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointSpecificAgentsSelectorConfig(BaseModel): - """ - Specific agents selection object. - """ # noqa: E501 - agent_selector_type: Optional[SpecificAgentsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointSpecificAgentsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointSpecificAgentsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines"), - "agents": obj.get("agents") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test.py deleted file mode 100644 index 9560318e..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from instant_tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from instant_tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTest(BaseModel): - """ - EndpointTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointScheduledTestType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_agent_selector_type.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_agent_selector_type.py deleted file mode 100644 index 6c14f343..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_agent_selector_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestAgentSelectorType(str, Enum): - """ - Retrieve either all available agents, a specific list of agents, or a list of agent labels. - """ - - """ - allowed enum values - """ - ALL_MINUS_AGENTS = 'all-agents' - SPECIFIC_MINUS_AGENTS = 'specific-agents' - AGENT_MINUS_LABELS = 'agent-labels' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAgentSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_aid.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_aid.py deleted file mode 100644 index 5f98ddb3..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_aid.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestAid(BaseModel): - """ - EndpointTestAid - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAid 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestAid 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") - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_auth_type.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_auth_type.py deleted file mode 100644 index ab48707c..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_auth_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestAuthType(str, Enum): - """ - HTTP authentication type. - """ - - """ - allowed enum values - """ - NONE = 'none' - BASIC = 'basic' - NTLM = 'ntlm' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAuthType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links.py deleted file mode 100644 index 3d1e16b9..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from instant_tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from instant_tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information. - """ # noqa: E501 - var_self: Optional[EndpointTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[EndpointTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": EndpointTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": EndpointTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_self.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_self.py deleted file mode 100644 index 9ec80aa8..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestLinksSelf(BaseModel): - """ - EndpointTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestLinksSelf 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/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_test_results.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_test_results.py deleted file mode 100644 index 7d45d895..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from instant_tests_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -ENDPOINTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class EndpointTestLinksTestResults(BaseModel): - """ - EndpointTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EndpointTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_protocol.py b/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_protocol.py deleted file mode 100644 index 1aa6bfca..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/endpoint_test_protocol.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestProtocol(str, Enum): - """ - Protocol used to perform the test. - """ - - """ - allowed enum values - """ - ICMP = 'icmp' - ICMP_MINUS_WITH_MINUS_TCP_MINUS_CONNECT = 'icmp-with-tcp-connect' - TCP = 'tcp' - PREFER_MINUS_TCP = 'prefer-tcp' - AST_MINUS_AUTODETECT = 'ast-autodetect' - AUTODETECT = 'autodetect' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/error.py b/endpoint/instant_tests_api/instant_tests_api/models/error.py deleted file mode 100644 index be49e574..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/instant_tests_api/instant_tests_api/models/link.py b/endpoint/instant_tests_api/instant_tests_api/models/link.py deleted file mode 100644 index 6018b8b6..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/instant_tests_api/instant_tests_api/models/specific_agents_selector_type.py b/endpoint/instant_tests_api/instant_tests_api/models/specific_agents_selector_type.py deleted file mode 100644 index 2362880f..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/specific_agents_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class SpecificAgentsSelectorType(str, Enum): - """ - SpecificAgentsSelectorType - """ - - """ - allowed enum values - """ - SPECIFIC_MINUS_AGENTS = 'specific-agents' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SpecificAgentsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/test_interval.py b/endpoint/instant_tests_api/instant_tests_api/models/test_interval.py deleted file mode 100644 index 3f1d0b03..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/test_probe_mode.py b/endpoint/instant_tests_api/instant_tests_api/models/test_probe_mode.py deleted file mode 100644 index 7a1ee76a..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/test_probe_mode.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProbeMode(str, Enum): - """ - Probe mode used by network test, only valid when the protocol is set to TCP. - """ - - """ - allowed enum values - """ - AUTO = 'auto' - SACK = 'sack' - SYN = 'syn' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProbeMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py b/endpoint/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py deleted file mode 100644 index 3f20dc07..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestSslVersionId(str, Enum): - """ - SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_3 = '3' - ENUM_4 = '4' - ENUM_5 = '5' - ENUM_6 = '6' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSslVersionId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/instant_tests_api/instant_tests_api/models/unauthorized_error.py b/endpoint/instant_tests_api/instant_tests_api/models/unauthorized_error.py deleted file mode 100644 index 0f2da971..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/instant_tests_api/instant_tests_api/rest.py b/endpoint/instant_tests_api/instant_tests_api/rest.py deleted file mode 100644 index 9e0c3b1e..00000000 --- a/endpoint/instant_tests_api/instant_tests_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from instant_tests_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/endpoint/instant_tests_api/pyproject.toml b/endpoint/instant_tests_api/pyproject.toml deleted file mode 100644 index e4c7fc25..00000000 --- a/endpoint/instant_tests_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "instant_tests_api" -version = "1.0.0" -description = "Endpoint Instant Scheduled Tests API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Instant Scheduled Tests API"] -include = ["instant_tests_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/endpoint/instant_tests_api/setup.py b/endpoint/instant_tests_api/setup.py deleted file mode 100644 index a5bf6d88..00000000 --- a/endpoint/instant_tests_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "instant-tests-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Endpoint Instant Scheduled Tests API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Endpoint Instant Scheduled Tests API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ### Overview 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. - """, # noqa: E501 - package_data={"instant_tests_api": ["py.typed"]}, -) diff --git a/endpoint/instant_tests_api/test-requirements.txt b/endpoint/instant_tests_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/endpoint/instant_tests_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/endpoint/instant_tests_api/test/test_account_group_id.py b/endpoint/instant_tests_api/test/test_account_group_id.py deleted file mode 100644 index 371df83b..00000000 --- a/endpoint/instant_tests_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_agent_labels_selector_type.py b/endpoint/instant_tests_api/test/test_agent_labels_selector_type.py deleted file mode 100644 index 14f1ef83..00000000 --- a/endpoint/instant_tests_api/test/test_agent_labels_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType - -class TestAgentLabelsSelectorType(unittest.TestCase): - """AgentLabelsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentLabelsSelectorType(self): - """Test AgentLabelsSelectorType""" - # inst = AgentLabelsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_agent_to_server_instant_scheduled_test_api.py b/endpoint/instant_tests_api/test/test_agent_to_server_instant_scheduled_test_api.py deleted file mode 100644 index 833b2dad..00000000 --- a/endpoint/instant_tests_api/test/test_agent_to_server_instant_scheduled_test_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_agent_to_server_instant_test(self) -> None: - """Test case for post_agent_to_server_instant_test - - Run agent to server instant scheduled test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_all_agents_selector_type.py b/endpoint/instant_tests_api/test/test_all_agents_selector_type.py deleted file mode 100644 index 5effab6c..00000000 --- a/endpoint/instant_tests_api/test/test_all_agents_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.all_agents_selector_type import AllAgentsSelectorType - -class TestAllAgentsSelectorType(unittest.TestCase): - """AllAgentsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAllAgentsSelectorType(self): - """Test AllAgentsSelectorType""" - # inst = AllAgentsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_agent_labels_selector_config.py b/endpoint/instant_tests_api/test/test_endpoint_agent_labels_selector_config.py deleted file mode 100644 index 2300f12b..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_agent_labels_selector_config.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig - -class TestEndpointAgentLabelsSelectorConfig(unittest.TestCase): - """EndpointAgentLabelsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentLabelsSelectorConfig: - """Test EndpointAgentLabelsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentLabelsSelectorConfig` - """ - model = EndpointAgentLabelsSelectorConfig() - if include_optional: - return EndpointAgentLabelsSelectorConfig( - agent_selector_type = 'agent-labels', - max_machines = 10, - endpoint_agent_labels = ["567","214"] - ) - else: - return EndpointAgentLabelsSelectorConfig( - ) - """ - - def testEndpointAgentLabelsSelectorConfig(self): - """Test EndpointAgentLabelsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_agent_selector_config.py b/endpoint/instant_tests_api/test/test_endpoint_agent_selector_config.py deleted file mode 100644 index 58b79aa7..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_agent_selector_config.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig - -class TestEndpointAgentSelectorConfig(unittest.TestCase): - """EndpointAgentSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentSelectorConfig: - """Test EndpointAgentSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentSelectorConfig` - """ - model = EndpointAgentSelectorConfig() - if include_optional: - return EndpointAgentSelectorConfig( - agent_selector_type = 'specific-agents', - max_machines = 10, - endpoint_agent_labels = ["567","214"], - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] - ) - else: - return EndpointAgentSelectorConfig( - ) - """ - - def testEndpointAgentSelectorConfig(self): - """Test EndpointAgentSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_instant_test.py b/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_instant_test.py deleted file mode 100644 index 6da7bff8..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest - -class TestEndpointAgentToServerInstantTest(unittest.TestCase): - """EndpointAgentToServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentToServerInstantTest: - """Test EndpointAgentToServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentToServerInstantTest` - """ - model = EndpointAgentToServerInstantTest() - if include_optional: - return EndpointAgentToServerInstantTest( - agent_selector_type = 'all-agents', - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], - has_ping = True, - has_traceroute = True, - endpoint_agent_labels = ["567","214"], - max_machines = 10, - port = 80, - test_name = 'Test name', - server_name = 'www.example.com' - ) - else: - return EndpointAgentToServerInstantTest( - agent_selector_type = 'all-agents', - max_machines = 10, - test_name = 'Test name', - server_name = 'www.example.com', - ) - """ - - def testEndpointAgentToServerInstantTest(self): - """Test EndpointAgentToServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_test.py b/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_test.py deleted file mode 100644 index f9f5a026..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -class TestEndpointAgentToServerTest(unittest.TestCase): - """EndpointAgentToServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentToServerTest: - """Test EndpointAgentToServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentToServerTest` - """ - model = EndpointAgentToServerTest() - if include_optional: - return EndpointAgentToServerTest( - links = instant_tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = instant_tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return EndpointAgentToServerTest( - ) - """ - - def testEndpointAgentToServerTest(self): - """Test EndpointAgentToServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_type.py b/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_type.py deleted file mode 100644 index 7a387ed9..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_agent_to_server_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType - -class TestEndpointAgentToServerType(unittest.TestCase): - """EndpointAgentToServerType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointAgentToServerType(self): - """Test EndpointAgentToServerType""" - # inst = EndpointAgentToServerType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_all_agents_selector_config.py b/endpoint/instant_tests_api/test/test_endpoint_all_agents_selector_config.py deleted file mode 100644 index ef9725cf..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_all_agents_selector_config.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig - -class TestEndpointAllAgentsSelectorConfig(unittest.TestCase): - """EndpointAllAgentsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAllAgentsSelectorConfig: - """Test EndpointAllAgentsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAllAgentsSelectorConfig` - """ - model = EndpointAllAgentsSelectorConfig() - if include_optional: - return EndpointAllAgentsSelectorConfig( - agent_selector_type = 'all-agents', - max_machines = 10 - ) - else: - return EndpointAllAgentsSelectorConfig( - ) - """ - - def testEndpointAllAgentsSelectorConfig(self): - """Test EndpointAllAgentsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_http_server_base_test.py b/endpoint/instant_tests_api/test/test_endpoint_http_server_base_test.py deleted file mode 100644 index 9444eb49..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_http_server_base_test.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest - -class TestEndpointHttpServerBaseTest(unittest.TestCase): - """EndpointHttpServerBaseTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerBaseTest: - """Test EndpointHttpServerBaseTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerBaseTest` - """ - model = EndpointHttpServerBaseTest() - if include_optional: - return EndpointHttpServerBaseTest( - auth_type = 'none', - has_path_trace_in_session = True, - http_time_limit = 5000, - protocol = 'icmp', - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False - ) - else: - return EndpointHttpServerBaseTest( - ) - """ - - def testEndpointHttpServerBaseTest(self): - """Test EndpointHttpServerBaseTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_http_server_instant_test.py b/endpoint/instant_tests_api/test/test_endpoint_http_server_instant_test.py deleted file mode 100644 index ea74c40b..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_http_server_instant_test.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest - -class TestEndpointHttpServerInstantTest(unittest.TestCase): - """EndpointHttpServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerInstantTest: - """Test EndpointHttpServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerInstantTest` - """ - model = EndpointHttpServerInstantTest() - if include_optional: - return EndpointHttpServerInstantTest( - agent_selector_type = 'all-agents', - agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], - has_ping = True, - has_traceroute = True, - endpoint_agent_labels = [567, 214], - max_machines = 10, - port = 80, - test_name = 'Test name', - auth_type = 'none', - has_path_trace_in_session = True, - http_time_limit = 5000, - protocol = 'icmp', - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - target_response_time = 1000, - password = 'password' - ) - else: - return EndpointHttpServerInstantTest( - agent_selector_type = 'all-agents', - max_machines = 10, - test_name = 'Test name', - http_time_limit = 5000, - url = 'www.example.com', - ssl_version_id = '0', - verify_certificate = False, - target_response_time = 1000, - ) - """ - - def testEndpointHttpServerInstantTest(self): - """Test EndpointHttpServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_http_server_test.py b/endpoint/instant_tests_api/test/test_endpoint_http_server_test.py deleted file mode 100644 index 1f201618..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_http_server_test.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_http_server_test import EndpointHttpServerTest - -class TestEndpointHttpServerTest(unittest.TestCase): - """EndpointHttpServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerTest: - """Test EndpointHttpServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerTest` - """ - model = EndpointHttpServerTest() - if include_optional: - return EndpointHttpServerTest( - links = instant_tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = instant_tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'http-server', - auth_type = 'none', - http_time_limit = 5000, - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - content_regex = '(regex)+', - follow_redirects = True, - http_target_time = 100, - http_version = 1, - post_body = 'body', - ssl_version = 'Auto', - use_ntlm = False, - user_agent = 'curl' - ) - else: - return EndpointHttpServerTest( - ) - """ - - def testEndpointHttpServerTest(self): - """Test EndpointHttpServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_http_server_type.py b/endpoint/instant_tests_api/test/test_endpoint_http_server_type.py deleted file mode 100644 index f35e2233..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_http_server_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_http_server_type import EndpointHttpServerType - -class TestEndpointHttpServerType(unittest.TestCase): - """EndpointHttpServerType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointHttpServerType(self): - """Test EndpointHttpServerType""" - # inst = EndpointHttpServerType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_instant_test.py b/endpoint/instant_tests_api/test/test_endpoint_instant_test.py deleted file mode 100644 index c99e4a99..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_instant_test.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_instant_test import EndpointInstantTest - -class TestEndpointInstantTest(unittest.TestCase): - """EndpointInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointInstantTest: - """Test EndpointInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointInstantTest` - """ - model = EndpointInstantTest() - if include_optional: - return EndpointInstantTest( - agent_selector_type = 'all-agents', - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], - has_ping = True, - has_traceroute = True, - endpoint_agent_labels = ["567","214"], - max_machines = 10, - port = 80, - test_name = 'Test name' - ) - else: - return EndpointInstantTest( - agent_selector_type = 'all-agents', - max_machines = 10, - test_name = 'Test name', - ) - """ - - def testEndpointInstantTest(self): - """Test EndpointInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_scheduled_test_type.py b/endpoint/instant_tests_api/test/test_endpoint_scheduled_test_type.py deleted file mode 100644 index 1c2d1fe4..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_scheduled_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType - -class TestEndpointScheduledTestType(unittest.TestCase): - """EndpointScheduledTestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointScheduledTestType(self): - """Test EndpointScheduledTestType""" - # inst = EndpointScheduledTestType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_specific_agents_selector_config.py b/endpoint/instant_tests_api/test/test_endpoint_specific_agents_selector_config.py deleted file mode 100644 index 1389dfa9..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_specific_agents_selector_config.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig - -class TestEndpointSpecificAgentsSelectorConfig(unittest.TestCase): - """EndpointSpecificAgentsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointSpecificAgentsSelectorConfig: - """Test EndpointSpecificAgentsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointSpecificAgentsSelectorConfig` - """ - model = EndpointSpecificAgentsSelectorConfig() - if include_optional: - return EndpointSpecificAgentsSelectorConfig( - agent_selector_type = 'specific-agents', - max_machines = 10, - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] - ) - else: - return EndpointSpecificAgentsSelectorConfig( - ) - """ - - def testEndpointSpecificAgentsSelectorConfig(self): - """Test EndpointSpecificAgentsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test.py b/endpoint/instant_tests_api/test/test_endpoint_test.py deleted file mode 100644 index 42fa339e..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test import EndpointTest - -class TestEndpointTest(unittest.TestCase): - """EndpointTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTest: - """Test EndpointTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTest` - """ - model = EndpointTest() - if include_optional: - return EndpointTest( - links = instant_tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = instant_tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return EndpointTest( - ) - """ - - def testEndpointTest(self): - """Test EndpointTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_agent_selector_type.py b/endpoint/instant_tests_api/test/test_endpoint_test_agent_selector_type.py deleted file mode 100644 index c55ced2f..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_agent_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType - -class TestEndpointTestAgentSelectorType(unittest.TestCase): - """EndpointTestAgentSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestAgentSelectorType(self): - """Test EndpointTestAgentSelectorType""" - # inst = EndpointTestAgentSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_aid.py b/endpoint/instant_tests_api/test/test_endpoint_test_aid.py deleted file mode 100644 index b9e937bb..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_aid.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_aid import EndpointTestAid - -class TestEndpointTestAid(unittest.TestCase): - """EndpointTestAid unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestAid: - """Test EndpointTestAid - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestAid` - """ - model = EndpointTestAid() - if include_optional: - return EndpointTestAid( - aid = '11' - ) - else: - return EndpointTestAid( - ) - """ - - def testEndpointTestAid(self): - """Test EndpointTestAid""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_auth_type.py b/endpoint/instant_tests_api/test/test_endpoint_test_auth_type.py deleted file mode 100644 index 5f19881a..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_auth_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_auth_type import EndpointTestAuthType - -class TestEndpointTestAuthType(unittest.TestCase): - """EndpointTestAuthType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestAuthType(self): - """Test EndpointTestAuthType""" - # inst = EndpointTestAuthType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_links.py b/endpoint/instant_tests_api/test/test_endpoint_test_links.py deleted file mode 100644 index fe3d8056..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_links import EndpointTestLinks - -class TestEndpointTestLinks(unittest.TestCase): - """EndpointTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinks: - """Test EndpointTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinks` - """ - model = EndpointTestLinks() - if include_optional: - return EndpointTestLinks( - var_self = None, - test_results = [{"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"}] - ) - else: - return EndpointTestLinks( - ) - """ - - def testEndpointTestLinks(self): - """Test EndpointTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_links_self.py b/endpoint/instant_tests_api/test/test_endpoint_test_links_self.py deleted file mode 100644 index 344a2999..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf - -class TestEndpointTestLinksSelf(unittest.TestCase): - """EndpointTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinksSelf: - """Test EndpointTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinksSelf` - """ - model = EndpointTestLinksSelf() - if include_optional: - return EndpointTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return EndpointTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testEndpointTestLinksSelf(self): - """Test EndpointTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_links_test_results.py b/endpoint/instant_tests_api/test/test_endpoint_test_links_test_results.py deleted file mode 100644 index e3b5a415..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults - -class TestEndpointTestLinksTestResults(unittest.TestCase): - """EndpointTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinksTestResults: - """Test EndpointTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinksTestResults` - """ - model = EndpointTestLinksTestResults() - if include_optional: - return EndpointTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return EndpointTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testEndpointTestLinksTestResults(self): - """Test EndpointTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_endpoint_test_protocol.py b/endpoint/instant_tests_api/test/test_endpoint_test_protocol.py deleted file mode 100644 index 639c1d0f..00000000 --- a/endpoint/instant_tests_api/test/test_endpoint_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.endpoint_test_protocol import EndpointTestProtocol - -class TestEndpointTestProtocol(unittest.TestCase): - """EndpointTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestProtocol(self): - """Test EndpointTestProtocol""" - # inst = EndpointTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_error.py b/endpoint/instant_tests_api/test/test_error.py deleted file mode 100644 index 2010805d..00000000 --- a/endpoint/instant_tests_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_http_server_instant_scheduled_test_api.py b/endpoint/instant_tests_api/test/test_http_server_instant_scheduled_test_api.py deleted file mode 100644 index bce30f5b..00000000 --- a/endpoint/instant_tests_api/test/test_http_server_instant_scheduled_test_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_http_server_instant_test(self) -> None: - """Test case for post_http_server_instant_test - - Run http server instant scheduled test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_link.py b/endpoint/instant_tests_api/test/test_link.py deleted file mode 100644 index 156cd102..00000000 --- a/endpoint/instant_tests_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_run_existing_test_api.py b/endpoint/instant_tests_api/test/test_run_existing_test_api.py deleted file mode 100644 index 7649e343..00000000 --- a/endpoint/instant_tests_api/test/test_run_existing_test_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_endpoint_instant_run(self) -> None: - """Test case for post_endpoint_instant_run - - Run endpoint instant scheduled test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_specific_agents_selector_type.py b/endpoint/instant_tests_api/test/test_specific_agents_selector_type.py deleted file mode 100644 index 0887047e..00000000 --- a/endpoint/instant_tests_api/test/test_specific_agents_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType - -class TestSpecificAgentsSelectorType(unittest.TestCase): - """SpecificAgentsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSpecificAgentsSelectorType(self): - """Test SpecificAgentsSelectorType""" - # inst = SpecificAgentsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_test_interval.py b/endpoint/instant_tests_api/test/test_test_interval.py deleted file mode 100644 index 9b1c9227..00000000 --- a/endpoint/instant_tests_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_test_probe_mode.py b/endpoint/instant_tests_api/test/test_test_probe_mode.py deleted file mode 100644 index 8f2d6165..00000000 --- a/endpoint/instant_tests_api/test/test_test_probe_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_probe_mode import TestProbeMode - -class TestTestProbeMode(unittest.TestCase): - """TestProbeMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProbeMode(self): - """Test TestProbeMode""" - # inst = TestProbeMode() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_test_ssl_version_id.py b/endpoint/instant_tests_api/test/test_test_ssl_version_id.py deleted file mode 100644 index 442ab1fd..00000000 --- a/endpoint/instant_tests_api/test/test_test_ssl_version_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId - -class TestTestSslVersionId(unittest.TestCase): - """TestSslVersionId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestSslVersionId(self): - """Test TestSslVersionId""" - # inst = TestSslVersionId() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/test/test_unauthorized_error.py b/endpoint/instant_tests_api/test/test_unauthorized_error.py deleted file mode 100644 index 488939a2..00000000 --- a/endpoint/instant_tests_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Instant Scheduled Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/instant_tests_api/tox.ini b/endpoint/instant_tests_api/tox.ini deleted file mode 100644 index 3e5809f2..00000000 --- a/endpoint/instant_tests_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=instant_tests_api diff --git a/endpoint/labels_api/.github/workflows/python.yml b/endpoint/labels_api/.github/workflows/python.yml deleted file mode 100644 index 20120cac..00000000 --- a/endpoint/labels_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: labels_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/endpoint/labels_api/.gitlab-ci.yml b/endpoint/labels_api/.gitlab-ci.yml deleted file mode 100644 index bd6c155d..00000000 --- a/endpoint/labels_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=labels_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/endpoint/labels_api/.openapi-generator/FILES b/endpoint/labels_api/.openapi-generator/FILES deleted file mode 100644 index e7063060..00000000 --- a/endpoint/labels_api/.openapi-generator/FILES +++ /dev/null @@ -1,80 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/EndpointLabelsList200Response.md -docs/Error.md -docs/Expand.md -docs/Filter.md -docs/FilterType.md -docs/Label.md -docs/LabelFilterMode.md -docs/Labels.md -docs/LabelsLabelsInner.md -docs/Link.md -docs/ManageLabelsApi.md -docs/MatchType.md -docs/PaginationNextLink.md -docs/PaginationNextLinkLinks.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/UnauthorizedError.md -docs/V7EndpointLabelsPost201Response.md -docs/V7EndpointLabelsPostRequest.md -git_push.sh -labels_api/__init__.py -labels_api/api/__init__.py -labels_api/api/manage_labels_api.py -labels_api/api_client.py -labels_api/api_response.py -labels_api/configuration.py -labels_api/exceptions.py -labels_api/models/__init__.py -labels_api/models/endpoint_labels_list200_response.py -labels_api/models/error.py -labels_api/models/expand.py -labels_api/models/filter.py -labels_api/models/filter_type.py -labels_api/models/label.py -labels_api/models/label_filter_mode.py -labels_api/models/labels.py -labels_api/models/labels_labels_inner.py -labels_api/models/link.py -labels_api/models/match_type.py -labels_api/models/pagination_next_link.py -labels_api/models/pagination_next_link_links.py -labels_api/models/self_links.py -labels_api/models/self_links_links.py -labels_api/models/unauthorized_error.py -labels_api/models/v7_endpoint_labels_post201_response.py -labels_api/models/v7_endpoint_labels_post_request.py -labels_api/py.typed -labels_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_endpoint_labels_list200_response.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_labels.py -test/test_labels_labels_inner.py -test/test_link.py -test/test_manage_labels_api.py -test/test_match_type.py -test/test_pagination_next_link.py -test/test_pagination_next_link_links.py -test/test_self_links.py -test/test_self_links_links.py -test/test_unauthorized_error.py -test/test_v7_endpoint_labels_post201_response.py -test/test_v7_endpoint_labels_post_request.py -tox.ini diff --git a/endpoint/labels_api/.openapi-generator/VERSION b/endpoint/labels_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/endpoint/labels_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/endpoint/labels_api/.travis.yml b/endpoint/labels_api/.travis.yml deleted file mode 100644 index d7ebb0c5..00000000 --- a/endpoint/labels_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=labels_api diff --git a/endpoint/labels_api/README.md b/endpoint/labels_api/README.md deleted file mode 100644 index 6a4cefa5..00000000 --- a/endpoint/labels_api/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# labels-api -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.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import labels_api -``` - -### 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 labels_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.ManageLabelsApi(api_client) - id = 'id_example' # str | The unique identifier of the label to operate on. - - try: - # Deletes label - api_instance.endpoint_label_delete(id) - except ApiException as e: - print("Exception when calling ManageLabelsApi->endpoint_label_delete: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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} | Deletes 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 - - -## Documentation For Models - - - [EndpointLabelsList200Response](docs/EndpointLabelsList200Response.md) - - [Error](docs/Error.md) - - [Expand](docs/Expand.md) - - [Filter](docs/Filter.md) - - [FilterType](docs/FilterType.md) - - [Label](docs/Label.md) - - [LabelFilterMode](docs/LabelFilterMode.md) - - [Labels](docs/Labels.md) - - [LabelsLabelsInner](docs/LabelsLabelsInner.md) - - [Link](docs/Link.md) - - [MatchType](docs/MatchType.md) - - [PaginationNextLink](docs/PaginationNextLink.md) - - [PaginationNextLinkLinks](docs/PaginationNextLinkLinks.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [V7EndpointLabelsPost201Response](docs/V7EndpointLabelsPost201Response.md) - - [V7EndpointLabelsPostRequest](docs/V7EndpointLabelsPostRequest.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/endpoint/labels_api/docs/EndpointLabelsList200Response.md b/endpoint/labels_api/docs/EndpointLabelsList200Response.md deleted file mode 100644 index 6e474967..00000000 --- a/endpoint/labels_api/docs/EndpointLabelsList200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# EndpointLabelsList200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**labels** | [**List[LabelsLabelsInner]**](LabelsLabelsInner.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from labels_api.models.endpoint_labels_list200_response import EndpointLabelsList200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointLabelsList200Response from a JSON string -endpoint_labels_list200_response_instance = EndpointLabelsList200Response.from_json(json) -# print the JSON string representation of the object -print EndpointLabelsList200Response.to_json() - -# convert the object into a dict -endpoint_labels_list200_response_dict = endpoint_labels_list200_response_instance.to_dict() -# create an instance of EndpointLabelsList200Response from a dict -endpoint_labels_list200_response_form_dict = endpoint_labels_list200_response.from_dict(endpoint_labels_list200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/labels_api/docs/Error.md b/endpoint/labels_api/docs/Error.md deleted file mode 100644 index 64391133..00000000 --- a/endpoint/labels_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 labels_api.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_form_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/endpoint/labels_api/docs/Expand.md b/endpoint/labels_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/endpoint/labels_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/endpoint/labels_api/docs/Label.md b/endpoint/labels_api/docs/Label.md deleted file mode 100644 index ea2d89f8..00000000 --- a/endpoint/labels_api/docs/Label.md +++ /dev/null @@ -1,33 +0,0 @@ -# Label - -A label definition. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | Label identifier. | [optional] [readonly] -**name** | **str** | The label name. | [optional] -**color** | **str** | UI color | [optional] -**match_type** | [**MatchType**](MatchType.md) | | [optional] -**filters** | [**List[Filter]**](Filter.md) | The filters combined using the matchType to determine the label's match. | [optional] - -## Example - -```python -from labels_api.models.label import Label - -# TODO update the JSON string below -json = "{}" -# create an instance of Label from a JSON string -label_instance = Label.from_json(json) -# print the JSON string representation of the object -print Label.to_json() - -# convert the object into a dict -label_dict = label_instance.to_dict() -# create an instance of Label from a dict -label_form_dict = label.from_dict(label_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/endpoint/labels_api/docs/Labels.md b/endpoint/labels_api/docs/Labels.md deleted file mode 100644 index 60e9ae08..00000000 --- a/endpoint/labels_api/docs/Labels.md +++ /dev/null @@ -1,29 +0,0 @@ -# Labels - -A list of Labels. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**labels** | [**List[LabelsLabelsInner]**](LabelsLabelsInner.md) | | [optional] - -## Example - -```python -from labels_api.models.labels import Labels - -# TODO update the JSON string below -json = "{}" -# create an instance of Labels from a JSON string -labels_instance = Labels.from_json(json) -# print the JSON string representation of the object -print Labels.to_json() - -# convert the object into a dict -labels_dict = labels_instance.to_dict() -# create an instance of Labels from a dict -labels_form_dict = labels.from_dict(labels_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/endpoint/labels_api/docs/Link.md b/endpoint/labels_api/docs/Link.md deleted file mode 100644 index ab89c4f1..00000000 --- a/endpoint/labels_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 labels_api.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_form_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/endpoint/labels_api/docs/ManageLabelsApi.md b/endpoint/labels_api/docs/ManageLabelsApi.md deleted file mode 100644 index fe142766..00000000 --- a/endpoint/labels_api/docs/ManageLabelsApi.md +++ /dev/null @@ -1,421 +0,0 @@ -# labels_api.ManageLabelsApi - -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} | Deletes 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 - - -# **endpoint_label_delete** -> endpoint_label_delete(id) - -Deletes label - -Deletes the label from your account. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.ManageLabelsApi(api_client) - id = 'id_example' # str | The unique identifier of the label to operate on. - - try: - # Deletes label - api_instance.endpoint_label_delete(id) - except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_label_delete: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The unique identifier of the label to operate on. | - -### 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 | - | -**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_label_get** -> V7EndpointLabelsPost201Response endpoint_label_get(id, expand=expand) - -Retrieve label - -Returns a single label using its ID. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.expand import Expand -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.ManageLabelsApi(api_client) - id = 'id_example' # str | The unique identifier of the label to operate on. - expand = [labels_api.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) - - try: - # Retrieve label - api_response = api_instance.endpoint_label_get(id, expand=expand) - print("The response of ManageLabelsApi->endpoint_label_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_label_get: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The unique identifier of the label to operate on. | - **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] - -### Return type - -[**V7EndpointLabelsPost201Response**](V7EndpointLabelsPost201Response.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 | - | - -[[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** -> V7EndpointLabelsPost201Response endpoint_label_update(id, label=label) - -Update label - -Updates a label using its ID. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.label import Label -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.ManageLabelsApi(api_client) - id = 'id_example' # str | The unique identifier of the label to operate on. - label = labels_api.Label() # Label | Fields to change on the agent (optional) - - try: - # Update label - api_response = api_instance.endpoint_label_update(id, label=label) - print("The response of ManageLabelsApi->endpoint_label_update:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_label_update: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The unique identifier of the label to operate on. | - **label** | [**Label**](Label.md)| Fields to change on the agent | [optional] - -### Return type - -[**V7EndpointLabelsPost201Response**](V7EndpointLabelsPost201Response.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 | - | -**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_labels_list** -> EndpointLabelsList200Response endpoint_labels_list(max=max, cursor=cursor, expand=expand) - -List labels - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.endpoint_labels_list200_response import EndpointLabelsList200Response -from labels_api.models.expand import Expand -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.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 `_links` instead of this parameter. (optional) - expand = [labels_api.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) - - try: - # List labels - api_response = api_instance.endpoint_labels_list(max=max, cursor=cursor, expand=expand) - 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 `_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] - -### Return type - -[**EndpointLabelsList200Response**](EndpointLabelsList200Response.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** -> V7EndpointLabelsPost201Response v7_endpoint_labels_post(v7_endpoint_labels_post_request=v7_endpoint_labels_post_request) - -Create label - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response -from labels_api.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.ManageLabelsApi(api_client) - v7_endpoint_labels_post_request = labels_api.V7EndpointLabelsPostRequest() # V7EndpointLabelsPostRequest | Label settings (optional) - - try: - # Create label - api_response = api_instance.v7_endpoint_labels_post(v7_endpoint_labels_post_request=v7_endpoint_labels_post_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 -------------- | ------------- | ------------- | ------------- - **v7_endpoint_labels_post_request** | [**V7EndpointLabelsPostRequest**](V7EndpointLabelsPostRequest.md)| Label settings | [optional] - -### Return type - -[**V7EndpointLabelsPost201Response**](V7EndpointLabelsPost201Response.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 -
| -**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/endpoint/labels_api/docs/PaginationNextLink.md b/endpoint/labels_api/docs/PaginationNextLink.md deleted file mode 100644 index ac51975b..00000000 --- a/endpoint/labels_api/docs/PaginationNextLink.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationNextLink - -A links object containing a related link for forward pagination. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] - -## Example - -```python -from labels_api.models.pagination_next_link import PaginationNextLink - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationNextLink from a JSON string -pagination_next_link_instance = PaginationNextLink.from_json(json) -# print the JSON string representation of the object -print PaginationNextLink.to_json() - -# convert the object into a dict -pagination_next_link_dict = pagination_next_link_instance.to_dict() -# create an instance of PaginationNextLink from a dict -pagination_next_link_form_dict = pagination_next_link.from_dict(pagination_next_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/endpoint/labels_api/docs/PaginationNextLinkLinks.md b/endpoint/labels_api/docs/PaginationNextLinkLinks.md deleted file mode 100644 index 1f857a55..00000000 --- a/endpoint/labels_api/docs/PaginationNextLinkLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# PaginationNextLinkLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from labels_api.models.pagination_next_link_links import PaginationNextLinkLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationNextLinkLinks from a JSON string -pagination_next_link_links_instance = PaginationNextLinkLinks.from_json(json) -# print the JSON string representation of the object -print PaginationNextLinkLinks.to_json() - -# convert the object into a dict -pagination_next_link_links_dict = pagination_next_link_links_instance.to_dict() -# create an instance of PaginationNextLinkLinks from a dict -pagination_next_link_links_form_dict = pagination_next_link_links.from_dict(pagination_next_link_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/endpoint/labels_api/docs/SelfLinks.md b/endpoint/labels_api/docs/SelfLinks.md deleted file mode 100644 index bccde48b..00000000 --- a/endpoint/labels_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from labels_api.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_form_dict = self_links.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/endpoint/labels_api/docs/SelfLinksLinks.md b/endpoint/labels_api/docs/SelfLinksLinks.md deleted file mode 100644 index 99a51f81..00000000 --- a/endpoint/labels_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from labels_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/endpoint/labels_api/docs/UnauthorizedError.md b/endpoint/labels_api/docs/UnauthorizedError.md deleted file mode 100644 index 77e1e6d9..00000000 --- a/endpoint/labels_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from labels_api.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_form_dict = unauthorized_error.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/endpoint/labels_api/git_push.sh b/endpoint/labels_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/endpoint/labels_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/endpoint/labels_api/labels_api/__init__.py b/endpoint/labels_api/labels_api/__init__.py deleted file mode 100644 index e9fd4c2e..00000000 --- a/endpoint/labels_api/labels_api/__init__.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 labels_api.api.manage_labels_api import ManageLabelsApi - -# import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.api_client import ApiClient -from labels_api.configuration import Configuration -from labels_api.exceptions import OpenApiException -from labels_api.exceptions import ApiTypeError -from labels_api.exceptions import ApiValueError -from labels_api.exceptions import ApiKeyError -from labels_api.exceptions import ApiAttributeError -from labels_api.exceptions import ApiException - -# import models into sdk package -from labels_api.models.endpoint_labels_list200_response import EndpointLabelsList200Response -from labels_api.models.error import Error -from labels_api.models.expand import Expand -from labels_api.models.filter import Filter -from labels_api.models.filter_type import FilterType -from labels_api.models.label import Label -from labels_api.models.label_filter_mode import LabelFilterMode -from labels_api.models.labels import Labels -from labels_api.models.labels_labels_inner import LabelsLabelsInner -from labels_api.models.link import Link -from labels_api.models.match_type import MatchType -from labels_api.models.pagination_next_link import PaginationNextLink -from labels_api.models.pagination_next_link_links import PaginationNextLinkLinks -from labels_api.models.self_links import SelfLinks -from labels_api.models.self_links_links import SelfLinksLinks -from labels_api.models.unauthorized_error import UnauthorizedError -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response -from labels_api.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest diff --git a/endpoint/labels_api/labels_api/api/__init__.py b/endpoint/labels_api/labels_api/api/__init__.py deleted file mode 100644 index 8db10fcc..00000000 --- a/endpoint/labels_api/labels_api/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from labels_api.api.manage_labels_api import ManageLabelsApi - diff --git a/endpoint/labels_api/labels_api/api_client.py b/endpoint/labels_api/labels_api/api_client.py deleted file mode 100644 index dd7844f9..00000000 --- a/endpoint/labels_api/labels_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from labels_api.configuration import Configuration -from labels_api.api_response import ApiResponse -import labels_api.models -from labels_api import rest -from labels_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(labels_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/endpoint/labels_api/labels_api/api_response.py b/endpoint/labels_api/labels_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/endpoint/labels_api/labels_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/endpoint/labels_api/labels_api/configuration.py b/endpoint/labels_api/labels_api/configuration.py deleted file mode 100644 index 9dc37ad2..00000000 --- a/endpoint/labels_api/labels_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("labels_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/endpoint/labels_api/labels_api/exceptions.py b/endpoint/labels_api/labels_api/exceptions.py deleted file mode 100644 index 7e75afd3..00000000 --- a/endpoint/labels_api/labels_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/endpoint/labels_api/labels_api/models/__init__.py b/endpoint/labels_api/labels_api/models/__init__.py deleted file mode 100644 index 7487f4c9..00000000 --- a/endpoint/labels_api/labels_api/models/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from labels_api.models.endpoint_labels_list200_response import EndpointLabelsList200Response -from labels_api.models.error import Error -from labels_api.models.expand import Expand -from labels_api.models.filter import Filter -from labels_api.models.filter_type import FilterType -from labels_api.models.label import Label -from labels_api.models.label_filter_mode import LabelFilterMode -from labels_api.models.labels import Labels -from labels_api.models.labels_labels_inner import LabelsLabelsInner -from labels_api.models.link import Link -from labels_api.models.match_type import MatchType -from labels_api.models.pagination_next_link import PaginationNextLink -from labels_api.models.pagination_next_link_links import PaginationNextLinkLinks -from labels_api.models.self_links import SelfLinks -from labels_api.models.self_links_links import SelfLinksLinks -from labels_api.models.unauthorized_error import UnauthorizedError -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response -from labels_api.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest diff --git a/endpoint/labels_api/labels_api/models/endpoint_labels_list200_response.py b/endpoint/labels_api/labels_api/models/endpoint_labels_list200_response.py deleted file mode 100644 index 35177fb5..00000000 --- a/endpoint/labels_api/labels_api/models/endpoint_labels_list200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.labels_labels_inner import LabelsLabelsInner -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointLabelsList200Response(BaseModel): - """ - EndpointLabelsList200Response - """ # noqa: E501 - labels: Optional[List[LabelsLabelsInner]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["labels", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointLabelsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _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: Dict) -> Self: - """Create an instance of EndpointLabelsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labels": [LabelsLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/error.py b/endpoint/labels_api/labels_api/models/error.py deleted file mode 100644 index fc627613..00000000 --- a/endpoint/labels_api/labels_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/labels_api/labels_api/models/expand.py b/endpoint/labels_api/labels_api/models/expand.py deleted file mode 100644 index 235a861f..00000000 --- a/endpoint/labels_api/labels_api/models/expand.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - FILTERS = 'filters' - - @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/endpoint/labels_api/labels_api/models/label.py b/endpoint/labels_api/labels_api/models/label.py deleted file mode 100644 index 77a7636b..00000000 --- a/endpoint/labels_api/labels_api/models/label.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from labels_api.models.filter import Filter -from labels_api.models.match_type import MatchType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Label(BaseModel): - """ - A label definition. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Label identifier.") - name: Optional[StrictStr] = Field(default=None, description="The label name.") - color: Optional[StrictStr] = Field(default=None, description="UI color") - match_type: Optional[MatchType] = Field(default=None, alias="matchType") - filters: Optional[List[Filter]] = Field(default=None, description="The filters combined using the matchType to determine the label's match.") - __properties: ClassVar[List[str]] = ["id", "name", "color", "matchType", "filters"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Label 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in filters (list) - _items = [] - if self.filters: - for _item in self.filters: - if _item: - _items.append(_item.to_dict()) - _dict['filters'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Label 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"), - "name": obj.get("name"), - "color": obj.get("color"), - "matchType": obj.get("matchType"), - "filters": [Filter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/labels.py b/endpoint/labels_api/labels_api/models/labels.py deleted file mode 100644 index 8cb049eb..00000000 --- a/endpoint/labels_api/labels_api/models/labels.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from labels_api.models.labels_labels_inner import LabelsLabelsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Labels(BaseModel): - """ - A list of Labels. - """ # noqa: E501 - labels: Optional[List[LabelsLabelsInner]] = None - __properties: ClassVar[List[str]] = ["labels"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Labels 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Labels from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labels": [LabelsLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/link.py b/endpoint/labels_api/labels_api/models/link.py deleted file mode 100644 index a7b2f0fe..00000000 --- a/endpoint/labels_api/labels_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/labels_api/labels_api/models/pagination_next_link.py b/endpoint/labels_api/labels_api/models/pagination_next_link.py deleted file mode 100644 index 80c8e73a..00000000 --- a/endpoint/labels_api/labels_api/models/pagination_next_link.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationNextLink(BaseModel): - """ - A links object containing a related link for forward pagination. - """ # noqa: E501 - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationNextLink 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of PaginationNextLink from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/pagination_next_link_links.py b/endpoint/labels_api/labels_api/models/pagination_next_link_links.py deleted file mode 100644 index 21387b32..00000000 --- a/endpoint/labels_api/labels_api/models/pagination_next_link_links.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from labels_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationNextLinkLinks(BaseModel): - """ - PaginationNextLinkLinks - """ # noqa: E501 - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationNextLinkLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of next - if self.next: - _dict['next'] = self.next.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationNextLinkLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/self_links.py b/endpoint/labels_api/labels_api/models/self_links.py deleted file mode 100644 index de0d800e..00000000 --- a/endpoint/labels_api/labels_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/self_links_links.py b/endpoint/labels_api/labels_api/models/self_links_links.py deleted file mode 100644 index 7355b1b8..00000000 --- a/endpoint/labels_api/labels_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/endpoint/labels_api/labels_api/models/unauthorized_error.py b/endpoint/labels_api/labels_api/models/unauthorized_error.py deleted file mode 100644 index 0dbf0a9f..00000000 --- a/endpoint/labels_api/labels_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/labels_api/labels_api/rest.py b/endpoint/labels_api/labels_api/rest.py deleted file mode 100644 index f182972f..00000000 --- a/endpoint/labels_api/labels_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from labels_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/endpoint/labels_api/pyproject.toml b/endpoint/labels_api/pyproject.toml deleted file mode 100644 index 021db9bc..00000000 --- a/endpoint/labels_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "labels_api" -version = "1.0.0" -description = "Endpoint Agent Labels API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Agent Labels API"] -include = ["labels_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/endpoint/labels_api/setup.py b/endpoint/labels_api/setup.py deleted file mode 100644 index 05319250..00000000 --- a/endpoint/labels_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "labels-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Endpoint Agent Labels API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Endpoint Agent Labels API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Manage labels applied to endpoint agents using this API. - """, # noqa: E501 - package_data={"labels_api": ["py.typed"]}, -) diff --git a/endpoint/labels_api/test-requirements.txt b/endpoint/labels_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/endpoint/labels_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/endpoint/labels_api/test/test_endpoint_labels_list200_response.py b/endpoint/labels_api/test/test_endpoint_labels_list200_response.py deleted file mode 100644 index 4988d06d..00000000 --- a/endpoint/labels_api/test/test_endpoint_labels_list200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.endpoint_labels_list200_response import EndpointLabelsList200Response - -class TestEndpointLabelsList200Response(unittest.TestCase): - """EndpointLabelsList200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointLabelsList200Response: - """Test EndpointLabelsList200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointLabelsList200Response` - """ - model = EndpointLabelsList200Response() - if include_optional: - return EndpointLabelsList200Response( - labels = [ - null - ], - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return EndpointLabelsList200Response( - ) - """ - - def testEndpointLabelsList200Response(self): - """Test EndpointLabelsList200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_error.py b/endpoint/labels_api/test/test_error.py deleted file mode 100644 index b3955608..00000000 --- a/endpoint/labels_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_expand.py b/endpoint/labels_api/test/test_expand.py deleted file mode 100644 index 9b408e48..00000000 --- a/endpoint/labels_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_label.py b/endpoint/labels_api/test/test_label.py deleted file mode 100644 index 56fd6083..00000000 --- a/endpoint/labels_api/test/test_label.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.label import Label - -class TestLabel(unittest.TestCase): - """Label unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Label: - """Test Label - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Label` - """ - model = Label() - if include_optional: - return Label( - id = 'abc-123-def', - name = 'Head office meeting rooms', - color = '#ff3333', - match_type = 'and', - filters = [ - labels_api.models.filter.Filter( - key = 'vpn-client-network', - values = ["10.1.1.0/24","192.168.1.0/24"], - mode = 'in', ) - ] - ) - else: - return Label( - ) - """ - - def testLabel(self): - """Test Label""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_labels.py b/endpoint/labels_api/test/test_labels.py deleted file mode 100644 index 468ce40d..00000000 --- a/endpoint/labels_api/test/test_labels.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.labels import Labels - -class TestLabels(unittest.TestCase): - """Labels unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Labels: - """Test Labels - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Labels` - """ - model = Labels() - if include_optional: - return Labels( - labels = [ - null - ] - ) - else: - return Labels( - ) - """ - - def testLabels(self): - """Test Labels""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_link.py b/endpoint/labels_api/test/test_link.py deleted file mode 100644 index 6cffe664..00000000 --- a/endpoint/labels_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_manage_labels_api.py b/endpoint/labels_api/test/test_manage_labels_api.py deleted file mode 100644 index c92d13bf..00000000 --- a/endpoint/labels_api/test/test_manage_labels_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from labels_api.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_endpoint_label_delete(self) -> None: - """Test case for endpoint_label_delete - - Deletes label - """ - pass - - def test_endpoint_label_get(self) -> None: - """Test case for endpoint_label_get - - Retrieve label - """ - pass - - def test_endpoint_label_update(self) -> None: - """Test case for endpoint_label_update - - Update label - """ - pass - - def test_endpoint_labels_list(self) -> None: - """Test case for endpoint_labels_list - - List labels - """ - pass - - def test_v7_endpoint_labels_post(self) -> None: - """Test case for v7_endpoint_labels_post - - Create label - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_pagination_next_link.py b/endpoint/labels_api/test/test_pagination_next_link.py deleted file mode 100644 index 78fcb90d..00000000 --- a/endpoint/labels_api/test/test_pagination_next_link.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.pagination_next_link import PaginationNextLink - -class TestPaginationNextLink(unittest.TestCase): - """PaginationNextLink unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationNextLink: - """Test PaginationNextLink - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationNextLink` - """ - model = PaginationNextLink() - if include_optional: - return PaginationNextLink( - links = labels_api.models.pagination_next_link__links.PaginationNextLink__links( - next = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationNextLink( - ) - """ - - def testPaginationNextLink(self): - """Test PaginationNextLink""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_pagination_next_link_links.py b/endpoint/labels_api/test/test_pagination_next_link_links.py deleted file mode 100644 index abb6ee9c..00000000 --- a/endpoint/labels_api/test/test_pagination_next_link_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.pagination_next_link_links import PaginationNextLinkLinks - -class TestPaginationNextLinkLinks(unittest.TestCase): - """PaginationNextLinkLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationNextLinkLinks: - """Test PaginationNextLinkLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationNextLinkLinks` - """ - model = PaginationNextLinkLinks() - if include_optional: - return PaginationNextLinkLinks( - next = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationNextLinkLinks( - ) - """ - - def testPaginationNextLinkLinks(self): - """Test PaginationNextLinkLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_self_links.py b/endpoint/labels_api/test/test_self_links.py deleted file mode 100644 index 314419c2..00000000 --- a/endpoint/labels_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_self_links_links.py b/endpoint/labels_api/test/test_self_links_links.py deleted file mode 100644 index e921396d..00000000 --- a/endpoint/labels_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/test/test_unauthorized_error.py b/endpoint/labels_api/test/test_unauthorized_error.py deleted file mode 100644 index c3eec945..00000000 --- a/endpoint/labels_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Agent Labels API - - Manage labels applied to endpoint agents using this API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/labels_api/tox.ini b/endpoint/labels_api/tox.ini deleted file mode 100644 index 61ac7d6b..00000000 --- a/endpoint/labels_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=labels_api diff --git a/endpoint/test_results_api/.github/workflows/python.yml b/endpoint/test_results_api/.github/workflows/python.yml deleted file mode 100644 index f2ad1718..00000000 --- a/endpoint/test_results_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: test_results_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/endpoint/test_results_api/.gitlab-ci.yml b/endpoint/test_results_api/.gitlab-ci.yml deleted file mode 100644 index 90ae7365..00000000 --- a/endpoint/test_results_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=test_results_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/endpoint/test_results_api/.openapi-generator/FILES b/endpoint/test_results_api/.openapi-generator/FILES deleted file mode 100644 index ff5600a4..00000000 --- a/endpoint/test_results_api/.openapi-generator/FILES +++ /dev/null @@ -1,482 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AccountGroupId.md -docs/AgentLabelsSelectorType.md -docs/AllAgentsSelectorType.md -docs/ApplicationScoreQuality.md -docs/AsnDetails.md -docs/ConditionalOperator.md -docs/CpuUtilization.md -docs/DynamicBaseTestResult.md -docs/DynamicBaseTestResultWebex.md -docs/DynamicTest.md -docs/DynamicTestApplication.md -docs/DynamicTestLinks.md -docs/DynamicTestLinksSelf.md -docs/DynamicTestLinksTestResults.md -docs/DynamicTestsDataRoundSearch.md -docs/DynamicTestsDataSearchFilter.md -docs/EndpointAgentLabelsSelectorConfig.md -docs/EndpointAgentSelectorConfig.md -docs/EndpointAgentToServerTest.md -docs/EndpointAgentToServerType.md -docs/EndpointAllAgentsSelectorConfig.md -docs/EndpointBrowser.md -docs/EndpointHttpDataPointScore.md -docs/EndpointHttpServerBaseTest.md -docs/EndpointHttpServerTest.md -docs/EndpointHttpServerType.md -docs/EndpointNetworkTopologyResultRequestFilter.md -docs/EndpointPingDataPointScore.md -docs/EndpointRealUserTest.md -docs/EndpointRealUserTestBase.md -docs/EndpointRealUserTestDetail.md -docs/EndpointRealUserTestDetailResults.md -docs/EndpointRealUserTestResultRequestFilter.md -docs/EndpointRealUserTestResults.md -docs/EndpointResultRequestFilter.md -docs/EndpointScheduledTest.md -docs/EndpointScheduledTestType.md -docs/EndpointSpecificAgentsSelectorConfig.md -docs/EndpointTest.md -docs/EndpointTestAid.md -docs/EndpointTestAuthType.md -docs/EndpointTestLinks.md -docs/EndpointTestLinksSelf.md -docs/EndpointTestLinksTestResults.md -docs/EndpointTestProtocol.md -docs/Error.md -docs/EthernetProfile.md -docs/Expand.md -docs/GetDynamicTestResultNetworkPathvis200Response.md -docs/GetDynamicTestResultPathvisAgentRound200Response.md -docs/GetEndpointLocalNetworkTopologyDetails200Response.md -docs/GetEndpointLocalNetworks200Response.md -docs/GetEndpointLocalNetworksTopologies200Response.md -docs/GetEndpointLocalNetworksTopologiesRequest.md -docs/GetEndpointRealUserTestDetails200Response.md -docs/GetEndpointRealUserTestPagesDetails200Response.md -docs/GetEndpointRealUserTests200Response.md -docs/GetEndpointRealUserTestsNetwork200Response.md -docs/GetEndpointRealUserTestsPages200Response.md -docs/GetEndpointRealUserTestsRequest.md -docs/GetTestResultHttpServer200Response.md -docs/GetTestResultNetworkPathvis200Response.md -docs/GetTestResultPathvisAgentRound200Response.md -docs/Hop.md -docs/HttpErrorType.md -docs/HttpTestResult.md -docs/HttpTestResultHeaders.md -docs/HttpTestResults.md -docs/InterfaceHardwareType.md -docs/Link.md -docs/LocalNetworkResult.md -docs/LocalNetworkResults.md -docs/LocalNetworkTestsResultsApi.md -docs/LocalNetworkTopologyDetailResults.md -docs/LocalNetworkTopologyResult.md -docs/LocalNetworkTopologyResultBase.md -docs/LocalNetworkTopologyResults.md -docs/MultiTestIdNetworkTestResults.md -docs/MultiTestIdTestsDataRoundsSearch.md -docs/MultiTestIdTestsDataSearchFilter.md -docs/NetworkDynamicTestResult.md -docs/NetworkDynamicTestResults.md -docs/NetworkDynamicTestsResultsApi.md -docs/NetworkInterface.md -docs/NetworkMetrics.md -docs/NetworkPing.md -docs/NetworkProfile.md -docs/NetworkProxyProfile.md -docs/NetworkProxyProfileProxiesInner.md -docs/NetworkScheduledTestsResultsApi.md -docs/NetworkTestResult.md -docs/NetworkTestResults.md -docs/NetworkTopologyType.md -docs/NetworkWirelessProfile.md -docs/PaginationNextLink.md -docs/PaginationNextLinkLinks.md -docs/PathVisBaseTestResult.md -docs/PathVisDetailDynamicTestResult.md -docs/PathVisDetailDynamicTestResults.md -docs/PathVisDetailTestResult.md -docs/PathVisDetailTestResults.md -docs/PathVisDynamicTestResult.md -docs/PathVisDynamicTestResults.md -docs/PathVisEndpoint.md -docs/PathVisHop.md -docs/PathVisRoute.md -docs/PathVisTestResult.md -docs/PathVisTestResults.md -docs/PhysicalMemoryUsedBytes.md -docs/Platform.md -docs/PostFetchDynamicTestResultMetrics200Response.md -docs/PostFetchTestResultMetrics200Response.md -docs/PostFetchTestResultMetricsMultiTest200Response.md -docs/QueryWindow.md -docs/RealUserTestCoordinates.md -docs/RealUserTestNetwork.md -docs/RealUserTestNetworkGatewayPing.md -docs/RealUserTestNetworkPing.md -docs/RealUserTestNetworkResult.md -docs/RealUserTestNetworkResults.md -docs/RealUserTestNetworkTraceroute.md -docs/RealUserTestNetworkVpnPing.md -docs/RealUserTestNetworkVpnTraceroute.md -docs/RealUserTestPage.md -docs/RealUserTestPagePageTimings.md -docs/RealUserTestPageResult.md -docs/RealUserTestPageResults.md -docs/RealUserTestsResultsApi.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SortOrder.md -docs/SpecificAgentsSelectorType.md -docs/SystemMetrics.md -docs/TcpConnect.md -docs/TestInterval.md -docs/TestProbeMode.md -docs/TestResult.md -docs/TestSslVersionId.md -docs/TestsDataRoundsSearch.md -docs/TestsDataSearchFilter.md -docs/TestsDataSearchSort.md -docs/TestsDataSearchSortKey.md -docs/TestsDataThresholdFilter.md -docs/TestsDataThresholdFilters.md -docs/ThresholdFilterName.md -docs/ThresholdFilterOperator.md -docs/Traceroute.md -docs/TracerouteHop.md -docs/Trigger.md -docs/UnauthorizedError.md -docs/VpnProfile.md -docs/VpnType.md -docs/WebHTTPServerScheduledTestResultsApi.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group_id.py -test/test_agent_labels_selector_type.py -test/test_all_agents_selector_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_base_test_result_webex.py -test/test_dynamic_test.py -test/test_dynamic_test_application.py -test/test_dynamic_test_links.py -test/test_dynamic_test_links_self.py -test/test_dynamic_test_links_test_results.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_agent_to_server_type.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_http_server_type.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_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_aid.py -test/test_endpoint_test_auth_type.py -test/test_endpoint_test_links.py -test/test_endpoint_test_links_self.py -test/test_endpoint_test_links_test_results.py -test/test_endpoint_test_protocol.py -test/test_error.py -test/test_ethernet_profile.py -test/test_expand.py -test/test_get_dynamic_test_result_network_pathvis200_response.py -test/test_get_dynamic_test_result_pathvis_agent_round200_response.py -test/test_get_endpoint_local_network_topology_details200_response.py -test/test_get_endpoint_local_networks200_response.py -test/test_get_endpoint_local_networks_topologies200_response.py -test/test_get_endpoint_local_networks_topologies_request.py -test/test_get_endpoint_real_user_test_details200_response.py -test/test_get_endpoint_real_user_test_pages_details200_response.py -test/test_get_endpoint_real_user_tests200_response.py -test/test_get_endpoint_real_user_tests_network200_response.py -test/test_get_endpoint_real_user_tests_pages200_response.py -test/test_get_endpoint_real_user_tests_request.py -test/test_get_test_result_http_server200_response.py -test/test_get_test_result_network_pathvis200_response.py -test/test_get_test_result_pathvis_agent_round200_response.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_tests_results_api.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_dynamic_tests_results_api.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_profile.py -test/test_network_proxy_profile_proxies_inner.py -test/test_network_scheduled_tests_results_api.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_link.py -test/test_pagination_next_link_links.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_post_fetch_dynamic_test_result_metrics200_response.py -test/test_post_fetch_test_result_metrics200_response.py -test/test_post_fetch_test_result_metrics_multi_test200_response.py -test/test_query_window.py -test/test_real_user_test_coordinates.py -test/test_real_user_test_network.py -test/test_real_user_test_network_gateway_ping.py -test/test_real_user_test_network_ping.py -test/test_real_user_test_network_result.py -test/test_real_user_test_network_results.py -test/test_real_user_test_network_traceroute.py -test/test_real_user_test_network_vpn_ping.py -test/test_real_user_test_network_vpn_traceroute.py -test/test_real_user_test_page.py -test/test_real_user_test_page_page_timings.py -test/test_real_user_test_page_result.py -test/test_real_user_test_page_results.py -test/test_real_user_tests_results_api.py -test/test_self_links.py -test/test_self_links_links.py -test/test_sort_order.py -test/test_specific_agents_selector_type.py -test/test_system_metrics.py -test/test_tcp_connect.py -test/test_test_interval.py -test/test_test_probe_mode.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_vpn_profile.py -test/test_vpn_type.py -test/test_web_http_server_scheduled_test_results_api.py -test_results_api/__init__.py -test_results_api/api/__init__.py -test_results_api/api/local_network_tests_results_api.py -test_results_api/api/network_dynamic_tests_results_api.py -test_results_api/api/network_scheduled_tests_results_api.py -test_results_api/api/real_user_tests_results_api.py -test_results_api/api/web_http_server_scheduled_test_results_api.py -test_results_api/api_client.py -test_results_api/api_response.py -test_results_api/configuration.py -test_results_api/exceptions.py -test_results_api/models/__init__.py -test_results_api/models/account_group_id.py -test_results_api/models/agent_labels_selector_type.py -test_results_api/models/all_agents_selector_type.py -test_results_api/models/application_score_quality.py -test_results_api/models/asn_details.py -test_results_api/models/conditional_operator.py -test_results_api/models/cpu_utilization.py -test_results_api/models/dynamic_base_test_result.py -test_results_api/models/dynamic_base_test_result_webex.py -test_results_api/models/dynamic_test.py -test_results_api/models/dynamic_test_application.py -test_results_api/models/dynamic_test_links.py -test_results_api/models/dynamic_test_links_self.py -test_results_api/models/dynamic_test_links_test_results.py -test_results_api/models/dynamic_tests_data_round_search.py -test_results_api/models/dynamic_tests_data_search_filter.py -test_results_api/models/endpoint_agent_labels_selector_config.py -test_results_api/models/endpoint_agent_selector_config.py -test_results_api/models/endpoint_agent_to_server_test.py -test_results_api/models/endpoint_agent_to_server_type.py -test_results_api/models/endpoint_all_agents_selector_config.py -test_results_api/models/endpoint_browser.py -test_results_api/models/endpoint_http_data_point_score.py -test_results_api/models/endpoint_http_server_base_test.py -test_results_api/models/endpoint_http_server_test.py -test_results_api/models/endpoint_http_server_type.py -test_results_api/models/endpoint_network_topology_result_request_filter.py -test_results_api/models/endpoint_ping_data_point_score.py -test_results_api/models/endpoint_real_user_test.py -test_results_api/models/endpoint_real_user_test_base.py -test_results_api/models/endpoint_real_user_test_detail.py -test_results_api/models/endpoint_real_user_test_detail_results.py -test_results_api/models/endpoint_real_user_test_result_request_filter.py -test_results_api/models/endpoint_real_user_test_results.py -test_results_api/models/endpoint_result_request_filter.py -test_results_api/models/endpoint_scheduled_test.py -test_results_api/models/endpoint_scheduled_test_type.py -test_results_api/models/endpoint_specific_agents_selector_config.py -test_results_api/models/endpoint_test.py -test_results_api/models/endpoint_test_aid.py -test_results_api/models/endpoint_test_auth_type.py -test_results_api/models/endpoint_test_links.py -test_results_api/models/endpoint_test_links_self.py -test_results_api/models/endpoint_test_links_test_results.py -test_results_api/models/endpoint_test_protocol.py -test_results_api/models/error.py -test_results_api/models/ethernet_profile.py -test_results_api/models/expand.py -test_results_api/models/get_dynamic_test_result_network_pathvis200_response.py -test_results_api/models/get_dynamic_test_result_pathvis_agent_round200_response.py -test_results_api/models/get_endpoint_local_network_topology_details200_response.py -test_results_api/models/get_endpoint_local_networks200_response.py -test_results_api/models/get_endpoint_local_networks_topologies200_response.py -test_results_api/models/get_endpoint_local_networks_topologies_request.py -test_results_api/models/get_endpoint_real_user_test_details200_response.py -test_results_api/models/get_endpoint_real_user_test_pages_details200_response.py -test_results_api/models/get_endpoint_real_user_tests200_response.py -test_results_api/models/get_endpoint_real_user_tests_network200_response.py -test_results_api/models/get_endpoint_real_user_tests_pages200_response.py -test_results_api/models/get_endpoint_real_user_tests_request.py -test_results_api/models/get_test_result_http_server200_response.py -test_results_api/models/get_test_result_network_pathvis200_response.py -test_results_api/models/get_test_result_pathvis_agent_round200_response.py -test_results_api/models/hop.py -test_results_api/models/http_error_type.py -test_results_api/models/http_test_result.py -test_results_api/models/http_test_result_headers.py -test_results_api/models/http_test_results.py -test_results_api/models/interface_hardware_type.py -test_results_api/models/link.py -test_results_api/models/local_network_result.py -test_results_api/models/local_network_results.py -test_results_api/models/local_network_topology_detail_results.py -test_results_api/models/local_network_topology_result.py -test_results_api/models/local_network_topology_result_base.py -test_results_api/models/local_network_topology_results.py -test_results_api/models/multi_test_id_network_test_results.py -test_results_api/models/multi_test_id_tests_data_rounds_search.py -test_results_api/models/multi_test_id_tests_data_search_filter.py -test_results_api/models/network_dynamic_test_result.py -test_results_api/models/network_dynamic_test_results.py -test_results_api/models/network_interface.py -test_results_api/models/network_metrics.py -test_results_api/models/network_ping.py -test_results_api/models/network_profile.py -test_results_api/models/network_proxy_profile.py -test_results_api/models/network_proxy_profile_proxies_inner.py -test_results_api/models/network_test_result.py -test_results_api/models/network_test_results.py -test_results_api/models/network_topology_type.py -test_results_api/models/network_wireless_profile.py -test_results_api/models/pagination_next_link.py -test_results_api/models/pagination_next_link_links.py -test_results_api/models/path_vis_base_test_result.py -test_results_api/models/path_vis_detail_dynamic_test_result.py -test_results_api/models/path_vis_detail_dynamic_test_results.py -test_results_api/models/path_vis_detail_test_result.py -test_results_api/models/path_vis_detail_test_results.py -test_results_api/models/path_vis_dynamic_test_result.py -test_results_api/models/path_vis_dynamic_test_results.py -test_results_api/models/path_vis_endpoint.py -test_results_api/models/path_vis_hop.py -test_results_api/models/path_vis_route.py -test_results_api/models/path_vis_test_result.py -test_results_api/models/path_vis_test_results.py -test_results_api/models/physical_memory_used_bytes.py -test_results_api/models/platform.py -test_results_api/models/post_fetch_dynamic_test_result_metrics200_response.py -test_results_api/models/post_fetch_test_result_metrics200_response.py -test_results_api/models/post_fetch_test_result_metrics_multi_test200_response.py -test_results_api/models/query_window.py -test_results_api/models/real_user_test_coordinates.py -test_results_api/models/real_user_test_network.py -test_results_api/models/real_user_test_network_gateway_ping.py -test_results_api/models/real_user_test_network_ping.py -test_results_api/models/real_user_test_network_result.py -test_results_api/models/real_user_test_network_results.py -test_results_api/models/real_user_test_network_traceroute.py -test_results_api/models/real_user_test_network_vpn_ping.py -test_results_api/models/real_user_test_network_vpn_traceroute.py -test_results_api/models/real_user_test_page.py -test_results_api/models/real_user_test_page_page_timings.py -test_results_api/models/real_user_test_page_result.py -test_results_api/models/real_user_test_page_results.py -test_results_api/models/self_links.py -test_results_api/models/self_links_links.py -test_results_api/models/sort_order.py -test_results_api/models/specific_agents_selector_type.py -test_results_api/models/system_metrics.py -test_results_api/models/tcp_connect.py -test_results_api/models/test_interval.py -test_results_api/models/test_probe_mode.py -test_results_api/models/test_result.py -test_results_api/models/test_ssl_version_id.py -test_results_api/models/tests_data_rounds_search.py -test_results_api/models/tests_data_search_filter.py -test_results_api/models/tests_data_search_sort.py -test_results_api/models/tests_data_search_sort_key.py -test_results_api/models/tests_data_threshold_filter.py -test_results_api/models/tests_data_threshold_filters.py -test_results_api/models/threshold_filter_name.py -test_results_api/models/threshold_filter_operator.py -test_results_api/models/traceroute.py -test_results_api/models/traceroute_hop.py -test_results_api/models/trigger.py -test_results_api/models/unauthorized_error.py -test_results_api/models/vpn_profile.py -test_results_api/models/vpn_type.py -test_results_api/py.typed -test_results_api/rest.py -tox.ini diff --git a/endpoint/test_results_api/.openapi-generator/VERSION b/endpoint/test_results_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/endpoint/test_results_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/endpoint/test_results_api/.travis.yml b/endpoint/test_results_api/.travis.yml deleted file mode 100644 index bebf5aee..00000000 --- a/endpoint/test_results_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=test_results_api diff --git a/endpoint/test_results_api/README.md b/endpoint/test_results_api/README.md deleted file mode 100644 index 35744707..00000000 --- a/endpoint/test_results_api/README.md +++ /dev/null @@ -1,283 +0,0 @@ -# test-results-api -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.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import test_results_api -``` - -### 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 test_results_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import test_results_api -from test_results_api.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 = test_results_api.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 = test_results_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_results_api.LocalNetworkTestsResultsApi(api_client) - network_topology_id = '00160:39c518560de9:1491651900:236e6f18' # str | The network topology ID. - aid = '2067' # 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 ApiException as e: - print("Exception when calling LocalNetworkTestsResultsApi->get_endpoint_local_network_topology_details: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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}/pathvis | Retrieve pathvis 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}/pathvis/agent/{agentId}/round/{roundId} | Retrieve pathvis 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}/pathvis | Retrieve pathvis 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}/pathvis/agent/{agentId}/round/{roundId} | Retrieve pathvis 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 - - -## Documentation For Models - - - [AccountGroupId](docs/AccountGroupId.md) - - [AgentLabelsSelectorType](docs/AgentLabelsSelectorType.md) - - [AllAgentsSelectorType](docs/AllAgentsSelectorType.md) - - [ApplicationScoreQuality](docs/ApplicationScoreQuality.md) - - [AsnDetails](docs/AsnDetails.md) - - [ConditionalOperator](docs/ConditionalOperator.md) - - [CpuUtilization](docs/CpuUtilization.md) - - [DynamicBaseTestResult](docs/DynamicBaseTestResult.md) - - [DynamicBaseTestResultWebex](docs/DynamicBaseTestResultWebex.md) - - [DynamicTest](docs/DynamicTest.md) - - [DynamicTestApplication](docs/DynamicTestApplication.md) - - [DynamicTestLinks](docs/DynamicTestLinks.md) - - [DynamicTestLinksSelf](docs/DynamicTestLinksSelf.md) - - [DynamicTestLinksTestResults](docs/DynamicTestLinksTestResults.md) - - [DynamicTestsDataRoundSearch](docs/DynamicTestsDataRoundSearch.md) - - [DynamicTestsDataSearchFilter](docs/DynamicTestsDataSearchFilter.md) - - [EndpointAgentLabelsSelectorConfig](docs/EndpointAgentLabelsSelectorConfig.md) - - [EndpointAgentSelectorConfig](docs/EndpointAgentSelectorConfig.md) - - [EndpointAgentToServerTest](docs/EndpointAgentToServerTest.md) - - [EndpointAgentToServerType](docs/EndpointAgentToServerType.md) - - [EndpointAllAgentsSelectorConfig](docs/EndpointAllAgentsSelectorConfig.md) - - [EndpointBrowser](docs/EndpointBrowser.md) - - [EndpointHttpDataPointScore](docs/EndpointHttpDataPointScore.md) - - [EndpointHttpServerBaseTest](docs/EndpointHttpServerBaseTest.md) - - [EndpointHttpServerTest](docs/EndpointHttpServerTest.md) - - [EndpointHttpServerType](docs/EndpointHttpServerType.md) - - [EndpointNetworkTopologyResultRequestFilter](docs/EndpointNetworkTopologyResultRequestFilter.md) - - [EndpointPingDataPointScore](docs/EndpointPingDataPointScore.md) - - [EndpointRealUserTest](docs/EndpointRealUserTest.md) - - [EndpointRealUserTestBase](docs/EndpointRealUserTestBase.md) - - [EndpointRealUserTestDetail](docs/EndpointRealUserTestDetail.md) - - [EndpointRealUserTestDetailResults](docs/EndpointRealUserTestDetailResults.md) - - [EndpointRealUserTestResultRequestFilter](docs/EndpointRealUserTestResultRequestFilter.md) - - [EndpointRealUserTestResults](docs/EndpointRealUserTestResults.md) - - [EndpointResultRequestFilter](docs/EndpointResultRequestFilter.md) - - [EndpointScheduledTest](docs/EndpointScheduledTest.md) - - [EndpointScheduledTestType](docs/EndpointScheduledTestType.md) - - [EndpointSpecificAgentsSelectorConfig](docs/EndpointSpecificAgentsSelectorConfig.md) - - [EndpointTest](docs/EndpointTest.md) - - [EndpointTestAid](docs/EndpointTestAid.md) - - [EndpointTestAuthType](docs/EndpointTestAuthType.md) - - [EndpointTestLinks](docs/EndpointTestLinks.md) - - [EndpointTestLinksSelf](docs/EndpointTestLinksSelf.md) - - [EndpointTestLinksTestResults](docs/EndpointTestLinksTestResults.md) - - [EndpointTestProtocol](docs/EndpointTestProtocol.md) - - [Error](docs/Error.md) - - [EthernetProfile](docs/EthernetProfile.md) - - [Expand](docs/Expand.md) - - [GetDynamicTestResultNetworkPathvis200Response](docs/GetDynamicTestResultNetworkPathvis200Response.md) - - [GetDynamicTestResultPathvisAgentRound200Response](docs/GetDynamicTestResultPathvisAgentRound200Response.md) - - [GetEndpointLocalNetworkTopologyDetails200Response](docs/GetEndpointLocalNetworkTopologyDetails200Response.md) - - [GetEndpointLocalNetworks200Response](docs/GetEndpointLocalNetworks200Response.md) - - [GetEndpointLocalNetworksTopologies200Response](docs/GetEndpointLocalNetworksTopologies200Response.md) - - [GetEndpointLocalNetworksTopologiesRequest](docs/GetEndpointLocalNetworksTopologiesRequest.md) - - [GetEndpointRealUserTestDetails200Response](docs/GetEndpointRealUserTestDetails200Response.md) - - [GetEndpointRealUserTestPagesDetails200Response](docs/GetEndpointRealUserTestPagesDetails200Response.md) - - [GetEndpointRealUserTests200Response](docs/GetEndpointRealUserTests200Response.md) - - [GetEndpointRealUserTestsNetwork200Response](docs/GetEndpointRealUserTestsNetwork200Response.md) - - [GetEndpointRealUserTestsPages200Response](docs/GetEndpointRealUserTestsPages200Response.md) - - [GetEndpointRealUserTestsRequest](docs/GetEndpointRealUserTestsRequest.md) - - [GetTestResultHttpServer200Response](docs/GetTestResultHttpServer200Response.md) - - [GetTestResultNetworkPathvis200Response](docs/GetTestResultNetworkPathvis200Response.md) - - [GetTestResultPathvisAgentRound200Response](docs/GetTestResultPathvisAgentRound200Response.md) - - [Hop](docs/Hop.md) - - [HttpErrorType](docs/HttpErrorType.md) - - [HttpTestResult](docs/HttpTestResult.md) - - [HttpTestResultHeaders](docs/HttpTestResultHeaders.md) - - [HttpTestResults](docs/HttpTestResults.md) - - [InterfaceHardwareType](docs/InterfaceHardwareType.md) - - [Link](docs/Link.md) - - [LocalNetworkResult](docs/LocalNetworkResult.md) - - [LocalNetworkResults](docs/LocalNetworkResults.md) - - [LocalNetworkTopologyDetailResults](docs/LocalNetworkTopologyDetailResults.md) - - [LocalNetworkTopologyResult](docs/LocalNetworkTopologyResult.md) - - [LocalNetworkTopologyResultBase](docs/LocalNetworkTopologyResultBase.md) - - [LocalNetworkTopologyResults](docs/LocalNetworkTopologyResults.md) - - [MultiTestIdNetworkTestResults](docs/MultiTestIdNetworkTestResults.md) - - [MultiTestIdTestsDataRoundsSearch](docs/MultiTestIdTestsDataRoundsSearch.md) - - [MultiTestIdTestsDataSearchFilter](docs/MultiTestIdTestsDataSearchFilter.md) - - [NetworkDynamicTestResult](docs/NetworkDynamicTestResult.md) - - [NetworkDynamicTestResults](docs/NetworkDynamicTestResults.md) - - [NetworkInterface](docs/NetworkInterface.md) - - [NetworkMetrics](docs/NetworkMetrics.md) - - [NetworkPing](docs/NetworkPing.md) - - [NetworkProfile](docs/NetworkProfile.md) - - [NetworkProxyProfile](docs/NetworkProxyProfile.md) - - [NetworkProxyProfileProxiesInner](docs/NetworkProxyProfileProxiesInner.md) - - [NetworkTestResult](docs/NetworkTestResult.md) - - [NetworkTestResults](docs/NetworkTestResults.md) - - [NetworkTopologyType](docs/NetworkTopologyType.md) - - [NetworkWirelessProfile](docs/NetworkWirelessProfile.md) - - [PaginationNextLink](docs/PaginationNextLink.md) - - [PaginationNextLinkLinks](docs/PaginationNextLinkLinks.md) - - [PathVisBaseTestResult](docs/PathVisBaseTestResult.md) - - [PathVisDetailDynamicTestResult](docs/PathVisDetailDynamicTestResult.md) - - [PathVisDetailDynamicTestResults](docs/PathVisDetailDynamicTestResults.md) - - [PathVisDetailTestResult](docs/PathVisDetailTestResult.md) - - [PathVisDetailTestResults](docs/PathVisDetailTestResults.md) - - [PathVisDynamicTestResult](docs/PathVisDynamicTestResult.md) - - [PathVisDynamicTestResults](docs/PathVisDynamicTestResults.md) - - [PathVisEndpoint](docs/PathVisEndpoint.md) - - [PathVisHop](docs/PathVisHop.md) - - [PathVisRoute](docs/PathVisRoute.md) - - [PathVisTestResult](docs/PathVisTestResult.md) - - [PathVisTestResults](docs/PathVisTestResults.md) - - [PhysicalMemoryUsedBytes](docs/PhysicalMemoryUsedBytes.md) - - [Platform](docs/Platform.md) - - [PostFetchDynamicTestResultMetrics200Response](docs/PostFetchDynamicTestResultMetrics200Response.md) - - [PostFetchTestResultMetrics200Response](docs/PostFetchTestResultMetrics200Response.md) - - [PostFetchTestResultMetricsMultiTest200Response](docs/PostFetchTestResultMetricsMultiTest200Response.md) - - [QueryWindow](docs/QueryWindow.md) - - [RealUserTestCoordinates](docs/RealUserTestCoordinates.md) - - [RealUserTestNetwork](docs/RealUserTestNetwork.md) - - [RealUserTestNetworkGatewayPing](docs/RealUserTestNetworkGatewayPing.md) - - [RealUserTestNetworkPing](docs/RealUserTestNetworkPing.md) - - [RealUserTestNetworkResult](docs/RealUserTestNetworkResult.md) - - [RealUserTestNetworkResults](docs/RealUserTestNetworkResults.md) - - [RealUserTestNetworkTraceroute](docs/RealUserTestNetworkTraceroute.md) - - [RealUserTestNetworkVpnPing](docs/RealUserTestNetworkVpnPing.md) - - [RealUserTestNetworkVpnTraceroute](docs/RealUserTestNetworkVpnTraceroute.md) - - [RealUserTestPage](docs/RealUserTestPage.md) - - [RealUserTestPagePageTimings](docs/RealUserTestPagePageTimings.md) - - [RealUserTestPageResult](docs/RealUserTestPageResult.md) - - [RealUserTestPageResults](docs/RealUserTestPageResults.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SortOrder](docs/SortOrder.md) - - [SpecificAgentsSelectorType](docs/SpecificAgentsSelectorType.md) - - [SystemMetrics](docs/SystemMetrics.md) - - [TcpConnect](docs/TcpConnect.md) - - [TestInterval](docs/TestInterval.md) - - [TestProbeMode](docs/TestProbeMode.md) - - [TestResult](docs/TestResult.md) - - [TestSslVersionId](docs/TestSslVersionId.md) - - [TestsDataRoundsSearch](docs/TestsDataRoundsSearch.md) - - [TestsDataSearchFilter](docs/TestsDataSearchFilter.md) - - [TestsDataSearchSort](docs/TestsDataSearchSort.md) - - [TestsDataSearchSortKey](docs/TestsDataSearchSortKey.md) - - [TestsDataThresholdFilter](docs/TestsDataThresholdFilter.md) - - [TestsDataThresholdFilters](docs/TestsDataThresholdFilters.md) - - [ThresholdFilterName](docs/ThresholdFilterName.md) - - [ThresholdFilterOperator](docs/ThresholdFilterOperator.md) - - [Traceroute](docs/Traceroute.md) - - [TracerouteHop](docs/TracerouteHop.md) - - [Trigger](docs/Trigger.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [VpnProfile](docs/VpnProfile.md) - - [VpnType](docs/VpnType.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/endpoint/test_results_api/docs/AccountGroupId.md b/endpoint/test_results_api/docs/AccountGroupId.md deleted file mode 100644 index b54d72c9..00000000 --- a/endpoint/test_results_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from test_results_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/endpoint/test_results_api/docs/AgentLabelsSelectorType.md b/endpoint/test_results_api/docs/AgentLabelsSelectorType.md deleted file mode 100644 index aa3d0399..00000000 --- a/endpoint/test_results_api/docs/AgentLabelsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AgentLabelsSelectorType - - -## 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/endpoint/test_results_api/docs/AllAgentsSelectorType.md b/endpoint/test_results_api/docs/AllAgentsSelectorType.md deleted file mode 100644 index 049c7eec..00000000 --- a/endpoint/test_results_api/docs/AllAgentsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AllAgentsSelectorType - - -## 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/endpoint/test_results_api/docs/ConditionalOperator.md b/endpoint/test_results_api/docs/ConditionalOperator.md deleted file mode 100644 index e2fb7fe6..00000000 --- a/endpoint/test_results_api/docs/ConditionalOperator.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConditionalOperator - - -## 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/endpoint/test_results_api/docs/DynamicBaseTestResult.md b/endpoint/test_results_api/docs/DynamicBaseTestResult.md deleted file mode 100644 index 1f96d4c1..00000000 --- a/endpoint/test_results_api/docs/DynamicBaseTestResult.md +++ /dev/null @@ -1,29 +0,0 @@ -# DynamicBaseTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] -**webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.md) | | [optional] - -## Example - -```python -from test_results_api.models.dynamic_base_test_result import DynamicBaseTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicBaseTestResult from a JSON string -dynamic_base_test_result_instance = DynamicBaseTestResult.from_json(json) -# print the JSON string representation of the object -print DynamicBaseTestResult.to_json() - -# convert the object into a dict -dynamic_base_test_result_dict = dynamic_base_test_result_instance.to_dict() -# create an instance of DynamicBaseTestResult from a dict -dynamic_base_test_result_form_dict = dynamic_base_test_result.from_dict(dynamic_base_test_result_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/endpoint/test_results_api/docs/DynamicBaseTestResultWebex.md b/endpoint/test_results_api/docs/DynamicBaseTestResultWebex.md deleted file mode 100644 index f52465ed..00000000 --- a/endpoint/test_results_api/docs/DynamicBaseTestResultWebex.md +++ /dev/null @@ -1,30 +0,0 @@ -# DynamicBaseTestResultWebex - -Contains object with webex conference information. Only returned when `application` == `webex`. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**conference_id** | **str** | Webex conference ID. | [optional] [readonly] -**correlation_id** | **str** | Webex conference correlation ID. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicBaseTestResultWebex from a JSON string -dynamic_base_test_result_webex_instance = DynamicBaseTestResultWebex.from_json(json) -# print the JSON string representation of the object -print DynamicBaseTestResultWebex.to_json() - -# convert the object into a dict -dynamic_base_test_result_webex_dict = dynamic_base_test_result_webex_instance.to_dict() -# create an instance of DynamicBaseTestResultWebex from a dict -dynamic_base_test_result_webex_form_dict = dynamic_base_test_result_webex.from_dict(dynamic_base_test_result_webex_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/endpoint/test_results_api/docs/DynamicTest.md b/endpoint/test_results_api/docs/DynamicTest.md deleted file mode 100644 index 36ef96cc..00000000 --- a/endpoint/test_results_api/docs/DynamicTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# DynamicTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**DynamicTestLinks**](DynamicTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] [readonly] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [readonly] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] [readonly] -**test_id** | **str** | Each test is assigned a unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] - -## Example - -```python -from test_results_api.models.dynamic_test import DynamicTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTest from a JSON string -dynamic_test_instance = DynamicTest.from_json(json) -# print the JSON string representation of the object -print DynamicTest.to_json() - -# convert the object into a dict -dynamic_test_dict = dynamic_test_instance.to_dict() -# create an instance of DynamicTest from a dict -dynamic_test_form_dict = dynamic_test.from_dict(dynamic_test_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/endpoint/test_results_api/docs/DynamicTestApplication.md b/endpoint/test_results_api/docs/DynamicTestApplication.md deleted file mode 100644 index f6055344..00000000 --- a/endpoint/test_results_api/docs/DynamicTestApplication.md +++ /dev/null @@ -1,11 +0,0 @@ -# DynamicTestApplication - -Which supported application to 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/endpoint/test_results_api/docs/DynamicTestLinks.md b/endpoint/test_results_api/docs/DynamicTestLinks.md deleted file mode 100644 index 77b1a04c..00000000 --- a/endpoint/test_results_api/docs/DynamicTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# DynamicTestLinks - -A list of links that can be accessed to get more information. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**DynamicTestLinksSelf**](DynamicTestLinksSelf.md) | | [optional] -**test_results** | [**DynamicTestLinksTestResults**](DynamicTestLinksTestResults.md) | | [optional] - -## Example - -```python -from test_results_api.models.dynamic_test_links import DynamicTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTestLinks from a JSON string -dynamic_test_links_instance = DynamicTestLinks.from_json(json) -# print the JSON string representation of the object -print DynamicTestLinks.to_json() - -# convert the object into a dict -dynamic_test_links_dict = dynamic_test_links_instance.to_dict() -# create an instance of DynamicTestLinks from a dict -dynamic_test_links_form_dict = dynamic_test_links.from_dict(dynamic_test_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/endpoint/test_results_api/docs/DynamicTestLinksSelf.md b/endpoint/test_results_api/docs/DynamicTestLinksSelf.md deleted file mode 100644 index b38b84e5..00000000 --- a/endpoint/test_results_api/docs/DynamicTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# DynamicTestLinksSelf - - -## 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 test_results_api.models.dynamic_test_links_self import DynamicTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTestLinksSelf from a JSON string -dynamic_test_links_self_instance = DynamicTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print DynamicTestLinksSelf.to_json() - -# convert the object into a dict -dynamic_test_links_self_dict = dynamic_test_links_self_instance.to_dict() -# create an instance of DynamicTestLinksSelf from a dict -dynamic_test_links_self_form_dict = dynamic_test_links_self.from_dict(dynamic_test_links_self_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/endpoint/test_results_api/docs/DynamicTestLinksTestResults.md b/endpoint/test_results_api/docs/DynamicTestLinksTestResults.md deleted file mode 100644 index a7af31c5..00000000 --- a/endpoint/test_results_api/docs/DynamicTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# DynamicTestLinksTestResults - - -## 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 test_results_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTestLinksTestResults from a JSON string -dynamic_test_links_test_results_instance = DynamicTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print DynamicTestLinksTestResults.to_json() - -# convert the object into a dict -dynamic_test_links_test_results_dict = dynamic_test_links_test_results_instance.to_dict() -# create an instance of DynamicTestLinksTestResults from a dict -dynamic_test_links_test_results_form_dict = dynamic_test_links_test_results.from_dict(dynamic_test_links_test_results_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/endpoint/test_results_api/docs/EndpointAgentLabelsSelectorConfig.md b/endpoint/test_results_api/docs/EndpointAgentLabelsSelectorConfig.md deleted file mode 100644 index 90c1fb9e..00000000 --- a/endpoint/test_results_api/docs/EndpointAgentLabelsSelectorConfig.md +++ /dev/null @@ -1,31 +0,0 @@ -# EndpointAgentLabelsSelectorConfig - -Agent labels selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**AgentLabelsSelectorType**](AgentLabelsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] - -## Example - -```python -from test_results_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentLabelsSelectorConfig from a JSON string -endpoint_agent_labels_selector_config_instance = EndpointAgentLabelsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAgentLabelsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_agent_labels_selector_config_dict = endpoint_agent_labels_selector_config_instance.to_dict() -# create an instance of EndpointAgentLabelsSelectorConfig from a dict -endpoint_agent_labels_selector_config_form_dict = endpoint_agent_labels_selector_config.from_dict(endpoint_agent_labels_selector_config_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/endpoint/test_results_api/docs/EndpointAgentSelectorConfig.md b/endpoint/test_results_api/docs/EndpointAgentSelectorConfig.md deleted file mode 100644 index 977b6f50..00000000 --- a/endpoint/test_results_api/docs/EndpointAgentSelectorConfig.md +++ /dev/null @@ -1,32 +0,0 @@ -# EndpointAgentSelectorConfig - -Agents selection object based on agentSelectorType. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**SpecificAgentsSelectorType**](SpecificAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] - -## Example - -```python -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentSelectorConfig from a JSON string -endpoint_agent_selector_config_instance = EndpointAgentSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAgentSelectorConfig.to_json() - -# convert the object into a dict -endpoint_agent_selector_config_dict = endpoint_agent_selector_config_instance.to_dict() -# create an instance of EndpointAgentSelectorConfig from a dict -endpoint_agent_selector_config_form_dict = endpoint_agent_selector_config.from_dict(endpoint_agent_selector_config_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/endpoint/test_results_api/docs/EndpointAgentToServerTest.md b/endpoint/test_results_api/docs/EndpointAgentToServerTest.md deleted file mode 100644 index fd034719..00000000 --- a/endpoint/test_results_api/docs/EndpointAgentToServerTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# EndpointAgentToServerTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointAgentToServerType**](EndpointAgentToServerType.md) | | [optional] - -## Example - -```python -from test_results_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentToServerTest from a JSON string -endpoint_agent_to_server_test_instance = EndpointAgentToServerTest.from_json(json) -# print the JSON string representation of the object -print EndpointAgentToServerTest.to_json() - -# convert the object into a dict -endpoint_agent_to_server_test_dict = endpoint_agent_to_server_test_instance.to_dict() -# create an instance of EndpointAgentToServerTest from a dict -endpoint_agent_to_server_test_form_dict = endpoint_agent_to_server_test.from_dict(endpoint_agent_to_server_test_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/endpoint/test_results_api/docs/EndpointAgentToServerType.md b/endpoint/test_results_api/docs/EndpointAgentToServerType.md deleted file mode 100644 index a2abd7c3..00000000 --- a/endpoint/test_results_api/docs/EndpointAgentToServerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointAgentToServerType - -Type of test being queried. - -## 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/endpoint/test_results_api/docs/EndpointAllAgentsSelectorConfig.md b/endpoint/test_results_api/docs/EndpointAllAgentsSelectorConfig.md deleted file mode 100644 index d8d55c99..00000000 --- a/endpoint/test_results_api/docs/EndpointAllAgentsSelectorConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointAllAgentsSelectorConfig - -Any agent selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**AllAgentsSelectorType**](AllAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] - -## Example - -```python -from test_results_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAllAgentsSelectorConfig from a JSON string -endpoint_all_agents_selector_config_instance = EndpointAllAgentsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAllAgentsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_all_agents_selector_config_dict = endpoint_all_agents_selector_config_instance.to_dict() -# create an instance of EndpointAllAgentsSelectorConfig from a dict -endpoint_all_agents_selector_config_form_dict = endpoint_all_agents_selector_config.from_dict(endpoint_all_agents_selector_config_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/endpoint/test_results_api/docs/EndpointHttpServerBaseTest.md b/endpoint/test_results_api/docs/EndpointHttpServerBaseTest.md deleted file mode 100644 index 38431dad..00000000 --- a/endpoint/test_results_api/docs/EndpointHttpServerBaseTest.md +++ /dev/null @@ -1,36 +0,0 @@ -# EndpointHttpServerBaseTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] - -## Example - -```python -from test_results_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerBaseTest from a JSON string -endpoint_http_server_base_test_instance = EndpointHttpServerBaseTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerBaseTest.to_json() - -# convert the object into a dict -endpoint_http_server_base_test_dict = endpoint_http_server_base_test_instance.to_dict() -# create an instance of EndpointHttpServerBaseTest from a dict -endpoint_http_server_base_test_form_dict = endpoint_http_server_base_test.from_dict(endpoint_http_server_base_test_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/endpoint/test_results_api/docs/EndpointHttpServerTest.md b/endpoint/test_results_api/docs/EndpointHttpServerTest.md deleted file mode 100644 index 02626582..00000000 --- a/endpoint/test_results_api/docs/EndpointHttpServerTest.md +++ /dev/null @@ -1,58 +0,0 @@ -# EndpointHttpServerTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointHttpServerType**](EndpointHttpServerType.md) | | [optional] -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.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] -**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] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] - -## Example - -```python -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerTest from a JSON string -endpoint_http_server_test_instance = EndpointHttpServerTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerTest.to_json() - -# convert the object into a dict -endpoint_http_server_test_dict = endpoint_http_server_test_instance.to_dict() -# create an instance of EndpointHttpServerTest from a dict -endpoint_http_server_test_form_dict = endpoint_http_server_test.from_dict(endpoint_http_server_test_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/endpoint/test_results_api/docs/EndpointHttpServerType.md b/endpoint/test_results_api/docs/EndpointHttpServerType.md deleted file mode 100644 index 1cf13c82..00000000 --- a/endpoint/test_results_api/docs/EndpointHttpServerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointHttpServerType - -Type of test being queried. - -## 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/endpoint/test_results_api/docs/EndpointScheduledTestType.md b/endpoint/test_results_api/docs/EndpointScheduledTestType.md deleted file mode 100644 index 4fb1f891..00000000 --- a/endpoint/test_results_api/docs/EndpointScheduledTestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointScheduledTestType - -Type of test being queried. - -## 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/endpoint/test_results_api/docs/EndpointSpecificAgentsSelectorConfig.md b/endpoint/test_results_api/docs/EndpointSpecificAgentsSelectorConfig.md deleted file mode 100644 index 7afc7a3c..00000000 --- a/endpoint/test_results_api/docs/EndpointSpecificAgentsSelectorConfig.md +++ /dev/null @@ -1,31 +0,0 @@ -# EndpointSpecificAgentsSelectorConfig - -Specific agents selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**SpecificAgentsSelectorType**](SpecificAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] - -## Example - -```python -from test_results_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointSpecificAgentsSelectorConfig from a JSON string -endpoint_specific_agents_selector_config_instance = EndpointSpecificAgentsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointSpecificAgentsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_specific_agents_selector_config_dict = endpoint_specific_agents_selector_config_instance.to_dict() -# create an instance of EndpointSpecificAgentsSelectorConfig from a dict -endpoint_specific_agents_selector_config_form_dict = endpoint_specific_agents_selector_config.from_dict(endpoint_specific_agents_selector_config_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/endpoint/test_results_api/docs/EndpointTest.md b/endpoint/test_results_api/docs/EndpointTest.md deleted file mode 100644 index 4bb18732..00000000 --- a/endpoint/test_results_api/docs/EndpointTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# EndpointTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointScheduledTestType**](EndpointScheduledTestType.md) | | [optional] - -## Example - -```python -from test_results_api.models.endpoint_test import EndpointTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTest from a JSON string -endpoint_test_instance = EndpointTest.from_json(json) -# print the JSON string representation of the object -print EndpointTest.to_json() - -# convert the object into a dict -endpoint_test_dict = endpoint_test_instance.to_dict() -# create an instance of EndpointTest from a dict -endpoint_test_form_dict = endpoint_test.from_dict(endpoint_test_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/endpoint/test_results_api/docs/EndpointTestAid.md b/endpoint/test_results_api/docs/EndpointTestAid.md deleted file mode 100644 index fe67d9dc..00000000 --- a/endpoint/test_results_api/docs/EndpointTestAid.md +++ /dev/null @@ -1,28 +0,0 @@ -# EndpointTestAid - - -## 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] - -## Example - -```python -from test_results_api.models.endpoint_test_aid import EndpointTestAid - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestAid from a JSON string -endpoint_test_aid_instance = EndpointTestAid.from_json(json) -# print the JSON string representation of the object -print EndpointTestAid.to_json() - -# convert the object into a dict -endpoint_test_aid_dict = endpoint_test_aid_instance.to_dict() -# create an instance of EndpointTestAid from a dict -endpoint_test_aid_form_dict = endpoint_test_aid.from_dict(endpoint_test_aid_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/endpoint/test_results_api/docs/EndpointTestAuthType.md b/endpoint/test_results_api/docs/EndpointTestAuthType.md deleted file mode 100644 index 979915c2..00000000 --- a/endpoint/test_results_api/docs/EndpointTestAuthType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestAuthType - -HTTP authentication type. - -## 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/endpoint/test_results_api/docs/EndpointTestLinks.md b/endpoint/test_results_api/docs/EndpointTestLinks.md deleted file mode 100644 index bbeedb74..00000000 --- a/endpoint/test_results_api/docs/EndpointTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointTestLinks - -A list of links that can be accessed to get more information. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**EndpointTestLinksSelf**](EndpointTestLinksSelf.md) | | [optional] -**test_results** | [**EndpointTestLinksTestResults**](EndpointTestLinksTestResults.md) | | [optional] - -## Example - -```python -from test_results_api.models.endpoint_test_links import EndpointTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinks from a JSON string -endpoint_test_links_instance = EndpointTestLinks.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinks.to_json() - -# convert the object into a dict -endpoint_test_links_dict = endpoint_test_links_instance.to_dict() -# create an instance of EndpointTestLinks from a dict -endpoint_test_links_form_dict = endpoint_test_links.from_dict(endpoint_test_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/endpoint/test_results_api/docs/EndpointTestLinksSelf.md b/endpoint/test_results_api/docs/EndpointTestLinksSelf.md deleted file mode 100644 index fece544b..00000000 --- a/endpoint/test_results_api/docs/EndpointTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointTestLinksSelf - - -## 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 test_results_api.models.endpoint_test_links_self import EndpointTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinksSelf from a JSON string -endpoint_test_links_self_instance = EndpointTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinksSelf.to_json() - -# convert the object into a dict -endpoint_test_links_self_dict = endpoint_test_links_self_instance.to_dict() -# create an instance of EndpointTestLinksSelf from a dict -endpoint_test_links_self_form_dict = endpoint_test_links_self.from_dict(endpoint_test_links_self_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/endpoint/test_results_api/docs/EndpointTestLinksTestResults.md b/endpoint/test_results_api/docs/EndpointTestLinksTestResults.md deleted file mode 100644 index b2e273ef..00000000 --- a/endpoint/test_results_api/docs/EndpointTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointTestLinksTestResults - - -## 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 test_results_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinksTestResults from a JSON string -endpoint_test_links_test_results_instance = EndpointTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinksTestResults.to_json() - -# convert the object into a dict -endpoint_test_links_test_results_dict = endpoint_test_links_test_results_instance.to_dict() -# create an instance of EndpointTestLinksTestResults from a dict -endpoint_test_links_test_results_form_dict = endpoint_test_links_test_results.from_dict(endpoint_test_links_test_results_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/endpoint/test_results_api/docs/EndpointTestProtocol.md b/endpoint/test_results_api/docs/EndpointTestProtocol.md deleted file mode 100644 index c1e002b3..00000000 --- a/endpoint/test_results_api/docs/EndpointTestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestProtocol - -Protocol used to perform the test. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/Error.md b/endpoint/test_results_api/docs/Error.md deleted file mode 100644 index 192750be..00000000 --- a/endpoint/test_results_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 test_results_api.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_form_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/endpoint/test_results_api/docs/EthernetProfile.md b/endpoint/test_results_api/docs/EthernetProfile.md deleted file mode 100644 index 95f9e93b..00000000 --- a/endpoint/test_results_api/docs/EthernetProfile.md +++ /dev/null @@ -1,28 +0,0 @@ -# EthernetProfile - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**link_speed** | **float** | Ethernet profile link speed | [optional] [readonly] - -## Example - -```python -from test_results_api.models.ethernet_profile import EthernetProfile - -# TODO update the JSON string below -json = "{}" -# create an instance of EthernetProfile from a JSON string -ethernet_profile_instance = EthernetProfile.from_json(json) -# print the JSON string representation of the object -print EthernetProfile.to_json() - -# convert the object into a dict -ethernet_profile_dict = ethernet_profile_instance.to_dict() -# create an instance of EthernetProfile from a dict -ethernet_profile_form_dict = ethernet_profile.from_dict(ethernet_profile_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/endpoint/test_results_api/docs/Expand.md b/endpoint/test_results_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/endpoint/test_results_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/endpoint/test_results_api/docs/GetDynamicTestResultPathvisAgentRound200Response.md b/endpoint/test_results_api/docs/GetDynamicTestResultPathvisAgentRound200Response.md deleted file mode 100644 index 1b0d3608..00000000 --- a/endpoint/test_results_api/docs/GetDynamicTestResultPathvisAgentRound200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetDynamicTestResultPathvisAgentRound200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PathVisDetailDynamicTestResult]**](PathVisDetailDynamicTestResult.md) | | [optional] -**test** | [**DynamicTest**](DynamicTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDynamicTestResultPathvisAgentRound200Response from a JSON string -get_dynamic_test_result_pathvis_agent_round200_response_instance = GetDynamicTestResultPathvisAgentRound200Response.from_json(json) -# print the JSON string representation of the object -print GetDynamicTestResultPathvisAgentRound200Response.to_json() - -# convert the object into a dict -get_dynamic_test_result_pathvis_agent_round200_response_dict = get_dynamic_test_result_pathvis_agent_round200_response_instance.to_dict() -# create an instance of GetDynamicTestResultPathvisAgentRound200Response from a dict -get_dynamic_test_result_pathvis_agent_round200_response_form_dict = get_dynamic_test_result_pathvis_agent_round200_response.from_dict(get_dynamic_test_result_pathvis_agent_round200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/GetEndpointLocalNetworkTopologyDetails200Response.md b/endpoint/test_results_api/docs/GetEndpointLocalNetworkTopologyDetails200Response.md deleted file mode 100644 index c55e931f..00000000 --- a/endpoint/test_results_api/docs/GetEndpointLocalNetworkTopologyDetails200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetEndpointLocalNetworkTopologyDetails200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[LocalNetworkTopologyResult]**](LocalNetworkTopologyResult.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEndpointLocalNetworkTopologyDetails200Response from a JSON string -get_endpoint_local_network_topology_details200_response_instance = GetEndpointLocalNetworkTopologyDetails200Response.from_json(json) -# print the JSON string representation of the object -print GetEndpointLocalNetworkTopologyDetails200Response.to_json() - -# convert the object into a dict -get_endpoint_local_network_topology_details200_response_dict = get_endpoint_local_network_topology_details200_response_instance.to_dict() -# create an instance of GetEndpointLocalNetworkTopologyDetails200Response from a dict -get_endpoint_local_network_topology_details200_response_form_dict = get_endpoint_local_network_topology_details200_response.from_dict(get_endpoint_local_network_topology_details200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologiesRequest.md b/endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologiesRequest.md deleted file mode 100644 index 9fc76a92..00000000 --- a/endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologiesRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetEndpointLocalNetworksTopologiesRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**search_filters** | [**EndpointNetworkTopologyResultRequestFilter**](EndpointNetworkTopologyResultRequestFilter.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEndpointLocalNetworksTopologiesRequest from a JSON string -get_endpoint_local_networks_topologies_request_instance = GetEndpointLocalNetworksTopologiesRequest.from_json(json) -# print the JSON string representation of the object -print GetEndpointLocalNetworksTopologiesRequest.to_json() - -# convert the object into a dict -get_endpoint_local_networks_topologies_request_dict = get_endpoint_local_networks_topologies_request_instance.to_dict() -# create an instance of GetEndpointLocalNetworksTopologiesRequest from a dict -get_endpoint_local_networks_topologies_request_form_dict = get_endpoint_local_networks_topologies_request.from_dict(get_endpoint_local_networks_topologies_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/endpoint/test_results_api/docs/GetEndpointRealUserTestDetails200Response.md b/endpoint/test_results_api/docs/GetEndpointRealUserTestDetails200Response.md deleted file mode 100644 index ed26caad..00000000 --- a/endpoint/test_results_api/docs/GetEndpointRealUserTestDetails200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetEndpointRealUserTestDetails200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[EndpointRealUserTestDetail]**](EndpointRealUserTestDetail.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEndpointRealUserTestDetails200Response from a JSON string -get_endpoint_real_user_test_details200_response_instance = GetEndpointRealUserTestDetails200Response.from_json(json) -# print the JSON string representation of the object -print GetEndpointRealUserTestDetails200Response.to_json() - -# convert the object into a dict -get_endpoint_real_user_test_details200_response_dict = get_endpoint_real_user_test_details200_response_instance.to_dict() -# create an instance of GetEndpointRealUserTestDetails200Response from a dict -get_endpoint_real_user_test_details200_response_form_dict = get_endpoint_real_user_test_details200_response.from_dict(get_endpoint_real_user_test_details200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/GetEndpointRealUserTestPagesDetails200Response.md b/endpoint/test_results_api/docs/GetEndpointRealUserTestPagesDetails200Response.md deleted file mode 100644 index e195e2c5..00000000 --- a/endpoint/test_results_api/docs/GetEndpointRealUserTestPagesDetails200Response.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetEndpointRealUserTestPagesDetails200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEndpointRealUserTestPagesDetails200Response from a JSON string -get_endpoint_real_user_test_pages_details200_response_instance = GetEndpointRealUserTestPagesDetails200Response.from_json(json) -# print the JSON string representation of the object -print GetEndpointRealUserTestPagesDetails200Response.to_json() - -# convert the object into a dict -get_endpoint_real_user_test_pages_details200_response_dict = get_endpoint_real_user_test_pages_details200_response_instance.to_dict() -# create an instance of GetEndpointRealUserTestPagesDetails200Response from a dict -get_endpoint_real_user_test_pages_details200_response_form_dict = get_endpoint_real_user_test_pages_details200_response.from_dict(get_endpoint_real_user_test_pages_details200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/GetTestResultHttpServer200Response.md b/endpoint/test_results_api/docs/GetTestResultHttpServer200Response.md deleted file mode 100644 index f7748323..00000000 --- a/endpoint/test_results_api/docs/GetTestResultHttpServer200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetTestResultHttpServer200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] -**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.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** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultHttpServer200Response from a JSON string -get_test_result_http_server200_response_instance = GetTestResultHttpServer200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultHttpServer200Response.to_json() - -# convert the object into a dict -get_test_result_http_server200_response_dict = get_test_result_http_server200_response_instance.to_dict() -# create an instance of GetTestResultHttpServer200Response from a dict -get_test_result_http_server200_response_form_dict = get_test_result_http_server200_response.from_dict(get_test_result_http_server200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/GetTestResultNetworkPathvis200Response.md b/endpoint/test_results_api/docs/GetTestResultNetworkPathvis200Response.md deleted file mode 100644 index 399751a8..00000000 --- a/endpoint/test_results_api/docs/GetTestResultNetworkPathvis200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetTestResultNetworkPathvis200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [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] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultNetworkPathvis200Response from a JSON string -get_test_result_network_pathvis200_response_instance = GetTestResultNetworkPathvis200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultNetworkPathvis200Response.to_json() - -# convert the object into a dict -get_test_result_network_pathvis200_response_dict = get_test_result_network_pathvis200_response_instance.to_dict() -# create an instance of GetTestResultNetworkPathvis200Response from a dict -get_test_result_network_pathvis200_response_form_dict = get_test_result_network_pathvis200_response.from_dict(get_test_result_network_pathvis200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/test_results_api/docs/HttpTestResult.md b/endpoint/test_results_api/docs/HttpTestResult.md deleted file mode 100644 index 7ce11181..00000000 --- a/endpoint/test_results_api/docs/HttpTestResult.md +++ /dev/null @@ -1,48 +0,0 @@ -# HttpTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of destination server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] -**connect_time** | **int** | Time required to establish a TCP connection to the server in milliseconds. | [optional] [readonly] -**dns_time** | **int** | Time required to resolve DNS in milliseconds. | [optional] [readonly] -**error_type** | [**HttpErrorType**](HttpErrorType.md) | | [optional] -**error_details** | **str** | Error details, if an error were encountered. | [optional] [readonly] -**headers** | [**HttpTestResultHeaders**](HttpTestResultHeaders.md) | | [optional] -**num_redirects** | **int** | Number of redirects. | [optional] [readonly] -**receive_time** | **int** | Elapsed time between first and last byte of response in milliseconds. | [optional] [readonly] -**redirect_time** | **int** | Cumulative redirect timing in milliseconds. | [optional] [readonly] -**response_code** | **int** | HTTP response code. | [optional] [readonly] -**response_time** | **int** | Time to first byte in milliseconds. | [optional] [readonly] -**ssl_time** | **int** | Time to negotiate SSL/TLS in milliseconds. | [optional] [readonly] -**total_time** | **int** | Total time is the response time + receive time. | [optional] [readonly] -**wait_time** | **int** | Time elapsed between completion of request and first byte of response in milliseconds. | [optional] [readonly] -**wire_size** | **int** | Size of content in bytes. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.http_test_result import HttpTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpTestResult from a JSON string -http_test_result_instance = HttpTestResult.from_json(json) -# print the JSON string representation of the object -print HttpTestResult.to_json() - -# convert the object into a dict -http_test_result_dict = http_test_result_instance.to_dict() -# create an instance of HttpTestResult from a dict -http_test_result_form_dict = http_test_result.from_dict(http_test_result_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/endpoint/test_results_api/docs/HttpTestResultHeaders.md b/endpoint/test_results_api/docs/HttpTestResultHeaders.md deleted file mode 100644 index b7456312..00000000 --- a/endpoint/test_results_api/docs/HttpTestResultHeaders.md +++ /dev/null @@ -1,30 +0,0 @@ -# HttpTestResultHeaders - -Expandable object containing both request and response headers. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**request_headers** | **str** | CRLF-delimited list of request headers in `header: value` format. | [optional] [readonly] -**response_headers** | **str** | CRLF-delimited list of response headers in `header: value` format. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpTestResultHeaders from a JSON string -http_test_result_headers_instance = HttpTestResultHeaders.from_json(json) -# print the JSON string representation of the object -print HttpTestResultHeaders.to_json() - -# convert the object into a dict -http_test_result_headers_dict = http_test_result_headers_instance.to_dict() -# create an instance of HttpTestResultHeaders from a dict -http_test_result_headers_form_dict = http_test_result_headers.from_dict(http_test_result_headers_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/endpoint/test_results_api/docs/HttpTestResults.md b/endpoint/test_results_api/docs/HttpTestResults.md deleted file mode 100644 index e8198182..00000000 --- a/endpoint/test_results_api/docs/HttpTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# HttpTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] -**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.http_test_results import HttpTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpTestResults from a JSON string -http_test_results_instance = HttpTestResults.from_json(json) -# print the JSON string representation of the object -print HttpTestResults.to_json() - -# convert the object into a dict -http_test_results_dict = http_test_results_instance.to_dict() -# create an instance of HttpTestResults from a dict -http_test_results_form_dict = http_test_results.from_dict(http_test_results_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/endpoint/test_results_api/docs/InterfaceHardwareType.md b/endpoint/test_results_api/docs/InterfaceHardwareType.md deleted file mode 100644 index b4967774..00000000 --- a/endpoint/test_results_api/docs/InterfaceHardwareType.md +++ /dev/null @@ -1,10 +0,0 @@ -# InterfaceHardwareType - - -## 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/endpoint/test_results_api/docs/Link.md b/endpoint/test_results_api/docs/Link.md deleted file mode 100644 index ceef9be3..00000000 --- a/endpoint/test_results_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 test_results_api.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_form_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/endpoint/test_results_api/docs/MultiTestIdNetworkTestResults.md b/endpoint/test_results_api/docs/MultiTestIdNetworkTestResults.md deleted file mode 100644 index d4b87c25..00000000 --- a/endpoint/test_results_api/docs/MultiTestIdNetworkTestResults.md +++ /dev/null @@ -1,28 +0,0 @@ -# MultiTestIdNetworkTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] - -## Example - -```python -from test_results_api.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of MultiTestIdNetworkTestResults from a JSON string -multi_test_id_network_test_results_instance = MultiTestIdNetworkTestResults.from_json(json) -# print the JSON string representation of the object -print MultiTestIdNetworkTestResults.to_json() - -# convert the object into a dict -multi_test_id_network_test_results_dict = multi_test_id_network_test_results_instance.to_dict() -# create an instance of MultiTestIdNetworkTestResults from a dict -multi_test_id_network_test_results_form_dict = multi_test_id_network_test_results.from_dict(multi_test_id_network_test_results_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/endpoint/test_results_api/docs/NetworkTestResult.md b/endpoint/test_results_api/docs/NetworkTestResult.md deleted file mode 100644 index 8e061ffa..00000000 --- a/endpoint/test_results_api/docs/NetworkTestResult.md +++ /dev/null @@ -1,41 +0,0 @@ -# NetworkTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] -**avg_latency** | **float** | Average RTT for packets sent to destination. | [optional] [readonly] -**error_details** | **str** | Error details, if an error was encountered. | [optional] [readonly] -**jitter** | **float** | Standard deviation of latency. | [optional] [readonly] -**is_icmp_blocked** | **bool** | Set to `true` if network target is blocking ICMP echo (ping) queries. | [optional] [readonly] -**loss** | **float** | Percentage of packets not reaching destination. | [optional] [readonly] -**max_latency** | **float** | Maximum RTT for packets sent to destination. | [optional] [readonly] -**min_latency** | **float** | Minimum RTT for packets sent to destination. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.network_test_result import NetworkTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of NetworkTestResult from a JSON string -network_test_result_instance = NetworkTestResult.from_json(json) -# print the JSON string representation of the object -print NetworkTestResult.to_json() - -# convert the object into a dict -network_test_result_dict = network_test_result_instance.to_dict() -# create an instance of NetworkTestResult from a dict -network_test_result_form_dict = network_test_result.from_dict(network_test_result_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/endpoint/test_results_api/docs/NetworkTestResults.md b/endpoint/test_results_api/docs/NetworkTestResults.md deleted file mode 100644 index a2cfbf0d..00000000 --- a/endpoint/test_results_api/docs/NetworkTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# NetworkTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] -**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.network_test_results import NetworkTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of NetworkTestResults from a JSON string -network_test_results_instance = NetworkTestResults.from_json(json) -# print the JSON string representation of the object -print NetworkTestResults.to_json() - -# convert the object into a dict -network_test_results_dict = network_test_results_instance.to_dict() -# create an instance of NetworkTestResults from a dict -network_test_results_form_dict = network_test_results.from_dict(network_test_results_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/endpoint/test_results_api/docs/PaginationNextLink.md b/endpoint/test_results_api/docs/PaginationNextLink.md deleted file mode 100644 index 6560512c..00000000 --- a/endpoint/test_results_api/docs/PaginationNextLink.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationNextLink - -A links object containing a related link for forward pagination. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.pagination_next_link import PaginationNextLink - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationNextLink from a JSON string -pagination_next_link_instance = PaginationNextLink.from_json(json) -# print the JSON string representation of the object -print PaginationNextLink.to_json() - -# convert the object into a dict -pagination_next_link_dict = pagination_next_link_instance.to_dict() -# create an instance of PaginationNextLink from a dict -pagination_next_link_form_dict = pagination_next_link.from_dict(pagination_next_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/endpoint/test_results_api/docs/PaginationNextLinkLinks.md b/endpoint/test_results_api/docs/PaginationNextLinkLinks.md deleted file mode 100644 index 30aa9e37..00000000 --- a/endpoint/test_results_api/docs/PaginationNextLinkLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# PaginationNextLinkLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationNextLinkLinks from a JSON string -pagination_next_link_links_instance = PaginationNextLinkLinks.from_json(json) -# print the JSON string representation of the object -print PaginationNextLinkLinks.to_json() - -# convert the object into a dict -pagination_next_link_links_dict = pagination_next_link_links_instance.to_dict() -# create an instance of PaginationNextLinkLinks from a dict -pagination_next_link_links_form_dict = pagination_next_link_links.from_dict(pagination_next_link_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/endpoint/test_results_api/docs/PathVisBaseTestResult.md b/endpoint/test_results_api/docs/PathVisBaseTestResult.md deleted file mode 100644 index 115b970c..00000000 --- a/endpoint/test_results_api/docs/PathVisBaseTestResult.md +++ /dev/null @@ -1,37 +0,0 @@ -# PathVisBaseTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] -**server** | **str** | Target server, including port. | [optional] [readonly] -**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisBaseTestResult from a JSON string -path_vis_base_test_result_instance = PathVisBaseTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisBaseTestResult.to_json() - -# convert the object into a dict -path_vis_base_test_result_dict = path_vis_base_test_result_instance.to_dict() -# create an instance of PathVisBaseTestResult from a dict -path_vis_base_test_result_form_dict = path_vis_base_test_result.from_dict(path_vis_base_test_result_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/endpoint/test_results_api/docs/PathVisDetailDynamicTestResult.md b/endpoint/test_results_api/docs/PathVisDetailDynamicTestResult.md deleted file mode 100644 index b64a17c4..00000000 --- a/endpoint/test_results_api/docs/PathVisDetailDynamicTestResult.md +++ /dev/null @@ -1,41 +0,0 @@ -# PathVisDetailDynamicTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] -**server** | **str** | Target server, including port. | [optional] [readonly] -**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] -**routes** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows iterations of path trace, with each iteration specified by a pathId. | [optional] -**vpn_routes** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows iterations of the VPN path trace, with each iteration specified by a pathId. | [optional] -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] -**webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.md) | | [optional] - -## Example - -```python -from test_results_api.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisDetailDynamicTestResult from a JSON string -path_vis_detail_dynamic_test_result_instance = PathVisDetailDynamicTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisDetailDynamicTestResult.to_json() - -# convert the object into a dict -path_vis_detail_dynamic_test_result_dict = path_vis_detail_dynamic_test_result_instance.to_dict() -# create an instance of PathVisDetailDynamicTestResult from a dict -path_vis_detail_dynamic_test_result_form_dict = path_vis_detail_dynamic_test_result.from_dict(path_vis_detail_dynamic_test_result_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/endpoint/test_results_api/docs/PathVisDetailTestResult.md b/endpoint/test_results_api/docs/PathVisDetailTestResult.md deleted file mode 100644 index a2b44ff4..00000000 --- a/endpoint/test_results_api/docs/PathVisDetailTestResult.md +++ /dev/null @@ -1,39 +0,0 @@ -# PathVisDetailTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] -**server** | **str** | Target server, including port. | [optional] [readonly] -**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] -**routes** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows iterations of path trace, with each iteration specified by a pathId. | [optional] -**vpn_routes** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows iterations of the VPN path trace, with each iteration specified by a pathId. | [optional] - -## Example - -```python -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisDetailTestResult from a JSON string -path_vis_detail_test_result_instance = PathVisDetailTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisDetailTestResult.to_json() - -# convert the object into a dict -path_vis_detail_test_result_dict = path_vis_detail_test_result_instance.to_dict() -# create an instance of PathVisDetailTestResult from a dict -path_vis_detail_test_result_form_dict = path_vis_detail_test_result.from_dict(path_vis_detail_test_result_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/endpoint/test_results_api/docs/PathVisDetailTestResults.md b/endpoint/test_results_api/docs/PathVisDetailTestResults.md deleted file mode 100644 index 247c7598..00000000 --- a/endpoint/test_results_api/docs/PathVisDetailTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# PathVisDetailTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PathVisDetailTestResult]**](PathVisDetailTestResult.md) | | [optional] -**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisDetailTestResults from a JSON string -path_vis_detail_test_results_instance = PathVisDetailTestResults.from_json(json) -# print the JSON string representation of the object -print PathVisDetailTestResults.to_json() - -# convert the object into a dict -path_vis_detail_test_results_dict = path_vis_detail_test_results_instance.to_dict() -# create an instance of PathVisDetailTestResults from a dict -path_vis_detail_test_results_form_dict = path_vis_detail_test_results.from_dict(path_vis_detail_test_results_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/endpoint/test_results_api/docs/PathVisDynamicTestResult.md b/endpoint/test_results_api/docs/PathVisDynamicTestResult.md deleted file mode 100644 index bd89a8ba..00000000 --- a/endpoint/test_results_api/docs/PathVisDynamicTestResult.md +++ /dev/null @@ -1,41 +0,0 @@ -# PathVisDynamicTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] -**server** | **str** | Target server, including port. | [optional] [readonly] -**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] -**webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.md) | | [optional] -**location** | **str** | Geographic location of the pathvis. | [optional] [readonly] -**endpoints** | [**List[PathVisEndpoint]**](PathVisEndpoint.md) | Shows an iteration of path trace, with each iteration specified by a pathId. | [optional] - -## Example - -```python -from test_results_api.models.path_vis_dynamic_test_result import PathVisDynamicTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisDynamicTestResult from a JSON string -path_vis_dynamic_test_result_instance = PathVisDynamicTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisDynamicTestResult.to_json() - -# convert the object into a dict -path_vis_dynamic_test_result_dict = path_vis_dynamic_test_result_instance.to_dict() -# create an instance of PathVisDynamicTestResult from a dict -path_vis_dynamic_test_result_form_dict = path_vis_dynamic_test_result.from_dict(path_vis_dynamic_test_result_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/endpoint/test_results_api/docs/PathVisEndpoint.md b/endpoint/test_results_api/docs/PathVisEndpoint.md deleted file mode 100644 index c54cfdc2..00000000 --- a/endpoint/test_results_api/docs/PathVisEndpoint.md +++ /dev/null @@ -1,31 +0,0 @@ -# PathVisEndpoint - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **str** | IP address of the hop destination. | [optional] [readonly] -**number_of_hops** | **int** | Number of hops for path trace to destination. | [optional] [readonly] -**path_id** | **str** | Unique ID of path trace. | [optional] [readonly] -**response_time** | **int** | RTT of the path trace to the destination in milliseconds. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.path_vis_endpoint import PathVisEndpoint - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisEndpoint from a JSON string -path_vis_endpoint_instance = PathVisEndpoint.from_json(json) -# print the JSON string representation of the object -print PathVisEndpoint.to_json() - -# convert the object into a dict -path_vis_endpoint_dict = path_vis_endpoint_instance.to_dict() -# create an instance of PathVisEndpoint from a dict -path_vis_endpoint_form_dict = path_vis_endpoint.from_dict(path_vis_endpoint_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/endpoint/test_results_api/docs/PathVisHop.md b/endpoint/test_results_api/docs/PathVisHop.md deleted file mode 100644 index 6e97a415..00000000 --- a/endpoint/test_results_api/docs/PathVisHop.md +++ /dev/null @@ -1,34 +0,0 @@ -# PathVisHop - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hop** | **int** | The hop index. | [optional] [readonly] -**ip_address** | **str** | IP address of the hop. | [optional] [readonly] -**prefix** | **str** | Prefix of IP address shown in CIDR. | [optional] [readonly] -**rdns** | **str** | Reverse DNS entry of IP, if available. | [optional] [readonly] -**network** | **str** | Autonomous System originating the prefix. | [optional] [readonly] -**response_time** | **int** | RTT to the hop’s IP in milliseconds. | [optional] [readonly] -**location** | **str** | Location information for the hop. | [optional] [readonly] - -## Example - -```python -from test_results_api.models.path_vis_hop import PathVisHop - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisHop from a JSON string -path_vis_hop_instance = PathVisHop.from_json(json) -# print the JSON string representation of the object -print PathVisHop.to_json() - -# convert the object into a dict -path_vis_hop_dict = path_vis_hop_instance.to_dict() -# create an instance of PathVisHop from a dict -path_vis_hop_form_dict = path_vis_hop.from_dict(path_vis_hop_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/endpoint/test_results_api/docs/PathVisRoute.md b/endpoint/test_results_api/docs/PathVisRoute.md deleted file mode 100644 index 9ba2cdfc..00000000 --- a/endpoint/test_results_api/docs/PathVisRoute.md +++ /dev/null @@ -1,29 +0,0 @@ -# PathVisRoute - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path_id** | **str** | Unique ID of path trace. | [optional] [readonly] -**hops** | [**List[PathVisHop]**](PathVisHop.md) | Array of hop objects indicating each step in the traceroute. | [optional] - -## Example - -```python -from test_results_api.models.path_vis_route import PathVisRoute - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisRoute from a JSON string -path_vis_route_instance = PathVisRoute.from_json(json) -# print the JSON string representation of the object -print PathVisRoute.to_json() - -# convert the object into a dict -path_vis_route_dict = path_vis_route_instance.to_dict() -# create an instance of PathVisRoute from a dict -path_vis_route_form_dict = path_vis_route.from_dict(path_vis_route_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/endpoint/test_results_api/docs/PathVisTestResult.md b/endpoint/test_results_api/docs/PathVisTestResult.md deleted file mode 100644 index 6eee08b9..00000000 --- a/endpoint/test_results_api/docs/PathVisTestResult.md +++ /dev/null @@ -1,39 +0,0 @@ -# PathVisTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] -**server** | **str** | Target server, including port. | [optional] [readonly] -**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] -**location** | **str** | Geographic location of the pathvis. | [optional] [readonly] -**endpoints** | [**List[PathVisEndpoint]**](PathVisEndpoint.md) | Shows an iteration of path trace, with each iteration specified by a pathId. | [optional] - -## Example - -```python -from test_results_api.models.path_vis_test_result import PathVisTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisTestResult from a JSON string -path_vis_test_result_instance = PathVisTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisTestResult.to_json() - -# convert the object into a dict -path_vis_test_result_dict = path_vis_test_result_instance.to_dict() -# create an instance of PathVisTestResult from a dict -path_vis_test_result_form_dict = path_vis_test_result.from_dict(path_vis_test_result_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/endpoint/test_results_api/docs/PathVisTestResults.md b/endpoint/test_results_api/docs/PathVisTestResults.md deleted file mode 100644 index 395d221c..00000000 --- a/endpoint/test_results_api/docs/PathVisTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# PathVisTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [optional] -**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.path_vis_test_results import PathVisTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisTestResults from a JSON string -path_vis_test_results_instance = PathVisTestResults.from_json(json) -# print the JSON string representation of the object -print PathVisTestResults.to_json() - -# convert the object into a dict -path_vis_test_results_dict = path_vis_test_results_instance.to_dict() -# create an instance of PathVisTestResults from a dict -path_vis_test_results_form_dict = path_vis_test_results.from_dict(path_vis_test_results_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/endpoint/test_results_api/docs/Platform.md b/endpoint/test_results_api/docs/Platform.md deleted file mode 100644 index 0fda6780..00000000 --- a/endpoint/test_results_api/docs/Platform.md +++ /dev/null @@ -1,11 +0,0 @@ -# Platform - -OS platform types - -## 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/endpoint/test_results_api/docs/QueryWindow.md b/endpoint/test_results_api/docs/QueryWindow.md deleted file mode 100644 index 82dc47d1..00000000 --- a/endpoint/test_results_api/docs/QueryWindow.md +++ /dev/null @@ -1,29 +0,0 @@ -# QueryWindow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -## Example - -```python -from test_results_api.models.query_window import QueryWindow - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryWindow from a JSON string -query_window_instance = QueryWindow.from_json(json) -# print the JSON string representation of the object -print QueryWindow.to_json() - -# convert the object into a dict -query_window_dict = query_window_instance.to_dict() -# create an instance of QueryWindow from a dict -query_window_form_dict = query_window.from_dict(query_window_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/endpoint/test_results_api/docs/SelfLinks.md b/endpoint/test_results_api/docs/SelfLinks.md deleted file mode 100644 index f3bf2ff8..00000000 --- a/endpoint/test_results_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.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_form_dict = self_links.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/endpoint/test_results_api/docs/SelfLinksLinks.md b/endpoint/test_results_api/docs/SelfLinksLinks.md deleted file mode 100644 index 2eecc7cc..00000000 --- a/endpoint/test_results_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from test_results_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/endpoint/test_results_api/docs/SortOrder.md b/endpoint/test_results_api/docs/SortOrder.md deleted file mode 100644 index 34e912e4..00000000 --- a/endpoint/test_results_api/docs/SortOrder.md +++ /dev/null @@ -1,11 +0,0 @@ -# SortOrder - -Parameter indicates the ascending/descending order of the sorting, using either the asc or desc values. - -## 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/endpoint/test_results_api/docs/SpecificAgentsSelectorType.md b/endpoint/test_results_api/docs/SpecificAgentsSelectorType.md deleted file mode 100644 index e0b875a0..00000000 --- a/endpoint/test_results_api/docs/SpecificAgentsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecificAgentsSelectorType - - -## 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/endpoint/test_results_api/docs/TestInterval.md b/endpoint/test_results_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/endpoint/test_results_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/endpoint/test_results_api/docs/TestProbeMode.md b/endpoint/test_results_api/docs/TestProbeMode.md deleted file mode 100644 index 2e0ad614..00000000 --- a/endpoint/test_results_api/docs/TestProbeMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProbeMode - -Probe mode used by network test, only valid when the protocol is set to TCP. - -## 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/endpoint/test_results_api/docs/TestResult.md b/endpoint/test_results_api/docs/TestResult.md deleted file mode 100644 index 0dff63ac..00000000 --- a/endpoint/test_results_api/docs/TestResult.md +++ /dev/null @@ -1,33 +0,0 @@ -# TestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] -**server_ip** | **str** | IP address of target server. | [optional] [readonly] -**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] -**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] - -## Example - -```python -from test_results_api.models.test_result import TestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of TestResult from a JSON string -test_result_instance = TestResult.from_json(json) -# print the JSON string representation of the object -print TestResult.to_json() - -# convert the object into a dict -test_result_dict = test_result_instance.to_dict() -# create an instance of TestResult from a dict -test_result_form_dict = test_result.from_dict(test_result_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/endpoint/test_results_api/docs/TestSslVersionId.md b/endpoint/test_results_api/docs/TestSslVersionId.md deleted file mode 100644 index fb9ac0f8..00000000 --- a/endpoint/test_results_api/docs/TestSslVersionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestSslVersionId - -SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - -## 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/endpoint/test_results_api/docs/ThresholdFilterOperator.md b/endpoint/test_results_api/docs/ThresholdFilterOperator.md deleted file mode 100644 index 9a7b5288..00000000 --- a/endpoint/test_results_api/docs/ThresholdFilterOperator.md +++ /dev/null @@ -1,10 +0,0 @@ -# ThresholdFilterOperator - - -## 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/endpoint/test_results_api/docs/UnauthorizedError.md b/endpoint/test_results_api/docs/UnauthorizedError.md deleted file mode 100644 index e4879144..00000000 --- a/endpoint/test_results_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from test_results_api.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_form_dict = unauthorized_error.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/endpoint/test_results_api/docs/VpnType.md b/endpoint/test_results_api/docs/VpnType.md deleted file mode 100644 index 5531185b..00000000 --- a/endpoint/test_results_api/docs/VpnType.md +++ /dev/null @@ -1,11 +0,0 @@ -# VpnType - -Name of the VPN provider. - -## 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/endpoint/test_results_api/git_push.sh b/endpoint/test_results_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/endpoint/test_results_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/endpoint/test_results_api/pyproject.toml b/endpoint/test_results_api/pyproject.toml deleted file mode 100644 index c7eba97b..00000000 --- a/endpoint/test_results_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "test_results_api" -version = "1.0.0" -description = "Endpoint Test Results API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Test Results API"] -include = ["test_results_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/endpoint/test_results_api/setup.py b/endpoint/test_results_api/setup.py deleted file mode 100644 index ab3d7b6b..00000000 --- a/endpoint/test_results_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "test-results-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Endpoint Test Results API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Endpoint Test Results API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Retrieve results for scheduled and dynamic tests on endpoint agents. - """, # noqa: E501 - package_data={"test_results_api": ["py.typed"]}, -) diff --git a/endpoint/test_results_api/test-requirements.txt b/endpoint/test_results_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/endpoint/test_results_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/endpoint/test_results_api/test/test_account_group_id.py b/endpoint/test_results_api/test/test_account_group_id.py deleted file mode 100644 index dd4e8ecd..00000000 --- a/endpoint/test_results_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_agent_labels_selector_type.py b/endpoint/test_results_api/test/test_agent_labels_selector_type.py deleted file mode 100644 index 522deed9..00000000 --- a/endpoint/test_results_api/test/test_agent_labels_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.agent_labels_selector_type import AgentLabelsSelectorType - -class TestAgentLabelsSelectorType(unittest.TestCase): - """AgentLabelsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentLabelsSelectorType(self): - """Test AgentLabelsSelectorType""" - # inst = AgentLabelsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_all_agents_selector_type.py b/endpoint/test_results_api/test/test_all_agents_selector_type.py deleted file mode 100644 index 754e8d0e..00000000 --- a/endpoint/test_results_api/test/test_all_agents_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.all_agents_selector_type import AllAgentsSelectorType - -class TestAllAgentsSelectorType(unittest.TestCase): - """AllAgentsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAllAgentsSelectorType(self): - """Test AllAgentsSelectorType""" - # inst = AllAgentsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_conditional_operator.py b/endpoint/test_results_api/test/test_conditional_operator.py deleted file mode 100644 index d250bfe3..00000000 --- a/endpoint/test_results_api/test/test_conditional_operator.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.conditional_operator import ConditionalOperator - -class TestConditionalOperator(unittest.TestCase): - """ConditionalOperator unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testConditionalOperator(self): - """Test ConditionalOperator""" - # inst = ConditionalOperator() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_dynamic_test.py b/endpoint/test_results_api/test/test_dynamic_test.py deleted file mode 100644 index e5a42f60..00000000 --- a/endpoint/test_results_api/test/test_dynamic_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.dynamic_test import DynamicTest - -class TestDynamicTest(unittest.TestCase): - """DynamicTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTest: - """Test DynamicTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTest` - """ - model = DynamicTest() - if include_optional: - return DynamicTest( - links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = True, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - protocol = 'icmp', - tcp_probe_mode = 'auto', - test_id = '281474976710706', - aid = None, - test_name = 'Test name' - ) - else: - return DynamicTest( - ) - """ - - def testDynamicTest(self): - """Test DynamicTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_dynamic_test_application.py b/endpoint/test_results_api/test/test_dynamic_test_application.py deleted file mode 100644 index 4a502fb4..00000000 --- a/endpoint/test_results_api/test/test_dynamic_test_application.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.dynamic_test_application import DynamicTestApplication - -class TestDynamicTestApplication(unittest.TestCase): - """DynamicTestApplication unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDynamicTestApplication(self): - """Test DynamicTestApplication""" - # inst = DynamicTestApplication() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_dynamic_test_links.py b/endpoint/test_results_api/test/test_dynamic_test_links.py deleted file mode 100644 index b6e61e8f..00000000 --- a/endpoint/test_results_api/test/test_dynamic_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.dynamic_test_links import DynamicTestLinks - -class TestDynamicTestLinks(unittest.TestCase): - """DynamicTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTestLinks: - """Test DynamicTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTestLinks` - """ - model = DynamicTestLinks() - if include_optional: - return DynamicTestLinks( - var_self = None, - test_results = [{"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"}] - ) - else: - return DynamicTestLinks( - ) - """ - - def testDynamicTestLinks(self): - """Test DynamicTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_dynamic_test_links_self.py b/endpoint/test_results_api/test/test_dynamic_test_links_self.py deleted file mode 100644 index 4e623896..00000000 --- a/endpoint/test_results_api/test/test_dynamic_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.dynamic_test_links_self import DynamicTestLinksSelf - -class TestDynamicTestLinksSelf(unittest.TestCase): - """DynamicTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTestLinksSelf: - """Test DynamicTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTestLinksSelf` - """ - model = DynamicTestLinksSelf() - if include_optional: - return DynamicTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return DynamicTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testDynamicTestLinksSelf(self): - """Test DynamicTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_dynamic_test_links_test_results.py b/endpoint/test_results_api/test/test_dynamic_test_links_test_results.py deleted file mode 100644 index a7bf3d89..00000000 --- a/endpoint/test_results_api/test/test_dynamic_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults - -class TestDynamicTestLinksTestResults(unittest.TestCase): - """DynamicTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTestLinksTestResults: - """Test DynamicTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTestLinksTestResults` - """ - model = DynamicTestLinksTestResults() - if include_optional: - return DynamicTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return DynamicTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testDynamicTestLinksTestResults(self): - """Test DynamicTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_agent_labels_selector_config.py b/endpoint/test_results_api/test/test_endpoint_agent_labels_selector_config.py deleted file mode 100644 index d6ffd531..00000000 --- a/endpoint/test_results_api/test/test_endpoint_agent_labels_selector_config.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig - -class TestEndpointAgentLabelsSelectorConfig(unittest.TestCase): - """EndpointAgentLabelsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentLabelsSelectorConfig: - """Test EndpointAgentLabelsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentLabelsSelectorConfig` - """ - model = EndpointAgentLabelsSelectorConfig() - if include_optional: - return EndpointAgentLabelsSelectorConfig( - agent_selector_type = 'agent-labels', - max_machines = 10, - endpoint_agent_labels = ["567","214"] - ) - else: - return EndpointAgentLabelsSelectorConfig( - ) - """ - - def testEndpointAgentLabelsSelectorConfig(self): - """Test EndpointAgentLabelsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_agent_selector_config.py b/endpoint/test_results_api/test/test_endpoint_agent_selector_config.py deleted file mode 100644 index 6703adb9..00000000 --- a/endpoint/test_results_api/test/test_endpoint_agent_selector_config.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig - -class TestEndpointAgentSelectorConfig(unittest.TestCase): - """EndpointAgentSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentSelectorConfig: - """Test EndpointAgentSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentSelectorConfig` - """ - model = EndpointAgentSelectorConfig() - if include_optional: - return EndpointAgentSelectorConfig( - agent_selector_type = 'specific-agents', - max_machines = 10, - endpoint_agent_labels = ["567","214"], - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] - ) - else: - return EndpointAgentSelectorConfig( - ) - """ - - def testEndpointAgentSelectorConfig(self): - """Test EndpointAgentSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_agent_to_server_test.py b/endpoint/test_results_api/test/test_endpoint_agent_to_server_test.py deleted file mode 100644 index 7b07f53a..00000000 --- a/endpoint/test_results_api/test/test_endpoint_agent_to_server_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -class TestEndpointAgentToServerTest(unittest.TestCase): - """EndpointAgentToServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentToServerTest: - """Test EndpointAgentToServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentToServerTest` - """ - model = EndpointAgentToServerTest() - if include_optional: - return EndpointAgentToServerTest( - links = test_results_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return EndpointAgentToServerTest( - ) - """ - - def testEndpointAgentToServerTest(self): - """Test EndpointAgentToServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_agent_to_server_type.py b/endpoint/test_results_api/test/test_endpoint_agent_to_server_type.py deleted file mode 100644 index d6bde791..00000000 --- a/endpoint/test_results_api/test/test_endpoint_agent_to_server_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType - -class TestEndpointAgentToServerType(unittest.TestCase): - """EndpointAgentToServerType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointAgentToServerType(self): - """Test EndpointAgentToServerType""" - # inst = EndpointAgentToServerType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_all_agents_selector_config.py b/endpoint/test_results_api/test/test_endpoint_all_agents_selector_config.py deleted file mode 100644 index 8454fdd8..00000000 --- a/endpoint/test_results_api/test/test_endpoint_all_agents_selector_config.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig - -class TestEndpointAllAgentsSelectorConfig(unittest.TestCase): - """EndpointAllAgentsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAllAgentsSelectorConfig: - """Test EndpointAllAgentsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAllAgentsSelectorConfig` - """ - model = EndpointAllAgentsSelectorConfig() - if include_optional: - return EndpointAllAgentsSelectorConfig( - agent_selector_type = 'all-agents', - max_machines = 10 - ) - else: - return EndpointAllAgentsSelectorConfig( - ) - """ - - def testEndpointAllAgentsSelectorConfig(self): - """Test EndpointAllAgentsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_http_server_base_test.py b/endpoint/test_results_api/test/test_endpoint_http_server_base_test.py deleted file mode 100644 index 0e2342b5..00000000 --- a/endpoint/test_results_api/test/test_endpoint_http_server_base_test.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest - -class TestEndpointHttpServerBaseTest(unittest.TestCase): - """EndpointHttpServerBaseTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerBaseTest: - """Test EndpointHttpServerBaseTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerBaseTest` - """ - model = EndpointHttpServerBaseTest() - if include_optional: - return EndpointHttpServerBaseTest( - auth_type = 'none', - has_path_trace_in_session = True, - http_time_limit = 5000, - protocol = 'icmp', - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False - ) - else: - return EndpointHttpServerBaseTest( - ) - """ - - def testEndpointHttpServerBaseTest(self): - """Test EndpointHttpServerBaseTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_http_server_test.py b/endpoint/test_results_api/test/test_endpoint_http_server_test.py deleted file mode 100644 index 6429acfc..00000000 --- a/endpoint/test_results_api/test/test_endpoint_http_server_test.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest - -class TestEndpointHttpServerTest(unittest.TestCase): - """EndpointHttpServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerTest: - """Test EndpointHttpServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerTest` - """ - model = EndpointHttpServerTest() - if include_optional: - return EndpointHttpServerTest( - links = test_results_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'http-server', - auth_type = 'none', - http_time_limit = 5000, - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - content_regex = '(regex)+', - follow_redirects = True, - http_target_time = 100, - http_version = 1, - post_body = 'body', - ssl_version = 'Auto', - use_ntlm = False, - user_agent = 'curl' - ) - else: - return EndpointHttpServerTest( - ) - """ - - def testEndpointHttpServerTest(self): - """Test EndpointHttpServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_http_server_type.py b/endpoint/test_results_api/test/test_endpoint_http_server_type.py deleted file mode 100644 index 4856acaf..00000000 --- a/endpoint/test_results_api/test/test_endpoint_http_server_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_http_server_type import EndpointHttpServerType - -class TestEndpointHttpServerType(unittest.TestCase): - """EndpointHttpServerType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointHttpServerType(self): - """Test EndpointHttpServerType""" - # inst = EndpointHttpServerType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_scheduled_test.py b/endpoint/test_results_api/test/test_endpoint_scheduled_test.py deleted file mode 100644 index df58c843..00000000 --- a/endpoint/test_results_api/test/test_endpoint_scheduled_test.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest - -class TestEndpointScheduledTest(unittest.TestCase): - """EndpointScheduledTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointScheduledTest: - """Test EndpointScheduledTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointScheduledTest` - """ - model = EndpointScheduledTest() - if include_optional: - return EndpointScheduledTest( - links = test_results_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'http-server', - auth_type = 'none', - http_time_limit = 5000, - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - content_regex = '(regex)+', - follow_redirects = True, - http_target_time = 100, - http_version = 1, - post_body = 'body', - ssl_version = 'Auto', - use_ntlm = False, - user_agent = 'curl' - ) - else: - return EndpointScheduledTest( - ) - """ - - def testEndpointScheduledTest(self): - """Test EndpointScheduledTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_scheduled_test_type.py b/endpoint/test_results_api/test/test_endpoint_scheduled_test_type.py deleted file mode 100644 index 88f907de..00000000 --- a/endpoint/test_results_api/test/test_endpoint_scheduled_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType - -class TestEndpointScheduledTestType(unittest.TestCase): - """EndpointScheduledTestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointScheduledTestType(self): - """Test EndpointScheduledTestType""" - # inst = EndpointScheduledTestType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_specific_agents_selector_config.py b/endpoint/test_results_api/test/test_endpoint_specific_agents_selector_config.py deleted file mode 100644 index e7d1bbc1..00000000 --- a/endpoint/test_results_api/test/test_endpoint_specific_agents_selector_config.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig - -class TestEndpointSpecificAgentsSelectorConfig(unittest.TestCase): - """EndpointSpecificAgentsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointSpecificAgentsSelectorConfig: - """Test EndpointSpecificAgentsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointSpecificAgentsSelectorConfig` - """ - model = EndpointSpecificAgentsSelectorConfig() - if include_optional: - return EndpointSpecificAgentsSelectorConfig( - agent_selector_type = 'specific-agents', - max_machines = 10, - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] - ) - else: - return EndpointSpecificAgentsSelectorConfig( - ) - """ - - def testEndpointSpecificAgentsSelectorConfig(self): - """Test EndpointSpecificAgentsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test.py b/endpoint/test_results_api/test/test_endpoint_test.py deleted file mode 100644 index 4a763808..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test import EndpointTest - -class TestEndpointTest(unittest.TestCase): - """EndpointTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTest: - """Test EndpointTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTest` - """ - model = EndpointTest() - if include_optional: - return EndpointTest( - links = test_results_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return EndpointTest( - ) - """ - - def testEndpointTest(self): - """Test EndpointTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test_aid.py b/endpoint/test_results_api/test/test_endpoint_test_aid.py deleted file mode 100644 index 069d3ed5..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test_aid.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test_aid import EndpointTestAid - -class TestEndpointTestAid(unittest.TestCase): - """EndpointTestAid unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestAid: - """Test EndpointTestAid - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestAid` - """ - model = EndpointTestAid() - if include_optional: - return EndpointTestAid( - aid = '11' - ) - else: - return EndpointTestAid( - ) - """ - - def testEndpointTestAid(self): - """Test EndpointTestAid""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test_auth_type.py b/endpoint/test_results_api/test/test_endpoint_test_auth_type.py deleted file mode 100644 index df6e6f85..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test_auth_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test_auth_type import EndpointTestAuthType - -class TestEndpointTestAuthType(unittest.TestCase): - """EndpointTestAuthType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestAuthType(self): - """Test EndpointTestAuthType""" - # inst = EndpointTestAuthType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test_links.py b/endpoint/test_results_api/test/test_endpoint_test_links.py deleted file mode 100644 index d6b6a196..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test_links import EndpointTestLinks - -class TestEndpointTestLinks(unittest.TestCase): - """EndpointTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinks: - """Test EndpointTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinks` - """ - model = EndpointTestLinks() - if include_optional: - return EndpointTestLinks( - var_self = None, - test_results = [{"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"}] - ) - else: - return EndpointTestLinks( - ) - """ - - def testEndpointTestLinks(self): - """Test EndpointTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test_links_self.py b/endpoint/test_results_api/test/test_endpoint_test_links_self.py deleted file mode 100644 index 2112ebba..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test_links_self import EndpointTestLinksSelf - -class TestEndpointTestLinksSelf(unittest.TestCase): - """EndpointTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinksSelf: - """Test EndpointTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinksSelf` - """ - model = EndpointTestLinksSelf() - if include_optional: - return EndpointTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return EndpointTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testEndpointTestLinksSelf(self): - """Test EndpointTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test_links_test_results.py b/endpoint/test_results_api/test/test_endpoint_test_links_test_results.py deleted file mode 100644 index 0625bbeb..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults - -class TestEndpointTestLinksTestResults(unittest.TestCase): - """EndpointTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinksTestResults: - """Test EndpointTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinksTestResults` - """ - model = EndpointTestLinksTestResults() - if include_optional: - return EndpointTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return EndpointTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testEndpointTestLinksTestResults(self): - """Test EndpointTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_test_protocol.py b/endpoint/test_results_api/test/test_endpoint_test_protocol.py deleted file mode 100644 index db600fb6..00000000 --- a/endpoint/test_results_api/test/test_endpoint_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol - -class TestEndpointTestProtocol(unittest.TestCase): - """EndpointTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestProtocol(self): - """Test EndpointTestProtocol""" - # inst = EndpointTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_error.py b/endpoint/test_results_api/test/test_error.py deleted file mode 100644 index 3b873358..00000000 --- a/endpoint/test_results_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_ethernet_profile.py b/endpoint/test_results_api/test/test_ethernet_profile.py deleted file mode 100644 index 85416c8f..00000000 --- a/endpoint/test_results_api/test/test_ethernet_profile.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.ethernet_profile import EthernetProfile - -class TestEthernetProfile(unittest.TestCase): - """EthernetProfile unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EthernetProfile: - """Test EthernetProfile - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EthernetProfile` - """ - model = EthernetProfile() - if include_optional: - return EthernetProfile( - link_speed = 860 - ) - else: - return EthernetProfile( - ) - """ - - def testEthernetProfile(self): - """Test EthernetProfile""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_expand.py b/endpoint/test_results_api/test/test_expand.py deleted file mode 100644 index 7771c00b..00000000 --- a/endpoint/test_results_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_get_dynamic_test_result_network_pathvis200_response.py b/endpoint/test_results_api/test/test_get_dynamic_test_result_network_pathvis200_response.py deleted file mode 100644 index ef2c2fe9..00000000 --- a/endpoint/test_results_api/test/test_get_dynamic_test_result_network_pathvis200_response.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response - -class TestGetDynamicTestResultNetworkPathvis200Response(unittest.TestCase): - """GetDynamicTestResultNetworkPathvis200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDynamicTestResultNetworkPathvis200Response: - """Test GetDynamicTestResultNetworkPathvis200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDynamicTestResultNetworkPathvis200Response` - """ - model = GetDynamicTestResultNetworkPathvis200Response() - if include_optional: - return GetDynamicTestResultNetworkPathvis200Response( - results = [ - null - ], - test = test_results_api.models.dynamic_test.DynamicTest( - _links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ), - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetDynamicTestResultNetworkPathvis200Response( - ) - """ - - def testGetDynamicTestResultNetworkPathvis200Response(self): - """Test GetDynamicTestResultNetworkPathvis200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py b/endpoint/test_results_api/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py deleted file mode 100644 index 1954106e..00000000 --- a/endpoint/test_results_api/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response - -class TestGetDynamicTestResultPathvisAgentRound200Response(unittest.TestCase): - """GetDynamicTestResultPathvisAgentRound200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDynamicTestResultPathvisAgentRound200Response: - """Test GetDynamicTestResultPathvisAgentRound200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDynamicTestResultPathvisAgentRound200Response` - """ - model = GetDynamicTestResultPathvisAgentRound200Response() - if include_optional: - return GetDynamicTestResultPathvisAgentRound200Response( - results = [ - null - ], - test = test_results_api.models.dynamic_test.DynamicTest( - _links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ), - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetDynamicTestResultPathvisAgentRound200Response( - ) - """ - - def testGetDynamicTestResultPathvisAgentRound200Response(self): - """Test GetDynamicTestResultPathvisAgentRound200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_get_test_result_http_server200_response.py b/endpoint/test_results_api/test/test_get_test_result_http_server200_response.py deleted file mode 100644 index 41633a00..00000000 --- a/endpoint/test_results_api/test/test_get_test_result_http_server200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response - -class TestGetTestResultHttpServer200Response(unittest.TestCase): - """GetTestResultHttpServer200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultHttpServer200Response: - """Test GetTestResultHttpServer200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultHttpServer200Response` - """ - model = GetTestResultHttpServer200Response() - if include_optional: - return GetTestResultHttpServer200Response( - results = [ - null - ], - test = None, - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultHttpServer200Response( - ) - """ - - def testGetTestResultHttpServer200Response(self): - """Test GetTestResultHttpServer200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_get_test_result_network_pathvis200_response.py b/endpoint/test_results_api/test/test_get_test_result_network_pathvis200_response.py deleted file mode 100644 index b97829ca..00000000 --- a/endpoint/test_results_api/test/test_get_test_result_network_pathvis200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response - -class TestGetTestResultNetworkPathvis200Response(unittest.TestCase): - """GetTestResultNetworkPathvis200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultNetworkPathvis200Response: - """Test GetTestResultNetworkPathvis200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultNetworkPathvis200Response` - """ - model = GetTestResultNetworkPathvis200Response() - if include_optional: - return GetTestResultNetworkPathvis200Response( - results = [ - null - ], - test = None, - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultNetworkPathvis200Response( - ) - """ - - def testGetTestResultNetworkPathvis200Response(self): - """Test GetTestResultNetworkPathvis200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_http_test_result.py b/endpoint/test_results_api/test/test_http_test_result.py deleted file mode 100644 index 6ee20244..00000000 --- a/endpoint/test_results_api/test/test_http_test_result.py +++ /dev/null @@ -1,123 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.http_test_result import HttpTestResult - -class TestHttpTestResult(unittest.TestCase): - """HttpTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpTestResult: - """Test HttpTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpTestResult` - """ - model = HttpTestResult() - if include_optional: - return HttpTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '193.2.1.88', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - network_profile = None, - connect_time = 2, - dns_time = 0, - error_type = 'connect', - error_details = '', - headers = test_results_api.models.http_test_result_headers.HttpTestResultHeaders( - request_headers = 'GET / HTTP/1.1 -Host: www.thousandeyes.com -User-Agent: curl/7.58.0-DEV -Accept: */* -Accept-Encoding: deflate, gzip -X-ThousandEyes-Agent: yes -', - response_headers = 'HTTP/1.1 200 OK -Content-Type: text/html;charset=UTF-8 -Content-Length: 9993 -Connection: keep-alive -Date: Mon, 04 May 2020 16:13:00 GMT -Server: Apache -Content-Language: en-US -Content-Encoding: gzip -X-Frame-Options: sameorigin -Cache-Control: max-age=600, must-revalidate -Strict-Transport-Security: max-age=31536000 -X-Content-Type-Options: nosniff -X-XSS-Protection: 1; mode=block -Vary: Accept-Encoding -X-Cache: Hit from cloudfront -Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) -X-Amz-Cf-Pop: SFO5-C3 -X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== -Age: 132 -', ), - num_redirects = 0, - receive_time = 1, - redirect_time = 10, - response_code = 200, - response_time = 14, - ssl_time = 9, - total_time = 15, - wait_time = 3, - wire_size = 9993 - ) - else: - return HttpTestResult( - ) - """ - - def testHttpTestResult(self): - """Test HttpTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_http_test_result_headers.py b/endpoint/test_results_api/test/test_http_test_result_headers.py deleted file mode 100644 index de00355f..00000000 --- a/endpoint/test_results_api/test/test_http_test_result_headers.py +++ /dev/null @@ -1,78 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders - -class TestHttpTestResultHeaders(unittest.TestCase): - """HttpTestResultHeaders unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpTestResultHeaders: - """Test HttpTestResultHeaders - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpTestResultHeaders` - """ - model = HttpTestResultHeaders() - if include_optional: - return HttpTestResultHeaders( - request_headers = 'GET / HTTP/1.1 -Host: www.thousandeyes.com -User-Agent: curl/7.58.0-DEV -Accept: */* -Accept-Encoding: deflate, gzip -X-ThousandEyes-Agent: yes -', - response_headers = 'HTTP/1.1 200 OK -Content-Type: text/html;charset=UTF-8 -Content-Length: 9993 -Connection: keep-alive -Date: Mon, 04 May 2020 16:13:00 GMT -Server: Apache -Content-Language: en-US -Content-Encoding: gzip -X-Frame-Options: sameorigin -Cache-Control: max-age=600, must-revalidate -Strict-Transport-Security: max-age=31536000 -X-Content-Type-Options: nosniff -X-XSS-Protection: 1; mode=block -Vary: Accept-Encoding -X-Cache: Hit from cloudfront -Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) -X-Amz-Cf-Pop: SFO5-C3 -X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== -Age: 132 -' - ) - else: - return HttpTestResultHeaders( - ) - """ - - def testHttpTestResultHeaders(self): - """Test HttpTestResultHeaders""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_http_test_results.py b/endpoint/test_results_api/test/test_http_test_results.py deleted file mode 100644 index d559856a..00000000 --- a/endpoint/test_results_api/test/test_http_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.http_test_results import HttpTestResults - -class TestHttpTestResults(unittest.TestCase): - """HttpTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpTestResults: - """Test HttpTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpTestResults` - """ - model = HttpTestResults() - if include_optional: - return HttpTestResults( - results = [ - null - ], - test = None - ) - else: - return HttpTestResults( - ) - """ - - def testHttpTestResults(self): - """Test HttpTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_interface_hardware_type.py b/endpoint/test_results_api/test/test_interface_hardware_type.py deleted file mode 100644 index 80dca8c8..00000000 --- a/endpoint/test_results_api/test/test_interface_hardware_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.interface_hardware_type import InterfaceHardwareType - -class TestInterfaceHardwareType(unittest.TestCase): - """InterfaceHardwareType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInterfaceHardwareType(self): - """Test InterfaceHardwareType""" - # inst = InterfaceHardwareType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_link.py b/endpoint/test_results_api/test/test_link.py deleted file mode 100644 index 28f1cd7a..00000000 --- a/endpoint/test_results_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_local_network_tests_results_api.py b/endpoint/test_results_api/test/test_local_network_tests_results_api.py deleted file mode 100644 index 8e5b4fab..00000000 --- a/endpoint/test_results_api/test/test_local_network_tests_results_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_get_endpoint_local_network_topology_details(self) -> None: - """Test case for get_endpoint_local_network_topology_details - - Retrieve endpoint local network topology - """ - pass - - def test_get_endpoint_local_networks(self) -> None: - """Test case for get_endpoint_local_networks - - List local networks - """ - pass - - def test_get_endpoint_local_networks_topologies(self) -> None: - """Test case for get_endpoint_local_networks_topologies - - List endpoint network topologies probes - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_network_dynamic_test_results.py b/endpoint/test_results_api/test/test_network_dynamic_test_results.py deleted file mode 100644 index facfc188..00000000 --- a/endpoint/test_results_api/test/test_network_dynamic_test_results.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.network_dynamic_test_results import NetworkDynamicTestResults - -class TestNetworkDynamicTestResults(unittest.TestCase): - """NetworkDynamicTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NetworkDynamicTestResults: - """Test NetworkDynamicTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NetworkDynamicTestResults` - """ - model = NetworkDynamicTestResults() - if include_optional: - return NetworkDynamicTestResults( - results = [ - null - ], - test = test_results_api.models.dynamic_test.DynamicTest( - _links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ) - ) - else: - return NetworkDynamicTestResults( - ) - """ - - def testNetworkDynamicTestResults(self): - """Test NetworkDynamicTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_network_dynamic_tests_results_api.py b/endpoint/test_results_api/test/test_network_dynamic_tests_results_api.py deleted file mode 100644 index b67f3138..00000000 --- a/endpoint/test_results_api/test/test_network_dynamic_tests_results_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_get_dynamic_test_result_network_pathvis(self) -> None: - """Test case for get_dynamic_test_result_network_pathvis - - Retrieve pathvis network dynamic test results - """ - pass - - def test_get_dynamic_test_result_pathvis_agent_round(self) -> None: - """Test case for get_dynamic_test_result_pathvis_agent_round - - Retrieve pathvis network dynamic test results details - """ - pass - - def test_post_fetch_dynamic_test_result_metrics(self) -> None: - """Test case for post_fetch_dynamic_test_result_metrics - - Retrieve network dynamic test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_network_scheduled_tests_results_api.py b/endpoint/test_results_api/test/test_network_scheduled_tests_results_api.py deleted file mode 100644 index 43bd641f..00000000 --- a/endpoint/test_results_api/test/test_network_scheduled_tests_results_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_get_test_result_network_pathvis(self) -> None: - """Test case for get_test_result_network_pathvis - - Retrieve pathvis network scheduled test results - """ - pass - - def test_get_test_result_pathvis_agent_round(self) -> None: - """Test case for get_test_result_pathvis_agent_round - - Retrieve pathvis network scheduled test results details - """ - pass - - def test_post_fetch_test_result_metrics(self) -> None: - """Test case for post_fetch_test_result_metrics - - Retrieve network scheduled test results - """ - pass - - def test_post_fetch_test_result_metrics_multi_test(self) -> None: - """Test case for post_fetch_test_result_metrics_multi_test - - Retrieve network scheduled test results from multiple tests - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_network_test_result.py b/endpoint/test_results_api/test/test_network_test_result.py deleted file mode 100644 index 3e585ef7..00000000 --- a/endpoint/test_results_api/test/test_network_test_result.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.network_test_result import NetworkTestResult - -class TestNetworkTestResult(unittest.TestCase): - """NetworkTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NetworkTestResult: - """Test NetworkTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NetworkTestResult` - """ - model = NetworkTestResult() - if include_optional: - return NetworkTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - network_profile = None, - avg_latency = 167.04, - error_details = 'Error', - jitter = 0.076808, - is_icmp_blocked = True, - loss = 0.0, - max_latency = 168.0, - min_latency = 167.0 - ) - else: - return NetworkTestResult( - ) - """ - - def testNetworkTestResult(self): - """Test NetworkTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_network_test_results.py b/endpoint/test_results_api/test/test_network_test_results.py deleted file mode 100644 index 59a8ab81..00000000 --- a/endpoint/test_results_api/test/test_network_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.network_test_results import NetworkTestResults - -class TestNetworkTestResults(unittest.TestCase): - """NetworkTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NetworkTestResults: - """Test NetworkTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NetworkTestResults` - """ - model = NetworkTestResults() - if include_optional: - return NetworkTestResults( - results = [ - null - ], - test = None - ) - else: - return NetworkTestResults( - ) - """ - - def testNetworkTestResults(self): - """Test NetworkTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_pagination_next_link.py b/endpoint/test_results_api/test/test_pagination_next_link.py deleted file mode 100644 index 25dbcfb1..00000000 --- a/endpoint/test_results_api/test/test_pagination_next_link.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.pagination_next_link import PaginationNextLink - -class TestPaginationNextLink(unittest.TestCase): - """PaginationNextLink unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationNextLink: - """Test PaginationNextLink - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationNextLink` - """ - model = PaginationNextLink() - if include_optional: - return PaginationNextLink( - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationNextLink( - ) - """ - - def testPaginationNextLink(self): - """Test PaginationNextLink""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_pagination_next_link_links.py b/endpoint/test_results_api/test/test_pagination_next_link_links.py deleted file mode 100644 index c311c90e..00000000 --- a/endpoint/test_results_api/test/test_pagination_next_link_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks - -class TestPaginationNextLinkLinks(unittest.TestCase): - """PaginationNextLinkLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationNextLinkLinks: - """Test PaginationNextLinkLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationNextLinkLinks` - """ - model = PaginationNextLinkLinks() - if include_optional: - return PaginationNextLinkLinks( - next = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationNextLinkLinks( - ) - """ - - def testPaginationNextLinkLinks(self): - """Test PaginationNextLinkLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_base_test_result.py b/endpoint/test_results_api/test/test_path_vis_base_test_result.py deleted file mode 100644 index 1502aca0..00000000 --- a/endpoint/test_results_api/test/test_path_vis_base_test_result.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult - -class TestPathVisBaseTestResult(unittest.TestCase): - """PathVisBaseTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisBaseTestResult: - """Test PathVisBaseTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisBaseTestResult` - """ - model = PathVisBaseTestResult() - if include_optional: - return PathVisBaseTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - asn_details = test_results_api.models.asn_details.AsnDetails( - as_name = 'ThousandEyes, Inc', - as_number = 394101, ), - server = 'www.google.com:443', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20' - ) - else: - return PathVisBaseTestResult( - ) - """ - - def testPathVisBaseTestResult(self): - """Test PathVisBaseTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_result.py b/endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_result.py deleted file mode 100644 index 833d5a93..00000000 --- a/endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_result.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult - -class TestPathVisDetailDynamicTestResult(unittest.TestCase): - """PathVisDetailDynamicTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDetailDynamicTestResult: - """Test PathVisDetailDynamicTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDetailDynamicTestResult` - """ - model = PathVisDetailDynamicTestResult() - if include_optional: - return PathVisDetailDynamicTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - asn_details = test_results_api.models.asn_details.AsnDetails( - as_name = 'ThousandEyes, Inc', - as_number = 394101, ), - server = 'www.google.com:443', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - routes = [ - test_results_api.models.path_vis_route.PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - null - ], ) - ], - vpn_routes = [ - test_results_api.models.path_vis_route.PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - null - ], ) - ], - application = 'webex', - webex = test_results_api.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( - conference_id = '225817074608419375', - correlation_id = '22581707460321454', ) - ) - else: - return PathVisDetailDynamicTestResult( - ) - """ - - def testPathVisDetailDynamicTestResult(self): - """Test PathVisDetailDynamicTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_results.py b/endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_results.py deleted file mode 100644 index c1391cf0..00000000 --- a/endpoint/test_results_api/test/test_path_vis_detail_dynamic_test_results.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults - -class TestPathVisDetailDynamicTestResults(unittest.TestCase): - """PathVisDetailDynamicTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDetailDynamicTestResults: - """Test PathVisDetailDynamicTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDetailDynamicTestResults` - """ - model = PathVisDetailDynamicTestResults() - if include_optional: - return PathVisDetailDynamicTestResults( - results = [ - null - ], - test = test_results_api.models.dynamic_test.DynamicTest( - _links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ) - ) - else: - return PathVisDetailDynamicTestResults( - ) - """ - - def testPathVisDetailDynamicTestResults(self): - """Test PathVisDetailDynamicTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_detail_test_result.py b/endpoint/test_results_api/test/test_path_vis_detail_test_result.py deleted file mode 100644 index 38f2363f..00000000 --- a/endpoint/test_results_api/test/test_path_vis_detail_test_result.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult - -class TestPathVisDetailTestResult(unittest.TestCase): - """PathVisDetailTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDetailTestResult: - """Test PathVisDetailTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDetailTestResult` - """ - model = PathVisDetailTestResult() - if include_optional: - return PathVisDetailTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - asn_details = test_results_api.models.asn_details.AsnDetails( - as_name = 'ThousandEyes, Inc', - as_number = 394101, ), - server = 'www.google.com:443', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - routes = [ - test_results_api.models.path_vis_route.PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - null - ], ) - ], - vpn_routes = [ - test_results_api.models.path_vis_route.PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - null - ], ) - ] - ) - else: - return PathVisDetailTestResult( - ) - """ - - def testPathVisDetailTestResult(self): - """Test PathVisDetailTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_detail_test_results.py b/endpoint/test_results_api/test/test_path_vis_detail_test_results.py deleted file mode 100644 index f3b60df7..00000000 --- a/endpoint/test_results_api/test/test_path_vis_detail_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults - -class TestPathVisDetailTestResults(unittest.TestCase): - """PathVisDetailTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDetailTestResults: - """Test PathVisDetailTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDetailTestResults` - """ - model = PathVisDetailTestResults() - if include_optional: - return PathVisDetailTestResults( - results = [ - null - ], - test = None - ) - else: - return PathVisDetailTestResults( - ) - """ - - def testPathVisDetailTestResults(self): - """Test PathVisDetailTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_dynamic_test_result.py b/endpoint/test_results_api/test/test_path_vis_dynamic_test_result.py deleted file mode 100644 index c0c23ece..00000000 --- a/endpoint/test_results_api/test/test_path_vis_dynamic_test_result.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_dynamic_test_result import PathVisDynamicTestResult - -class TestPathVisDynamicTestResult(unittest.TestCase): - """PathVisDynamicTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDynamicTestResult: - """Test PathVisDynamicTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDynamicTestResult` - """ - model = PathVisDynamicTestResult() - if include_optional: - return PathVisDynamicTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - asn_details = test_results_api.models.asn_details.AsnDetails( - as_name = 'ThousandEyes, Inc', - as_number = 394101, ), - server = 'www.google.com:443', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - application = 'webex', - webex = test_results_api.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( - conference_id = '225817074608419375', - correlation_id = '22581707460321454', ), - location = 'San Francisco Area', - endpoints = [ - test_results_api.models.path_vis_endpoint.PathVisEndpoint( - ip_address = '196.40.106.237', - number_of_hops = 15, - path_id = '1230899668701775614109128428722974545787322404682781961521', - response_time = 1500, ) - ] - ) - else: - return PathVisDynamicTestResult( - ) - """ - - def testPathVisDynamicTestResult(self): - """Test PathVisDynamicTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_dynamic_test_results.py b/endpoint/test_results_api/test/test_path_vis_dynamic_test_results.py deleted file mode 100644 index ae2131b5..00000000 --- a/endpoint/test_results_api/test/test_path_vis_dynamic_test_results.py +++ /dev/null @@ -1,73 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_dynamic_test_results import PathVisDynamicTestResults - -class TestPathVisDynamicTestResults(unittest.TestCase): - """PathVisDynamicTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDynamicTestResults: - """Test PathVisDynamicTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDynamicTestResults` - """ - model = PathVisDynamicTestResults() - if include_optional: - return PathVisDynamicTestResults( - results = [ - null - ], - test = test_results_api.models.dynamic_test.DynamicTest( - _links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ) - ) - else: - return PathVisDynamicTestResults( - ) - """ - - def testPathVisDynamicTestResults(self): - """Test PathVisDynamicTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_endpoint.py b/endpoint/test_results_api/test/test_path_vis_endpoint.py deleted file mode 100644 index 72b679d9..00000000 --- a/endpoint/test_results_api/test/test_path_vis_endpoint.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_endpoint import PathVisEndpoint - -class TestPathVisEndpoint(unittest.TestCase): - """PathVisEndpoint unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisEndpoint: - """Test PathVisEndpoint - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisEndpoint` - """ - model = PathVisEndpoint() - if include_optional: - return PathVisEndpoint( - ip_address = '196.40.106.237', - number_of_hops = 15, - path_id = '1230899668701775614109128428722974545787322404682781961521', - response_time = 1500 - ) - else: - return PathVisEndpoint( - ) - """ - - def testPathVisEndpoint(self): - """Test PathVisEndpoint""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_hop.py b/endpoint/test_results_api/test/test_path_vis_hop.py deleted file mode 100644 index e6a2b622..00000000 --- a/endpoint/test_results_api/test/test_path_vis_hop.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_hop import PathVisHop - -class TestPathVisHop(unittest.TestCase): - """PathVisHop unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisHop: - """Test PathVisHop - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisHop` - """ - model = PathVisHop() - if include_optional: - return PathVisHop( - hop = 1, - ip_address = '196.40.106.237', - prefix = '196.40.96.0/20', - rdns = 'core-router1.cpt2.host-h.net', - network = 'HETZNER (Pty) Ltd (AS 37153)', - response_time = 1, - location = 'Cape Town, South Africa' - ) - else: - return PathVisHop( - ) - """ - - def testPathVisHop(self): - """Test PathVisHop""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_route.py b/endpoint/test_results_api/test/test_path_vis_route.py deleted file mode 100644 index cfe25dbb..00000000 --- a/endpoint/test_results_api/test/test_path_vis_route.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_route import PathVisRoute - -class TestPathVisRoute(unittest.TestCase): - """PathVisRoute unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisRoute: - """Test PathVisRoute - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisRoute` - """ - model = PathVisRoute() - if include_optional: - return PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - null - ] - ) - else: - return PathVisRoute( - ) - """ - - def testPathVisRoute(self): - """Test PathVisRoute""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_test_result.py b/endpoint/test_results_api/test/test_path_vis_test_result.py deleted file mode 100644 index 60c0116b..00000000 --- a/endpoint/test_results_api/test/test_path_vis_test_result.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_test_result import PathVisTestResult - -class TestPathVisTestResult(unittest.TestCase): - """PathVisTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisTestResult: - """Test PathVisTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisTestResult` - """ - model = PathVisTestResult() - if include_optional: - return PathVisTestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ), - asn_details = test_results_api.models.asn_details.AsnDetails( - as_name = 'ThousandEyes, Inc', - as_number = 394101, ), - server = 'www.google.com:443', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - location = 'San Francisco Area', - endpoints = [ - test_results_api.models.path_vis_endpoint.PathVisEndpoint( - ip_address = '196.40.106.237', - number_of_hops = 15, - path_id = '1230899668701775614109128428722974545787322404682781961521', - response_time = 1500, ) - ] - ) - else: - return PathVisTestResult( - ) - """ - - def testPathVisTestResult(self): - """Test PathVisTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_path_vis_test_results.py b/endpoint/test_results_api/test/test_path_vis_test_results.py deleted file mode 100644 index e2113c28..00000000 --- a/endpoint/test_results_api/test/test_path_vis_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_test_results import PathVisTestResults - -class TestPathVisTestResults(unittest.TestCase): - """PathVisTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisTestResults: - """Test PathVisTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisTestResults` - """ - model = PathVisTestResults() - if include_optional: - return PathVisTestResults( - results = [ - null - ], - test = None - ) - else: - return PathVisTestResults( - ) - """ - - def testPathVisTestResults(self): - """Test PathVisTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_platform.py b/endpoint/test_results_api/test/test_platform.py deleted file mode 100644 index f3c750ba..00000000 --- a/endpoint/test_results_api/test/test_platform.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.platform import Platform - -class TestPlatform(unittest.TestCase): - """Platform unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPlatform(self): - """Test Platform""" - # inst = Platform() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_post_fetch_dynamic_test_result_metrics200_response.py b/endpoint/test_results_api/test/test_post_fetch_dynamic_test_result_metrics200_response.py deleted file mode 100644 index 6d55e9d1..00000000 --- a/endpoint/test_results_api/test/test_post_fetch_dynamic_test_result_metrics200_response.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response - -class TestPostFetchDynamicTestResultMetrics200Response(unittest.TestCase): - """PostFetchDynamicTestResultMetrics200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFetchDynamicTestResultMetrics200Response: - """Test PostFetchDynamicTestResultMetrics200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFetchDynamicTestResultMetrics200Response` - """ - model = PostFetchDynamicTestResultMetrics200Response() - if include_optional: - return PostFetchDynamicTestResultMetrics200Response( - results = [ - null - ], - test = test_results_api.models.dynamic_test.DynamicTest( - _links = test_results_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = test_results_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ), - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PostFetchDynamicTestResultMetrics200Response( - ) - """ - - def testPostFetchDynamicTestResultMetrics200Response(self): - """Test PostFetchDynamicTestResultMetrics200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_query_window.py b/endpoint/test_results_api/test/test_query_window.py deleted file mode 100644 index 01e8c4e4..00000000 --- a/endpoint/test_results_api/test/test_query_window.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.query_window import QueryWindow - -class TestQueryWindow(unittest.TestCase): - """QueryWindow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryWindow: - """Test QueryWindow - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryWindow` - """ - model = QueryWindow() - if include_optional: - return QueryWindow( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z' - ) - else: - return QueryWindow( - ) - """ - - def testQueryWindow(self): - """Test QueryWindow""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_real_user_tests_results_api.py b/endpoint/test_results_api/test/test_real_user_tests_results_api.py deleted file mode 100644 index 0090b756..00000000 --- a/endpoint/test_results_api/test/test_real_user_tests_results_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_get_endpoint_real_user_test_details(self) -> None: - """Test case for get_endpoint_real_user_test_details - - Retrieve endpoint real user test - """ - pass - - def test_get_endpoint_real_user_test_pages_details(self) -> None: - """Test case for get_endpoint_real_user_test_pages_details - - Retrieve endpoint real user test page - """ - pass - - def test_get_endpoint_real_user_tests(self) -> None: - """Test case for get_endpoint_real_user_tests - - List endpoint real user tests - """ - pass - - def test_get_endpoint_real_user_tests_network(self) -> None: - """Test case for get_endpoint_real_user_tests_network - - List endpoint real user tests - """ - pass - - def test_get_endpoint_real_user_tests_pages(self) -> None: - """Test case for get_endpoint_real_user_tests_pages - - List endpoint real user tests visited pages - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_self_links.py b/endpoint/test_results_api/test/test_self_links.py deleted file mode 100644 index 94f1acf8..00000000 --- a/endpoint/test_results_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_self_links_links.py b/endpoint/test_results_api/test/test_self_links_links.py deleted file mode 100644 index 1769f256..00000000 --- a/endpoint/test_results_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_sort_order.py b/endpoint/test_results_api/test/test_sort_order.py deleted file mode 100644 index 8688393f..00000000 --- a/endpoint/test_results_api/test/test_sort_order.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.sort_order import SortOrder - -class TestSortOrder(unittest.TestCase): - """SortOrder unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSortOrder(self): - """Test SortOrder""" - # inst = SortOrder() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_specific_agents_selector_type.py b/endpoint/test_results_api/test/test_specific_agents_selector_type.py deleted file mode 100644 index 4206cbe2..00000000 --- a/endpoint/test_results_api/test/test_specific_agents_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.specific_agents_selector_type import SpecificAgentsSelectorType - -class TestSpecificAgentsSelectorType(unittest.TestCase): - """SpecificAgentsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSpecificAgentsSelectorType(self): - """Test SpecificAgentsSelectorType""" - # inst = SpecificAgentsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_test_interval.py b/endpoint/test_results_api/test/test_test_interval.py deleted file mode 100644 index 9be55da4..00000000 --- a/endpoint/test_results_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_test_probe_mode.py b/endpoint/test_results_api/test/test_test_probe_mode.py deleted file mode 100644 index 8f44863a..00000000 --- a/endpoint/test_results_api/test/test_test_probe_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_probe_mode import TestProbeMode - -class TestTestProbeMode(unittest.TestCase): - """TestProbeMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProbeMode(self): - """Test TestProbeMode""" - # inst = TestProbeMode() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_test_result.py b/endpoint/test_results_api/test/test_test_result.py deleted file mode 100644 index d0c8de7b..00000000 --- a/endpoint/test_results_api/test/test_test_result.py +++ /dev/null @@ -1,81 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_result import TestResult - -class TestTestResult(unittest.TestCase): - """TestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestResult: - """Test TestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestResult` - """ - model = TestResult() - if include_optional: - return TestResult( - agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), - round_id = 1384309800, - server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( - start_time_ms = 1581508857327, - end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( - min = 0.22, - max = 0.75, - mean = 0.55, - median = 0.61, - std_dev = 0.01, - count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( - min = 1.2, - max = 2.5, - mean = 1.77, - median = 1.85, - std_dev = 0.25, - count = 155, ), - physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( - vpn_client_addresses = ["184.81.113.85","13.129.91.62"], - vpn_client_network_range = [ - '9.88.37.27' - ], - vpn_gateway_address = '120.98.134.7', - vpn_type = 'cisco-anyconnect', ) - ) - else: - return TestResult( - ) - """ - - def testTestResult(self): - """Test TestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_test_ssl_version_id.py b/endpoint/test_results_api/test/test_test_ssl_version_id.py deleted file mode 100644 index e65b6e57..00000000 --- a/endpoint/test_results_api/test/test_test_ssl_version_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_ssl_version_id import TestSslVersionId - -class TestTestSslVersionId(unittest.TestCase): - """TestSslVersionId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestSslVersionId(self): - """Test TestSslVersionId""" - # inst = TestSslVersionId() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_threshold_filter_operator.py b/endpoint/test_results_api/test/test_threshold_filter_operator.py deleted file mode 100644 index fd28d351..00000000 --- a/endpoint/test_results_api/test/test_threshold_filter_operator.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.threshold_filter_operator import ThresholdFilterOperator - -class TestThresholdFilterOperator(unittest.TestCase): - """ThresholdFilterOperator unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testThresholdFilterOperator(self): - """Test ThresholdFilterOperator""" - # inst = ThresholdFilterOperator() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_unauthorized_error.py b/endpoint/test_results_api/test/test_unauthorized_error.py deleted file mode 100644 index 3faf03af..00000000 --- a/endpoint/test_results_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_vpn_type.py b/endpoint/test_results_api/test/test_vpn_type.py deleted file mode 100644 index 8cc77c3b..00000000 --- a/endpoint/test_results_api/test/test_vpn_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.vpn_type import VpnType - -class TestVpnType(unittest.TestCase): - """VpnType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVpnType(self): - """Test VpnType""" - # inst = VpnType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test/test_web_http_server_scheduled_test_results_api.py b/endpoint/test_results_api/test/test_web_http_server_scheduled_test_results_api.py deleted file mode 100644 index c1d3fb28..00000000 --- a/endpoint/test_results_api/test/test_web_http_server_scheduled_test_results_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_test_result_http_server(self) -> None: - """Test case for get_test_result_http_server - - Retrieve HTTP server scheduled test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/test_results_api/test_results_api/__init__.py b/endpoint/test_results_api/test_results_api/__init__.py deleted file mode 100644 index 12e177ca..00000000 --- a/endpoint/test_results_api/test_results_api/__init__.py +++ /dev/null @@ -1,185 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Endpoint Test Results API - - Retrieve results for scheduled and dynamic tests on endpoint agents. - - The version of the OpenAPI document: 7.0.0 - 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 test_results_api.api.local_network_tests_results_api import LocalNetworkTestsResultsApi -from test_results_api.api.network_dynamic_tests_results_api import NetworkDynamicTestsResultsApi -from test_results_api.api.network_scheduled_tests_results_api import NetworkScheduledTestsResultsApi -from test_results_api.api.real_user_tests_results_api import RealUserTestsResultsApi -from test_results_api.api.web_http_server_scheduled_test_results_api import WebHTTPServerScheduledTestResultsApi - -# import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.api_client import ApiClient -from test_results_api.configuration import Configuration -from test_results_api.exceptions import OpenApiException -from test_results_api.exceptions import ApiTypeError -from test_results_api.exceptions import ApiValueError -from test_results_api.exceptions import ApiKeyError -from test_results_api.exceptions import ApiAttributeError -from test_results_api.exceptions import ApiException - -# import models into sdk package -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.agent_labels_selector_type import AgentLabelsSelectorType -from test_results_api.models.all_agents_selector_type import AllAgentsSelectorType -from test_results_api.models.application_score_quality import ApplicationScoreQuality -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.conditional_operator import ConditionalOperator -from test_results_api.models.cpu_utilization import CpuUtilization -from test_results_api.models.dynamic_base_test_result import DynamicBaseTestResult -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.dynamic_test_application import DynamicTestApplication -from test_results_api.models.dynamic_test_links import DynamicTestLinks -from test_results_api.models.dynamic_test_links_self import DynamicTestLinksSelf -from test_results_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults -from test_results_api.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch -from test_results_api.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter -from test_results_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from test_results_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from test_results_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from test_results_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from test_results_api.models.endpoint_browser import EndpointBrowser -from test_results_api.models.endpoint_http_data_point_score import EndpointHttpDataPointScore -from test_results_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest -from test_results_api.models.endpoint_http_server_type import EndpointHttpServerType -from test_results_api.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter -from test_results_api.models.endpoint_ping_data_point_score import EndpointPingDataPointScore -from test_results_api.models.endpoint_real_user_test import EndpointRealUserTest -from test_results_api.models.endpoint_real_user_test_base import EndpointRealUserTestBase -from test_results_api.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail -from test_results_api.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter -from test_results_api.models.endpoint_real_user_test_results import EndpointRealUserTestResults -from test_results_api.models.endpoint_result_request_filter import EndpointResultRequestFilter -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from test_results_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from test_results_api.models.endpoint_test import EndpointTest -from test_results_api.models.endpoint_test_aid import EndpointTestAid -from test_results_api.models.endpoint_test_auth_type import EndpointTestAuthType -from test_results_api.models.endpoint_test_links import EndpointTestLinks -from test_results_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from test_results_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.error import Error -from test_results_api.models.ethernet_profile import EthernetProfile -from test_results_api.models.expand import Expand -from test_results_api.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response -from test_results_api.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response -from test_results_api.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response -from test_results_api.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response -from test_results_api.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response -from test_results_api.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest -from test_results_api.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response -from test_results_api.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response -from test_results_api.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response -from test_results_api.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response -from test_results_api.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response -from test_results_api.models.hop import Hop -from test_results_api.models.http_error_type import HttpErrorType -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders -from test_results_api.models.http_test_results import HttpTestResults -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -from test_results_api.models.link import Link -from test_results_api.models.local_network_result import LocalNetworkResult -from test_results_api.models.local_network_results import LocalNetworkResults -from test_results_api.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults -from test_results_api.models.local_network_topology_result import LocalNetworkTopologyResult -from test_results_api.models.local_network_topology_result_base import LocalNetworkTopologyResultBase -from test_results_api.models.local_network_topology_results import LocalNetworkTopologyResults -from test_results_api.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults -from test_results_api.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch -from test_results_api.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter -from test_results_api.models.network_dynamic_test_result import NetworkDynamicTestResult -from test_results_api.models.network_dynamic_test_results import NetworkDynamicTestResults -from test_results_api.models.network_interface import NetworkInterface -from test_results_api.models.network_metrics import NetworkMetrics -from test_results_api.models.network_ping import NetworkPing -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.network_proxy_profile import NetworkProxyProfile -from test_results_api.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.network_test_results import NetworkTestResults -from test_results_api.models.network_topology_type import NetworkTopologyType -from test_results_api.models.network_wireless_profile import NetworkWirelessProfile -from test_results_api.models.pagination_next_link import PaginationNextLink -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult -from test_results_api.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult -from test_results_api.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults -from test_results_api.models.path_vis_dynamic_test_result import PathVisDynamicTestResult -from test_results_api.models.path_vis_dynamic_test_results import PathVisDynamicTestResults -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.path_vis_hop import PathVisHop -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.path_vis_test_results import PathVisTestResults -from test_results_api.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes -from test_results_api.models.platform import Platform -from test_results_api.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response -from test_results_api.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response -from test_results_api.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response -from test_results_api.models.query_window import QueryWindow -from test_results_api.models.real_user_test_coordinates import RealUserTestCoordinates -from test_results_api.models.real_user_test_network import RealUserTestNetwork -from test_results_api.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing -from test_results_api.models.real_user_test_network_ping import RealUserTestNetworkPing -from test_results_api.models.real_user_test_network_result import RealUserTestNetworkResult -from test_results_api.models.real_user_test_network_results import RealUserTestNetworkResults -from test_results_api.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute -from test_results_api.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing -from test_results_api.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute -from test_results_api.models.real_user_test_page import RealUserTestPage -from test_results_api.models.real_user_test_page_page_timings import RealUserTestPagePageTimings -from test_results_api.models.real_user_test_page_result import RealUserTestPageResult -from test_results_api.models.real_user_test_page_results import RealUserTestPageResults -from test_results_api.models.self_links import SelfLinks -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.sort_order import SortOrder -from test_results_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.tcp_connect import TcpConnect -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_probe_mode import TestProbeMode -from test_results_api.models.test_result import TestResult -from test_results_api.models.test_ssl_version_id import TestSslVersionId -from test_results_api.models.tests_data_rounds_search import TestsDataRoundsSearch -from test_results_api.models.tests_data_search_filter import TestsDataSearchFilter -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort -from test_results_api.models.tests_data_search_sort_key import TestsDataSearchSortKey -from test_results_api.models.tests_data_threshold_filter import TestsDataThresholdFilter -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters -from test_results_api.models.threshold_filter_name import ThresholdFilterName -from test_results_api.models.threshold_filter_operator import ThresholdFilterOperator -from test_results_api.models.traceroute import Traceroute -from test_results_api.models.traceroute_hop import TracerouteHop -from test_results_api.models.trigger import Trigger -from test_results_api.models.unauthorized_error import UnauthorizedError -from test_results_api.models.vpn_profile import VpnProfile -from test_results_api.models.vpn_type import VpnType diff --git a/endpoint/test_results_api/test_results_api/api/__init__.py b/endpoint/test_results_api/test_results_api/api/__init__.py deleted file mode 100644 index b4880ee2..00000000 --- a/endpoint/test_results_api/test_results_api/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from test_results_api.api.local_network_tests_results_api import LocalNetworkTestsResultsApi -from test_results_api.api.network_dynamic_tests_results_api import NetworkDynamicTestsResultsApi -from test_results_api.api.network_scheduled_tests_results_api import NetworkScheduledTestsResultsApi -from test_results_api.api.real_user_tests_results_api import RealUserTestsResultsApi -from test_results_api.api.web_http_server_scheduled_test_results_api import WebHTTPServerScheduledTestResultsApi - diff --git a/endpoint/test_results_api/test_results_api/api_client.py b/endpoint/test_results_api/test_results_api/api_client.py deleted file mode 100644 index 7a860bea..00000000 --- a/endpoint/test_results_api/test_results_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from test_results_api.configuration import Configuration -from test_results_api.api_response import ApiResponse -import test_results_api.models -from test_results_api import rest -from test_results_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(test_results_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/endpoint/test_results_api/test_results_api/api_response.py b/endpoint/test_results_api/test_results_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/endpoint/test_results_api/test_results_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/endpoint/test_results_api/test_results_api/configuration.py b/endpoint/test_results_api/test_results_api/configuration.py deleted file mode 100644 index 29527d84..00000000 --- a/endpoint/test_results_api/test_results_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("test_results_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/endpoint/test_results_api/test_results_api/exceptions.py b/endpoint/test_results_api/test_results_api/exceptions.py deleted file mode 100644 index 9829a230..00000000 --- a/endpoint/test_results_api/test_results_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/endpoint/test_results_api/test_results_api/models/__init__.py b/endpoint/test_results_api/test_results_api/models/__init__.py deleted file mode 100644 index 1b79ff2d..00000000 --- a/endpoint/test_results_api/test_results_api/models/__init__.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Endpoint Test Results API - - Retrieve results for scheduled and dynamic tests on endpoint agents. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.agent_labels_selector_type import AgentLabelsSelectorType -from test_results_api.models.all_agents_selector_type import AllAgentsSelectorType -from test_results_api.models.application_score_quality import ApplicationScoreQuality -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.conditional_operator import ConditionalOperator -from test_results_api.models.cpu_utilization import CpuUtilization -from test_results_api.models.dynamic_base_test_result import DynamicBaseTestResult -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.dynamic_test_application import DynamicTestApplication -from test_results_api.models.dynamic_test_links import DynamicTestLinks -from test_results_api.models.dynamic_test_links_self import DynamicTestLinksSelf -from test_results_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults -from test_results_api.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch -from test_results_api.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter -from test_results_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from test_results_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from test_results_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from test_results_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from test_results_api.models.endpoint_browser import EndpointBrowser -from test_results_api.models.endpoint_http_data_point_score import EndpointHttpDataPointScore -from test_results_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest -from test_results_api.models.endpoint_http_server_type import EndpointHttpServerType -from test_results_api.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter -from test_results_api.models.endpoint_ping_data_point_score import EndpointPingDataPointScore -from test_results_api.models.endpoint_real_user_test import EndpointRealUserTest -from test_results_api.models.endpoint_real_user_test_base import EndpointRealUserTestBase -from test_results_api.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail -from test_results_api.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter -from test_results_api.models.endpoint_real_user_test_results import EndpointRealUserTestResults -from test_results_api.models.endpoint_result_request_filter import EndpointResultRequestFilter -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from test_results_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from test_results_api.models.endpoint_test import EndpointTest -from test_results_api.models.endpoint_test_aid import EndpointTestAid -from test_results_api.models.endpoint_test_auth_type import EndpointTestAuthType -from test_results_api.models.endpoint_test_links import EndpointTestLinks -from test_results_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from test_results_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.error import Error -from test_results_api.models.ethernet_profile import EthernetProfile -from test_results_api.models.expand import Expand -from test_results_api.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response -from test_results_api.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response -from test_results_api.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response -from test_results_api.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response -from test_results_api.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response -from test_results_api.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest -from test_results_api.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response -from test_results_api.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response -from test_results_api.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response -from test_results_api.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response -from test_results_api.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response -from test_results_api.models.hop import Hop -from test_results_api.models.http_error_type import HttpErrorType -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders -from test_results_api.models.http_test_results import HttpTestResults -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -from test_results_api.models.link import Link -from test_results_api.models.local_network_result import LocalNetworkResult -from test_results_api.models.local_network_results import LocalNetworkResults -from test_results_api.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults -from test_results_api.models.local_network_topology_result import LocalNetworkTopologyResult -from test_results_api.models.local_network_topology_result_base import LocalNetworkTopologyResultBase -from test_results_api.models.local_network_topology_results import LocalNetworkTopologyResults -from test_results_api.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults -from test_results_api.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch -from test_results_api.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter -from test_results_api.models.network_dynamic_test_result import NetworkDynamicTestResult -from test_results_api.models.network_dynamic_test_results import NetworkDynamicTestResults -from test_results_api.models.network_interface import NetworkInterface -from test_results_api.models.network_metrics import NetworkMetrics -from test_results_api.models.network_ping import NetworkPing -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.network_proxy_profile import NetworkProxyProfile -from test_results_api.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.network_test_results import NetworkTestResults -from test_results_api.models.network_topology_type import NetworkTopologyType -from test_results_api.models.network_wireless_profile import NetworkWirelessProfile -from test_results_api.models.pagination_next_link import PaginationNextLink -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult -from test_results_api.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult -from test_results_api.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults -from test_results_api.models.path_vis_dynamic_test_result import PathVisDynamicTestResult -from test_results_api.models.path_vis_dynamic_test_results import PathVisDynamicTestResults -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.path_vis_hop import PathVisHop -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.path_vis_test_results import PathVisTestResults -from test_results_api.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes -from test_results_api.models.platform import Platform -from test_results_api.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response -from test_results_api.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response -from test_results_api.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response -from test_results_api.models.query_window import QueryWindow -from test_results_api.models.real_user_test_coordinates import RealUserTestCoordinates -from test_results_api.models.real_user_test_network import RealUserTestNetwork -from test_results_api.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing -from test_results_api.models.real_user_test_network_ping import RealUserTestNetworkPing -from test_results_api.models.real_user_test_network_result import RealUserTestNetworkResult -from test_results_api.models.real_user_test_network_results import RealUserTestNetworkResults -from test_results_api.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute -from test_results_api.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing -from test_results_api.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute -from test_results_api.models.real_user_test_page import RealUserTestPage -from test_results_api.models.real_user_test_page_page_timings import RealUserTestPagePageTimings -from test_results_api.models.real_user_test_page_result import RealUserTestPageResult -from test_results_api.models.real_user_test_page_results import RealUserTestPageResults -from test_results_api.models.self_links import SelfLinks -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.sort_order import SortOrder -from test_results_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.tcp_connect import TcpConnect -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_probe_mode import TestProbeMode -from test_results_api.models.test_result import TestResult -from test_results_api.models.test_ssl_version_id import TestSslVersionId -from test_results_api.models.tests_data_rounds_search import TestsDataRoundsSearch -from test_results_api.models.tests_data_search_filter import TestsDataSearchFilter -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort -from test_results_api.models.tests_data_search_sort_key import TestsDataSearchSortKey -from test_results_api.models.tests_data_threshold_filter import TestsDataThresholdFilter -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters -from test_results_api.models.threshold_filter_name import ThresholdFilterName -from test_results_api.models.threshold_filter_operator import ThresholdFilterOperator -from test_results_api.models.traceroute import Traceroute -from test_results_api.models.traceroute_hop import TracerouteHop -from test_results_api.models.trigger import Trigger -from test_results_api.models.unauthorized_error import UnauthorizedError -from test_results_api.models.vpn_profile import VpnProfile -from test_results_api.models.vpn_type import VpnType diff --git a/endpoint/test_results_api/test_results_api/models/account_group_id.py b/endpoint/test_results_api/test_results_api/models/account_group_id.py deleted file mode 100644 index 0bcef6ba..00000000 --- a/endpoint/test_results_api/test_results_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/agent_labels_selector_type.py b/endpoint/test_results_api/test_results_api/models/agent_labels_selector_type.py deleted file mode 100644 index d28f5dd6..00000000 --- a/endpoint/test_results_api/test_results_api/models/agent_labels_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentLabelsSelectorType(str, Enum): - """ - AgentLabelsSelectorType - """ - - """ - allowed enum values - """ - AGENT_MINUS_LABELS = 'agent-labels' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentLabelsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/all_agents_selector_type.py b/endpoint/test_results_api/test_results_api/models/all_agents_selector_type.py deleted file mode 100644 index c612827a..00000000 --- a/endpoint/test_results_api/test_results_api/models/all_agents_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AllAgentsSelectorType(str, Enum): - """ - AllAgentsSelectorType - """ - - """ - allowed enum values - """ - ALL_MINUS_AGENTS = 'all-agents' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AllAgentsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/conditional_operator.py b/endpoint/test_results_api/test_results_api/models/conditional_operator.py deleted file mode 100644 index a7f8de58..00000000 --- a/endpoint/test_results_api/test_results_api/models/conditional_operator.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class ConditionalOperator(str, Enum): - """ - ConditionalOperator - """ - - """ - allowed enum values - """ - AND = 'and' - OR = 'or' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ConditionalOperator from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_base_test_result.py b/endpoint/test_results_api/test_results_api/models/dynamic_base_test_result.py deleted file mode 100644 index f72843ab..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_base_test_result.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex -from test_results_api.models.dynamic_test_application import DynamicTestApplication -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicBaseTestResult(BaseModel): - """ - DynamicBaseTestResult - """ # noqa: E501 - application: Optional[DynamicTestApplication] = None - webex: Optional[DynamicBaseTestResultWebex] = None - __properties: ClassVar[List[str]] = ["application", "webex"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicBaseTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of webex - if self.webex: - _dict['webex'] = self.webex.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicBaseTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "application": obj.get("application"), - "webex": DynamicBaseTestResultWebex.from_dict(obj.get("webex")) if obj.get("webex") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_base_test_result_webex.py b/endpoint/test_results_api/test_results_api/models/dynamic_base_test_result_webex.py deleted file mode 100644 index 809cfb90..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_base_test_result_webex.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicBaseTestResultWebex(BaseModel): - """ - Contains object with webex conference information. Only returned when `application` == `webex`. - """ # noqa: E501 - conference_id: Optional[StrictStr] = Field(default=None, description="Webex conference ID.", alias="conferenceId") - correlation_id: Optional[StrictStr] = Field(default=None, description="Webex conference correlation ID.", alias="correlationId") - __properties: ClassVar[List[str]] = ["conferenceId", "correlationId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicBaseTestResultWebex 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "conference_id", - "correlation_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicBaseTestResultWebex from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "conferenceId": obj.get("conferenceId"), - "correlationId": obj.get("correlationId") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_test.py b/endpoint/test_results_api/test_results_api/models/dynamic_test.py deleted file mode 100644 index 1df6d113..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_test.py +++ /dev/null @@ -1,148 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from test_results_api.models.dynamic_test_application import DynamicTestApplication -from test_results_api.models.dynamic_test_links import DynamicTestLinks -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from test_results_api.models.endpoint_test_aid import EndpointTestAid -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_probe_mode import TestProbeMode -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTest(BaseModel): - """ - DynamicTest - """ # noqa: E501 - links: Optional[DynamicTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - application: Optional[DynamicTestApplication] = None - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - network_measurements: Optional[StrictBool] = Field(default=None, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") - protocol: Optional[EndpointTestProtocol] = None - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "aid", "testName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "has_path_trace_in_session", - "modified_date", - "network_measurements", - "tcp_probe_mode", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DynamicTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "application": obj.get("application"), - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements"), - "protocol": obj.get("protocol"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_test_application.py b/endpoint/test_results_api/test_results_api/models/dynamic_test_application.py deleted file mode 100644 index 72b73b03..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_test_application.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DynamicTestApplication(str, Enum): - """ - Which supported application to monitor. - """ - - """ - allowed enum values - """ - MICROSOFT_MINUS_TEAMS = 'microsoft-teams' - WEBEX = 'webex' - ZOOM = 'zoom' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestApplication from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_test_links.py b/endpoint/test_results_api/test_results_api/models/dynamic_test_links.py deleted file mode 100644 index d45a7ff8..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dynamic_test_links_self import DynamicTestLinksSelf -from test_results_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information. - """ # noqa: E501 - var_self: Optional[DynamicTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[DynamicTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": DynamicTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": DynamicTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_test_links_self.py b/endpoint/test_results_api/test_results_api/models/dynamic_test_links_self.py deleted file mode 100644 index 22393455..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTestLinksSelf(BaseModel): - """ - DynamicTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTestLinksSelf 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/endpoint/test_results_api/test_results_api/models/dynamic_test_links_test_results.py b/endpoint/test_results_api/test_results_api/models/dynamic_test_links_test_results.py deleted file mode 100644 index 6f802ab0..00000000 --- a/endpoint/test_results_api/test_results_api/models/dynamic_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from test_results_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -DYNAMICTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class DynamicTestLinksTestResults(BaseModel): - """ - DynamicTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = DynamicTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_agent_labels_selector_config.py b/endpoint/test_results_api/test_results_api/models/endpoint_agent_labels_selector_config.py deleted file mode 100644 index 455ab75a..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_agent_labels_selector_config.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from test_results_api.models.agent_labels_selector_type import AgentLabelsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentLabelsSelectorConfig(BaseModel): - """ - Agent labels selection object. - """ # noqa: E501 - agent_selector_type: Optional[AgentLabelsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "endpointAgentLabels"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentLabelsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentLabelsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines"), - "endpointAgentLabels": obj.get("endpointAgentLabels") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_agent_selector_config.py b/endpoint/test_results_api/test_results_api/models/endpoint_agent_selector_config.py deleted file mode 100644 index 58ab3eeb..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_agent_selector_config.py +++ /dev/null @@ -1,162 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from test_results_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from test_results_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from test_results_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -ENDPOINTAGENTSELECTORCONFIG_ONE_OF_SCHEMAS = ["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] - -class EndpointAgentSelectorConfig(BaseModel): - """ - Agents selection object based on agentSelectorType. - """ - # data type: EndpointAllAgentsSelectorConfig - oneof_schema_1_validator: Optional[EndpointAllAgentsSelectorConfig] = None - # data type: EndpointAgentLabelsSelectorConfig - oneof_schema_2_validator: Optional[EndpointAgentLabelsSelectorConfig] = None - # data type: EndpointSpecificAgentsSelectorConfig - oneof_schema_3_validator: Optional[EndpointSpecificAgentsSelectorConfig] = None - actual_instance: Optional[Union[EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]] = None - one_of_schemas: List[str] = Literal["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] - - model_config = { - "validate_assignment": True - } - - - discriminator_value_class_map: Dict[str, str] = { - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EndpointAgentSelectorConfig.model_construct() - error_messages = [] - match = 0 - # validate data type: EndpointAllAgentsSelectorConfig - if not isinstance(v, EndpointAllAgentsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAllAgentsSelectorConfig`") - else: - match += 1 - # validate data type: EndpointAgentLabelsSelectorConfig - if not isinstance(v, EndpointAgentLabelsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAgentLabelsSelectorConfig`") - else: - match += 1 - # validate data type: EndpointSpecificAgentsSelectorConfig - if not isinstance(v, EndpointSpecificAgentsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointSpecificAgentsSelectorConfig`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into EndpointAllAgentsSelectorConfig - try: - instance.actual_instance = EndpointAllAgentsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EndpointAgentLabelsSelectorConfig - try: - instance.actual_instance = EndpointAgentLabelsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EndpointSpecificAgentsSelectorConfig - try: - instance.actual_instance = EndpointSpecificAgentsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_test.py b/endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_test.py deleted file mode 100644 index d7e8eb97..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_test.py +++ /dev/null @@ -1,143 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from test_results_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from test_results_api.models.endpoint_test_aid import EndpointTestAid -from test_results_api.models.endpoint_test_links import EndpointTestLinks -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentToServerTest(BaseModel): - """ - EndpointAgentToServerTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointAgentToServerType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentToServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_type.py b/endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_type.py deleted file mode 100644 index 6ab19f0e..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_agent_to_server_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointAgentToServerType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_all_agents_selector_config.py b/endpoint/test_results_api/test_results_api/models/endpoint_all_agents_selector_config.py deleted file mode 100644 index 62c4f5cb..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_all_agents_selector_config.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from typing_extensions import Annotated -from test_results_api.models.all_agents_selector_type import AllAgentsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAllAgentsSelectorConfig(BaseModel): - """ - Any agent selection object. - """ # noqa: E501 - agent_selector_type: Optional[AllAgentsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAllAgentsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAllAgentsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_http_server_base_test.py b/endpoint/test_results_api/test_results_api/models/endpoint_http_server_base_test.py deleted file mode 100644 index ab79e97d..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_http_server_base_test.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.endpoint_test_auth_type import EndpointTestAuthType -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.test_probe_mode import TestProbeMode -from test_results_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerBaseTest(BaseModel): - """ - EndpointHttpServerBaseTest - """ # noqa: E501 - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - protocol: Optional[EndpointTestProtocol] = None - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") - __properties: ClassVar[List[str]] = ["authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerBaseTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerBaseTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authType": obj.get("authType"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "protocol": obj.get("protocol"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_http_server_test.py b/endpoint/test_results_api/test_results_api/models/endpoint_http_server_test.py deleted file mode 100644 index e8cae832..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_http_server_test.py +++ /dev/null @@ -1,179 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from test_results_api.models.endpoint_http_server_type import EndpointHttpServerType -from test_results_api.models.endpoint_test_aid import EndpointTestAid -from test_results_api.models.endpoint_test_auth_type import EndpointTestAuthType -from test_results_api.models.endpoint_test_links import EndpointTestLinks -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_probe_mode import TestProbeMode -from test_results_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerTest(BaseModel): - """ - EndpointHttpServerTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointHttpServerType] = None - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - 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") - 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") - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - "ssl_version", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type"), - "authType": obj.get("authType"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate"), - "contentRegex": obj.get("contentRegex"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "postBody": obj.get("postBody"), - "sslVersion": obj.get("sslVersion"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_http_server_type.py b/endpoint/test_results_api/test_results_api/models/endpoint_http_server_type.py deleted file mode 100644 index 168c452e..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_http_server_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointHttpServerType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - HTTP_MINUS_SERVER = 'http-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test_type.py b/endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test_type.py deleted file mode 100644 index 47d4a76b..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointScheduledTestType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - HTTP_MINUS_SERVER = 'http-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointScheduledTestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_specific_agents_selector_config.py b/endpoint/test_results_api/test_results_api/models/endpoint_specific_agents_selector_config.py deleted file mode 100644 index 9e6a9335..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_specific_agents_selector_config.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from test_results_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointSpecificAgentsSelectorConfig(BaseModel): - """ - Specific agents selection object. - """ # noqa: E501 - agent_selector_type: Optional[SpecificAgentsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointSpecificAgentsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointSpecificAgentsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines"), - "agents": obj.get("agents") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_test.py b/endpoint/test_results_api/test_results_api/models/endpoint_test.py deleted file mode 100644 index 5ea36746..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test.py +++ /dev/null @@ -1,143 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from test_results_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from test_results_api.models.endpoint_test_aid import EndpointTestAid -from test_results_api.models.endpoint_test_links import EndpointTestLinks -from test_results_api.models.endpoint_test_protocol import EndpointTestProtocol -from test_results_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTest(BaseModel): - """ - EndpointTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointScheduledTestType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_test_aid.py b/endpoint/test_results_api/test_results_api/models/endpoint_test_aid.py deleted file mode 100644 index eaa8bb97..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test_aid.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestAid(BaseModel): - """ - EndpointTestAid - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAid 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestAid 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") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_test_auth_type.py b/endpoint/test_results_api/test_results_api/models/endpoint_test_auth_type.py deleted file mode 100644 index dc372568..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test_auth_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestAuthType(str, Enum): - """ - HTTP authentication type. - """ - - """ - allowed enum values - """ - NONE = 'none' - BASIC = 'basic' - NTLM = 'ntlm' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAuthType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_test_links.py b/endpoint/test_results_api/test_results_api/models/endpoint_test_links.py deleted file mode 100644 index 618bc111..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from test_results_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information. - """ # noqa: E501 - var_self: Optional[EndpointTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[EndpointTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": EndpointTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": EndpointTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_test_links_self.py b/endpoint/test_results_api/test_results_api/models/endpoint_test_links_self.py deleted file mode 100644 index 34f3e71a..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestLinksSelf(BaseModel): - """ - EndpointTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestLinksSelf 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/endpoint/test_results_api/test_results_api/models/endpoint_test_links_test_results.py b/endpoint/test_results_api/test_results_api/models/endpoint_test_links_test_results.py deleted file mode 100644 index 33608ccc..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from test_results_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -ENDPOINTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class EndpointTestLinksTestResults(BaseModel): - """ - EndpointTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EndpointTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_test_protocol.py b/endpoint/test_results_api/test_results_api/models/endpoint_test_protocol.py deleted file mode 100644 index ca449403..00000000 --- a/endpoint/test_results_api/test_results_api/models/endpoint_test_protocol.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestProtocol(str, Enum): - """ - Protocol used to perform the test. - """ - - """ - allowed enum values - """ - ICMP = 'icmp' - ICMP_MINUS_WITH_MINUS_TCP_MINUS_CONNECT = 'icmp-with-tcp-connect' - TCP = 'tcp' - PREFER_MINUS_TCP = 'prefer-tcp' - AST_MINUS_AUTODETECT = 'ast-autodetect' - AUTODETECT = 'autodetect' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/error.py b/endpoint/test_results_api/test_results_api/models/error.py deleted file mode 100644 index a72b463e..00000000 --- a/endpoint/test_results_api/test_results_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/test_results_api/test_results_api/models/ethernet_profile.py b/endpoint/test_results_api/test_results_api/models/ethernet_profile.py deleted file mode 100644 index fa15b02f..00000000 --- a/endpoint/test_results_api/test_results_api/models/ethernet_profile.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EthernetProfile(BaseModel): - """ - EthernetProfile - """ # noqa: E501 - link_speed: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Ethernet profile link speed", alias="linkSpeed") - __properties: ClassVar[List[str]] = ["linkSpeed"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EthernetProfile 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "link_speed", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EthernetProfile from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "linkSpeed": obj.get("linkSpeed") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/expand.py b/endpoint/test_results_api/test_results_api/models/expand.py deleted file mode 100644 index 9077f003..00000000 --- a/endpoint/test_results_api/test_results_api/models/expand.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - HEADER = 'header' - - @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/endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_network_pathvis200_response.py b/endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_network_pathvis200_response.py deleted file mode 100644 index c58c9f3f..00000000 --- a/endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_network_pathvis200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.path_vis_dynamic_test_result import PathVisDynamicTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDynamicTestResultNetworkPathvis200Response(BaseModel): - """ - GetDynamicTestResultNetworkPathvis200Response - """ # noqa: E501 - results: Optional[List[PathVisDynamicTestResult]] = None - test: Optional[DynamicTest] = 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") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDynamicTestResultNetworkPathvis200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetDynamicTestResultNetworkPathvis200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDynamicTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": DynamicTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_pathvis_agent_round200_response.py b/endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_pathvis_agent_round200_response.py deleted file mode 100644 index 6270bce6..00000000 --- a/endpoint/test_results_api/test_results_api/models/get_dynamic_test_result_pathvis_agent_round200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDynamicTestResultPathvisAgentRound200Response(BaseModel): - """ - GetDynamicTestResultPathvisAgentRound200Response - """ # noqa: E501 - results: Optional[List[PathVisDetailDynamicTestResult]] = None - test: Optional[DynamicTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDynamicTestResultPathvisAgentRound200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetDynamicTestResultPathvisAgentRound200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDetailDynamicTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": DynamicTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/get_test_result_http_server200_response.py b/endpoint/test_results_api/test_results_api/models/get_test_result_http_server200_response.py deleted file mode 100644 index 7efaa5c6..00000000 --- a/endpoint/test_results_api/test_results_api/models/get_test_result_http_server200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultHttpServer200Response(BaseModel): - """ - GetTestResultHttpServer200Response - """ # noqa: E501 - results: Optional[List[HttpTestResult]] = None - test: Optional[EndpointHttpServerTest] = 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") - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultHttpServer200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultHttpServer200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [HttpTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointHttpServerTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py b/endpoint/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py deleted file mode 100644 index db23b026..00000000 --- a/endpoint/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultNetworkPathvis200Response(BaseModel): - """ - GetTestResultNetworkPathvis200Response - """ # noqa: E501 - results: Optional[List[PathVisTestResult]] = None - 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") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultNetworkPathvis200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultNetworkPathvis200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointScheduledTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/get_test_result_pathvis_agent_round200_response.py b/endpoint/test_results_api/test_results_api/models/get_test_result_pathvis_agent_round200_response.py deleted file mode 100644 index 3733b397..00000000 --- a/endpoint/test_results_api/test_results_api/models/get_test_result_pathvis_agent_round200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultPathvisAgentRound200Response(BaseModel): - """ - GetTestResultPathvisAgentRound200Response - """ # noqa: E501 - results: Optional[List[PathVisDetailTestResult]] = None - test: Optional[EndpointScheduledTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultPathvisAgentRound200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultPathvisAgentRound200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointScheduledTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/http_test_result.py b/endpoint/test_results_api/test_results_api/models/http_test_result.py deleted file mode 100644 index 15ed2fcf..00000000 --- a/endpoint/test_results_api/test_results_api/models/http_test_result.py +++ /dev/null @@ -1,179 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.http_error_type import HttpErrorType -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpTestResult(BaseModel): - """ - HttpTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of destination server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") - connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server in milliseconds.", alias="connectTime") - dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds.", alias="dnsTime") - error_type: Optional[HttpErrorType] = Field(default=None, alias="errorType") - error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered.", alias="errorDetails") - headers: Optional[HttpTestResultHeaders] = None - num_redirects: Optional[StrictInt] = Field(default=None, description="Number of redirects.", alias="numRedirects") - receive_time: Optional[StrictInt] = Field(default=None, description="Elapsed time between first and last byte of response in milliseconds.", alias="receiveTime") - redirect_time: Optional[StrictInt] = Field(default=None, description="Cumulative redirect timing in milliseconds.", alias="redirectTime") - response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code.", alias="responseCode") - response_time: Optional[StrictInt] = Field(default=None, description="Time to first byte in milliseconds.", alias="responseTime") - ssl_time: Optional[StrictInt] = Field(default=None, description="Time to negotiate SSL/TLS in milliseconds.", alias="sslTime") - total_time: Optional[StrictInt] = Field(default=None, description="Total time is the response time + receive time.", alias="totalTime") - wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response in milliseconds.", alias="waitTime") - wire_size: Optional[StrictInt] = Field(default=None, description="Size of content in bytes.", alias="wireSize") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "networkProfile", "connectTime", "dnsTime", "errorType", "errorDetails", "headers", "numRedirects", "receiveTime", "redirectTime", "responseCode", "responseTime", "sslTime", "totalTime", "waitTime", "wireSize"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "connect_time", - "dns_time", - "error_details", - "num_redirects", - "receive_time", - "redirect_time", - "response_code", - "response_time", - "ssl_time", - "total_time", - "wait_time", - "wire_size", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of network_profile - if self.network_profile: - _dict['networkProfile'] = self.network_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of headers - if self.headers: - _dict['headers'] = self.headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "networkProfile": NetworkProfile.from_dict(obj.get("networkProfile")) if obj.get("networkProfile") is not None else None, - "connectTime": obj.get("connectTime"), - "dnsTime": obj.get("dnsTime"), - "errorType": obj.get("errorType"), - "errorDetails": obj.get("errorDetails"), - "headers": HttpTestResultHeaders.from_dict(obj.get("headers")) if obj.get("headers") is not None else None, - "numRedirects": obj.get("numRedirects"), - "receiveTime": obj.get("receiveTime"), - "redirectTime": obj.get("redirectTime"), - "responseCode": obj.get("responseCode"), - "responseTime": obj.get("responseTime"), - "sslTime": obj.get("sslTime"), - "totalTime": obj.get("totalTime"), - "waitTime": obj.get("waitTime"), - "wireSize": obj.get("wireSize") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/http_test_result_headers.py b/endpoint/test_results_api/test_results_api/models/http_test_result_headers.py deleted file mode 100644 index 1b35bcbc..00000000 --- a/endpoint/test_results_api/test_results_api/models/http_test_result_headers.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpTestResultHeaders(BaseModel): - """ - Expandable object containing both request and response headers. - """ # noqa: E501 - request_headers: Optional[StrictStr] = Field(default=None, description="CRLF-delimited list of request headers in `header: value` format.", alias="requestHeaders") - response_headers: Optional[StrictStr] = Field(default=None, description="CRLF-delimited list of response headers in `header: value` format.", alias="responseHeaders") - __properties: ClassVar[List[str]] = ["requestHeaders", "responseHeaders"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpTestResultHeaders 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "request_headers", - "response_headers", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpTestResultHeaders from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "requestHeaders": obj.get("requestHeaders"), - "responseHeaders": obj.get("responseHeaders") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/http_test_results.py b/endpoint/test_results_api/test_results_api/models/http_test_results.py deleted file mode 100644 index 072b9e3a..00000000 --- a/endpoint/test_results_api/test_results_api/models/http_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest -from test_results_api.models.http_test_result import HttpTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpTestResults(BaseModel): - """ - HttpTestResults - """ # noqa: E501 - results: Optional[List[HttpTestResult]] = None - test: Optional[EndpointHttpServerTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [HttpTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointHttpServerTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/interface_hardware_type.py b/endpoint/test_results_api/test_results_api/models/interface_hardware_type.py deleted file mode 100644 index 86ab3e16..00000000 --- a/endpoint/test_results_api/test_results_api/models/interface_hardware_type.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class InterfaceHardwareType(str, Enum): - """ - InterfaceHardwareType - """ - - """ - allowed enum values - """ - UNKNOWN = 'unknown' - WIRELESS = 'wireless' - ETHERNET = 'ethernet' - MODEM = 'modem' - VIRTUAL = 'virtual' - LOOPBACK = 'loopback' - OTHER = 'other' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InterfaceHardwareType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/link.py b/endpoint/test_results_api/test_results_api/models/link.py deleted file mode 100644 index 047169f3..00000000 --- a/endpoint/test_results_api/test_results_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/test_results_api/test_results_api/models/multi_test_id_network_test_results.py b/endpoint/test_results_api/test_results_api/models/multi_test_id_network_test_results.py deleted file mode 100644 index 1a4a76a9..00000000 --- a/endpoint/test_results_api/test_results_api/models/multi_test_id_network_test_results.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.network_test_result import NetworkTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class MultiTestIdNetworkTestResults(BaseModel): - """ - MultiTestIdNetworkTestResults - """ # noqa: E501 - results: Optional[List[NetworkTestResult]] = None - __properties: ClassVar[List[str]] = ["results"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of MultiTestIdNetworkTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of MultiTestIdNetworkTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [NetworkTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/network_dynamic_test_result.py b/endpoint/test_results_api/test_results_api/models/network_dynamic_test_result.py deleted file mode 100644 index 0dd5c179..00000000 --- a/endpoint/test_results_api/test_results_api/models/network_dynamic_test_result.py +++ /dev/null @@ -1,159 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex -from test_results_api.models.dynamic_test_application import DynamicTestApplication -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NetworkDynamicTestResult(BaseModel): - """ - NetworkDynamicTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") - avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination.", alias="avgLatency") - error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered.", alias="errorDetails") - jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency.") - is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") - loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination.") - 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[DynamicTestApplication] = None - webex: Optional[DynamicBaseTestResultWebex] = None - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "networkProfile", "avgLatency", "errorDetails", "jitter", "isIcmpBlocked", "loss", "maxLatency", "minLatency", "application", "webex"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NetworkDynamicTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "avg_latency", - "error_details", - "jitter", - "is_icmp_blocked", - "loss", - "max_latency", - "min_latency", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of network_profile - if self.network_profile: - _dict['networkProfile'] = self.network_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of webex - if self.webex: - _dict['webex'] = self.webex.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NetworkDynamicTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "networkProfile": NetworkProfile.from_dict(obj.get("networkProfile")) if obj.get("networkProfile") is not None else None, - "avgLatency": obj.get("avgLatency"), - "errorDetails": obj.get("errorDetails"), - "jitter": obj.get("jitter"), - "isIcmpBlocked": obj.get("isIcmpBlocked"), - "loss": obj.get("loss"), - "maxLatency": obj.get("maxLatency"), - "minLatency": obj.get("minLatency"), - "application": obj.get("application"), - "webex": DynamicBaseTestResultWebex.from_dict(obj.get("webex")) if obj.get("webex") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/network_test_result.py b/endpoint/test_results_api/test_results_api/models/network_test_result.py deleted file mode 100644 index 24f6e721..00000000 --- a/endpoint/test_results_api/test_results_api/models/network_test_result.py +++ /dev/null @@ -1,150 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NetworkTestResult(BaseModel): - """ - NetworkTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") - avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination.", alias="avgLatency") - error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered.", alias="errorDetails") - jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency.") - is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") - loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination.") - 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") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "networkProfile", "avgLatency", "errorDetails", "jitter", "isIcmpBlocked", "loss", "maxLatency", "minLatency"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NetworkTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "avg_latency", - "error_details", - "jitter", - "is_icmp_blocked", - "loss", - "max_latency", - "min_latency", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of network_profile - if self.network_profile: - _dict['networkProfile'] = self.network_profile.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NetworkTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "networkProfile": NetworkProfile.from_dict(obj.get("networkProfile")) if obj.get("networkProfile") is not None else None, - "avgLatency": obj.get("avgLatency"), - "errorDetails": obj.get("errorDetails"), - "jitter": obj.get("jitter"), - "isIcmpBlocked": obj.get("isIcmpBlocked"), - "loss": obj.get("loss"), - "maxLatency": obj.get("maxLatency"), - "minLatency": obj.get("minLatency") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/network_test_results.py b/endpoint/test_results_api/test_results_api/models/network_test_results.py deleted file mode 100644 index b75e9370..00000000 --- a/endpoint/test_results_api/test_results_api/models/network_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.network_test_result import NetworkTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NetworkTestResults(BaseModel): - """ - NetworkTestResults - """ # noqa: E501 - results: Optional[List[NetworkTestResult]] = None - test: Optional[EndpointScheduledTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NetworkTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NetworkTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [NetworkTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointScheduledTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/pagination_next_link.py b/endpoint/test_results_api/test_results_api/models/pagination_next_link.py deleted file mode 100644 index 72c8fbc9..00000000 --- a/endpoint/test_results_api/test_results_api/models/pagination_next_link.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationNextLink(BaseModel): - """ - A links object containing a related link for forward pagination. - """ # noqa: E501 - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationNextLink 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of PaginationNextLink from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/pagination_next_link_links.py b/endpoint/test_results_api/test_results_api/models/pagination_next_link_links.py deleted file mode 100644 index b805553c..00000000 --- a/endpoint/test_results_api/test_results_api/models/pagination_next_link_links.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationNextLinkLinks(BaseModel): - """ - PaginationNextLinkLinks - """ # noqa: E501 - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationNextLinkLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of next - if self.next: - _dict['next'] = self.next.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationNextLinkLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_base_test_result.py b/endpoint/test_results_api/test_results_api/models/path_vis_base_test_result.py deleted file mode 100644 index 1aff68bd..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_base_test_result.py +++ /dev/null @@ -1,134 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisBaseTestResult(BaseModel): - """ - PathVisBaseTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") - server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") - 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") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisBaseTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "server", - "source_ip", - "source_prefix", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of asn_details - if self.asn_details: - _dict['asnDetails'] = self.asn_details.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisBaseTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "asnDetails": AsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, - "server": obj.get("server"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_result.py b/endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_result.py deleted file mode 100644 index 2154a600..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_result.py +++ /dev/null @@ -1,162 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex -from test_results_api.models.dynamic_test_application import DynamicTestApplication -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDetailDynamicTestResult(BaseModel): - """ - PathVisDetailDynamicTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") - server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") - 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") - routes: Optional[List[PathVisRoute]] = Field(default=None, description="Shows iterations of path trace, with each iteration specified by a pathId.") - vpn_routes: Optional[List[PathVisRoute]] = Field(default=None, description="Shows iterations of the VPN path trace, with each iteration specified by a pathId.", alias="vpnRoutes") - application: Optional[DynamicTestApplication] = None - webex: Optional[DynamicBaseTestResultWebex] = None - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "routes", "vpnRoutes", "application", "webex"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDetailDynamicTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "server", - "source_ip", - "source_prefix", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of asn_details - if self.asn_details: - _dict['asnDetails'] = self.asn_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in routes (list) - _items = [] - if self.routes: - for _item in self.routes: - if _item: - _items.append(_item.to_dict()) - _dict['routes'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in vpn_routes (list) - _items = [] - if self.vpn_routes: - for _item in self.vpn_routes: - if _item: - _items.append(_item.to_dict()) - _dict['vpnRoutes'] = _items - # override the default output from pydantic by calling `to_dict()` of webex - if self.webex: - _dict['webex'] = self.webex.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDetailDynamicTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "asnDetails": AsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, - "server": obj.get("server"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "routes": [PathVisRoute.from_dict(_item) for _item in obj.get("routes")] if obj.get("routes") is not None else None, - "vpnRoutes": [PathVisRoute.from_dict(_item) for _item in obj.get("vpnRoutes")] if obj.get("vpnRoutes") is not None else None, - "application": obj.get("application"), - "webex": DynamicBaseTestResultWebex.from_dict(obj.get("webex")) if obj.get("webex") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_results.py b/endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_results.py deleted file mode 100644 index acf4e50d..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_detail_dynamic_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDetailDynamicTestResults(BaseModel): - """ - PathVisDetailDynamicTestResults - """ # noqa: E501 - results: Optional[List[PathVisDetailDynamicTestResult]] = None - test: Optional[DynamicTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDetailDynamicTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDetailDynamicTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDetailDynamicTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": DynamicTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_detail_test_result.py b/endpoint/test_results_api/test_results_api/models/path_vis_detail_test_result.py deleted file mode 100644 index 02ecc06c..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_detail_test_result.py +++ /dev/null @@ -1,153 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDetailTestResult(BaseModel): - """ - PathVisDetailTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") - server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") - 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") - routes: Optional[List[PathVisRoute]] = Field(default=None, description="Shows iterations of path trace, with each iteration specified by a pathId.") - vpn_routes: Optional[List[PathVisRoute]] = Field(default=None, description="Shows iterations of the VPN path trace, with each iteration specified by a pathId.", alias="vpnRoutes") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "routes", "vpnRoutes"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDetailTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "server", - "source_ip", - "source_prefix", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of asn_details - if self.asn_details: - _dict['asnDetails'] = self.asn_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in routes (list) - _items = [] - if self.routes: - for _item in self.routes: - if _item: - _items.append(_item.to_dict()) - _dict['routes'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in vpn_routes (list) - _items = [] - if self.vpn_routes: - for _item in self.vpn_routes: - if _item: - _items.append(_item.to_dict()) - _dict['vpnRoutes'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDetailTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "asnDetails": AsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, - "server": obj.get("server"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "routes": [PathVisRoute.from_dict(_item) for _item in obj.get("routes")] if obj.get("routes") is not None else None, - "vpnRoutes": [PathVisRoute.from_dict(_item) for _item in obj.get("vpnRoutes")] if obj.get("vpnRoutes") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_detail_test_results.py b/endpoint/test_results_api/test_results_api/models/path_vis_detail_test_results.py deleted file mode 100644 index 00e7f0d5..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_detail_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDetailTestResults(BaseModel): - """ - PathVisDetailTestResults - """ # noqa: E501 - results: Optional[List[PathVisDetailTestResult]] = None - test: Optional[EndpointScheduledTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDetailTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDetailTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointScheduledTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_result.py b/endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_result.py deleted file mode 100644 index d0cc7417..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_result.py +++ /dev/null @@ -1,157 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex -from test_results_api.models.dynamic_test_application import DynamicTestApplication -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDynamicTestResult(BaseModel): - """ - PathVisDynamicTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") - server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") - 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[DynamicTestApplication] = None - webex: Optional[DynamicBaseTestResultWebex] = None - location: Optional[StrictStr] = Field(default=None, description="Geographic location of the pathvis.") - endpoints: Optional[List[PathVisEndpoint]] = Field(default=None, description="Shows an iteration of path trace, with each iteration specified by a pathId.") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "application", "webex", "location", "endpoints"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDynamicTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "server", - "source_ip", - "source_prefix", - "location", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of asn_details - if self.asn_details: - _dict['asnDetails'] = self.asn_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of webex - if self.webex: - _dict['webex'] = self.webex.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in endpoints (list) - _items = [] - if self.endpoints: - for _item in self.endpoints: - if _item: - _items.append(_item.to_dict()) - _dict['endpoints'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDynamicTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "asnDetails": AsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, - "server": obj.get("server"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "application": obj.get("application"), - "webex": DynamicBaseTestResultWebex.from_dict(obj.get("webex")) if obj.get("webex") is not None else None, - "location": obj.get("location"), - "endpoints": [PathVisEndpoint.from_dict(_item) for _item in obj.get("endpoints")] if obj.get("endpoints") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_endpoint.py b/endpoint/test_results_api/test_results_api/models/path_vis_endpoint.py deleted file mode 100644 index 3aa18d7e..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_endpoint.py +++ /dev/null @@ -1,102 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisEndpoint(BaseModel): - """ - PathVisEndpoint - """ # noqa: E501 - ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop destination.", alias="ipAddress") - number_of_hops: Optional[StrictInt] = Field(default=None, description="Number of hops for path trace to destination.", alias="numberOfHops") - path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace.", alias="pathId") - response_time: Optional[StrictInt] = Field(default=None, description="RTT of the path trace to the destination in milliseconds.", alias="responseTime") - __properties: ClassVar[List[str]] = ["ipAddress", "numberOfHops", "pathId", "responseTime"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisEndpoint 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_address", - "number_of_hops", - "path_id", - "response_time", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisEndpoint from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ipAddress": obj.get("ipAddress"), - "numberOfHops": obj.get("numberOfHops"), - "pathId": obj.get("pathId"), - "responseTime": obj.get("responseTime") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_hop.py b/endpoint/test_results_api/test_results_api/models/path_vis_hop.py deleted file mode 100644 index db8fb62c..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_hop.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisHop(BaseModel): - """ - PathVisHop - """ # noqa: E501 - hop: Optional[StrictInt] = Field(default=None, description="The hop index.") - ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop.", alias="ipAddress") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix of IP address shown in CIDR.") - rdns: Optional[StrictStr] = Field(default=None, description="Reverse DNS entry of IP, if available.") - network: Optional[StrictStr] = Field(default=None, description="Autonomous System originating the prefix.") - response_time: Optional[StrictInt] = Field(default=None, description="RTT to the hop’s IP in milliseconds.", alias="responseTime") - location: Optional[StrictStr] = Field(default=None, description="Location information for the hop.") - __properties: ClassVar[List[str]] = ["hop", "ipAddress", "prefix", "rdns", "network", "responseTime", "location"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisHop 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "hop", - "ip_address", - "prefix", - "rdns", - "network", - "response_time", - "location", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisHop from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "hop": obj.get("hop"), - "ipAddress": obj.get("ipAddress"), - "prefix": obj.get("prefix"), - "rdns": obj.get("rdns"), - "network": obj.get("network"), - "responseTime": obj.get("responseTime"), - "location": obj.get("location") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_route.py b/endpoint/test_results_api/test_results_api/models/path_vis_route.py deleted file mode 100644 index cb290de2..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_route.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.path_vis_hop import PathVisHop -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisRoute(BaseModel): - """ - PathVisRoute - """ # noqa: E501 - path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace.", alias="pathId") - hops: Optional[List[PathVisHop]] = Field(default=None, description="Array of hop objects indicating each step in the traceroute.") - __properties: ClassVar[List[str]] = ["pathId", "hops"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisRoute 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "path_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in hops (list) - _items = [] - if self.hops: - for _item in self.hops: - if _item: - _items.append(_item.to_dict()) - _dict['hops'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisRoute from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pathId": obj.get("pathId"), - "hops": [PathVisHop.from_dict(_item) for _item in obj.get("hops")] if obj.get("hops") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_test_result.py b/endpoint/test_results_api/test_results_api/models/path_vis_test_result.py deleted file mode 100644 index aca98dda..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_test_result.py +++ /dev/null @@ -1,148 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.asn_details import AsnDetails -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisTestResult(BaseModel): - """ - PathVisTestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") - server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") - 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") - location: Optional[StrictStr] = Field(default=None, description="Geographic location of the pathvis.") - endpoints: Optional[List[PathVisEndpoint]] = Field(default=None, description="Shows an iteration of path trace, with each iteration specified by a pathId.") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "location", "endpoints"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - "server", - "source_ip", - "source_prefix", - "location", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of asn_details - if self.asn_details: - _dict['asnDetails'] = self.asn_details.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in endpoints (list) - _items = [] - if self.endpoints: - for _item in self.endpoints: - if _item: - _items.append(_item.to_dict()) - _dict['endpoints'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None, - "asnDetails": AsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, - "server": obj.get("server"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "location": obj.get("location"), - "endpoints": [PathVisEndpoint.from_dict(_item) for _item in obj.get("endpoints")] if obj.get("endpoints") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_test_results.py b/endpoint/test_results_api/test_results_api/models/path_vis_test_results.py deleted file mode 100644 index 4de856dd..00000000 --- a/endpoint/test_results_api/test_results_api/models/path_vis_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.path_vis_test_result import PathVisTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisTestResults(BaseModel): - """ - PathVisTestResults - """ # noqa: E501 - results: Optional[List[PathVisTestResult]] = None - test: Optional[EndpointScheduledTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointScheduledTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/platform.py b/endpoint/test_results_api/test_results_api/models/platform.py deleted file mode 100644 index 697b8818..00000000 --- a/endpoint/test_results_api/test_results_api/models/platform.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Platform(str, Enum): - """ - OS platform types - """ - - """ - allowed enum values - """ - WINDOWS = 'windows' - LINUX = 'linux' - MAC = 'mac' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Platform from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics200_response.py b/endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics200_response.py deleted file mode 100644 index 88ce74a8..00000000 --- a/endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PostFetchTestResultMetrics200Response(BaseModel): - """ - PostFetchTestResultMetrics200Response - """ # noqa: E501 - results: Optional[List[NetworkTestResult]] = None - 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") - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PostFetchTestResultMetrics200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of PostFetchTestResultMetrics200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [NetworkTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": EndpointScheduledTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics_multi_test200_response.py b/endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics_multi_test200_response.py deleted file mode 100644 index 7de0b449..00000000 --- a/endpoint/test_results_api/test_results_api/models/post_fetch_test_result_metrics_multi_test200_response.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PostFetchTestResultMetricsMultiTest200Response(BaseModel): - """ - PostFetchTestResultMetricsMultiTest200Response - """ # noqa: E501 - results: Optional[List[NetworkTestResult]] = 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") - links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "startDate", "endDate", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PostFetchTestResultMetricsMultiTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _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: Dict) -> Self: - """Create an instance of PostFetchTestResultMetricsMultiTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [NetworkTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/query_window.py b/endpoint/test_results_api/test_results_api/models/query_window.py deleted file mode 100644 index b71aa84a..00000000 --- a/endpoint/test_results_api/test_results_api/models/query_window.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QueryWindow(BaseModel): - """ - QueryWindow - """ # noqa: E501 - 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") - __properties: ClassVar[List[str]] = ["startDate", "endDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QueryWindow 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QueryWindow from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate") - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network.py b/endpoint/test_results_api/test_results_api/models/real_user_test_network.py deleted file mode 100644 index 8e003541..00000000 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network.py +++ /dev/null @@ -1,140 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing -from test_results_api.models.real_user_test_network_ping import RealUserTestNetworkPing -from test_results_api.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute -from test_results_api.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing -from test_results_api.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute -from test_results_api.models.system_metrics import SystemMetrics -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RealUserTestNetwork(BaseModel): - """ - Contains details about network profile and conditions during session. - """ # noqa: E501 - network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - gateway_ping: Optional[RealUserTestNetworkGatewayPing] = Field(default=None, alias="gatewayPing") - ping: Optional[RealUserTestNetworkPing] = None - traceroute: Optional[RealUserTestNetworkTraceroute] = None - connect_rtt: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Represents the number of milliseconds required to establish TCP connectivity with the target.", alias="connectRtt") - is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") - errors: Optional[List[StrictStr]] = Field(default=None, description="Array of string representing possible network errors.") - vpn_ping: Optional[RealUserTestNetworkVpnPing] = Field(default=None, alias="vpnPing") - vpn_traceroute: Optional[RealUserTestNetworkVpnTraceroute] = Field(default=None, alias="vpnTraceroute") - __properties: ClassVar[List[str]] = ["networkProfile", "systemMetrics", "gatewayPing", "ping", "traceroute", "connectRtt", "isIcmpBlocked", "errors", "vpnPing", "vpnTraceroute"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RealUserTestNetwork 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "connect_rtt", - "is_icmp_blocked", - "errors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of network_profile - if self.network_profile: - _dict['networkProfile'] = self.network_profile.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of gateway_ping - if self.gateway_ping: - _dict['gatewayPing'] = self.gateway_ping.to_dict() - # override the default output from pydantic by calling `to_dict()` of ping - if self.ping: - _dict['ping'] = self.ping.to_dict() - # override the default output from pydantic by calling `to_dict()` of traceroute - if self.traceroute: - _dict['traceroute'] = self.traceroute.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_ping - if self.vpn_ping: - _dict['vpnPing'] = self.vpn_ping.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_traceroute - if self.vpn_traceroute: - _dict['vpnTraceroute'] = self.vpn_traceroute.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RealUserTestNetwork from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "networkProfile": NetworkProfile.from_dict(obj.get("networkProfile")) if obj.get("networkProfile") is not None else None, - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "gatewayPing": RealUserTestNetworkGatewayPing.from_dict(obj.get("gatewayPing")) if obj.get("gatewayPing") is not None else None, - "ping": RealUserTestNetworkPing.from_dict(obj.get("ping")) if obj.get("ping") is not None else None, - "traceroute": RealUserTestNetworkTraceroute.from_dict(obj.get("traceroute")) if obj.get("traceroute") is not None else None, - "connectRtt": obj.get("connectRtt"), - "isIcmpBlocked": obj.get("isIcmpBlocked"), - "errors": obj.get("errors"), - "vpnPing": RealUserTestNetworkVpnPing.from_dict(obj.get("vpnPing")) if obj.get("vpnPing") is not None else None, - "vpnTraceroute": RealUserTestNetworkVpnTraceroute.from_dict(obj.get("vpnTraceroute")) if obj.get("vpnTraceroute") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/self_links.py b/endpoint/test_results_api/test_results_api/models/self_links.py deleted file mode 100644 index 8e008dde..00000000 --- a/endpoint/test_results_api/test_results_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/self_links_links.py b/endpoint/test_results_api/test_results_api/models/self_links_links.py deleted file mode 100644 index aadf61d2..00000000 --- a/endpoint/test_results_api/test_results_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/sort_order.py b/endpoint/test_results_api/test_results_api/models/sort_order.py deleted file mode 100644 index 7118d383..00000000 --- a/endpoint/test_results_api/test_results_api/models/sort_order.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class SortOrder(str, Enum): - """ - Parameter indicates the ascending/descending order of the sorting, using either the asc or desc values. - """ - - """ - allowed enum values - """ - ASC = 'asc' - DESC = 'desc' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SortOrder from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/specific_agents_selector_type.py b/endpoint/test_results_api/test_results_api/models/specific_agents_selector_type.py deleted file mode 100644 index b6b98b86..00000000 --- a/endpoint/test_results_api/test_results_api/models/specific_agents_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class SpecificAgentsSelectorType(str, Enum): - """ - SpecificAgentsSelectorType - """ - - """ - allowed enum values - """ - SPECIFIC_MINUS_AGENTS = 'specific-agents' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SpecificAgentsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/test_interval.py b/endpoint/test_results_api/test_results_api/models/test_interval.py deleted file mode 100644 index 983a91bf..00000000 --- a/endpoint/test_results_api/test_results_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/test_probe_mode.py b/endpoint/test_results_api/test_results_api/models/test_probe_mode.py deleted file mode 100644 index 900d3046..00000000 --- a/endpoint/test_results_api/test_results_api/models/test_probe_mode.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProbeMode(str, Enum): - """ - Probe mode used by network test, only valid when the protocol is set to TCP. - """ - - """ - allowed enum values - """ - AUTO = 'auto' - SACK = 'sack' - SYN = 'syn' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProbeMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/test_result.py b/endpoint/test_results_api/test_results_api/models/test_result.py deleted file mode 100644 index 5da866e6..00000000 --- a/endpoint/test_results_api/test_results_api/models/test_result.py +++ /dev/null @@ -1,116 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.account_group_id import AccountGroupId -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.vpn_profile import VpnProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestResult(BaseModel): - """ - TestResult - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") - aid: Optional[AccountGroupId] = None - round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") - system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") - vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") - __properties: ClassVar[List[str]] = ["agentId", "aid", "roundId", "serverIp", "systemMetrics", "vpnProfile"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "round_id", - "server_ip", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - # override the default output from pydantic by calling `to_dict()` of system_metrics - if self.system_metrics: - _dict['systemMetrics'] = self.system_metrics.to_dict() - # override the default output from pydantic by calling `to_dict()` of vpn_profile - if self.vpn_profile: - _dict['vpnProfile'] = self.vpn_profile.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "aid": AccountGroupId.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "roundId": obj.get("roundId"), - "serverIp": obj.get("serverIp"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "vpnProfile": VpnProfile.from_dict(obj.get("vpnProfile")) if obj.get("vpnProfile") is not None else None - }) - return _obj - - diff --git a/endpoint/test_results_api/test_results_api/models/test_ssl_version_id.py b/endpoint/test_results_api/test_results_api/models/test_ssl_version_id.py deleted file mode 100644 index 05e41046..00000000 --- a/endpoint/test_results_api/test_results_api/models/test_ssl_version_id.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestSslVersionId(str, Enum): - """ - SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_3 = '3' - ENUM_4 = '4' - ENUM_5 = '5' - ENUM_6 = '6' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSslVersionId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/threshold_filter_operator.py b/endpoint/test_results_api/test_results_api/models/threshold_filter_operator.py deleted file mode 100644 index 9824ea0a..00000000 --- a/endpoint/test_results_api/test_results_api/models/threshold_filter_operator.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class ThresholdFilterOperator(str, Enum): - """ - ThresholdFilterOperator - """ - - """ - allowed enum values - """ - GTE = 'gte' - LTE = 'lte' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ThresholdFilterOperator from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/models/unauthorized_error.py b/endpoint/test_results_api/test_results_api/models/unauthorized_error.py deleted file mode 100644 index fdb7dd1f..00000000 --- a/endpoint/test_results_api/test_results_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/test_results_api/test_results_api/models/vpn_type.py b/endpoint/test_results_api/test_results_api/models/vpn_type.py deleted file mode 100644 index fbfb3034..00000000 --- a/endpoint/test_results_api/test_results_api/models/vpn_type.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class VpnType(str, Enum): - """ - Name of the VPN provider. - """ - - """ - allowed enum values - """ - CISCO_MINUS_ANYCONNECT = 'cisco-anyconnect' - PALO_MINUS_ALTO_MINUS_GLOBALPROTECT = 'palo-alto-globalprotect' - IVANTI_MINUS_CONNECT_MINUS_SECURE = 'ivanti-connect-secure' - ZSCALER_MINUS_INTERNET_MINUS_ACCESS = 'zscaler-internet-access' - F5_MINUS_BIG_MINUS_IP = 'f5-big-ip' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VpnType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/test_results_api/test_results_api/rest.py b/endpoint/test_results_api/test_results_api/rest.py deleted file mode 100644 index bf7a153d..00000000 --- a/endpoint/test_results_api/test_results_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from test_results_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/endpoint/test_results_api/tox.ini b/endpoint/test_results_api/tox.ini deleted file mode 100644 index a8148126..00000000 --- a/endpoint/test_results_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=test_results_api diff --git a/endpoint/tests_api/.github/workflows/python.yml b/endpoint/tests_api/.github/workflows/python.yml deleted file mode 100644 index 939fd9f1..00000000 --- a/endpoint/tests_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: tests_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/endpoint/tests_api/.gitlab-ci.yml b/endpoint/tests_api/.gitlab-ci.yml deleted file mode 100644 index 7e659eac..00000000 --- a/endpoint/tests_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=tests_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/endpoint/tests_api/.openapi-generator/FILES b/endpoint/tests_api/.openapi-generator/FILES deleted file mode 100644 index 66a177e0..00000000 --- a/endpoint/tests_api/.openapi-generator/FILES +++ /dev/null @@ -1,191 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AccountGroupId.md -docs/AgentLabelsSelectorType.md -docs/AllAgentsSelectorType.md -docs/DynamicTest.md -docs/DynamicTestApplication.md -docs/DynamicTestLinks.md -docs/DynamicTestLinksSelf.md -docs/DynamicTestLinksTestResults.md -docs/DynamicTestRequest.md -docs/DynamicTests.md -docs/DynamicTestsAgentToServerApi.md -docs/EndpointAgentLabelsSelectorConfig.md -docs/EndpointAgentSelectorConfig.md -docs/EndpointAgentToServerInstantTest.md -docs/EndpointAgentToServerTest.md -docs/EndpointAgentToServerTestRequest.md -docs/EndpointAgentToServerTests.md -docs/EndpointAgentToServerType.md -docs/EndpointAllAgentsSelectorConfig.md -docs/EndpointHttpServerBaseTest.md -docs/EndpointHttpServerInstantTest.md -docs/EndpointHttpServerTest.md -docs/EndpointHttpServerTestRequest.md -docs/EndpointHttpServerTests.md -docs/EndpointHttpServerType.md -docs/EndpointInstantTest.md -docs/EndpointScheduledTestType.md -docs/EndpointSpecificAgentsSelectorConfig.md -docs/EndpointTest.md -docs/EndpointTestAgentSelectorType.md -docs/EndpointTestAid.md -docs/EndpointTestAuthType.md -docs/EndpointTestLinks.md -docs/EndpointTestLinksSelf.md -docs/EndpointTestLinksTestResults.md -docs/EndpointTestProtocol.md -docs/EndpointTests.md -docs/Error.md -docs/GetDynamicTestDetail200Response.md -docs/GetDynamicTestsList200Response.md -docs/GetEndpointAgentToserverTestsList200Response.md -docs/GetEndpointHttpserverTestDetail200Response.md -docs/GetEndpointHttpserverTestsList200Response.md -docs/GetEndpointTestsList200Response.md -docs/Link.md -docs/ListEndpointScheduledTestsApi.md -docs/PostEndpointAgentToServerTest201Response.md -docs/ScheduledTestsAgentToServerApi.md -docs/ScheduledTestsHTTPServerApi.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SpecificAgentsSelectorType.md -docs/TestInterval.md -docs/TestProbeMode.md -docs/TestSslVersionId.md -docs/UnauthorizedError.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group_id.py -test/test_agent_labels_selector_type.py -test/test_all_agents_selector_type.py -test/test_dynamic_test.py -test/test_dynamic_test_application.py -test/test_dynamic_test_links.py -test/test_dynamic_test_links_self.py -test/test_dynamic_test_links_test_results.py -test/test_dynamic_test_request.py -test/test_dynamic_tests.py -test/test_dynamic_tests_agent_to_server_api.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_agent_to_server_type.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_http_server_test_request.py -test/test_endpoint_http_server_tests.py -test/test_endpoint_http_server_type.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_aid.py -test/test_endpoint_test_auth_type.py -test/test_endpoint_test_links.py -test/test_endpoint_test_links_self.py -test/test_endpoint_test_links_test_results.py -test/test_endpoint_test_protocol.py -test/test_endpoint_tests.py -test/test_error.py -test/test_get_dynamic_test_detail200_response.py -test/test_get_dynamic_tests_list200_response.py -test/test_get_endpoint_agent_toserver_tests_list200_response.py -test/test_get_endpoint_httpserver_test_detail200_response.py -test/test_get_endpoint_httpserver_tests_list200_response.py -test/test_get_endpoint_tests_list200_response.py -test/test_link.py -test/test_list_endpoint_scheduled_tests_api.py -test/test_post_endpoint_agent_to_server_test201_response.py -test/test_scheduled_tests_agent_to_server_api.py -test/test_scheduled_tests_http_server_api.py -test/test_self_links.py -test/test_self_links_links.py -test/test_specific_agents_selector_type.py -test/test_test_interval.py -test/test_test_probe_mode.py -test/test_test_ssl_version_id.py -test/test_unauthorized_error.py -tests_api/__init__.py -tests_api/api/__init__.py -tests_api/api/dynamic_tests_agent_to_server_api.py -tests_api/api/list_endpoint_scheduled_tests_api.py -tests_api/api/scheduled_tests_agent_to_server_api.py -tests_api/api/scheduled_tests_http_server_api.py -tests_api/api_client.py -tests_api/api_response.py -tests_api/configuration.py -tests_api/exceptions.py -tests_api/models/__init__.py -tests_api/models/account_group_id.py -tests_api/models/agent_labels_selector_type.py -tests_api/models/all_agents_selector_type.py -tests_api/models/dynamic_test.py -tests_api/models/dynamic_test_application.py -tests_api/models/dynamic_test_links.py -tests_api/models/dynamic_test_links_self.py -tests_api/models/dynamic_test_links_test_results.py -tests_api/models/dynamic_test_request.py -tests_api/models/dynamic_tests.py -tests_api/models/endpoint_agent_labels_selector_config.py -tests_api/models/endpoint_agent_selector_config.py -tests_api/models/endpoint_agent_to_server_instant_test.py -tests_api/models/endpoint_agent_to_server_test.py -tests_api/models/endpoint_agent_to_server_test_request.py -tests_api/models/endpoint_agent_to_server_tests.py -tests_api/models/endpoint_agent_to_server_type.py -tests_api/models/endpoint_all_agents_selector_config.py -tests_api/models/endpoint_http_server_base_test.py -tests_api/models/endpoint_http_server_instant_test.py -tests_api/models/endpoint_http_server_test.py -tests_api/models/endpoint_http_server_test_request.py -tests_api/models/endpoint_http_server_tests.py -tests_api/models/endpoint_http_server_type.py -tests_api/models/endpoint_instant_test.py -tests_api/models/endpoint_scheduled_test_type.py -tests_api/models/endpoint_specific_agents_selector_config.py -tests_api/models/endpoint_test.py -tests_api/models/endpoint_test_agent_selector_type.py -tests_api/models/endpoint_test_aid.py -tests_api/models/endpoint_test_auth_type.py -tests_api/models/endpoint_test_links.py -tests_api/models/endpoint_test_links_self.py -tests_api/models/endpoint_test_links_test_results.py -tests_api/models/endpoint_test_protocol.py -tests_api/models/endpoint_tests.py -tests_api/models/error.py -tests_api/models/get_dynamic_test_detail200_response.py -tests_api/models/get_dynamic_tests_list200_response.py -tests_api/models/get_endpoint_agent_toserver_tests_list200_response.py -tests_api/models/get_endpoint_httpserver_test_detail200_response.py -tests_api/models/get_endpoint_httpserver_tests_list200_response.py -tests_api/models/get_endpoint_tests_list200_response.py -tests_api/models/link.py -tests_api/models/post_endpoint_agent_to_server_test201_response.py -tests_api/models/self_links.py -tests_api/models/self_links_links.py -tests_api/models/specific_agents_selector_type.py -tests_api/models/test_interval.py -tests_api/models/test_probe_mode.py -tests_api/models/test_ssl_version_id.py -tests_api/models/unauthorized_error.py -tests_api/py.typed -tests_api/rest.py -tox.ini diff --git a/endpoint/tests_api/.openapi-generator/VERSION b/endpoint/tests_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/endpoint/tests_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/endpoint/tests_api/.travis.yml b/endpoint/tests_api/.travis.yml deleted file mode 100644 index df7c4097..00000000 --- a/endpoint/tests_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=tests_api diff --git a/endpoint/tests_api/README.md b/endpoint/tests_api/README.md deleted file mode 100644 index e2f769bf..00000000 --- a/endpoint/tests_api/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# tests-api - -## Overview -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.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import tests_api -``` - -### 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 tests_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DynamicTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - aid = '2067' # 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 ApiException as e: - print("Exception when calling DynamicTestsAgentToServerApi->get_dynamic_test_detail: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*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 -*ListEndpointScheduledTestsApi* | [**get_endpoint_tests_list**](docs/ListEndpointScheduledTestsApi.md#get_endpoint_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests | List endpoint scheduled tests -*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_toserver_tests_list**](docs/ScheduledTestsAgentToServerApi.md#get_endpoint_agent_toserver_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 -*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 - - -## Documentation For Models - - - [AccountGroupId](docs/AccountGroupId.md) - - [AgentLabelsSelectorType](docs/AgentLabelsSelectorType.md) - - [AllAgentsSelectorType](docs/AllAgentsSelectorType.md) - - [DynamicTest](docs/DynamicTest.md) - - [DynamicTestApplication](docs/DynamicTestApplication.md) - - [DynamicTestLinks](docs/DynamicTestLinks.md) - - [DynamicTestLinksSelf](docs/DynamicTestLinksSelf.md) - - [DynamicTestLinksTestResults](docs/DynamicTestLinksTestResults.md) - - [DynamicTestRequest](docs/DynamicTestRequest.md) - - [DynamicTests](docs/DynamicTests.md) - - [EndpointAgentLabelsSelectorConfig](docs/EndpointAgentLabelsSelectorConfig.md) - - [EndpointAgentSelectorConfig](docs/EndpointAgentSelectorConfig.md) - - [EndpointAgentToServerInstantTest](docs/EndpointAgentToServerInstantTest.md) - - [EndpointAgentToServerTest](docs/EndpointAgentToServerTest.md) - - [EndpointAgentToServerTestRequest](docs/EndpointAgentToServerTestRequest.md) - - [EndpointAgentToServerTests](docs/EndpointAgentToServerTests.md) - - [EndpointAgentToServerType](docs/EndpointAgentToServerType.md) - - [EndpointAllAgentsSelectorConfig](docs/EndpointAllAgentsSelectorConfig.md) - - [EndpointHttpServerBaseTest](docs/EndpointHttpServerBaseTest.md) - - [EndpointHttpServerInstantTest](docs/EndpointHttpServerInstantTest.md) - - [EndpointHttpServerTest](docs/EndpointHttpServerTest.md) - - [EndpointHttpServerTestRequest](docs/EndpointHttpServerTestRequest.md) - - [EndpointHttpServerTests](docs/EndpointHttpServerTests.md) - - [EndpointHttpServerType](docs/EndpointHttpServerType.md) - - [EndpointInstantTest](docs/EndpointInstantTest.md) - - [EndpointScheduledTestType](docs/EndpointScheduledTestType.md) - - [EndpointSpecificAgentsSelectorConfig](docs/EndpointSpecificAgentsSelectorConfig.md) - - [EndpointTest](docs/EndpointTest.md) - - [EndpointTestAgentSelectorType](docs/EndpointTestAgentSelectorType.md) - - [EndpointTestAid](docs/EndpointTestAid.md) - - [EndpointTestAuthType](docs/EndpointTestAuthType.md) - - [EndpointTestLinks](docs/EndpointTestLinks.md) - - [EndpointTestLinksSelf](docs/EndpointTestLinksSelf.md) - - [EndpointTestLinksTestResults](docs/EndpointTestLinksTestResults.md) - - [EndpointTestProtocol](docs/EndpointTestProtocol.md) - - [EndpointTests](docs/EndpointTests.md) - - [Error](docs/Error.md) - - [GetDynamicTestDetail200Response](docs/GetDynamicTestDetail200Response.md) - - [GetDynamicTestsList200Response](docs/GetDynamicTestsList200Response.md) - - [GetEndpointAgentToserverTestsList200Response](docs/GetEndpointAgentToserverTestsList200Response.md) - - [GetEndpointHttpserverTestDetail200Response](docs/GetEndpointHttpserverTestDetail200Response.md) - - [GetEndpointHttpserverTestsList200Response](docs/GetEndpointHttpserverTestsList200Response.md) - - [GetEndpointTestsList200Response](docs/GetEndpointTestsList200Response.md) - - [Link](docs/Link.md) - - [PostEndpointAgentToServerTest201Response](docs/PostEndpointAgentToServerTest201Response.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SpecificAgentsSelectorType](docs/SpecificAgentsSelectorType.md) - - [TestInterval](docs/TestInterval.md) - - [TestProbeMode](docs/TestProbeMode.md) - - [TestSslVersionId](docs/TestSslVersionId.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/endpoint/tests_api/docs/AccountGroupId.md b/endpoint/tests_api/docs/AccountGroupId.md deleted file mode 100644 index b32f8257..00000000 --- a/endpoint/tests_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from tests_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/endpoint/tests_api/docs/AgentLabelsSelectorType.md b/endpoint/tests_api/docs/AgentLabelsSelectorType.md deleted file mode 100644 index aa3d0399..00000000 --- a/endpoint/tests_api/docs/AgentLabelsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AgentLabelsSelectorType - - -## 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/endpoint/tests_api/docs/AllAgentsSelectorType.md b/endpoint/tests_api/docs/AllAgentsSelectorType.md deleted file mode 100644 index 049c7eec..00000000 --- a/endpoint/tests_api/docs/AllAgentsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# AllAgentsSelectorType - - -## 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/endpoint/tests_api/docs/DynamicTest.md b/endpoint/tests_api/docs/DynamicTest.md deleted file mode 100644 index 4d8209c2..00000000 --- a/endpoint/tests_api/docs/DynamicTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# DynamicTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**DynamicTestLinks**](DynamicTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] [readonly] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [readonly] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] [readonly] -**test_id** | **str** | Each test is assigned a unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] - -## Example - -```python -from tests_api.models.dynamic_test import DynamicTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTest from a JSON string -dynamic_test_instance = DynamicTest.from_json(json) -# print the JSON string representation of the object -print DynamicTest.to_json() - -# convert the object into a dict -dynamic_test_dict = dynamic_test_instance.to_dict() -# create an instance of DynamicTest from a dict -dynamic_test_form_dict = dynamic_test.from_dict(dynamic_test_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/endpoint/tests_api/docs/DynamicTestApplication.md b/endpoint/tests_api/docs/DynamicTestApplication.md deleted file mode 100644 index f6055344..00000000 --- a/endpoint/tests_api/docs/DynamicTestApplication.md +++ /dev/null @@ -1,11 +0,0 @@ -# DynamicTestApplication - -Which supported application to 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/endpoint/tests_api/docs/DynamicTestLinks.md b/endpoint/tests_api/docs/DynamicTestLinks.md deleted file mode 100644 index e1115752..00000000 --- a/endpoint/tests_api/docs/DynamicTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# DynamicTestLinks - -A list of links that can be accessed to get more information. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**DynamicTestLinksSelf**](DynamicTestLinksSelf.md) | | [optional] -**test_results** | [**DynamicTestLinksTestResults**](DynamicTestLinksTestResults.md) | | [optional] - -## Example - -```python -from tests_api.models.dynamic_test_links import DynamicTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTestLinks from a JSON string -dynamic_test_links_instance = DynamicTestLinks.from_json(json) -# print the JSON string representation of the object -print DynamicTestLinks.to_json() - -# convert the object into a dict -dynamic_test_links_dict = dynamic_test_links_instance.to_dict() -# create an instance of DynamicTestLinks from a dict -dynamic_test_links_form_dict = dynamic_test_links.from_dict(dynamic_test_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/endpoint/tests_api/docs/DynamicTestLinksSelf.md b/endpoint/tests_api/docs/DynamicTestLinksSelf.md deleted file mode 100644 index ff5f2ec8..00000000 --- a/endpoint/tests_api/docs/DynamicTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# DynamicTestLinksSelf - - -## 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 tests_api.models.dynamic_test_links_self import DynamicTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTestLinksSelf from a JSON string -dynamic_test_links_self_instance = DynamicTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print DynamicTestLinksSelf.to_json() - -# convert the object into a dict -dynamic_test_links_self_dict = dynamic_test_links_self_instance.to_dict() -# create an instance of DynamicTestLinksSelf from a dict -dynamic_test_links_self_form_dict = dynamic_test_links_self.from_dict(dynamic_test_links_self_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/endpoint/tests_api/docs/DynamicTestLinksTestResults.md b/endpoint/tests_api/docs/DynamicTestLinksTestResults.md deleted file mode 100644 index ca309850..00000000 --- a/endpoint/tests_api/docs/DynamicTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# DynamicTestLinksTestResults - - -## 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 tests_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of DynamicTestLinksTestResults from a JSON string -dynamic_test_links_test_results_instance = DynamicTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print DynamicTestLinksTestResults.to_json() - -# convert the object into a dict -dynamic_test_links_test_results_dict = dynamic_test_links_test_results_instance.to_dict() -# create an instance of DynamicTestLinksTestResults from a dict -dynamic_test_links_test_results_form_dict = dynamic_test_links_test_results.from_dict(dynamic_test_links_test_results_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/endpoint/tests_api/docs/DynamicTestsAgentToServerApi.md b/endpoint/tests_api/docs/DynamicTestsAgentToServerApi.md deleted file mode 100644 index d1cb853d..00000000 --- a/endpoint/tests_api/docs/DynamicTestsAgentToServerApi.md +++ /dev/null @@ -1,268 +0,0 @@ -# tests_api.DynamicTestsAgentToServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**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 - - -# **get_dynamic_test_detail** -> GetDynamicTestDetail200Response 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 time -import os -import tests_api -from tests_api.models.get_dynamic_test_detail200_response import GetDynamicTestDetail200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DynamicTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - aid = '2067' # 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 - -[**GetDynamicTestDetail200Response**](GetDynamicTestDetail200Response.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** -> GetDynamicTestsList200Response 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 time -import os -import tests_api -from tests_api.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DynamicTestsAgentToServerApi(api_client) - aid = '2067' # 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 - -[**GetDynamicTestsList200Response**](GetDynamicTestsList200Response.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 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. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.dynamic_test import DynamicTest -from tests_api.models.dynamic_test_request import DynamicTestRequest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DynamicTestsAgentToServerApi(api_client) - dynamic_test_request = tests_api.DynamicTestRequest() # DynamicTestRequest | - aid = '2067' # 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 endpoint dynamic test - api_response = api_instance.post_dynamic_test(dynamic_test_request, aid=aid) - print("The response of DynamicTestsAgentToServerApi->post_dynamic_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DynamicTestsAgentToServerApi->post_dynamic_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dynamic_test_request** | [**DynamicTestRequest**](DynamicTestRequest.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 - -[**DynamicTest**](DynamicTest.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 | - | -**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) - diff --git a/endpoint/tests_api/docs/EndpointAgentLabelsSelectorConfig.md b/endpoint/tests_api/docs/EndpointAgentLabelsSelectorConfig.md deleted file mode 100644 index 856ae255..00000000 --- a/endpoint/tests_api/docs/EndpointAgentLabelsSelectorConfig.md +++ /dev/null @@ -1,31 +0,0 @@ -# EndpointAgentLabelsSelectorConfig - -Agent labels selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**AgentLabelsSelectorType**](AgentLabelsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] - -## Example - -```python -from tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentLabelsSelectorConfig from a JSON string -endpoint_agent_labels_selector_config_instance = EndpointAgentLabelsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAgentLabelsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_agent_labels_selector_config_dict = endpoint_agent_labels_selector_config_instance.to_dict() -# create an instance of EndpointAgentLabelsSelectorConfig from a dict -endpoint_agent_labels_selector_config_form_dict = endpoint_agent_labels_selector_config.from_dict(endpoint_agent_labels_selector_config_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/endpoint/tests_api/docs/EndpointAgentSelectorConfig.md b/endpoint/tests_api/docs/EndpointAgentSelectorConfig.md deleted file mode 100644 index 0a78dd15..00000000 --- a/endpoint/tests_api/docs/EndpointAgentSelectorConfig.md +++ /dev/null @@ -1,32 +0,0 @@ -# EndpointAgentSelectorConfig - -Agents selection object based on agentSelectorType. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**SpecificAgentsSelectorType**](SpecificAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] - -## Example - -```python -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentSelectorConfig from a JSON string -endpoint_agent_selector_config_instance = EndpointAgentSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAgentSelectorConfig.to_json() - -# convert the object into a dict -endpoint_agent_selector_config_dict = endpoint_agent_selector_config_instance.to_dict() -# create an instance of EndpointAgentSelectorConfig from a dict -endpoint_agent_selector_config_form_dict = endpoint_agent_selector_config.from_dict(endpoint_agent_selector_config_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/endpoint/tests_api/docs/EndpointAgentToServerInstantTest.md b/endpoint/tests_api/docs/EndpointAgentToServerInstantTest.md deleted file mode 100644 index f418c94a..00000000 --- a/endpoint/tests_api/docs/EndpointAgentToServerInstantTest.md +++ /dev/null @@ -1,36 +0,0 @@ -# EndpointAgentToServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**test_name** | **str** | Name of the test. | -**server_name** | **str** | A server address without a protocol or IP address. | - -## Example - -```python -from tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentToServerInstantTest from a JSON string -endpoint_agent_to_server_instant_test_instance = EndpointAgentToServerInstantTest.from_json(json) -# print the JSON string representation of the object -print EndpointAgentToServerInstantTest.to_json() - -# convert the object into a dict -endpoint_agent_to_server_instant_test_dict = endpoint_agent_to_server_instant_test_instance.to_dict() -# create an instance of EndpointAgentToServerInstantTest from a dict -endpoint_agent_to_server_instant_test_form_dict = endpoint_agent_to_server_instant_test.from_dict(endpoint_agent_to_server_instant_test_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/endpoint/tests_api/docs/EndpointAgentToServerTest.md b/endpoint/tests_api/docs/EndpointAgentToServerTest.md deleted file mode 100644 index fb8840ad..00000000 --- a/endpoint/tests_api/docs/EndpointAgentToServerTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# EndpointAgentToServerTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointAgentToServerType**](EndpointAgentToServerType.md) | | [optional] - -## Example - -```python -from tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAgentToServerTest from a JSON string -endpoint_agent_to_server_test_instance = EndpointAgentToServerTest.from_json(json) -# print the JSON string representation of the object -print EndpointAgentToServerTest.to_json() - -# convert the object into a dict -endpoint_agent_to_server_test_dict = endpoint_agent_to_server_test_instance.to_dict() -# create an instance of EndpointAgentToServerTest from a dict -endpoint_agent_to_server_test_form_dict = endpoint_agent_to_server_test.from_dict(endpoint_agent_to_server_test_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/endpoint/tests_api/docs/EndpointAgentToServerType.md b/endpoint/tests_api/docs/EndpointAgentToServerType.md deleted file mode 100644 index a2abd7c3..00000000 --- a/endpoint/tests_api/docs/EndpointAgentToServerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointAgentToServerType - -Type of test being queried. - -## 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/endpoint/tests_api/docs/EndpointAllAgentsSelectorConfig.md b/endpoint/tests_api/docs/EndpointAllAgentsSelectorConfig.md deleted file mode 100644 index 58a5b63b..00000000 --- a/endpoint/tests_api/docs/EndpointAllAgentsSelectorConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointAllAgentsSelectorConfig - -Any agent selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**AllAgentsSelectorType**](AllAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] - -## Example - -```python -from tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointAllAgentsSelectorConfig from a JSON string -endpoint_all_agents_selector_config_instance = EndpointAllAgentsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointAllAgentsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_all_agents_selector_config_dict = endpoint_all_agents_selector_config_instance.to_dict() -# create an instance of EndpointAllAgentsSelectorConfig from a dict -endpoint_all_agents_selector_config_form_dict = endpoint_all_agents_selector_config.from_dict(endpoint_all_agents_selector_config_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/endpoint/tests_api/docs/EndpointHttpServerBaseTest.md b/endpoint/tests_api/docs/EndpointHttpServerBaseTest.md deleted file mode 100644 index 238aa6f9..00000000 --- a/endpoint/tests_api/docs/EndpointHttpServerBaseTest.md +++ /dev/null @@ -1,36 +0,0 @@ -# EndpointHttpServerBaseTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] - -## Example - -```python -from tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerBaseTest from a JSON string -endpoint_http_server_base_test_instance = EndpointHttpServerBaseTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerBaseTest.to_json() - -# convert the object into a dict -endpoint_http_server_base_test_dict = endpoint_http_server_base_test_instance.to_dict() -# create an instance of EndpointHttpServerBaseTest from a dict -endpoint_http_server_base_test_form_dict = endpoint_http_server_base_test.from_dict(endpoint_http_server_base_test_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/endpoint/tests_api/docs/EndpointHttpServerInstantTest.md b/endpoint/tests_api/docs/EndpointHttpServerInstantTest.md deleted file mode 100644 index 58b2bbf8..00000000 --- a/endpoint/tests_api/docs/EndpointHttpServerInstantTest.md +++ /dev/null @@ -1,46 +0,0 @@ -# EndpointHttpServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**test_name** | **str** | Name of the test. | -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | -**target_response_time** | **int** | Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red). | -**password** | **str** | Password for Basic/NTLM authentication. | [optional] - -## Example - -```python -from tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerInstantTest from a JSON string -endpoint_http_server_instant_test_instance = EndpointHttpServerInstantTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerInstantTest.to_json() - -# convert the object into a dict -endpoint_http_server_instant_test_dict = endpoint_http_server_instant_test_instance.to_dict() -# create an instance of EndpointHttpServerInstantTest from a dict -endpoint_http_server_instant_test_form_dict = endpoint_http_server_instant_test.from_dict(endpoint_http_server_instant_test_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/endpoint/tests_api/docs/EndpointHttpServerTest.md b/endpoint/tests_api/docs/EndpointHttpServerTest.md deleted file mode 100644 index c9b1e4b4..00000000 --- a/endpoint/tests_api/docs/EndpointHttpServerTest.md +++ /dev/null @@ -1,58 +0,0 @@ -# EndpointHttpServerTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointHttpServerType**](EndpointHttpServerType.md) | | [optional] -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.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] -**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] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] - -## Example - -```python -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointHttpServerTest from a JSON string -endpoint_http_server_test_instance = EndpointHttpServerTest.from_json(json) -# print the JSON string representation of the object -print EndpointHttpServerTest.to_json() - -# convert the object into a dict -endpoint_http_server_test_dict = endpoint_http_server_test_instance.to_dict() -# create an instance of EndpointHttpServerTest from a dict -endpoint_http_server_test_form_dict = endpoint_http_server_test.from_dict(endpoint_http_server_test_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/endpoint/tests_api/docs/EndpointHttpServerType.md b/endpoint/tests_api/docs/EndpointHttpServerType.md deleted file mode 100644 index 1cf13c82..00000000 --- a/endpoint/tests_api/docs/EndpointHttpServerType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointHttpServerType - -Type of test being queried. - -## 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/endpoint/tests_api/docs/EndpointInstantTest.md b/endpoint/tests_api/docs/EndpointInstantTest.md deleted file mode 100644 index 466789f6..00000000 --- a/endpoint/tests_api/docs/EndpointInstantTest.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**test_name** | **str** | Name of the test. | - -## Example - -```python -from tests_api.models.endpoint_instant_test import EndpointInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointInstantTest from a JSON string -endpoint_instant_test_instance = EndpointInstantTest.from_json(json) -# print the JSON string representation of the object -print EndpointInstantTest.to_json() - -# convert the object into a dict -endpoint_instant_test_dict = endpoint_instant_test_instance.to_dict() -# create an instance of EndpointInstantTest from a dict -endpoint_instant_test_form_dict = endpoint_instant_test.from_dict(endpoint_instant_test_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/endpoint/tests_api/docs/EndpointScheduledTestType.md b/endpoint/tests_api/docs/EndpointScheduledTestType.md deleted file mode 100644 index 4fb1f891..00000000 --- a/endpoint/tests_api/docs/EndpointScheduledTestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointScheduledTestType - -Type of test being queried. - -## 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/endpoint/tests_api/docs/EndpointSpecificAgentsSelectorConfig.md b/endpoint/tests_api/docs/EndpointSpecificAgentsSelectorConfig.md deleted file mode 100644 index 9e5366bd..00000000 --- a/endpoint/tests_api/docs/EndpointSpecificAgentsSelectorConfig.md +++ /dev/null @@ -1,31 +0,0 @@ -# EndpointSpecificAgentsSelectorConfig - -Specific agents selection object. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_selector_type** | [**SpecificAgentsSelectorType**](SpecificAgentsSelectorType.md) | | [optional] -**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] -**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] - -## Example - -```python -from tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointSpecificAgentsSelectorConfig from a JSON string -endpoint_specific_agents_selector_config_instance = EndpointSpecificAgentsSelectorConfig.from_json(json) -# print the JSON string representation of the object -print EndpointSpecificAgentsSelectorConfig.to_json() - -# convert the object into a dict -endpoint_specific_agents_selector_config_dict = endpoint_specific_agents_selector_config_instance.to_dict() -# create an instance of EndpointSpecificAgentsSelectorConfig from a dict -endpoint_specific_agents_selector_config_form_dict = endpoint_specific_agents_selector_config.from_dict(endpoint_specific_agents_selector_config_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/endpoint/tests_api/docs/EndpointTest.md b/endpoint/tests_api/docs/EndpointTest.md deleted file mode 100644 index ff05c4da..00000000 --- a/endpoint/tests_api/docs/EndpointTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# EndpointTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointScheduledTestType**](EndpointScheduledTestType.md) | | [optional] - -## Example - -```python -from tests_api.models.endpoint_test import EndpointTest - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTest from a JSON string -endpoint_test_instance = EndpointTest.from_json(json) -# print the JSON string representation of the object -print EndpointTest.to_json() - -# convert the object into a dict -endpoint_test_dict = endpoint_test_instance.to_dict() -# create an instance of EndpointTest from a dict -endpoint_test_form_dict = endpoint_test.from_dict(endpoint_test_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/endpoint/tests_api/docs/EndpointTestAgentSelectorType.md b/endpoint/tests_api/docs/EndpointTestAgentSelectorType.md deleted file mode 100644 index cac1391f..00000000 --- a/endpoint/tests_api/docs/EndpointTestAgentSelectorType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestAgentSelectorType - -Retrieve either all available agents, a specific list of agents, or a list of agent labels. - -## 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/endpoint/tests_api/docs/EndpointTestAid.md b/endpoint/tests_api/docs/EndpointTestAid.md deleted file mode 100644 index 6e615cb7..00000000 --- a/endpoint/tests_api/docs/EndpointTestAid.md +++ /dev/null @@ -1,28 +0,0 @@ -# EndpointTestAid - - -## 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] - -## Example - -```python -from tests_api.models.endpoint_test_aid import EndpointTestAid - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestAid from a JSON string -endpoint_test_aid_instance = EndpointTestAid.from_json(json) -# print the JSON string representation of the object -print EndpointTestAid.to_json() - -# convert the object into a dict -endpoint_test_aid_dict = endpoint_test_aid_instance.to_dict() -# create an instance of EndpointTestAid from a dict -endpoint_test_aid_form_dict = endpoint_test_aid.from_dict(endpoint_test_aid_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/endpoint/tests_api/docs/EndpointTestAuthType.md b/endpoint/tests_api/docs/EndpointTestAuthType.md deleted file mode 100644 index 979915c2..00000000 --- a/endpoint/tests_api/docs/EndpointTestAuthType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestAuthType - -HTTP authentication type. - -## 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/endpoint/tests_api/docs/EndpointTestLinks.md b/endpoint/tests_api/docs/EndpointTestLinks.md deleted file mode 100644 index fb676cca..00000000 --- a/endpoint/tests_api/docs/EndpointTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# EndpointTestLinks - -A list of links that can be accessed to get more information. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**EndpointTestLinksSelf**](EndpointTestLinksSelf.md) | | [optional] -**test_results** | [**EndpointTestLinksTestResults**](EndpointTestLinksTestResults.md) | | [optional] - -## Example - -```python -from tests_api.models.endpoint_test_links import EndpointTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinks from a JSON string -endpoint_test_links_instance = EndpointTestLinks.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinks.to_json() - -# convert the object into a dict -endpoint_test_links_dict = endpoint_test_links_instance.to_dict() -# create an instance of EndpointTestLinks from a dict -endpoint_test_links_form_dict = endpoint_test_links.from_dict(endpoint_test_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/endpoint/tests_api/docs/EndpointTestLinksSelf.md b/endpoint/tests_api/docs/EndpointTestLinksSelf.md deleted file mode 100644 index 54709a6c..00000000 --- a/endpoint/tests_api/docs/EndpointTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointTestLinksSelf - - -## 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 tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinksSelf from a JSON string -endpoint_test_links_self_instance = EndpointTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinksSelf.to_json() - -# convert the object into a dict -endpoint_test_links_self_dict = endpoint_test_links_self_instance.to_dict() -# create an instance of EndpointTestLinksSelf from a dict -endpoint_test_links_self_form_dict = endpoint_test_links_self.from_dict(endpoint_test_links_self_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/endpoint/tests_api/docs/EndpointTestLinksTestResults.md b/endpoint/tests_api/docs/EndpointTestLinksTestResults.md deleted file mode 100644 index 02247f1d..00000000 --- a/endpoint/tests_api/docs/EndpointTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# EndpointTestLinksTestResults - - -## 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 tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of EndpointTestLinksTestResults from a JSON string -endpoint_test_links_test_results_instance = EndpointTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print EndpointTestLinksTestResults.to_json() - -# convert the object into a dict -endpoint_test_links_test_results_dict = endpoint_test_links_test_results_instance.to_dict() -# create an instance of EndpointTestLinksTestResults from a dict -endpoint_test_links_test_results_form_dict = endpoint_test_links_test_results.from_dict(endpoint_test_links_test_results_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/endpoint/tests_api/docs/EndpointTestProtocol.md b/endpoint/tests_api/docs/EndpointTestProtocol.md deleted file mode 100644 index c1e002b3..00000000 --- a/endpoint/tests_api/docs/EndpointTestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# EndpointTestProtocol - -Protocol used to perform the test. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/tests_api/docs/Error.md b/endpoint/tests_api/docs/Error.md deleted file mode 100644 index 7bc50c49..00000000 --- a/endpoint/tests_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 tests_api.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_form_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/endpoint/tests_api/docs/GetDynamicTestDetail200Response.md b/endpoint/tests_api/docs/GetDynamicTestDetail200Response.md deleted file mode 100644 index ab973312..00000000 --- a/endpoint/tests_api/docs/GetDynamicTestDetail200Response.md +++ /dev/null @@ -1,43 +0,0 @@ -# GetDynamicTestDetail200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] [readonly] -**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] -**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [readonly] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] [readonly] -**test_id** | **str** | Each test is assigned a unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] - -## Example - -```python -from tests_api.models.get_dynamic_test_detail200_response import GetDynamicTestDetail200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDynamicTestDetail200Response from a JSON string -get_dynamic_test_detail200_response_instance = GetDynamicTestDetail200Response.from_json(json) -# print the JSON string representation of the object -print GetDynamicTestDetail200Response.to_json() - -# convert the object into a dict -get_dynamic_test_detail200_response_dict = get_dynamic_test_detail200_response_instance.to_dict() -# create an instance of GetDynamicTestDetail200Response from a dict -get_dynamic_test_detail200_response_form_dict = get_dynamic_test_detail200_response.from_dict(get_dynamic_test_detail200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/tests_api/docs/GetEndpointAgentToserverTestsList200Response.md b/endpoint/tests_api/docs/GetEndpointAgentToserverTestsList200Response.md deleted file mode 100644 index 1f014f1c..00000000 --- a/endpoint/tests_api/docs/GetEndpointAgentToserverTestsList200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetEndpointAgentToserverTestsList200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[EndpointAgentToServerTest]**](EndpointAgentToServerTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEndpointAgentToserverTestsList200Response from a JSON string -get_endpoint_agent_toserver_tests_list200_response_instance = GetEndpointAgentToserverTestsList200Response.from_json(json) -# print the JSON string representation of the object -print GetEndpointAgentToserverTestsList200Response.to_json() - -# convert the object into a dict -get_endpoint_agent_toserver_tests_list200_response_dict = get_endpoint_agent_toserver_tests_list200_response_instance.to_dict() -# create an instance of GetEndpointAgentToserverTestsList200Response from a dict -get_endpoint_agent_toserver_tests_list200_response_form_dict = get_endpoint_agent_toserver_tests_list200_response.from_dict(get_endpoint_agent_toserver_tests_list200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/tests_api/docs/GetEndpointHttpserverTestDetail200Response.md b/endpoint/tests_api/docs/GetEndpointHttpserverTestDetail200Response.md deleted file mode 100644 index a709ea08..00000000 --- a/endpoint/tests_api/docs/GetEndpointHttpserverTestDetail200Response.md +++ /dev/null @@ -1,58 +0,0 @@ -# GetEndpointHttpserverTestDetail200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointHttpServerType**](EndpointHttpServerType.md) | | [optional] -**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] -**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] -**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.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] -**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] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] - -## Example - -```python -from tests_api.models.get_endpoint_httpserver_test_detail200_response import GetEndpointHttpserverTestDetail200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEndpointHttpserverTestDetail200Response from a JSON string -get_endpoint_httpserver_test_detail200_response_instance = GetEndpointHttpserverTestDetail200Response.from_json(json) -# print the JSON string representation of the object -print GetEndpointHttpserverTestDetail200Response.to_json() - -# convert the object into a dict -get_endpoint_httpserver_test_detail200_response_dict = get_endpoint_httpserver_test_detail200_response_instance.to_dict() -# create an instance of GetEndpointHttpserverTestDetail200Response from a dict -get_endpoint_httpserver_test_detail200_response_form_dict = get_endpoint_httpserver_test_detail200_response.from_dict(get_endpoint_httpserver_test_detail200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/tests_api/docs/Link.md b/endpoint/tests_api/docs/Link.md deleted file mode 100644 index 5ea009ee..00000000 --- a/endpoint/tests_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 tests_api.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_form_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/endpoint/tests_api/docs/PostEndpointAgentToServerTest201Response.md b/endpoint/tests_api/docs/PostEndpointAgentToServerTest201Response.md deleted file mode 100644 index 795fddd3..00000000 --- a/endpoint/tests_api/docs/PostEndpointAgentToServerTest201Response.md +++ /dev/null @@ -1,43 +0,0 @@ -# PostEndpointAgentToServerTest201Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] -**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] -**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**server** | **str** | Target domain name or IP address. | [optional] -**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] -**test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointAgentToServerType**](EndpointAgentToServerType.md) | | [optional] - -## Example - -```python -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostEndpointAgentToServerTest201Response from a JSON string -post_endpoint_agent_to_server_test201_response_instance = PostEndpointAgentToServerTest201Response.from_json(json) -# print the JSON string representation of the object -print PostEndpointAgentToServerTest201Response.to_json() - -# convert the object into a dict -post_endpoint_agent_to_server_test201_response_dict = post_endpoint_agent_to_server_test201_response_instance.to_dict() -# create an instance of PostEndpointAgentToServerTest201Response from a dict -post_endpoint_agent_to_server_test201_response_form_dict = post_endpoint_agent_to_server_test201_response.from_dict(post_endpoint_agent_to_server_test201_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/endpoint/tests_api/docs/ScheduledTestsAgentToServerApi.md b/endpoint/tests_api/docs/ScheduledTestsAgentToServerApi.md deleted file mode 100644 index f24f771a..00000000 --- a/endpoint/tests_api/docs/ScheduledTestsAgentToServerApi.md +++ /dev/null @@ -1,268 +0,0 @@ -# tests_api.ScheduledTestsAgentToServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**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_toserver_tests_list**](ScheduledTestsAgentToServerApi.md#get_endpoint_agent_toserver_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 - - -# **get_endpoint_agent_to_server_detail** -> PostEndpointAgentToServerTest201Response 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 time -import os -import tests_api -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.ScheduledTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - aid = '2067' # 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 - -[**PostEndpointAgentToServerTest201Response**](PostEndpointAgentToServerTest201Response.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_toserver_tests_list** -> GetEndpointAgentToserverTestsList200Response get_endpoint_agent_toserver_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 time -import os -import tests_api -from tests_api.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.ScheduledTestsAgentToServerApi(api_client) - aid = '2067' # 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_toserver_tests_list(aid=aid) - print("The response of ScheduledTestsAgentToServerApi->get_endpoint_agent_toserver_tests_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->get_endpoint_agent_toserver_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 - -[**GetEndpointAgentToserverTestsList200Response**](GetEndpointAgentToserverTestsList200Response.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** -> PostEndpointAgentToServerTest201Response post_endpoint_agent_to_server_test(endpoint_agent_to_server_test_request, aid=aid) - -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. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.ScheduledTestsAgentToServerApi(api_client) - endpoint_agent_to_server_test_request = tests_api.EndpointAgentToServerTestRequest() # EndpointAgentToServerTestRequest | - aid = '2067' # 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: - # 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") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->post_endpoint_agent_to_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **endpoint_agent_to_server_test_request** | [**EndpointAgentToServerTestRequest**](EndpointAgentToServerTestRequest.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 - -[**PostEndpointAgentToServerTest201Response**](PostEndpointAgentToServerTest201Response.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 | - | -**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) - diff --git a/endpoint/tests_api/docs/ScheduledTestsHTTPServerApi.md b/endpoint/tests_api/docs/ScheduledTestsHTTPServerApi.md deleted file mode 100644 index f7c8a078..00000000 --- a/endpoint/tests_api/docs/ScheduledTestsHTTPServerApi.md +++ /dev/null @@ -1,268 +0,0 @@ -# tests_api.ScheduledTestsHTTPServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**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 - - -# **get_endpoint_httpserver_test_detail** -> GetEndpointHttpserverTestDetail200Response 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 time -import os -import tests_api -from tests_api.models.get_endpoint_httpserver_test_detail200_response import GetEndpointHttpserverTestDetail200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.ScheduledTestsHTTPServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - aid = '2067' # 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 - -[**GetEndpointHttpserverTestDetail200Response**](GetEndpointHttpserverTestDetail200Response.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** -> GetEndpointHttpserverTestsList200Response 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 time -import os -import tests_api -from tests_api.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.ScheduledTestsHTTPServerApi(api_client) - aid = '2067' # 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 - -[**GetEndpointHttpserverTestsList200Response**](GetEndpointHttpserverTestsList200Response.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 - -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. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from tests_api.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.ScheduledTestsHTTPServerApi(api_client) - endpoint_http_server_test_request = tests_api.EndpointHttpServerTestRequest() # EndpointHttpServerTestRequest | - aid = '2067' # 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 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") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsHTTPServerApi->post_endpoint_httpserver_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **endpoint_http_server_test_request** | [**EndpointHttpServerTestRequest**](EndpointHttpServerTestRequest.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 - -[**EndpointHttpServerTest**](EndpointHttpServerTest.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 | - | -**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) - diff --git a/endpoint/tests_api/docs/SelfLinks.md b/endpoint/tests_api/docs/SelfLinks.md deleted file mode 100644 index 1d2c760d..00000000 --- a/endpoint/tests_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.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_form_dict = self_links.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/endpoint/tests_api/docs/SelfLinksLinks.md b/endpoint/tests_api/docs/SelfLinksLinks.md deleted file mode 100644 index acf19c78..00000000 --- a/endpoint/tests_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from tests_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/endpoint/tests_api/docs/SpecificAgentsSelectorType.md b/endpoint/tests_api/docs/SpecificAgentsSelectorType.md deleted file mode 100644 index e0b875a0..00000000 --- a/endpoint/tests_api/docs/SpecificAgentsSelectorType.md +++ /dev/null @@ -1,10 +0,0 @@ -# SpecificAgentsSelectorType - - -## 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/endpoint/tests_api/docs/TestInterval.md b/endpoint/tests_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/endpoint/tests_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/endpoint/tests_api/docs/TestProbeMode.md b/endpoint/tests_api/docs/TestProbeMode.md deleted file mode 100644 index 2e0ad614..00000000 --- a/endpoint/tests_api/docs/TestProbeMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProbeMode - -Probe mode used by network test, only valid when the protocol is set to TCP. - -## 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/endpoint/tests_api/docs/TestSslVersionId.md b/endpoint/tests_api/docs/TestSslVersionId.md deleted file mode 100644 index fb9ac0f8..00000000 --- a/endpoint/tests_api/docs/TestSslVersionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestSslVersionId - -SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - -## 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/endpoint/tests_api/docs/UnauthorizedError.md b/endpoint/tests_api/docs/UnauthorizedError.md deleted file mode 100644 index 55006614..00000000 --- a/endpoint/tests_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from tests_api.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_form_dict = unauthorized_error.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/endpoint/tests_api/git_push.sh b/endpoint/tests_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/endpoint/tests_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/endpoint/tests_api/pyproject.toml b/endpoint/tests_api/pyproject.toml deleted file mode 100644 index c1cb484b..00000000 --- a/endpoint/tests_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "tests_api" -version = "1.0.0" -description = "Endpoint Tests API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Tests API"] -include = ["tests_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/endpoint/tests_api/setup.py b/endpoint/tests_api/setup.py deleted file mode 100644 index 27a660b8..00000000 --- a/endpoint/tests_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "tests-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Endpoint Tests API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Endpoint Tests API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - """, # noqa: E501 - package_data={"tests_api": ["py.typed"]}, -) diff --git a/endpoint/tests_api/test-requirements.txt b/endpoint/tests_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/endpoint/tests_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/endpoint/tests_api/test/test_account_group_id.py b/endpoint/tests_api/test/test_account_group_id.py deleted file mode 100644 index f5825497..00000000 --- a/endpoint/tests_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_agent_labels_selector_type.py b/endpoint/tests_api/test/test_agent_labels_selector_type.py deleted file mode 100644 index ba298551..00000000 --- a/endpoint/tests_api/test/test_agent_labels_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType - -class TestAgentLabelsSelectorType(unittest.TestCase): - """AgentLabelsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentLabelsSelectorType(self): - """Test AgentLabelsSelectorType""" - # inst = AgentLabelsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_all_agents_selector_type.py b/endpoint/tests_api/test/test_all_agents_selector_type.py deleted file mode 100644 index 1399901d..00000000 --- a/endpoint/tests_api/test/test_all_agents_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.all_agents_selector_type import AllAgentsSelectorType - -class TestAllAgentsSelectorType(unittest.TestCase): - """AllAgentsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAllAgentsSelectorType(self): - """Test AllAgentsSelectorType""" - # inst = AllAgentsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_test.py b/endpoint/tests_api/test/test_dynamic_test.py deleted file mode 100644 index 5737bbb9..00000000 --- a/endpoint/tests_api/test/test_dynamic_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dynamic_test import DynamicTest - -class TestDynamicTest(unittest.TestCase): - """DynamicTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTest: - """Test DynamicTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTest` - """ - model = DynamicTest() - if include_optional: - return DynamicTest( - links = tests_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = True, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - protocol = 'icmp', - tcp_probe_mode = 'auto', - test_id = '281474976710706', - aid = None, - test_name = 'Test name' - ) - else: - return DynamicTest( - ) - """ - - def testDynamicTest(self): - """Test DynamicTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_test_application.py b/endpoint/tests_api/test/test_dynamic_test_application.py deleted file mode 100644 index 3c81a700..00000000 --- a/endpoint/tests_api/test/test_dynamic_test_application.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dynamic_test_application import DynamicTestApplication - -class TestDynamicTestApplication(unittest.TestCase): - """DynamicTestApplication unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDynamicTestApplication(self): - """Test DynamicTestApplication""" - # inst = DynamicTestApplication() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_test_links.py b/endpoint/tests_api/test/test_dynamic_test_links.py deleted file mode 100644 index 820a585e..00000000 --- a/endpoint/tests_api/test/test_dynamic_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dynamic_test_links import DynamicTestLinks - -class TestDynamicTestLinks(unittest.TestCase): - """DynamicTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTestLinks: - """Test DynamicTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTestLinks` - """ - model = DynamicTestLinks() - if include_optional: - return DynamicTestLinks( - var_self = None, - test_results = [{"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"}] - ) - else: - return DynamicTestLinks( - ) - """ - - def testDynamicTestLinks(self): - """Test DynamicTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_test_links_self.py b/endpoint/tests_api/test/test_dynamic_test_links_self.py deleted file mode 100644 index bc9eaa98..00000000 --- a/endpoint/tests_api/test/test_dynamic_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dynamic_test_links_self import DynamicTestLinksSelf - -class TestDynamicTestLinksSelf(unittest.TestCase): - """DynamicTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTestLinksSelf: - """Test DynamicTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTestLinksSelf` - """ - model = DynamicTestLinksSelf() - if include_optional: - return DynamicTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return DynamicTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testDynamicTestLinksSelf(self): - """Test DynamicTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_test_links_test_results.py b/endpoint/tests_api/test/test_dynamic_test_links_test_results.py deleted file mode 100644 index bb781385..00000000 --- a/endpoint/tests_api/test/test_dynamic_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults - -class TestDynamicTestLinksTestResults(unittest.TestCase): - """DynamicTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTestLinksTestResults: - """Test DynamicTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTestLinksTestResults` - """ - model = DynamicTestLinksTestResults() - if include_optional: - return DynamicTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return DynamicTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testDynamicTestLinksTestResults(self): - """Test DynamicTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_tests.py b/endpoint/tests_api/test/test_dynamic_tests.py deleted file mode 100644 index f5cf7f8f..00000000 --- a/endpoint/tests_api/test/test_dynamic_tests.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dynamic_tests import DynamicTests - -class TestDynamicTests(unittest.TestCase): - """DynamicTests unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DynamicTests: - """Test DynamicTests - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DynamicTests` - """ - model = DynamicTests() - if include_optional: - return DynamicTests( - tests = [ - tests_api.models.dynamic_test.DynamicTest( - _links = tests_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ) - ] - ) - else: - return DynamicTests( - ) - """ - - def testDynamicTests(self): - """Test DynamicTests""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_tests_agent_to_server_api.py b/endpoint/tests_api/test/test_dynamic_tests_agent_to_server_api.py deleted file mode 100644 index 1eb12d7d..00000000 --- a/endpoint/tests_api/test/test_dynamic_tests_agent_to_server_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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_get_dynamic_test_detail(self) -> None: - """Test case for get_dynamic_test_detail - - Retrieve endpoint dynamic test - """ - pass - - def test_get_dynamic_tests_list(self) -> None: - """Test case for get_dynamic_tests_list - - List endpoint dynamic tests - """ - pass - - def test_post_dynamic_test(self) -> None: - """Test case for post_dynamic_test - - Create endpoint dynamic test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_agent_labels_selector_config.py b/endpoint/tests_api/test/test_endpoint_agent_labels_selector_config.py deleted file mode 100644 index 5009c5db..00000000 --- a/endpoint/tests_api/test/test_endpoint_agent_labels_selector_config.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig - -class TestEndpointAgentLabelsSelectorConfig(unittest.TestCase): - """EndpointAgentLabelsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentLabelsSelectorConfig: - """Test EndpointAgentLabelsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentLabelsSelectorConfig` - """ - model = EndpointAgentLabelsSelectorConfig() - if include_optional: - return EndpointAgentLabelsSelectorConfig( - agent_selector_type = 'agent-labels', - max_machines = 10, - endpoint_agent_labels = ["567","214"] - ) - else: - return EndpointAgentLabelsSelectorConfig( - ) - """ - - def testEndpointAgentLabelsSelectorConfig(self): - """Test EndpointAgentLabelsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_agent_selector_config.py b/endpoint/tests_api/test/test_endpoint_agent_selector_config.py deleted file mode 100644 index b897da84..00000000 --- a/endpoint/tests_api/test/test_endpoint_agent_selector_config.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig - -class TestEndpointAgentSelectorConfig(unittest.TestCase): - """EndpointAgentSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentSelectorConfig: - """Test EndpointAgentSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentSelectorConfig` - """ - model = EndpointAgentSelectorConfig() - if include_optional: - return EndpointAgentSelectorConfig( - agent_selector_type = 'specific-agents', - max_machines = 10, - endpoint_agent_labels = ["567","214"], - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] - ) - else: - return EndpointAgentSelectorConfig( - ) - """ - - def testEndpointAgentSelectorConfig(self): - """Test EndpointAgentSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_agent_to_server_instant_test.py b/endpoint/tests_api/test/test_endpoint_agent_to_server_instant_test.py deleted file mode 100644 index e4287ade..00000000 --- a/endpoint/tests_api/test/test_endpoint_agent_to_server_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest - -class TestEndpointAgentToServerInstantTest(unittest.TestCase): - """EndpointAgentToServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentToServerInstantTest: - """Test EndpointAgentToServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentToServerInstantTest` - """ - model = EndpointAgentToServerInstantTest() - if include_optional: - return EndpointAgentToServerInstantTest( - agent_selector_type = 'all-agents', - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], - has_ping = True, - has_traceroute = True, - endpoint_agent_labels = ["567","214"], - max_machines = 10, - port = 80, - test_name = 'Test name', - server_name = 'www.example.com' - ) - else: - return EndpointAgentToServerInstantTest( - agent_selector_type = 'all-agents', - max_machines = 10, - test_name = 'Test name', - server_name = 'www.example.com', - ) - """ - - def testEndpointAgentToServerInstantTest(self): - """Test EndpointAgentToServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_agent_to_server_test.py b/endpoint/tests_api/test/test_endpoint_agent_to_server_test.py deleted file mode 100644 index 630b102c..00000000 --- a/endpoint/tests_api/test/test_endpoint_agent_to_server_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -class TestEndpointAgentToServerTest(unittest.TestCase): - """EndpointAgentToServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentToServerTest: - """Test EndpointAgentToServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentToServerTest` - """ - model = EndpointAgentToServerTest() - if include_optional: - return EndpointAgentToServerTest( - links = tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return EndpointAgentToServerTest( - ) - """ - - def testEndpointAgentToServerTest(self): - """Test EndpointAgentToServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_agent_to_server_type.py b/endpoint/tests_api/test/test_endpoint_agent_to_server_type.py deleted file mode 100644 index 1582afa2..00000000 --- a/endpoint/tests_api/test/test_endpoint_agent_to_server_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType - -class TestEndpointAgentToServerType(unittest.TestCase): - """EndpointAgentToServerType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointAgentToServerType(self): - """Test EndpointAgentToServerType""" - # inst = EndpointAgentToServerType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_all_agents_selector_config.py b/endpoint/tests_api/test/test_endpoint_all_agents_selector_config.py deleted file mode 100644 index 042649d9..00000000 --- a/endpoint/tests_api/test/test_endpoint_all_agents_selector_config.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig - -class TestEndpointAllAgentsSelectorConfig(unittest.TestCase): - """EndpointAllAgentsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAllAgentsSelectorConfig: - """Test EndpointAllAgentsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAllAgentsSelectorConfig` - """ - model = EndpointAllAgentsSelectorConfig() - if include_optional: - return EndpointAllAgentsSelectorConfig( - agent_selector_type = 'all-agents', - max_machines = 10 - ) - else: - return EndpointAllAgentsSelectorConfig( - ) - """ - - def testEndpointAllAgentsSelectorConfig(self): - """Test EndpointAllAgentsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_http_server_base_test.py b/endpoint/tests_api/test/test_endpoint_http_server_base_test.py deleted file mode 100644 index 789bedb0..00000000 --- a/endpoint/tests_api/test/test_endpoint_http_server_base_test.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest - -class TestEndpointHttpServerBaseTest(unittest.TestCase): - """EndpointHttpServerBaseTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerBaseTest: - """Test EndpointHttpServerBaseTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerBaseTest` - """ - model = EndpointHttpServerBaseTest() - if include_optional: - return EndpointHttpServerBaseTest( - auth_type = 'none', - has_path_trace_in_session = True, - http_time_limit = 5000, - protocol = 'icmp', - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False - ) - else: - return EndpointHttpServerBaseTest( - ) - """ - - def testEndpointHttpServerBaseTest(self): - """Test EndpointHttpServerBaseTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_http_server_instant_test.py b/endpoint/tests_api/test/test_endpoint_http_server_instant_test.py deleted file mode 100644 index 06de8cf4..00000000 --- a/endpoint/tests_api/test/test_endpoint_http_server_instant_test.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest - -class TestEndpointHttpServerInstantTest(unittest.TestCase): - """EndpointHttpServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerInstantTest: - """Test EndpointHttpServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerInstantTest` - """ - model = EndpointHttpServerInstantTest() - if include_optional: - return EndpointHttpServerInstantTest( - agent_selector_type = 'all-agents', - agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], - has_ping = True, - has_traceroute = True, - endpoint_agent_labels = [567, 214], - max_machines = 10, - port = 80, - test_name = 'Test name', - auth_type = 'none', - has_path_trace_in_session = True, - http_time_limit = 5000, - protocol = 'icmp', - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - target_response_time = 1000, - password = 'password' - ) - else: - return EndpointHttpServerInstantTest( - agent_selector_type = 'all-agents', - max_machines = 10, - test_name = 'Test name', - http_time_limit = 5000, - url = 'www.example.com', - ssl_version_id = '0', - verify_certificate = False, - target_response_time = 1000, - ) - """ - - def testEndpointHttpServerInstantTest(self): - """Test EndpointHttpServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_http_server_test.py b/endpoint/tests_api/test/test_endpoint_http_server_test.py deleted file mode 100644 index f6e67f64..00000000 --- a/endpoint/tests_api/test/test_endpoint_http_server_test.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest - -class TestEndpointHttpServerTest(unittest.TestCase): - """EndpointHttpServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointHttpServerTest: - """Test EndpointHttpServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointHttpServerTest` - """ - model = EndpointHttpServerTest() - if include_optional: - return EndpointHttpServerTest( - links = tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'http-server', - auth_type = 'none', - http_time_limit = 5000, - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - content_regex = '(regex)+', - follow_redirects = True, - http_target_time = 100, - http_version = 1, - post_body = 'body', - ssl_version = 'Auto', - use_ntlm = False, - user_agent = 'curl' - ) - else: - return EndpointHttpServerTest( - ) - """ - - def testEndpointHttpServerTest(self): - """Test EndpointHttpServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_http_server_type.py b/endpoint/tests_api/test/test_endpoint_http_server_type.py deleted file mode 100644 index 234274de..00000000 --- a/endpoint/tests_api/test/test_endpoint_http_server_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_http_server_type import EndpointHttpServerType - -class TestEndpointHttpServerType(unittest.TestCase): - """EndpointHttpServerType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointHttpServerType(self): - """Test EndpointHttpServerType""" - # inst = EndpointHttpServerType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_instant_test.py b/endpoint/tests_api/test/test_endpoint_instant_test.py deleted file mode 100644 index 8f53277d..00000000 --- a/endpoint/tests_api/test/test_endpoint_instant_test.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_instant_test import EndpointInstantTest - -class TestEndpointInstantTest(unittest.TestCase): - """EndpointInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointInstantTest: - """Test EndpointInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointInstantTest` - """ - model = EndpointInstantTest() - if include_optional: - return EndpointInstantTest( - agent_selector_type = 'all-agents', - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], - has_ping = True, - has_traceroute = True, - endpoint_agent_labels = ["567","214"], - max_machines = 10, - port = 80, - test_name = 'Test name' - ) - else: - return EndpointInstantTest( - agent_selector_type = 'all-agents', - max_machines = 10, - test_name = 'Test name', - ) - """ - - def testEndpointInstantTest(self): - """Test EndpointInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_scheduled_test_type.py b/endpoint/tests_api/test/test_endpoint_scheduled_test_type.py deleted file mode 100644 index e8fcb7fd..00000000 --- a/endpoint/tests_api/test/test_endpoint_scheduled_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType - -class TestEndpointScheduledTestType(unittest.TestCase): - """EndpointScheduledTestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointScheduledTestType(self): - """Test EndpointScheduledTestType""" - # inst = EndpointScheduledTestType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_specific_agents_selector_config.py b/endpoint/tests_api/test/test_endpoint_specific_agents_selector_config.py deleted file mode 100644 index 0072eae4..00000000 --- a/endpoint/tests_api/test/test_endpoint_specific_agents_selector_config.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig - -class TestEndpointSpecificAgentsSelectorConfig(unittest.TestCase): - """EndpointSpecificAgentsSelectorConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointSpecificAgentsSelectorConfig: - """Test EndpointSpecificAgentsSelectorConfig - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointSpecificAgentsSelectorConfig` - """ - model = EndpointSpecificAgentsSelectorConfig() - if include_optional: - return EndpointSpecificAgentsSelectorConfig( - agent_selector_type = 'specific-agents', - max_machines = 10, - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] - ) - else: - return EndpointSpecificAgentsSelectorConfig( - ) - """ - - def testEndpointSpecificAgentsSelectorConfig(self): - """Test EndpointSpecificAgentsSelectorConfig""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test.py b/endpoint/tests_api/test/test_endpoint_test.py deleted file mode 100644 index 4e9de434..00000000 --- a/endpoint/tests_api/test/test_endpoint_test.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test import EndpointTest - -class TestEndpointTest(unittest.TestCase): - """EndpointTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTest: - """Test EndpointTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTest` - """ - model = EndpointTest() - if include_optional: - return EndpointTest( - links = tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return EndpointTest( - ) - """ - - def testEndpointTest(self): - """Test EndpointTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_agent_selector_type.py b/endpoint/tests_api/test/test_endpoint_test_agent_selector_type.py deleted file mode 100644 index 7861989f..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_agent_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType - -class TestEndpointTestAgentSelectorType(unittest.TestCase): - """EndpointTestAgentSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestAgentSelectorType(self): - """Test EndpointTestAgentSelectorType""" - # inst = EndpointTestAgentSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_aid.py b/endpoint/tests_api/test/test_endpoint_test_aid.py deleted file mode 100644 index 42631a49..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_aid.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_aid import EndpointTestAid - -class TestEndpointTestAid(unittest.TestCase): - """EndpointTestAid unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestAid: - """Test EndpointTestAid - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestAid` - """ - model = EndpointTestAid() - if include_optional: - return EndpointTestAid( - aid = '11' - ) - else: - return EndpointTestAid( - ) - """ - - def testEndpointTestAid(self): - """Test EndpointTestAid""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_auth_type.py b/endpoint/tests_api/test/test_endpoint_test_auth_type.py deleted file mode 100644 index 59490f7e..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_auth_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType - -class TestEndpointTestAuthType(unittest.TestCase): - """EndpointTestAuthType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestAuthType(self): - """Test EndpointTestAuthType""" - # inst = EndpointTestAuthType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_links.py b/endpoint/tests_api/test/test_endpoint_test_links.py deleted file mode 100644 index 2fc9f8e3..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_links import EndpointTestLinks - -class TestEndpointTestLinks(unittest.TestCase): - """EndpointTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinks: - """Test EndpointTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinks` - """ - model = EndpointTestLinks() - if include_optional: - return EndpointTestLinks( - var_self = None, - test_results = [{"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"}] - ) - else: - return EndpointTestLinks( - ) - """ - - def testEndpointTestLinks(self): - """Test EndpointTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_links_self.py b/endpoint/tests_api/test/test_endpoint_test_links_self.py deleted file mode 100644 index a676a512..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf - -class TestEndpointTestLinksSelf(unittest.TestCase): - """EndpointTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinksSelf: - """Test EndpointTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinksSelf` - """ - model = EndpointTestLinksSelf() - if include_optional: - return EndpointTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return EndpointTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testEndpointTestLinksSelf(self): - """Test EndpointTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_links_test_results.py b/endpoint/tests_api/test/test_endpoint_test_links_test_results.py deleted file mode 100644 index 4d149584..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults - -class TestEndpointTestLinksTestResults(unittest.TestCase): - """EndpointTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTestLinksTestResults: - """Test EndpointTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTestLinksTestResults` - """ - model = EndpointTestLinksTestResults() - if include_optional: - return EndpointTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return EndpointTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testEndpointTestLinksTestResults(self): - """Test EndpointTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_test_protocol.py b/endpoint/tests_api/test/test_endpoint_test_protocol.py deleted file mode 100644 index 2a178d36..00000000 --- a/endpoint/tests_api/test/test_endpoint_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol - -class TestEndpointTestProtocol(unittest.TestCase): - """EndpointTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointTestProtocol(self): - """Test EndpointTestProtocol""" - # inst = EndpointTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_tests.py b/endpoint/tests_api/test/test_endpoint_tests.py deleted file mode 100644 index 9264d059..00000000 --- a/endpoint/tests_api/test/test_endpoint_tests.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.endpoint_tests import EndpointTests - -class TestEndpointTests(unittest.TestCase): - """EndpointTests unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointTests: - """Test EndpointTests - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointTests` - """ - model = EndpointTests() - if include_optional: - return EndpointTests( - tests = [ - tests_api.models.endpoint_test.EndpointTest( - _links = tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = null, - test_name = 'Test name', - type = 'agent-to-server', ) - ] - ) - else: - return EndpointTests( - ) - """ - - def testEndpointTests(self): - """Test EndpointTests""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_error.py b/endpoint/tests_api/test/test_error.py deleted file mode 100644 index 24240de1..00000000 --- a/endpoint/tests_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_get_dynamic_test_detail200_response.py b/endpoint/tests_api/test/test_get_dynamic_test_detail200_response.py deleted file mode 100644 index 21e6c019..00000000 --- a/endpoint/tests_api/test/test_get_dynamic_test_detail200_response.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_dynamic_test_detail200_response import GetDynamicTestDetail200Response - -class TestGetDynamicTestDetail200Response(unittest.TestCase): - """GetDynamicTestDetail200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDynamicTestDetail200Response: - """Test GetDynamicTestDetail200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDynamicTestDetail200Response` - """ - model = GetDynamicTestDetail200Response() - if include_optional: - return GetDynamicTestDetail200Response( - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = True, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - protocol = 'icmp', - tcp_probe_mode = 'auto', - test_id = '281474976710706', - aid = None, - test_name = 'Test name' - ) - else: - return GetDynamicTestDetail200Response( - ) - """ - - def testGetDynamicTestDetail200Response(self): - """Test GetDynamicTestDetail200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_get_dynamic_tests_list200_response.py b/endpoint/tests_api/test/test_get_dynamic_tests_list200_response.py deleted file mode 100644 index a400d093..00000000 --- a/endpoint/tests_api/test/test_get_dynamic_tests_list200_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response - -class TestGetDynamicTestsList200Response(unittest.TestCase): - """GetDynamicTestsList200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDynamicTestsList200Response: - """Test GetDynamicTestsList200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDynamicTestsList200Response` - """ - model = GetDynamicTestsList200Response() - if include_optional: - return GetDynamicTestsList200Response( - tests = [ - tests_api.models.dynamic_test.DynamicTest( - _links = tests_api.models.dynamic_test_links.DynamicTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - application = 'webex', - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - has_path_trace_in_session = null, - has_ping = True, - has_traceroute = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = null, - protocol = 'icmp', - tcp_probe_mode = null, - test_id = '281474976710706', - aid = null, - test_name = 'Test name', ) - ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetDynamicTestsList200Response( - ) - """ - - def testGetDynamicTestsList200Response(self): - """Test GetDynamicTestsList200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_get_endpoint_httpserver_test_detail200_response.py b/endpoint/tests_api/test/test_get_endpoint_httpserver_test_detail200_response.py deleted file mode 100644 index f25cdd29..00000000 --- a/endpoint/tests_api/test/test_get_endpoint_httpserver_test_detail200_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_endpoint_httpserver_test_detail200_response import GetEndpointHttpserverTestDetail200Response - -class TestGetEndpointHttpserverTestDetail200Response(unittest.TestCase): - """GetEndpointHttpserverTestDetail200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetEndpointHttpserverTestDetail200Response: - """Test GetEndpointHttpserverTestDetail200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetEndpointHttpserverTestDetail200Response` - """ - model = GetEndpointHttpserverTestDetail200Response() - if include_optional: - return GetEndpointHttpserverTestDetail200Response( - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'http-server', - auth_type = 'none', - http_time_limit = 5000, - url = 'www.example.com', - username = 'username', - ssl_version_id = '0', - tcp_probe_mode = 'auto', - verify_certificate = False, - content_regex = '(regex)+', - follow_redirects = True, - http_target_time = 100, - http_version = 1, - post_body = 'body', - ssl_version = 'Auto', - use_ntlm = False, - user_agent = 'curl' - ) - else: - return GetEndpointHttpserverTestDetail200Response( - ) - """ - - def testGetEndpointHttpserverTestDetail200Response(self): - """Test GetEndpointHttpserverTestDetail200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_get_endpoint_tests_list200_response.py b/endpoint/tests_api/test/test_get_endpoint_tests_list200_response.py deleted file mode 100644 index 48db68e6..00000000 --- a/endpoint/tests_api/test/test_get_endpoint_tests_list200_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response - -class TestGetEndpointTestsList200Response(unittest.TestCase): - """GetEndpointTestsList200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetEndpointTestsList200Response: - """Test GetEndpointTestsList200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetEndpointTestsList200Response` - """ - model = GetEndpointTestsList200Response() - if include_optional: - return GetEndpointTestsList200Response( - tests = [ - tests_api.models.endpoint_test.EndpointTest( - _links = tests_api.models.endpoint_test_links.EndpointTestLinks( - self = null, - test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = null, - test_name = 'Test name', - type = 'agent-to-server', ) - ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetEndpointTestsList200Response( - ) - """ - - def testGetEndpointTestsList200Response(self): - """Test GetEndpointTestsList200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_link.py b/endpoint/tests_api/test/test_link.py deleted file mode 100644 index 32283cee..00000000 --- a/endpoint/tests_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_list_endpoint_scheduled_tests_api.py b/endpoint/tests_api/test/test_list_endpoint_scheduled_tests_api.py deleted file mode 100644 index 50ff1c66..00000000 --- a/endpoint/tests_api/test/test_list_endpoint_scheduled_tests_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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_tests_list(self) -> None: - """Test case for get_endpoint_tests_list - - List endpoint scheduled tests - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_post_endpoint_agent_to_server_test201_response.py b/endpoint/tests_api/test/test_post_endpoint_agent_to_server_test201_response.py deleted file mode 100644 index 9b9f2c64..00000000 --- a/endpoint/tests_api/test/test_post_endpoint_agent_to_server_test201_response.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response - -class TestPostEndpointAgentToServerTest201Response(unittest.TestCase): - """PostEndpointAgentToServerTest201Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostEndpointAgentToServerTest201Response: - """Test PostEndpointAgentToServerTest201Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostEndpointAgentToServerTest201Response` - """ - model = PostEndpointAgentToServerTest201Response() - if include_optional: - return PostEndpointAgentToServerTest201Response( - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), - created_date = '2022-07-17T22:00:54Z', - interval = 120, - is_enabled = True, - is_saved_event = False, - has_path_trace_in_session = True, - modified_date = '2022-07-17T22:00:54Z', - network_measurements = True, - port = 80, - protocol = 'icmp', - server = 'www.example.com', - test_id = '281474976710706', - aid = None, - test_name = 'Test name', - type = 'agent-to-server' - ) - else: - return PostEndpointAgentToServerTest201Response( - ) - """ - - def testPostEndpointAgentToServerTest201Response(self): - """Test PostEndpointAgentToServerTest201Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_scheduled_tests_agent_to_server_api.py b/endpoint/tests_api/test/test_scheduled_tests_agent_to_server_api.py deleted file mode 100644 index a0d33bbb..00000000 --- a/endpoint/tests_api/test/test_scheduled_tests_agent_to_server_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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_get_endpoint_agent_to_server_detail(self) -> None: - """Test case for get_endpoint_agent_to_server_detail - - Retrieve agent to server endpoint scheduled test - """ - pass - - def test_get_endpoint_agent_toserver_tests_list(self) -> None: - """Test case for get_endpoint_agent_toserver_tests_list - - List agent to server endpoint scheduled tests - """ - pass - - def test_post_endpoint_agent_to_server_test(self) -> None: - """Test case for post_endpoint_agent_to_server_test - - Creates agent to server endpoint scheduled test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_scheduled_tests_http_server_api.py b/endpoint/tests_api/test/test_scheduled_tests_http_server_api.py deleted file mode 100644 index ff605784..00000000 --- a/endpoint/tests_api/test/test_scheduled_tests_http_server_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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_get_endpoint_httpserver_test_detail(self) -> None: - """Test case for get_endpoint_httpserver_test_detail - - Retrieves HTTP server endpoint scheduled test - """ - pass - - def test_get_endpoint_httpserver_tests_list(self) -> None: - """Test case for get_endpoint_httpserver_tests_list - - List HTTP server endpoint scheduled tests - """ - pass - - def test_post_endpoint_httpserver_test(self) -> None: - """Test case for post_endpoint_httpserver_test - - Create HTTP server endpoint scheduled test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_self_links.py b/endpoint/tests_api/test/test_self_links.py deleted file mode 100644 index 3c1e151a..00000000 --- a/endpoint/tests_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_self_links_links.py b/endpoint/tests_api/test/test_self_links_links.py deleted file mode 100644 index 62ce610b..00000000 --- a/endpoint/tests_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_specific_agents_selector_type.py b/endpoint/tests_api/test/test_specific_agents_selector_type.py deleted file mode 100644 index b45656f9..00000000 --- a/endpoint/tests_api/test/test_specific_agents_selector_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType - -class TestSpecificAgentsSelectorType(unittest.TestCase): - """SpecificAgentsSelectorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSpecificAgentsSelectorType(self): - """Test SpecificAgentsSelectorType""" - # inst = SpecificAgentsSelectorType() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_test_interval.py b/endpoint/tests_api/test/test_test_interval.py deleted file mode 100644 index 3303c0dc..00000000 --- a/endpoint/tests_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_test_probe_mode.py b/endpoint/tests_api/test/test_test_probe_mode.py deleted file mode 100644 index 07bf29f3..00000000 --- a/endpoint/tests_api/test/test_test_probe_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_probe_mode import TestProbeMode - -class TestTestProbeMode(unittest.TestCase): - """TestProbeMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProbeMode(self): - """Test TestProbeMode""" - # inst = TestProbeMode() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_test_ssl_version_id.py b/endpoint/tests_api/test/test_test_ssl_version_id.py deleted file mode 100644 index 685a1da4..00000000 --- a/endpoint/tests_api/test/test_test_ssl_version_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_ssl_version_id import TestSslVersionId - -class TestTestSslVersionId(unittest.TestCase): - """TestSslVersionId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestSslVersionId(self): - """Test TestSslVersionId""" - # inst = TestSslVersionId() - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/test/test_unauthorized_error.py b/endpoint/tests_api/test/test_unauthorized_error.py deleted file mode 100644 index 66add604..00000000 --- a/endpoint/tests_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/endpoint/tests_api/tests_api/__init__.py b/endpoint/tests_api/tests_api/__init__.py deleted file mode 100644 index 5f430f1e..00000000 --- a/endpoint/tests_api/tests_api/__init__.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 tests_api.api.dynamic_tests_agent_to_server_api import DynamicTestsAgentToServerApi -from tests_api.api.list_endpoint_scheduled_tests_api import ListEndpointScheduledTestsApi -from tests_api.api.scheduled_tests_agent_to_server_api import ScheduledTestsAgentToServerApi -from tests_api.api.scheduled_tests_http_server_api import ScheduledTestsHTTPServerApi - -# import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.api_client import ApiClient -from tests_api.configuration import Configuration -from tests_api.exceptions import OpenApiException -from tests_api.exceptions import ApiTypeError -from tests_api.exceptions import ApiValueError -from tests_api.exceptions import ApiKeyError -from tests_api.exceptions import ApiAttributeError -from tests_api.exceptions import ApiException - -# import models into sdk package -from tests_api.models.account_group_id import AccountGroupId -from tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType -from tests_api.models.all_agents_selector_type import AllAgentsSelectorType -from tests_api.models.dynamic_test import DynamicTest -from tests_api.models.dynamic_test_application import DynamicTestApplication -from tests_api.models.dynamic_test_links import DynamicTestLinks -from tests_api.models.dynamic_test_links_self import DynamicTestLinksSelf -from tests_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults -from tests_api.models.dynamic_test_request import DynamicTestRequest -from tests_api.models.dynamic_tests import DynamicTests -from tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest -from tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from tests_api.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest -from tests_api.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests -from tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest -from tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from tests_api.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest -from tests_api.models.endpoint_http_server_tests import EndpointHttpServerTests -from tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from tests_api.models.endpoint_instant_test import EndpointInstantTest -from tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from tests_api.models.endpoint_test import EndpointTest -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_links import EndpointTestLinks -from tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.endpoint_tests import EndpointTests -from tests_api.models.error import Error -from tests_api.models.get_dynamic_test_detail200_response import GetDynamicTestDetail200Response -from tests_api.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response -from tests_api.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response -from tests_api.models.get_endpoint_httpserver_test_detail200_response import GetEndpointHttpserverTestDetail200Response -from tests_api.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response -from tests_api.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response -from tests_api.models.link import Link -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response -from tests_api.models.self_links import SelfLinks -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unauthorized_error import UnauthorizedError diff --git a/endpoint/tests_api/tests_api/api/__init__.py b/endpoint/tests_api/tests_api/api/__init__.py deleted file mode 100644 index 39bfb477..00000000 --- a/endpoint/tests_api/tests_api/api/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# flake8: noqa - -# import apis into api package -from tests_api.api.dynamic_tests_agent_to_server_api import DynamicTestsAgentToServerApi -from tests_api.api.list_endpoint_scheduled_tests_api import ListEndpointScheduledTestsApi -from tests_api.api.scheduled_tests_agent_to_server_api import ScheduledTestsAgentToServerApi -from tests_api.api.scheduled_tests_http_server_api import ScheduledTestsHTTPServerApi - diff --git a/endpoint/tests_api/tests_api/api/dynamic_tests_agent_to_server_api.py b/endpoint/tests_api/tests_api/api/dynamic_tests_agent_to_server_api.py deleted file mode 100644 index df76aebf..00000000 --- a/endpoint/tests_api/tests_api/api/dynamic_tests_agent_to_server_api.py +++ /dev/null @@ -1,953 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import Optional - -from tests_api.models.dynamic_test import DynamicTest -from tests_api.models.dynamic_test_request import DynamicTestRequest -from tests_api.models.get_dynamic_test_detail200_response import GetDynamicTestDetail200Response -from tests_api.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class DynamicTestsAgentToServerApi: - """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() - self.api_client = api_client - - - @validate_call - def get_dynamic_test_detail( - 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, - _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, - ) -> GetDynamicTestDetail200Response: - """Retrieve endpoint dynamic test - - Returns details of an endpoint dynamic test, including test type, name, intervals, targets. - - :param test_id: Unique ID of endpoint test. (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 _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_detail_serialize( - test_id=test_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': "GetDynamicTestDetail200Response", - '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, - ).data - - - @validate_call - def get_dynamic_test_detail_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, - _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[GetDynamicTestDetail200Response]: - """Retrieve endpoint dynamic test - - Returns details of an endpoint dynamic test, including test type, name, intervals, targets. - - :param test_id: Unique ID of endpoint test. (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 _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_detail_serialize( - test_id=test_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': "GetDynamicTestDetail200Response", - '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, - ) - - - @validate_call - def get_dynamic_test_detail_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, - _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 dynamic test - - Returns details of an endpoint dynamic test, including test type, name, intervals, targets. - - :param test_id: Unique ID of endpoint test. (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 _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_detail_serialize( - test_id=test_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': "GetDynamicTestDetail200Response", - '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_detail_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/dynamic-tests/agent-to-server/{testId}', - 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_tests_list( - 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, - ) -> GetDynamicTestsList200Response: - """List endpoint dynamic tests - - Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. - - :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_tests_list_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': "GetDynamicTestsList200Response", - '401': "UnauthorizedError", - '403': "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, - ).data - - - @validate_call - def get_dynamic_tests_list_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[GetDynamicTestsList200Response]: - """List endpoint dynamic tests - - Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. - - :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_tests_list_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': "GetDynamicTestsList200Response", - '401': "UnauthorizedError", - '403': "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, - ) - - - @validate_call - def get_dynamic_tests_list_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 endpoint dynamic tests - - Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. - - :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_tests_list_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': "GetDynamicTestsList200Response", - '401': "UnauthorizedError", - '403': "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_tests_list_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/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 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': "Error", - '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, - ).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': "Error", - '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, - ) - - - @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': "Error", - '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, - ) -> Tuple: - - _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, str] = {} - _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 - ) - - diff --git a/endpoint/tests_api/tests_api/api/scheduled_tests_agent_to_server_api.py b/endpoint/tests_api/tests_api/api/scheduled_tests_agent_to_server_api.py deleted file mode 100644 index 01217b45..00000000 --- a/endpoint/tests_api/tests_api/api/scheduled_tests_agent_to_server_api.py +++ /dev/null @@ -1,952 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import Optional - -from tests_api.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest -from tests_api.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class ScheduledTestsAgentToServerApi: - """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() - self.api_client = api_client - - - @validate_call - def get_endpoint_agent_to_server_detail( - 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, - _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, - ) -> PostEndpointAgentToServerTest201Response: - """Retrieve agent to server endpoint scheduled test - - Retrieves details of an agent to server endpoint scheduled test. - - :param test_id: Unique ID of endpoint test. (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 _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_agent_to_server_detail_serialize( - test_id=test_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': "PostEndpointAgentToServerTest201Response", - '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, - ).data - - - @validate_call - def get_endpoint_agent_to_server_detail_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, - _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[PostEndpointAgentToServerTest201Response]: - """Retrieve agent to server endpoint scheduled test - - Retrieves details of an agent to server endpoint scheduled test. - - :param test_id: Unique ID of endpoint test. (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 _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_agent_to_server_detail_serialize( - test_id=test_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': "PostEndpointAgentToServerTest201Response", - '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, - ) - - - @validate_call - def get_endpoint_agent_to_server_detail_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, - _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 agent to server endpoint scheduled test - - Retrieves details of an agent to server endpoint scheduled test. - - :param test_id: Unique ID of endpoint test. (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 _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_agent_to_server_detail_serialize( - test_id=test_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': "PostEndpointAgentToServerTest201Response", - '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_agent_to_server_detail_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/scheduled-tests/agent-to-server/{testId}', - 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_toserver_tests_list( - 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, - ) -> GetEndpointAgentToserverTestsList200Response: - """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. - - :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_agent_toserver_tests_list_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': "GetEndpointAgentToserverTestsList200Response", - '401': "UnauthorizedError", - '403': "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, - ).data - - - @validate_call - def get_endpoint_agent_toserver_tests_list_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[GetEndpointAgentToserverTestsList200Response]: - """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. - - :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_agent_toserver_tests_list_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': "GetEndpointAgentToserverTestsList200Response", - '401': "UnauthorizedError", - '403': "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, - ) - - - @validate_call - def get_endpoint_agent_toserver_tests_list_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 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. - - :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_agent_toserver_tests_list_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': "GetEndpointAgentToserverTestsList200Response", - '401': "UnauthorizedError", - '403': "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_agent_toserver_tests_list_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/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 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, - ) -> PostEndpointAgentToServerTest201Response: - """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': "PostEndpointAgentToServerTest201Response", - '400': "Error", - '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, - ).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[PostEndpointAgentToServerTest201Response]: - """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': "PostEndpointAgentToServerTest201Response", - '400': "Error", - '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, - ) - - - @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': "PostEndpointAgentToServerTest201Response", - '400': "Error", - '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, - ) -> Tuple: - - _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, str] = {} - _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 - ) - - diff --git a/endpoint/tests_api/tests_api/api/scheduled_tests_http_server_api.py b/endpoint/tests_api/tests_api/api/scheduled_tests_http_server_api.py deleted file mode 100644 index 7d58d926..00000000 --- a/endpoint/tests_api/tests_api/api/scheduled_tests_http_server_api.py +++ /dev/null @@ -1,953 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import Optional - -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from tests_api.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest -from tests_api.models.get_endpoint_httpserver_test_detail200_response import GetEndpointHttpserverTestDetail200Response -from tests_api.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class ScheduledTestsHTTPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def get_endpoint_httpserver_test_detail( - 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, - _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, - ) -> GetEndpointHttpserverTestDetail200Response: - """Retrieves HTTP server endpoint scheduled test - - Retrieves details of an HTTP Server endpoint scheduled test. - - :param test_id: Unique ID of endpoint test. (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 _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_httpserver_test_detail_serialize( - test_id=test_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': "GetEndpointHttpserverTestDetail200Response", - '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, - ).data - - - @validate_call - def get_endpoint_httpserver_test_detail_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, - _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[GetEndpointHttpserverTestDetail200Response]: - """Retrieves HTTP server endpoint scheduled test - - Retrieves details of an HTTP Server endpoint scheduled test. - - :param test_id: Unique ID of endpoint test. (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 _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_httpserver_test_detail_serialize( - test_id=test_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': "GetEndpointHttpserverTestDetail200Response", - '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, - ) - - - @validate_call - def get_endpoint_httpserver_test_detail_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, - _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: - """Retrieves HTTP server endpoint scheduled test - - Retrieves details of an HTTP Server endpoint scheduled test. - - :param test_id: Unique ID of endpoint test. (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 _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_httpserver_test_detail_serialize( - test_id=test_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': "GetEndpointHttpserverTestDetail200Response", - '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_httpserver_test_detail_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/scheduled-tests/http-server/{testId}', - 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_httpserver_tests_list( - 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, - ) -> GetEndpointHttpserverTestsList200Response: - """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. - - :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_httpserver_tests_list_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': "GetEndpointHttpserverTestsList200Response", - '401': "UnauthorizedError", - '403': "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, - ).data - - - @validate_call - def get_endpoint_httpserver_tests_list_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[GetEndpointHttpserverTestsList200Response]: - """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. - - :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_httpserver_tests_list_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': "GetEndpointHttpserverTestsList200Response", - '401': "UnauthorizedError", - '403': "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, - ) - - - @validate_call - def get_endpoint_httpserver_tests_list_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 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. - - :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_httpserver_tests_list_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': "GetEndpointHttpserverTestsList200Response", - '401': "UnauthorizedError", - '403': "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_httpserver_tests_list_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/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 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': "Error", - '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, - ).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': "Error", - '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, - ) - - - @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': "Error", - '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, - ) -> Tuple: - - _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, str] = {} - _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 - ) - - diff --git a/endpoint/tests_api/tests_api/api_client.py b/endpoint/tests_api/tests_api/api_client.py deleted file mode 100644 index fee02b42..00000000 --- a/endpoint/tests_api/tests_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from tests_api.configuration import Configuration -from tests_api.api_response import ApiResponse -import tests_api.models -from tests_api import rest -from tests_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(tests_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/endpoint/tests_api/tests_api/api_response.py b/endpoint/tests_api/tests_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/endpoint/tests_api/tests_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/endpoint/tests_api/tests_api/configuration.py b/endpoint/tests_api/tests_api/configuration.py deleted file mode 100644 index 70c281af..00000000 --- a/endpoint/tests_api/tests_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("tests_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/endpoint/tests_api/tests_api/exceptions.py b/endpoint/tests_api/tests_api/exceptions.py deleted file mode 100644 index e91072bd..00000000 --- a/endpoint/tests_api/tests_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/endpoint/tests_api/tests_api/models/__init__.py b/endpoint/tests_api/tests_api/models/__init__.py deleted file mode 100644 index 812057b0..00000000 --- a/endpoint/tests_api/tests_api/models/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from tests_api.models.account_group_id import AccountGroupId -from tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType -from tests_api.models.all_agents_selector_type import AllAgentsSelectorType -from tests_api.models.dynamic_test import DynamicTest -from tests_api.models.dynamic_test_application import DynamicTestApplication -from tests_api.models.dynamic_test_links import DynamicTestLinks -from tests_api.models.dynamic_test_links_self import DynamicTestLinksSelf -from tests_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults -from tests_api.models.dynamic_test_request import DynamicTestRequest -from tests_api.models.dynamic_tests import DynamicTests -from tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest -from tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from tests_api.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest -from tests_api.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests -from tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from tests_api.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest -from tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from tests_api.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest -from tests_api.models.endpoint_http_server_tests import EndpointHttpServerTests -from tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from tests_api.models.endpoint_instant_test import EndpointInstantTest -from tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from tests_api.models.endpoint_test import EndpointTest -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_links import EndpointTestLinks -from tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.endpoint_tests import EndpointTests -from tests_api.models.error import Error -from tests_api.models.get_dynamic_test_detail200_response import GetDynamicTestDetail200Response -from tests_api.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response -from tests_api.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response -from tests_api.models.get_endpoint_httpserver_test_detail200_response import GetEndpointHttpserverTestDetail200Response -from tests_api.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response -from tests_api.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response -from tests_api.models.link import Link -from tests_api.models.post_endpoint_agent_to_server_test201_response import PostEndpointAgentToServerTest201Response -from tests_api.models.self_links import SelfLinks -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unauthorized_error import UnauthorizedError diff --git a/endpoint/tests_api/tests_api/models/account_group_id.py b/endpoint/tests_api/tests_api/models/account_group_id.py deleted file mode 100644 index 4b53d15d..00000000 --- a/endpoint/tests_api/tests_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/agent_labels_selector_type.py b/endpoint/tests_api/tests_api/models/agent_labels_selector_type.py deleted file mode 100644 index bc2a1f13..00000000 --- a/endpoint/tests_api/tests_api/models/agent_labels_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentLabelsSelectorType(str, Enum): - """ - AgentLabelsSelectorType - """ - - """ - allowed enum values - """ - AGENT_MINUS_LABELS = 'agent-labels' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentLabelsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/all_agents_selector_type.py b/endpoint/tests_api/tests_api/models/all_agents_selector_type.py deleted file mode 100644 index 39b510ac..00000000 --- a/endpoint/tests_api/tests_api/models/all_agents_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AllAgentsSelectorType(str, Enum): - """ - AllAgentsSelectorType - """ - - """ - allowed enum values - """ - ALL_MINUS_AGENTS = 'all-agents' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AllAgentsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/dynamic_test.py b/endpoint/tests_api/tests_api/models/dynamic_test.py deleted file mode 100644 index 28a17f94..00000000 --- a/endpoint/tests_api/tests_api/models/dynamic_test.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.dynamic_test_application import DynamicTestApplication -from tests_api.models.dynamic_test_links import DynamicTestLinks -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTest(BaseModel): - """ - DynamicTest - """ # noqa: E501 - links: Optional[DynamicTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - application: Optional[DynamicTestApplication] = None - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - network_measurements: Optional[StrictBool] = Field(default=None, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") - protocol: Optional[EndpointTestProtocol] = None - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "aid", "testName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "has_path_trace_in_session", - "modified_date", - "network_measurements", - "tcp_probe_mode", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DynamicTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "application": obj.get("application"), - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements"), - "protocol": obj.get("protocol"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/dynamic_test_application.py b/endpoint/tests_api/tests_api/models/dynamic_test_application.py deleted file mode 100644 index e90e092e..00000000 --- a/endpoint/tests_api/tests_api/models/dynamic_test_application.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DynamicTestApplication(str, Enum): - """ - Which supported application to monitor. - """ - - """ - allowed enum values - """ - MICROSOFT_MINUS_TEAMS = 'microsoft-teams' - WEBEX = 'webex' - ZOOM = 'zoom' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestApplication from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/dynamic_test_links.py b/endpoint/tests_api/tests_api/models/dynamic_test_links.py deleted file mode 100644 index c9a84979..00000000 --- a/endpoint/tests_api/tests_api/models/dynamic_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.dynamic_test_links_self import DynamicTestLinksSelf -from tests_api.models.dynamic_test_links_test_results import DynamicTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information. - """ # noqa: E501 - var_self: Optional[DynamicTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[DynamicTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": DynamicTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": DynamicTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/dynamic_test_links_self.py b/endpoint/tests_api/tests_api/models/dynamic_test_links_self.py deleted file mode 100644 index 3b23247e..00000000 --- a/endpoint/tests_api/tests_api/models/dynamic_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTestLinksSelf(BaseModel): - """ - DynamicTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTestLinksSelf 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/endpoint/tests_api/tests_api/models/dynamic_test_links_test_results.py b/endpoint/tests_api/tests_api/models/dynamic_test_links_test_results.py deleted file mode 100644 index 5188d346..00000000 --- a/endpoint/tests_api/tests_api/models/dynamic_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from tests_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -DYNAMICTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class DynamicTestLinksTestResults(BaseModel): - """ - DynamicTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = DynamicTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into DynamicTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/tests_api/tests_api/models/dynamic_test_request.py b/endpoint/tests_api/tests_api/models/dynamic_test_request.py deleted file mode 100644 index b9627638..00000000 --- a/endpoint/tests_api/tests_api/models/dynamic_test_request.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.dynamic_test_application import DynamicTestApplication -from tests_api.models.dynamic_test_links import DynamicTestLinks -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DynamicTestRequest(BaseModel): - """ - DynamicTestRequest - """ # noqa: E501 - links: Optional[DynamicTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - application: Optional[DynamicTestApplication] = None - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - network_measurements: Optional[StrictBool] = Field(default=None, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") - protocol: Optional[EndpointTestProtocol] = None - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - agent_selector_type: Optional[EndpointTestAgentSelectorType] = Field(default=None, alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute this test.", alias="maxMachines") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "aid", "testName", "agentSelectorType", "agents", "endpointAgentLabels", "maxMachines"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DynamicTestRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "has_path_trace_in_session", - "modified_date", - "network_measurements", - "tcp_probe_mode", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DynamicTestRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": DynamicTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "application": obj.get("application"), - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements"), - "protocol": obj.get("protocol"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_labels_selector_config.py b/endpoint/tests_api/tests_api/models/endpoint_agent_labels_selector_config.py deleted file mode 100644 index bbf82c18..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_labels_selector_config.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent_labels_selector_type import AgentLabelsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentLabelsSelectorConfig(BaseModel): - """ - Agent labels selection object. - """ # noqa: E501 - agent_selector_type: Optional[AgentLabelsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "endpointAgentLabels"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentLabelsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentLabelsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines"), - "endpointAgentLabels": obj.get("endpointAgentLabels") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_selector_config.py b/endpoint/tests_api/tests_api/models/endpoint_agent_selector_config.py deleted file mode 100644 index a316918a..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_selector_config.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from tests_api.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig -from tests_api.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig -from tests_api.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -ENDPOINTAGENTSELECTORCONFIG_ONE_OF_SCHEMAS = ["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] - -class EndpointAgentSelectorConfig(BaseModel): - """ - Agents selection object based on agentSelectorType. - """ - # data type: EndpointAllAgentsSelectorConfig - oneof_schema_1_validator: Optional[EndpointAllAgentsSelectorConfig] = None - # data type: EndpointAgentLabelsSelectorConfig - oneof_schema_2_validator: Optional[EndpointAgentLabelsSelectorConfig] = None - # data type: EndpointSpecificAgentsSelectorConfig - oneof_schema_3_validator: Optional[EndpointSpecificAgentsSelectorConfig] = None - actual_instance: Optional[Union[EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]] = None - one_of_schemas: List[str] = Literal["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] - - model_config = { - "validate_assignment": True - } - - - discriminator_value_class_map: Dict[str, str] = { - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EndpointAgentSelectorConfig.model_construct() - error_messages = [] - match = 0 - # validate data type: EndpointAllAgentsSelectorConfig - if not isinstance(v, EndpointAllAgentsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAllAgentsSelectorConfig`") - else: - match += 1 - # validate data type: EndpointAgentLabelsSelectorConfig - if not isinstance(v, EndpointAgentLabelsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAgentLabelsSelectorConfig`") - else: - match += 1 - # validate data type: EndpointSpecificAgentsSelectorConfig - if not isinstance(v, EndpointSpecificAgentsSelectorConfig): - error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointSpecificAgentsSelectorConfig`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into EndpointAllAgentsSelectorConfig - try: - instance.actual_instance = EndpointAllAgentsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EndpointAgentLabelsSelectorConfig - try: - instance.actual_instance = EndpointAgentLabelsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EndpointSpecificAgentsSelectorConfig - try: - instance.actual_instance = EndpointSpecificAgentsSelectorConfig.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_instant_test.py b/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_instant_test.py deleted file mode 100644 index 17927ea5..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_instant_test.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentToServerInstantTest(BaseModel): - """ - EndpointAgentToServerInstantTest - """ # noqa: E501 - agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - test_name: StrictStr = Field(description="Name of the test.", alias="testName") - server_name: StrictStr = Field(description="A server address without a protocol or IP address.", alias="serverName") - __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "serverName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentToServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines"), - "port": obj.get("port"), - "testName": obj.get("testName"), - "serverName": obj.get("serverName") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test.py b/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test.py deleted file mode 100644 index f5d76555..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_links import EndpointTestLinks -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentToServerTest(BaseModel): - """ - EndpointAgentToServerTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointAgentToServerType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentToServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_tests.py b/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_tests.py deleted file mode 100644 index 3b522e7c..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentToServerTests(BaseModel): - """ - EndpointAgentToServerTests - """ # noqa: E501 - tests: Optional[List[EndpointAgentToServerTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentToServerTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [EndpointAgentToServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_type.py b/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_type.py deleted file mode 100644 index 085498f9..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointAgentToServerType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentToServerType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_all_agents_selector_config.py b/endpoint/tests_api/tests_api/models/endpoint_all_agents_selector_config.py deleted file mode 100644 index c0431a55..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_all_agents_selector_config.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.all_agents_selector_type import AllAgentsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAllAgentsSelectorConfig(BaseModel): - """ - Any agent selection object. - """ # noqa: E501 - agent_selector_type: Optional[AllAgentsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAllAgentsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAllAgentsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_http_server_base_test.py b/endpoint/tests_api/tests_api/models/endpoint_http_server_base_test.py deleted file mode 100644 index e0e0de76..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_http_server_base_test.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerBaseTest(BaseModel): - """ - EndpointHttpServerBaseTest - """ # noqa: E501 - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - protocol: Optional[EndpointTestProtocol] = None - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") - __properties: ClassVar[List[str]] = ["authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerBaseTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerBaseTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authType": obj.get("authType"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "protocol": obj.get("protocol"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_http_server_instant_test.py b/endpoint/tests_api/tests_api/models/endpoint_http_server_instant_test.py deleted file mode 100644 index a110fd1e..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_http_server_instant_test.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerInstantTest(BaseModel): - """ - EndpointHttpServerInstantTest - """ # noqa: E501 - agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - test_name: StrictStr = Field(description="Name of the test.", alias="testName") - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - http_time_limit: StrictInt = Field(description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - protocol: Optional[EndpointTestProtocol] = None - url: StrictStr = Field(description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: TestSslVersionId = Field(alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - verify_certificate: StrictBool = Field(description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") - target_response_time: StrictInt = Field(description="Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red).", alias="targetResponseTime") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "targetResponseTime", "password"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines"), - "port": obj.get("port"), - "testName": obj.get("testName"), - "authType": obj.get("authType"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "protocol": obj.get("protocol"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate"), - "targetResponseTime": obj.get("targetResponseTime"), - "password": obj.get("password") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_http_server_test.py b/endpoint/tests_api/tests_api/models/endpoint_http_server_test.py deleted file mode 100644 index 2a8e3046..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_http_server_test.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_links import EndpointTestLinks -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointHttpServerTest(BaseModel): - """ - EndpointHttpServerTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointHttpServerType] = None - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - 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") - 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") - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - "ssl_version", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointHttpServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type"), - "authType": obj.get("authType"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate"), - "contentRegex": obj.get("contentRegex"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "postBody": obj.get("postBody"), - "sslVersion": obj.get("sslVersion"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_http_server_type.py b/endpoint/tests_api/tests_api/models/endpoint_http_server_type.py deleted file mode 100644 index aabcbd20..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_http_server_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointHttpServerType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - HTTP_MINUS_SERVER = 'http-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointHttpServerType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_instant_test.py b/endpoint/tests_api/tests_api/models/endpoint_instant_test.py deleted file mode 100644 index 72a606cd..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_instant_test.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointInstantTest(BaseModel): - """ - EndpointInstantTest - """ # noqa: E501 - agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - test_name: StrictStr = Field(description="Name of the test.", alias="testName") - __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "agents": obj.get("agents"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "endpointAgentLabels": obj.get("endpointAgentLabels"), - "maxMachines": obj.get("maxMachines"), - "port": obj.get("port"), - "testName": obj.get("testName") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_scheduled_test_type.py b/endpoint/tests_api/tests_api/models/endpoint_scheduled_test_type.py deleted file mode 100644 index 3156bba0..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_scheduled_test_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointScheduledTestType(str, Enum): - """ - Type of test being queried. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - HTTP_MINUS_SERVER = 'http-server' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointScheduledTestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_specific_agents_selector_config.py b/endpoint/tests_api/tests_api/models/endpoint_specific_agents_selector_config.py deleted file mode 100644 index 5f8dfcc0..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_specific_agents_selector_config.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.specific_agents_selector_type import SpecificAgentsSelectorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointSpecificAgentsSelectorConfig(BaseModel): - """ - Specific agents selection object. - """ # noqa: E501 - agent_selector_type: Optional[SpecificAgentsSelectorType] = Field(default=None, alias="agentSelectorType") - max_machines: Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") - agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") - __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointSpecificAgentsSelectorConfig 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointSpecificAgentsSelectorConfig from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentSelectorType": obj.get("agentSelectorType"), - "maxMachines": obj.get("maxMachines"), - "agents": obj.get("agents") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test.py b/endpoint/tests_api/tests_api/models/endpoint_test.py deleted file mode 100644 index 0bd1e7c1..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_scheduled_test_type import EndpointScheduledTestType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_links import EndpointTestLinks -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTest(BaseModel): - """ - EndpointTest - """ # noqa: E501 - links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointScheduledTestType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": EndpointTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test_agent_selector_type.py b/endpoint/tests_api/tests_api/models/endpoint_test_agent_selector_type.py deleted file mode 100644 index f8ef7f20..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_agent_selector_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestAgentSelectorType(str, Enum): - """ - Retrieve either all available agents, a specific list of agents, or a list of agent labels. - """ - - """ - allowed enum values - """ - ALL_MINUS_AGENTS = 'all-agents' - SPECIFIC_MINUS_AGENTS = 'specific-agents' - AGENT_MINUS_LABELS = 'agent-labels' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAgentSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test_aid.py b/endpoint/tests_api/tests_api/models/endpoint_test_aid.py deleted file mode 100644 index bd0dc3cc..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_aid.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestAid(BaseModel): - """ - EndpointTestAid - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAid 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestAid 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") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test_auth_type.py b/endpoint/tests_api/tests_api/models/endpoint_test_auth_type.py deleted file mode 100644 index 4705b820..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_auth_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestAuthType(str, Enum): - """ - HTTP authentication type. - """ - - """ - allowed enum values - """ - NONE = 'none' - BASIC = 'basic' - NTLM = 'ntlm' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestAuthType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test_links.py b/endpoint/tests_api/tests_api/models/endpoint_test_links.py deleted file mode 100644 index 13ae0bc1..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.endpoint_test_links_self import EndpointTestLinksSelf -from tests_api.models.endpoint_test_links_test_results import EndpointTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information. - """ # noqa: E501 - var_self: Optional[EndpointTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[EndpointTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": EndpointTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": EndpointTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test_links_self.py b/endpoint/tests_api/tests_api/models/endpoint_test_links_self.py deleted file mode 100644 index 88b2d6b0..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointTestLinksSelf(BaseModel): - """ - EndpointTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointTestLinksSelf 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/endpoint/tests_api/tests_api/models/endpoint_test_links_test_results.py b/endpoint/tests_api/tests_api/models/endpoint_test_links_test_results.py deleted file mode 100644 index 07a35457..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from tests_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -ENDPOINTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class EndpointTestLinksTestResults(BaseModel): - """ - EndpointTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EndpointTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EndpointTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/endpoint/tests_api/tests_api/models/endpoint_test_protocol.py b/endpoint/tests_api/tests_api/models/endpoint_test_protocol.py deleted file mode 100644 index a2b70f0d..00000000 --- a/endpoint/tests_api/tests_api/models/endpoint_test_protocol.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointTestProtocol(str, Enum): - """ - Protocol used to perform the test. - """ - - """ - allowed enum values - """ - ICMP = 'icmp' - ICMP_MINUS_WITH_MINUS_TCP_MINUS_CONNECT = 'icmp-with-tcp-connect' - TCP = 'tcp' - PREFER_MINUS_TCP = 'prefer-tcp' - AST_MINUS_AUTODETECT = 'ast-autodetect' - AUTODETECT = 'autodetect' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/error.py b/endpoint/tests_api/tests_api/models/error.py deleted file mode 100644 index 4b4f2707..00000000 --- a/endpoint/tests_api/tests_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/tests_api/tests_api/models/get_dynamic_test_detail200_response.py b/endpoint/tests_api/tests_api/models/get_dynamic_test_detail200_response.py deleted file mode 100644 index 91052b8d..00000000 --- a/endpoint/tests_api/tests_api/models/get_dynamic_test_detail200_response.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.dynamic_test_application import DynamicTestApplication -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDynamicTestDetail200Response(BaseModel): - """ - GetDynamicTestDetail200Response - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - application: Optional[DynamicTestApplication] = None - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") - has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - network_measurements: Optional[StrictBool] = Field(default=None, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") - protocol: Optional[EndpointTestProtocol] = None - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "aid", "testName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDynamicTestDetail200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "has_path_trace_in_session", - "modified_date", - "network_measurements", - "tcp_probe_mode", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetDynamicTestDetail200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "application": obj.get("application"), - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, - "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements"), - "protocol": obj.get("protocol"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/get_dynamic_tests_list200_response.py b/endpoint/tests_api/tests_api/models/get_dynamic_tests_list200_response.py deleted file mode 100644 index 459b1018..00000000 --- a/endpoint/tests_api/tests_api/models/get_dynamic_tests_list200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.dynamic_test import DynamicTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDynamicTestsList200Response(BaseModel): - """ - GetDynamicTestsList200Response - """ # noqa: E501 - tests: Optional[List[DynamicTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDynamicTestsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetDynamicTestsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DynamicTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/get_endpoint_agent_toserver_tests_list200_response.py b/endpoint/tests_api/tests_api/models/get_endpoint_agent_toserver_tests_list200_response.py deleted file mode 100644 index 0d6462d5..00000000 --- a/endpoint/tests_api/tests_api/models/get_endpoint_agent_toserver_tests_list200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetEndpointAgentToserverTestsList200Response(BaseModel): - """ - GetEndpointAgentToserverTestsList200Response - """ # noqa: E501 - tests: Optional[List[EndpointAgentToServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetEndpointAgentToserverTestsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetEndpointAgentToserverTestsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [EndpointAgentToServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/get_endpoint_httpserver_test_detail200_response.py b/endpoint/tests_api/tests_api/models/get_endpoint_httpserver_test_detail200_response.py deleted file mode 100644 index 7a2d2427..00000000 --- a/endpoint/tests_api/tests_api/models/get_endpoint_httpserver_test_detail200_response.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_http_server_type import EndpointHttpServerType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetEndpointHttpserverTestDetail200Response(BaseModel): - """ - GetEndpointHttpserverTestDetail200Response - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointHttpServerType] = None - auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") - http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") - url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") - 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") - 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") - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetEndpointHttpserverTestDetail200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - "ssl_version", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetEndpointHttpserverTestDetail200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type"), - "authType": obj.get("authType"), - "httpTimeLimit": obj.get("httpTimeLimit"), - "url": obj.get("url"), - "username": obj.get("username"), - "sslVersionId": obj.get("sslVersionId"), - "tcpProbeMode": obj.get("tcpProbeMode"), - "verifyCertificate": obj.get("verifyCertificate"), - "contentRegex": obj.get("contentRegex"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "postBody": obj.get("postBody"), - "sslVersion": obj.get("sslVersion"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/get_endpoint_httpserver_tests_list200_response.py b/endpoint/tests_api/tests_api/models/get_endpoint_httpserver_tests_list200_response.py deleted file mode 100644 index 23464138..00000000 --- a/endpoint/tests_api/tests_api/models/get_endpoint_httpserver_tests_list200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetEndpointHttpserverTestsList200Response(BaseModel): - """ - GetEndpointHttpserverTestsList200Response - """ # noqa: E501 - tests: Optional[List[EndpointHttpServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetEndpointHttpserverTestsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetEndpointHttpserverTestsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [EndpointHttpServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/get_endpoint_tests_list200_response.py b/endpoint/tests_api/tests_api/models/get_endpoint_tests_list200_response.py deleted file mode 100644 index f4b1ff54..00000000 --- a/endpoint/tests_api/tests_api/models/get_endpoint_tests_list200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.endpoint_test import EndpointTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetEndpointTestsList200Response(BaseModel): - """ - GetEndpointTestsList200Response - """ # noqa: E501 - tests: Optional[List[EndpointTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetEndpointTestsList200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetEndpointTestsList200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [EndpointTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/link.py b/endpoint/tests_api/tests_api/models/link.py deleted file mode 100644 index fedbc72a..00000000 --- a/endpoint/tests_api/tests_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/tests_api/tests_api/models/post_endpoint_agent_to_server_test201_response.py b/endpoint/tests_api/tests_api/models/post_endpoint_agent_to_server_test201_response.py deleted file mode 100644 index 7664360d..00000000 --- a/endpoint/tests_api/tests_api/models/post_endpoint_agent_to_server_test201_response.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from tests_api.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig -from tests_api.models.endpoint_agent_to_server_type import EndpointAgentToServerType -from tests_api.models.endpoint_test_aid import EndpointTestAid -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PostEndpointAgentToServerTest201Response(BaseModel): - """ - PostEndpointAgentToServerTest201Response - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - interval: Optional[TestInterval] = None - is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") - is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") - has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - 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") - port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") - protocol: Optional[EndpointTestProtocol] = None - server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") - aid: Optional[EndpointTestAid] = None - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") - type: Optional[EndpointAgentToServerType] = None - __properties: ClassVar[List[str]] = ["_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "aid", "testName", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PostEndpointAgentToServerTest201Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_date", - "is_enabled", - "is_saved_event", - "modified_date", - "test_id", - }, - exclude_none=True, - ) - # 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 agent_selector_config - if self.agent_selector_config: - _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PostEndpointAgentToServerTest201Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj.get("agentSelectorConfig")) if obj.get("agentSelectorConfig") is not None else None, - "createdDate": obj.get("createdDate"), - "interval": obj.get("interval"), - "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, - "isSavedEvent": obj.get("isSavedEvent"), - "hasPathTraceInSession": obj.get("hasPathTraceInSession"), - "modifiedDate": obj.get("modifiedDate"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "testId": obj.get("testId"), - "aid": EndpointTestAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, - "testName": obj.get("testName"), - "type": obj.get("type") - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/self_links.py b/endpoint/tests_api/tests_api/models/self_links.py deleted file mode 100644 index af155f4c..00000000 --- a/endpoint/tests_api/tests_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/self_links_links.py b/endpoint/tests_api/tests_api/models/self_links_links.py deleted file mode 100644 index 0ae381d5..00000000 --- a/endpoint/tests_api/tests_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/endpoint/tests_api/tests_api/models/specific_agents_selector_type.py b/endpoint/tests_api/tests_api/models/specific_agents_selector_type.py deleted file mode 100644 index 2b37c1e1..00000000 --- a/endpoint/tests_api/tests_api/models/specific_agents_selector_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class SpecificAgentsSelectorType(str, Enum): - """ - SpecificAgentsSelectorType - """ - - """ - allowed enum values - """ - SPECIFIC_MINUS_AGENTS = 'specific-agents' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SpecificAgentsSelectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/test_interval.py b/endpoint/tests_api/tests_api/models/test_interval.py deleted file mode 100644 index a23ae9fa..00000000 --- a/endpoint/tests_api/tests_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/test_probe_mode.py b/endpoint/tests_api/tests_api/models/test_probe_mode.py deleted file mode 100644 index 5bc9074a..00000000 --- a/endpoint/tests_api/tests_api/models/test_probe_mode.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProbeMode(str, Enum): - """ - Probe mode used by network test, only valid when the protocol is set to TCP. - """ - - """ - allowed enum values - """ - AUTO = 'auto' - SACK = 'sack' - SYN = 'syn' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProbeMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/test_ssl_version_id.py b/endpoint/tests_api/tests_api/models/test_ssl_version_id.py deleted file mode 100644 index 5fa8ebcb..00000000 --- a/endpoint/tests_api/tests_api/models/test_ssl_version_id.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestSslVersionId(str, Enum): - """ - SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_3 = '3' - ENUM_4 = '4' - ENUM_5 = '5' - ENUM_6 = '6' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSslVersionId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/endpoint/tests_api/tests_api/models/unauthorized_error.py b/endpoint/tests_api/tests_api/models/unauthorized_error.py deleted file mode 100644 index d50f1e34..00000000 --- a/endpoint/tests_api/tests_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/endpoint/tests_api/tests_api/rest.py b/endpoint/tests_api/tests_api/rest.py deleted file mode 100644 index ac78c2ff..00000000 --- a/endpoint/tests_api/tests_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Endpoint Tests API - - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from tests_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/endpoint/tests_api/tox.ini b/endpoint/tests_api/tox.ini deleted file mode 100644 index 543af93d..00000000 --- a/endpoint/tests_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=tests_api diff --git a/endpoint/agents_api/.gitignore b/endpoint_agents/.gitignore similarity index 100% rename from endpoint/agents_api/.gitignore rename to endpoint_agents/.gitignore diff --git a/endpoint/agents_api/.openapi-generator-ignore b/endpoint_agents/.openapi-generator-ignore similarity index 100% rename from endpoint/agents_api/.openapi-generator-ignore rename to endpoint_agents/.openapi-generator-ignore diff --git a/endpoint_agents/.openapi-generator/FILES b/endpoint_agents/.openapi-generator/FILES new file mode 100644 index 00000000..126d719f --- /dev/null +++ b/endpoint_agents/.openapi-generator/FILES @@ -0,0 +1,177 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AddressProfile.md +docs/AddressType.md +docs/AdministrativeEndpointsApi.md +docs/AgentLicenseType.md +docs/AgentSearchRequest.md +docs/AgentSearchRequestSearchFilters.md +docs/AgentSearchSort.md +docs/AgentSearchSortKey.md +docs/AgentThresholdFilter.md +docs/AgentThresholdFilters.md +docs/AgentTransfer.md +docs/AgentTransferRequest.md +docs/BrowserType.md +docs/ConditionalOperator.md +docs/EndpointAgent.md +docs/EndpointAgentBulkTransfer207Response.md +docs/EndpointAgentBulkTransfer207ResponseItemsInner.md +docs/EndpointAgentBulkTransferRequest.md +docs/EndpointAgentGet200Response.md +docs/EndpointAgentLocation.md +docs/EndpointAgentUpdate.md +docs/EndpointAgents.md +docs/EndpointAgentsAgentsInner.md +docs/EndpointAgentsConnectionString200Response.md +docs/EndpointAgentsList200Response.md +docs/EndpointAgentsSearch200Response.md +docs/EndpointAsnDetails.md +docs/EndpointBrowserExtension.md +docs/EndpointClient.md +docs/EndpointUserProfile.md +docs/EndpointVpnProfile.md +docs/Error.md +docs/EthernetProfile.md +docs/Expand.md +docs/InterfaceHardwareType.md +docs/InterfaceProfile.md +docs/Link.md +docs/ManageAgentsApi.md +docs/PaginationNextAndSelfLink.md +docs/PaginationNextAndSelfLinkLinks.md +docs/PaginationNextLink.md +docs/PaginationNextLinkLinks.md +docs/Platform.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/SortOrder.md +docs/Status.md +docs/ThresholdFilterOperator.md +docs/TransferApi.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/VpnType.md +docs/WirelessProfile.md +endpoint_agents/__init__.py +endpoint_agents/api/__init__.py +endpoint_agents/api/administrative_endpoints_api.py +endpoint_agents/api/manage_agents_api.py +endpoint_agents/api/transfer_api.py +endpoint_agents/api_client.py +endpoint_agents/api_response.py +endpoint_agents/configuration.py +endpoint_agents/exceptions.py +endpoint_agents/models/__init__.py +endpoint_agents/models/address_profile.py +endpoint_agents/models/address_type.py +endpoint_agents/models/agent_license_type.py +endpoint_agents/models/agent_search_request.py +endpoint_agents/models/agent_search_request_search_filters.py +endpoint_agents/models/agent_search_sort.py +endpoint_agents/models/agent_search_sort_key.py +endpoint_agents/models/agent_threshold_filter.py +endpoint_agents/models/agent_threshold_filters.py +endpoint_agents/models/agent_transfer.py +endpoint_agents/models/agent_transfer_request.py +endpoint_agents/models/browser_type.py +endpoint_agents/models/conditional_operator.py +endpoint_agents/models/endpoint_agent.py +endpoint_agents/models/endpoint_agent_bulk_transfer207_response.py +endpoint_agents/models/endpoint_agent_bulk_transfer207_response_items_inner.py +endpoint_agents/models/endpoint_agent_bulk_transfer_request.py +endpoint_agents/models/endpoint_agent_get200_response.py +endpoint_agents/models/endpoint_agent_location.py +endpoint_agents/models/endpoint_agent_update.py +endpoint_agents/models/endpoint_agents.py +endpoint_agents/models/endpoint_agents_agents_inner.py +endpoint_agents/models/endpoint_agents_connection_string200_response.py +endpoint_agents/models/endpoint_agents_list200_response.py +endpoint_agents/models/endpoint_agents_search200_response.py +endpoint_agents/models/endpoint_asn_details.py +endpoint_agents/models/endpoint_browser_extension.py +endpoint_agents/models/endpoint_client.py +endpoint_agents/models/endpoint_user_profile.py +endpoint_agents/models/endpoint_vpn_profile.py +endpoint_agents/models/error.py +endpoint_agents/models/ethernet_profile.py +endpoint_agents/models/expand.py +endpoint_agents/models/interface_hardware_type.py +endpoint_agents/models/interface_profile.py +endpoint_agents/models/link.py +endpoint_agents/models/pagination_next_and_self_link.py +endpoint_agents/models/pagination_next_and_self_link_links.py +endpoint_agents/models/pagination_next_link.py +endpoint_agents/models/pagination_next_link_links.py +endpoint_agents/models/platform.py +endpoint_agents/models/self_links.py +endpoint_agents/models/self_links_links.py +endpoint_agents/models/sort_order.py +endpoint_agents/models/status.py +endpoint_agents/models/threshold_filter_operator.py +endpoint_agents/models/unauthorized_error.py +endpoint_agents/models/validation_error.py +endpoint_agents/models/validation_error_all_of_errors.py +endpoint_agents/models/vpn_type.py +endpoint_agents/models/wireless_profile.py +endpoint_agents/py.typed +endpoint_agents/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_address_profile.py +test/test_address_type.py +test/test_agent_license_type.py +test/test_agent_search_request.py +test/test_agent_search_request_search_filters.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_browser_type.py +test/test_conditional_operator.py +test/test_endpoint_agent.py +test/test_endpoint_agent_bulk_transfer207_response.py +test/test_endpoint_agent_bulk_transfer207_response_items_inner.py +test/test_endpoint_agent_bulk_transfer_request.py +test/test_endpoint_agent_get200_response.py +test/test_endpoint_agent_location.py +test/test_endpoint_agent_update.py +test/test_endpoint_agents.py +test/test_endpoint_agents_agents_inner.py +test/test_endpoint_agents_connection_string200_response.py +test/test_endpoint_agents_list200_response.py +test/test_endpoint_agents_search200_response.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_interface_hardware_type.py +test/test_interface_profile.py +test/test_link.py +test/test_pagination_next_and_self_link.py +test/test_pagination_next_and_self_link_links.py +test/test_pagination_next_link.py +test/test_pagination_next_link_links.py +test/test_platform.py +test/test_self_links.py +test/test_self_links_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_all_of_errors.py +test/test_vpn_type.py +test/test_wireless_profile.py diff --git a/endpoint_agents/.openapi-generator/VERSION b/endpoint_agents/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/endpoint_agents/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/endpoint_agents/README.md b/endpoint_agents/README.md new file mode 100644 index 00000000..9bb73532 --- /dev/null +++ b/endpoint_agents/README.md @@ -0,0 +1,181 @@ +# endpoint-agents +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). + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import endpoint_agents +``` + +### 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 endpoint_agents +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import endpoint_agents +from 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 = endpoint_agents.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 = endpoint_agents.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with endpoint_agents.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_agents.AdministrativeEndpointsApi(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: + # Get agent connection string + api_response = api_instance.endpoint_agents_connection_string(aid=aid) + print("The response of AdministrativeEndpointsApi->endpoint_agents_connection_string:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AdministrativeEndpointsApi->endpoint_agents_connection_string: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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 + + +## Documentation For Models + + - [AddressProfile](docs/AddressProfile.md) + - [AddressType](docs/AddressType.md) + - [AgentLicenseType](docs/AgentLicenseType.md) + - [AgentSearchRequest](docs/AgentSearchRequest.md) + - [AgentSearchRequestSearchFilters](docs/AgentSearchRequestSearchFilters.md) + - [AgentSearchSort](docs/AgentSearchSort.md) + - [AgentSearchSortKey](docs/AgentSearchSortKey.md) + - [AgentThresholdFilter](docs/AgentThresholdFilter.md) + - [AgentThresholdFilters](docs/AgentThresholdFilters.md) + - [AgentTransfer](docs/AgentTransfer.md) + - [AgentTransferRequest](docs/AgentTransferRequest.md) + - [BrowserType](docs/BrowserType.md) + - [ConditionalOperator](docs/ConditionalOperator.md) + - [EndpointAgent](docs/EndpointAgent.md) + - [EndpointAgentBulkTransfer207Response](docs/EndpointAgentBulkTransfer207Response.md) + - [EndpointAgentBulkTransfer207ResponseItemsInner](docs/EndpointAgentBulkTransfer207ResponseItemsInner.md) + - [EndpointAgentBulkTransferRequest](docs/EndpointAgentBulkTransferRequest.md) + - [EndpointAgentGet200Response](docs/EndpointAgentGet200Response.md) + - [EndpointAgentLocation](docs/EndpointAgentLocation.md) + - [EndpointAgentUpdate](docs/EndpointAgentUpdate.md) + - [EndpointAgents](docs/EndpointAgents.md) + - [EndpointAgentsAgentsInner](docs/EndpointAgentsAgentsInner.md) + - [EndpointAgentsConnectionString200Response](docs/EndpointAgentsConnectionString200Response.md) + - [EndpointAgentsList200Response](docs/EndpointAgentsList200Response.md) + - [EndpointAgentsSearch200Response](docs/EndpointAgentsSearch200Response.md) + - [EndpointAsnDetails](docs/EndpointAsnDetails.md) + - [EndpointBrowserExtension](docs/EndpointBrowserExtension.md) + - [EndpointClient](docs/EndpointClient.md) + - [EndpointUserProfile](docs/EndpointUserProfile.md) + - [EndpointVpnProfile](docs/EndpointVpnProfile.md) + - [Error](docs/Error.md) + - [EthernetProfile](docs/EthernetProfile.md) + - [Expand](docs/Expand.md) + - [InterfaceHardwareType](docs/InterfaceHardwareType.md) + - [InterfaceProfile](docs/InterfaceProfile.md) + - [Link](docs/Link.md) + - [PaginationNextAndSelfLink](docs/PaginationNextAndSelfLink.md) + - [PaginationNextAndSelfLinkLinks](docs/PaginationNextAndSelfLinkLinks.md) + - [PaginationNextLink](docs/PaginationNextLink.md) + - [PaginationNextLinkLinks](docs/PaginationNextLinkLinks.md) + - [Platform](docs/Platform.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [SortOrder](docs/SortOrder.md) + - [Status](docs/Status.md) + - [ThresholdFilterOperator](docs/ThresholdFilterOperator.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [VpnType](docs/VpnType.md) + - [WirelessProfile](docs/WirelessProfile.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/endpoint/agents_api/docs/AddressProfile.md b/endpoint_agents/docs/AddressProfile.md similarity index 87% rename from endpoint/agents_api/docs/AddressProfile.md rename to endpoint_agents/docs/AddressProfile.md index 7a11ca1e..5be429d7 100644 --- a/endpoint/agents_api/docs/AddressProfile.md +++ b/endpoint_agents/docs/AddressProfile.md @@ -3,6 +3,7 @@ A description of the IPs assigned to this machine. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address_type** | [**AddressType**](AddressType.md) | | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.address_profile import AddressProfile +from endpoint_agents.models.address_profile import AddressProfile # TODO update the JSON string below json = "{}" # create an instance of AddressProfile from a JSON string address_profile_instance = AddressProfile.from_json(json) # print the JSON string representation of the object -print AddressProfile.to_json() +print(AddressProfile.to_json()) # convert the object into a dict address_profile_dict = address_profile_instance.to_dict() # create an instance of AddressProfile from a dict -address_profile_form_dict = address_profile.from_dict(address_profile_dict) +address_profile_from_dict = AddressProfile.from_dict(address_profile_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/endpoint/agents_api/docs/AddressType.md b/endpoint_agents/docs/AddressType.md similarity index 99% rename from endpoint/agents_api/docs/AddressType.md rename to endpoint_agents/docs/AddressType.md index c4c8ce62..85011745 100644 --- a/endpoint/agents_api/docs/AddressType.md +++ b/endpoint_agents/docs/AddressType.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint/agents_api/docs/AdministrativeEndpointsApi.md b/endpoint_agents/docs/AdministrativeEndpointsApi.md similarity index 85% rename from endpoint/agents_api/docs/AdministrativeEndpointsApi.md rename to endpoint_agents/docs/AdministrativeEndpointsApi.md index e21af82d..8c8a1359 100644 --- a/endpoint/agents_api/docs/AdministrativeEndpointsApi.md +++ b/endpoint_agents/docs/AdministrativeEndpointsApi.md @@ -1,4 +1,4 @@ -# agents_api.AdministrativeEndpointsApi +# endpoint_agents.AdministrativeEndpointsApi All URIs are relative to *https://api.thousandeyes.com* @@ -15,17 +15,16 @@ Get agent connection string ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -35,15 +34,15 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.AdministrativeEndpointsApi(api_client) - aid = '2067' # 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) + api_instance = endpoint_agents.AdministrativeEndpointsApi(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: # Get agent connection string @@ -58,6 +57,7 @@ with agents_api.ApiClient(configuration) as api_client: ### 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] @@ -76,6 +76,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint/agents_api/docs/AgentLicenseType.md b/endpoint_agents/docs/AgentLicenseType.md similarity index 99% rename from endpoint/agents_api/docs/AgentLicenseType.md rename to endpoint_agents/docs/AgentLicenseType.md index b98ab3af..f5dd8a7e 100644 --- a/endpoint/agents_api/docs/AgentLicenseType.md +++ b/endpoint_agents/docs/AgentLicenseType.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_agents/docs/AgentSearchRequest.md b/endpoint_agents/docs/AgentSearchRequest.md new file mode 100644 index 00000000..eb8d6fe3 --- /dev/null +++ b/endpoint_agents/docs/AgentSearchRequest.md @@ -0,0 +1,32 @@ +# AgentSearchRequest + +Parameters for filtering a list of agents. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**search_filters** | [**AgentSearchRequestSearchFilters**](AgentSearchRequestSearchFilters.md) | | [optional] +**threshold_filter** | [**AgentThresholdFilters**](AgentThresholdFilters.md) | | [optional] +**search_sort** | [**List[AgentSearchSort]**](AgentSearchSort.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.agent_search_request import AgentSearchRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSearchRequest from a JSON string +agent_search_request_instance = AgentSearchRequest.from_json(json) +# print the JSON string representation of the object +print(AgentSearchRequest.to_json()) + +# convert the object into a dict +agent_search_request_dict = agent_search_request_instance.to_dict() +# create an instance of AgentSearchRequest from a dict +agent_search_request_from_dict = AgentSearchRequest.from_dict(agent_search_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/endpoint/agents_api/docs/AgentSearchRequestSearchFilters.md b/endpoint_agents/docs/AgentSearchRequestSearchFilters.md similarity index 83% rename from endpoint/agents_api/docs/AgentSearchRequestSearchFilters.md rename to endpoint_agents/docs/AgentSearchRequestSearchFilters.md index fb9413a3..2379a277 100644 --- a/endpoint/agents_api/docs/AgentSearchRequestSearchFilters.md +++ b/endpoint_agents/docs/AgentSearchRequestSearchFilters.md @@ -2,8 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **List[str]** | Returns only agents that are an exact match of the provided identifiers. | [optional] **agent_name** | **List[str]** | Returns only agents with the given name. This is an exact match only. | [optional] **computer_name** | **List[str]** | Returns only agents with the given computer name. This is an exact match only. | [optional] **username** | **List[str]** | Returns only agents that have at least one user with a name. starting with the provided string. This is a case-insensitive prefix match. | [optional] @@ -16,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters +from endpoint_agents.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters # TODO update the JSON string below json = "{}" # create an instance of AgentSearchRequestSearchFilters from a JSON string agent_search_request_search_filters_instance = AgentSearchRequestSearchFilters.from_json(json) # print the JSON string representation of the object -print AgentSearchRequestSearchFilters.to_json() +print(AgentSearchRequestSearchFilters.to_json()) # convert the object into a dict agent_search_request_search_filters_dict = agent_search_request_search_filters_instance.to_dict() # create an instance of AgentSearchRequestSearchFilters from a dict -agent_search_request_search_filters_form_dict = agent_search_request_search_filters.from_dict(agent_search_request_search_filters_dict) +agent_search_request_search_filters_from_dict = AgentSearchRequestSearchFilters.from_dict(agent_search_request_search_filters_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_agents/docs/AgentSearchSort.md b/endpoint_agents/docs/AgentSearchSort.md new file mode 100644 index 00000000..da3cbf88 --- /dev/null +++ b/endpoint_agents/docs/AgentSearchSort.md @@ -0,0 +1,30 @@ +# AgentSearchSort + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sort** | [**AgentSearchSortKey**](AgentSearchSortKey.md) | | [optional] +**order** | [**SortOrder**](SortOrder.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.agent_search_sort import AgentSearchSort + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentSearchSort from a JSON string +agent_search_sort_instance = AgentSearchSort.from_json(json) +# print the JSON string representation of the object +print(AgentSearchSort.to_json()) + +# convert the object into a dict +agent_search_sort_dict = agent_search_sort_instance.to_dict() +# create an instance of AgentSearchSort from a dict +agent_search_sort_from_dict = AgentSearchSort.from_dict(agent_search_sort_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/endpoint_agents/docs/AgentSearchSortKey.md b/endpoint_agents/docs/AgentSearchSortKey.md new file mode 100644 index 00000000..3f578817 --- /dev/null +++ b/endpoint_agents/docs/AgentSearchSortKey.md @@ -0,0 +1,11 @@ +# AgentSearchSortKey + + +## 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/endpoint_agents/docs/AgentThresholdFilter.md b/endpoint_agents/docs/AgentThresholdFilter.md new file mode 100644 index 00000000..f516e00f --- /dev/null +++ b/endpoint_agents/docs/AgentThresholdFilter.md @@ -0,0 +1,32 @@ +# AgentThresholdFilter + +The metric is filtered based on the threshold value and operator provided. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**value** | **float** | The threshold value. | [optional] +**operator** | [**ThresholdFilterOperator**](ThresholdFilterOperator.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.agent_threshold_filter import AgentThresholdFilter + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentThresholdFilter from a JSON string +agent_threshold_filter_instance = AgentThresholdFilter.from_json(json) +# print the JSON string representation of the object +print(AgentThresholdFilter.to_json()) + +# convert the object into a dict +agent_threshold_filter_dict = agent_threshold_filter_instance.to_dict() +# create an instance of AgentThresholdFilter from a dict +agent_threshold_filter_from_dict = AgentThresholdFilter.from_dict(agent_threshold_filter_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/endpoint_agents/docs/AgentThresholdFilters.md b/endpoint_agents/docs/AgentThresholdFilters.md new file mode 100644 index 00000000..a2d687ec --- /dev/null +++ b/endpoint_agents/docs/AgentThresholdFilters.md @@ -0,0 +1,31 @@ +# AgentThresholdFilters + +All filters are applied based on the conditional operator (and/or). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filters** | [**List[AgentThresholdFilter]**](AgentThresholdFilter.md) | | [optional] +**conditional_operator** | [**ConditionalOperator**](ConditionalOperator.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.agent_threshold_filters import AgentThresholdFilters + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentThresholdFilters from a JSON string +agent_threshold_filters_instance = AgentThresholdFilters.from_json(json) +# print the JSON string representation of the object +print(AgentThresholdFilters.to_json()) + +# convert the object into a dict +agent_threshold_filters_dict = agent_threshold_filters_instance.to_dict() +# create an instance of AgentThresholdFilters from a dict +agent_threshold_filters_from_dict = AgentThresholdFilters.from_dict(agent_threshold_filters_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/agents_api/docs/AgentTransfer.md b/endpoint_agents/docs/AgentTransfer.md similarity index 87% rename from endpoint/agents_api/docs/AgentTransfer.md rename to endpoint_agents/docs/AgentTransfer.md index 6f27b050..bc76c6fe 100644 --- a/endpoint/agents_api/docs/AgentTransfer.md +++ b/endpoint_agents/docs/AgentTransfer.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Identifier of the agent this applies to. | [optional] [readonly] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.agent_transfer import AgentTransfer +from endpoint_agents.models.agent_transfer import AgentTransfer # TODO update the JSON string below json = "{}" # create an instance of AgentTransfer from a JSON string agent_transfer_instance = AgentTransfer.from_json(json) # print the JSON string representation of the object -print AgentTransfer.to_json() +print(AgentTransfer.to_json()) # convert the object into a dict agent_transfer_dict = agent_transfer_instance.to_dict() # create an instance of AgentTransfer from a dict -agent_transfer_form_dict = agent_transfer.from_dict(agent_transfer_dict) +agent_transfer_from_dict = AgentTransfer.from_dict(agent_transfer_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/endpoint/agents_api/docs/AgentTransferRequest.md b/endpoint_agents/docs/AgentTransferRequest.md similarity index 81% rename from endpoint/agents_api/docs/AgentTransferRequest.md rename to endpoint_agents/docs/AgentTransferRequest.md index 91b9f5f2..3c52229b 100644 --- a/endpoint/agents_api/docs/AgentTransferRequest.md +++ b/endpoint_agents/docs/AgentTransferRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to_aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.agent_transfer_request import AgentTransferRequest +from endpoint_agents.models.agent_transfer_request import AgentTransferRequest # TODO update the JSON string below json = "{}" # create an instance of AgentTransferRequest from a JSON string agent_transfer_request_instance = AgentTransferRequest.from_json(json) # print the JSON string representation of the object -print AgentTransferRequest.to_json() +print(AgentTransferRequest.to_json()) # convert the object into a dict agent_transfer_request_dict = agent_transfer_request_instance.to_dict() # create an instance of AgentTransferRequest from a dict -agent_transfer_request_form_dict = agent_transfer_request.from_dict(agent_transfer_request_dict) +agent_transfer_request_from_dict = AgentTransferRequest.from_dict(agent_transfer_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/endpoint/agents_api/docs/BrowserType.md b/endpoint_agents/docs/BrowserType.md similarity index 99% rename from endpoint/agents_api/docs/BrowserType.md rename to endpoint_agents/docs/BrowserType.md index 69afb5f8..7401adfb 100644 --- a/endpoint/agents_api/docs/BrowserType.md +++ b/endpoint_agents/docs/BrowserType.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_agents/docs/ConditionalOperator.md b/endpoint_agents/docs/ConditionalOperator.md new file mode 100644 index 00000000..0aca5a9c --- /dev/null +++ b/endpoint_agents/docs/ConditionalOperator.md @@ -0,0 +1,11 @@ +# ConditionalOperator + + +## 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/endpoint/agents_api/docs/EndpointAgent.md b/endpoint_agents/docs/EndpointAgent.md similarity index 92% rename from endpoint/agents_api/docs/EndpointAgent.md rename to endpoint_agents/docs/EndpointAgent.md index 9056e76b..8b2ad582 100644 --- a/endpoint/agents_api/docs/EndpointAgent.md +++ b/endpoint_agents/docs/EndpointAgent.md @@ -3,10 +3,11 @@ The `EndpointAgent` object, which may include multiple clients. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Identifier of the agent this applies to. | [optional] [readonly] -**aid** | [**EndpointAgentAid**](EndpointAgentAid.md) | | [optional] +**aid** | **str** | | [optional] **name** | **str** | The name of the agent. | [optional] **computer_name** | **str** | | [optional] [readonly] **os_version** | **str** | | [optional] [readonly] @@ -35,19 +36,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agent import EndpointAgent +from endpoint_agents.models.endpoint_agent import EndpointAgent # TODO update the JSON string below json = "{}" # create an instance of EndpointAgent from a JSON string endpoint_agent_instance = EndpointAgent.from_json(json) # print the JSON string representation of the object -print EndpointAgent.to_json() +print(EndpointAgent.to_json()) # convert the object into a dict endpoint_agent_dict = endpoint_agent_instance.to_dict() # create an instance of EndpointAgent from a dict -endpoint_agent_form_dict = endpoint_agent.from_dict(endpoint_agent_dict) +endpoint_agent_from_dict = EndpointAgent.from_dict(endpoint_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/endpoint/agents_api/docs/EndpointAgentBulkTransfer207Response.md b/endpoint_agents/docs/EndpointAgentBulkTransfer207Response.md similarity index 75% rename from endpoint/agents_api/docs/EndpointAgentBulkTransfer207Response.md rename to endpoint_agents/docs/EndpointAgentBulkTransfer207Response.md index 10d4fd6b..9347a9cf 100644 --- a/endpoint/agents_api/docs/EndpointAgentBulkTransfer207Response.md +++ b/endpoint_agents/docs/EndpointAgentBulkTransfer207Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **items** | [**List[EndpointAgentBulkTransfer207ResponseItemsInner]**](EndpointAgentBulkTransfer207ResponseItemsInner.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentBulkTransfer207Response from a JSON string endpoint_agent_bulk_transfer207_response_instance = EndpointAgentBulkTransfer207Response.from_json(json) # print the JSON string representation of the object -print EndpointAgentBulkTransfer207Response.to_json() +print(EndpointAgentBulkTransfer207Response.to_json()) # convert the object into a dict endpoint_agent_bulk_transfer207_response_dict = endpoint_agent_bulk_transfer207_response_instance.to_dict() # create an instance of EndpointAgentBulkTransfer207Response from a dict -endpoint_agent_bulk_transfer207_response_form_dict = endpoint_agent_bulk_transfer207_response.from_dict(endpoint_agent_bulk_transfer207_response_dict) +endpoint_agent_bulk_transfer207_response_from_dict = EndpointAgentBulkTransfer207Response.from_dict(endpoint_agent_bulk_transfer207_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/agents_api/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md b/endpoint_agents/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md similarity index 80% rename from endpoint/agents_api/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md rename to endpoint_agents/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md index fd4b3601..2788a074 100644 --- a/endpoint/agents_api/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md +++ b/endpoint_agents/docs/EndpointAgentBulkTransfer207ResponseItemsInner.md @@ -2,6 +2,7 @@ ## 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] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentBulkTransfer207ResponseItemsInner from a JSON string endpoint_agent_bulk_transfer207_response_items_inner_instance = EndpointAgentBulkTransfer207ResponseItemsInner.from_json(json) # print the JSON string representation of the object -print EndpointAgentBulkTransfer207ResponseItemsInner.to_json() +print(EndpointAgentBulkTransfer207ResponseItemsInner.to_json()) # convert the object into a dict endpoint_agent_bulk_transfer207_response_items_inner_dict = endpoint_agent_bulk_transfer207_response_items_inner_instance.to_dict() # create an instance of EndpointAgentBulkTransfer207ResponseItemsInner from a dict -endpoint_agent_bulk_transfer207_response_items_inner_form_dict = endpoint_agent_bulk_transfer207_response_items_inner.from_dict(endpoint_agent_bulk_transfer207_response_items_inner_dict) +endpoint_agent_bulk_transfer207_response_items_inner_from_dict = EndpointAgentBulkTransfer207ResponseItemsInner.from_dict(endpoint_agent_bulk_transfer207_response_items_inner_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/endpoint/agents_api/docs/EndpointAgentBulkTransferRequest.md b/endpoint_agents/docs/EndpointAgentBulkTransferRequest.md similarity index 75% rename from endpoint/agents_api/docs/EndpointAgentBulkTransferRequest.md rename to endpoint_agents/docs/EndpointAgentBulkTransferRequest.md index 31e1de4c..7ef53d70 100644 --- a/endpoint/agents_api/docs/EndpointAgentBulkTransferRequest.md +++ b/endpoint_agents/docs/EndpointAgentBulkTransferRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **transfers** | [**List[AgentTransfer]**](AgentTransfer.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest +from endpoint_agents.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentBulkTransferRequest from a JSON string endpoint_agent_bulk_transfer_request_instance = EndpointAgentBulkTransferRequest.from_json(json) # print the JSON string representation of the object -print EndpointAgentBulkTransferRequest.to_json() +print(EndpointAgentBulkTransferRequest.to_json()) # convert the object into a dict endpoint_agent_bulk_transfer_request_dict = endpoint_agent_bulk_transfer_request_instance.to_dict() # create an instance of EndpointAgentBulkTransferRequest from a dict -endpoint_agent_bulk_transfer_request_form_dict = endpoint_agent_bulk_transfer_request.from_dict(endpoint_agent_bulk_transfer_request_dict) +endpoint_agent_bulk_transfer_request_from_dict = EndpointAgentBulkTransferRequest.from_dict(endpoint_agent_bulk_transfer_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/endpoint/agents_api/docs/EndpointAgentGet200Response.md b/endpoint_agents/docs/EndpointAgentGet200Response.md similarity index 89% rename from endpoint/agents_api/docs/EndpointAgentGet200Response.md rename to endpoint_agents/docs/EndpointAgentGet200Response.md index 85f71285..70a88bb3 100644 --- a/endpoint/agents_api/docs/EndpointAgentGet200Response.md +++ b/endpoint_agents/docs/EndpointAgentGet200Response.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Identifier of the agent this applies to. | [optional] [readonly] -**aid** | [**EndpointAgentAid**](EndpointAgentAid.md) | | [optional] +**aid** | **str** | | [optional] **name** | **str** | The name of the agent. | [optional] **computer_name** | **str** | | [optional] [readonly] **os_version** | **str** | | [optional] [readonly] @@ -35,19 +36,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentGet200Response from a JSON string endpoint_agent_get200_response_instance = EndpointAgentGet200Response.from_json(json) # print the JSON string representation of the object -print EndpointAgentGet200Response.to_json() +print(EndpointAgentGet200Response.to_json()) # convert the object into a dict endpoint_agent_get200_response_dict = endpoint_agent_get200_response_instance.to_dict() # create an instance of EndpointAgentGet200Response from a dict -endpoint_agent_get200_response_form_dict = endpoint_agent_get200_response.from_dict(endpoint_agent_get200_response_dict) +endpoint_agent_get200_response_from_dict = EndpointAgentGet200Response.from_dict(endpoint_agent_get200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/agents_api/docs/EndpointAgentLocation.md b/endpoint_agents/docs/EndpointAgentLocation.md similarity index 80% rename from endpoint/agents_api/docs/EndpointAgentLocation.md rename to endpoint_agents/docs/EndpointAgentLocation.md index 424398ed..9c98dc29 100644 --- a/endpoint/agents_api/docs/EndpointAgentLocation.md +++ b/endpoint_agents/docs/EndpointAgentLocation.md @@ -3,6 +3,7 @@ Approximate location of the agent. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **latitude** | **float** | | [optional] [readonly] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentLocation from a JSON string endpoint_agent_location_instance = EndpointAgentLocation.from_json(json) # print the JSON string representation of the object -print EndpointAgentLocation.to_json() +print(EndpointAgentLocation.to_json()) # convert the object into a dict endpoint_agent_location_dict = endpoint_agent_location_instance.to_dict() # create an instance of EndpointAgentLocation from a dict -endpoint_agent_location_form_dict = endpoint_agent_location.from_dict(endpoint_agent_location_dict) +endpoint_agent_location_from_dict = EndpointAgentLocation.from_dict(endpoint_agent_location_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/endpoint_agents/docs/EndpointAgentUpdate.md b/endpoint_agents/docs/EndpointAgentUpdate.md new file mode 100644 index 00000000..d0e71c84 --- /dev/null +++ b/endpoint_agents/docs/EndpointAgentUpdate.md @@ -0,0 +1,31 @@ +# EndpointAgentUpdate + +The `EndpointAgentUpdate` object contains supported fields for updates. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | New agent name. | [optional] +**license_type** | [**AgentLicenseType**](AgentLicenseType.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentUpdate from a JSON string +endpoint_agent_update_instance = EndpointAgentUpdate.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentUpdate.to_json()) + +# convert the object into a dict +endpoint_agent_update_dict = endpoint_agent_update_instance.to_dict() +# create an instance of EndpointAgentUpdate from a dict +endpoint_agent_update_from_dict = EndpointAgentUpdate.from_dict(endpoint_agent_update_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/endpoint/agents_api/docs/EndpointAgents.md b/endpoint_agents/docs/EndpointAgents.md similarity index 83% rename from endpoint/agents_api/docs/EndpointAgents.md rename to endpoint_agents/docs/EndpointAgents.md index 9a20b114..b6d711d8 100644 --- a/endpoint/agents_api/docs/EndpointAgents.md +++ b/endpoint_agents/docs/EndpointAgents.md @@ -3,6 +3,7 @@ A list of `EndpointAgents`. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total_agents** | **int** | The total number of agents. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agents import EndpointAgents +from endpoint_agents.models.endpoint_agents import EndpointAgents # TODO update the JSON string below json = "{}" # create an instance of EndpointAgents from a JSON string endpoint_agents_instance = EndpointAgents.from_json(json) # print the JSON string representation of the object -print EndpointAgents.to_json() +print(EndpointAgents.to_json()) # convert the object into a dict endpoint_agents_dict = endpoint_agents_instance.to_dict() # create an instance of EndpointAgents from a dict -endpoint_agents_form_dict = endpoint_agents.from_dict(endpoint_agents_dict) +endpoint_agents_from_dict = EndpointAgents.from_dict(endpoint_agents_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/endpoint/agents_api/docs/EndpointAgentsAgentsInner.md b/endpoint_agents/docs/EndpointAgentsAgentsInner.md similarity index 90% rename from endpoint/agents_api/docs/EndpointAgentsAgentsInner.md rename to endpoint_agents/docs/EndpointAgentsAgentsInner.md index 1e7a5004..3d2dfd3e 100644 --- a/endpoint/agents_api/docs/EndpointAgentsAgentsInner.md +++ b/endpoint_agents/docs/EndpointAgentsAgentsInner.md @@ -2,11 +2,12 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] **id** | **str** | Identifier of the agent this applies to. | [optional] [readonly] -**aid** | [**EndpointAgentAid**](EndpointAgentAid.md) | | [optional] +**aid** | **str** | | [optional] **name** | **str** | The name of the agent. | [optional] **computer_name** | **str** | | [optional] [readonly] **os_version** | **str** | | [optional] [readonly] @@ -35,19 +36,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentsAgentsInner from a JSON string endpoint_agents_agents_inner_instance = EndpointAgentsAgentsInner.from_json(json) # print the JSON string representation of the object -print EndpointAgentsAgentsInner.to_json() +print(EndpointAgentsAgentsInner.to_json()) # convert the object into a dict endpoint_agents_agents_inner_dict = endpoint_agents_agents_inner_instance.to_dict() # create an instance of EndpointAgentsAgentsInner from a dict -endpoint_agents_agents_inner_form_dict = endpoint_agents_agents_inner.from_dict(endpoint_agents_agents_inner_dict) +endpoint_agents_agents_inner_from_dict = EndpointAgentsAgentsInner.from_dict(endpoint_agents_agents_inner_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/endpoint/agents_api/docs/EndpointAgentsConnectionString200Response.md b/endpoint_agents/docs/EndpointAgentsConnectionString200Response.md similarity index 75% rename from endpoint/agents_api/docs/EndpointAgentsConnectionString200Response.md rename to endpoint_agents/docs/EndpointAgentsConnectionString200Response.md index 844207e5..4a117ee8 100644 --- a/endpoint/agents_api/docs/EndpointAgentsConnectionString200Response.md +++ b/endpoint_agents/docs/EndpointAgentsConnectionString200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response +from endpoint_agents.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentsConnectionString200Response from a JSON string endpoint_agents_connection_string200_response_instance = EndpointAgentsConnectionString200Response.from_json(json) # print the JSON string representation of the object -print EndpointAgentsConnectionString200Response.to_json() +print(EndpointAgentsConnectionString200Response.to_json()) # convert the object into a dict endpoint_agents_connection_string200_response_dict = endpoint_agents_connection_string200_response_instance.to_dict() # create an instance of EndpointAgentsConnectionString200Response from a dict -endpoint_agents_connection_string200_response_form_dict = endpoint_agents_connection_string200_response.from_dict(endpoint_agents_connection_string200_response_dict) +endpoint_agents_connection_string200_response_from_dict = EndpointAgentsConnectionString200Response.from_dict(endpoint_agents_connection_string200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_agents/docs/EndpointAgentsList200Response.md b/endpoint_agents/docs/EndpointAgentsList200Response.md new file mode 100644 index 00000000..c09f862d --- /dev/null +++ b/endpoint_agents/docs/EndpointAgentsList200Response.md @@ -0,0 +1,31 @@ +# EndpointAgentsList200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_agents** | **int** | The total number of agents. | [optional] +**agents** | [**List[EndpointAgentsAgentsInner]**](EndpointAgentsAgentsInner.md) | | [optional] +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.endpoint_agents_list200_response import EndpointAgentsList200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentsList200Response from a JSON string +endpoint_agents_list200_response_instance = EndpointAgentsList200Response.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentsList200Response.to_json()) + +# convert the object into a dict +endpoint_agents_list200_response_dict = endpoint_agents_list200_response_instance.to_dict() +# create an instance of EndpointAgentsList200Response from a dict +endpoint_agents_list200_response_from_dict = EndpointAgentsList200Response.from_dict(endpoint_agents_list200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/agents_api/docs/EndpointAgentsSearch200Response.md b/endpoint_agents/docs/EndpointAgentsSearch200Response.md similarity index 79% rename from endpoint/agents_api/docs/EndpointAgentsSearch200Response.md rename to endpoint_agents/docs/EndpointAgentsSearch200Response.md index 2a902809..211c4270 100644 --- a/endpoint/agents_api/docs/EndpointAgentsSearch200Response.md +++ b/endpoint_agents/docs/EndpointAgentsSearch200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total_agents** | **int** | The total number of agents. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response +from endpoint_agents.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentsSearch200Response from a JSON string endpoint_agents_search200_response_instance = EndpointAgentsSearch200Response.from_json(json) # print the JSON string representation of the object -print EndpointAgentsSearch200Response.to_json() +print(EndpointAgentsSearch200Response.to_json()) # convert the object into a dict endpoint_agents_search200_response_dict = endpoint_agents_search200_response_instance.to_dict() # create an instance of EndpointAgentsSearch200Response from a dict -endpoint_agents_search200_response_form_dict = endpoint_agents_search200_response.from_dict(endpoint_agents_search200_response_dict) +endpoint_agents_search200_response_from_dict = EndpointAgentsSearch200Response.from_dict(endpoint_agents_search200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/agents_api/docs/EndpointAsnDetails.md b/endpoint_agents/docs/EndpointAsnDetails.md similarity index 80% rename from endpoint/agents_api/docs/EndpointAsnDetails.md rename to endpoint_agents/docs/EndpointAsnDetails.md index 7d1dabaa..afbc0552 100644 --- a/endpoint/agents_api/docs/EndpointAsnDetails.md +++ b/endpoint_agents/docs/EndpointAsnDetails.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **as_number** | **int** | Autonomous system number. | @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails # TODO update the JSON string below json = "{}" # create an instance of EndpointAsnDetails from a JSON string endpoint_asn_details_instance = EndpointAsnDetails.from_json(json) # print the JSON string representation of the object -print EndpointAsnDetails.to_json() +print(EndpointAsnDetails.to_json()) # convert the object into a dict endpoint_asn_details_dict = endpoint_asn_details_instance.to_dict() # create an instance of EndpointAsnDetails from a dict -endpoint_asn_details_form_dict = endpoint_asn_details.from_dict(endpoint_asn_details_dict) +endpoint_asn_details_from_dict = EndpointAsnDetails.from_dict(endpoint_asn_details_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/endpoint/agents_api/docs/EndpointBrowserExtension.md b/endpoint_agents/docs/EndpointBrowserExtension.md similarity index 84% rename from endpoint/agents_api/docs/EndpointBrowserExtension.md rename to endpoint_agents/docs/EndpointBrowserExtension.md index 2eaef9f8..34929857 100644 --- a/endpoint/agents_api/docs/EndpointBrowserExtension.md +++ b/endpoint_agents/docs/EndpointBrowserExtension.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **browser** | [**BrowserType**](BrowserType.md) | | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_browser_extension import EndpointBrowserExtension +from endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension # TODO update the JSON string below json = "{}" # create an instance of EndpointBrowserExtension from a JSON string endpoint_browser_extension_instance = EndpointBrowserExtension.from_json(json) # print the JSON string representation of the object -print EndpointBrowserExtension.to_json() +print(EndpointBrowserExtension.to_json()) # convert the object into a dict endpoint_browser_extension_dict = endpoint_browser_extension_instance.to_dict() # create an instance of EndpointBrowserExtension from a dict -endpoint_browser_extension_form_dict = endpoint_browser_extension.from_dict(endpoint_browser_extension_dict) +endpoint_browser_extension_from_dict = EndpointBrowserExtension.from_dict(endpoint_browser_extension_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/endpoint/agents_api/docs/EndpointClient.md b/endpoint_agents/docs/EndpointClient.md similarity index 84% rename from endpoint/agents_api/docs/EndpointClient.md rename to endpoint_agents/docs/EndpointClient.md index 1d43e84b..a87447b1 100644 --- a/endpoint/agents_api/docs/EndpointClient.md +++ b/endpoint_agents/docs/EndpointClient.md @@ -3,6 +3,7 @@ Information about the user who has the agent installed. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_profile** | [**EndpointUserProfile**](EndpointUserProfile.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_client import EndpointClient +from endpoint_agents.models.endpoint_client import EndpointClient # TODO update the JSON string below json = "{}" # create an instance of EndpointClient from a JSON string endpoint_client_instance = EndpointClient.from_json(json) # print the JSON string representation of the object -print EndpointClient.to_json() +print(EndpointClient.to_json()) # convert the object into a dict endpoint_client_dict = endpoint_client_instance.to_dict() # create an instance of EndpointClient from a dict -endpoint_client_form_dict = endpoint_client.from_dict(endpoint_client_dict) +endpoint_client_from_dict = EndpointClient.from_dict(endpoint_client_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/endpoint/agents_api/docs/EndpointUserProfile.md b/endpoint_agents/docs/EndpointUserProfile.md similarity index 78% rename from endpoint/agents_api/docs/EndpointUserProfile.md rename to endpoint_agents/docs/EndpointUserProfile.md index d03afe6e..5c3ab08b 100644 --- a/endpoint/agents_api/docs/EndpointUserProfile.md +++ b/endpoint_agents/docs/EndpointUserProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **user_name** | **str** | | @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_user_profile import EndpointUserProfile +from endpoint_agents.models.endpoint_user_profile import EndpointUserProfile # TODO update the JSON string below json = "{}" # create an instance of EndpointUserProfile from a JSON string endpoint_user_profile_instance = EndpointUserProfile.from_json(json) # print the JSON string representation of the object -print EndpointUserProfile.to_json() +print(EndpointUserProfile.to_json()) # convert the object into a dict endpoint_user_profile_dict = endpoint_user_profile_instance.to_dict() # create an instance of EndpointUserProfile from a dict -endpoint_user_profile_form_dict = endpoint_user_profile.from_dict(endpoint_user_profile_dict) +endpoint_user_profile_from_dict = EndpointUserProfile.from_dict(endpoint_user_profile_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/endpoint/agents_api/docs/EndpointVpnProfile.md b/endpoint_agents/docs/EndpointVpnProfile.md similarity index 85% rename from endpoint/agents_api/docs/EndpointVpnProfile.md rename to endpoint_agents/docs/EndpointVpnProfile.md index b4838a45..28b8abd7 100644 --- a/endpoint/agents_api/docs/EndpointVpnProfile.md +++ b/endpoint_agents/docs/EndpointVpnProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interface_name** | **str** | Interface name associated with `interfaceProfile`. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile # TODO update the JSON string below json = "{}" # create an instance of EndpointVpnProfile from a JSON string endpoint_vpn_profile_instance = EndpointVpnProfile.from_json(json) # print the JSON string representation of the object -print EndpointVpnProfile.to_json() +print(EndpointVpnProfile.to_json()) # convert the object into a dict endpoint_vpn_profile_dict = endpoint_vpn_profile_instance.to_dict() # create an instance of EndpointVpnProfile from a dict -endpoint_vpn_profile_form_dict = endpoint_vpn_profile.from_dict(endpoint_vpn_profile_dict) +endpoint_vpn_profile_from_dict = EndpointVpnProfile.from_dict(endpoint_vpn_profile_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/endpoint_agents/docs/Error.md b/endpoint_agents/docs/Error.md new file mode 100644 index 00000000..2709e66b --- /dev/null +++ b/endpoint_agents/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 endpoint_agents.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/endpoint_agents/docs/EthernetProfile.md b/endpoint_agents/docs/EthernetProfile.md new file mode 100644 index 00000000..0103b2d0 --- /dev/null +++ b/endpoint_agents/docs/EthernetProfile.md @@ -0,0 +1,30 @@ +# EthernetProfile + +Information about the ethernet connectivity of this device. Only present if the hardware type is `ethernet`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link_speed** | **int** | Link speed in Mbps. | [optional] + +## Example + +```python +from endpoint_agents.models.ethernet_profile import EthernetProfile + +# TODO update the JSON string below +json = "{}" +# create an instance of EthernetProfile from a JSON string +ethernet_profile_instance = EthernetProfile.from_json(json) +# print the JSON string representation of the object +print(EthernetProfile.to_json()) + +# convert the object into a dict +ethernet_profile_dict = ethernet_profile_instance.to_dict() +# create an instance of EthernetProfile from a dict +ethernet_profile_from_dict = EthernetProfile.from_dict(ethernet_profile_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/endpoint_agents/docs/Expand.md b/endpoint_agents/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/endpoint_agents/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/endpoint_agents/docs/InterfaceHardwareType.md b/endpoint_agents/docs/InterfaceHardwareType.md new file mode 100644 index 00000000..f150d49d --- /dev/null +++ b/endpoint_agents/docs/InterfaceHardwareType.md @@ -0,0 +1,11 @@ +# InterfaceHardwareType + + +## 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/endpoint/agents_api/docs/InterfaceProfile.md b/endpoint_agents/docs/InterfaceProfile.md similarity index 85% rename from endpoint/agents_api/docs/InterfaceProfile.md rename to endpoint_agents/docs/InterfaceProfile.md index b4006c8b..d9f5119b 100644 --- a/endpoint/agents_api/docs/InterfaceProfile.md +++ b/endpoint_agents/docs/InterfaceProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interface_name** | **str** | | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.interface_profile import InterfaceProfile +from endpoint_agents.models.interface_profile import InterfaceProfile # TODO update the JSON string below json = "{}" # create an instance of InterfaceProfile from a JSON string interface_profile_instance = InterfaceProfile.from_json(json) # print the JSON string representation of the object -print InterfaceProfile.to_json() +print(InterfaceProfile.to_json()) # convert the object into a dict interface_profile_dict = interface_profile_instance.to_dict() # create an instance of InterfaceProfile from a dict -interface_profile_form_dict = interface_profile.from_dict(interface_profile_dict) +interface_profile_from_dict = InterfaceProfile.from_dict(interface_profile_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/endpoint_agents/docs/Link.md b/endpoint_agents/docs/Link.md new file mode 100644 index 00000000..51e197b9 --- /dev/null +++ b/endpoint_agents/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 endpoint_agents.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/endpoint/agents_api/docs/ManageAgentsApi.md b/endpoint_agents/docs/ManageAgentsApi.md similarity index 78% rename from endpoint/agents_api/docs/ManageAgentsApi.md rename to endpoint_agents/docs/ManageAgentsApi.md index 4159e81a..5aaf1a2f 100644 --- a/endpoint/agents_api/docs/ManageAgentsApi.md +++ b/endpoint_agents/docs/ManageAgentsApi.md @@ -1,4 +1,4 @@ -# agents_api.ManageAgentsApi +# endpoint_agents.ManageAgentsApi All URIs are relative to *https://api.thousandeyes.com* @@ -23,17 +23,16 @@ Deletes the agent with the specified `agent_id`. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.expand import Expand -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.expand import Expand +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,17 +42,17 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) + api_instance = endpoint_agents.ManageAgentsApi(api_client) agent_id = 'agent_id_example' # str | The identifier of the agent to operate on. - aid = '2067' # 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 = [agents_api.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) + 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 = [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) try: # Delete endpoint agent @@ -66,6 +65,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| The identifier of the agent to operate on. | @@ -83,9 +83,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -106,17 +107,16 @@ Disables an endpoint agent. If it's already disabled, it has no effect (no opera ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) + api_instance = endpoint_agents.ManageAgentsApi(api_client) agent_id = 'agent_id_example' # str | The identifier of the agent to operate on. - aid = '2067' # 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) + 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: # Disable endpoint agent @@ -150,6 +150,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| The identifier of the agent to operate on. | @@ -169,6 +170,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The agent's current state. | - | @@ -189,17 +191,16 @@ Enables an endpoint agent. If it's already enabled, it has no effect (no operati ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -209,16 +210,16 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) + api_instance = endpoint_agents.ManageAgentsApi(api_client) agent_id = 'agent_id_example' # str | The identifier of the agent to operate on. - aid = '2067' # 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) + 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: # Enable endpoint agent @@ -233,6 +234,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| The identifier of the agent to operate on. | @@ -252,6 +254,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The agent's current state. | - | @@ -272,18 +275,17 @@ Retrieves details of an agent with the specified `agent_id`. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.models.expand import Expand -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.expand import Expand +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -293,17 +295,17 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) + api_instance = endpoint_agents.ManageAgentsApi(api_client) agent_id = 'agent_id_example' # str | The identifier of the agent to operate on. - aid = '2067' # 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 = [agents_api.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) + 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 = [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: @@ -319,6 +321,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| The identifier of the agent to operate on. | @@ -340,6 +343,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The agent's current state. | - | @@ -360,19 +364,18 @@ Updates the agent with the specified `agent_id`. This API supports the modificat ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.models.endpoint_agent_update import EndpointAgentUpdate -from agents_api.models.expand import Expand -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate +from endpoint_agents.models.expand import Expand +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -382,18 +385,18 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) + api_instance = endpoint_agents.ManageAgentsApi(api_client) agent_id = 'agent_id_example' # str | The identifier of the agent to operate on. - aid = '2067' # 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 = [agents_api.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) - endpoint_agent_update = agents_api.EndpointAgentUpdate() # EndpointAgentUpdate | Fields to modify on the agent (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 = [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) + endpoint_agent_update = endpoint_agents.EndpointAgentUpdate() # EndpointAgentUpdate | Fields to modify on the agent (optional) try: # Update endpoint agent @@ -408,6 +411,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| The identifier of the agent to operate on. | @@ -429,6 +433,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | The agent's current state. | - | @@ -449,18 +454,17 @@ Retrieves a list of endpoint agents in a given account group. If there are no a ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agents_list200_response import EndpointAgentsList200Response -from agents_api.models.expand import Expand -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agents_list200_response import EndpointAgentsList200Response +from endpoint_agents.models.expand import Expand +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -470,18 +474,18 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) + api_instance = 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 `_links` instead of this parameter. (optional) - aid = '2067' # 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 = [agents_api.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) + 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 = [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) @@ -500,10 +504,11 @@ with agents_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [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] @@ -525,6 +530,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -544,19 +550,18 @@ Retrieves a list of endpoint agents within the specified account group that matc ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_search_request import AgentSearchRequest -from agents_api.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response -from agents_api.models.expand import Expand -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.agent_search_request import AgentSearchRequest +from endpoint_agents.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response +from endpoint_agents.models.expand import Expand +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -566,19 +571,19 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.ManageAgentsApi(api_client) - agent_search_request = agents_api.AgentSearchRequest() # AgentSearchRequest | The filter options for advanced search filtering for agents. + api_instance = endpoint_agents.ManageAgentsApi(api_client) + agent_search_request = 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 `_links` instead of this parameter. (optional) - aid = '2067' # 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 = [agents_api.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) + 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 = [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: @@ -594,11 +599,12 @@ with agents_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [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] @@ -617,6 +623,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint_agents/docs/PaginationNextAndSelfLink.md b/endpoint_agents/docs/PaginationNextAndSelfLink.md new file mode 100644 index 00000000..497ddcf5 --- /dev/null +++ b/endpoint_agents/docs/PaginationNextAndSelfLink.md @@ -0,0 +1,30 @@ +# PaginationNextAndSelfLink + +A links object containing a related link for forward pagination. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.pagination_next_and_self_link import PaginationNextAndSelfLink + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextAndSelfLink from a JSON string +pagination_next_and_self_link_instance = PaginationNextAndSelfLink.from_json(json) +# print the JSON string representation of the object +print(PaginationNextAndSelfLink.to_json()) + +# convert the object into a dict +pagination_next_and_self_link_dict = pagination_next_and_self_link_instance.to_dict() +# create an instance of PaginationNextAndSelfLink from a dict +pagination_next_and_self_link_from_dict = PaginationNextAndSelfLink.from_dict(pagination_next_and_self_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/endpoint_agents/docs/PaginationNextAndSelfLinkLinks.md b/endpoint_agents/docs/PaginationNextAndSelfLinkLinks.md new file mode 100644 index 00000000..027b5e52 --- /dev/null +++ b/endpoint_agents/docs/PaginationNextAndSelfLinkLinks.md @@ -0,0 +1,30 @@ +# PaginationNextAndSelfLinkLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextAndSelfLinkLinks from a JSON string +pagination_next_and_self_link_links_instance = PaginationNextAndSelfLinkLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationNextAndSelfLinkLinks.to_json()) + +# convert the object into a dict +pagination_next_and_self_link_links_dict = pagination_next_and_self_link_links_instance.to_dict() +# create an instance of PaginationNextAndSelfLinkLinks from a dict +pagination_next_and_self_link_links_from_dict = PaginationNextAndSelfLinkLinks.from_dict(pagination_next_and_self_link_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/endpoint_agents/docs/PaginationNextLink.md b/endpoint_agents/docs/PaginationNextLink.md new file mode 100644 index 00000000..f6d597da --- /dev/null +++ b/endpoint_agents/docs/PaginationNextLink.md @@ -0,0 +1,30 @@ +# PaginationNextLink + +A links object containing a related link for forward pagination. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.pagination_next_link import PaginationNextLink + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextLink from a JSON string +pagination_next_link_instance = PaginationNextLink.from_json(json) +# print the JSON string representation of the object +print(PaginationNextLink.to_json()) + +# convert the object into a dict +pagination_next_link_dict = pagination_next_link_instance.to_dict() +# create an instance of PaginationNextLink from a dict +pagination_next_link_from_dict = PaginationNextLink.from_dict(pagination_next_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/endpoint_agents/docs/PaginationNextLinkLinks.md b/endpoint_agents/docs/PaginationNextLinkLinks.md new file mode 100644 index 00000000..afb7cfcb --- /dev/null +++ b/endpoint_agents/docs/PaginationNextLinkLinks.md @@ -0,0 +1,29 @@ +# PaginationNextLinkLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.pagination_next_link_links import PaginationNextLinkLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextLinkLinks from a JSON string +pagination_next_link_links_instance = PaginationNextLinkLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationNextLinkLinks.to_json()) + +# convert the object into a dict +pagination_next_link_links_dict = pagination_next_link_links_instance.to_dict() +# create an instance of PaginationNextLinkLinks from a dict +pagination_next_link_links_from_dict = PaginationNextLinkLinks.from_dict(pagination_next_link_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/endpoint_agents/docs/Platform.md b/endpoint_agents/docs/Platform.md new file mode 100644 index 00000000..97f29ba7 --- /dev/null +++ b/endpoint_agents/docs/Platform.md @@ -0,0 +1,12 @@ +# Platform + +OS platform types + +## 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/endpoint_agents/docs/SelfLinks.md b/endpoint_agents/docs/SelfLinks.md new file mode 100644 index 00000000..383cacea --- /dev/null +++ b/endpoint_agents/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_agents.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/endpoint_agents/docs/SelfLinksLinks.md b/endpoint_agents/docs/SelfLinksLinks.md new file mode 100644 index 00000000..bdc1f410 --- /dev/null +++ b/endpoint_agents/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_agents.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/endpoint_agents/docs/SortOrder.md b/endpoint_agents/docs/SortOrder.md new file mode 100644 index 00000000..f5616229 --- /dev/null +++ b/endpoint_agents/docs/SortOrder.md @@ -0,0 +1,12 @@ +# SortOrder + +Parameter indicates the ascending/descending order of the sorting, using either the asc or desc values. + +## 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/endpoint/agents_api/docs/Status.md b/endpoint_agents/docs/Status.md similarity index 99% rename from endpoint/agents_api/docs/Status.md rename to endpoint_agents/docs/Status.md index 5d270b46..deada21a 100644 --- a/endpoint/agents_api/docs/Status.md +++ b/endpoint_agents/docs/Status.md @@ -3,6 +3,7 @@ Status of the endpoint agent in ThousandEyes. Disabled agents don't report data. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_agents/docs/ThresholdFilterOperator.md b/endpoint_agents/docs/ThresholdFilterOperator.md new file mode 100644 index 00000000..c580dd34 --- /dev/null +++ b/endpoint_agents/docs/ThresholdFilterOperator.md @@ -0,0 +1,11 @@ +# ThresholdFilterOperator + + +## 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/endpoint/agents_api/docs/TransferApi.md b/endpoint_agents/docs/TransferApi.md similarity index 84% rename from endpoint/agents_api/docs/TransferApi.md rename to endpoint_agents/docs/TransferApi.md index b6212c2c..3245baaa 100644 --- a/endpoint/agents_api/docs/TransferApi.md +++ b/endpoint_agents/docs/TransferApi.md @@ -1,4 +1,4 @@ -# agents_api.TransferApi +# endpoint_agents.TransferApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,18 +18,17 @@ Initiates the transfer of multiple agents between accounts. The following condit ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response -from agents_api.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response +from endpoint_agents.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,16 +38,16 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.TransferApi(api_client) - aid = '2067' # 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) - endpoint_agent_bulk_transfer_request = agents_api.EndpointAgentBulkTransferRequest() # EndpointAgentBulkTransferRequest | A collection of `AgentTransfers`. (optional) + api_instance = 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) + endpoint_agent_bulk_transfer_request = endpoint_agents.EndpointAgentBulkTransferRequest() # EndpointAgentBulkTransferRequest | A collection of `AgentTransfers`. (optional) try: # Bulk transfer agents @@ -63,6 +62,7 @@ with agents_api.ApiClient(configuration) as api_client: ### 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] @@ -82,6 +82,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **207** | Transfer initiated | - | @@ -103,17 +104,16 @@ Initiates the transfer of an agent from its current account, which must correspo ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import agents_api -from agents_api.models.agent_transfer_request import AgentTransferRequest -from agents_api.rest import ApiException +import endpoint_agents +from endpoint_agents.models.agent_transfer_request import AgentTransferRequest +from 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 = agents_api.Configuration( +configuration = endpoint_agents.Configuration( host = "https://api.thousandeyes.com" ) @@ -123,17 +123,17 @@ configuration = agents_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = agents_api.Configuration( +configuration = endpoint_agents.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with agents_api.ApiClient(configuration) as api_client: +with endpoint_agents.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = agents_api.TransferApi(api_client) + api_instance = endpoint_agents.TransferApi(api_client) agent_id = 'agent_id_example' # str | The identifier of the agent to operate on. - agent_transfer_request = agents_api.AgentTransferRequest() # AgentTransferRequest | The request to move an agent between accounts. - aid = '2067' # 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) + agent_transfer_request = endpoint_agents.AgentTransferRequest() # AgentTransferRequest | The request to move an agent between accounts. + 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: # Transfer endpoint agent @@ -146,6 +146,7 @@ with agents_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **agent_id** | **str**| The identifier of the agent to operate on. | @@ -166,6 +167,7 @@ void (empty response body) - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **202** | Transfer initiated | - | diff --git a/endpoint_agents/docs/UnauthorizedError.md b/endpoint_agents/docs/UnauthorizedError.md new file mode 100644 index 00000000..a70ac7c4 --- /dev/null +++ b/endpoint_agents/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from endpoint_agents.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/endpoint_agents/docs/ValidationError.md b/endpoint_agents/docs/ValidationError.md new file mode 100644 index 00000000..e7922c0f --- /dev/null +++ b/endpoint_agents/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from endpoint_agents.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/endpoint_agents/docs/ValidationErrorAllOfErrors.md b/endpoint_agents/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..0434c814 --- /dev/null +++ b/endpoint_agents/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from endpoint_agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/endpoint_agents/docs/VpnType.md b/endpoint_agents/docs/VpnType.md new file mode 100644 index 00000000..3212772d --- /dev/null +++ b/endpoint_agents/docs/VpnType.md @@ -0,0 +1,12 @@ +# VpnType + +Name of the VPN provider. + +## 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/endpoint/agents_api/docs/WirelessProfile.md b/endpoint_agents/docs/WirelessProfile.md similarity index 82% rename from endpoint/agents_api/docs/WirelessProfile.md rename to endpoint_agents/docs/WirelessProfile.md index 6a0e81da..2003d16c 100644 --- a/endpoint/agents_api/docs/WirelessProfile.md +++ b/endpoint_agents/docs/WirelessProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bssid** | **str** | | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from agents_api.models.wireless_profile import WirelessProfile +from endpoint_agents.models.wireless_profile import WirelessProfile # TODO update the JSON string below json = "{}" # create an instance of WirelessProfile from a JSON string wireless_profile_instance = WirelessProfile.from_json(json) # print the JSON string representation of the object -print WirelessProfile.to_json() +print(WirelessProfile.to_json()) # convert the object into a dict wireless_profile_dict = wireless_profile_instance.to_dict() # create an instance of WirelessProfile from a dict -wireless_profile_form_dict = wireless_profile.from_dict(wireless_profile_dict) +wireless_profile_from_dict = WirelessProfile.from_dict(wireless_profile_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/endpoint_agents/endpoint_agents/__init__.py b/endpoint_agents/endpoint_agents/__init__.py new file mode 100644 index 00000000..88226fdd --- /dev/null +++ b/endpoint_agents/endpoint_agents/__init__.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 endpoint_agents.api.administrative_endpoints_api import AdministrativeEndpointsApi +from endpoint_agents.api.manage_agents_api import ManageAgentsApi +from endpoint_agents.api.transfer_api import TransferApi + +# import ApiClient +from endpoint_agents.api_response import ApiResponse +from endpoint_agents.api_client import ApiClient +from endpoint_agents.configuration import Configuration +from endpoint_agents.exceptions import OpenApiException +from endpoint_agents.exceptions import ApiTypeError +from endpoint_agents.exceptions import ApiValueError +from endpoint_agents.exceptions import ApiKeyError +from endpoint_agents.exceptions import ApiAttributeError +from endpoint_agents.exceptions import ApiException + +# import models into sdk package +from endpoint_agents.models.address_profile import AddressProfile +from endpoint_agents.models.address_type import AddressType +from endpoint_agents.models.agent_license_type import AgentLicenseType +from endpoint_agents.models.agent_search_request import AgentSearchRequest +from endpoint_agents.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters +from endpoint_agents.models.agent_search_sort import AgentSearchSort +from endpoint_agents.models.agent_search_sort_key import AgentSearchSortKey +from endpoint_agents.models.agent_threshold_filter import AgentThresholdFilter +from endpoint_agents.models.agent_threshold_filters import AgentThresholdFilters +from endpoint_agents.models.agent_transfer import AgentTransfer +from endpoint_agents.models.agent_transfer_request import AgentTransferRequest +from endpoint_agents.models.browser_type import BrowserType +from endpoint_agents.models.conditional_operator import ConditionalOperator +from endpoint_agents.models.endpoint_agent import EndpointAgent +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner +from endpoint_agents.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate +from endpoint_agents.models.endpoint_agents import EndpointAgents +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from endpoint_agents.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response +from endpoint_agents.models.endpoint_agents_list200_response import EndpointAgentsList200Response +from endpoint_agents.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension +from endpoint_agents.models.endpoint_client import EndpointClient +from endpoint_agents.models.endpoint_user_profile import EndpointUserProfile +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.error import Error +from endpoint_agents.models.ethernet_profile import EthernetProfile +from endpoint_agents.models.expand import Expand +from endpoint_agents.models.interface_hardware_type import InterfaceHardwareType +from endpoint_agents.models.interface_profile import InterfaceProfile +from endpoint_agents.models.link import Link +from endpoint_agents.models.pagination_next_and_self_link import PaginationNextAndSelfLink +from endpoint_agents.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_agents.models.pagination_next_link import PaginationNextLink +from endpoint_agents.models.pagination_next_link_links import PaginationNextLinkLinks +from endpoint_agents.models.platform import Platform +from endpoint_agents.models.self_links import SelfLinks +from endpoint_agents.models.self_links_links import SelfLinksLinks +from endpoint_agents.models.sort_order import SortOrder +from endpoint_agents.models.status import Status +from endpoint_agents.models.threshold_filter_operator import ThresholdFilterOperator +from endpoint_agents.models.unauthorized_error import UnauthorizedError +from endpoint_agents.models.validation_error import ValidationError +from endpoint_agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from endpoint_agents.models.vpn_type import VpnType +from endpoint_agents.models.wireless_profile import WirelessProfile diff --git a/endpoint_agents/endpoint_agents/api/__init__.py b/endpoint_agents/endpoint_agents/api/__init__.py new file mode 100644 index 00000000..72ea280c --- /dev/null +++ b/endpoint_agents/endpoint_agents/api/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa + +# import apis into api package +from endpoint_agents.api.administrative_endpoints_api import AdministrativeEndpointsApi +from endpoint_agents.api.manage_agents_api import ManageAgentsApi +from endpoint_agents.api.transfer_api import TransferApi + diff --git a/endpoint/agents_api/agents_api/api/administrative_endpoints_api.py b/endpoint_agents/endpoint_agents/api/administrative_endpoints_api.py similarity index 93% rename from endpoint/agents_api/agents_api/api/administrative_endpoints_api.py rename to endpoint_agents/endpoint_agents/api/administrative_endpoints_api.py index 399468cd..cb56cc07 100644 --- a/endpoint/agents_api/agents_api/api/administrative_endpoints_api.py +++ b/endpoint_agents/endpoint_agents/api/administrative_endpoints_api.py @@ -3,37 +3,27 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from endpoint_agents.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response -from agents_api.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from endpoint_agents.api_client import ApiClient, RequestSerialized +from endpoint_agents.api_response import ApiResponse +from endpoint_agents.rest import RESTResponseType class AdministrativeEndpointsApi: @@ -105,8 +95,7 @@ class AdministrativeEndpointsApi: '200': "EndpointAgentsConnectionString200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -175,8 +164,7 @@ class AdministrativeEndpointsApi: '200': "EndpointAgentsConnectionString200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -245,8 +233,7 @@ class AdministrativeEndpointsApi: '200': "EndpointAgentsConnectionString200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -262,19 +249,18 @@ class AdministrativeEndpointsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/agents_api/agents_api/api/manage_agents_api.py b/endpoint_agents/endpoint_agents/api/manage_agents_api.py similarity index 97% rename from endpoint/agents_api/agents_api/api/manage_agents_api.py rename to endpoint_agents/endpoint_agents/api/manage_agents_api.py index bb73f14a..6c54b81d 100644 --- a/endpoint/agents_api/agents_api/api/manage_agents_api.py +++ b/endpoint_agents/endpoint_agents/api/manage_agents_api.py @@ -3,42 +3,32 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import List, Optional, Union +from typing_extensions import Annotated +from endpoint_agents.models.agent_search_request import AgentSearchRequest +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate +from endpoint_agents.models.endpoint_agents_list200_response import EndpointAgentsList200Response +from endpoint_agents.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response +from endpoint_agents.models.expand import Expand -from agents_api.models.agent_search_request import AgentSearchRequest -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response -from agents_api.models.endpoint_agent_update import EndpointAgentUpdate -from agents_api.models.endpoint_agents_list200_response import EndpointAgentsList200Response -from agents_api.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response -from agents_api.models.expand import Expand - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from endpoint_agents.api_client import ApiClient, RequestSerialized +from endpoint_agents.api_response import ApiResponse +from endpoint_agents.rest import RESTResponseType class ManageAgentsApi: @@ -116,7 +106,11 @@ class ManageAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -191,7 +185,11 @@ class ManageAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -266,7 +264,11 @@ class ManageAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -284,12 +286,11 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -297,7 +298,7 @@ class ManageAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -320,7 +321,6 @@ class ManageAgentsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -411,8 +411,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -487,8 +486,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -563,8 +561,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -581,19 +578,18 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -703,8 +699,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -779,8 +774,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -855,8 +849,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -873,19 +866,18 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1003,8 +995,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1087,8 +1078,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1171,8 +1161,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1191,12 +1180,11 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1204,7 +1192,7 @@ class ManageAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1330,8 +1318,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1414,8 +1401,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1498,8 +1484,7 @@ class ManageAgentsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1518,12 +1503,11 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1531,7 +1515,7 @@ class ManageAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1602,7 +1586,7 @@ class ManageAgentsApi: def endpoint_agents_list( self, 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 `_links` instead of this parameter.")] = 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, @@ -1628,7 +1612,7 @@ class ManageAgentsApi: :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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 @@ -1683,8 +1667,7 @@ class ManageAgentsApi: '200': "EndpointAgentsList200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1701,7 +1684,7 @@ class ManageAgentsApi: def endpoint_agents_list_with_http_info( self, 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 `_links` instead of this parameter.")] = 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, @@ -1727,7 +1710,7 @@ class ManageAgentsApi: :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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 @@ -1782,8 +1765,7 @@ class ManageAgentsApi: '200': "EndpointAgentsList200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1800,7 +1782,7 @@ class ManageAgentsApi: def endpoint_agents_list_without_preload_content( self, 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 `_links` instead of this parameter.")] = 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, @@ -1826,7 +1808,7 @@ class ManageAgentsApi: :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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 @@ -1881,8 +1863,7 @@ class ManageAgentsApi: '200': "EndpointAgentsList200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1905,12 +1886,11 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1918,7 +1898,7 @@ class ManageAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1997,7 +1977,7 @@ class ManageAgentsApi: 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 `_links` instead of this parameter.")] = 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, @@ -2022,7 +2002,7 @@ class ManageAgentsApi: :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 `_links` instead of this parameter. + :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 @@ -2067,11 +2047,10 @@ class ManageAgentsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "EndpointAgentsSearch200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -2089,7 +2068,7 @@ class ManageAgentsApi: 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 `_links` instead of this parameter.")] = 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, @@ -2114,7 +2093,7 @@ class ManageAgentsApi: :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 `_links` instead of this parameter. + :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 @@ -2159,11 +2138,10 @@ class ManageAgentsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "EndpointAgentsSearch200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -2181,7 +2159,7 @@ class ManageAgentsApi: 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 `_links` instead of this parameter.")] = 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, @@ -2206,7 +2184,7 @@ class ManageAgentsApi: :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 `_links` instead of this parameter. + :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 @@ -2251,11 +2229,10 @@ class ManageAgentsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "EndpointAgentsSearch200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -2276,12 +2253,11 @@ class ManageAgentsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -2289,7 +2265,7 @@ class ManageAgentsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/agents_api/agents_api/api/transfer_api.py b/endpoint_agents/endpoint_agents/api/transfer_api.py similarity index 94% rename from endpoint/agents_api/agents_api/api/transfer_api.py rename to endpoint_agents/endpoint_agents/api/transfer_api.py index 0f23b7c2..5e6b1f02 100644 --- a/endpoint/agents_api/agents_api/api/transfer_api.py +++ b/endpoint_agents/endpoint_agents/api/transfer_api.py @@ -3,39 +3,29 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from endpoint_agents.models.agent_transfer_request import AgentTransferRequest +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response +from endpoint_agents.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest -from agents_api.models.agent_transfer_request import AgentTransferRequest -from agents_api.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response -from agents_api.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest - -from agents_api.api_client import ApiClient -from agents_api.api_response import ApiResponse -from agents_api.rest import RESTResponseType +from endpoint_agents.api_client import ApiClient, RequestSerialized +from endpoint_agents.api_response import ApiResponse +from endpoint_agents.rest import RESTResponseType class TransferApi: @@ -110,12 +100,11 @@ class TransferApi: _response_types_map: Dict[str, Optional[str]] = { '207': "EndpointAgentBulkTransfer207Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,12 +176,11 @@ class TransferApi: _response_types_map: Dict[str, Optional[str]] = { '207': "EndpointAgentBulkTransfer207Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -264,12 +252,11 @@ class TransferApi: _response_types_map: Dict[str, Optional[str]] = { '207': "EndpointAgentBulkTransfer207Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -286,19 +273,18 @@ class TransferApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -423,7 +409,11 @@ class TransferApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '202': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -498,7 +488,11 @@ class TransferApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '202': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -573,7 +567,11 @@ class TransferApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '202': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -591,19 +589,18 @@ class TransferApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint_agents/endpoint_agents/api_client.py b/endpoint_agents/endpoint_agents/api_client.py new file mode 100644 index 00000000..b6078301 --- /dev/null +++ b/endpoint_agents/endpoint_agents/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from endpoint_agents.configuration import Configuration +from endpoint_agents.api_response import ApiResponse, T as ApiResponseT +import endpoint_agents.models +from endpoint_agents import rest +from endpoint_agents.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(endpoint_agents.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/endpoint_agents/endpoint_agents/api_response.py b/endpoint_agents/endpoint_agents/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/endpoint_agents/endpoint_agents/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/endpoint_agents/endpoint_agents/configuration.py b/endpoint_agents/endpoint_agents/configuration.py new file mode 100644 index 00000000..c100220e --- /dev/null +++ b/endpoint_agents/endpoint_agents/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("endpoint_agents") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/endpoint_agents/endpoint_agents/exceptions.py b/endpoint_agents/endpoint_agents/exceptions.py new file mode 100644 index 00000000..cfb97ad9 --- /dev/null +++ b/endpoint_agents/endpoint_agents/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/endpoint_agents/endpoint_agents/models/__init__.py b/endpoint_agents/endpoint_agents/models/__init__.py new file mode 100644 index 00000000..88e6fd42 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/__init__.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from endpoint_agents.models.address_profile import AddressProfile +from endpoint_agents.models.address_type import AddressType +from endpoint_agents.models.agent_license_type import AgentLicenseType +from endpoint_agents.models.agent_search_request import AgentSearchRequest +from endpoint_agents.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters +from endpoint_agents.models.agent_search_sort import AgentSearchSort +from endpoint_agents.models.agent_search_sort_key import AgentSearchSortKey +from endpoint_agents.models.agent_threshold_filter import AgentThresholdFilter +from endpoint_agents.models.agent_threshold_filters import AgentThresholdFilters +from endpoint_agents.models.agent_transfer import AgentTransfer +from endpoint_agents.models.agent_transfer_request import AgentTransferRequest +from endpoint_agents.models.browser_type import BrowserType +from endpoint_agents.models.conditional_operator import ConditionalOperator +from endpoint_agents.models.endpoint_agent import EndpointAgent +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner +from endpoint_agents.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate +from endpoint_agents.models.endpoint_agents import EndpointAgents +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from endpoint_agents.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response +from endpoint_agents.models.endpoint_agents_list200_response import EndpointAgentsList200Response +from endpoint_agents.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension +from endpoint_agents.models.endpoint_client import EndpointClient +from endpoint_agents.models.endpoint_user_profile import EndpointUserProfile +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.error import Error +from endpoint_agents.models.ethernet_profile import EthernetProfile +from endpoint_agents.models.expand import Expand +from endpoint_agents.models.interface_hardware_type import InterfaceHardwareType +from endpoint_agents.models.interface_profile import InterfaceProfile +from endpoint_agents.models.link import Link +from endpoint_agents.models.pagination_next_and_self_link import PaginationNextAndSelfLink +from endpoint_agents.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_agents.models.pagination_next_link import PaginationNextLink +from endpoint_agents.models.pagination_next_link_links import PaginationNextLinkLinks +from endpoint_agents.models.platform import Platform +from endpoint_agents.models.self_links import SelfLinks +from endpoint_agents.models.self_links_links import SelfLinksLinks +from endpoint_agents.models.sort_order import SortOrder +from endpoint_agents.models.status import Status +from endpoint_agents.models.threshold_filter_operator import ThresholdFilterOperator +from endpoint_agents.models.unauthorized_error import UnauthorizedError +from endpoint_agents.models.validation_error import ValidationError +from endpoint_agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from endpoint_agents.models.vpn_type import VpnType +from endpoint_agents.models.wireless_profile import WirelessProfile diff --git a/endpoint/agents_api/agents_api/models/address_profile.py b/endpoint_agents/endpoint_agents/models/address_profile.py similarity index 77% rename from endpoint/agents_api/agents_api/models/address_profile.py rename to endpoint_agents/endpoint_agents/models/address_profile.py index ff4ec1a5..44ed71fa 100644 --- a/endpoint/agents_api/agents_api/models/address_profile.py +++ b/endpoint_agents/endpoint_agents/models/address_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.address_type import AddressType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.address_type import AddressType +from typing import Optional, Set +from typing_extensions import Self class AddressProfile(BaseModel): """ @@ -38,10 +34,11 @@ class AddressProfile(BaseModel): router_hardware_address: Optional[StrictStr] = Field(default=None, description="The router's MAC address resolved from an ARP request.", alias="routerHardwareAddress") __properties: ClassVar[List[str]] = ["addressType", "ipAddress", "prefixLength", "gateway", "routerHardwareAddress"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class AddressProfile(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AddressProfile from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,16 +65,18 @@ class AddressProfile(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AddressProfile from a dict""" if obj is None: return None diff --git a/endpoint_agents/endpoint_agents/models/address_type.py b/endpoint_agents/endpoint_agents/models/address_type.py new file mode 100644 index 00000000..e2a9a818 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/address_type.py @@ -0,0 +1,40 @@ +# 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.2 + 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 AddressType(str, Enum): + """ + AddressType + """ + + """ + allowed enum values + """ + LOOPBACK = 'loopback' + UNSPECIFIED = 'unspecified' + UNIQUE_MINUS_LOCAL = 'unique-local' + LINK_MINUS_LOCAL = 'link-local' + UNIQUE_MINUS_GLOBAL = 'unique-global' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AddressType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/agent_license_type.py b/endpoint_agents/endpoint_agents/models/agent_license_type.py new file mode 100644 index 00000000..ed1f3523 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_license_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AgentLicenseType(str, Enum): + """ + AgentLicenseType + """ + + """ + allowed enum values + """ + ESSENTIALS = 'essentials' + ADVANTAGE = 'advantage' + EMBEDDED = 'embedded' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AgentLicenseType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/agent_search_request.py b/endpoint_agents/endpoint_agents/models/agent_search_request.py new file mode 100644 index 00000000..f5e84df4 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_search_request.py @@ -0,0 +1,107 @@ +# 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.2 + 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 endpoint_agents.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters +from endpoint_agents.models.agent_search_sort import AgentSearchSort +from endpoint_agents.models.agent_threshold_filters import AgentThresholdFilters +from typing import Optional, Set +from typing_extensions import Self + +class AgentSearchRequest(BaseModel): + """ + Parameters for filtering a list of agents. + """ # noqa: E501 + search_filters: Optional[AgentSearchRequestSearchFilters] = Field(default=None, alias="searchFilters") + threshold_filter: Optional[AgentThresholdFilters] = Field(default=None, alias="thresholdFilter") + search_sort: Optional[List[AgentSearchSort]] = Field(default=None, alias="searchSort") + __properties: ClassVar[List[str]] = ["searchFilters", "thresholdFilter", "searchSort"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSearchRequest 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 search_filters + if self.search_filters: + _dict['searchFilters'] = self.search_filters.to_dict() + # override the default output from pydantic by calling `to_dict()` of threshold_filter + if self.threshold_filter: + _dict['thresholdFilter'] = self.threshold_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in search_sort (list) + _items = [] + if self.search_sort: + for _item in self.search_sort: + if _item: + _items.append(_item.to_dict()) + _dict['searchSort'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentSearchRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "searchFilters": AgentSearchRequestSearchFilters.from_dict(obj["searchFilters"]) if obj.get("searchFilters") is not None else None, + "thresholdFilter": AgentThresholdFilters.from_dict(obj["thresholdFilter"]) if obj.get("thresholdFilter") is not None else None, + "searchSort": [AgentSearchSort.from_dict(_item) for _item in obj["searchSort"]] if obj.get("searchSort") is not None else None + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/agent_search_request_search_filters.py b/endpoint_agents/endpoint_agents/models/agent_search_request_search_filters.py similarity index 76% rename from endpoint/agents_api/agents_api/models/agent_search_request_search_filters.py rename to endpoint_agents/endpoint_agents/models/agent_search_request_search_filters.py index 59bbec8b..6da14d17 100644 --- a/endpoint/agents_api/agents_api/models/agent_search_request_search_filters.py +++ b/endpoint_agents/endpoint_agents/models/agent_search_request_search_filters.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,20 +17,17 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.platform import Platform -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.platform import Platform +from typing import Optional, Set +from typing_extensions import Self class AgentSearchRequestSearchFilters(BaseModel): """ AgentSearchRequestSearchFilters """ # noqa: E501 + id: Optional[List[StrictStr]] = Field(default=None, description="Returns only agents that are an exact match of the provided identifiers.") agent_name: Optional[List[StrictStr]] = Field(default=None, description="Returns only agents with the given name. This is an exact match only. ", alias="agentName") computer_name: Optional[List[StrictStr]] = Field(default=None, description="Returns only agents with the given computer name. This is an exact match only. ", alias="computerName") username: Optional[List[StrictStr]] = Field(default=None, description="Returns only agents that have at least one user with a name. starting with the provided string. This is a case-insensitive prefix match. ") @@ -39,12 +36,13 @@ class AgentSearchRequestSearchFilters(BaseModel): location_country_iso: Optional[List[StrictStr]] = Field(default=None, description="Filter using the ISO country code of the location. ", alias="locationCountryISO") location_subdivision1_code: Optional[List[StrictStr]] = Field(default=None, description="Filter using the code for the first level administrative division within the country. In US/Canada this is the State, in UK it's the country e.g. `ENG` ", alias="locationSubdivision1Code") location_city: Optional[List[StrictStr]] = Field(default=None, description="This is a prefix match on the city name field. The endpoint expects this to contain the name of the city in English. e.g. 'Paris' or '' ", alias="locationCity") - __properties: ClassVar[List[str]] = ["agentName", "computerName", "username", "platform", "osVersion", "locationCountryISO", "locationSubdivision1Code", "locationCity"] + __properties: ClassVar[List[str]] = ["id", "agentName", "computerName", "username", "platform", "osVersion", "locationCountryISO", "locationSubdivision1Code", "locationCity"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +55,7 @@ class AgentSearchRequestSearchFilters(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentSearchRequestSearchFilters from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,16 +69,18 @@ class AgentSearchRequestSearchFilters(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentSearchRequestSearchFilters from a dict""" if obj is None: return None @@ -89,6 +89,7 @@ class AgentSearchRequestSearchFilters(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ + "id": obj.get("id"), "agentName": obj.get("agentName"), "computerName": obj.get("computerName"), "username": obj.get("username"), diff --git a/endpoint_agents/endpoint_agents/models/agent_search_sort.py b/endpoint_agents/endpoint_agents/models/agent_search_sort.py new file mode 100644 index 00000000..b1db6a9a --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_search_sort.py @@ -0,0 +1,91 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.agent_search_sort_key import AgentSearchSortKey +from endpoint_agents.models.sort_order import SortOrder +from typing import Optional, Set +from typing_extensions import Self + +class AgentSearchSort(BaseModel): + """ + AgentSearchSort + """ # noqa: E501 + sort: Optional[AgentSearchSortKey] = None + order: Optional[SortOrder] = None + __properties: ClassVar[List[str]] = ["sort", "order"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentSearchSort 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 AgentSearchSort from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sort": obj.get("sort"), + "order": obj.get("order") + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/agent_search_sort_key.py b/endpoint_agents/endpoint_agents/models/agent_search_sort_key.py new file mode 100644 index 00000000..20330ba7 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_search_sort_key.py @@ -0,0 +1,40 @@ +# 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.2 + 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 AgentSearchSortKey(str, Enum): + """ + AgentSearchSortKey + """ + + """ + allowed enum values + """ + PLATFORM = 'platform' + OSVERSION = 'osVersion' + NAME = 'name' + USERNAME = 'userName' + CITY = 'city' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AgentSearchSortKey from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/agent_threshold_filter.py b/endpoint_agents/endpoint_agents/models/agent_threshold_filter.py new file mode 100644 index 00000000..34fec2e5 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_threshold_filter.py @@ -0,0 +1,102 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_agents.models.threshold_filter_operator import ThresholdFilterOperator +from typing import Optional, Set +from typing_extensions import Self + +class AgentThresholdFilter(BaseModel): + """ + The metric is filtered based on the threshold value and operator provided. + """ # noqa: E501 + name: Optional[StrictStr] = None + value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The threshold value.") + operator: Optional[ThresholdFilterOperator] = None + __properties: ClassVar[List[str]] = ["name", "value", "operator"] + + @field_validator('name') + def name_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['last-seen-ms']): + raise ValueError("must be one of enum values ('last-seen-ms')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentThresholdFilter 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 AgentThresholdFilter 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"), + "value": obj.get("value"), + "operator": obj.get("operator") + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/agent_threshold_filters.py b/endpoint_agents/endpoint_agents/models/agent_threshold_filters.py new file mode 100644 index 00000000..ea31893a --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_threshold_filters.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.2 + 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 endpoint_agents.models.agent_threshold_filter import AgentThresholdFilter +from endpoint_agents.models.conditional_operator import ConditionalOperator +from typing import Optional, Set +from typing_extensions import Self + +class AgentThresholdFilters(BaseModel): + """ + All filters are applied based on the conditional operator (and/or). + """ # noqa: E501 + filters: Optional[List[AgentThresholdFilter]] = None + conditional_operator: Optional[ConditionalOperator] = Field(default=None, alias="conditionalOperator") + __properties: ClassVar[List[str]] = ["filters", "conditionalOperator"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentThresholdFilters 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 filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentThresholdFilters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "filters": [AgentThresholdFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "conditionalOperator": obj.get("conditionalOperator") + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/agent_transfer.py b/endpoint_agents/endpoint_agents/models/agent_transfer.py similarity index 76% rename from endpoint/agents_api/agents_api/models/agent_transfer.py rename to endpoint_agents/endpoint_agents/models/agent_transfer.py index 843f8eda..44d50abe 100644 --- a/endpoint/agents_api/agents_api/models/agent_transfer.py +++ b/endpoint_agents/endpoint_agents/models/agent_transfer.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class AgentTransfer(BaseModel): """ @@ -35,10 +31,11 @@ class AgentTransfer(BaseModel): to_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.", alias="toAid") __properties: ClassVar[List[str]] = ["agentId", "fromAid", "toAid"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class AgentTransfer(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentTransfer from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,17 +63,19 @@ class AgentTransfer(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "agent_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentTransfer from a dict""" if obj is None: return None diff --git a/endpoint_agents/endpoint_agents/models/agent_transfer_request.py b/endpoint_agents/endpoint_agents/models/agent_transfer_request.py new file mode 100644 index 00000000..cbb218b7 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/agent_transfer_request.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AgentTransferRequest(BaseModel): + """ + AgentTransferRequest + """ # noqa: E501 + to_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.", alias="toAid") + __properties: ClassVar[List[str]] = ["toAid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentTransferRequest 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 AgentTransferRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "toAid": obj.get("toAid") + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/browser_type.py b/endpoint_agents/endpoint_agents/models/browser_type.py new file mode 100644 index 00000000..16663ca1 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/browser_type.py @@ -0,0 +1,41 @@ +# 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.2 + 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 BrowserType(str, Enum): + """ + BrowserType + """ + + """ + allowed enum values + """ + CHROME = 'chrome' + CHROME_MINUS_CANARY = 'chrome-canary' + CHROMIUM = 'chromium' + IE = 'ie' + EDGE = 'edge' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BrowserType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/conditional_operator.py b/endpoint_agents/endpoint_agents/models/conditional_operator.py new file mode 100644 index 00000000..03ed7b1a --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/conditional_operator.py @@ -0,0 +1,37 @@ +# 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.2 + 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 ConditionalOperator(str, Enum): + """ + ConditionalOperator + """ + + """ + allowed enum values + """ + AND = 'and' + OR = 'or' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ConditionalOperator from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent.py b/endpoint_agents/endpoint_agents/models/endpoint_agent.py similarity index 76% rename from endpoint/agents_api/agents_api/models/endpoint_agent.py rename to endpoint_agents/endpoint_agents/models/endpoint_agent.py index 8d4b0f46..c07752f1 100644 --- a/endpoint/agents_api/agents_api/models/endpoint_agent.py +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,29 +18,25 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.agent_license_type import AgentLicenseType -from agents_api.models.endpoint_agent_aid import EndpointAgentAid -from agents_api.models.endpoint_agent_location import EndpointAgentLocation -from agents_api.models.endpoint_asn_details import EndpointAsnDetails -from agents_api.models.endpoint_client import EndpointClient -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile -from agents_api.models.interface_profile import InterfaceProfile -from agents_api.models.platform import Platform -from agents_api.models.status import Status -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.agent_license_type import AgentLicenseType +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_client import EndpointClient +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.interface_profile import InterfaceProfile +from endpoint_agents.models.platform import Platform +from endpoint_agents.models.status import Status +from typing import Optional, Set +from typing_extensions import Self class EndpointAgent(BaseModel): """ The `EndpointAgent` object, which may include multiple clients. """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Identifier of the agent this applies to.") - aid: Optional[EndpointAgentAid] = None + aid: Optional[Any] = None name: Optional[StrictStr] = Field(default=None, description="The name of the agent.") computer_name: Optional[StrictStr] = Field(default=None, alias="computerName") os_version: Optional[StrictStr] = Field(default=None, alias="osVersion") @@ -67,10 +63,11 @@ class EndpointAgent(BaseModel): npcap_version: Optional[StrictStr] = Field(default=None, description="For Windows agents, the version of the NPCAP driver that the agent has loaded.", alias="npcapVersion") __properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "lastSeen", "status", "deleted", "version", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -83,7 +80,7 @@ class EndpointAgent(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointAgent from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -116,34 +113,33 @@ class EndpointAgent(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "id", + "computer_name", + "os_version", + "kernel_version", + "manufacturer", + "model", + "last_seen", + "deleted", + "version", + "created_at", + "number_of_clients", + "public_ip", + "clients", + "total_memory", + "agent_type", + "vpn_profiles", + "network_interface_profiles", + "tcp_driver_available", + "npcap_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "id", - "computer_name", - "os_version", - "kernel_version", - "manufacturer", - "model", - "last_seen", - "deleted", - "version", - "created_at", - "number_of_clients", - "public_ip", - "clients", - "total_memory", - "agent_type", - "vpn_profiles", - "network_interface_profiles", - "tcp_driver_available", - "npcap_version", - }, + exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() # override the default output from pydantic by calling `to_dict()` of location if self.location: _dict['location'] = self.location.to_dict() @@ -174,7 +170,7 @@ class EndpointAgent(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointAgent from a dict""" if obj is None: return None @@ -184,7 +180,7 @@ class EndpointAgent(BaseModel): _obj = cls.model_validate({ "id": obj.get("id"), - "aid": EndpointAgentAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, + "aid": obj.get("aid"), "name": obj.get("name"), "computerName": obj.get("computerName"), "osVersion": obj.get("osVersion"), @@ -199,13 +195,13 @@ class EndpointAgent(BaseModel): "createdAt": obj.get("createdAt"), "numberOfClients": obj.get("numberOfClients"), "publicIP": obj.get("publicIP"), - "location": EndpointAgentLocation.from_dict(obj.get("location")) if obj.get("location") is not None else None, - "clients": [EndpointClient.from_dict(_item) for _item in obj.get("clients")] if obj.get("clients") is not None else None, + "location": EndpointAgentLocation.from_dict(obj["location"]) if obj.get("location") is not None else None, + "clients": [EndpointClient.from_dict(_item) for _item in obj["clients"]] if obj.get("clients") is not None else None, "totalMemory": obj.get("totalMemory"), "agentType": obj.get("agentType"), - "vpnProfiles": [EndpointVpnProfile.from_dict(_item) for _item in obj.get("vpnProfiles")] if obj.get("vpnProfiles") is not None else None, - "networkInterfaceProfiles": [InterfaceProfile.from_dict(_item) for _item in obj.get("networkInterfaceProfiles")] if obj.get("networkInterfaceProfiles") is not None else None, - "asnDetails": EndpointAsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, + "vpnProfiles": [EndpointVpnProfile.from_dict(_item) for _item in obj["vpnProfiles"]] if obj.get("vpnProfiles") is not None else None, + "networkInterfaceProfiles": [InterfaceProfile.from_dict(_item) for _item in obj["networkInterfaceProfiles"]] if obj.get("networkInterfaceProfiles") is not None else None, + "asnDetails": EndpointAsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "licenseType": obj.get("licenseType"), "tcpDriverAvailable": obj.get("tcpDriverAvailable"), "npcapVersion": obj.get("npcapVersion") diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response.py b/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response.py new file mode 100644 index 00000000..171823b0 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentBulkTransfer207Response(BaseModel): + """ + EndpointAgentBulkTransfer207Response + """ # noqa: E501 + items: Optional[List[EndpointAgentBulkTransfer207ResponseItemsInner]] = None + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentBulkTransfer207Response 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 items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentBulkTransfer207Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [EndpointAgentBulkTransfer207ResponseItemsInner.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response_items_inner.py b/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response_items_inner.py similarity index 77% rename from endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response_items_inner.py rename to endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response_items_inner.py index 63824f5e..46ddbc54 100644 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_bulk_transfer207_response_items_inner.py +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer207_response_items_inner.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.agent_transfer import AgentTransfer -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.agent_transfer import AgentTransfer +from typing import Optional, Set +from typing_extensions import Self class EndpointAgentBulkTransfer207ResponseItemsInner(BaseModel): """ @@ -39,10 +35,11 @@ class EndpointAgentBulkTransfer207ResponseItemsInner(BaseModel): request: Optional[AgentTransfer] = None __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "request"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class EndpointAgentBulkTransfer207ResponseItemsInner(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointAgentBulkTransfer207ResponseItemsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ class EndpointAgentBulkTransfer207ResponseItemsInner(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of request @@ -81,7 +80,7 @@ class EndpointAgentBulkTransfer207ResponseItemsInner(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointAgentBulkTransfer207ResponseItemsInner from a dict""" if obj is None: return None @@ -95,7 +94,7 @@ class EndpointAgentBulkTransfer207ResponseItemsInner(BaseModel): "status": obj.get("status"), "detail": obj.get("detail"), "instance": obj.get("instance"), - "request": AgentTransfer.from_dict(obj.get("request")) if obj.get("request") is not None else None + "request": AgentTransfer.from_dict(obj["request"]) if obj.get("request") is not None else None }) return _obj diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer_request.py b/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer_request.py new file mode 100644 index 00000000..0330638f --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent_bulk_transfer_request.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.agent_transfer import AgentTransfer +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentBulkTransferRequest(BaseModel): + """ + EndpointAgentBulkTransferRequest + """ # noqa: E501 + transfers: Optional[List[AgentTransfer]] = None + __properties: ClassVar[List[str]] = ["transfers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentBulkTransferRequest 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 transfers (list) + _items = [] + if self.transfers: + for _item in self.transfers: + if _item: + _items.append(_item.to_dict()) + _dict['transfers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentBulkTransferRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transfers": [AgentTransfer.from_dict(_item) for _item in obj["transfers"]] if obj.get("transfers") is not None else None + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/endpoint_agent_get200_response.py b/endpoint_agents/endpoint_agents/models/endpoint_agent_get200_response.py similarity index 75% rename from endpoint/agents_api/agents_api/models/endpoint_agent_get200_response.py rename to endpoint_agents/endpoint_agents/models/endpoint_agent_get200_response.py index f62ddd37..649e8757 100644 --- a/endpoint/agents_api/agents_api/models/endpoint_agent_get200_response.py +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent_get200_response.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,30 +18,27 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.agent_license_type import AgentLicenseType -from agents_api.models.endpoint_agent_aid import EndpointAgentAid -from agents_api.models.endpoint_agent_location import EndpointAgentLocation -from agents_api.models.endpoint_asn_details import EndpointAsnDetails -from agents_api.models.endpoint_client import EndpointClient -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile -from agents_api.models.interface_profile import InterfaceProfile -from agents_api.models.platform import Platform -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.status import Status -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.agent_license_type import AgentLicenseType +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_client import EndpointClient +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.interface_profile import InterfaceProfile +from endpoint_agents.models.platform import Platform +from endpoint_agents.models.self_links_links import SelfLinksLinks +from endpoint_agents.models.status import Status +from endpoint_agents.models.str import str +from typing import Optional, Set +from typing_extensions import Self class EndpointAgentGet200Response(BaseModel): """ EndpointAgentGet200Response """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Identifier of the agent this applies to.") - aid: Optional[EndpointAgentAid] = None + aid: Optional[Any] = None name: Optional[StrictStr] = Field(default=None, description="The name of the agent.") computer_name: Optional[StrictStr] = Field(default=None, alias="computerName") os_version: Optional[StrictStr] = Field(default=None, alias="osVersion") @@ -69,10 +66,11 @@ class EndpointAgentGet200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "lastSeen", "status", "deleted", "version", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -85,7 +83,7 @@ class EndpointAgentGet200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointAgentGet200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -118,34 +116,33 @@ class EndpointAgentGet200Response(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "id", + "computer_name", + "os_version", + "kernel_version", + "manufacturer", + "model", + "last_seen", + "deleted", + "version", + "created_at", + "number_of_clients", + "public_ip", + "clients", + "total_memory", + "agent_type", + "vpn_profiles", + "network_interface_profiles", + "tcp_driver_available", + "npcap_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "id", - "computer_name", - "os_version", - "kernel_version", - "manufacturer", - "model", - "last_seen", - "deleted", - "version", - "created_at", - "number_of_clients", - "public_ip", - "clients", - "total_memory", - "agent_type", - "vpn_profiles", - "network_interface_profiles", - "tcp_driver_available", - "npcap_version", - }, + exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of aid - if self.aid: - _dict['aid'] = self.aid.to_dict() # override the default output from pydantic by calling `to_dict()` of location if self.location: _dict['location'] = self.location.to_dict() @@ -179,7 +176,7 @@ class EndpointAgentGet200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointAgentGet200Response from a dict""" if obj is None: return None @@ -189,7 +186,7 @@ class EndpointAgentGet200Response(BaseModel): _obj = cls.model_validate({ "id": obj.get("id"), - "aid": EndpointAgentAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, + "aid": obj.get("aid"), "name": obj.get("name"), "computerName": obj.get("computerName"), "osVersion": obj.get("osVersion"), @@ -204,17 +201,17 @@ class EndpointAgentGet200Response(BaseModel): "createdAt": obj.get("createdAt"), "numberOfClients": obj.get("numberOfClients"), "publicIP": obj.get("publicIP"), - "location": EndpointAgentLocation.from_dict(obj.get("location")) if obj.get("location") is not None else None, - "clients": [EndpointClient.from_dict(_item) for _item in obj.get("clients")] if obj.get("clients") is not None else None, + "location": EndpointAgentLocation.from_dict(obj["location"]) if obj.get("location") is not None else None, + "clients": [EndpointClient.from_dict(_item) for _item in obj["clients"]] if obj.get("clients") is not None else None, "totalMemory": obj.get("totalMemory"), "agentType": obj.get("agentType"), - "vpnProfiles": [EndpointVpnProfile.from_dict(_item) for _item in obj.get("vpnProfiles")] if obj.get("vpnProfiles") is not None else None, - "networkInterfaceProfiles": [InterfaceProfile.from_dict(_item) for _item in obj.get("networkInterfaceProfiles")] if obj.get("networkInterfaceProfiles") is not None else None, - "asnDetails": EndpointAsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, + "vpnProfiles": [EndpointVpnProfile.from_dict(_item) for _item in obj["vpnProfiles"]] if obj.get("vpnProfiles") is not None else None, + "networkInterfaceProfiles": [InterfaceProfile.from_dict(_item) for _item in obj["networkInterfaceProfiles"]] if obj.get("networkInterfaceProfiles") is not None else None, + "asnDetails": EndpointAsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "licenseType": obj.get("licenseType"), "tcpDriverAvailable": obj.get("tcpDriverAvailable"), "npcapVersion": obj.get("npcapVersion"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agent_location.py b/endpoint_agents/endpoint_agents/models/endpoint_agent_location.py new file mode 100644 index 00000000..2c314ebf --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent_location.py @@ -0,0 +1,97 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentLocation(BaseModel): + """ + Approximate location of the agent. + """ # noqa: E501 + latitude: Optional[Union[StrictFloat, StrictInt]] = None + longitude: Optional[Union[StrictFloat, StrictInt]] = None + location_name: Optional[StrictStr] = Field(default=None, alias="locationName") + __properties: ClassVar[List[str]] = ["latitude", "longitude", "locationName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentLocation 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([ + "latitude", + "longitude", + "location_name", + ]) + + _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 EndpointAgentLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "latitude": obj.get("latitude"), + "longitude": obj.get("longitude"), + "locationName": obj.get("locationName") + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agent_update.py b/endpoint_agents/endpoint_agents/models/endpoint_agent_update.py new file mode 100644 index 00000000..243dfbab --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agent_update.py @@ -0,0 +1,92 @@ +# 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.2 + 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 EndpointAgentUpdate(BaseModel): + """ + The `EndpointAgentUpdate` object contains supported fields for updates. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="New agent name.") + license_type: Optional[Any] = Field(default=None, alias="licenseType") + __properties: ClassVar[List[str]] = ["name", "licenseType"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentUpdate 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 license_type + if self.license_type: + _dict['licenseType'] = self.license_type.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentUpdate 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"), + "licenseType": AgentLicenseType.from_dict(obj["licenseType"]) if obj.get("licenseType") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agents.py b/endpoint_agents/endpoint_agents/models/endpoint_agents.py new file mode 100644 index 00000000..32ec7d7c --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agents.py @@ -0,0 +1,97 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgents(BaseModel): + """ + A list of `EndpointAgents`. + """ # noqa: E501 + total_agents: Optional[StrictInt] = Field(default=None, description="The total number of agents.", alias="totalAgents") + agents: Optional[List[EndpointAgentsAgentsInner]] = None + __properties: ClassVar[List[str]] = ["totalAgents", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgents 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 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 EndpointAgents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAgents": obj.get("totalAgents"), + "agents": [EndpointAgentsAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/endpoint_agents_agents_inner.py b/endpoint_agents/endpoint_agents/models/endpoint_agents_agents_inner.py similarity index 75% rename from endpoint/agents_api/agents_api/models/endpoint_agents_agents_inner.py rename to endpoint_agents/endpoint_agents/models/endpoint_agents_agents_inner.py index dcd4438d..0ba32768 100644 --- a/endpoint/agents_api/agents_api/models/endpoint_agents_agents_inner.py +++ b/endpoint_agents/endpoint_agents/models/endpoint_agents_agents_inner.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,23 +18,20 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from agents_api.models.agent_license_type import AgentLicenseType -from agents_api.models.endpoint_agent_aid import EndpointAgentAid -from agents_api.models.endpoint_agent_location import EndpointAgentLocation -from agents_api.models.endpoint_asn_details import EndpointAsnDetails -from agents_api.models.endpoint_client import EndpointClient -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile -from agents_api.models.interface_profile import InterfaceProfile -from agents_api.models.platform import Platform -from agents_api.models.self_links_links import SelfLinksLinks -from agents_api.models.status import Status -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.agent_license_type import AgentLicenseType +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_client import EndpointClient +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.interface_profile import InterfaceProfile +from endpoint_agents.models.platform import Platform +from endpoint_agents.models.self_links_links import SelfLinksLinks +from endpoint_agents.models.status import Status +from endpoint_agents.models.str import str +from typing import Optional, Set +from typing_extensions import Self class EndpointAgentsAgentsInner(BaseModel): """ @@ -42,7 +39,7 @@ class EndpointAgentsAgentsInner(BaseModel): """ # noqa: E501 links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") id: Optional[StrictStr] = Field(default=None, description="Identifier of the agent this applies to.") - aid: Optional[EndpointAgentAid] = None + aid: Optional[Any] = None name: Optional[StrictStr] = Field(default=None, description="The name of the agent.") computer_name: Optional[StrictStr] = Field(default=None, alias="computerName") os_version: Optional[StrictStr] = Field(default=None, alias="osVersion") @@ -69,10 +66,11 @@ class EndpointAgentsAgentsInner(BaseModel): npcap_version: Optional[StrictStr] = Field(default=None, description="For Windows agents, the version of the NPCAP driver that the agent has loaded.", alias="npcapVersion") __properties: ClassVar[List[str]] = ["_links", "id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "lastSeen", "status", "deleted", "version", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -85,7 +83,7 @@ class EndpointAgentsAgentsInner(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointAgentsAgentsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -118,37 +116,36 @@ class EndpointAgentsAgentsInner(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "id", + "computer_name", + "os_version", + "kernel_version", + "manufacturer", + "model", + "last_seen", + "deleted", + "version", + "created_at", + "number_of_clients", + "public_ip", + "clients", + "total_memory", + "agent_type", + "vpn_profiles", + "network_interface_profiles", + "tcp_driver_available", + "npcap_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "id", - "computer_name", - "os_version", - "kernel_version", - "manufacturer", - "model", - "last_seen", - "deleted", - "version", - "created_at", - "number_of_clients", - "public_ip", - "clients", - "total_memory", - "agent_type", - "vpn_profiles", - "network_interface_profiles", - "tcp_driver_available", - "npcap_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 aid - if self.aid: - _dict['aid'] = self.aid.to_dict() # override the default output from pydantic by calling `to_dict()` of location if self.location: _dict['location'] = self.location.to_dict() @@ -179,7 +176,7 @@ class EndpointAgentsAgentsInner(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointAgentsAgentsInner from a dict""" if obj is None: return None @@ -188,9 +185,9 @@ class EndpointAgentsAgentsInner(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "id": obj.get("id"), - "aid": EndpointAgentAid.from_dict(obj.get("aid")) if obj.get("aid") is not None else None, + "aid": obj.get("aid"), "name": obj.get("name"), "computerName": obj.get("computerName"), "osVersion": obj.get("osVersion"), @@ -205,13 +202,13 @@ class EndpointAgentsAgentsInner(BaseModel): "createdAt": obj.get("createdAt"), "numberOfClients": obj.get("numberOfClients"), "publicIP": obj.get("publicIP"), - "location": EndpointAgentLocation.from_dict(obj.get("location")) if obj.get("location") is not None else None, - "clients": [EndpointClient.from_dict(_item) for _item in obj.get("clients")] if obj.get("clients") is not None else None, + "location": EndpointAgentLocation.from_dict(obj["location"]) if obj.get("location") is not None else None, + "clients": [EndpointClient.from_dict(_item) for _item in obj["clients"]] if obj.get("clients") is not None else None, "totalMemory": obj.get("totalMemory"), "agentType": obj.get("agentType"), - "vpnProfiles": [EndpointVpnProfile.from_dict(_item) for _item in obj.get("vpnProfiles")] if obj.get("vpnProfiles") is not None else None, - "networkInterfaceProfiles": [InterfaceProfile.from_dict(_item) for _item in obj.get("networkInterfaceProfiles")] if obj.get("networkInterfaceProfiles") is not None else None, - "asnDetails": EndpointAsnDetails.from_dict(obj.get("asnDetails")) if obj.get("asnDetails") is not None else None, + "vpnProfiles": [EndpointVpnProfile.from_dict(_item) for _item in obj["vpnProfiles"]] if obj.get("vpnProfiles") is not None else None, + "networkInterfaceProfiles": [InterfaceProfile.from_dict(_item) for _item in obj["networkInterfaceProfiles"]] if obj.get("networkInterfaceProfiles") is not None else None, + "asnDetails": EndpointAsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, "licenseType": obj.get("licenseType"), "tcpDriverAvailable": obj.get("tcpDriverAvailable"), "npcapVersion": obj.get("npcapVersion") diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agents_connection_string200_response.py b/endpoint_agents/endpoint_agents/models/endpoint_agents_connection_string200_response.py new file mode 100644 index 00000000..9e3528e7 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agents_connection_string200_response.py @@ -0,0 +1,93 @@ +# 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.2 + 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 endpoint_agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentsConnectionString200Response(BaseModel): + """ + EndpointAgentsConnectionString200Response + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + connection_string: Optional[StrictStr] = Field(default=None, description="The connection string is used for some integrations and other client types. ", alias="connectionString") + __properties: ClassVar[List[str]] = ["_links", "connectionString"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentsConnectionString200Response 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 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 EndpointAgentsConnectionString200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "connectionString": obj.get("connectionString") + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agents_list200_response.py b/endpoint_agents/endpoint_agents/models/endpoint_agents_list200_response.py new file mode 100644 index 00000000..3999757d --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agents_list200_response.py @@ -0,0 +1,103 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from endpoint_agents.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentsList200Response(BaseModel): + """ + EndpointAgentsList200Response + """ # noqa: E501 + total_agents: Optional[StrictInt] = Field(default=None, description="The total number of agents.", alias="totalAgents") + agents: Optional[List[EndpointAgentsAgentsInner]] = None + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["totalAgents", "agents", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentsList200Response 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 agents (list) + _items = [] + if self.agents: + for _item in self.agents: + if _item: + _items.append(_item.to_dict()) + _dict['agents'] = _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 EndpointAgentsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAgents": obj.get("totalAgents"), + "agents": [EndpointAgentsAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/endpoint_agents_search200_response.py b/endpoint_agents/endpoint_agents/models/endpoint_agents_search200_response.py new file mode 100644 index 00000000..46aa2ef9 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_agents_search200_response.py @@ -0,0 +1,103 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from endpoint_agents.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentsSearch200Response(BaseModel): + """ + EndpointAgentsSearch200Response + """ # noqa: E501 + total_agents: Optional[StrictInt] = Field(default=None, description="The total number of agents.", alias="totalAgents") + agents: Optional[List[EndpointAgentsAgentsInner]] = None + links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["totalAgents", "agents", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentsSearch200Response 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 agents (list) + _items = [] + if self.agents: + for _item in self.agents: + if _item: + _items.append(_item.to_dict()) + _dict['agents'] = _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 EndpointAgentsSearch200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalAgents": obj.get("totalAgents"), + "agents": [EndpointAgentsAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/endpoint_asn_details.py b/endpoint_agents/endpoint_agents/models/endpoint_asn_details.py new file mode 100644 index 00000000..3100f428 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_asn_details.py @@ -0,0 +1,89 @@ +# 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.2 + 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 EndpointAsnDetails(BaseModel): + """ + EndpointAsnDetails + """ # noqa: E501 + as_number: StrictInt = Field(description="Autonomous system number.", alias="asNumber") + as_name: Optional[StrictStr] = Field(default=None, description="Name of autonomous system.", alias="asName") + __properties: ClassVar[List[str]] = ["asNumber", "asName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAsnDetails 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 EndpointAsnDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "asNumber": obj.get("asNumber"), + "asName": obj.get("asName") + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/endpoint_browser_extension.py b/endpoint_agents/endpoint_agents/models/endpoint_browser_extension.py similarity index 77% rename from endpoint/agents_api/agents_api/models/endpoint_browser_extension.py rename to endpoint_agents/endpoint_agents/models/endpoint_browser_extension.py index 8f3b34cd..6d974fce 100644 --- a/endpoint/agents_api/agents_api/models/endpoint_browser_extension.py +++ b/endpoint_agents/endpoint_agents/models/endpoint_browser_extension.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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 pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from agents_api.models.browser_type import BrowserType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.browser_type import BrowserType +from typing import Optional, Set +from typing_extensions import Self class EndpointBrowserExtension(BaseModel): """ @@ -39,10 +35,11 @@ class EndpointBrowserExtension(BaseModel): error: Optional[StrictStr] = Field(default=None, description="Contains any errors encountered while getting extension status.") __properties: ClassVar[List[str]] = ["browser", "profile", "version", "enabled", "active", "error"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class EndpointBrowserExtension(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointBrowserExtension from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +66,18 @@ class EndpointBrowserExtension(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointBrowserExtension from a dict""" if obj is None: return None diff --git a/endpoint_agents/endpoint_agents/models/endpoint_client.py b/endpoint_agents/endpoint_agents/models/endpoint_client.py new file mode 100644 index 00000000..eba9215d --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_client.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension +from endpoint_agents.models.endpoint_user_profile import EndpointUserProfile +from typing import Optional, Set +from typing_extensions import Self + +class EndpointClient(BaseModel): + """ + Information about the user who has the agent installed. + """ # noqa: E501 + user_profile: Optional[EndpointUserProfile] = Field(default=None, alias="userProfile") + browser_extensions: Optional[List[EndpointBrowserExtension]] = Field(default=None, alias="browserExtensions") + __properties: ClassVar[List[str]] = ["userProfile", "browserExtensions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointClient 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 user_profile + if self.user_profile: + _dict['userProfile'] = self.user_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in browser_extensions (list) + _items = [] + if self.browser_extensions: + for _item in self.browser_extensions: + if _item: + _items.append(_item.to_dict()) + _dict['browserExtensions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointClient from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userProfile": EndpointUserProfile.from_dict(obj["userProfile"]) if obj.get("userProfile") is not None else None, + "browserExtensions": [EndpointBrowserExtension.from_dict(_item) for _item in obj["browserExtensions"]] if obj.get("browserExtensions") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/endpoint_user_profile.py b/endpoint_agents/endpoint_agents/models/endpoint_user_profile.py new file mode 100644 index 00000000..360baf77 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/endpoint_user_profile.py @@ -0,0 +1,87 @@ +# 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.2 + 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 +from typing import Optional, Set +from typing_extensions import Self + +class EndpointUserProfile(BaseModel): + """ + EndpointUserProfile + """ # noqa: E501 + user_name: StrictStr = Field(alias="userName") + __properties: ClassVar[List[str]] = ["userName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointUserProfile 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 EndpointUserProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userName": obj.get("userName") + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/models/endpoint_vpn_profile.py b/endpoint_agents/endpoint_agents/models/endpoint_vpn_profile.py similarity index 78% rename from endpoint/agents_api/agents_api/models/endpoint_vpn_profile.py rename to endpoint_agents/endpoint_agents/models/endpoint_vpn_profile.py index 00bac6ce..3f3fc439 100644 --- a/endpoint/agents_api/agents_api/models/endpoint_vpn_profile.py +++ b/endpoint_agents/endpoint_agents/models/endpoint_vpn_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from agents_api.models.vpn_type import VpnType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_agents.models.vpn_type import VpnType +from typing import Optional, Set +from typing_extensions import Self class EndpointVpnProfile(BaseModel): """ @@ -38,10 +34,11 @@ class EndpointVpnProfile(BaseModel): vpn_client_network_range: List[StrictStr] = Field(description="List of private networks assigned to the device, by the VPN server.", alias="vpnClientNetworkRange") __properties: ClassVar[List[str]] = ["interfaceName", "vpnType", "vpnGatewayAddress", "vpnClientAddresses", "vpnClientNetworkRange"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class EndpointVpnProfile(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointVpnProfile from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,16 +65,18 @@ class EndpointVpnProfile(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointVpnProfile from a dict""" if obj is None: return None diff --git a/endpoint_agents/endpoint_agents/models/error.py b/endpoint_agents/endpoint_agents/models/error.py new file mode 100644 index 00000000..f3b9b432 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_agents/endpoint_agents/models/ethernet_profile.py b/endpoint_agents/endpoint_agents/models/ethernet_profile.py new file mode 100644 index 00000000..41d8734d --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/ethernet_profile.py @@ -0,0 +1,87 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EthernetProfile(BaseModel): + """ + Information about the ethernet connectivity of this device. Only present if the hardware type is `ethernet`. + """ # noqa: E501 + link_speed: Optional[StrictInt] = Field(default=None, description="Link speed in Mbps.", alias="linkSpeed") + __properties: ClassVar[List[str]] = ["linkSpeed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EthernetProfile 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 EthernetProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "linkSpeed": obj.get("linkSpeed") + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/expand.py b/endpoint_agents/endpoint_agents/models/expand.py new file mode 100644 index 00000000..8e10fc60 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/expand.py @@ -0,0 +1,38 @@ +# 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.2 + 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 + """ + CLIENTS = 'clients' + VPNPROFILES = 'vpnProfiles' + NETWORKINTERFACEPROFILES = 'networkInterfaceProfiles' + + @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/endpoint_agents/endpoint_agents/models/interface_hardware_type.py b/endpoint_agents/endpoint_agents/models/interface_hardware_type.py new file mode 100644 index 00000000..6ffa6650 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/interface_hardware_type.py @@ -0,0 +1,42 @@ +# 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.2 + 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 InterfaceHardwareType(str, Enum): + """ + InterfaceHardwareType + """ + + """ + allowed enum values + """ + UNKNOWN = 'unknown' + WIRELESS = 'wireless' + ETHERNET = 'ethernet' + MODEM = 'modem' + VIRTUAL = 'virtual' + LOOPBACK = 'loopback' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InterfaceHardwareType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/interface_profile.py b/endpoint_agents/endpoint_agents/models/interface_profile.py new file mode 100644 index 00000000..0b05b54a --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/interface_profile.py @@ -0,0 +1,112 @@ +# 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.2 + 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 endpoint_agents.models.address_profile import AddressProfile +from endpoint_agents.models.ethernet_profile import EthernetProfile +from endpoint_agents.models.interface_hardware_type import InterfaceHardwareType +from endpoint_agents.models.wireless_profile import WirelessProfile +from typing import Optional, Set +from typing_extensions import Self + +class InterfaceProfile(BaseModel): + """ + InterfaceProfile + """ # noqa: E501 + interface_name: Optional[StrictStr] = Field(default=None, alias="interfaceName") + address_profiles: Optional[List[AddressProfile]] = Field(default=None, alias="addressProfiles") + hardware_type: Optional[InterfaceHardwareType] = Field(default=None, alias="hardwareType") + ethernet_profile: Optional[EthernetProfile] = Field(default=None, alias="ethernetProfile") + wireless_profile: Optional[WirelessProfile] = Field(default=None, alias="wirelessProfile") + __properties: ClassVar[List[str]] = ["interfaceName", "addressProfiles", "hardwareType", "ethernetProfile", "wirelessProfile"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InterfaceProfile 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 address_profiles (list) + _items = [] + if self.address_profiles: + for _item in self.address_profiles: + if _item: + _items.append(_item.to_dict()) + _dict['addressProfiles'] = _items + # override the default output from pydantic by calling `to_dict()` of ethernet_profile + if self.ethernet_profile: + _dict['ethernetProfile'] = self.ethernet_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of wireless_profile + if self.wireless_profile: + _dict['wirelessProfile'] = self.wireless_profile.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InterfaceProfile 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"), + "addressProfiles": [AddressProfile.from_dict(_item) for _item in obj["addressProfiles"]] if obj.get("addressProfiles") is not None else None, + "hardwareType": obj.get("hardwareType"), + "ethernetProfile": EthernetProfile.from_dict(obj["ethernetProfile"]) if obj.get("ethernetProfile") is not None else None, + "wirelessProfile": WirelessProfile.from_dict(obj["wirelessProfile"]) if obj.get("wirelessProfile") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/link.py b/endpoint_agents/endpoint_agents/models/link.py new file mode 100644 index 00000000..3e17eede --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_agents/endpoint_agents/models/pagination_next_and_self_link.py b/endpoint_agents/endpoint_agents/models/pagination_next_and_self_link.py new file mode 100644 index 00000000..c9b60005 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/pagination_next_and_self_link.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_agents.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextAndSelfLink(BaseModel): + """ + A links object containing a related link for forward pagination. + """ # noqa: E501 + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextAndSelfLink 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 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 PaginationNextAndSelfLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/pagination_next_and_self_link_links.py b/endpoint_agents/endpoint_agents/models/pagination_next_and_self_link_links.py new file mode 100644 index 00000000..7a1da136 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/pagination_next_and_self_link_links.py @@ -0,0 +1,96 @@ +# 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.2 + 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 endpoint_agents.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextAndSelfLinkLinks(BaseModel): + """ + PaginationNextAndSelfLinkLinks + """ # noqa: E501 + next: Optional[Link] = None + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["next", "self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextAndSelfLinkLinks 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 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 PaginationNextAndSelfLinkLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "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/endpoint_agents/endpoint_agents/models/pagination_next_link.py b/endpoint_agents/endpoint_agents/models/pagination_next_link.py new file mode 100644 index 00000000..55306e2d --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/pagination_next_link.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_agents.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextLink(BaseModel): + """ + A links object containing a related link for forward pagination. + """ # noqa: E501 + links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextLink 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 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 PaginationNextLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/pagination_next_link_links.py b/endpoint_agents/endpoint_agents/models/pagination_next_link_links.py new file mode 100644 index 00000000..f55b03b5 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/pagination_next_link_links.py @@ -0,0 +1,91 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_agents.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextLinkLinks(BaseModel): + """ + PaginationNextLinkLinks + """ # noqa: E501 + next: Optional[Link] = None + __properties: ClassVar[List[str]] = ["next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextLinkLinks 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 next + if self.next: + _dict['next'] = self.next.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginationNextLinkLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": Link.from_dict(obj["next"]) if obj.get("next") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/platform.py b/endpoint_agents/endpoint_agents/models/platform.py new file mode 100644 index 00000000..f5b670bd --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/platform.py @@ -0,0 +1,38 @@ +# 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.2 + 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 Platform(str, Enum): + """ + OS platform types + """ + + """ + allowed enum values + """ + WINDOWS = 'windows' + LINUX = 'linux' + MAC = 'mac' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Platform from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/self_links.py b/endpoint_agents/endpoint_agents/models/self_links.py new file mode 100644 index 00000000..f3409fec --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_agents.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/self_links_links.py b/endpoint_agents/endpoint_agents/models/self_links_links.py new file mode 100644 index 00000000..4d96d2fd --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_agents.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/endpoint_agents/endpoint_agents/models/sort_order.py b/endpoint_agents/endpoint_agents/models/sort_order.py new file mode 100644 index 00000000..d78717a0 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/sort_order.py @@ -0,0 +1,37 @@ +# 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.2 + 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 SortOrder(str, Enum): + """ + Parameter indicates the ascending/descending order of the sorting, using either the asc or desc values. + """ + + """ + allowed enum values + """ + ASC = 'asc' + DESC = 'desc' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SortOrder from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/status.py b/endpoint_agents/endpoint_agents/models/status.py new file mode 100644 index 00000000..9a45824f --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/status.py @@ -0,0 +1,37 @@ +# 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.2 + 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 Status(str, Enum): + """ + Status of the endpoint agent in ThousandEyes. Disabled agents don't report data. + """ + + """ + allowed enum values + """ + ENABLED = 'enabled' + DISABLED = 'disabled' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Status from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/threshold_filter_operator.py b/endpoint_agents/endpoint_agents/models/threshold_filter_operator.py new file mode 100644 index 00000000..27c98846 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/threshold_filter_operator.py @@ -0,0 +1,37 @@ +# 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.2 + 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 ThresholdFilterOperator(str, Enum): + """ + ThresholdFilterOperator + """ + + """ + allowed enum values + """ + GTE = 'gte' + LTE = 'lte' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ThresholdFilterOperator from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/unauthorized_error.py b/endpoint_agents/endpoint_agents/models/unauthorized_error.py new file mode 100644 index 00000000..a6758c43 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_agents/endpoint_agents/models/validation_error.py b/endpoint_agents/endpoint_agents/models/validation_error.py new file mode 100644 index 00000000..32d3863c --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 endpoint_agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/endpoint_agents/endpoint_agents/models/validation_error_all_of_errors.py b/endpoint_agents/endpoint_agents/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..78a02d02 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/endpoint_agents/endpoint_agents/models/vpn_type.py b/endpoint_agents/endpoint_agents/models/vpn_type.py new file mode 100644 index 00000000..bf843387 --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/vpn_type.py @@ -0,0 +1,40 @@ +# 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.2 + 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 VpnType(str, Enum): + """ + Name of the VPN provider. + """ + + """ + allowed enum values + """ + CISCO_MINUS_ANYCONNECT = 'cisco-anyconnect' + PALO_MINUS_ALTO_MINUS_GLOBALPROTECT = 'palo-alto-globalprotect' + IVANTI_MINUS_CONNECT_MINUS_SECURE = 'ivanti-connect-secure' + ZSCALER_MINUS_INTERNET_MINUS_ACCESS = 'zscaler-internet-access' + F5_MINUS_BIG_MINUS_IP = 'f5-big-ip' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of VpnType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_agents/endpoint_agents/models/wireless_profile.py b/endpoint_agents/endpoint_agents/models/wireless_profile.py new file mode 100644 index 00000000..485ebaeb --- /dev/null +++ b/endpoint_agents/endpoint_agents/models/wireless_profile.py @@ -0,0 +1,95 @@ +# 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.2 + 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 WirelessProfile(BaseModel): + """ + WirelessProfile + """ # noqa: E501 + bssid: Optional[StrictStr] = None + ssid: Optional[StrictStr] = None + rssi: Optional[StrictInt] = None + channel: Optional[StrictInt] = None + phy_mode: Optional[StrictStr] = Field(default=None, alias="phyMode") + __properties: ClassVar[List[str]] = ["bssid", "ssid", "rssi", "channel", "phyMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WirelessProfile 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 WirelessProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bssid": obj.get("bssid"), + "ssid": obj.get("ssid"), + "rssi": obj.get("rssi"), + "channel": obj.get("channel"), + "phyMode": obj.get("phyMode") + }) + return _obj + + diff --git a/endpoint/agents_api/agents_api/py.typed b/endpoint_agents/endpoint_agents/py.typed similarity index 100% rename from endpoint/agents_api/agents_api/py.typed rename to endpoint_agents/endpoint_agents/py.typed diff --git a/endpoint_agents/endpoint_agents/rest.py b/endpoint_agents/endpoint_agents/rest.py new file mode 100644 index 00000000..a077a5f9 --- /dev/null +++ b/endpoint_agents/endpoint_agents/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from endpoint_agents.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/endpoint_agents/pyproject.toml b/endpoint_agents/pyproject.toml new file mode 100644 index 00000000..444a5579 --- /dev/null +++ b/endpoint_agents/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "endpoint_agents" +version = "1.0.0" +description = "Endpoint Agents API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Agents API"] +include = ["endpoint_agents/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "endpoint_agents", + #"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/endpoint/agents_api/requirements.txt b/endpoint_agents/requirements.txt similarity index 100% rename from endpoint/agents_api/requirements.txt rename to endpoint_agents/requirements.txt diff --git a/endpoint/agents_api/setup.cfg b/endpoint_agents/setup.cfg similarity index 100% rename from endpoint/agents_api/setup.cfg rename to endpoint_agents/setup.cfg diff --git a/endpoint_agents/setup.py b/endpoint_agents/setup.py new file mode 100644 index 00000000..36345cda --- /dev/null +++ b/endpoint_agents/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "endpoint-agents" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Endpoint Agents API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/endpoint_agents", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Endpoint Agents API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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). + """, # noqa: E501 + package_data={"endpoint_agents": ["py.typed"]}, +) diff --git a/endpoint_agents/test-requirements.txt b/endpoint_agents/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/endpoint_agents/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/endpoint/agents_api/test/__init__.py b/endpoint_agents/test/__init__.py similarity index 100% rename from endpoint/agents_api/test/__init__.py rename to endpoint_agents/test/__init__.py diff --git a/endpoint/agents_api/test/test_address_profile.py b/endpoint_agents/test/test_address_profile.py similarity index 80% rename from endpoint/agents_api/test/test_address_profile.py rename to endpoint_agents/test/test_address_profile.py index aca9f34f..332b270a 100644 --- a/endpoint/agents_api/test/test_address_profile.py +++ b/endpoint_agents/test/test_address_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.address_profile import AddressProfile +from endpoint_agents.models.address_profile import AddressProfile class TestAddressProfile(unittest.TestCase): """AddressProfile unit test stubs""" diff --git a/endpoint_agents/test/test_address_type.py b/endpoint_agents/test/test_address_type.py new file mode 100644 index 00000000..bd98b621 --- /dev/null +++ b/endpoint_agents/test/test_address_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.address_type import AddressType + +class TestAddressType(unittest.TestCase): + """AddressType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAddressType(self): + """Test AddressType""" + # inst = AddressType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_agent_license_type.py b/endpoint_agents/test/test_agent_license_type.py new file mode 100644 index 00000000..2752a158 --- /dev/null +++ b/endpoint_agents/test/test_agent_license_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.agent_license_type import AgentLicenseType + +class TestAgentLicenseType(unittest.TestCase): + """AgentLicenseType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAgentLicenseType(self): + """Test AgentLicenseType""" + # inst = AgentLicenseType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_agent_search_request.py b/endpoint_agents/test/test_agent_search_request.py new file mode 100644 index 00000000..82da6bff --- /dev/null +++ b/endpoint_agents/test/test_agent_search_request.py @@ -0,0 +1,89 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.agent_search_request import AgentSearchRequest + +class TestAgentSearchRequest(unittest.TestCase): + """AgentSearchRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSearchRequest: + """Test AgentSearchRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSearchRequest` + """ + model = AgentSearchRequest() + if include_optional: + return AgentSearchRequest( + search_filters = endpoint_agents.models.agent_search_request_search_filters.AgentSearchRequest_searchFilters( + id = [ + '5d0764ac-7e42-4ec8-a0d4-39fc53edccba' + ], + agent_name = [ + 'myagent-1234' + ], + computer_name = [ + 'DESKTOP-45AE8' + ], + username = ["picard"], + platform = [ + 'mac' + ], + os_version = [ + 'Version 10.15.2' + ], + location_country_iso = [ + 'FR' + ], + location_subdivision1_code = [ + 'ENG' + ], + location_city = [ + 'Paris' + ], ), + threshold_filter = endpoint_agents.models.agent_threshold_filters.AgentThresholdFilters( + filters = [ + endpoint_agents.models.agent_threshold_filter.AgentThresholdFilter( + name = 'last-seen-ms', + value = 1.337, + operator = 'gte', ) + ], + conditional_operator = 'and', ), + search_sort = [ + endpoint_agents.models.agent_search_sort.AgentSearchSort( + sort = 'platform', + order = 'desc', ) + ] + ) + else: + return AgentSearchRequest( + ) + """ + + def testAgentSearchRequest(self): + """Test AgentSearchRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_agent_search_request_search_filters.py b/endpoint_agents/test/test_agent_search_request_search_filters.py similarity index 80% rename from endpoint/agents_api/test/test_agent_search_request_search_filters.py rename to endpoint_agents/test/test_agent_search_request_search_filters.py index 619efed4..85e2fb8a 100644 --- a/endpoint/agents_api/test/test_agent_search_request_search_filters.py +++ b/endpoint_agents/test/test_agent_search_request_search_filters.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters +from endpoint_agents.models.agent_search_request_search_filters import AgentSearchRequestSearchFilters class TestAgentSearchRequestSearchFilters(unittest.TestCase): """AgentSearchRequestSearchFilters unit test stubs""" @@ -36,6 +35,9 @@ class TestAgentSearchRequestSearchFilters(unittest.TestCase): model = AgentSearchRequestSearchFilters() if include_optional: return AgentSearchRequestSearchFilters( + id = [ + '5d0764ac-7e42-4ec8-a0d4-39fc53edccba' + ], agent_name = [ 'myagent-1234' ], diff --git a/endpoint_agents/test/test_agent_search_sort.py b/endpoint_agents/test/test_agent_search_sort.py new file mode 100644 index 00000000..62c7473f --- /dev/null +++ b/endpoint_agents/test/test_agent_search_sort.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.agent_search_sort import AgentSearchSort + +class TestAgentSearchSort(unittest.TestCase): + """AgentSearchSort unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentSearchSort: + """Test AgentSearchSort + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentSearchSort` + """ + model = AgentSearchSort() + if include_optional: + return AgentSearchSort( + sort = 'platform', + order = 'desc' + ) + else: + return AgentSearchSort( + ) + """ + + def testAgentSearchSort(self): + """Test AgentSearchSort""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_agent_search_sort_key.py b/endpoint_agents/test/test_agent_search_sort_key.py new file mode 100644 index 00000000..04dd2fec --- /dev/null +++ b/endpoint_agents/test/test_agent_search_sort_key.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.agent_search_sort_key import AgentSearchSortKey + +class TestAgentSearchSortKey(unittest.TestCase): + """AgentSearchSortKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAgentSearchSortKey(self): + """Test AgentSearchSortKey""" + # inst = AgentSearchSortKey() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_agent_threshold_filter.py b/endpoint_agents/test/test_agent_threshold_filter.py new file mode 100644 index 00000000..6dc60d5c --- /dev/null +++ b/endpoint_agents/test/test_agent_threshold_filter.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.agent_threshold_filter import AgentThresholdFilter + +class TestAgentThresholdFilter(unittest.TestCase): + """AgentThresholdFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentThresholdFilter: + """Test AgentThresholdFilter + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentThresholdFilter` + """ + model = AgentThresholdFilter() + if include_optional: + return AgentThresholdFilter( + name = 'last-seen-ms', + value = 1.337, + operator = 'gte' + ) + else: + return AgentThresholdFilter( + ) + """ + + def testAgentThresholdFilter(self): + """Test AgentThresholdFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_agent_threshold_filters.py b/endpoint_agents/test/test_agent_threshold_filters.py new file mode 100644 index 00000000..9c8f0dac --- /dev/null +++ b/endpoint_agents/test/test_agent_threshold_filters.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.agent_threshold_filters import AgentThresholdFilters + +class TestAgentThresholdFilters(unittest.TestCase): + """AgentThresholdFilters unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentThresholdFilters: + """Test AgentThresholdFilters + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentThresholdFilters` + """ + model = AgentThresholdFilters() + if include_optional: + return AgentThresholdFilters( + filters = [ + endpoint_agents.models.agent_threshold_filter.AgentThresholdFilter( + name = 'last-seen-ms', + value = 1.337, + operator = 'gte', ) + ], + conditional_operator = 'and' + ) + else: + return AgentThresholdFilters( + ) + """ + + def testAgentThresholdFilters(self): + """Test AgentThresholdFilters""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_agent_transfer.py b/endpoint_agents/test/test_agent_transfer.py similarity index 75% rename from endpoint/agents_api/test/test_agent_transfer.py rename to endpoint_agents/test/test_agent_transfer.py index 89bee5d4..26cc9d4f 100644 --- a/endpoint/agents_api/test/test_agent_transfer.py +++ b/endpoint_agents/test/test_agent_transfer.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_transfer import AgentTransfer +from endpoint_agents.models.agent_transfer import AgentTransfer class TestAgentTransfer(unittest.TestCase): """AgentTransfer unit test stubs""" @@ -37,8 +36,8 @@ class TestAgentTransfer(unittest.TestCase): if include_optional: return AgentTransfer( agent_id = '5d0764ac-7e42-4ec8-a0d4-39fc53edccba', - from_aid = '111', - to_aid = '111' + from_aid = '1234', + to_aid = '1234' ) else: return AgentTransfer( diff --git a/endpoint/agents_api/test/test_agent_transfer_request.py b/endpoint_agents/test/test_agent_transfer_request.py similarity index 76% rename from endpoint/agents_api/test/test_agent_transfer_request.py rename to endpoint_agents/test/test_agent_transfer_request.py index f0ee8d33..71b82bfd 100644 --- a/endpoint/agents_api/test/test_agent_transfer_request.py +++ b/endpoint_agents/test/test_agent_transfer_request.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.agent_transfer_request import AgentTransferRequest +from endpoint_agents.models.agent_transfer_request import AgentTransferRequest class TestAgentTransferRequest(unittest.TestCase): """AgentTransferRequest unit test stubs""" @@ -36,7 +35,7 @@ class TestAgentTransferRequest(unittest.TestCase): model = AgentTransferRequest() if include_optional: return AgentTransferRequest( - to_aid = '111' + to_aid = '1234' ) else: return AgentTransferRequest( diff --git a/endpoint_agents/test/test_browser_type.py b/endpoint_agents/test/test_browser_type.py new file mode 100644 index 00000000..be3f872d --- /dev/null +++ b/endpoint_agents/test/test_browser_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.browser_type import BrowserType + +class TestBrowserType(unittest.TestCase): + """BrowserType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBrowserType(self): + """Test BrowserType""" + # inst = BrowserType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_conditional_operator.py b/endpoint_agents/test/test_conditional_operator.py new file mode 100644 index 00000000..cd3b735b --- /dev/null +++ b/endpoint_agents/test/test_conditional_operator.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.conditional_operator import ConditionalOperator + +class TestConditionalOperator(unittest.TestCase): + """ConditionalOperator unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConditionalOperator(self): + """Test ConditionalOperator""" + # inst = ConditionalOperator() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_agent.py b/endpoint_agents/test/test_endpoint_agent.py similarity index 76% rename from endpoint/agents_api/test/test_endpoint_agent.py rename to endpoint_agents/test/test_endpoint_agent.py index 3ca5ac9b..5079f241 100644 --- a/endpoint/agents_api/test/test_endpoint_agent.py +++ b/endpoint_agents/test/test_endpoint_agent.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agent import EndpointAgent +from endpoint_agents.models.endpoint_agent import EndpointAgent class TestEndpointAgent(unittest.TestCase): """EndpointAgent unit test stubs""" @@ -52,16 +51,16 @@ class TestEndpointAgent(unittest.TestCase): created_at = '2022-05-26T23:37:16Z', number_of_clients = 3, public_ip = '88.45.2.123', - location = agents_api.models.endpoint_agent_location.EndpointAgentLocation( + location = endpoint_agents.models.endpoint_agent_location.EndpointAgentLocation( latitude = 51.51279, longitude = -0.09184, location_name = 'London', ), clients = [ - agents_api.models.endpoint_client.EndpointClient( - user_profile = agents_api.models.endpoint_user_profile.EndpointUserProfile( + endpoint_agents.models.endpoint_client.EndpointClient( + user_profile = endpoint_agents.models.endpoint_user_profile.EndpointUserProfile( user_name = 'joeblogs32', ), browser_extensions = [ - agents_api.models.endpoint_browser_extension.EndpointBrowserExtension( + endpoint_agents.models.endpoint_browser_extension.EndpointBrowserExtension( browser = 'edge', profile = 'Profile 1', version = '0.123.0', @@ -73,7 +72,7 @@ class TestEndpointAgent(unittest.TestCase): total_memory = '16384 MB', agent_type = 'endpoint', vpn_profiles = [ - agents_api.models.endpoint_vpn_profile.EndpointVpnProfile( + endpoint_agents.models.endpoint_vpn_profile.EndpointVpnProfile( interface_name = '', vpn_type = 'cisco-anyconnect', vpn_gateway_address = '', @@ -81,10 +80,10 @@ class TestEndpointAgent(unittest.TestCase): vpn_client_network_range = ["10.100.0.0/22"], ) ], network_interface_profiles = [ - agents_api.models.interface_profile.InterfaceProfile( + endpoint_agents.models.interface_profile.InterfaceProfile( interface_name = 'en0', address_profiles = [ - agents_api.models.address_profile.AddressProfile( + endpoint_agents.models.address_profile.AddressProfile( address_type = 'unique-local', ip_address = '2001:db8:3333:4444:5555:6666:7777:8888', prefix_length = 24, @@ -92,16 +91,16 @@ class TestEndpointAgent(unittest.TestCase): router_hardware_address = '5c:b1:3e:46:1c:84', ) ], hardware_type = 'wireless', - ethernet_profile = agents_api.models.ethernet_profile.EthernetProfile( + ethernet_profile = endpoint_agents.models.ethernet_profile.EthernetProfile( link_speed = 56, ), - wireless_profile = agents_api.models.wireless_profile.WirelessProfile( + wireless_profile = endpoint_agents.models.wireless_profile.WirelessProfile( bssid = '00:11:22:aa:bb:cc', ssid = 'GuestWiFi', rssi = -36, channel = 48, phy_mode = '802.11ac', ), ) ], - asn_details = agents_api.models.endpoint_asn_details.EndpointAsnDetails( + asn_details = endpoint_agents.models.endpoint_asn_details.EndpointAsnDetails( as_number = 5089, as_name = 'Virgin Media Limited', ), license_type = 'essentials', diff --git a/endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response.py b/endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response.py new file mode 100644 index 00000000..e5518132 --- /dev/null +++ b/endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response import EndpointAgentBulkTransfer207Response + +class TestEndpointAgentBulkTransfer207Response(unittest.TestCase): + """EndpointAgentBulkTransfer207Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentBulkTransfer207Response: + """Test EndpointAgentBulkTransfer207Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentBulkTransfer207Response` + """ + model = EndpointAgentBulkTransfer207Response() + if include_optional: + return EndpointAgentBulkTransfer207Response( + 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"}}] + ) + else: + return EndpointAgentBulkTransfer207Response( + ) + """ + + def testEndpointAgentBulkTransfer207Response(self): + """Test EndpointAgentBulkTransfer207Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py b/endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py similarity index 78% rename from endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py rename to endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py index 2e92be55..a12ff17c 100644 --- a/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py +++ b/endpoint_agents/test/test_endpoint_agent_bulk_transfer207_response_items_inner.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner +from endpoint_agents.models.endpoint_agent_bulk_transfer207_response_items_inner import EndpointAgentBulkTransfer207ResponseItemsInner class TestEndpointAgentBulkTransfer207ResponseItemsInner(unittest.TestCase): """EndpointAgentBulkTransfer207ResponseItemsInner unit test stubs""" @@ -41,7 +40,7 @@ class TestEndpointAgentBulkTransfer207ResponseItemsInner(unittest.TestCase): status = 56, detail = '', instance = '', - request = {"agentId":"5d0764ac-7e42-4ec8-a0d4-39fc53edccba","fromAid":"234","toAid":"222"} + request = {"agentId":"5d0764ac-7e42-4ec8-a0d4-39fc53edccba","fromAid":"1234","toAid":"12345"} ) else: return EndpointAgentBulkTransfer207ResponseItemsInner( diff --git a/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer_request.py b/endpoint_agents/test/test_endpoint_agent_bulk_transfer_request.py similarity index 77% rename from endpoint/agents_api/test/test_endpoint_agent_bulk_transfer_request.py rename to endpoint_agents/test/test_endpoint_agent_bulk_transfer_request.py index fe5cd08b..660d84f0 100644 --- a/endpoint/agents_api/test/test_endpoint_agent_bulk_transfer_request.py +++ b/endpoint_agents/test/test_endpoint_agent_bulk_transfer_request.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest +from endpoint_agents.models.endpoint_agent_bulk_transfer_request import EndpointAgentBulkTransferRequest class TestEndpointAgentBulkTransferRequest(unittest.TestCase): """EndpointAgentBulkTransferRequest unit test stubs""" @@ -37,7 +36,7 @@ class TestEndpointAgentBulkTransferRequest(unittest.TestCase): if include_optional: return EndpointAgentBulkTransferRequest( transfers = [ - {"agentId":"5d0764ac-7e42-4ec8-a0d4-39fc53edccba","fromAid":"234","toAid":"222"} + {"agentId":"5d0764ac-7e42-4ec8-a0d4-39fc53edccba","fromAid":"1234","toAid":"12345"} ] ) else: diff --git a/endpoint/agents_api/test/test_endpoint_agent_get200_response.py b/endpoint_agents/test/test_endpoint_agent_get200_response.py similarity index 76% rename from endpoint/agents_api/test/test_endpoint_agent_get200_response.py rename to endpoint_agents/test/test_endpoint_agent_get200_response.py index 7e8b5488..eabcbb38 100644 --- a/endpoint/agents_api/test/test_endpoint_agent_get200_response.py +++ b/endpoint_agents/test/test_endpoint_agent_get200_response.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agent_get200_response import EndpointAgentGet200Response +from endpoint_agents.models.endpoint_agent_get200_response import EndpointAgentGet200Response class TestEndpointAgentGet200Response(unittest.TestCase): """EndpointAgentGet200Response unit test stubs""" @@ -52,16 +51,16 @@ class TestEndpointAgentGet200Response(unittest.TestCase): created_at = '2022-05-26T23:37:16Z', number_of_clients = 3, public_ip = '88.45.2.123', - location = agents_api.models.endpoint_agent_location.EndpointAgentLocation( + location = endpoint_agents.models.endpoint_agent_location.EndpointAgentLocation( latitude = 51.51279, longitude = -0.09184, location_name = 'London', ), clients = [ - agents_api.models.endpoint_client.EndpointClient( - user_profile = agents_api.models.endpoint_user_profile.EndpointUserProfile( + endpoint_agents.models.endpoint_client.EndpointClient( + user_profile = endpoint_agents.models.endpoint_user_profile.EndpointUserProfile( user_name = 'joeblogs32', ), browser_extensions = [ - agents_api.models.endpoint_browser_extension.EndpointBrowserExtension( + endpoint_agents.models.endpoint_browser_extension.EndpointBrowserExtension( browser = 'edge', profile = 'Profile 1', version = '0.123.0', @@ -73,7 +72,7 @@ class TestEndpointAgentGet200Response(unittest.TestCase): total_memory = '16384 MB', agent_type = 'endpoint', vpn_profiles = [ - agents_api.models.endpoint_vpn_profile.EndpointVpnProfile( + endpoint_agents.models.endpoint_vpn_profile.EndpointVpnProfile( interface_name = '', vpn_type = 'cisco-anyconnect', vpn_gateway_address = '', @@ -81,10 +80,10 @@ class TestEndpointAgentGet200Response(unittest.TestCase): vpn_client_network_range = ["10.100.0.0/22"], ) ], network_interface_profiles = [ - agents_api.models.interface_profile.InterfaceProfile( + endpoint_agents.models.interface_profile.InterfaceProfile( interface_name = 'en0', address_profiles = [ - agents_api.models.address_profile.AddressProfile( + endpoint_agents.models.address_profile.AddressProfile( address_type = 'unique-local', ip_address = '2001:db8:3333:4444:5555:6666:7777:8888', prefix_length = 24, @@ -92,23 +91,23 @@ class TestEndpointAgentGet200Response(unittest.TestCase): router_hardware_address = '5c:b1:3e:46:1c:84', ) ], hardware_type = 'wireless', - ethernet_profile = agents_api.models.ethernet_profile.EthernetProfile( + ethernet_profile = endpoint_agents.models.ethernet_profile.EthernetProfile( link_speed = 56, ), - wireless_profile = agents_api.models.wireless_profile.WirelessProfile( + wireless_profile = endpoint_agents.models.wireless_profile.WirelessProfile( bssid = '00:11:22:aa:bb:cc', ssid = 'GuestWiFi', rssi = -36, channel = 48, phy_mode = '802.11ac', ), ) ], - asn_details = agents_api.models.endpoint_asn_details.EndpointAsnDetails( + asn_details = endpoint_agents.models.endpoint_asn_details.EndpointAsnDetails( as_number = 5089, as_name = 'Virgin Media Limited', ), license_type = 'essentials', tcp_driver_available = True, npcap_version = '', - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = endpoint_agents.models.self_links__links.SelfLinks__links( + self = endpoint_agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/agents_api/test/test_endpoint_agent_location.py b/endpoint_agents/test/test_endpoint_agent_location.py similarity index 79% rename from endpoint/agents_api/test/test_endpoint_agent_location.py rename to endpoint_agents/test/test_endpoint_agent_location.py index ca787ec1..651b4aef 100644 --- a/endpoint/agents_api/test/test_endpoint_agent_location.py +++ b/endpoint_agents/test/test_endpoint_agent_location.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agent_location import EndpointAgentLocation +from endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation class TestEndpointAgentLocation(unittest.TestCase): """EndpointAgentLocation unit test stubs""" diff --git a/endpoint/agents_api/test/test_endpoint_agent_update.py b/endpoint_agents/test/test_endpoint_agent_update.py similarity index 76% rename from endpoint/agents_api/test/test_endpoint_agent_update.py rename to endpoint_agents/test/test_endpoint_agent_update.py index 2bd69eaa..77c068c8 100644 --- a/endpoint/agents_api/test/test_endpoint_agent_update.py +++ b/endpoint_agents/test/test_endpoint_agent_update.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agent_update import EndpointAgentUpdate +from endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate class TestEndpointAgentUpdate(unittest.TestCase): """EndpointAgentUpdate unit test stubs""" @@ -37,7 +36,7 @@ class TestEndpointAgentUpdate(unittest.TestCase): if include_optional: return EndpointAgentUpdate( name = 'Office Printer', - license_type = advantage + license_type = None ) else: return EndpointAgentUpdate( diff --git a/endpoint/agents_api/test/test_endpoint_agents.py b/endpoint_agents/test/test_endpoint_agents.py similarity index 79% rename from endpoint/agents_api/test/test_endpoint_agents.py rename to endpoint_agents/test/test_endpoint_agents.py index 75d5fed5..7e82ce20 100644 --- a/endpoint/agents_api/test/test_endpoint_agents.py +++ b/endpoint_agents/test/test_endpoint_agents.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agents import EndpointAgents +from endpoint_agents.models.endpoint_agents import EndpointAgents class TestEndpointAgents(unittest.TestCase): """EndpointAgents unit test stubs""" diff --git a/endpoint/agents_api/test/test_endpoint_agents_agents_inner.py b/endpoint_agents/test/test_endpoint_agents_agents_inner.py similarity index 75% rename from endpoint/agents_api/test/test_endpoint_agents_agents_inner.py rename to endpoint_agents/test/test_endpoint_agents_agents_inner.py index b1a414cd..44b0b442 100644 --- a/endpoint/agents_api/test/test_endpoint_agents_agents_inner.py +++ b/endpoint_agents/test/test_endpoint_agents_agents_inner.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner +from endpoint_agents.models.endpoint_agents_agents_inner import EndpointAgentsAgentsInner class TestEndpointAgentsAgentsInner(unittest.TestCase): """EndpointAgentsAgentsInner unit test stubs""" @@ -36,8 +35,8 @@ class TestEndpointAgentsAgentsInner(unittest.TestCase): model = EndpointAgentsAgentsInner() if include_optional: return EndpointAgentsAgentsInner( - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = endpoint_agents.models.self_links__links.SelfLinks__links( + self = endpoint_agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -62,16 +61,16 @@ class TestEndpointAgentsAgentsInner(unittest.TestCase): created_at = '2022-05-26T23:37:16Z', number_of_clients = 3, public_ip = '88.45.2.123', - location = agents_api.models.endpoint_agent_location.EndpointAgentLocation( + location = endpoint_agents.models.endpoint_agent_location.EndpointAgentLocation( latitude = 51.51279, longitude = -0.09184, location_name = 'London', ), clients = [ - agents_api.models.endpoint_client.EndpointClient( - user_profile = agents_api.models.endpoint_user_profile.EndpointUserProfile( + endpoint_agents.models.endpoint_client.EndpointClient( + user_profile = endpoint_agents.models.endpoint_user_profile.EndpointUserProfile( user_name = 'joeblogs32', ), browser_extensions = [ - agents_api.models.endpoint_browser_extension.EndpointBrowserExtension( + endpoint_agents.models.endpoint_browser_extension.EndpointBrowserExtension( browser = 'edge', profile = 'Profile 1', version = '0.123.0', @@ -83,7 +82,7 @@ class TestEndpointAgentsAgentsInner(unittest.TestCase): total_memory = '16384 MB', agent_type = 'endpoint', vpn_profiles = [ - agents_api.models.endpoint_vpn_profile.EndpointVpnProfile( + endpoint_agents.models.endpoint_vpn_profile.EndpointVpnProfile( interface_name = '', vpn_type = 'cisco-anyconnect', vpn_gateway_address = '', @@ -91,10 +90,10 @@ class TestEndpointAgentsAgentsInner(unittest.TestCase): vpn_client_network_range = ["10.100.0.0/22"], ) ], network_interface_profiles = [ - agents_api.models.interface_profile.InterfaceProfile( + endpoint_agents.models.interface_profile.InterfaceProfile( interface_name = 'en0', address_profiles = [ - agents_api.models.address_profile.AddressProfile( + endpoint_agents.models.address_profile.AddressProfile( address_type = 'unique-local', ip_address = '2001:db8:3333:4444:5555:6666:7777:8888', prefix_length = 24, @@ -102,16 +101,16 @@ class TestEndpointAgentsAgentsInner(unittest.TestCase): router_hardware_address = '5c:b1:3e:46:1c:84', ) ], hardware_type = 'wireless', - ethernet_profile = agents_api.models.ethernet_profile.EthernetProfile( + ethernet_profile = endpoint_agents.models.ethernet_profile.EthernetProfile( link_speed = 56, ), - wireless_profile = agents_api.models.wireless_profile.WirelessProfile( + wireless_profile = endpoint_agents.models.wireless_profile.WirelessProfile( bssid = '00:11:22:aa:bb:cc', ssid = 'GuestWiFi', rssi = -36, channel = 48, phy_mode = '802.11ac', ), ) ], - asn_details = agents_api.models.endpoint_asn_details.EndpointAsnDetails( + asn_details = endpoint_agents.models.endpoint_asn_details.EndpointAsnDetails( as_number = 5089, as_name = 'Virgin Media Limited', ), license_type = 'essentials', diff --git a/endpoint/agents_api/test/test_endpoint_agents_connection_string200_response.py b/endpoint_agents/test/test_endpoint_agents_connection_string200_response.py similarity index 77% rename from endpoint/agents_api/test/test_endpoint_agents_connection_string200_response.py rename to endpoint_agents/test/test_endpoint_agents_connection_string200_response.py index fe164209..71889e35 100644 --- a/endpoint/agents_api/test/test_endpoint_agents_connection_string200_response.py +++ b/endpoint_agents/test/test_endpoint_agents_connection_string200_response.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response +from endpoint_agents.models.endpoint_agents_connection_string200_response import EndpointAgentsConnectionString200Response class TestEndpointAgentsConnectionString200Response(unittest.TestCase): """EndpointAgentsConnectionString200Response unit test stubs""" @@ -36,8 +35,8 @@ class TestEndpointAgentsConnectionString200Response(unittest.TestCase): model = EndpointAgentsConnectionString200Response() if include_optional: return EndpointAgentsConnectionString200Response( - links = agents_api.models.self_links__links.SelfLinks__links( - self = agents_api.models.link.Link( + links = endpoint_agents.models.self_links__links.SelfLinks__links( + self = endpoint_agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint_agents/test/test_endpoint_agents_list200_response.py b/endpoint_agents/test/test_endpoint_agents_list200_response.py new file mode 100644 index 00000000..dfb82375 --- /dev/null +++ b/endpoint_agents/test/test_endpoint_agents_list200_response.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.endpoint_agents_list200_response import EndpointAgentsList200Response + +class TestEndpointAgentsList200Response(unittest.TestCase): + """EndpointAgentsList200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentsList200Response: + """Test EndpointAgentsList200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentsList200Response` + """ + model = EndpointAgentsList200Response() + if include_optional: + return EndpointAgentsList200Response( + total_agents = 1, + agents = [ + null + ], + links = endpoint_agents.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return EndpointAgentsList200Response( + ) + """ + + def testEndpointAgentsList200Response(self): + """Test EndpointAgentsList200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_agents_search200_response.py b/endpoint_agents/test/test_endpoint_agents_search200_response.py similarity index 77% rename from endpoint/agents_api/test/test_endpoint_agents_search200_response.py rename to endpoint_agents/test/test_endpoint_agents_search200_response.py index 74528116..b9891e38 100644 --- a/endpoint/agents_api/test/test_endpoint_agents_search200_response.py +++ b/endpoint_agents/test/test_endpoint_agents_search200_response.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response +from endpoint_agents.models.endpoint_agents_search200_response import EndpointAgentsSearch200Response class TestEndpointAgentsSearch200Response(unittest.TestCase): """EndpointAgentsSearch200Response unit test stubs""" @@ -40,8 +39,8 @@ class TestEndpointAgentsSearch200Response(unittest.TestCase): agents = [ null ], - links = agents_api.models.pagination_next_link__links.PaginationNextLink__links( - next = agents_api.models.link.Link( + links = endpoint_agents.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_agents.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/agents_api/test/test_endpoint_asn_details.py b/endpoint_agents/test/test_endpoint_asn_details.py similarity index 79% rename from endpoint/agents_api/test/test_endpoint_asn_details.py rename to endpoint_agents/test/test_endpoint_asn_details.py index 9e52e89c..e35d4e1b 100644 --- a/endpoint/agents_api/test/test_endpoint_asn_details.py +++ b/endpoint_agents/test/test_endpoint_asn_details.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_asn_details import EndpointAsnDetails +from endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails class TestEndpointAsnDetails(unittest.TestCase): """EndpointAsnDetails unit test stubs""" diff --git a/endpoint/agents_api/test/test_endpoint_browser_extension.py b/endpoint_agents/test/test_endpoint_browser_extension.py similarity index 80% rename from endpoint/agents_api/test/test_endpoint_browser_extension.py rename to endpoint_agents/test/test_endpoint_browser_extension.py index a0d466e3..effc600e 100644 --- a/endpoint/agents_api/test/test_endpoint_browser_extension.py +++ b/endpoint_agents/test/test_endpoint_browser_extension.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_browser_extension import EndpointBrowserExtension +from endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension class TestEndpointBrowserExtension(unittest.TestCase): """EndpointBrowserExtension unit test stubs""" diff --git a/endpoint_agents/test/test_endpoint_client.py b/endpoint_agents/test/test_endpoint_client.py new file mode 100644 index 00000000..fd3f8e31 --- /dev/null +++ b/endpoint_agents/test/test_endpoint_client.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.endpoint_client import EndpointClient + +class TestEndpointClient(unittest.TestCase): + """EndpointClient unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointClient: + """Test EndpointClient + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointClient` + """ + model = EndpointClient() + if include_optional: + return EndpointClient( + user_profile = endpoint_agents.models.endpoint_user_profile.EndpointUserProfile( + user_name = 'joeblogs32', ), + browser_extensions = [ + endpoint_agents.models.endpoint_browser_extension.EndpointBrowserExtension( + browser = 'edge', + profile = 'Profile 1', + version = '0.123.0', + enabled = True, + active = True, + error = '', ) + ] + ) + else: + return EndpointClient( + ) + """ + + def testEndpointClient(self): + """Test EndpointClient""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_endpoint_user_profile.py b/endpoint_agents/test/test_endpoint_user_profile.py similarity index 78% rename from endpoint/agents_api/test/test_endpoint_user_profile.py rename to endpoint_agents/test/test_endpoint_user_profile.py index 81caa44e..b82a6e24 100644 --- a/endpoint/agents_api/test/test_endpoint_user_profile.py +++ b/endpoint_agents/test/test_endpoint_user_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_user_profile import EndpointUserProfile +from endpoint_agents.models.endpoint_user_profile import EndpointUserProfile class TestEndpointUserProfile(unittest.TestCase): """EndpointUserProfile unit test stubs""" diff --git a/endpoint/agents_api/test/test_endpoint_vpn_profile.py b/endpoint_agents/test/test_endpoint_vpn_profile.py similarity index 82% rename from endpoint/agents_api/test/test_endpoint_vpn_profile.py rename to endpoint_agents/test/test_endpoint_vpn_profile.py index 2aa2716a..ad7887c4 100644 --- a/endpoint/agents_api/test/test_endpoint_vpn_profile.py +++ b/endpoint_agents/test/test_endpoint_vpn_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.endpoint_vpn_profile import EndpointVpnProfile +from endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile class TestEndpointVpnProfile(unittest.TestCase): """EndpointVpnProfile unit test stubs""" diff --git a/endpoint_agents/test/test_error.py b/endpoint_agents/test/test_error.py new file mode 100644 index 00000000..5baa6d31 --- /dev/null +++ b/endpoint_agents/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_ethernet_profile.py b/endpoint_agents/test/test_ethernet_profile.py new file mode 100644 index 00000000..22c802df --- /dev/null +++ b/endpoint_agents/test/test_ethernet_profile.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.ethernet_profile import EthernetProfile + +class TestEthernetProfile(unittest.TestCase): + """EthernetProfile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EthernetProfile: + """Test EthernetProfile + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EthernetProfile` + """ + model = EthernetProfile() + if include_optional: + return EthernetProfile( + link_speed = 56 + ) + else: + return EthernetProfile( + ) + """ + + def testEthernetProfile(self): + """Test EthernetProfile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_expand.py b/endpoint_agents/test/test_expand.py new file mode 100644 index 00000000..4301b895 --- /dev/null +++ b/endpoint_agents/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_interface_hardware_type.py b/endpoint_agents/test/test_interface_hardware_type.py new file mode 100644 index 00000000..d0d4370f --- /dev/null +++ b/endpoint_agents/test/test_interface_hardware_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.interface_hardware_type import InterfaceHardwareType + +class TestInterfaceHardwareType(unittest.TestCase): + """InterfaceHardwareType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInterfaceHardwareType(self): + """Test InterfaceHardwareType""" + # inst = InterfaceHardwareType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_interface_profile.py b/endpoint_agents/test/test_interface_profile.py similarity index 75% rename from endpoint/agents_api/test/test_interface_profile.py rename to endpoint_agents/test/test_interface_profile.py index 94b1a907..fbb5f69b 100644 --- a/endpoint/agents_api/test/test_interface_profile.py +++ b/endpoint_agents/test/test_interface_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.interface_profile import InterfaceProfile +from endpoint_agents.models.interface_profile import InterfaceProfile class TestInterfaceProfile(unittest.TestCase): """InterfaceProfile unit test stubs""" @@ -38,7 +37,7 @@ class TestInterfaceProfile(unittest.TestCase): return InterfaceProfile( interface_name = 'en0', address_profiles = [ - agents_api.models.address_profile.AddressProfile( + endpoint_agents.models.address_profile.AddressProfile( address_type = 'unique-local', ip_address = '2001:db8:3333:4444:5555:6666:7777:8888', prefix_length = 24, @@ -46,9 +45,9 @@ class TestInterfaceProfile(unittest.TestCase): router_hardware_address = '5c:b1:3e:46:1c:84', ) ], hardware_type = 'wireless', - ethernet_profile = agents_api.models.ethernet_profile.EthernetProfile( + ethernet_profile = endpoint_agents.models.ethernet_profile.EthernetProfile( link_speed = 56, ), - wireless_profile = agents_api.models.wireless_profile.WirelessProfile( + wireless_profile = endpoint_agents.models.wireless_profile.WirelessProfile( bssid = '00:11:22:aa:bb:cc', ssid = 'GuestWiFi', rssi = -36, diff --git a/endpoint_agents/test/test_link.py b/endpoint_agents/test/test_link.py new file mode 100644 index 00000000..d526ebd5 --- /dev/null +++ b/endpoint_agents/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_pagination_next_and_self_link.py b/endpoint_agents/test/test_pagination_next_and_self_link.py new file mode 100644 index 00000000..d93122d6 --- /dev/null +++ b/endpoint_agents/test/test_pagination_next_and_self_link.py @@ -0,0 +1,69 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.pagination_next_and_self_link import PaginationNextAndSelfLink + +class TestPaginationNextAndSelfLink(unittest.TestCase): + """PaginationNextAndSelfLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextAndSelfLink: + """Test PaginationNextAndSelfLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextAndSelfLink` + """ + model = PaginationNextAndSelfLink() + if include_optional: + return PaginationNextAndSelfLink( + links = endpoint_agents.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return PaginationNextAndSelfLink( + ) + """ + + def testPaginationNextAndSelfLink(self): + """Test PaginationNextAndSelfLink""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_pagination_next_and_self_link_links.py b/endpoint_agents/test/test_pagination_next_and_self_link_links.py new file mode 100644 index 00000000..bb3db126 --- /dev/null +++ b/endpoint_agents/test/test_pagination_next_and_self_link_links.py @@ -0,0 +1,68 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks + +class TestPaginationNextAndSelfLinkLinks(unittest.TestCase): + """PaginationNextAndSelfLinkLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextAndSelfLinkLinks: + """Test PaginationNextAndSelfLinkLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextAndSelfLinkLinks` + """ + model = PaginationNextAndSelfLinkLinks() + if include_optional: + return PaginationNextAndSelfLinkLinks( + next = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationNextAndSelfLinkLinks( + ) + """ + + def testPaginationNextAndSelfLinkLinks(self): + """Test PaginationNextAndSelfLinkLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_pagination_next_link.py b/endpoint_agents/test/test_pagination_next_link.py new file mode 100644 index 00000000..0ea476aa --- /dev/null +++ b/endpoint_agents/test/test_pagination_next_link.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.pagination_next_link import PaginationNextLink + +class TestPaginationNextLink(unittest.TestCase): + """PaginationNextLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextLink: + """Test PaginationNextLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextLink` + """ + model = PaginationNextLink() + if include_optional: + return PaginationNextLink( + links = endpoint_agents.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return PaginationNextLink( + ) + """ + + def testPaginationNextLink(self): + """Test PaginationNextLink""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_pagination_next_link_links.py b/endpoint_agents/test/test_pagination_next_link_links.py new file mode 100644 index 00000000..99f85de9 --- /dev/null +++ b/endpoint_agents/test/test_pagination_next_link_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.pagination_next_link_links import PaginationNextLinkLinks + +class TestPaginationNextLinkLinks(unittest.TestCase): + """PaginationNextLinkLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextLinkLinks: + """Test PaginationNextLinkLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextLinkLinks` + """ + model = PaginationNextLinkLinks() + if include_optional: + return PaginationNextLinkLinks( + next = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationNextLinkLinks( + ) + """ + + def testPaginationNextLinkLinks(self): + """Test PaginationNextLinkLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_platform.py b/endpoint_agents/test/test_platform.py new file mode 100644 index 00000000..0c8e7ef9 --- /dev/null +++ b/endpoint_agents/test/test_platform.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.platform import Platform + +class TestPlatform(unittest.TestCase): + """Platform unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPlatform(self): + """Test Platform""" + # inst = Platform() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_self_links.py b/endpoint_agents/test/test_self_links.py new file mode 100644 index 00000000..9605a0d2 --- /dev/null +++ b/endpoint_agents/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = endpoint_agents.models.self_links__links.SelfLinks__links( + self = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_self_links_links.py b/endpoint_agents/test/test_self_links_links.py new file mode 100644 index 00000000..902a20d3 --- /dev/null +++ b/endpoint_agents/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = endpoint_agents.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_sort_order.py b/endpoint_agents/test/test_sort_order.py new file mode 100644 index 00000000..69244195 --- /dev/null +++ b/endpoint_agents/test/test_sort_order.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.sort_order import SortOrder + +class TestSortOrder(unittest.TestCase): + """SortOrder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSortOrder(self): + """Test SortOrder""" + # inst = SortOrder() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_status.py b/endpoint_agents/test/test_status.py new file mode 100644 index 00000000..038f64f2 --- /dev/null +++ b/endpoint_agents/test/test_status.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.status import Status + +class TestStatus(unittest.TestCase): + """Status unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatus(self): + """Test Status""" + # inst = Status() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_threshold_filter_operator.py b/endpoint_agents/test/test_threshold_filter_operator.py new file mode 100644 index 00000000..cd561b68 --- /dev/null +++ b/endpoint_agents/test/test_threshold_filter_operator.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.threshold_filter_operator import ThresholdFilterOperator + +class TestThresholdFilterOperator(unittest.TestCase): + """ThresholdFilterOperator unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testThresholdFilterOperator(self): + """Test ThresholdFilterOperator""" + # inst = ThresholdFilterOperator() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_unauthorized_error.py b/endpoint_agents/test/test_unauthorized_error.py new file mode 100644 index 00000000..5898aec1 --- /dev/null +++ b/endpoint_agents/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_validation_error.py b/endpoint_agents/test/test_validation_error.py new file mode 100644 index 00000000..5fbcfa23 --- /dev/null +++ b/endpoint_agents/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + endpoint_agents.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_validation_error_all_of_errors.py b/endpoint_agents/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..d08089cd --- /dev/null +++ b/endpoint_agents/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_agents/test/test_vpn_type.py b/endpoint_agents/test/test_vpn_type.py new file mode 100644 index 00000000..f709d196 --- /dev/null +++ b/endpoint_agents/test/test_vpn_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_agents.models.vpn_type import VpnType + +class TestVpnType(unittest.TestCase): + """VpnType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVpnType(self): + """Test VpnType""" + # inst = VpnType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/agents_api/test/test_wireless_profile.py b/endpoint_agents/test/test_wireless_profile.py similarity index 80% rename from endpoint/agents_api/test/test_wireless_profile.py rename to endpoint_agents/test/test_wireless_profile.py index 3927ea33..790bf17a 100644 --- a/endpoint/agents_api/test/test_wireless_profile.py +++ b/endpoint_agents/test/test_wireless_profile.py @@ -3,9 +3,9 @@ """ Endpoint Agents API - Manage ThousandEyes Endpoint Agents using this 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from agents_api.models.wireless_profile import WirelessProfile +from endpoint_agents.models.wireless_profile import WirelessProfile class TestWirelessProfile(unittest.TestCase): """WirelessProfile unit test stubs""" diff --git a/endpoint/instant_tests_api/.gitignore b/endpoint_instant_tests/.gitignore similarity index 100% rename from endpoint/instant_tests_api/.gitignore rename to endpoint_instant_tests/.gitignore diff --git a/endpoint/instant_tests_api/.openapi-generator-ignore b/endpoint_instant_tests/.openapi-generator-ignore similarity index 100% rename from endpoint/instant_tests_api/.openapi-generator-ignore rename to endpoint_instant_tests/.openapi-generator-ignore diff --git a/endpoint_instant_tests/.openapi-generator/FILES b/endpoint_instant_tests/.openapi-generator/FILES new file mode 100644 index 00000000..9bb54894 --- /dev/null +++ b/endpoint_instant_tests/.openapi-generator/FILES @@ -0,0 +1,120 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AccountGroupId.md +docs/AgentToServerInstantScheduledTestApi.md +docs/AlertDirection.md +docs/AlertRoundsViolationMode.md +docs/AlertRule.md +docs/AlertType.md +docs/EndpointAgentLabelsSelectorConfig.md +docs/EndpointAgentSelectorConfig.md +docs/EndpointAgentToServerInstantTest.md +docs/EndpointAgentToServerTest.md +docs/EndpointAllAgentsSelectorConfig.md +docs/EndpointHttpServerBaseTest.md +docs/EndpointHttpServerInstantTest.md +docs/EndpointHttpServerTest.md +docs/EndpointInstantTest.md +docs/EndpointScheduledTestType.md +docs/EndpointSpecificAgentsSelectorConfig.md +docs/EndpointTest.md +docs/EndpointTestAgentSelectorType.md +docs/EndpointTestAuthType.md +docs/EndpointTestLinks.md +docs/EndpointTestLinksSelf.md +docs/EndpointTestProtocol.md +docs/Error.md +docs/HttpServerInstantScheduledTestApi.md +docs/Link.md +docs/RunExistingTestApi.md +docs/Severity.md +docs/TestInterval.md +docs/TestLabelsInner.md +docs/TestProbeModeResponse.md +docs/TestSslVersionId.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +endpoint_instant_tests/__init__.py +endpoint_instant_tests/api/__init__.py +endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py +endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py +endpoint_instant_tests/api/run_existing_test_api.py +endpoint_instant_tests/api_client.py +endpoint_instant_tests/api_response.py +endpoint_instant_tests/configuration.py +endpoint_instant_tests/exceptions.py +endpoint_instant_tests/models/__init__.py +endpoint_instant_tests/models/account_group_id.py +endpoint_instant_tests/models/alert_direction.py +endpoint_instant_tests/models/alert_rounds_violation_mode.py +endpoint_instant_tests/models/alert_rule.py +endpoint_instant_tests/models/alert_type.py +endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py +endpoint_instant_tests/models/endpoint_agent_selector_config.py +endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py +endpoint_instant_tests/models/endpoint_agent_to_server_test.py +endpoint_instant_tests/models/endpoint_all_agents_selector_config.py +endpoint_instant_tests/models/endpoint_http_server_base_test.py +endpoint_instant_tests/models/endpoint_http_server_instant_test.py +endpoint_instant_tests/models/endpoint_http_server_test.py +endpoint_instant_tests/models/endpoint_instant_test.py +endpoint_instant_tests/models/endpoint_scheduled_test_type.py +endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py +endpoint_instant_tests/models/endpoint_test.py +endpoint_instant_tests/models/endpoint_test_agent_selector_type.py +endpoint_instant_tests/models/endpoint_test_auth_type.py +endpoint_instant_tests/models/endpoint_test_links.py +endpoint_instant_tests/models/endpoint_test_links_self.py +endpoint_instant_tests/models/endpoint_test_protocol.py +endpoint_instant_tests/models/error.py +endpoint_instant_tests/models/link.py +endpoint_instant_tests/models/severity.py +endpoint_instant_tests/models/test_interval.py +endpoint_instant_tests/models/test_labels_inner.py +endpoint_instant_tests/models/test_probe_mode_response.py +endpoint_instant_tests/models/test_ssl_version_id.py +endpoint_instant_tests/models/unauthorized_error.py +endpoint_instant_tests/models/validation_error.py +endpoint_instant_tests/models/validation_error_all_of_errors.py +endpoint_instant_tests/py.typed +endpoint_instant_tests/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_account_group_id.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_links_self.py +test/test_endpoint_test_protocol.py +test/test_error.py +test/test_link.py +test/test_severity.py +test/test_test_interval.py +test/test_test_labels_inner.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_all_of_errors.py diff --git a/endpoint_instant_tests/.openapi-generator/VERSION b/endpoint_instant_tests/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/endpoint_instant_tests/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/endpoint_instant_tests/README.md b/endpoint_instant_tests/README.md new file mode 100644 index 00000000..e9d61d62 --- /dev/null +++ b/endpoint_instant_tests/README.md @@ -0,0 +1,164 @@ +# endpoint-instant-tests + +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. + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import endpoint_instant_tests +``` + +### 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 endpoint_instant_tests +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import endpoint_instant_tests +from endpoint_instant_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 = endpoint_instant_tests.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 = endpoint_instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with endpoint_instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_instant_tests.AgentToServerInstantScheduledTestApi(api_client) + endpoint_agent_to_server_instant_test = endpoint_instant_tests.EndpointAgentToServerInstantTest() # EndpointAgentToServerInstantTest | + 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: + # 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") + pprint(api_response) + except ApiException as e: + print("Exception when calling AgentToServerInstantScheduledTestApi->post_agent_to_server_instant_test: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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 + + +## Documentation For Models + + - [AccountGroupId](docs/AccountGroupId.md) + - [AlertDirection](docs/AlertDirection.md) + - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) + - [AlertRule](docs/AlertRule.md) + - [AlertType](docs/AlertType.md) + - [EndpointAgentLabelsSelectorConfig](docs/EndpointAgentLabelsSelectorConfig.md) + - [EndpointAgentSelectorConfig](docs/EndpointAgentSelectorConfig.md) + - [EndpointAgentToServerInstantTest](docs/EndpointAgentToServerInstantTest.md) + - [EndpointAgentToServerTest](docs/EndpointAgentToServerTest.md) + - [EndpointAllAgentsSelectorConfig](docs/EndpointAllAgentsSelectorConfig.md) + - [EndpointHttpServerBaseTest](docs/EndpointHttpServerBaseTest.md) + - [EndpointHttpServerInstantTest](docs/EndpointHttpServerInstantTest.md) + - [EndpointHttpServerTest](docs/EndpointHttpServerTest.md) + - [EndpointInstantTest](docs/EndpointInstantTest.md) + - [EndpointScheduledTestType](docs/EndpointScheduledTestType.md) + - [EndpointSpecificAgentsSelectorConfig](docs/EndpointSpecificAgentsSelectorConfig.md) + - [EndpointTest](docs/EndpointTest.md) + - [EndpointTestAgentSelectorType](docs/EndpointTestAgentSelectorType.md) + - [EndpointTestAuthType](docs/EndpointTestAuthType.md) + - [EndpointTestLinks](docs/EndpointTestLinks.md) + - [EndpointTestLinksSelf](docs/EndpointTestLinksSelf.md) + - [EndpointTestProtocol](docs/EndpointTestProtocol.md) + - [Error](docs/Error.md) + - [Link](docs/Link.md) + - [Severity](docs/Severity.md) + - [TestInterval](docs/TestInterval.md) + - [TestLabelsInner](docs/TestLabelsInner.md) + - [TestProbeModeResponse](docs/TestProbeModeResponse.md) + - [TestSslVersionId](docs/TestSslVersionId.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/endpoint_instant_tests/docs/AccountGroupId.md b/endpoint_instant_tests/docs/AccountGroupId.md new file mode 100644 index 00000000..1a212412 --- /dev/null +++ b/endpoint_instant_tests/docs/AccountGroupId.md @@ -0,0 +1,29 @@ +# AccountGroupId + + +## 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] + +## Example + +```python +from endpoint_instant_tests.models.account_group_id import AccountGroupId + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupId from a JSON string +account_group_id_instance = AccountGroupId.from_json(json) +# print the JSON string representation of the object +print(AccountGroupId.to_json()) + +# convert the object into a dict +account_group_id_dict = account_group_id_instance.to_dict() +# create an instance of AccountGroupId from a dict +account_group_id_from_dict = AccountGroupId.from_dict(account_group_id_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/endpoint/instant_tests_api/docs/AgentToServerInstantScheduledTestApi.md b/endpoint_instant_tests/docs/AgentToServerInstantScheduledTestApi.md similarity index 81% rename from endpoint/instant_tests_api/docs/AgentToServerInstantScheduledTestApi.md rename to endpoint_instant_tests/docs/AgentToServerInstantScheduledTestApi.md index 69832577..927d2037 100644 --- a/endpoint/instant_tests_api/docs/AgentToServerInstantScheduledTestApi.md +++ b/endpoint_instant_tests/docs/AgentToServerInstantScheduledTestApi.md @@ -1,4 +1,4 @@ -# instant_tests_api.AgentToServerInstantScheduledTestApi +# endpoint_instant_tests.AgentToServerInstantScheduledTestApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,18 +17,17 @@ Creates and runs a new endpoint agent to server instant scheduled test in Thousa ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import instant_tests_api -from instant_tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest -from instant_tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from instant_tests_api.rest import ApiException +import endpoint_instant_tests +from endpoint_instant_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest +from endpoint_instant_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_instant_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 = instant_tests_api.Configuration( +configuration = endpoint_instant_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,16 +37,16 @@ configuration = instant_tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = instant_tests_api.Configuration( +configuration = endpoint_instant_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: +with endpoint_instant_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = instant_tests_api.AgentToServerInstantScheduledTestApi(api_client) - endpoint_agent_to_server_instant_test = instant_tests_api.EndpointAgentToServerInstantTest() # EndpointAgentToServerInstantTest | - aid = '2067' # 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) + api_instance = endpoint_instant_tests.AgentToServerInstantScheduledTestApi(api_client) + endpoint_agent_to_server_instant_test = endpoint_instant_tests.EndpointAgentToServerInstantTest() # EndpointAgentToServerInstantTest | + 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: # Run agent to server instant scheduled test @@ -62,6 +61,7 @@ with instant_tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **endpoint_agent_to_server_instant_test** | [**EndpointAgentToServerInstantTest**](EndpointAgentToServerInstantTest.md)| | @@ -81,6 +81,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| diff --git a/endpoint_instant_tests/docs/AlertDirection.md b/endpoint_instant_tests/docs/AlertDirection.md new file mode 100644 index 00000000..8902e9bf --- /dev/null +++ b/endpoint_instant_tests/docs/AlertDirection.md @@ -0,0 +1,12 @@ +# AlertDirection + +Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + +## 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/endpoint_instant_tests/docs/AlertRoundsViolationMode.md b/endpoint_instant_tests/docs/AlertRoundsViolationMode.md new file mode 100644 index 00000000..efe78921 --- /dev/null +++ b/endpoint_instant_tests/docs/AlertRoundsViolationMode.md @@ -0,0 +1,12 @@ +# AlertRoundsViolationMode + +`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + +## 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/endpoint_instant_tests/docs/AlertRule.md b/endpoint_instant_tests/docs/AlertRule.md new file mode 100644 index 00000000..85300af2 --- /dev/null +++ b/endpoint_instant_tests/docs/AlertRule.md @@ -0,0 +1,40 @@ +# AlertRule + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] +**rule_name** | **str** | Name of the alert rule | [optional] [readonly] +**expression** | **str** | String expression of alert rule | [optional] [readonly] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] +**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] +**alert_type** | [**AlertType**](AlertType.md) | | [optional] +**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] +**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] +**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] +**severity** | [**Severity**](Severity.md) | | [optional] + +## Example + +```python +from endpoint_instant_tests.models.alert_rule import AlertRule + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertRule from a JSON string +alert_rule_instance = AlertRule.from_json(json) +# print the JSON string representation of the object +print(AlertRule.to_json()) + +# convert the object into a dict +alert_rule_dict = alert_rule_instance.to_dict() +# create an instance of AlertRule from a dict +alert_rule_from_dict = AlertRule.from_dict(alert_rule_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/endpoint_instant_tests/docs/AlertType.md b/endpoint_instant_tests/docs/AlertType.md new file mode 100644 index 00000000..cde41743 --- /dev/null +++ b/endpoint_instant_tests/docs/AlertType.md @@ -0,0 +1,12 @@ +# AlertType + +Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + +## 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/endpoint_instant_tests/docs/EndpointAgentLabelsSelectorConfig.md b/endpoint_instant_tests/docs/EndpointAgentLabelsSelectorConfig.md new file mode 100644 index 00000000..cde39dfd --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointAgentLabelsSelectorConfig.md @@ -0,0 +1,32 @@ +# EndpointAgentLabelsSelectorConfig + +Agent labels selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentLabelsSelectorConfig from a JSON string +endpoint_agent_labels_selector_config_instance = EndpointAgentLabelsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentLabelsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_agent_labels_selector_config_dict = endpoint_agent_labels_selector_config_instance.to_dict() +# create an instance of EndpointAgentLabelsSelectorConfig from a dict +endpoint_agent_labels_selector_config_from_dict = EndpointAgentLabelsSelectorConfig.from_dict(endpoint_agent_labels_selector_config_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/endpoint_instant_tests/docs/EndpointAgentSelectorConfig.md b/endpoint_instant_tests/docs/EndpointAgentSelectorConfig.md new file mode 100644 index 00000000..94335ee3 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointAgentSelectorConfig.md @@ -0,0 +1,33 @@ +# EndpointAgentSelectorConfig + +Agents selection object based on agentSelectorType. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentSelectorConfig from a JSON string +endpoint_agent_selector_config_instance = EndpointAgentSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_agent_selector_config_dict = endpoint_agent_selector_config_instance.to_dict() +# create an instance of EndpointAgentSelectorConfig from a dict +endpoint_agent_selector_config_from_dict = EndpointAgentSelectorConfig.from_dict(endpoint_agent_selector_config_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/endpoint_instant_tests/docs/EndpointAgentToServerInstantTest.md b/endpoint_instant_tests/docs/EndpointAgentToServerInstantTest.md new file mode 100644 index 00000000..5ace4de0 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointAgentToServerInstantTest.md @@ -0,0 +1,37 @@ +# EndpointAgentToServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**max_machines** | **int** | Maximum number of agents which can execute the test. | +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**test_name** | **str** | Name of the test. | +**server_name** | **str** | A server address without a protocol or IP address. | + +## Example + +```python +from endpoint_instant_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentToServerInstantTest from a JSON string +endpoint_agent_to_server_instant_test_instance = EndpointAgentToServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentToServerInstantTest.to_json()) + +# convert the object into a dict +endpoint_agent_to_server_instant_test_dict = endpoint_agent_to_server_instant_test_instance.to_dict() +# create an instance of EndpointAgentToServerInstantTest from a dict +endpoint_agent_to_server_instant_test_from_dict = EndpointAgentToServerInstantTest.from_dict(endpoint_agent_to_server_instant_test_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/endpoint_instant_tests/docs/EndpointAgentToServerTest.md b/endpoint_instant_tests/docs/EndpointAgentToServerTest.md new file mode 100644 index 00000000..dcfeb5ae --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointAgentToServerTest.md @@ -0,0 +1,47 @@ +# EndpointAgentToServerTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentToServerTest from a JSON string +endpoint_agent_to_server_test_instance = EndpointAgentToServerTest.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentToServerTest.to_json()) + +# convert the object into a dict +endpoint_agent_to_server_test_dict = endpoint_agent_to_server_test_instance.to_dict() +# create an instance of EndpointAgentToServerTest from a dict +endpoint_agent_to_server_test_from_dict = EndpointAgentToServerTest.from_dict(endpoint_agent_to_server_test_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/endpoint_instant_tests/docs/EndpointAllAgentsSelectorConfig.md b/endpoint_instant_tests/docs/EndpointAllAgentsSelectorConfig.md new file mode 100644 index 00000000..9eeaa07c --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointAllAgentsSelectorConfig.md @@ -0,0 +1,31 @@ +# EndpointAllAgentsSelectorConfig + +Any agent selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAllAgentsSelectorConfig from a JSON string +endpoint_all_agents_selector_config_instance = EndpointAllAgentsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAllAgentsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_all_agents_selector_config_dict = endpoint_all_agents_selector_config_instance.to_dict() +# create an instance of EndpointAllAgentsSelectorConfig from a dict +endpoint_all_agents_selector_config_from_dict = EndpointAllAgentsSelectorConfig.from_dict(endpoint_all_agents_selector_config_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/endpoint_instant_tests/docs/EndpointHttpServerBaseTest.md b/endpoint_instant_tests/docs/EndpointHttpServerBaseTest.md new file mode 100644 index 00000000..98a5a0be --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointHttpServerBaseTest.md @@ -0,0 +1,37 @@ +# EndpointHttpServerBaseTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerBaseTest from a JSON string +endpoint_http_server_base_test_instance = EndpointHttpServerBaseTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerBaseTest.to_json()) + +# convert the object into a dict +endpoint_http_server_base_test_dict = endpoint_http_server_base_test_instance.to_dict() +# create an instance of EndpointHttpServerBaseTest from a dict +endpoint_http_server_base_test_from_dict = EndpointHttpServerBaseTest.from_dict(endpoint_http_server_base_test_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/endpoint_instant_tests/docs/EndpointHttpServerInstantTest.md b/endpoint_instant_tests/docs/EndpointHttpServerInstantTest.md new file mode 100644 index 00000000..08f3b564 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointHttpServerInstantTest.md @@ -0,0 +1,47 @@ +# EndpointHttpServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**max_machines** | **int** | Maximum number of agents which can execute the test. | +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**test_name** | **str** | Name of the test. | +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | +**target_response_time** | **int** | Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red). | +**password** | **str** | Password for Basic/NTLM authentication. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerInstantTest from a JSON string +endpoint_http_server_instant_test_instance = EndpointHttpServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerInstantTest.to_json()) + +# convert the object into a dict +endpoint_http_server_instant_test_dict = endpoint_http_server_instant_test_instance.to_dict() +# create an instance of EndpointHttpServerInstantTest from a dict +endpoint_http_server_instant_test_from_dict = EndpointHttpServerInstantTest.from_dict(endpoint_http_server_instant_test_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/endpoint_instant_tests/docs/EndpointHttpServerTest.md b/endpoint_instant_tests/docs/EndpointHttpServerTest.md new file mode 100644 index 00000000..faa508f2 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointHttpServerTest.md @@ -0,0 +1,61 @@ +# EndpointHttpServerTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**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] +**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] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_http_server_test import EndpointHttpServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerTest from a JSON string +endpoint_http_server_test_instance = EndpointHttpServerTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerTest.to_json()) + +# convert the object into a dict +endpoint_http_server_test_dict = endpoint_http_server_test_instance.to_dict() +# create an instance of EndpointHttpServerTest from a dict +endpoint_http_server_test_from_dict = EndpointHttpServerTest.from_dict(endpoint_http_server_test_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/endpoint_instant_tests/docs/EndpointInstantTest.md b/endpoint_instant_tests/docs/EndpointInstantTest.md new file mode 100644 index 00000000..221f2f3e --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointInstantTest.md @@ -0,0 +1,36 @@ +# EndpointInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**max_machines** | **int** | Maximum number of agents which can execute the test. | +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**test_name** | **str** | Name of the test. | + +## Example + +```python +from endpoint_instant_tests.models.endpoint_instant_test import EndpointInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointInstantTest from a JSON string +endpoint_instant_test_instance = EndpointInstantTest.from_json(json) +# print the JSON string representation of the object +print(EndpointInstantTest.to_json()) + +# convert the object into a dict +endpoint_instant_test_dict = endpoint_instant_test_instance.to_dict() +# create an instance of EndpointInstantTest from a dict +endpoint_instant_test_from_dict = EndpointInstantTest.from_dict(endpoint_instant_test_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/endpoint_instant_tests/docs/EndpointScheduledTestType.md b/endpoint_instant_tests/docs/EndpointScheduledTestType.md new file mode 100644 index 00000000..0d4f39c5 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointScheduledTestType.md @@ -0,0 +1,12 @@ +# EndpointScheduledTestType + +Type of test being queried. + +## 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/endpoint_instant_tests/docs/EndpointSpecificAgentsSelectorConfig.md b/endpoint_instant_tests/docs/EndpointSpecificAgentsSelectorConfig.md new file mode 100644 index 00000000..b7bad198 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointSpecificAgentsSelectorConfig.md @@ -0,0 +1,32 @@ +# EndpointSpecificAgentsSelectorConfig + +Specific agents selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointSpecificAgentsSelectorConfig from a JSON string +endpoint_specific_agents_selector_config_instance = EndpointSpecificAgentsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointSpecificAgentsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_specific_agents_selector_config_dict = endpoint_specific_agents_selector_config_instance.to_dict() +# create an instance of EndpointSpecificAgentsSelectorConfig from a dict +endpoint_specific_agents_selector_config_from_dict = EndpointSpecificAgentsSelectorConfig.from_dict(endpoint_specific_agents_selector_config_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/endpoint_instant_tests/docs/EndpointTest.md b/endpoint_instant_tests/docs/EndpointTest.md new file mode 100644 index 00000000..36c82f3e --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointTest.md @@ -0,0 +1,46 @@ +# EndpointTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | [**EndpointScheduledTestType**](EndpointScheduledTestType.md) | | +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_test import EndpointTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTest from a JSON string +endpoint_test_instance = EndpointTest.from_json(json) +# print the JSON string representation of the object +print(EndpointTest.to_json()) + +# convert the object into a dict +endpoint_test_dict = endpoint_test_instance.to_dict() +# create an instance of EndpointTest from a dict +endpoint_test_from_dict = EndpointTest.from_dict(endpoint_test_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/endpoint_instant_tests/docs/EndpointTestAgentSelectorType.md b/endpoint_instant_tests/docs/EndpointTestAgentSelectorType.md new file mode 100644 index 00000000..e088812e --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointTestAgentSelectorType.md @@ -0,0 +1,12 @@ +# EndpointTestAgentSelectorType + +Retrieve either all available agents, a specific list of agents, or a list of agent labels. + +## 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/endpoint_instant_tests/docs/EndpointTestAuthType.md b/endpoint_instant_tests/docs/EndpointTestAuthType.md new file mode 100644 index 00000000..b0e0f2c0 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointTestAuthType.md @@ -0,0 +1,12 @@ +# EndpointTestAuthType + +HTTP authentication type. + +## 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/endpoint_instant_tests/docs/EndpointTestLinks.md b/endpoint_instant_tests/docs/EndpointTestLinks.md new file mode 100644 index 00000000..4dcadc77 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointTestLinks.md @@ -0,0 +1,31 @@ +# EndpointTestLinks + +A list of links that can be accessed to get more information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**EndpointTestLinksSelf**](EndpointTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTestLinks from a JSON string +endpoint_test_links_instance = EndpointTestLinks.from_json(json) +# print the JSON string representation of the object +print(EndpointTestLinks.to_json()) + +# convert the object into a dict +endpoint_test_links_dict = endpoint_test_links_instance.to_dict() +# create an instance of EndpointTestLinks from a dict +endpoint_test_links_from_dict = EndpointTestLinks.from_dict(endpoint_test_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/endpoint_instant_tests/docs/EndpointTestLinksSelf.md b/endpoint_instant_tests/docs/EndpointTestLinksSelf.md new file mode 100644 index 00000000..c36f9bee --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointTestLinksSelf.md @@ -0,0 +1,36 @@ +# EndpointTestLinksSelf + + +## 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 endpoint_instant_tests.models.endpoint_test_links_self import EndpointTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTestLinksSelf from a JSON string +endpoint_test_links_self_instance = EndpointTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(EndpointTestLinksSelf.to_json()) + +# convert the object into a dict +endpoint_test_links_self_dict = endpoint_test_links_self_instance.to_dict() +# create an instance of EndpointTestLinksSelf from a dict +endpoint_test_links_self_from_dict = EndpointTestLinksSelf.from_dict(endpoint_test_links_self_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/endpoint_instant_tests/docs/EndpointTestProtocol.md b/endpoint_instant_tests/docs/EndpointTestProtocol.md new file mode 100644 index 00000000..8459ae85 --- /dev/null +++ b/endpoint_instant_tests/docs/EndpointTestProtocol.md @@ -0,0 +1,12 @@ +# EndpointTestProtocol + +Protocol used to perform the test. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint_instant_tests/docs/Error.md b/endpoint_instant_tests/docs/Error.md new file mode 100644 index 00000000..e4c43834 --- /dev/null +++ b/endpoint_instant_tests/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 endpoint_instant_tests.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/endpoint/instant_tests_api/docs/HttpServerInstantScheduledTestApi.md b/endpoint_instant_tests/docs/HttpServerInstantScheduledTestApi.md similarity index 81% rename from endpoint/instant_tests_api/docs/HttpServerInstantScheduledTestApi.md rename to endpoint_instant_tests/docs/HttpServerInstantScheduledTestApi.md index b54af4c9..ace0e5aa 100644 --- a/endpoint/instant_tests_api/docs/HttpServerInstantScheduledTestApi.md +++ b/endpoint_instant_tests/docs/HttpServerInstantScheduledTestApi.md @@ -1,4 +1,4 @@ -# instant_tests_api.HttpServerInstantScheduledTestApi +# endpoint_instant_tests.HttpServerInstantScheduledTestApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,18 +17,17 @@ Creates and runs a new endpoint http server instant scheduled test in ThousandEy ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import instant_tests_api -from instant_tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest -from instant_tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -from instant_tests_api.rest import ApiException +import endpoint_instant_tests +from endpoint_instant_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest +from endpoint_instant_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_instant_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 = instant_tests_api.Configuration( +configuration = endpoint_instant_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,16 +37,16 @@ configuration = instant_tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = instant_tests_api.Configuration( +configuration = endpoint_instant_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: +with endpoint_instant_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = instant_tests_api.HttpServerInstantScheduledTestApi(api_client) - endpoint_http_server_instant_test = instant_tests_api.EndpointHttpServerInstantTest() # EndpointHttpServerInstantTest | - aid = '2067' # 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) + api_instance = endpoint_instant_tests.HttpServerInstantScheduledTestApi(api_client) + endpoint_http_server_instant_test = endpoint_instant_tests.EndpointHttpServerInstantTest() # EndpointHttpServerInstantTest | + 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: # Run http server instant scheduled test @@ -62,6 +61,7 @@ with instant_tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **endpoint_http_server_instant_test** | [**EndpointHttpServerInstantTest**](EndpointHttpServerInstantTest.md)| | @@ -81,6 +81,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| diff --git a/endpoint_instant_tests/docs/Link.md b/endpoint_instant_tests/docs/Link.md new file mode 100644 index 00000000..d2d30c73 --- /dev/null +++ b/endpoint_instant_tests/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 endpoint_instant_tests.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/endpoint/instant_tests_api/docs/RunExistingTestApi.md b/endpoint_instant_tests/docs/RunExistingTestApi.md similarity index 87% rename from endpoint/instant_tests_api/docs/RunExistingTestApi.md rename to endpoint_instant_tests/docs/RunExistingTestApi.md index 9e33012d..4e944b0d 100644 --- a/endpoint/instant_tests_api/docs/RunExistingTestApi.md +++ b/endpoint_instant_tests/docs/RunExistingTestApi.md @@ -1,4 +1,4 @@ -# instant_tests_api.RunExistingTestApi +# endpoint_instant_tests.RunExistingTestApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,16 +17,15 @@ Runs an existing endpoint instant scheduled test in ThousandEyes. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import instant_tests_api -from instant_tests_api.rest import ApiException +import endpoint_instant_tests +from endpoint_instant_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 = instant_tests_api.Configuration( +configuration = endpoint_instant_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -36,16 +35,16 @@ configuration = instant_tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = instant_tests_api.Configuration( +configuration = endpoint_instant_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: +with endpoint_instant_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = instant_tests_api.RunExistingTestApi(api_client) + api_instance = endpoint_instant_tests.RunExistingTestApi(api_client) test_id = '765231567' # str | ID of the endpoint instant scheduled test to rerun - aid = '2067' # 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) + 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: # Run endpoint instant scheduled test @@ -58,6 +57,7 @@ with instant_tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the endpoint instant scheduled test to rerun | @@ -77,6 +77,7 @@ void (empty response body) - **Accept**: application/json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint_instant_tests/docs/Severity.md b/endpoint_instant_tests/docs/Severity.md new file mode 100644 index 00000000..3abd8037 --- /dev/null +++ b/endpoint_instant_tests/docs/Severity.md @@ -0,0 +1,12 @@ +# Severity + +The severity of the alert. + +## 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/endpoint_instant_tests/docs/TestInterval.md b/endpoint_instant_tests/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/endpoint_instant_tests/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/endpoint_instant_tests/docs/TestLabelsInner.md b/endpoint_instant_tests/docs/TestLabelsInner.md new file mode 100644 index 00000000..3703f0db --- /dev/null +++ b/endpoint_instant_tests/docs/TestLabelsInner.md @@ -0,0 +1,31 @@ +# TestLabelsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Label ID. | [optional] +**name** | **str** | Name of the label. | [optional] +**is_builtin** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] + +## Example + +```python +from endpoint_instant_tests.models.test_labels_inner import TestLabelsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestLabelsInner from a JSON string +test_labels_inner_instance = TestLabelsInner.from_json(json) +# print the JSON string representation of the object +print(TestLabelsInner.to_json()) + +# convert the object into a dict +test_labels_inner_dict = test_labels_inner_instance.to_dict() +# create an instance of TestLabelsInner from a dict +test_labels_inner_from_dict = TestLabelsInner.from_dict(test_labels_inner_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/endpoint_instant_tests/docs/TestProbeModeResponse.md b/endpoint_instant_tests/docs/TestProbeModeResponse.md new file mode 100644 index 00000000..9a6c5555 --- /dev/null +++ b/endpoint_instant_tests/docs/TestProbeModeResponse.md @@ -0,0 +1,12 @@ +# TestProbeModeResponse + +Probe mode used by network test, only valid when the protocol is set to TCP. + +## 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/endpoint_instant_tests/docs/TestSslVersionId.md b/endpoint_instant_tests/docs/TestSslVersionId.md new file mode 100644 index 00000000..f13419ab --- /dev/null +++ b/endpoint_instant_tests/docs/TestSslVersionId.md @@ -0,0 +1,12 @@ +# TestSslVersionId + +SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + +## 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/endpoint_instant_tests/docs/UnauthorizedError.md b/endpoint_instant_tests/docs/UnauthorizedError.md new file mode 100644 index 00000000..6d8cb0a6 --- /dev/null +++ b/endpoint_instant_tests/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from endpoint_instant_tests.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/endpoint_instant_tests/docs/ValidationError.md b/endpoint_instant_tests/docs/ValidationError.md new file mode 100644 index 00000000..b5f8634f --- /dev/null +++ b/endpoint_instant_tests/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from endpoint_instant_tests.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/endpoint_instant_tests/docs/ValidationErrorAllOfErrors.md b/endpoint_instant_tests/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..053947e7 --- /dev/null +++ b/endpoint_instant_tests/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from endpoint_instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/endpoint_instant_tests/endpoint_instant_tests/__init__.py b/endpoint_instant_tests/endpoint_instant_tests/__init__.py new file mode 100644 index 00000000..58df0f68 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/__init__.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 endpoint_instant_tests.api.agent_to_server_instant_scheduled_test_api import AgentToServerInstantScheduledTestApi +from endpoint_instant_tests.api.http_server_instant_scheduled_test_api import HttpServerInstantScheduledTestApi +from endpoint_instant_tests.api.run_existing_test_api import RunExistingTestApi + +# import ApiClient +from endpoint_instant_tests.api_response import ApiResponse +from endpoint_instant_tests.api_client import ApiClient +from endpoint_instant_tests.configuration import Configuration +from endpoint_instant_tests.exceptions import OpenApiException +from endpoint_instant_tests.exceptions import ApiTypeError +from endpoint_instant_tests.exceptions import ApiValueError +from endpoint_instant_tests.exceptions import ApiKeyError +from endpoint_instant_tests.exceptions import ApiAttributeError +from endpoint_instant_tests.exceptions import ApiException + +# import models into sdk package +from endpoint_instant_tests.models.account_group_id import AccountGroupId +from endpoint_instant_tests.models.alert_direction import AlertDirection +from endpoint_instant_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_instant_tests.models.alert_rule import AlertRule +from endpoint_instant_tests.models.alert_type import AlertType +from endpoint_instant_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_instant_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest +from endpoint_instant_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_instant_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_instant_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest +from endpoint_instant_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest +from endpoint_instant_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_instant_tests.models.endpoint_instant_test import EndpointInstantTest +from endpoint_instant_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_instant_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from endpoint_instant_tests.models.endpoint_test import EndpointTest +from endpoint_instant_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_instant_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_instant_tests.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.error import Error +from endpoint_instant_tests.models.link import Link +from endpoint_instant_tests.models.severity import Severity +from endpoint_instant_tests.models.test_interval import TestInterval +from endpoint_instant_tests.models.test_labels_inner import TestLabelsInner +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_instant_tests.models.test_ssl_version_id import TestSslVersionId +from endpoint_instant_tests.models.unauthorized_error import UnauthorizedError +from endpoint_instant_tests.models.validation_error import ValidationError +from endpoint_instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/endpoint_instant_tests/endpoint_instant_tests/api/__init__.py b/endpoint_instant_tests/endpoint_instant_tests/api/__init__.py new file mode 100644 index 00000000..8b01b17a --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/api/__init__.py @@ -0,0 +1,7 @@ +# flake8: noqa + +# import apis into api package +from endpoint_instant_tests.api.agent_to_server_instant_scheduled_test_api import AgentToServerInstantScheduledTestApi +from endpoint_instant_tests.api.http_server_instant_scheduled_test_api import HttpServerInstantScheduledTestApi +from endpoint_instant_tests.api.run_existing_test_api import RunExistingTestApi + diff --git a/endpoint/instant_tests_api/instant_tests_api/api/agent_to_server_instant_scheduled_test_api.py b/endpoint_instant_tests/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py similarity index 89% rename from endpoint/instant_tests_api/instant_tests_api/api/agent_to_server_instant_scheduled_test_api.py rename to endpoint_instant_tests/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py index 83f1c53f..2fcb1282 100644 --- a/endpoint/instant_tests_api/instant_tests_api/api/agent_to_server_instant_scheduled_test_api.py +++ b/endpoint_instant_tests/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py @@ -3,38 +3,28 @@ """ Endpoint Instant Scheduled Tests API - ### Overview 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. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest +from endpoint_instant_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from instant_tests_api.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest -from instant_tests_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType +from endpoint_instant_tests.api_client import ApiClient, RequestSerialized +from endpoint_instant_tests.api_response import ApiResponse +from endpoint_instant_tests.rest import RESTResponseType class AgentToServerInstantScheduledTestApi: @@ -109,14 +99,12 @@ class AgentToServerInstantScheduledTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "EndpointAgentToServerTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -188,14 +176,12 @@ class AgentToServerInstantScheduledTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "EndpointAgentToServerTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -267,14 +253,12 @@ class AgentToServerInstantScheduledTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "EndpointAgentToServerTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -291,19 +275,18 @@ class AgentToServerInstantScheduledTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/instant_tests_api/instant_tests_api/api/http_server_instant_scheduled_test_api.py b/endpoint_instant_tests/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py similarity index 89% rename from endpoint/instant_tests_api/instant_tests_api/api/http_server_instant_scheduled_test_api.py rename to endpoint_instant_tests/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py index d059350f..fcc30031 100644 --- a/endpoint/instant_tests_api/instant_tests_api/api/http_server_instant_scheduled_test_api.py +++ b/endpoint_instant_tests/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py @@ -3,38 +3,28 @@ """ Endpoint Instant Scheduled Tests API - ### Overview 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. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest +from endpoint_instant_tests.models.endpoint_http_server_test import EndpointHttpServerTest -from instant_tests_api.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest -from instant_tests_api.models.endpoint_http_server_test import EndpointHttpServerTest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType +from endpoint_instant_tests.api_client import ApiClient, RequestSerialized +from endpoint_instant_tests.api_response import ApiResponse +from endpoint_instant_tests.rest import RESTResponseType class HttpServerInstantScheduledTestApi: @@ -109,14 +99,12 @@ class HttpServerInstantScheduledTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "EndpointHttpServerTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -188,14 +176,12 @@ class HttpServerInstantScheduledTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "EndpointHttpServerTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -267,14 +253,12 @@ class HttpServerInstantScheduledTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "EndpointHttpServerTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -291,19 +275,18 @@ class HttpServerInstantScheduledTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/instant_tests_api/instant_tests_api/api/run_existing_test_api.py b/endpoint_instant_tests/endpoint_instant_tests/api/run_existing_test_api.py similarity index 87% rename from endpoint/instant_tests_api/instant_tests_api/api/run_existing_test_api.py rename to endpoint_instant_tests/endpoint_instant_tests/api/run_existing_test_api.py index eee92683..fc975346 100644 --- a/endpoint/instant_tests_api/instant_tests_api/api/run_existing_test_api.py +++ b/endpoint_instant_tests/endpoint_instant_tests/api/run_existing_test_api.py @@ -3,36 +3,26 @@ """ Endpoint Instant Scheduled Tests API - ### Overview 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. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType +from endpoint_instant_tests.api_client import ApiClient, RequestSerialized +from endpoint_instant_tests.api_response import ApiResponse +from endpoint_instant_tests.rest import RESTResponseType class RunExistingTestApi: @@ -106,7 +96,13 @@ class RunExistingTestApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -177,7 +173,13 @@ class RunExistingTestApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -248,7 +250,13 @@ class RunExistingTestApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -265,19 +273,18 @@ class RunExistingTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint_instant_tests/endpoint_instant_tests/api_client.py b/endpoint_instant_tests/endpoint_instant_tests/api_client.py new file mode 100644 index 00000000..ee312465 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from endpoint_instant_tests.configuration import Configuration +from endpoint_instant_tests.api_response import ApiResponse, T as ApiResponseT +import endpoint_instant_tests.models +from endpoint_instant_tests import rest +from endpoint_instant_tests.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(endpoint_instant_tests.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/endpoint_instant_tests/endpoint_instant_tests/api_response.py b/endpoint_instant_tests/endpoint_instant_tests/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/endpoint_instant_tests/endpoint_instant_tests/configuration.py b/endpoint_instant_tests/endpoint_instant_tests/configuration.py new file mode 100644 index 00000000..db4c7b49 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("endpoint_instant_tests") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/endpoint_instant_tests/endpoint_instant_tests/exceptions.py b/endpoint_instant_tests/endpoint_instant_tests/exceptions.py new file mode 100644 index 00000000..125b91d7 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/__init__.py b/endpoint_instant_tests/endpoint_instant_tests/models/__init__.py new file mode 100644 index 00000000..515dbc30 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/__init__.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from endpoint_instant_tests.models.account_group_id import AccountGroupId +from endpoint_instant_tests.models.alert_direction import AlertDirection +from endpoint_instant_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_instant_tests.models.alert_rule import AlertRule +from endpoint_instant_tests.models.alert_type import AlertType +from endpoint_instant_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_instant_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest +from endpoint_instant_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_instant_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_instant_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest +from endpoint_instant_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest +from endpoint_instant_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_instant_tests.models.endpoint_instant_test import EndpointInstantTest +from endpoint_instant_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_instant_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from endpoint_instant_tests.models.endpoint_test import EndpointTest +from endpoint_instant_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_instant_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_instant_tests.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.error import Error +from endpoint_instant_tests.models.link import Link +from endpoint_instant_tests.models.severity import Severity +from endpoint_instant_tests.models.test_interval import TestInterval +from endpoint_instant_tests.models.test_labels_inner import TestLabelsInner +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_instant_tests.models.test_ssl_version_id import TestSslVersionId +from endpoint_instant_tests.models.unauthorized_error import UnauthorizedError +from endpoint_instant_tests.models.validation_error import ValidationError +from endpoint_instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/account_group_id.py b/endpoint_instant_tests/endpoint_instant_tests/models/account_group_id.py new file mode 100644 index 00000000..fee8d940 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/account_group_id.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AccountGroupId(BaseModel): + """ + AccountGroupId + """ # 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.") + __properties: ClassVar[List[str]] = ["aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupId 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 AccountGroupId 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") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/alert_direction.py b/endpoint_instant_tests/endpoint_instant_tests/models/alert_direction.py new file mode 100644 index 00000000..9053f266 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/alert_direction.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.2 + 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 AlertDirection(str, Enum): + """ + Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/alert_rounds_violation_mode.py b/endpoint_instant_tests/endpoint_instant_tests/models/alert_rounds_violation_mode.py new file mode 100644 index 00000000..9d20c831 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/alert_rounds_violation_mode.py @@ -0,0 +1,37 @@ +# 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.2 + 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 AlertRoundsViolationMode(str, Enum): + """ + `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + """ + + """ + allowed enum values + """ + EXACT = 'exact' + ANY = 'any' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertRoundsViolationMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/alert_rule.py b/endpoint_instant_tests/endpoint_instant_tests/models/alert_rule.py new file mode 100644 index 00000000..e0a34ae4 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/alert_rule.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_instant_tests.models.alert_direction import AlertDirection +from endpoint_instant_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_instant_tests.models.alert_type import AlertType +from endpoint_instant_tests.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class AlertRule(BaseModel): + """ + AlertRule + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") + rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") + expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") + direction: Optional[AlertDirection] = None + is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") + severity: Optional[Severity] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "severity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertRule 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([ + "rule_id", + "rule_name", + "expression", + "is_default", + "minimum_sources", + "minimum_sources_pct", + "rounds_violating_out_of", + "rounds_violating_required", + ]) + + _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 AlertRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/alert_type.py b/endpoint_instant_tests/endpoint_instant_tests/models/alert_type.py new file mode 100644 index 00000000..f5743096 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/alert_type.py @@ -0,0 +1,62 @@ +# 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.2 + 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 AlertType(str, Enum): + """ + Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + """ + + """ + allowed enum values + """ + PAGE_MINUS_LOAD = 'page-load' + HTTP_MINUS_SERVER = 'http-server' + END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' + END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' + VOICE = 'voice' + DNS_MINUS_SERVER = 'dns-server' + DNS_MINUS_TRACE = 'dns-trace' + DNSSEC = 'dnssec' + BGP = 'bgp' + PATH_MINUS_TRACE = 'path-trace' + FTP = 'ftp' + SIP_MINUS_SERVER = 'sip-server' + TRANSACTIONS = 'transactions' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + AGENT = 'agent' + NETWORK_MINUS_OUTAGE = 'network-outage' + APPLICATION_MINUS_OUTAGE = 'application-outage' + DEVICE_MINUS_DEVICE = 'device-device' + DEVICE_MINUS_INTERFACE = 'device-interface' + ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' + ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' + ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' + API = 'api' + WEB_MINUS_TRANSACTION = 'web-transaction' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py new file mode 100644 index 00000000..501c2666 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py @@ -0,0 +1,99 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentLabelsSelectorConfig(BaseModel): + """ + Agent labels selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "endpointAgentLabels"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^agent-labels$", value): + raise ValueError(r"must validate the regular expression /^agent-labels$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentLabelsSelectorConfig 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 EndpointAgentLabelsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines"), + "endpointAgentLabels": obj.get("endpointAgentLabels") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_selector_config.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_selector_config.py new file mode 100644 index 00000000..30e8af09 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_selector_config.py @@ -0,0 +1,154 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from endpoint_instant_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_instant_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_instant_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ENDPOINTAGENTSELECTORCONFIG_ONE_OF_SCHEMAS = ["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] + +class EndpointAgentSelectorConfig(BaseModel): + """ + Agents selection object based on agentSelectorType. + """ + # data type: EndpointAllAgentsSelectorConfig + oneof_schema_1_validator: Optional[EndpointAllAgentsSelectorConfig] = None + # data type: EndpointAgentLabelsSelectorConfig + oneof_schema_2_validator: Optional[EndpointAgentLabelsSelectorConfig] = None + # data type: EndpointSpecificAgentsSelectorConfig + oneof_schema_3_validator: Optional[EndpointSpecificAgentsSelectorConfig] = None + actual_instance: Optional[Union[EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]] = None + one_of_schemas: Set[str] = { "EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = EndpointAgentSelectorConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: EndpointAllAgentsSelectorConfig + if not isinstance(v, EndpointAllAgentsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAllAgentsSelectorConfig`") + else: + match += 1 + # validate data type: EndpointAgentLabelsSelectorConfig + if not isinstance(v, EndpointAgentLabelsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAgentLabelsSelectorConfig`") + else: + match += 1 + # validate data type: EndpointSpecificAgentsSelectorConfig + if not isinstance(v, EndpointSpecificAgentsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointSpecificAgentsSelectorConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into EndpointAllAgentsSelectorConfig + try: + instance.actual_instance = EndpointAllAgentsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EndpointAgentLabelsSelectorConfig + try: + instance.actual_instance = EndpointAgentLabelsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EndpointSpecificAgentsSelectorConfig + try: + instance.actual_instance = EndpointSpecificAgentsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py new file mode 100644 index 00000000..7f225d9a --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py @@ -0,0 +1,105 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentToServerInstantTest(BaseModel): + """ + EndpointAgentToServerInstantTest + """ # noqa: E501 + agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + test_name: StrictStr = Field(description="Name of the test.", alias="testName") + server_name: StrictStr = Field(description="A server address without a protocol or IP address.", alias="serverName") + __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "serverName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentToServerInstantTest 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 EndpointAgentToServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines"), + "port": obj.get("port"), + "testName": obj.get("testName"), + "serverName": obj.get("serverName") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_test.py new file mode 100644 index 00000000..aceb0b12 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_agent_to_server_test.py @@ -0,0 +1,171 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.alert_rule import AlertRule +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.test_interval import TestInterval +from endpoint_instant_tests.models.test_labels_inner import TestLabelsInner +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentToServerTest(BaseModel): + """ + EndpointAgentToServerTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: Annotated[str, Field(strict=True)] = Field(description="Type of test being queried.") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules", "labels"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^agent-to-server$", value): + raise ValueError(r"must validate the regular expression /^agent-to-server$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + "type", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py new file mode 100644 index 00000000..09bf9204 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py @@ -0,0 +1,97 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAllAgentsSelectorConfig(BaseModel): + """ + Any agent selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^all-agents$", value): + raise ValueError(r"must validate the regular expression /^all-agents$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAllAgentsSelectorConfig 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 EndpointAllAgentsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_base_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_base_test.py new file mode 100644 index 00000000..948d2aff --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_base_test.py @@ -0,0 +1,107 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_instant_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_instant_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerBaseTest(BaseModel): + """ + EndpointHttpServerBaseTest + """ # noqa: E501 + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + protocol: Optional[EndpointTestProtocol] = None + url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") + __properties: ClassVar[List[str]] = ["authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerBaseTest 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 EndpointHttpServerBaseTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "protocol": obj.get("protocol"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "verifyCertificate": obj.get("verifyCertificate") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_instant_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_instant_test.py new file mode 100644 index 00000000..6905eb27 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_instant_test.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_instant_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_instant_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerInstantTest(BaseModel): + """ + EndpointHttpServerInstantTest + """ # noqa: E501 + agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + test_name: StrictStr = Field(description="Name of the test.", alias="testName") + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + http_time_limit: StrictInt = Field(description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + protocol: Optional[EndpointTestProtocol] = None + url: StrictStr = Field(description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + ssl_version_id: TestSslVersionId = Field(alias="sslVersionId") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + verify_certificate: StrictBool = Field(description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") + target_response_time: StrictInt = Field(description="Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red).", alias="targetResponseTime") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "targetResponseTime", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerInstantTest 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 EndpointHttpServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines"), + "port": obj.get("port"), + "testName": obj.get("testName"), + "authType": obj.get("authType"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "protocol": obj.get("protocol"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "verifyCertificate": obj.get("verifyCertificate"), + "targetResponseTime": obj.get("targetResponseTime"), + "password": obj.get("password") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_test.py new file mode 100644 index 00000000..9d4a491d --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_http_server_test.py @@ -0,0 +1,203 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.alert_rule import AlertRule +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_instant_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.test_interval import TestInterval +from endpoint_instant_tests.models.test_labels_inner import TestLabelsInner +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_instant_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerTest(BaseModel): + """ + EndpointHttpServerTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: Annotated[str, Field(strict=True)] = Field(description="Type of test being queried.") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + 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") + 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") + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent", "labels"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^http-server$", value): + raise ValueError(r"must validate the regular expression /^http-server$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerTest 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([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + "type", + "ssl_version", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointHttpServerTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "authType": obj.get("authType"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "verifyCertificate": obj.get("verifyCertificate"), + "contentRegex": obj.get("contentRegex"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "postBody": obj.get("postBody"), + "sslVersion": obj.get("sslVersion"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_instant_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_instant_test.py new file mode 100644 index 00000000..fe55012e --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_instant_test.py @@ -0,0 +1,103 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_instant_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from typing import Optional, Set +from typing_extensions import Self + +class EndpointInstantTest(BaseModel): + """ + EndpointInstantTest + """ # noqa: E501 + agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + test_name: StrictStr = Field(description="Name of the test.", alias="testName") + __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointInstantTest 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 EndpointInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines"), + "port": obj.get("port"), + "testName": obj.get("testName") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_scheduled_test_type.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_scheduled_test_type.py new file mode 100644 index 00000000..e895f615 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_scheduled_test_type.py @@ -0,0 +1,37 @@ +# 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.2 + 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 EndpointScheduledTestType(str, Enum): + """ + Type of test being queried. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + HTTP_MINUS_SERVER = 'http-server' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointScheduledTestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py new file mode 100644 index 00000000..db30d289 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py @@ -0,0 +1,99 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointSpecificAgentsSelectorConfig(BaseModel): + """ + Specific agents selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "agents"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^specific-agents$", value): + raise ValueError(r"must validate the regular expression /^specific-agents$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointSpecificAgentsSelectorConfig 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 EndpointSpecificAgentsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines"), + "agents": obj.get("agents") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test.py new file mode 100644 index 00000000..f89b91e8 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test.py @@ -0,0 +1,150 @@ +# 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.2 + 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 endpoint_instant_tests.models.alert_rule import AlertRule +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_instant_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_instant_tests.models.test_interval import TestInterval +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class EndpointTest(BaseModel): + """ + EndpointTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: EndpointScheduledTestType + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py new file mode 100644 index 00000000..7428bb13 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_agent_selector_type.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.2 + 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 EndpointTestAgentSelectorType(str, Enum): + """ + Retrieve either all available agents, a specific list of agents, or a list of agent labels. + """ + + """ + allowed enum values + """ + ALL_MINUS_AGENTS = 'all-agents' + SPECIFIC_MINUS_AGENTS = 'specific-agents' + AGENT_MINUS_LABELS = 'agent-labels' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestAgentSelectorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_auth_type.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_auth_type.py new file mode 100644 index 00000000..7e03e7ca --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_auth_type.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.2 + 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 EndpointTestAuthType(str, Enum): + """ + HTTP authentication type. + """ + + """ + allowed enum values + """ + NONE = 'none' + BASIC = 'basic' + NTLM = 'ntlm' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestAuthType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links.py new file mode 100644 index 00000000..bb09bdbd --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_instant_tests.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_instant_tests.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class EndpointTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information. + """ # noqa: E501 + var_self: Optional[EndpointTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": EndpointTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links_self.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links_self.py new file mode 100644 index 00000000..3775e9cd --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 EndpointTestLinksSelf(BaseModel): + """ + EndpointTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTestLinksSelf 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 EndpointTestLinksSelf 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/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_protocol.py b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_protocol.py new file mode 100644 index 00000000..8f0951c3 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/endpoint_test_protocol.py @@ -0,0 +1,41 @@ +# 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.2 + 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 EndpointTestProtocol(str, Enum): + """ + Protocol used to perform the test. + """ + + """ + allowed enum values + """ + ICMP = 'icmp' + ICMP_MINUS_WITH_MINUS_TCP_MINUS_CONNECT = 'icmp-with-tcp-connect' + TCP = 'tcp' + PREFER_MINUS_TCP = 'prefer-tcp' + AST_MINUS_AUTODETECT = 'ast-autodetect' + AUTODETECT = 'autodetect' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/error.py b/endpoint_instant_tests/endpoint_instant_tests/models/error.py new file mode 100644 index 00000000..0dcd332a --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_instant_tests/endpoint_instant_tests/models/link.py b/endpoint_instant_tests/endpoint_instant_tests/models/link.py new file mode 100644 index 00000000..392ee68b --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_instant_tests/endpoint_instant_tests/models/severity.py b/endpoint_instant_tests/endpoint_instant_tests/models/severity.py new file mode 100644 index 00000000..535975d2 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/severity.py @@ -0,0 +1,40 @@ +# 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.2 + 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 Severity(str, Enum): + """ + The severity of the alert. + """ + + """ + allowed enum values + """ + INFO = 'info' + MAJOR = 'major' + MINOR = 'minor' + CRITICAL = 'critical' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Severity from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/test_interval.py b/endpoint_instant_tests/endpoint_instant_tests/models/test_interval.py new file mode 100644 index 00000000..3e34af00 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/test_interval.py @@ -0,0 +1,42 @@ +# 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.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/test_labels_inner.py b/endpoint_instant_tests/endpoint_instant_tests/models/test_labels_inner.py new file mode 100644 index 00000000..54452d39 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/test_labels_inner.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestLabelsInner(BaseModel): + """ + TestLabelsInner + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") + name: Optional[StrictStr] = Field(default=None, description="Name of the label.") + is_builtin: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestLabelsInner 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 TestLabelsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "name": obj.get("name"), + "isBuiltin": obj.get("isBuiltin") + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/test_probe_mode_response.py b/endpoint_instant_tests/endpoint_instant_tests/models/test_probe_mode_response.py new file mode 100644 index 00000000..33573540 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/test_probe_mode_response.py @@ -0,0 +1,39 @@ +# 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.2 + 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 TestProbeModeResponse(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to TCP. + """ + + """ + allowed enum values + """ + AUTO = 'auto' + SACK = 'sack' + SYN = 'syn' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProbeModeResponse from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/test_ssl_version_id.py b/endpoint_instant_tests/endpoint_instant_tests/models/test_ssl_version_id.py new file mode 100644 index 00000000..36db614b --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/test_ssl_version_id.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestSslVersionId(str, Enum): + """ + SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestSslVersionId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/unauthorized_error.py b/endpoint_instant_tests/endpoint_instant_tests/models/unauthorized_error.py new file mode 100644 index 00000000..bf3c7722 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_instant_tests/endpoint_instant_tests/models/validation_error.py b/endpoint_instant_tests/endpoint_instant_tests/models/validation_error.py new file mode 100644 index 00000000..03696e86 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 endpoint_instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/endpoint_instant_tests/endpoint_instant_tests/models/validation_error_all_of_errors.py b/endpoint_instant_tests/endpoint_instant_tests/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..8532b456 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/endpoint/instant_tests_api/instant_tests_api/py.typed b/endpoint_instant_tests/endpoint_instant_tests/py.typed similarity index 100% rename from endpoint/instant_tests_api/instant_tests_api/py.typed rename to endpoint_instant_tests/endpoint_instant_tests/py.typed diff --git a/endpoint_instant_tests/endpoint_instant_tests/rest.py b/endpoint_instant_tests/endpoint_instant_tests/rest.py new file mode 100644 index 00000000..a8cebad7 --- /dev/null +++ b/endpoint_instant_tests/endpoint_instant_tests/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from endpoint_instant_tests.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/endpoint_instant_tests/pyproject.toml b/endpoint_instant_tests/pyproject.toml new file mode 100644 index 00000000..9b5de360 --- /dev/null +++ b/endpoint_instant_tests/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "endpoint_instant_tests" +version = "1.0.0" +description = "Endpoint Instant Scheduled Tests API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Instant Scheduled Tests API"] +include = ["endpoint_instant_tests/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "endpoint_instant_tests", + #"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/endpoint/instant_tests_api/requirements.txt b/endpoint_instant_tests/requirements.txt similarity index 100% rename from endpoint/instant_tests_api/requirements.txt rename to endpoint_instant_tests/requirements.txt diff --git a/endpoint/instant_tests_api/setup.cfg b/endpoint_instant_tests/setup.cfg similarity index 100% rename from endpoint/instant_tests_api/setup.cfg rename to endpoint_instant_tests/setup.cfg diff --git a/endpoint_instant_tests/setup.py b/endpoint_instant_tests/setup.py new file mode 100644 index 00000000..f2a0f22c --- /dev/null +++ b/endpoint_instant_tests/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "endpoint-instant-tests" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Endpoint Instant Scheduled Tests API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/endpoint_instant_tests", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Endpoint Instant Scheduled Tests API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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. + """, # noqa: E501 + package_data={"endpoint_instant_tests": ["py.typed"]}, +) diff --git a/endpoint_instant_tests/test-requirements.txt b/endpoint_instant_tests/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/endpoint_instant_tests/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/endpoint/instant_tests_api/test/__init__.py b/endpoint_instant_tests/test/__init__.py similarity index 100% rename from endpoint/instant_tests_api/test/__init__.py rename to endpoint_instant_tests/test/__init__.py diff --git a/endpoint_instant_tests/test/test_account_group_id.py b/endpoint_instant_tests/test/test_account_group_id.py new file mode 100644 index 00000000..1db72af3 --- /dev/null +++ b/endpoint_instant_tests/test/test_account_group_id.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.account_group_id import AccountGroupId + +class TestAccountGroupId(unittest.TestCase): + """AccountGroupId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupId: + """Test AccountGroupId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupId` + """ + model = AccountGroupId() + if include_optional: + return AccountGroupId( + aid = '1234' + ) + else: + return AccountGroupId( + ) + """ + + def testAccountGroupId(self): + """Test AccountGroupId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_alert_direction.py b/endpoint_instant_tests/test/test_alert_direction.py new file mode 100644 index 00000000..089b6674 --- /dev/null +++ b/endpoint_instant_tests/test/test_alert_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.alert_direction import AlertDirection + +class TestAlertDirection(unittest.TestCase): + """AlertDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertDirection(self): + """Test AlertDirection""" + # inst = AlertDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_alert_rounds_violation_mode.py b/endpoint_instant_tests/test/test_alert_rounds_violation_mode.py new file mode 100644 index 00000000..e5d2f70d --- /dev/null +++ b/endpoint_instant_tests/test/test_alert_rounds_violation_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode + +class TestAlertRoundsViolationMode(unittest.TestCase): + """AlertRoundsViolationMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertRoundsViolationMode(self): + """Test AlertRoundsViolationMode""" + # inst = AlertRoundsViolationMode() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_alert_rule.py b/endpoint_instant_tests/test/test_alert_rule.py new file mode 100644 index 00000000..49f3fd58 --- /dev/null +++ b/endpoint_instant_tests/test/test_alert_rule.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.alert_rule import AlertRule + +class TestAlertRule(unittest.TestCase): + """AlertRule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertRule: + """Test AlertRule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertRule` + """ + model = AlertRule() + if include_optional: + return AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major' + ) + else: + return AlertRule( + ) + """ + + def testAlertRule(self): + """Test AlertRule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_alert_type.py b/endpoint_instant_tests/test/test_alert_type.py new file mode 100644 index 00000000..ba027649 --- /dev/null +++ b/endpoint_instant_tests/test/test_alert_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.alert_type import AlertType + +class TestAlertType(unittest.TestCase): + """AlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertType(self): + """Test AlertType""" + # inst = AlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_agent_labels_selector_config.py b/endpoint_instant_tests/test/test_endpoint_agent_labels_selector_config.py new file mode 100644 index 00000000..bb742a7a --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_agent_labels_selector_config.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig + +class TestEndpointAgentLabelsSelectorConfig(unittest.TestCase): + """EndpointAgentLabelsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentLabelsSelectorConfig: + """Test EndpointAgentLabelsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentLabelsSelectorConfig` + """ + model = EndpointAgentLabelsSelectorConfig() + if include_optional: + return EndpointAgentLabelsSelectorConfig( + agent_selector_type = 'agent-labels', + max_machines = 10, + endpoint_agent_labels = ["567","214"] + ) + else: + return EndpointAgentLabelsSelectorConfig( + agent_selector_type = 'agent-labels', + ) + """ + + def testEndpointAgentLabelsSelectorConfig(self): + """Test EndpointAgentLabelsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_agent_selector_config.py b/endpoint_instant_tests/test/test_endpoint_agent_selector_config.py new file mode 100644 index 00000000..67aa1694 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_agent_selector_config.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig + +class TestEndpointAgentSelectorConfig(unittest.TestCase): + """EndpointAgentSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentSelectorConfig: + """Test EndpointAgentSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentSelectorConfig` + """ + model = EndpointAgentSelectorConfig() + if include_optional: + return EndpointAgentSelectorConfig( + agent_selector_type = 'specific-agents', + max_machines = 10, + endpoint_agent_labels = [567, 214], + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c] + ) + else: + return EndpointAgentSelectorConfig( + agent_selector_type = 'specific-agents', + ) + """ + + def testEndpointAgentSelectorConfig(self): + """Test EndpointAgentSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_agent_to_server_instant_test.py b/endpoint_instant_tests/test/test_endpoint_agent_to_server_instant_test.py new file mode 100644 index 00000000..86d7cb9a --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_agent_to_server_instant_test.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest + +class TestEndpointAgentToServerInstantTest(unittest.TestCase): + """EndpointAgentToServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentToServerInstantTest: + """Test EndpointAgentToServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentToServerInstantTest` + """ + model = EndpointAgentToServerInstantTest() + if include_optional: + return EndpointAgentToServerInstantTest( + agent_selector_type = 'all-agents', + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], + has_ping = True, + has_traceroute = True, + endpoint_agent_labels = [567, 214], + max_machines = 10, + port = 80, + test_name = 'Test name', + server_name = 'www.example.com' + ) + else: + return EndpointAgentToServerInstantTest( + agent_selector_type = 'all-agents', + max_machines = 10, + test_name = 'Test name', + server_name = 'www.example.com', + ) + """ + + def testEndpointAgentToServerInstantTest(self): + """Test EndpointAgentToServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_agent_to_server_test.py b/endpoint_instant_tests/test/test_endpoint_agent_to_server_test.py new file mode 100644 index 00000000..7ddc6855 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_agent_to_server_test.py @@ -0,0 +1,88 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest + +class TestEndpointAgentToServerTest(unittest.TestCase): + """EndpointAgentToServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentToServerTest: + """Test EndpointAgentToServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentToServerTest` + """ + model = EndpointAgentToServerTest() + if include_optional: + return EndpointAgentToServerTest( + aid = '1234', + links = endpoint_instant_tests.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_instant_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'agent-to-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_instant_tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return EndpointAgentToServerTest( + type = 'agent-to-server', + ) + """ + + def testEndpointAgentToServerTest(self): + """Test EndpointAgentToServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_all_agents_selector_config.py b/endpoint_instant_tests/test/test_endpoint_all_agents_selector_config.py new file mode 100644 index 00000000..3fcd9e48 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_all_agents_selector_config.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig + +class TestEndpointAllAgentsSelectorConfig(unittest.TestCase): + """EndpointAllAgentsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAllAgentsSelectorConfig: + """Test EndpointAllAgentsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAllAgentsSelectorConfig` + """ + model = EndpointAllAgentsSelectorConfig() + if include_optional: + return EndpointAllAgentsSelectorConfig( + agent_selector_type = 'all-agents', + max_machines = 10 + ) + else: + return EndpointAllAgentsSelectorConfig( + agent_selector_type = 'all-agents', + ) + """ + + def testEndpointAllAgentsSelectorConfig(self): + """Test EndpointAllAgentsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_http_server_base_test.py b/endpoint_instant_tests/test/test_endpoint_http_server_base_test.py new file mode 100644 index 00000000..2b19965c --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_http_server_base_test.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest + +class TestEndpointHttpServerBaseTest(unittest.TestCase): + """EndpointHttpServerBaseTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerBaseTest: + """Test EndpointHttpServerBaseTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerBaseTest` + """ + model = EndpointHttpServerBaseTest() + if include_optional: + return EndpointHttpServerBaseTest( + auth_type = 'none', + has_path_trace_in_session = True, + http_time_limit = 5000, + protocol = 'icmp', + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + tcp_probe_mode = 'auto', + verify_certificate = False + ) + else: + return EndpointHttpServerBaseTest( + ) + """ + + def testEndpointHttpServerBaseTest(self): + """Test EndpointHttpServerBaseTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_http_server_instant_test.py b/endpoint_instant_tests/test/test_endpoint_http_server_instant_test.py new file mode 100644 index 00000000..e91586f5 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_http_server_instant_test.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest + +class TestEndpointHttpServerInstantTest(unittest.TestCase): + """EndpointHttpServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerInstantTest: + """Test EndpointHttpServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerInstantTest` + """ + model = EndpointHttpServerInstantTest() + if include_optional: + return EndpointHttpServerInstantTest( + agent_selector_type = 'all-agents', + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], + has_ping = True, + has_traceroute = True, + endpoint_agent_labels = [567, 214], + max_machines = 10, + port = 80, + test_name = 'Test name', + auth_type = 'none', + has_path_trace_in_session = True, + http_time_limit = 5000, + protocol = 'icmp', + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + tcp_probe_mode = 'auto', + verify_certificate = False, + target_response_time = 1000, + password = 'password' + ) + else: + return EndpointHttpServerInstantTest( + agent_selector_type = 'all-agents', + max_machines = 10, + test_name = 'Test name', + http_time_limit = 5000, + url = 'www.example.com', + ssl_version_id = '0', + verify_certificate = False, + target_response_time = 1000, + ) + """ + + def testEndpointHttpServerInstantTest(self): + """Test EndpointHttpServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_http_server_test.py b/endpoint_instant_tests/test/test_endpoint_http_server_test.py new file mode 100644 index 00000000..497ef8ff --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_http_server_test.py @@ -0,0 +1,102 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_http_server_test import EndpointHttpServerTest + +class TestEndpointHttpServerTest(unittest.TestCase): + """EndpointHttpServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerTest: + """Test EndpointHttpServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerTest` + """ + model = EndpointHttpServerTest() + if include_optional: + return EndpointHttpServerTest( + aid = '1234', + links = endpoint_instant_tests.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_instant_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'http-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_instant_tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + auth_type = 'none', + http_time_limit = 5000, + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + verify_certificate = False, + content_regex = '(regex)+', + follow_redirects = True, + http_target_time = 100, + http_version = 1, + post_body = 'body', + ssl_version = 'Auto', + use_ntlm = False, + user_agent = 'curl', + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return EndpointHttpServerTest( + type = 'http-server', + ) + """ + + def testEndpointHttpServerTest(self): + """Test EndpointHttpServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_instant_test.py b/endpoint_instant_tests/test/test_endpoint_instant_test.py new file mode 100644 index 00000000..977e8727 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_instant_test.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_instant_test import EndpointInstantTest + +class TestEndpointInstantTest(unittest.TestCase): + """EndpointInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointInstantTest: + """Test EndpointInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointInstantTest` + """ + model = EndpointInstantTest() + if include_optional: + return EndpointInstantTest( + agent_selector_type = 'all-agents', + agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], + has_ping = True, + has_traceroute = True, + endpoint_agent_labels = ["567","214"], + max_machines = 10, + port = 80, + test_name = 'Test name' + ) + else: + return EndpointInstantTest( + agent_selector_type = 'all-agents', + max_machines = 10, + test_name = 'Test name', + ) + """ + + def testEndpointInstantTest(self): + """Test EndpointInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_scheduled_test_type.py b/endpoint_instant_tests/test/test_endpoint_scheduled_test_type.py new file mode 100644 index 00000000..de49609a --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_scheduled_test_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType + +class TestEndpointScheduledTestType(unittest.TestCase): + """EndpointScheduledTestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointScheduledTestType(self): + """Test EndpointScheduledTestType""" + # inst = EndpointScheduledTestType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_specific_agents_selector_config.py b/endpoint_instant_tests/test/test_endpoint_specific_agents_selector_config.py new file mode 100644 index 00000000..c4c1550f --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_specific_agents_selector_config.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig + +class TestEndpointSpecificAgentsSelectorConfig(unittest.TestCase): + """EndpointSpecificAgentsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointSpecificAgentsSelectorConfig: + """Test EndpointSpecificAgentsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointSpecificAgentsSelectorConfig` + """ + model = EndpointSpecificAgentsSelectorConfig() + if include_optional: + return EndpointSpecificAgentsSelectorConfig( + agent_selector_type = 'specific-agents', + max_machines = 10, + agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] + ) + else: + return EndpointSpecificAgentsSelectorConfig( + agent_selector_type = 'specific-agents', + ) + """ + + def testEndpointSpecificAgentsSelectorConfig(self): + """Test EndpointSpecificAgentsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_test.py b/endpoint_instant_tests/test/test_endpoint_test.py new file mode 100644 index 00000000..0ce79d8d --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_test.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_test import EndpointTest + +class TestEndpointTest(unittest.TestCase): + """EndpointTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTest: + """Test EndpointTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTest` + """ + model = EndpointTest() + if include_optional: + return EndpointTest( + aid = '1234', + links = endpoint_instant_tests.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_instant_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'agent-to-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_instant_tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ] + ) + else: + return EndpointTest( + type = 'agent-to-server', + ) + """ + + def testEndpointTest(self): + """Test EndpointTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_test_agent_selector_type.py b/endpoint_instant_tests/test/test_endpoint_test_agent_selector_type.py new file mode 100644 index 00000000..a6d9b424 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_test_agent_selector_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType + +class TestEndpointTestAgentSelectorType(unittest.TestCase): + """EndpointTestAgentSelectorType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestAgentSelectorType(self): + """Test EndpointTestAgentSelectorType""" + # inst = EndpointTestAgentSelectorType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_test_auth_type.py b/endpoint_instant_tests/test/test_endpoint_test_auth_type.py new file mode 100644 index 00000000..f491b8df --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_test_auth_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_test_auth_type import EndpointTestAuthType + +class TestEndpointTestAuthType(unittest.TestCase): + """EndpointTestAuthType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestAuthType(self): + """Test EndpointTestAuthType""" + # inst = EndpointTestAuthType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_test_links.py b/endpoint_instant_tests/test/test_endpoint_test_links.py new file mode 100644 index 00000000..6188d5fb --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_test_links import EndpointTestLinks + +class TestEndpointTestLinks(unittest.TestCase): + """EndpointTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTestLinks: + """Test EndpointTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTestLinks` + """ + model = EndpointTestLinks() + if include_optional: + return EndpointTestLinks( + var_self = None, + test_results = [{"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"}] + ) + else: + return EndpointTestLinks( + ) + """ + + def testEndpointTestLinks(self): + """Test EndpointTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_test_links_self.py b/endpoint_instant_tests/test/test_endpoint_test_links_self.py new file mode 100644 index 00000000..c1d98aec --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_test_links_self import EndpointTestLinksSelf + +class TestEndpointTestLinksSelf(unittest.TestCase): + """EndpointTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTestLinksSelf: + """Test EndpointTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTestLinksSelf` + """ + model = EndpointTestLinksSelf() + if include_optional: + return EndpointTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return EndpointTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testEndpointTestLinksSelf(self): + """Test EndpointTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_endpoint_test_protocol.py b/endpoint_instant_tests/test/test_endpoint_test_protocol.py new file mode 100644 index 00000000..1e741190 --- /dev/null +++ b/endpoint_instant_tests/test/test_endpoint_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.endpoint_test_protocol import EndpointTestProtocol + +class TestEndpointTestProtocol(unittest.TestCase): + """EndpointTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestProtocol(self): + """Test EndpointTestProtocol""" + # inst = EndpointTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_error.py b/endpoint_instant_tests/test/test_error.py new file mode 100644 index 00000000..1dc32969 --- /dev/null +++ b/endpoint_instant_tests/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_link.py b/endpoint_instant_tests/test/test_link.py new file mode 100644 index 00000000..3a879ee0 --- /dev/null +++ b/endpoint_instant_tests/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_severity.py b/endpoint_instant_tests/test/test_severity.py new file mode 100644 index 00000000..fe909ff4 --- /dev/null +++ b/endpoint_instant_tests/test/test_severity.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.severity import Severity + +class TestSeverity(unittest.TestCase): + """Severity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSeverity(self): + """Test Severity""" + # inst = Severity() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_test_interval.py b/endpoint_instant_tests/test/test_test_interval.py new file mode 100644 index 00000000..3589b7c6 --- /dev/null +++ b/endpoint_instant_tests/test/test_test_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_test_labels_inner.py b/endpoint_instant_tests/test/test_test_labels_inner.py new file mode 100644 index 00000000..c5ebff95 --- /dev/null +++ b/endpoint_instant_tests/test/test_test_labels_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.test_labels_inner import TestLabelsInner + +class TestTestLabelsInner(unittest.TestCase): + """TestLabelsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestLabelsInner: + """Test TestLabelsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestLabelsInner` + """ + model = TestLabelsInner() + if include_optional: + return TestLabelsInner( + label_id = '', + name = '', + is_builtin = True + ) + else: + return TestLabelsInner( + ) + """ + + def testTestLabelsInner(self): + """Test TestLabelsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_test_probe_mode_response.py b/endpoint_instant_tests/test/test_test_probe_mode_response.py new file mode 100644 index 00000000..d2216290 --- /dev/null +++ b/endpoint_instant_tests/test/test_test_probe_mode_response.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.test_probe_mode_response import TestProbeModeResponse + +class TestTestProbeModeResponse(unittest.TestCase): + """TestProbeModeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProbeModeResponse(self): + """Test TestProbeModeResponse""" + # inst = TestProbeModeResponse() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_test_ssl_version_id.py b/endpoint_instant_tests/test/test_test_ssl_version_id.py new file mode 100644 index 00000000..52864dec --- /dev/null +++ b/endpoint_instant_tests/test/test_test_ssl_version_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.test_ssl_version_id import TestSslVersionId + +class TestTestSslVersionId(unittest.TestCase): + """TestSslVersionId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestSslVersionId(self): + """Test TestSslVersionId""" + # inst = TestSslVersionId() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_unauthorized_error.py b/endpoint_instant_tests/test/test_unauthorized_error.py new file mode 100644 index 00000000..3c3c1014 --- /dev/null +++ b/endpoint_instant_tests/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_validation_error.py b/endpoint_instant_tests/test/test_validation_error.py new file mode 100644 index 00000000..4358620d --- /dev/null +++ b/endpoint_instant_tests/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + endpoint_instant_tests.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_instant_tests/test/test_validation_error_all_of_errors.py b/endpoint_instant_tests/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..d553c3ca --- /dev/null +++ b/endpoint_instant_tests/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/labels_api/.gitignore b/endpoint_labels/.gitignore similarity index 100% rename from endpoint/labels_api/.gitignore rename to endpoint_labels/.gitignore diff --git a/endpoint/labels_api/.openapi-generator-ignore b/endpoint_labels/.openapi-generator-ignore similarity index 100% rename from endpoint/labels_api/.openapi-generator-ignore rename to endpoint_labels/.openapi-generator-ignore diff --git a/endpoint_labels/.openapi-generator/FILES b/endpoint_labels/.openapi-generator/FILES new file mode 100644 index 00000000..104abff0 --- /dev/null +++ b/endpoint_labels/.openapi-generator/FILES @@ -0,0 +1,80 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/EndpointLabelsList200Response.md +docs/Error.md +docs/Expand.md +docs/Filter.md +docs/FilterType.md +docs/Label.md +docs/LabelFilterMode.md +docs/Labels.md +docs/LabelsLabelsInner.md +docs/Link.md +docs/ManageLabelsApi.md +docs/MatchType.md +docs/PaginationNextAndSelfLink.md +docs/PaginationNextAndSelfLinkLinks.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/UnauthorizedError.md +docs/V7EndpointLabelsPost201Response.md +docs/V7EndpointLabelsPostRequest.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +endpoint_labels/__init__.py +endpoint_labels/api/__init__.py +endpoint_labels/api/manage_labels_api.py +endpoint_labels/api_client.py +endpoint_labels/api_response.py +endpoint_labels/configuration.py +endpoint_labels/exceptions.py +endpoint_labels/models/__init__.py +endpoint_labels/models/endpoint_labels_list200_response.py +endpoint_labels/models/error.py +endpoint_labels/models/expand.py +endpoint_labels/models/filter.py +endpoint_labels/models/filter_type.py +endpoint_labels/models/label.py +endpoint_labels/models/label_filter_mode.py +endpoint_labels/models/labels.py +endpoint_labels/models/labels_labels_inner.py +endpoint_labels/models/link.py +endpoint_labels/models/match_type.py +endpoint_labels/models/pagination_next_and_self_link.py +endpoint_labels/models/pagination_next_and_self_link_links.py +endpoint_labels/models/self_links.py +endpoint_labels/models/self_links_links.py +endpoint_labels/models/unauthorized_error.py +endpoint_labels/models/v7_endpoint_labels_post201_response.py +endpoint_labels/models/v7_endpoint_labels_post_request.py +endpoint_labels/models/validation_error.py +endpoint_labels/models/validation_error_all_of_errors.py +endpoint_labels/py.typed +endpoint_labels/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_endpoint_labels_list200_response.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_labels.py +test/test_labels_labels_inner.py +test/test_link.py +test/test_match_type.py +test/test_pagination_next_and_self_link.py +test/test_pagination_next_and_self_link_links.py +test/test_self_links.py +test/test_self_links_links.py +test/test_unauthorized_error.py +test/test_v7_endpoint_labels_post201_response.py +test/test_v7_endpoint_labels_post_request.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/endpoint_labels/.openapi-generator/VERSION b/endpoint_labels/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/endpoint_labels/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/endpoint_labels/README.md b/endpoint_labels/README.md new file mode 100644 index 00000000..f9cd99ff --- /dev/null +++ b/endpoint_labels/README.md @@ -0,0 +1,143 @@ +# endpoint-labels +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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import endpoint_labels +``` + +### 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 endpoint_labels +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import endpoint_labels +from 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 = endpoint_labels.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 = endpoint_labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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) + + try: + # Delete label + api_instance.endpoint_label_delete(id, aid=aid) + except ApiException as e: + print("Exception when calling ManageLabelsApi->endpoint_label_delete: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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 + + +## Documentation For Models + + - [EndpointLabelsList200Response](docs/EndpointLabelsList200Response.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [Filter](docs/Filter.md) + - [FilterType](docs/FilterType.md) + - [Label](docs/Label.md) + - [LabelFilterMode](docs/LabelFilterMode.md) + - [Labels](docs/Labels.md) + - [LabelsLabelsInner](docs/LabelsLabelsInner.md) + - [Link](docs/Link.md) + - [MatchType](docs/MatchType.md) + - [PaginationNextAndSelfLink](docs/PaginationNextAndSelfLink.md) + - [PaginationNextAndSelfLinkLinks](docs/PaginationNextAndSelfLinkLinks.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [V7EndpointLabelsPost201Response](docs/V7EndpointLabelsPost201Response.md) + - [V7EndpointLabelsPostRequest](docs/V7EndpointLabelsPostRequest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/endpoint_labels/docs/EndpointLabelsList200Response.md b/endpoint_labels/docs/EndpointLabelsList200Response.md new file mode 100644 index 00000000..6f144abe --- /dev/null +++ b/endpoint_labels/docs/EndpointLabelsList200Response.md @@ -0,0 +1,30 @@ +# EndpointLabelsList200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | [**List[LabelsLabelsInner]**](LabelsLabelsInner.md) | | [optional] +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_labels.models.endpoint_labels_list200_response import EndpointLabelsList200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointLabelsList200Response from a JSON string +endpoint_labels_list200_response_instance = EndpointLabelsList200Response.from_json(json) +# print the JSON string representation of the object +print(EndpointLabelsList200Response.to_json()) + +# convert the object into a dict +endpoint_labels_list200_response_dict = endpoint_labels_list200_response_instance.to_dict() +# create an instance of EndpointLabelsList200Response from a dict +endpoint_labels_list200_response_from_dict = EndpointLabelsList200Response.from_dict(endpoint_labels_list200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint_labels/docs/Error.md b/endpoint_labels/docs/Error.md new file mode 100644 index 00000000..c4d97808 --- /dev/null +++ b/endpoint_labels/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 endpoint_labels.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/endpoint_labels/docs/Expand.md b/endpoint_labels/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/endpoint_labels/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/endpoint/labels_api/docs/Filter.md b/endpoint_labels/docs/Filter.md similarity index 86% rename from endpoint/labels_api/docs/Filter.md rename to endpoint_labels/docs/Filter.md index 206119d8..9ad0fdfe 100644 --- a/endpoint/labels_api/docs/Filter.md +++ b/endpoint_labels/docs/Filter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key** | [**FilterType**](FilterType.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.filter import Filter +from endpoint_labels.models.filter import Filter # TODO update the JSON string below json = "{}" # create an instance of Filter from a JSON string filter_instance = Filter.from_json(json) # print the JSON string representation of the object -print Filter.to_json() +print(Filter.to_json()) # convert the object into a dict filter_dict = filter_instance.to_dict() # create an instance of Filter from a dict -filter_form_dict = filter.from_dict(filter_dict) +filter_from_dict = Filter.from_dict(filter_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/endpoint/labels_api/docs/FilterType.md b/endpoint_labels/docs/FilterType.md similarity index 83% rename from endpoint/labels_api/docs/FilterType.md rename to endpoint_labels/docs/FilterType.md index f0a6da63..d78a6b05 100644 --- a/endpoint/labels_api/docs/FilterType.md +++ b/endpoint_labels/docs/FilterType.md @@ -1,8 +1,9 @@ # FilterType -Type of filter - the data that will be used to filter. +Type of filter - the data that will be used to filter. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_labels/docs/Label.md b/endpoint_labels/docs/Label.md new file mode 100644 index 00000000..43c6567d --- /dev/null +++ b/endpoint_labels/docs/Label.md @@ -0,0 +1,34 @@ +# Label + +A label definition. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Label identifier. | [optional] [readonly] +**name** | **str** | The label name. | [optional] +**color** | **str** | UI color | [optional] +**match_type** | [**MatchType**](MatchType.md) | | [optional] +**filters** | [**List[Filter]**](Filter.md) | The filters combined using the matchType to determine the label's match. | [optional] + +## Example + +```python +from endpoint_labels.models.label import Label + +# TODO update the JSON string below +json = "{}" +# create an instance of Label from a JSON string +label_instance = Label.from_json(json) +# print the JSON string representation of the object +print(Label.to_json()) + +# convert the object into a dict +label_dict = label_instance.to_dict() +# create an instance of Label from a dict +label_from_dict = Label.from_dict(label_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/endpoint/labels_api/docs/LabelFilterMode.md b/endpoint_labels/docs/LabelFilterMode.md similarity index 99% rename from endpoint/labels_api/docs/LabelFilterMode.md rename to endpoint_labels/docs/LabelFilterMode.md index 85511eb4..6fad5946 100644 --- a/endpoint/labels_api/docs/LabelFilterMode.md +++ b/endpoint_labels/docs/LabelFilterMode.md @@ -3,6 +3,7 @@ Type of matching to be applied for the values: * `in`: The value on the agent must match one of the list of values provided. * `not-in`: The value on the agent must not match any of the list of values provided. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_labels/docs/Labels.md b/endpoint_labels/docs/Labels.md new file mode 100644 index 00000000..685c53b6 --- /dev/null +++ b/endpoint_labels/docs/Labels.md @@ -0,0 +1,30 @@ +# Labels + +A list of Labels. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | [**List[LabelsLabelsInner]**](LabelsLabelsInner.md) | | [optional] + +## Example + +```python +from endpoint_labels.models.labels import Labels + +# TODO update the JSON string below +json = "{}" +# create an instance of Labels from a JSON string +labels_instance = Labels.from_json(json) +# print the JSON string representation of the object +print(Labels.to_json()) + +# convert the object into a dict +labels_dict = labels_instance.to_dict() +# create an instance of Labels from a dict +labels_from_dict = Labels.from_dict(labels_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/endpoint/labels_api/docs/LabelsLabelsInner.md b/endpoint_labels/docs/LabelsLabelsInner.md similarity index 85% rename from endpoint/labels_api/docs/LabelsLabelsInner.md rename to endpoint_labels/docs/LabelsLabelsInner.md index c2467397..f2f41c22 100644 --- a/endpoint/labels_api/docs/LabelsLabelsInner.md +++ b/endpoint_labels/docs/LabelsLabelsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.labels_labels_inner import LabelsLabelsInner +from endpoint_labels.models.labels_labels_inner import LabelsLabelsInner # TODO update the JSON string below json = "{}" # create an instance of LabelsLabelsInner from a JSON string labels_labels_inner_instance = LabelsLabelsInner.from_json(json) # print the JSON string representation of the object -print LabelsLabelsInner.to_json() +print(LabelsLabelsInner.to_json()) # convert the object into a dict labels_labels_inner_dict = labels_labels_inner_instance.to_dict() # create an instance of LabelsLabelsInner from a dict -labels_labels_inner_form_dict = labels_labels_inner.from_dict(labels_labels_inner_dict) +labels_labels_inner_from_dict = LabelsLabelsInner.from_dict(labels_labels_inner_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/endpoint_labels/docs/Link.md b/endpoint_labels/docs/Link.md new file mode 100644 index 00000000..64b625f0 --- /dev/null +++ b/endpoint_labels/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 endpoint_labels.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/endpoint_labels/docs/ManageLabelsApi.md b/endpoint_labels/docs/ManageLabelsApi.md new file mode 100644 index 00000000..f6524e8b --- /dev/null +++ b/endpoint_labels/docs/ManageLabelsApi.md @@ -0,0 +1,442 @@ +# endpoint_labels.ManageLabelsApi + +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 + + +# **endpoint_label_delete** +> endpoint_label_delete(id, aid=aid) + +Delete label + +Deletes the label from your account. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_labels +from 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 = endpoint_labels.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 = endpoint_labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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) + + try: + # Delete label + api_instance.endpoint_label_delete(id, aid=aid) + except Exception as e: + print("Exception when calling ManageLabelsApi->endpoint_label_delete: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The unique identifier of the label to operate on. | + **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 | - | +**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_label_get** +> V7EndpointLabelsPost201Response endpoint_label_get(id, expand=expand, aid=aid) + +Retrieve label + +Returns a single label using its ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_labels +from endpoint_labels.models.expand import Expand +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from 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 = endpoint_labels.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 = endpoint_labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_labels.ManageLabelsApi(api_client) + id = 'id_example' # str | The unique identifier of the label to operate on. + expand = [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: + # Retrieve label + api_response = api_instance.endpoint_label_get(id, expand=expand, aid=aid) + print("The response of ManageLabelsApi->endpoint_label_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManageLabelsApi->endpoint_label_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The unique identifier of the label to operate on. | + **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 + +[**V7EndpointLabelsPost201Response**](V7EndpointLabelsPost201Response.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 | - | + +[[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** +> V7EndpointLabelsPost201Response endpoint_label_update(id, aid=aid, label=label) + +Update label + +Updates a label using its ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_labels +from endpoint_labels.models.label import Label +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from 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 = endpoint_labels.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 = endpoint_labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 = endpoint_labels.Label() # Label | Fields to change on the agent (optional) + + try: + # Update label + api_response = api_instance.endpoint_label_update(id, aid=aid, label=label) + print("The response of ManageLabelsApi->endpoint_label_update:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManageLabelsApi->endpoint_label_update: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The unique identifier of the label to operate on. | + **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** | [**Label**](Label.md)| Fields to change on the agent | [optional] + +### Return type + +[**V7EndpointLabelsPost201Response**](V7EndpointLabelsPost201Response.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 | - | + +[[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** +> EndpointLabelsList200Response endpoint_labels_list(max=max, cursor=cursor, expand=expand, aid=aid) + +List labels + +Returns a list of labels. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_labels +from endpoint_labels.models.endpoint_labels_list200_response import EndpointLabelsList200Response +from endpoint_labels.models.expand import Expand +from 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 = endpoint_labels.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 = endpoint_labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 = [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 + +[**EndpointLabelsList200Response**](EndpointLabelsList200Response.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** +> V7EndpointLabelsPost201Response v7_endpoint_labels_post(aid=aid, v7_endpoint_labels_post_request=v7_endpoint_labels_post_request) + +Create label + +Creates a new label. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_labels +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from endpoint_labels.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest +from 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 = endpoint_labels.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 = endpoint_labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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) + v7_endpoint_labels_post_request = endpoint_labels.V7EndpointLabelsPostRequest() # V7EndpointLabelsPostRequest | Label settings (optional) + + try: + # Create label + api_response = api_instance.v7_endpoint_labels_post(aid=aid, v7_endpoint_labels_post_request=v7_endpoint_labels_post_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] + **v7_endpoint_labels_post_request** | [**V7EndpointLabelsPostRequest**](V7EndpointLabelsPostRequest.md)| Label settings | [optional] + +### Return type + +[**V7EndpointLabelsPost201Response**](V7EndpointLabelsPost201Response.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/endpoint/labels_api/docs/MatchType.md b/endpoint_labels/docs/MatchType.md similarity index 99% rename from endpoint/labels_api/docs/MatchType.md rename to endpoint_labels/docs/MatchType.md index 26fbe2ef..26a3f194 100644 --- a/endpoint/labels_api/docs/MatchType.md +++ b/endpoint_labels/docs/MatchType.md @@ -3,6 +3,7 @@ Specifies how the filters are combined for matching this label. * `and`: All filters must be matched. * `or`: Any of the filters should match. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_labels/docs/PaginationNextAndSelfLink.md b/endpoint_labels/docs/PaginationNextAndSelfLink.md new file mode 100644 index 00000000..7cb6a4f4 --- /dev/null +++ b/endpoint_labels/docs/PaginationNextAndSelfLink.md @@ -0,0 +1,30 @@ +# PaginationNextAndSelfLink + +A links object containing a related link for forward pagination. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_labels.models.pagination_next_and_self_link import PaginationNextAndSelfLink + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextAndSelfLink from a JSON string +pagination_next_and_self_link_instance = PaginationNextAndSelfLink.from_json(json) +# print the JSON string representation of the object +print(PaginationNextAndSelfLink.to_json()) + +# convert the object into a dict +pagination_next_and_self_link_dict = pagination_next_and_self_link_instance.to_dict() +# create an instance of PaginationNextAndSelfLink from a dict +pagination_next_and_self_link_from_dict = PaginationNextAndSelfLink.from_dict(pagination_next_and_self_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/endpoint_labels/docs/PaginationNextAndSelfLinkLinks.md b/endpoint_labels/docs/PaginationNextAndSelfLinkLinks.md new file mode 100644 index 00000000..34ddc1b8 --- /dev/null +++ b/endpoint_labels/docs/PaginationNextAndSelfLinkLinks.md @@ -0,0 +1,30 @@ +# PaginationNextAndSelfLinkLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_labels.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextAndSelfLinkLinks from a JSON string +pagination_next_and_self_link_links_instance = PaginationNextAndSelfLinkLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationNextAndSelfLinkLinks.to_json()) + +# convert the object into a dict +pagination_next_and_self_link_links_dict = pagination_next_and_self_link_links_instance.to_dict() +# create an instance of PaginationNextAndSelfLinkLinks from a dict +pagination_next_and_self_link_links_from_dict = PaginationNextAndSelfLinkLinks.from_dict(pagination_next_and_self_link_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/endpoint_labels/docs/SelfLinks.md b/endpoint_labels/docs/SelfLinks.md new file mode 100644 index 00000000..5c22ec9a --- /dev/null +++ b/endpoint_labels/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_labels.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/endpoint_labels/docs/SelfLinksLinks.md b/endpoint_labels/docs/SelfLinksLinks.md new file mode 100644 index 00000000..bb651d7d --- /dev/null +++ b/endpoint_labels/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_labels.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/endpoint_labels/docs/UnauthorizedError.md b/endpoint_labels/docs/UnauthorizedError.md new file mode 100644 index 00000000..74f005ee --- /dev/null +++ b/endpoint_labels/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from endpoint_labels.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/endpoint/labels_api/docs/V7EndpointLabelsPost201Response.md b/endpoint_labels/docs/V7EndpointLabelsPost201Response.md similarity index 81% rename from endpoint/labels_api/docs/V7EndpointLabelsPost201Response.md rename to endpoint_labels/docs/V7EndpointLabelsPost201Response.md index bd80f064..807a8f9f 100644 --- a/endpoint/labels_api/docs/V7EndpointLabelsPost201Response.md +++ b/endpoint_labels/docs/V7EndpointLabelsPost201Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Label identifier. | [optional] [readonly] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response # TODO update the JSON string below json = "{}" # create an instance of V7EndpointLabelsPost201Response from a JSON string v7_endpoint_labels_post201_response_instance = V7EndpointLabelsPost201Response.from_json(json) # print the JSON string representation of the object -print V7EndpointLabelsPost201Response.to_json() +print(V7EndpointLabelsPost201Response.to_json()) # convert the object into a dict v7_endpoint_labels_post201_response_dict = v7_endpoint_labels_post201_response_instance.to_dict() # create an instance of V7EndpointLabelsPost201Response from a dict -v7_endpoint_labels_post201_response_form_dict = v7_endpoint_labels_post201_response.from_dict(v7_endpoint_labels_post201_response_dict) +v7_endpoint_labels_post201_response_from_dict = V7EndpointLabelsPost201Response.from_dict(v7_endpoint_labels_post201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/labels_api/docs/V7EndpointLabelsPostRequest.md b/endpoint_labels/docs/V7EndpointLabelsPostRequest.md similarity index 80% rename from endpoint/labels_api/docs/V7EndpointLabelsPostRequest.md rename to endpoint_labels/docs/V7EndpointLabelsPostRequest.md index cee86031..fb0c6ecd 100644 --- a/endpoint/labels_api/docs/V7EndpointLabelsPostRequest.md +++ b/endpoint_labels/docs/V7EndpointLabelsPostRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Label identifier. | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest +from endpoint_labels.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest # TODO update the JSON string below json = "{}" # create an instance of V7EndpointLabelsPostRequest from a JSON string v7_endpoint_labels_post_request_instance = V7EndpointLabelsPostRequest.from_json(json) # print the JSON string representation of the object -print V7EndpointLabelsPostRequest.to_json() +print(V7EndpointLabelsPostRequest.to_json()) # convert the object into a dict v7_endpoint_labels_post_request_dict = v7_endpoint_labels_post_request_instance.to_dict() # create an instance of V7EndpointLabelsPostRequest from a dict -v7_endpoint_labels_post_request_form_dict = v7_endpoint_labels_post_request.from_dict(v7_endpoint_labels_post_request_dict) +v7_endpoint_labels_post_request_from_dict = V7EndpointLabelsPostRequest.from_dict(v7_endpoint_labels_post_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/endpoint_labels/docs/ValidationError.md b/endpoint_labels/docs/ValidationError.md new file mode 100644 index 00000000..210312a7 --- /dev/null +++ b/endpoint_labels/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from endpoint_labels.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/endpoint_labels/docs/ValidationErrorAllOfErrors.md b/endpoint_labels/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..ba713c7e --- /dev/null +++ b/endpoint_labels/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from endpoint_labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/endpoint_labels/endpoint_labels/__init__.py b/endpoint_labels/endpoint_labels/__init__.py new file mode 100644 index 00000000..291de3c8 --- /dev/null +++ b/endpoint_labels/endpoint_labels/__init__.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.api.manage_labels_api import ManageLabelsApi + +# import ApiClient +from endpoint_labels.api_response import ApiResponse +from endpoint_labels.api_client import ApiClient +from endpoint_labels.configuration import Configuration +from endpoint_labels.exceptions import OpenApiException +from endpoint_labels.exceptions import ApiTypeError +from endpoint_labels.exceptions import ApiValueError +from endpoint_labels.exceptions import ApiKeyError +from endpoint_labels.exceptions import ApiAttributeError +from endpoint_labels.exceptions import ApiException + +# import models into sdk package +from endpoint_labels.models.endpoint_labels_list200_response import EndpointLabelsList200Response +from endpoint_labels.models.error import Error +from endpoint_labels.models.expand import Expand +from endpoint_labels.models.filter import Filter +from endpoint_labels.models.filter_type import FilterType +from endpoint_labels.models.label import Label +from endpoint_labels.models.label_filter_mode import LabelFilterMode +from endpoint_labels.models.labels import Labels +from endpoint_labels.models.labels_labels_inner import LabelsLabelsInner +from endpoint_labels.models.link import Link +from endpoint_labels.models.match_type import MatchType +from endpoint_labels.models.pagination_next_and_self_link import PaginationNextAndSelfLink +from endpoint_labels.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_labels.models.self_links import SelfLinks +from endpoint_labels.models.self_links_links import SelfLinksLinks +from endpoint_labels.models.unauthorized_error import UnauthorizedError +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from endpoint_labels.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest +from endpoint_labels.models.validation_error import ValidationError +from endpoint_labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/endpoint_labels/endpoint_labels/api/__init__.py b/endpoint_labels/endpoint_labels/api/__init__.py new file mode 100644 index 00000000..2c4db5e9 --- /dev/null +++ b/endpoint_labels/endpoint_labels/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from endpoint_labels.api.manage_labels_api import ManageLabelsApi + diff --git a/endpoint/labels_api/labels_api/api/manage_labels_api.py b/endpoint_labels/endpoint_labels/api/manage_labels_api.py similarity index 80% rename from endpoint/labels_api/labels_api/api/manage_labels_api.py rename to endpoint_labels/endpoint_labels/api/manage_labels_api.py index 168895d8..a933dae2 100644 --- a/endpoint/labels_api/labels_api/api/manage_labels_api.py +++ b/endpoint_labels/endpoint_labels/api/manage_labels_api.py @@ -5,39 +5,29 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictFloat, StrictInt, StrictStr +from pydantic import Field, StrictFloat, StrictInt, StrictStr from typing import List, Optional, Union +from typing_extensions import Annotated +from endpoint_labels.models.endpoint_labels_list200_response import EndpointLabelsList200Response +from endpoint_labels.models.expand import Expand +from endpoint_labels.models.label import Label +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from endpoint_labels.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest -from labels_api.models.endpoint_labels_list200_response import EndpointLabelsList200Response -from labels_api.models.expand import Expand -from labels_api.models.label import Label -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response -from labels_api.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest - -from labels_api.api_client import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.rest import RESTResponseType +from endpoint_labels.api_client import ApiClient, RequestSerialized +from endpoint_labels.api_response import ApiResponse +from endpoint_labels.rest import RESTResponseType class ManageLabelsApi: @@ -57,6 +47,7 @@ class ManageLabelsApi: def endpoint_label_delete( 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, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -70,12 +61,14 @@ class ManageLabelsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Deletes label + """Delete label Deletes the label from your account. :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 _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 @@ -100,6 +93,7 @@ class ManageLabelsApi: _param = self._endpoint_label_delete_serialize( id=id, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -107,7 +101,11 @@ class ManageLabelsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -124,6 +122,7 @@ class ManageLabelsApi: def endpoint_label_delete_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, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -137,12 +136,14 @@ class ManageLabelsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Deletes label + """Delete label Deletes the label from your account. :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 _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 @@ -167,6 +168,7 @@ class ManageLabelsApi: _param = self._endpoint_label_delete_serialize( id=id, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -174,7 +176,11 @@ class ManageLabelsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -191,6 +197,7 @@ class ManageLabelsApi: def endpoint_label_delete_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, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -204,12 +211,14 @@ class ManageLabelsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Deletes label + """Delete label Deletes the label from your account. :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 _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 @@ -234,6 +243,7 @@ class ManageLabelsApi: _param = self._endpoint_label_delete_serialize( id=id, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -241,7 +251,11 @@ class ManageLabelsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -253,29 +267,33 @@ class ManageLabelsApi: def _endpoint_label_delete_serialize( self, id, + aid, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 @@ -284,7 +302,6 @@ class ManageLabelsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -318,6 +335,7 @@ class ManageLabelsApi: 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, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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)], @@ -339,6 +357,8 @@ class ManageLabelsApi: :type id: 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. :type expand: List[Expand] + :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 @@ -364,6 +384,7 @@ class ManageLabelsApi: _param = self._endpoint_label_get_serialize( id=id, expand=expand, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -375,8 +396,7 @@ class ManageLabelsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -394,6 +414,7 @@ class ManageLabelsApi: 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, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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)], @@ -415,6 +436,8 @@ class ManageLabelsApi: :type id: 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. :type expand: List[Expand] + :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 @@ -440,6 +463,7 @@ class ManageLabelsApi: _param = self._endpoint_label_get_serialize( id=id, expand=expand, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -451,8 +475,7 @@ class ManageLabelsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -470,6 +493,7 @@ class ManageLabelsApi: 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, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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)], @@ -491,6 +515,8 @@ class ManageLabelsApi: :type id: 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. :type expand: List[Expand] + :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 @@ -516,6 +542,7 @@ class ManageLabelsApi: _param = self._endpoint_label_get_serialize( id=id, expand=expand, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -527,8 +554,7 @@ class ManageLabelsApi: '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -541,16 +567,16 @@ class ManageLabelsApi: self, id, expand, + aid, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -558,7 +584,7 @@ class ManageLabelsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -569,6 +595,10 @@ class ManageLabelsApi: _query_params.append(('expand', expand)) + if aid is not None: + + _query_params.append(('aid', aid)) + # process the header parameters # process the form parameters # process the body parameter @@ -610,6 +640,7 @@ class ManageLabelsApi: def endpoint_label_update( 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, @@ -630,6 +661,8 @@ class ManageLabelsApi: :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 @@ -656,6 +689,7 @@ class ManageLabelsApi: _param = self._endpoint_label_update_serialize( id=id, + aid=aid, label=label, _request_auth=_request_auth, _content_type=_content_type, @@ -665,11 +699,11 @@ class ManageLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "V7EndpointLabelsPost201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -686,6 +720,7 @@ class ManageLabelsApi: 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, @@ -706,6 +741,8 @@ class ManageLabelsApi: :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 @@ -732,6 +769,7 @@ class ManageLabelsApi: _param = self._endpoint_label_update_serialize( id=id, + aid=aid, label=label, _request_auth=_request_auth, _content_type=_content_type, @@ -741,11 +779,11 @@ class ManageLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "V7EndpointLabelsPost201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -762,6 +800,7 @@ class ManageLabelsApi: 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, @@ -782,6 +821,8 @@ class ManageLabelsApi: :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 @@ -808,6 +849,7 @@ class ManageLabelsApi: _param = self._endpoint_label_update_serialize( id=id, + aid=aid, label=label, _request_auth=_request_auth, _content_type=_content_type, @@ -817,11 +859,11 @@ class ManageLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "V7EndpointLabelsPost201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -833,30 +875,34 @@ class ManageLabelsApi: def _endpoint_label_update_serialize( self, id, + aid, label, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 @@ -913,8 +959,9 @@ class ManageLabelsApi: def endpoint_labels_list( self, 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 `_links` instead of this parameter.")] = 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, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -930,13 +977,16 @@ class ManageLabelsApi: ) -> EndpointLabelsList200Response: """List labels + Returns a list of labels. :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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. :type expand: List[Expand] + :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 @@ -963,6 +1013,7 @@ class ManageLabelsApi: max=max, cursor=cursor, expand=expand, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -973,8 +1024,7 @@ class ManageLabelsApi: '200': "EndpointLabelsList200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -991,8 +1041,9 @@ class ManageLabelsApi: def endpoint_labels_list_with_http_info( self, 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 `_links` instead of this parameter.")] = 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, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1008,13 +1059,16 @@ class ManageLabelsApi: ) -> ApiResponse[EndpointLabelsList200Response]: """List labels + Returns a list of labels. :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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. :type expand: List[Expand] + :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 @@ -1041,6 +1095,7 @@ class ManageLabelsApi: max=max, cursor=cursor, expand=expand, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1051,8 +1106,7 @@ class ManageLabelsApi: '200': "EndpointLabelsList200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1069,8 +1123,9 @@ class ManageLabelsApi: def endpoint_labels_list_without_preload_content( self, 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 `_links` instead of this parameter.")] = 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, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1086,13 +1141,16 @@ class ManageLabelsApi: ) -> RESTResponseType: """List labels + Returns a list of labels. :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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. :type expand: List[Expand] + :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 @@ -1119,6 +1177,7 @@ class ManageLabelsApi: max=max, cursor=cursor, expand=expand, + aid=aid, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1129,8 +1188,7 @@ class ManageLabelsApi: '200': "EndpointLabelsList200Response", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1144,16 +1202,16 @@ class ManageLabelsApi: max, cursor, expand, + aid, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1161,7 +1219,7 @@ class ManageLabelsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1178,6 +1236,10 @@ class ManageLabelsApi: _query_params.append(('expand', expand)) + if aid is not None: + + _query_params.append(('aid', aid)) + # process the header parameters # process the form parameters # process the body parameter @@ -1218,6 +1280,7 @@ class ManageLabelsApi: @validate_call def v7_endpoint_labels_post( 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, v7_endpoint_labels_post_request: Annotated[Optional[V7EndpointLabelsPostRequest], Field(description="Label settings")] = None, _request_timeout: Union[ None, @@ -1234,7 +1297,10 @@ class ManageLabelsApi: ) -> V7EndpointLabelsPost201Response: """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 v7_endpoint_labels_post_request: Label settings :type v7_endpoint_labels_post_request: V7EndpointLabelsPostRequest :param _request_timeout: timeout setting for this request. If one @@ -1260,6 +1326,7 @@ class ManageLabelsApi: """ # noqa: E501 _param = self._v7_endpoint_labels_post_serialize( + aid=aid, v7_endpoint_labels_post_request=v7_endpoint_labels_post_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1269,10 +1336,10 @@ class ManageLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "V7EndpointLabelsPost201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1288,6 +1355,7 @@ class ManageLabelsApi: @validate_call def v7_endpoint_labels_post_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, v7_endpoint_labels_post_request: Annotated[Optional[V7EndpointLabelsPostRequest], Field(description="Label settings")] = None, _request_timeout: Union[ None, @@ -1304,7 +1372,10 @@ class ManageLabelsApi: ) -> ApiResponse[V7EndpointLabelsPost201Response]: """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 v7_endpoint_labels_post_request: Label settings :type v7_endpoint_labels_post_request: V7EndpointLabelsPostRequest :param _request_timeout: timeout setting for this request. If one @@ -1330,6 +1401,7 @@ class ManageLabelsApi: """ # noqa: E501 _param = self._v7_endpoint_labels_post_serialize( + aid=aid, v7_endpoint_labels_post_request=v7_endpoint_labels_post_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1339,10 +1411,10 @@ class ManageLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "V7EndpointLabelsPost201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1358,6 +1430,7 @@ class ManageLabelsApi: @validate_call def v7_endpoint_labels_post_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, v7_endpoint_labels_post_request: Annotated[Optional[V7EndpointLabelsPostRequest], Field(description="Label settings")] = None, _request_timeout: Union[ None, @@ -1374,7 +1447,10 @@ class ManageLabelsApi: ) -> 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 v7_endpoint_labels_post_request: Label settings :type v7_endpoint_labels_post_request: V7EndpointLabelsPostRequest :param _request_timeout: timeout setting for this request. If one @@ -1400,6 +1476,7 @@ class ManageLabelsApi: """ # noqa: E501 _param = self._v7_endpoint_labels_post_serialize( + aid=aid, v7_endpoint_labels_post_request=v7_endpoint_labels_post_request, _request_auth=_request_auth, _content_type=_content_type, @@ -1409,10 +1486,10 @@ class ManageLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "V7EndpointLabelsPost201Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", - '429': "Error" - + '429': "Error", } response_data = self.api_client.call_api( *_param, @@ -1423,28 +1500,32 @@ class ManageLabelsApi: def _v7_endpoint_labels_post_serialize( self, + aid, v7_endpoint_labels_post_request, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 diff --git a/endpoint_labels/endpoint_labels/api_client.py b/endpoint_labels/endpoint_labels/api_client.py new file mode 100644 index 00000000..9c9a9128 --- /dev/null +++ b/endpoint_labels/endpoint_labels/api_client.py @@ -0,0 +1,770 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from endpoint_labels.configuration import Configuration +from endpoint_labels.api_response import ApiResponse, T as ApiResponseT +import endpoint_labels.models +from endpoint_labels import rest +from endpoint_labels.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(endpoint_labels.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/endpoint_labels/endpoint_labels/api_response.py b/endpoint_labels/endpoint_labels/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/endpoint_labels/endpoint_labels/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/endpoint_labels/endpoint_labels/configuration.py b/endpoint_labels/endpoint_labels/configuration.py new file mode 100644 index 00000000..ca6f02ce --- /dev/null +++ b/endpoint_labels/endpoint_labels/configuration.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("endpoint_labels") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/endpoint_labels/endpoint_labels/exceptions.py b/endpoint_labels/endpoint_labels/exceptions.py new file mode 100644 index 00000000..3e41405f --- /dev/null +++ b/endpoint_labels/endpoint_labels/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/endpoint_labels/endpoint_labels/models/__init__.py b/endpoint_labels/endpoint_labels/models/__init__.py new file mode 100644 index 00000000..6fb5e622 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/__init__.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +# flake8: noqa +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from endpoint_labels.models.endpoint_labels_list200_response import EndpointLabelsList200Response +from endpoint_labels.models.error import Error +from endpoint_labels.models.expand import Expand +from endpoint_labels.models.filter import Filter +from endpoint_labels.models.filter_type import FilterType +from endpoint_labels.models.label import Label +from endpoint_labels.models.label_filter_mode import LabelFilterMode +from endpoint_labels.models.labels import Labels +from endpoint_labels.models.labels_labels_inner import LabelsLabelsInner +from endpoint_labels.models.link import Link +from endpoint_labels.models.match_type import MatchType +from endpoint_labels.models.pagination_next_and_self_link import PaginationNextAndSelfLink +from endpoint_labels.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_labels.models.self_links import SelfLinks +from endpoint_labels.models.self_links_links import SelfLinksLinks +from endpoint_labels.models.unauthorized_error import UnauthorizedError +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from endpoint_labels.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest +from endpoint_labels.models.validation_error import ValidationError +from endpoint_labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/endpoint_labels/endpoint_labels/models/endpoint_labels_list200_response.py b/endpoint_labels/endpoint_labels/models/endpoint_labels_list200_response.py new file mode 100644 index 00000000..b1f80779 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/endpoint_labels_list200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.labels_labels_inner import LabelsLabelsInner +from endpoint_labels.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class EndpointLabelsList200Response(BaseModel): + """ + EndpointLabelsList200Response + """ # noqa: E501 + labels: Optional[List[LabelsLabelsInner]] = None + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["labels", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointLabelsList200Response 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _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 EndpointLabelsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": [LabelsLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_labels/endpoint_labels/models/error.py b/endpoint_labels/endpoint_labels/models/error.py new file mode 100644 index 00000000..03a58c0a --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_labels/endpoint_labels/models/expand.py b/endpoint_labels/endpoint_labels/models/expand.py new file mode 100644 index 00000000..3614d5d5 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/expand.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 + """ + FILTERS = 'filters' + + @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/endpoint/labels_api/labels_api/models/filter.py b/endpoint_labels/endpoint_labels/models/filter.py similarity index 76% rename from endpoint/labels_api/labels_api/models/filter.py rename to endpoint_labels/endpoint_labels/models/filter.py index 4a903a32..1c91eee8 100644 --- a/endpoint/labels_api/labels_api/models/filter.py +++ b/endpoint_labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from labels_api.models.filter_type import FilterType -from labels_api.models.label_filter_mode import LabelFilterMode -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_labels.models.filter_type import FilterType +from endpoint_labels.models.label_filter_mode import LabelFilterMode +from typing import Optional, Set +from typing_extensions import Self class Filter(BaseModel): """ @@ -36,10 +33,11 @@ class Filter(BaseModel): mode: Optional[LabelFilterMode] = None __properties: ClassVar[List[str]] = ["key", "values", "mode"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +50,7 @@ class Filter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Filter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,16 +64,18 @@ class Filter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Filter from a dict""" if obj is None: return None diff --git a/endpoint/labels_api/labels_api/models/filter_type.py b/endpoint_labels/endpoint_labels/models/filter_type.py similarity index 83% rename from endpoint/labels_api/labels_api/models/filter_type.py rename to endpoint_labels/endpoint_labels/models/filter_type.py index edc5a932..ccc0f8e7 100644 --- a/endpoint/labels_api/labels_api/models/filter_type.py +++ b/endpoint_labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,21 +14,13 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class FilterType(str, Enum): """ - Type of filter - the data that will be used to filter. + Type of filter - the data that will be used to filter. """ """ diff --git a/endpoint_labels/endpoint_labels/models/label.py b/endpoint_labels/endpoint_labels/models/label.py new file mode 100644 index 00000000..c85c6f8a --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/label.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.filter import Filter +from endpoint_labels.models.match_type import MatchType +from typing import Optional, Set +from typing_extensions import Self + +class Label(BaseModel): + """ + A label definition. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Label identifier.") + name: Optional[StrictStr] = Field(default=None, description="The label name.") + color: Optional[StrictStr] = Field(default=None, description="UI color") + match_type: Optional[MatchType] = Field(default=None, alias="matchType") + filters: Optional[List[Filter]] = Field(default=None, description="The filters combined using the matchType to determine the label's match.") + __properties: ClassVar[List[str]] = ["id", "name", "color", "matchType", "filters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Label 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([ + "id", + ]) + + _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 filters (list) + _items = [] + if self.filters: + for _item in self.filters: + if _item: + _items.append(_item.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Label 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"), + "name": obj.get("name"), + "color": obj.get("color"), + "matchType": obj.get("matchType"), + "filters": [Filter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/endpoint/labels_api/labels_api/models/label_filter_mode.py b/endpoint_labels/endpoint_labels/models/label_filter_mode.py similarity index 82% rename from endpoint/labels_api/labels_api/models/label_filter_mode.py rename to endpoint_labels/endpoint_labels/models/label_filter_mode.py index 2b8bcdee..3864c033 100644 --- a/endpoint/labels_api/labels_api/models/label_filter_mode.py +++ b/endpoint_labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class LabelFilterMode(str, Enum): diff --git a/endpoint_labels/endpoint_labels/models/labels.py b/endpoint_labels/endpoint_labels/models/labels.py new file mode 100644 index 00000000..35951261 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/labels.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_labels.models.labels_labels_inner import LabelsLabelsInner +from typing import Optional, Set +from typing_extensions import Self + +class Labels(BaseModel): + """ + A list of Labels. + """ # noqa: E501 + labels: Optional[List[LabelsLabelsInner]] = None + __properties: ClassVar[List[str]] = ["labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Labels 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Labels from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": [LabelsLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint/labels_api/labels_api/models/labels_labels_inner.py b/endpoint_labels/endpoint_labels/models/labels_labels_inner.py similarity index 78% rename from endpoint/labels_api/labels_api/models/labels_labels_inner.py rename to endpoint_labels/endpoint_labels/models/labels_labels_inner.py index a0106742..9a4956d1 100644 --- a/endpoint/labels_api/labels_api/models/labels_labels_inner.py +++ b/endpoint_labels/endpoint_labels/models/labels_labels_inner.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from labels_api.models.filter import Filter -from labels_api.models.match_type import MatchType -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_labels.models.filter import Filter +from endpoint_labels.models.match_type import MatchType +from endpoint_labels.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class LabelsLabelsInner(BaseModel): """ @@ -41,10 +37,11 @@ class LabelsLabelsInner(BaseModel): filters: Optional[List[Filter]] = Field(default=None, description="The filters combined using the matchType to determine the label's match.") __properties: ClassVar[List[str]] = ["_links", "id", "name", "color", "matchType", "filters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ class LabelsLabelsInner(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LabelsLabelsInner from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,11 +69,13 @@ class LabelsLabelsInner(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -92,7 +91,7 @@ class LabelsLabelsInner(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LabelsLabelsInner from a dict""" if obj is None: return None @@ -101,12 +100,12 @@ class LabelsLabelsInner(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "id": obj.get("id"), "name": obj.get("name"), "color": obj.get("color"), "matchType": obj.get("matchType"), - "filters": [Filter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None + "filters": [Filter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None }) return _obj diff --git a/endpoint_labels/endpoint_labels/models/link.py b/endpoint_labels/endpoint_labels/models/link.py new file mode 100644 index 00000000..850efd85 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint/labels_api/labels_api/models/match_type.py b/endpoint_labels/endpoint_labels/models/match_type.py similarity index 80% rename from endpoint/labels_api/labels_api/models/match_type.py rename to endpoint_labels/endpoint_labels/models/match_type.py index 711112ae..4ade9bd9 100644 --- a/endpoint/labels_api/labels_api/models/match_type.py +++ b/endpoint_labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class MatchType(str, Enum): diff --git a/endpoint_labels/endpoint_labels/models/pagination_next_and_self_link.py b/endpoint_labels/endpoint_labels/models/pagination_next_and_self_link.py new file mode 100644 index 00000000..7e087916 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/pagination_next_and_self_link.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextAndSelfLink(BaseModel): + """ + A links object containing a related link for forward pagination. + """ # noqa: E501 + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextAndSelfLink 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 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 PaginationNextAndSelfLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_labels/endpoint_labels/models/pagination_next_and_self_link_links.py b/endpoint_labels/endpoint_labels/models/pagination_next_and_self_link_links.py new file mode 100644 index 00000000..de25ccaf --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/pagination_next_and_self_link_links.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextAndSelfLinkLinks(BaseModel): + """ + PaginationNextAndSelfLinkLinks + """ # noqa: E501 + next: Optional[Link] = None + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["next", "self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextAndSelfLinkLinks 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 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 PaginationNextAndSelfLinkLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "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/endpoint_labels/endpoint_labels/models/self_links.py b/endpoint_labels/endpoint_labels/models/self_links.py new file mode 100644 index 00000000..1f88af6b --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_labels/endpoint_labels/models/self_links_links.py b/endpoint_labels/endpoint_labels/models/self_links_links.py new file mode 100644 index 00000000..e578db61 --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/self_links_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/endpoint_labels/endpoint_labels/models/unauthorized_error.py b/endpoint_labels/endpoint_labels/models/unauthorized_error.py new file mode 100644 index 00000000..2f317a2a --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint/labels_api/labels_api/models/v7_endpoint_labels_post201_response.py b/endpoint_labels/endpoint_labels/models/v7_endpoint_labels_post201_response.py similarity index 78% rename from endpoint/labels_api/labels_api/models/v7_endpoint_labels_post201_response.py rename to endpoint_labels/endpoint_labels/models/v7_endpoint_labels_post201_response.py index 41a124a9..7df29d17 100644 --- a/endpoint/labels_api/labels_api/models/v7_endpoint_labels_post201_response.py +++ b/endpoint_labels/endpoint_labels/models/v7_endpoint_labels_post201_response.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from labels_api.models.filter import Filter -from labels_api.models.match_type import MatchType -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_labels.models.filter import Filter +from endpoint_labels.models.match_type import MatchType +from endpoint_labels.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class V7EndpointLabelsPost201Response(BaseModel): """ @@ -41,10 +37,11 @@ class V7EndpointLabelsPost201Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["id", "name", "color", "matchType", "filters", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ class V7EndpointLabelsPost201Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V7EndpointLabelsPost201Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,11 +69,13 @@ class V7EndpointLabelsPost201Response(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in filters (list) @@ -92,7 +91,7 @@ class V7EndpointLabelsPost201Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V7EndpointLabelsPost201Response from a dict""" if obj is None: return None @@ -105,8 +104,8 @@ class V7EndpointLabelsPost201Response(BaseModel): "name": obj.get("name"), "color": obj.get("color"), "matchType": obj.get("matchType"), - "filters": [Filter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "filters": [Filter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/labels_api/labels_api/models/v7_endpoint_labels_post_request.py b/endpoint_labels/endpoint_labels/models/v7_endpoint_labels_post_request.py similarity index 80% rename from endpoint/labels_api/labels_api/models/v7_endpoint_labels_post_request.py rename to endpoint_labels/endpoint_labels/models/v7_endpoint_labels_post_request.py index c328ef51..2381c0c9 100644 --- a/endpoint/labels_api/labels_api/models/v7_endpoint_labels_post_request.py +++ b/endpoint_labels/endpoint_labels/models/v7_endpoint_labels_post_request.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from labels_api.models.filter import Filter -from labels_api.models.match_type import MatchType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_labels.models.filter import Filter +from endpoint_labels.models.match_type import MatchType +from typing import Optional, Set +from typing_extensions import Self class V7EndpointLabelsPostRequest(BaseModel): """ @@ -39,10 +35,11 @@ class V7EndpointLabelsPostRequest(BaseModel): filters: List[Filter] = Field(description="The filters combined using the matchType to determine the label's match.") __properties: ClassVar[List[str]] = ["id", "name", "color", "matchType", "filters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class V7EndpointLabelsPostRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of V7EndpointLabelsPostRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +67,13 @@ class V7EndpointLabelsPostRequest(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in filters (list) @@ -87,7 +86,7 @@ class V7EndpointLabelsPostRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of V7EndpointLabelsPostRequest from a dict""" if obj is None: return None @@ -100,7 +99,7 @@ class V7EndpointLabelsPostRequest(BaseModel): "name": obj.get("name"), "color": obj.get("color"), "matchType": obj.get("matchType"), - "filters": [Filter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None + "filters": [Filter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None }) return _obj diff --git a/endpoint_labels/endpoint_labels/models/validation_error.py b/endpoint_labels/endpoint_labels/models/validation_error.py new file mode 100644 index 00000000..f42fdc6c --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/endpoint_labels/endpoint_labels/models/validation_error_all_of_errors.py b/endpoint_labels/endpoint_labels/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..a03165de --- /dev/null +++ b/endpoint_labels/endpoint_labels/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/endpoint/labels_api/labels_api/py.typed b/endpoint_labels/endpoint_labels/py.typed similarity index 100% rename from endpoint/labels_api/labels_api/py.typed rename to endpoint_labels/endpoint_labels/py.typed diff --git a/endpoint_labels/endpoint_labels/rest.py b/endpoint_labels/endpoint_labels/rest.py new file mode 100644 index 00000000..8beedd9c --- /dev/null +++ b/endpoint_labels/endpoint_labels/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from endpoint_labels.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/endpoint_labels/pyproject.toml b/endpoint_labels/pyproject.toml new file mode 100644 index 00000000..cd41654c --- /dev/null +++ b/endpoint_labels/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "endpoint_labels" +version = "1.0.0" +description = "Endpoint Agent Labels API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Agent Labels API"] +include = ["endpoint_labels/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "endpoint_labels", + #"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/endpoint/labels_api/requirements.txt b/endpoint_labels/requirements.txt similarity index 100% rename from endpoint/labels_api/requirements.txt rename to endpoint_labels/requirements.txt diff --git a/endpoint/labels_api/setup.cfg b/endpoint_labels/setup.cfg similarity index 100% rename from endpoint/labels_api/setup.cfg rename to endpoint_labels/setup.cfg diff --git a/endpoint_labels/setup.py b/endpoint_labels/setup.py new file mode 100644 index 00000000..c566f518 --- /dev/null +++ b/endpoint_labels/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "endpoint-labels" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Endpoint Agent Labels API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/endpoint_labels", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Endpoint Agent Labels API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + Manage labels applied to endpoint agents using this API. + """, # noqa: E501 + package_data={"endpoint_labels": ["py.typed"]}, +) diff --git a/endpoint_labels/test-requirements.txt b/endpoint_labels/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/endpoint_labels/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/endpoint/labels_api/test/__init__.py b/endpoint_labels/test/__init__.py similarity index 100% rename from endpoint/labels_api/test/__init__.py rename to endpoint_labels/test/__init__.py diff --git a/endpoint_labels/test/test_endpoint_labels_list200_response.py b/endpoint_labels/test/test_endpoint_labels_list200_response.py new file mode 100644 index 00000000..479813fc --- /dev/null +++ b/endpoint_labels/test/test_endpoint_labels_list200_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.endpoint_labels_list200_response import EndpointLabelsList200Response + +class TestEndpointLabelsList200Response(unittest.TestCase): + """EndpointLabelsList200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointLabelsList200Response: + """Test EndpointLabelsList200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointLabelsList200Response` + """ + model = EndpointLabelsList200Response() + if include_optional: + return EndpointLabelsList200Response( + labels = [ + null + ], + links = endpoint_labels.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return EndpointLabelsList200Response( + ) + """ + + def testEndpointLabelsList200Response(self): + """Test EndpointLabelsList200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_error.py b/endpoint_labels/test/test_error.py new file mode 100644 index 00000000..685c4005 --- /dev/null +++ b/endpoint_labels/test/test_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_expand.py b/endpoint_labels/test/test_expand.py new file mode 100644 index 00000000..f3493380 --- /dev/null +++ b/endpoint_labels/test/test_expand.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/labels_api/test/test_filter.py b/endpoint_labels/test/test_filter.py similarity index 92% rename from endpoint/labels_api/test/test_filter.py rename to endpoint_labels/test/test_filter.py index 3283424b..237fd0a5 100644 --- a/endpoint/labels_api/test/test_filter.py +++ b/endpoint_labels/test/test_filter.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.filter import Filter +from endpoint_labels.models.filter import Filter class TestFilter(unittest.TestCase): """Filter unit test stubs""" diff --git a/endpoint/labels_api/test/test_filter_type.py b/endpoint_labels/test/test_filter_type.py similarity index 82% rename from endpoint/labels_api/test/test_filter_type.py rename to endpoint_labels/test/test_filter_type.py index 6d240f55..1694a8ac 100644 --- a/endpoint/labels_api/test/test_filter_type.py +++ b/endpoint_labels/test/test_filter_type.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.filter_type import FilterType +from endpoint_labels.models.filter_type import FilterType class TestFilterType(unittest.TestCase): """FilterType unit test stubs""" diff --git a/endpoint_labels/test/test_label.py b/endpoint_labels/test/test_label.py new file mode 100644 index 00000000..87f4630c --- /dev/null +++ b/endpoint_labels/test/test_label.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.label import Label + +class TestLabel(unittest.TestCase): + """Label unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Label: + """Test Label + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Label` + """ + model = Label() + if include_optional: + return Label( + id = 'abc-123-def', + name = 'Head office meeting rooms', + color = '#ff3333', + match_type = 'and', + filters = [ + endpoint_labels.models.filter.Filter( + key = 'vpn-client-network', + values = ["10.1.1.0/24","192.168.1.0/24"], + mode = 'in', ) + ] + ) + else: + return Label( + ) + """ + + def testLabel(self): + """Test Label""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/labels_api/test/test_label_filter_mode.py b/endpoint_labels/test/test_label_filter_mode.py similarity index 81% rename from endpoint/labels_api/test/test_label_filter_mode.py rename to endpoint_labels/test/test_label_filter_mode.py index df4966be..b6f40809 100644 --- a/endpoint/labels_api/test/test_label_filter_mode.py +++ b/endpoint_labels/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.label_filter_mode import LabelFilterMode +from endpoint_labels.models.label_filter_mode import LabelFilterMode class TestLabelFilterMode(unittest.TestCase): """LabelFilterMode unit test stubs""" diff --git a/endpoint_labels/test/test_labels.py b/endpoint_labels/test/test_labels.py new file mode 100644 index 00000000..9ee57607 --- /dev/null +++ b/endpoint_labels/test/test_labels.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.labels import Labels + +class TestLabels(unittest.TestCase): + """Labels unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Labels: + """Test Labels + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Labels` + """ + model = Labels() + if include_optional: + return Labels( + labels = [ + null + ] + ) + else: + return Labels( + ) + """ + + def testLabels(self): + """Test Labels""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/labels_api/test/test_labels_labels_inner.py b/endpoint_labels/test/test_labels_labels_inner.py similarity index 85% rename from endpoint/labels_api/test/test_labels_labels_inner.py rename to endpoint_labels/test/test_labels_labels_inner.py index 707f5ab0..69ffdd1b 100644 --- a/endpoint/labels_api/test/test_labels_labels_inner.py +++ b/endpoint_labels/test/test_labels_labels_inner.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.labels_labels_inner import LabelsLabelsInner +from endpoint_labels.models.labels_labels_inner import LabelsLabelsInner class TestLabelsLabelsInner(unittest.TestCase): """LabelsLabelsInner unit test stubs""" @@ -36,8 +35,8 @@ class TestLabelsLabelsInner(unittest.TestCase): model = LabelsLabelsInner() if include_optional: return LabelsLabelsInner( - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( + links = endpoint_labels.models.self_links__links.SelfLinks__links( + self = endpoint_labels.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', @@ -51,7 +50,7 @@ class TestLabelsLabelsInner(unittest.TestCase): color = '#ff3333', match_type = 'and', filters = [ - labels_api.models.filter.Filter( + endpoint_labels.models.filter.Filter( key = 'vpn-client-network', values = ["10.1.1.0/24","192.168.1.0/24"], mode = 'in', ) diff --git a/endpoint_labels/test/test_link.py b/endpoint_labels/test/test_link.py new file mode 100644 index 00000000..57e16883 --- /dev/null +++ b/endpoint_labels/test/test_link.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/labels_api/test/test_match_type.py b/endpoint_labels/test/test_match_type.py similarity index 82% rename from endpoint/labels_api/test/test_match_type.py rename to endpoint_labels/test/test_match_type.py index 825de7bd..32ee4ce3 100644 --- a/endpoint/labels_api/test/test_match_type.py +++ b/endpoint_labels/test/test_match_type.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.match_type import MatchType +from endpoint_labels.models.match_type import MatchType class TestMatchType(unittest.TestCase): """MatchType unit test stubs""" diff --git a/endpoint_labels/test/test_pagination_next_and_self_link.py b/endpoint_labels/test/test_pagination_next_and_self_link.py new file mode 100644 index 00000000..f655e0ea --- /dev/null +++ b/endpoint_labels/test/test_pagination_next_and_self_link.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.pagination_next_and_self_link import PaginationNextAndSelfLink + +class TestPaginationNextAndSelfLink(unittest.TestCase): + """PaginationNextAndSelfLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextAndSelfLink: + """Test PaginationNextAndSelfLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextAndSelfLink` + """ + model = PaginationNextAndSelfLink() + if include_optional: + return PaginationNextAndSelfLink( + links = endpoint_labels.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return PaginationNextAndSelfLink( + ) + """ + + def testPaginationNextAndSelfLink(self): + """Test PaginationNextAndSelfLink""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_pagination_next_and_self_link_links.py b/endpoint_labels/test/test_pagination_next_and_self_link_links.py new file mode 100644 index 00000000..ef6819a6 --- /dev/null +++ b/endpoint_labels/test/test_pagination_next_and_self_link_links.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks + +class TestPaginationNextAndSelfLinkLinks(unittest.TestCase): + """PaginationNextAndSelfLinkLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextAndSelfLinkLinks: + """Test PaginationNextAndSelfLinkLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextAndSelfLinkLinks` + """ + model = PaginationNextAndSelfLinkLinks() + if include_optional: + return PaginationNextAndSelfLinkLinks( + next = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationNextAndSelfLinkLinks( + ) + """ + + def testPaginationNextAndSelfLinkLinks(self): + """Test PaginationNextAndSelfLinkLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_self_links.py b/endpoint_labels/test/test_self_links.py new file mode 100644 index 00000000..1f68286b --- /dev/null +++ b/endpoint_labels/test/test_self_links.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = endpoint_labels.models.self_links__links.SelfLinks__links( + self = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_self_links_links.py b/endpoint_labels/test/test_self_links_links.py new file mode 100644 index 00000000..0c71cf14 --- /dev/null +++ b/endpoint_labels/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = endpoint_labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_unauthorized_error.py b/endpoint_labels/test/test_unauthorized_error.py new file mode 100644 index 00000000..efc5c6ce --- /dev/null +++ b/endpoint_labels/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/labels_api/test/test_v7_endpoint_labels_post201_response.py b/endpoint_labels/test/test_v7_endpoint_labels_post201_response.py similarity index 85% rename from endpoint/labels_api/test/test_v7_endpoint_labels_post201_response.py rename to endpoint_labels/test/test_v7_endpoint_labels_post201_response.py index 79807755..fef2e666 100644 --- a/endpoint/labels_api/test/test_v7_endpoint_labels_post201_response.py +++ b/endpoint_labels/test/test_v7_endpoint_labels_post201_response.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response +from endpoint_labels.models.v7_endpoint_labels_post201_response import V7EndpointLabelsPost201Response class TestV7EndpointLabelsPost201Response(unittest.TestCase): """V7EndpointLabelsPost201Response unit test stubs""" @@ -41,13 +40,13 @@ class TestV7EndpointLabelsPost201Response(unittest.TestCase): color = '#ff3333', match_type = 'and', filters = [ - labels_api.models.filter.Filter( + endpoint_labels.models.filter.Filter( key = 'vpn-client-network', values = ["10.1.1.0/24","192.168.1.0/24"], mode = 'in', ) ], - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( + links = endpoint_labels.models.self_links__links.SelfLinks__links( + self = endpoint_labels.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/labels_api/test/test_v7_endpoint_labels_post_request.py b/endpoint_labels/test/test_v7_endpoint_labels_post_request.py similarity index 88% rename from endpoint/labels_api/test/test_v7_endpoint_labels_post_request.py rename to endpoint_labels/test/test_v7_endpoint_labels_post_request.py index b23c3d6f..f07aeb08 100644 --- a/endpoint/labels_api/test/test_v7_endpoint_labels_post_request.py +++ b/endpoint_labels/test/test_v7_endpoint_labels_post_request.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest +from endpoint_labels.models.v7_endpoint_labels_post_request import V7EndpointLabelsPostRequest class TestV7EndpointLabelsPostRequest(unittest.TestCase): """V7EndpointLabelsPostRequest unit test stubs""" @@ -41,7 +40,7 @@ class TestV7EndpointLabelsPostRequest(unittest.TestCase): color = '#ff3333', match_type = 'and', filters = [ - labels_api.models.filter.Filter( + endpoint_labels.models.filter.Filter( key = 'vpn-client-network', values = ["10.1.1.0/24","192.168.1.0/24"], mode = 'in', ) @@ -52,7 +51,7 @@ class TestV7EndpointLabelsPostRequest(unittest.TestCase): name = 'Head office meeting rooms', match_type = 'and', filters = [ - labels_api.models.filter.Filter( + endpoint_labels.models.filter.Filter( key = 'vpn-client-network', values = ["10.1.1.0/24","192.168.1.0/24"], mode = 'in', ) diff --git a/endpoint_labels/test/test_validation_error.py b/endpoint_labels/test/test_validation_error.py new file mode 100644 index 00000000..70c72cbf --- /dev/null +++ b/endpoint_labels/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + endpoint_labels.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_labels/test/test_validation_error_all_of_errors.py b/endpoint_labels/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..8a903cee --- /dev/null +++ b/endpoint_labels/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/.gitignore b/endpoint_test_results/.gitignore similarity index 100% rename from endpoint/test_results_api/.gitignore rename to endpoint_test_results/.gitignore diff --git a/endpoint/test_results_api/.openapi-generator-ignore b/endpoint_test_results/.openapi-generator-ignore similarity index 100% rename from endpoint/test_results_api/.openapi-generator-ignore rename to endpoint_test_results/.openapi-generator-ignore diff --git a/endpoint_test_results/.openapi-generator/FILES b/endpoint_test_results/.openapi-generator/FILES new file mode 100644 index 00000000..995dd908 --- /dev/null +++ b/endpoint_test_results/.openapi-generator/FILES @@ -0,0 +1,475 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AccountGroupId.md +docs/AlertDirection.md +docs/AlertRoundsViolationMode.md +docs/AlertRule.md +docs/AlertType.md +docs/ApplicationScoreQuality.md +docs/AsnDetails.md +docs/ConditionalOperator.md +docs/CpuUtilization.md +docs/DynamicBaseTestResult.md +docs/DynamicBaseTestResultWebex.md +docs/DynamicTest.md +docs/DynamicTestLinks.md +docs/DynamicTestLinksSelf.md +docs/DynamicTestsDataRoundSearch.md +docs/DynamicTestsDataSearchFilter.md +docs/EndpointAgentLabelsSelectorConfig.md +docs/EndpointAgentSelectorConfig.md +docs/EndpointAgentToServerTest.md +docs/EndpointAllAgentsSelectorConfig.md +docs/EndpointBrowser.md +docs/EndpointHttpDataPointScore.md +docs/EndpointHttpServerBaseTest.md +docs/EndpointHttpServerTest.md +docs/EndpointNetworkTopologyResultRequestFilter.md +docs/EndpointPingDataPointScore.md +docs/EndpointRealUserTest.md +docs/EndpointRealUserTestBase.md +docs/EndpointRealUserTestDetail.md +docs/EndpointRealUserTestDetailResults.md +docs/EndpointRealUserTestResultRequestFilter.md +docs/EndpointRealUserTestResults.md +docs/EndpointResultRequestFilter.md +docs/EndpointScheduledTest.md +docs/EndpointScheduledTestType.md +docs/EndpointSpecificAgentsSelectorConfig.md +docs/EndpointTest.md +docs/EndpointTestAuthType.md +docs/EndpointTestLinks.md +docs/EndpointTestLinksSelf.md +docs/EndpointTestProtocol.md +docs/Error.md +docs/EthernetProfile.md +docs/Expand.md +docs/GetDynamicTestResultNetworkPathvis200Response.md +docs/GetDynamicTestResultPathvisAgentRound200Response.md +docs/GetEndpointLocalNetworkTopologyDetails200Response.md +docs/GetEndpointLocalNetworks200Response.md +docs/GetEndpointLocalNetworksTopologies200Response.md +docs/GetEndpointLocalNetworksTopologiesRequest.md +docs/GetEndpointRealUserTestDetails200Response.md +docs/GetEndpointRealUserTestPagesDetails200Response.md +docs/GetEndpointRealUserTests200Response.md +docs/GetEndpointRealUserTestsNetwork200Response.md +docs/GetEndpointRealUserTestsPages200Response.md +docs/GetEndpointRealUserTestsRequest.md +docs/GetTestResultHttpServer200Response.md +docs/GetTestResultNetworkPathvis200Response.md +docs/GetTestResultPathvisAgentRound200Response.md +docs/Hop.md +docs/HttpErrorType.md +docs/HttpTestResult.md +docs/HttpTestResultHeaders.md +docs/HttpTestResults.md +docs/InterfaceHardwareType.md +docs/Link.md +docs/LocalNetworkResult.md +docs/LocalNetworkResults.md +docs/LocalNetworkTestsResultsApi.md +docs/LocalNetworkTopologyDetailResults.md +docs/LocalNetworkTopologyResult.md +docs/LocalNetworkTopologyResultBase.md +docs/LocalNetworkTopologyResults.md +docs/MultiTestIdNetworkTestResults.md +docs/MultiTestIdTestsDataRoundsSearch.md +docs/MultiTestIdTestsDataSearchFilter.md +docs/NetworkDynamicTestResult.md +docs/NetworkDynamicTestResults.md +docs/NetworkDynamicTestsResultsApi.md +docs/NetworkInterface.md +docs/NetworkMetrics.md +docs/NetworkPing.md +docs/NetworkProfile.md +docs/NetworkProxyProfile.md +docs/NetworkProxyProfileProxiesInner.md +docs/NetworkScheduledTestsResultsApi.md +docs/NetworkTestResult.md +docs/NetworkTestResults.md +docs/NetworkTopologyType.md +docs/NetworkWirelessProfile.md +docs/PaginationNextAndSelfLink.md +docs/PaginationNextAndSelfLinkLinks.md +docs/PaginationNextLink.md +docs/PaginationNextLinkLinks.md +docs/PathVisBaseTestResult.md +docs/PathVisDetailDynamicTestResult.md +docs/PathVisDetailDynamicTestResults.md +docs/PathVisDetailTestResult.md +docs/PathVisDetailTestResults.md +docs/PathVisDynamicTestResult.md +docs/PathVisDynamicTestResults.md +docs/PathVisEndpoint.md +docs/PathVisHop.md +docs/PathVisRoute.md +docs/PathVisTestResult.md +docs/PathVisTestResults.md +docs/PhysicalMemoryUsedBytes.md +docs/Platform.md +docs/PostFetchDynamicTestResultMetrics200Response.md +docs/PostFetchTestResultMetrics200Response.md +docs/PostFetchTestResultMetricsMultiTest200Response.md +docs/QueryWindow.md +docs/RealUserTestCoordinates.md +docs/RealUserTestNetwork.md +docs/RealUserTestNetworkGatewayPing.md +docs/RealUserTestNetworkPing.md +docs/RealUserTestNetworkResult.md +docs/RealUserTestNetworkResults.md +docs/RealUserTestNetworkTraceroute.md +docs/RealUserTestNetworkVpnPing.md +docs/RealUserTestNetworkVpnTraceroute.md +docs/RealUserTestPage.md +docs/RealUserTestPagePageTimings.md +docs/RealUserTestPageResult.md +docs/RealUserTestPageResults.md +docs/RealUserTestsResultsApi.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/Severity.md +docs/SortOrder.md +docs/SystemMetrics.md +docs/TcpConnect.md +docs/TestInterval.md +docs/TestLabelsInner.md +docs/TestProbeModeResponse.md +docs/TestResult.md +docs/TestSslVersionId.md +docs/TestsDataRoundsSearch.md +docs/TestsDataSearchFilter.md +docs/TestsDataSearchSort.md +docs/TestsDataSearchSortKey.md +docs/TestsDataThresholdFilter.md +docs/TestsDataThresholdFilters.md +docs/ThresholdFilterName.md +docs/ThresholdFilterOperator.md +docs/Traceroute.md +docs/TracerouteHop.md +docs/Trigger.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/VpnProfile.md +docs/VpnType.md +docs/WebHTTPServerScheduledTestResultsApi.md +endpoint_test_results/__init__.py +endpoint_test_results/api/__init__.py +endpoint_test_results/api/local_network_tests_results_api.py +endpoint_test_results/api/network_dynamic_tests_results_api.py +endpoint_test_results/api/network_scheduled_tests_results_api.py +endpoint_test_results/api/real_user_tests_results_api.py +endpoint_test_results/api/web_http_server_scheduled_test_results_api.py +endpoint_test_results/api_client.py +endpoint_test_results/api_response.py +endpoint_test_results/configuration.py +endpoint_test_results/exceptions.py +endpoint_test_results/models/__init__.py +endpoint_test_results/models/account_group_id.py +endpoint_test_results/models/alert_direction.py +endpoint_test_results/models/alert_rounds_violation_mode.py +endpoint_test_results/models/alert_rule.py +endpoint_test_results/models/alert_type.py +endpoint_test_results/models/application_score_quality.py +endpoint_test_results/models/asn_details.py +endpoint_test_results/models/conditional_operator.py +endpoint_test_results/models/cpu_utilization.py +endpoint_test_results/models/dynamic_base_test_result.py +endpoint_test_results/models/dynamic_base_test_result_webex.py +endpoint_test_results/models/dynamic_test.py +endpoint_test_results/models/dynamic_test_links.py +endpoint_test_results/models/dynamic_test_links_self.py +endpoint_test_results/models/dynamic_tests_data_round_search.py +endpoint_test_results/models/dynamic_tests_data_search_filter.py +endpoint_test_results/models/endpoint_agent_labels_selector_config.py +endpoint_test_results/models/endpoint_agent_selector_config.py +endpoint_test_results/models/endpoint_agent_to_server_test.py +endpoint_test_results/models/endpoint_all_agents_selector_config.py +endpoint_test_results/models/endpoint_browser.py +endpoint_test_results/models/endpoint_http_data_point_score.py +endpoint_test_results/models/endpoint_http_server_base_test.py +endpoint_test_results/models/endpoint_http_server_test.py +endpoint_test_results/models/endpoint_network_topology_result_request_filter.py +endpoint_test_results/models/endpoint_ping_data_point_score.py +endpoint_test_results/models/endpoint_real_user_test.py +endpoint_test_results/models/endpoint_real_user_test_base.py +endpoint_test_results/models/endpoint_real_user_test_detail.py +endpoint_test_results/models/endpoint_real_user_test_detail_results.py +endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py +endpoint_test_results/models/endpoint_real_user_test_results.py +endpoint_test_results/models/endpoint_result_request_filter.py +endpoint_test_results/models/endpoint_scheduled_test.py +endpoint_test_results/models/endpoint_scheduled_test_type.py +endpoint_test_results/models/endpoint_specific_agents_selector_config.py +endpoint_test_results/models/endpoint_test.py +endpoint_test_results/models/endpoint_test_auth_type.py +endpoint_test_results/models/endpoint_test_links.py +endpoint_test_results/models/endpoint_test_links_self.py +endpoint_test_results/models/endpoint_test_protocol.py +endpoint_test_results/models/error.py +endpoint_test_results/models/ethernet_profile.py +endpoint_test_results/models/expand.py +endpoint_test_results/models/get_dynamic_test_result_network_pathvis200_response.py +endpoint_test_results/models/get_dynamic_test_result_pathvis_agent_round200_response.py +endpoint_test_results/models/get_endpoint_local_network_topology_details200_response.py +endpoint_test_results/models/get_endpoint_local_networks200_response.py +endpoint_test_results/models/get_endpoint_local_networks_topologies200_response.py +endpoint_test_results/models/get_endpoint_local_networks_topologies_request.py +endpoint_test_results/models/get_endpoint_real_user_test_details200_response.py +endpoint_test_results/models/get_endpoint_real_user_test_pages_details200_response.py +endpoint_test_results/models/get_endpoint_real_user_tests200_response.py +endpoint_test_results/models/get_endpoint_real_user_tests_network200_response.py +endpoint_test_results/models/get_endpoint_real_user_tests_pages200_response.py +endpoint_test_results/models/get_endpoint_real_user_tests_request.py +endpoint_test_results/models/get_test_result_http_server200_response.py +endpoint_test_results/models/get_test_result_network_pathvis200_response.py +endpoint_test_results/models/get_test_result_pathvis_agent_round200_response.py +endpoint_test_results/models/hop.py +endpoint_test_results/models/http_error_type.py +endpoint_test_results/models/http_test_result.py +endpoint_test_results/models/http_test_result_headers.py +endpoint_test_results/models/http_test_results.py +endpoint_test_results/models/interface_hardware_type.py +endpoint_test_results/models/link.py +endpoint_test_results/models/local_network_result.py +endpoint_test_results/models/local_network_results.py +endpoint_test_results/models/local_network_topology_detail_results.py +endpoint_test_results/models/local_network_topology_result.py +endpoint_test_results/models/local_network_topology_result_base.py +endpoint_test_results/models/local_network_topology_results.py +endpoint_test_results/models/multi_test_id_network_test_results.py +endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py +endpoint_test_results/models/multi_test_id_tests_data_search_filter.py +endpoint_test_results/models/network_dynamic_test_result.py +endpoint_test_results/models/network_dynamic_test_results.py +endpoint_test_results/models/network_interface.py +endpoint_test_results/models/network_metrics.py +endpoint_test_results/models/network_ping.py +endpoint_test_results/models/network_profile.py +endpoint_test_results/models/network_proxy_profile.py +endpoint_test_results/models/network_proxy_profile_proxies_inner.py +endpoint_test_results/models/network_test_result.py +endpoint_test_results/models/network_test_results.py +endpoint_test_results/models/network_topology_type.py +endpoint_test_results/models/network_wireless_profile.py +endpoint_test_results/models/pagination_next_and_self_link.py +endpoint_test_results/models/pagination_next_and_self_link_links.py +endpoint_test_results/models/pagination_next_link.py +endpoint_test_results/models/pagination_next_link_links.py +endpoint_test_results/models/path_vis_base_test_result.py +endpoint_test_results/models/path_vis_detail_dynamic_test_result.py +endpoint_test_results/models/path_vis_detail_dynamic_test_results.py +endpoint_test_results/models/path_vis_detail_test_result.py +endpoint_test_results/models/path_vis_detail_test_results.py +endpoint_test_results/models/path_vis_dynamic_test_result.py +endpoint_test_results/models/path_vis_dynamic_test_results.py +endpoint_test_results/models/path_vis_endpoint.py +endpoint_test_results/models/path_vis_hop.py +endpoint_test_results/models/path_vis_route.py +endpoint_test_results/models/path_vis_test_result.py +endpoint_test_results/models/path_vis_test_results.py +endpoint_test_results/models/physical_memory_used_bytes.py +endpoint_test_results/models/platform.py +endpoint_test_results/models/post_fetch_dynamic_test_result_metrics200_response.py +endpoint_test_results/models/post_fetch_test_result_metrics200_response.py +endpoint_test_results/models/post_fetch_test_result_metrics_multi_test200_response.py +endpoint_test_results/models/query_window.py +endpoint_test_results/models/real_user_test_coordinates.py +endpoint_test_results/models/real_user_test_network.py +endpoint_test_results/models/real_user_test_network_gateway_ping.py +endpoint_test_results/models/real_user_test_network_ping.py +endpoint_test_results/models/real_user_test_network_result.py +endpoint_test_results/models/real_user_test_network_results.py +endpoint_test_results/models/real_user_test_network_traceroute.py +endpoint_test_results/models/real_user_test_network_vpn_ping.py +endpoint_test_results/models/real_user_test_network_vpn_traceroute.py +endpoint_test_results/models/real_user_test_page.py +endpoint_test_results/models/real_user_test_page_page_timings.py +endpoint_test_results/models/real_user_test_page_result.py +endpoint_test_results/models/real_user_test_page_results.py +endpoint_test_results/models/self_links.py +endpoint_test_results/models/self_links_links.py +endpoint_test_results/models/severity.py +endpoint_test_results/models/sort_order.py +endpoint_test_results/models/system_metrics.py +endpoint_test_results/models/tcp_connect.py +endpoint_test_results/models/test_interval.py +endpoint_test_results/models/test_labels_inner.py +endpoint_test_results/models/test_probe_mode_response.py +endpoint_test_results/models/test_result.py +endpoint_test_results/models/test_ssl_version_id.py +endpoint_test_results/models/tests_data_rounds_search.py +endpoint_test_results/models/tests_data_search_filter.py +endpoint_test_results/models/tests_data_search_sort.py +endpoint_test_results/models/tests_data_search_sort_key.py +endpoint_test_results/models/tests_data_threshold_filter.py +endpoint_test_results/models/tests_data_threshold_filters.py +endpoint_test_results/models/threshold_filter_name.py +endpoint_test_results/models/threshold_filter_operator.py +endpoint_test_results/models/traceroute.py +endpoint_test_results/models/traceroute_hop.py +endpoint_test_results/models/trigger.py +endpoint_test_results/models/unauthorized_error.py +endpoint_test_results/models/validation_error.py +endpoint_test_results/models/validation_error_all_of_errors.py +endpoint_test_results/models/vpn_profile.py +endpoint_test_results/models/vpn_type.py +endpoint_test_results/py.typed +endpoint_test_results/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_account_group_id.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_base_test_result_webex.py +test/test_dynamic_test.py +test/test_dynamic_test_links.py +test/test_dynamic_test_links_self.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_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_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_links_self.py +test/test_endpoint_test_protocol.py +test/test_error.py +test/test_ethernet_profile.py +test/test_expand.py +test/test_get_dynamic_test_result_network_pathvis200_response.py +test/test_get_dynamic_test_result_pathvis_agent_round200_response.py +test/test_get_endpoint_local_network_topology_details200_response.py +test/test_get_endpoint_local_networks200_response.py +test/test_get_endpoint_local_networks_topologies200_response.py +test/test_get_endpoint_local_networks_topologies_request.py +test/test_get_endpoint_real_user_test_details200_response.py +test/test_get_endpoint_real_user_test_pages_details200_response.py +test/test_get_endpoint_real_user_tests200_response.py +test/test_get_endpoint_real_user_tests_network200_response.py +test/test_get_endpoint_real_user_tests_pages200_response.py +test/test_get_endpoint_real_user_tests_request.py +test/test_get_test_result_http_server200_response.py +test/test_get_test_result_network_pathvis200_response.py +test/test_get_test_result_pathvis_agent_round200_response.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_profile.py +test/test_network_proxy_profile_proxies_inner.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_and_self_link_links.py +test/test_pagination_next_link.py +test/test_pagination_next_link_links.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_post_fetch_dynamic_test_result_metrics200_response.py +test/test_post_fetch_test_result_metrics200_response.py +test/test_post_fetch_test_result_metrics_multi_test200_response.py +test/test_query_window.py +test/test_real_user_test_coordinates.py +test/test_real_user_test_network.py +test/test_real_user_test_network_gateway_ping.py +test/test_real_user_test_network_ping.py +test/test_real_user_test_network_result.py +test/test_real_user_test_network_results.py +test/test_real_user_test_network_traceroute.py +test/test_real_user_test_network_vpn_ping.py +test/test_real_user_test_network_vpn_traceroute.py +test/test_real_user_test_page.py +test/test_real_user_test_page_page_timings.py +test/test_real_user_test_page_result.py +test/test_real_user_test_page_results.py +test/test_self_links.py +test/test_self_links_links.py +test/test_severity.py +test/test_sort_order.py +test/test_system_metrics.py +test/test_tcp_connect.py +test/test_test_interval.py +test/test_test_labels_inner.py +test/test_test_probe_mode_response.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_all_of_errors.py +test/test_vpn_profile.py +test/test_vpn_type.py diff --git a/endpoint_test_results/.openapi-generator/VERSION b/endpoint_test_results/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/endpoint_test_results/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/endpoint_test_results/README.md b/endpoint_test_results/README.md new file mode 100644 index 00000000..38e41caf --- /dev/null +++ b/endpoint_test_results/README.md @@ -0,0 +1,284 @@ +# endpoint-test-results +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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import endpoint_test_results +``` + +### 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 endpoint_test_results +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import endpoint_test_results +from 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 = endpoint_test_results.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 = endpoint_test_results.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 ApiException as e: + print("Exception when calling LocalNetworkTestsResultsApi->get_endpoint_local_network_topology_details: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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 + + +## Documentation For Models + + - [AccountGroupId](docs/AccountGroupId.md) + - [AlertDirection](docs/AlertDirection.md) + - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) + - [AlertRule](docs/AlertRule.md) + - [AlertType](docs/AlertType.md) + - [ApplicationScoreQuality](docs/ApplicationScoreQuality.md) + - [AsnDetails](docs/AsnDetails.md) + - [ConditionalOperator](docs/ConditionalOperator.md) + - [CpuUtilization](docs/CpuUtilization.md) + - [DynamicBaseTestResult](docs/DynamicBaseTestResult.md) + - [DynamicBaseTestResultWebex](docs/DynamicBaseTestResultWebex.md) + - [DynamicTest](docs/DynamicTest.md) + - [DynamicTestLinks](docs/DynamicTestLinks.md) + - [DynamicTestLinksSelf](docs/DynamicTestLinksSelf.md) + - [DynamicTestsDataRoundSearch](docs/DynamicTestsDataRoundSearch.md) + - [DynamicTestsDataSearchFilter](docs/DynamicTestsDataSearchFilter.md) + - [EndpointAgentLabelsSelectorConfig](docs/EndpointAgentLabelsSelectorConfig.md) + - [EndpointAgentSelectorConfig](docs/EndpointAgentSelectorConfig.md) + - [EndpointAgentToServerTest](docs/EndpointAgentToServerTest.md) + - [EndpointAllAgentsSelectorConfig](docs/EndpointAllAgentsSelectorConfig.md) + - [EndpointBrowser](docs/EndpointBrowser.md) + - [EndpointHttpDataPointScore](docs/EndpointHttpDataPointScore.md) + - [EndpointHttpServerBaseTest](docs/EndpointHttpServerBaseTest.md) + - [EndpointHttpServerTest](docs/EndpointHttpServerTest.md) + - [EndpointNetworkTopologyResultRequestFilter](docs/EndpointNetworkTopologyResultRequestFilter.md) + - [EndpointPingDataPointScore](docs/EndpointPingDataPointScore.md) + - [EndpointRealUserTest](docs/EndpointRealUserTest.md) + - [EndpointRealUserTestBase](docs/EndpointRealUserTestBase.md) + - [EndpointRealUserTestDetail](docs/EndpointRealUserTestDetail.md) + - [EndpointRealUserTestDetailResults](docs/EndpointRealUserTestDetailResults.md) + - [EndpointRealUserTestResultRequestFilter](docs/EndpointRealUserTestResultRequestFilter.md) + - [EndpointRealUserTestResults](docs/EndpointRealUserTestResults.md) + - [EndpointResultRequestFilter](docs/EndpointResultRequestFilter.md) + - [EndpointScheduledTest](docs/EndpointScheduledTest.md) + - [EndpointScheduledTestType](docs/EndpointScheduledTestType.md) + - [EndpointSpecificAgentsSelectorConfig](docs/EndpointSpecificAgentsSelectorConfig.md) + - [EndpointTest](docs/EndpointTest.md) + - [EndpointTestAuthType](docs/EndpointTestAuthType.md) + - [EndpointTestLinks](docs/EndpointTestLinks.md) + - [EndpointTestLinksSelf](docs/EndpointTestLinksSelf.md) + - [EndpointTestProtocol](docs/EndpointTestProtocol.md) + - [Error](docs/Error.md) + - [EthernetProfile](docs/EthernetProfile.md) + - [Expand](docs/Expand.md) + - [GetDynamicTestResultNetworkPathvis200Response](docs/GetDynamicTestResultNetworkPathvis200Response.md) + - [GetDynamicTestResultPathvisAgentRound200Response](docs/GetDynamicTestResultPathvisAgentRound200Response.md) + - [GetEndpointLocalNetworkTopologyDetails200Response](docs/GetEndpointLocalNetworkTopologyDetails200Response.md) + - [GetEndpointLocalNetworks200Response](docs/GetEndpointLocalNetworks200Response.md) + - [GetEndpointLocalNetworksTopologies200Response](docs/GetEndpointLocalNetworksTopologies200Response.md) + - [GetEndpointLocalNetworksTopologiesRequest](docs/GetEndpointLocalNetworksTopologiesRequest.md) + - [GetEndpointRealUserTestDetails200Response](docs/GetEndpointRealUserTestDetails200Response.md) + - [GetEndpointRealUserTestPagesDetails200Response](docs/GetEndpointRealUserTestPagesDetails200Response.md) + - [GetEndpointRealUserTests200Response](docs/GetEndpointRealUserTests200Response.md) + - [GetEndpointRealUserTestsNetwork200Response](docs/GetEndpointRealUserTestsNetwork200Response.md) + - [GetEndpointRealUserTestsPages200Response](docs/GetEndpointRealUserTestsPages200Response.md) + - [GetEndpointRealUserTestsRequest](docs/GetEndpointRealUserTestsRequest.md) + - [GetTestResultHttpServer200Response](docs/GetTestResultHttpServer200Response.md) + - [GetTestResultNetworkPathvis200Response](docs/GetTestResultNetworkPathvis200Response.md) + - [GetTestResultPathvisAgentRound200Response](docs/GetTestResultPathvisAgentRound200Response.md) + - [Hop](docs/Hop.md) + - [HttpErrorType](docs/HttpErrorType.md) + - [HttpTestResult](docs/HttpTestResult.md) + - [HttpTestResultHeaders](docs/HttpTestResultHeaders.md) + - [HttpTestResults](docs/HttpTestResults.md) + - [InterfaceHardwareType](docs/InterfaceHardwareType.md) + - [Link](docs/Link.md) + - [LocalNetworkResult](docs/LocalNetworkResult.md) + - [LocalNetworkResults](docs/LocalNetworkResults.md) + - [LocalNetworkTopologyDetailResults](docs/LocalNetworkTopologyDetailResults.md) + - [LocalNetworkTopologyResult](docs/LocalNetworkTopologyResult.md) + - [LocalNetworkTopologyResultBase](docs/LocalNetworkTopologyResultBase.md) + - [LocalNetworkTopologyResults](docs/LocalNetworkTopologyResults.md) + - [MultiTestIdNetworkTestResults](docs/MultiTestIdNetworkTestResults.md) + - [MultiTestIdTestsDataRoundsSearch](docs/MultiTestIdTestsDataRoundsSearch.md) + - [MultiTestIdTestsDataSearchFilter](docs/MultiTestIdTestsDataSearchFilter.md) + - [NetworkDynamicTestResult](docs/NetworkDynamicTestResult.md) + - [NetworkDynamicTestResults](docs/NetworkDynamicTestResults.md) + - [NetworkInterface](docs/NetworkInterface.md) + - [NetworkMetrics](docs/NetworkMetrics.md) + - [NetworkPing](docs/NetworkPing.md) + - [NetworkProfile](docs/NetworkProfile.md) + - [NetworkProxyProfile](docs/NetworkProxyProfile.md) + - [NetworkProxyProfileProxiesInner](docs/NetworkProxyProfileProxiesInner.md) + - [NetworkTestResult](docs/NetworkTestResult.md) + - [NetworkTestResults](docs/NetworkTestResults.md) + - [NetworkTopologyType](docs/NetworkTopologyType.md) + - [NetworkWirelessProfile](docs/NetworkWirelessProfile.md) + - [PaginationNextAndSelfLink](docs/PaginationNextAndSelfLink.md) + - [PaginationNextAndSelfLinkLinks](docs/PaginationNextAndSelfLinkLinks.md) + - [PaginationNextLink](docs/PaginationNextLink.md) + - [PaginationNextLinkLinks](docs/PaginationNextLinkLinks.md) + - [PathVisBaseTestResult](docs/PathVisBaseTestResult.md) + - [PathVisDetailDynamicTestResult](docs/PathVisDetailDynamicTestResult.md) + - [PathVisDetailDynamicTestResults](docs/PathVisDetailDynamicTestResults.md) + - [PathVisDetailTestResult](docs/PathVisDetailTestResult.md) + - [PathVisDetailTestResults](docs/PathVisDetailTestResults.md) + - [PathVisDynamicTestResult](docs/PathVisDynamicTestResult.md) + - [PathVisDynamicTestResults](docs/PathVisDynamicTestResults.md) + - [PathVisEndpoint](docs/PathVisEndpoint.md) + - [PathVisHop](docs/PathVisHop.md) + - [PathVisRoute](docs/PathVisRoute.md) + - [PathVisTestResult](docs/PathVisTestResult.md) + - [PathVisTestResults](docs/PathVisTestResults.md) + - [PhysicalMemoryUsedBytes](docs/PhysicalMemoryUsedBytes.md) + - [Platform](docs/Platform.md) + - [PostFetchDynamicTestResultMetrics200Response](docs/PostFetchDynamicTestResultMetrics200Response.md) + - [PostFetchTestResultMetrics200Response](docs/PostFetchTestResultMetrics200Response.md) + - [PostFetchTestResultMetricsMultiTest200Response](docs/PostFetchTestResultMetricsMultiTest200Response.md) + - [QueryWindow](docs/QueryWindow.md) + - [RealUserTestCoordinates](docs/RealUserTestCoordinates.md) + - [RealUserTestNetwork](docs/RealUserTestNetwork.md) + - [RealUserTestNetworkGatewayPing](docs/RealUserTestNetworkGatewayPing.md) + - [RealUserTestNetworkPing](docs/RealUserTestNetworkPing.md) + - [RealUserTestNetworkResult](docs/RealUserTestNetworkResult.md) + - [RealUserTestNetworkResults](docs/RealUserTestNetworkResults.md) + - [RealUserTestNetworkTraceroute](docs/RealUserTestNetworkTraceroute.md) + - [RealUserTestNetworkVpnPing](docs/RealUserTestNetworkVpnPing.md) + - [RealUserTestNetworkVpnTraceroute](docs/RealUserTestNetworkVpnTraceroute.md) + - [RealUserTestPage](docs/RealUserTestPage.md) + - [RealUserTestPagePageTimings](docs/RealUserTestPagePageTimings.md) + - [RealUserTestPageResult](docs/RealUserTestPageResult.md) + - [RealUserTestPageResults](docs/RealUserTestPageResults.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [Severity](docs/Severity.md) + - [SortOrder](docs/SortOrder.md) + - [SystemMetrics](docs/SystemMetrics.md) + - [TcpConnect](docs/TcpConnect.md) + - [TestInterval](docs/TestInterval.md) + - [TestLabelsInner](docs/TestLabelsInner.md) + - [TestProbeModeResponse](docs/TestProbeModeResponse.md) + - [TestResult](docs/TestResult.md) + - [TestSslVersionId](docs/TestSslVersionId.md) + - [TestsDataRoundsSearch](docs/TestsDataRoundsSearch.md) + - [TestsDataSearchFilter](docs/TestsDataSearchFilter.md) + - [TestsDataSearchSort](docs/TestsDataSearchSort.md) + - [TestsDataSearchSortKey](docs/TestsDataSearchSortKey.md) + - [TestsDataThresholdFilter](docs/TestsDataThresholdFilter.md) + - [TestsDataThresholdFilters](docs/TestsDataThresholdFilters.md) + - [ThresholdFilterName](docs/ThresholdFilterName.md) + - [ThresholdFilterOperator](docs/ThresholdFilterOperator.md) + - [Traceroute](docs/Traceroute.md) + - [TracerouteHop](docs/TracerouteHop.md) + - [Trigger](docs/Trigger.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [VpnProfile](docs/VpnProfile.md) + - [VpnType](docs/VpnType.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/endpoint_test_results/docs/AccountGroupId.md b/endpoint_test_results/docs/AccountGroupId.md new file mode 100644 index 00000000..a39926f5 --- /dev/null +++ b/endpoint_test_results/docs/AccountGroupId.md @@ -0,0 +1,29 @@ +# AccountGroupId + + +## 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] + +## Example + +```python +from endpoint_test_results.models.account_group_id import AccountGroupId + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupId from a JSON string +account_group_id_instance = AccountGroupId.from_json(json) +# print the JSON string representation of the object +print(AccountGroupId.to_json()) + +# convert the object into a dict +account_group_id_dict = account_group_id_instance.to_dict() +# create an instance of AccountGroupId from a dict +account_group_id_from_dict = AccountGroupId.from_dict(account_group_id_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/endpoint_test_results/docs/AlertDirection.md b/endpoint_test_results/docs/AlertDirection.md new file mode 100644 index 00000000..8902e9bf --- /dev/null +++ b/endpoint_test_results/docs/AlertDirection.md @@ -0,0 +1,12 @@ +# AlertDirection + +Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + +## 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/endpoint_test_results/docs/AlertRoundsViolationMode.md b/endpoint_test_results/docs/AlertRoundsViolationMode.md new file mode 100644 index 00000000..efe78921 --- /dev/null +++ b/endpoint_test_results/docs/AlertRoundsViolationMode.md @@ -0,0 +1,12 @@ +# AlertRoundsViolationMode + +`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + +## 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/endpoint_test_results/docs/AlertRule.md b/endpoint_test_results/docs/AlertRule.md new file mode 100644 index 00000000..1d2d767b --- /dev/null +++ b/endpoint_test_results/docs/AlertRule.md @@ -0,0 +1,40 @@ +# AlertRule + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] +**rule_name** | **str** | Name of the alert rule | [optional] [readonly] +**expression** | **str** | String expression of alert rule | [optional] [readonly] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] +**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] +**alert_type** | [**AlertType**](AlertType.md) | | [optional] +**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] +**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] +**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] +**severity** | [**Severity**](Severity.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.alert_rule import AlertRule + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertRule from a JSON string +alert_rule_instance = AlertRule.from_json(json) +# print the JSON string representation of the object +print(AlertRule.to_json()) + +# convert the object into a dict +alert_rule_dict = alert_rule_instance.to_dict() +# create an instance of AlertRule from a dict +alert_rule_from_dict = AlertRule.from_dict(alert_rule_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/endpoint_test_results/docs/AlertType.md b/endpoint_test_results/docs/AlertType.md new file mode 100644 index 00000000..cde41743 --- /dev/null +++ b/endpoint_test_results/docs/AlertType.md @@ -0,0 +1,12 @@ +# AlertType + +Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + +## 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/endpoint/test_results_api/docs/ApplicationScoreQuality.md b/endpoint_test_results/docs/ApplicationScoreQuality.md similarity index 99% rename from endpoint/test_results_api/docs/ApplicationScoreQuality.md rename to endpoint_test_results/docs/ApplicationScoreQuality.md index 3cba74f0..ffaf032e 100644 --- a/endpoint/test_results_api/docs/ApplicationScoreQuality.md +++ b/endpoint_test_results/docs/ApplicationScoreQuality.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint/test_results_api/docs/AsnDetails.md b/endpoint_test_results/docs/AsnDetails.md similarity index 84% rename from endpoint/test_results_api/docs/AsnDetails.md rename to endpoint_test_results/docs/AsnDetails.md index fba13218..3da2e3ce 100644 --- a/endpoint/test_results_api/docs/AsnDetails.md +++ b/endpoint_test_results/docs/AsnDetails.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **as_name** | **str** | Name of the provider. | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.asn_details import AsnDetails +from endpoint_test_results.models.asn_details import AsnDetails # TODO update the JSON string below json = "{}" # create an instance of AsnDetails from a JSON string asn_details_instance = AsnDetails.from_json(json) # print the JSON string representation of the object -print AsnDetails.to_json() +print(AsnDetails.to_json()) # convert the object into a dict asn_details_dict = asn_details_instance.to_dict() # create an instance of AsnDetails from a dict -asn_details_form_dict = asn_details.from_dict(asn_details_dict) +asn_details_from_dict = AsnDetails.from_dict(asn_details_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/endpoint_test_results/docs/ConditionalOperator.md b/endpoint_test_results/docs/ConditionalOperator.md new file mode 100644 index 00000000..0aca5a9c --- /dev/null +++ b/endpoint_test_results/docs/ConditionalOperator.md @@ -0,0 +1,11 @@ +# ConditionalOperator + + +## 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/endpoint/test_results_api/docs/CpuUtilization.md b/endpoint_test_results/docs/CpuUtilization.md similarity index 88% rename from endpoint/test_results_api/docs/CpuUtilization.md rename to endpoint_test_results/docs/CpuUtilization.md index f31d68f0..c679fd27 100644 --- a/endpoint/test_results_api/docs/CpuUtilization.md +++ b/endpoint_test_results/docs/CpuUtilization.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **min** | **float** | The minimum sampled usage value recorded during the monitored period. | [optional] [readonly] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.cpu_utilization import CpuUtilization +from endpoint_test_results.models.cpu_utilization import CpuUtilization # TODO update the JSON string below json = "{}" # create an instance of CpuUtilization from a JSON string cpu_utilization_instance = CpuUtilization.from_json(json) # print the JSON string representation of the object -print CpuUtilization.to_json() +print(CpuUtilization.to_json()) # convert the object into a dict cpu_utilization_dict = cpu_utilization_instance.to_dict() # create an instance of CpuUtilization from a dict -cpu_utilization_form_dict = cpu_utilization.from_dict(cpu_utilization_dict) +cpu_utilization_from_dict = CpuUtilization.from_dict(cpu_utilization_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/endpoint_test_results/docs/DynamicBaseTestResult.md b/endpoint_test_results/docs/DynamicBaseTestResult.md new file mode 100644 index 00000000..85ae2955 --- /dev/null +++ b/endpoint_test_results/docs/DynamicBaseTestResult.md @@ -0,0 +1,30 @@ +# DynamicBaseTestResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.dynamic_base_test_result import DynamicBaseTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicBaseTestResult from a JSON string +dynamic_base_test_result_instance = DynamicBaseTestResult.from_json(json) +# print the JSON string representation of the object +print(DynamicBaseTestResult.to_json()) + +# convert the object into a dict +dynamic_base_test_result_dict = dynamic_base_test_result_instance.to_dict() +# create an instance of DynamicBaseTestResult from a dict +dynamic_base_test_result_from_dict = DynamicBaseTestResult.from_dict(dynamic_base_test_result_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/endpoint_test_results/docs/DynamicBaseTestResultWebex.md b/endpoint_test_results/docs/DynamicBaseTestResultWebex.md new file mode 100644 index 00000000..0b3407e6 --- /dev/null +++ b/endpoint_test_results/docs/DynamicBaseTestResultWebex.md @@ -0,0 +1,33 @@ +# DynamicBaseTestResultWebex + +Contains object with webex information. Only returned for webex applications. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conference_id** | **str** | Webex conference ID. | [optional] [readonly] +**correlation_id** | **str** | Webex conference correlation ID. | [optional] [readonly] +**local_sip_session_id** | **str** | Webex calling local sip session ID. | [optional] [readonly] +**remote_sip_session_id** | **str** | Webex calling remote sip session ID. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicBaseTestResultWebex from a JSON string +dynamic_base_test_result_webex_instance = DynamicBaseTestResultWebex.from_json(json) +# print the JSON string representation of the object +print(DynamicBaseTestResultWebex.to_json()) + +# convert the object into a dict +dynamic_base_test_result_webex_dict = dynamic_base_test_result_webex_instance.to_dict() +# create an instance of DynamicBaseTestResultWebex from a dict +dynamic_base_test_result_webex_from_dict = DynamicBaseTestResultWebex.from_dict(dynamic_base_test_result_webex_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/endpoint_test_results/docs/DynamicTest.md b/endpoint_test_results/docs/DynamicTest.md new file mode 100644 index 00000000..09ac6f55 --- /dev/null +++ b/endpoint_test_results/docs/DynamicTest.md @@ -0,0 +1,45 @@ +# DynamicTest + + +## 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] +**links** | [**DynamicTestLinks**](DynamicTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**test_id** | **str** | Each test is assigned a unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.dynamic_test import DynamicTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicTest from a JSON string +dynamic_test_instance = DynamicTest.from_json(json) +# print the JSON string representation of the object +print(DynamicTest.to_json()) + +# convert the object into a dict +dynamic_test_dict = dynamic_test_instance.to_dict() +# create an instance of DynamicTest from a dict +dynamic_test_from_dict = DynamicTest.from_dict(dynamic_test_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/endpoint_test_results/docs/DynamicTestLinks.md b/endpoint_test_results/docs/DynamicTestLinks.md new file mode 100644 index 00000000..24aaf49c --- /dev/null +++ b/endpoint_test_results/docs/DynamicTestLinks.md @@ -0,0 +1,31 @@ +# DynamicTestLinks + +A list of links that can be accessed to get more information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**DynamicTestLinksSelf**](DynamicTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from endpoint_test_results.models.dynamic_test_links import DynamicTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicTestLinks from a JSON string +dynamic_test_links_instance = DynamicTestLinks.from_json(json) +# print the JSON string representation of the object +print(DynamicTestLinks.to_json()) + +# convert the object into a dict +dynamic_test_links_dict = dynamic_test_links_instance.to_dict() +# create an instance of DynamicTestLinks from a dict +dynamic_test_links_from_dict = DynamicTestLinks.from_dict(dynamic_test_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/endpoint_test_results/docs/DynamicTestLinksSelf.md b/endpoint_test_results/docs/DynamicTestLinksSelf.md new file mode 100644 index 00000000..55e6b588 --- /dev/null +++ b/endpoint_test_results/docs/DynamicTestLinksSelf.md @@ -0,0 +1,36 @@ +# DynamicTestLinksSelf + + +## 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 endpoint_test_results.models.dynamic_test_links_self import DynamicTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicTestLinksSelf from a JSON string +dynamic_test_links_self_instance = DynamicTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(DynamicTestLinksSelf.to_json()) + +# convert the object into a dict +dynamic_test_links_self_dict = dynamic_test_links_self_instance.to_dict() +# create an instance of DynamicTestLinksSelf from a dict +dynamic_test_links_self_from_dict = DynamicTestLinksSelf.from_dict(dynamic_test_links_self_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/endpoint/test_results_api/docs/DynamicTestsDataRoundSearch.md b/endpoint_test_results/docs/DynamicTestsDataRoundSearch.md similarity index 80% rename from endpoint/test_results_api/docs/DynamicTestsDataRoundSearch.md rename to endpoint_test_results/docs/DynamicTestsDataRoundSearch.md index 379ddfd5..09fb4434 100644 --- a/endpoint/test_results_api/docs/DynamicTestsDataRoundSearch.md +++ b/endpoint_test_results/docs/DynamicTestsDataRoundSearch.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **search_sort** | [**List[TestsDataSearchSort]**](TestsDataSearchSort.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch +from endpoint_test_results.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch # TODO update the JSON string below json = "{}" # create an instance of DynamicTestsDataRoundSearch from a JSON string dynamic_tests_data_round_search_instance = DynamicTestsDataRoundSearch.from_json(json) # print the JSON string representation of the object -print DynamicTestsDataRoundSearch.to_json() +print(DynamicTestsDataRoundSearch.to_json()) # convert the object into a dict dynamic_tests_data_round_search_dict = dynamic_tests_data_round_search_instance.to_dict() # create an instance of DynamicTestsDataRoundSearch from a dict -dynamic_tests_data_round_search_form_dict = dynamic_tests_data_round_search.from_dict(dynamic_tests_data_round_search_dict) +dynamic_tests_data_round_search_from_dict = DynamicTestsDataRoundSearch.from_dict(dynamic_tests_data_round_search_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/endpoint/test_results_api/docs/DynamicTestsDataSearchFilter.md b/endpoint_test_results/docs/DynamicTestsDataSearchFilter.md similarity index 78% rename from endpoint/test_results_api/docs/DynamicTestsDataSearchFilter.md rename to endpoint_test_results/docs/DynamicTestsDataSearchFilter.md index 4e7d3e00..1a971fd3 100644 --- a/endpoint/test_results_api/docs/DynamicTestsDataSearchFilter.md +++ b/endpoint_test_results/docs/DynamicTestsDataSearchFilter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **List[str]** | Filter using the `agent-id`. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter +from endpoint_test_results.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter # TODO update the JSON string below json = "{}" # create an instance of DynamicTestsDataSearchFilter from a JSON string dynamic_tests_data_search_filter_instance = DynamicTestsDataSearchFilter.from_json(json) # print the JSON string representation of the object -print DynamicTestsDataSearchFilter.to_json() +print(DynamicTestsDataSearchFilter.to_json()) # convert the object into a dict dynamic_tests_data_search_filter_dict = dynamic_tests_data_search_filter_instance.to_dict() # create an instance of DynamicTestsDataSearchFilter from a dict -dynamic_tests_data_search_filter_form_dict = dynamic_tests_data_search_filter.from_dict(dynamic_tests_data_search_filter_dict) +dynamic_tests_data_search_filter_from_dict = DynamicTestsDataSearchFilter.from_dict(dynamic_tests_data_search_filter_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/endpoint_test_results/docs/EndpointAgentLabelsSelectorConfig.md b/endpoint_test_results/docs/EndpointAgentLabelsSelectorConfig.md new file mode 100644 index 00000000..cdef8512 --- /dev/null +++ b/endpoint_test_results/docs/EndpointAgentLabelsSelectorConfig.md @@ -0,0 +1,32 @@ +# EndpointAgentLabelsSelectorConfig + +Agent labels selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentLabelsSelectorConfig from a JSON string +endpoint_agent_labels_selector_config_instance = EndpointAgentLabelsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentLabelsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_agent_labels_selector_config_dict = endpoint_agent_labels_selector_config_instance.to_dict() +# create an instance of EndpointAgentLabelsSelectorConfig from a dict +endpoint_agent_labels_selector_config_from_dict = EndpointAgentLabelsSelectorConfig.from_dict(endpoint_agent_labels_selector_config_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/endpoint_test_results/docs/EndpointAgentSelectorConfig.md b/endpoint_test_results/docs/EndpointAgentSelectorConfig.md new file mode 100644 index 00000000..26aa16ed --- /dev/null +++ b/endpoint_test_results/docs/EndpointAgentSelectorConfig.md @@ -0,0 +1,33 @@ +# EndpointAgentSelectorConfig + +Agents selection object based on agentSelectorType. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentSelectorConfig from a JSON string +endpoint_agent_selector_config_instance = EndpointAgentSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_agent_selector_config_dict = endpoint_agent_selector_config_instance.to_dict() +# create an instance of EndpointAgentSelectorConfig from a dict +endpoint_agent_selector_config_from_dict = EndpointAgentSelectorConfig.from_dict(endpoint_agent_selector_config_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/endpoint_test_results/docs/EndpointAgentToServerTest.md b/endpoint_test_results/docs/EndpointAgentToServerTest.md new file mode 100644 index 00000000..858114d1 --- /dev/null +++ b/endpoint_test_results/docs/EndpointAgentToServerTest.md @@ -0,0 +1,47 @@ +# EndpointAgentToServerTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.endpoint_agent_to_server_test import EndpointAgentToServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentToServerTest from a JSON string +endpoint_agent_to_server_test_instance = EndpointAgentToServerTest.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentToServerTest.to_json()) + +# convert the object into a dict +endpoint_agent_to_server_test_dict = endpoint_agent_to_server_test_instance.to_dict() +# create an instance of EndpointAgentToServerTest from a dict +endpoint_agent_to_server_test_from_dict = EndpointAgentToServerTest.from_dict(endpoint_agent_to_server_test_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/endpoint_test_results/docs/EndpointAllAgentsSelectorConfig.md b/endpoint_test_results/docs/EndpointAllAgentsSelectorConfig.md new file mode 100644 index 00000000..f8e1d2fb --- /dev/null +++ b/endpoint_test_results/docs/EndpointAllAgentsSelectorConfig.md @@ -0,0 +1,31 @@ +# EndpointAllAgentsSelectorConfig + +Any agent selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAllAgentsSelectorConfig from a JSON string +endpoint_all_agents_selector_config_instance = EndpointAllAgentsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAllAgentsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_all_agents_selector_config_dict = endpoint_all_agents_selector_config_instance.to_dict() +# create an instance of EndpointAllAgentsSelectorConfig from a dict +endpoint_all_agents_selector_config_from_dict = EndpointAllAgentsSelectorConfig.from_dict(endpoint_all_agents_selector_config_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/endpoint/test_results_api/docs/EndpointBrowser.md b/endpoint_test_results/docs/EndpointBrowser.md similarity index 81% rename from endpoint/test_results_api/docs/EndpointBrowser.md rename to endpoint_test_results/docs/EndpointBrowser.md index 41772f09..a0e511e4 100644 --- a/endpoint/test_results_api/docs/EndpointBrowser.md +++ b/endpoint_test_results/docs/EndpointBrowser.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Browser name. | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_browser import EndpointBrowser +from endpoint_test_results.models.endpoint_browser import EndpointBrowser # TODO update the JSON string below json = "{}" # create an instance of EndpointBrowser from a JSON string endpoint_browser_instance = EndpointBrowser.from_json(json) # print the JSON string representation of the object -print EndpointBrowser.to_json() +print(EndpointBrowser.to_json()) # convert the object into a dict endpoint_browser_dict = endpoint_browser_instance.to_dict() # create an instance of EndpointBrowser from a dict -endpoint_browser_form_dict = endpoint_browser.from_dict(endpoint_browser_dict) +endpoint_browser_from_dict = EndpointBrowser.from_dict(endpoint_browser_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/endpoint/test_results_api/docs/EndpointHttpDataPointScore.md b/endpoint_test_results/docs/EndpointHttpDataPointScore.md similarity index 79% rename from endpoint/test_results_api/docs/EndpointHttpDataPointScore.md rename to endpoint_test_results/docs/EndpointHttpDataPointScore.md index cfd48ce5..161b1e03 100644 --- a/endpoint/test_results_api/docs/EndpointHttpDataPointScore.md +++ b/endpoint_test_results/docs/EndpointHttpDataPointScore.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **application_score** | **float** | Fine grained score between 0-100 based on `time to first byte` metric | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_http_data_point_score import EndpointHttpDataPointScore +from endpoint_test_results.models.endpoint_http_data_point_score import EndpointHttpDataPointScore # TODO update the JSON string below json = "{}" # create an instance of EndpointHttpDataPointScore from a JSON string endpoint_http_data_point_score_instance = EndpointHttpDataPointScore.from_json(json) # print the JSON string representation of the object -print EndpointHttpDataPointScore.to_json() +print(EndpointHttpDataPointScore.to_json()) # convert the object into a dict endpoint_http_data_point_score_dict = endpoint_http_data_point_score_instance.to_dict() # create an instance of EndpointHttpDataPointScore from a dict -endpoint_http_data_point_score_form_dict = endpoint_http_data_point_score.from_dict(endpoint_http_data_point_score_dict) +endpoint_http_data_point_score_from_dict = EndpointHttpDataPointScore.from_dict(endpoint_http_data_point_score_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/endpoint_test_results/docs/EndpointHttpServerBaseTest.md b/endpoint_test_results/docs/EndpointHttpServerBaseTest.md new file mode 100644 index 00000000..1b225c4a --- /dev/null +++ b/endpoint_test_results/docs/EndpointHttpServerBaseTest.md @@ -0,0 +1,37 @@ +# EndpointHttpServerBaseTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerBaseTest from a JSON string +endpoint_http_server_base_test_instance = EndpointHttpServerBaseTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerBaseTest.to_json()) + +# convert the object into a dict +endpoint_http_server_base_test_dict = endpoint_http_server_base_test_instance.to_dict() +# create an instance of EndpointHttpServerBaseTest from a dict +endpoint_http_server_base_test_from_dict = EndpointHttpServerBaseTest.from_dict(endpoint_http_server_base_test_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/endpoint_test_results/docs/EndpointHttpServerTest.md b/endpoint_test_results/docs/EndpointHttpServerTest.md new file mode 100644 index 00000000..27829fbf --- /dev/null +++ b/endpoint_test_results/docs/EndpointHttpServerTest.md @@ -0,0 +1,61 @@ +# EndpointHttpServerTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**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] +**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] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerTest from a JSON string +endpoint_http_server_test_instance = EndpointHttpServerTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerTest.to_json()) + +# convert the object into a dict +endpoint_http_server_test_dict = endpoint_http_server_test_instance.to_dict() +# create an instance of EndpointHttpServerTest from a dict +endpoint_http_server_test_from_dict = EndpointHttpServerTest.from_dict(endpoint_http_server_test_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/endpoint/test_results_api/docs/EndpointNetworkTopologyResultRequestFilter.md b/endpoint_test_results/docs/EndpointNetworkTopologyResultRequestFilter.md similarity index 82% rename from endpoint/test_results_api/docs/EndpointNetworkTopologyResultRequestFilter.md rename to endpoint_test_results/docs/EndpointNetworkTopologyResultRequestFilter.md index 0060ae7b..d5242500 100644 --- a/endpoint/test_results_api/docs/EndpointNetworkTopologyResultRequestFilter.md +++ b/endpoint_test_results/docs/EndpointNetworkTopologyResultRequestFilter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location** | **List[str]** | Location of the endpoint agent. | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter +from endpoint_test_results.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter # TODO update the JSON string below json = "{}" # create an instance of EndpointNetworkTopologyResultRequestFilter from a JSON string endpoint_network_topology_result_request_filter_instance = EndpointNetworkTopologyResultRequestFilter.from_json(json) # print the JSON string representation of the object -print EndpointNetworkTopologyResultRequestFilter.to_json() +print(EndpointNetworkTopologyResultRequestFilter.to_json()) # convert the object into a dict endpoint_network_topology_result_request_filter_dict = endpoint_network_topology_result_request_filter_instance.to_dict() # create an instance of EndpointNetworkTopologyResultRequestFilter from a dict -endpoint_network_topology_result_request_filter_form_dict = endpoint_network_topology_result_request_filter.from_dict(endpoint_network_topology_result_request_filter_dict) +endpoint_network_topology_result_request_filter_from_dict = EndpointNetworkTopologyResultRequestFilter.from_dict(endpoint_network_topology_result_request_filter_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/endpoint/test_results_api/docs/EndpointPingDataPointScore.md b/endpoint_test_results/docs/EndpointPingDataPointScore.md similarity index 79% rename from endpoint/test_results_api/docs/EndpointPingDataPointScore.md rename to endpoint_test_results/docs/EndpointPingDataPointScore.md index a6592df4..b8270dfb 100644 --- a/endpoint/test_results_api/docs/EndpointPingDataPointScore.md +++ b/endpoint_test_results/docs/EndpointPingDataPointScore.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **application_score** | **float** | Fine grained score between 0-100 based on metrics (latency, jitter, loss) | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_ping_data_point_score import EndpointPingDataPointScore +from endpoint_test_results.models.endpoint_ping_data_point_score import EndpointPingDataPointScore # TODO update the JSON string below json = "{}" # create an instance of EndpointPingDataPointScore from a JSON string endpoint_ping_data_point_score_instance = EndpointPingDataPointScore.from_json(json) # print the JSON string representation of the object -print EndpointPingDataPointScore.to_json() +print(EndpointPingDataPointScore.to_json()) # convert the object into a dict endpoint_ping_data_point_score_dict = endpoint_ping_data_point_score_instance.to_dict() # create an instance of EndpointPingDataPointScore from a dict -endpoint_ping_data_point_score_form_dict = endpoint_ping_data_point_score.from_dict(endpoint_ping_data_point_score_dict) +endpoint_ping_data_point_score_from_dict = EndpointPingDataPointScore.from_dict(endpoint_ping_data_point_score_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/endpoint/test_results_api/docs/EndpointRealUserTest.md b/endpoint_test_results/docs/EndpointRealUserTest.md similarity index 91% rename from endpoint/test_results_api/docs/EndpointRealUserTest.md rename to endpoint_test_results/docs/EndpointRealUserTest.md index 0e9f00fc..cb9a98dd 100644 --- a/endpoint/test_results_api/docs/EndpointRealUserTest.md +++ b/endpoint_test_results/docs/EndpointRealUserTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] @@ -21,19 +22,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_real_user_test import EndpointRealUserTest +from endpoint_test_results.models.endpoint_real_user_test import EndpointRealUserTest # TODO update the JSON string below json = "{}" # create an instance of EndpointRealUserTest from a JSON string endpoint_real_user_test_instance = EndpointRealUserTest.from_json(json) # print the JSON string representation of the object -print EndpointRealUserTest.to_json() +print(EndpointRealUserTest.to_json()) # convert the object into a dict endpoint_real_user_test_dict = endpoint_real_user_test_instance.to_dict() # create an instance of EndpointRealUserTest from a dict -endpoint_real_user_test_form_dict = endpoint_real_user_test.from_dict(endpoint_real_user_test_dict) +endpoint_real_user_test_from_dict = EndpointRealUserTest.from_dict(endpoint_real_user_test_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/endpoint/test_results_api/docs/EndpointRealUserTestBase.md b/endpoint_test_results/docs/EndpointRealUserTestBase.md similarity index 90% rename from endpoint/test_results_api/docs/EndpointRealUserTestBase.md rename to endpoint_test_results/docs/EndpointRealUserTestBase.md index 129f4918..d8a090f2 100644 --- a/endpoint/test_results_api/docs/EndpointRealUserTestBase.md +++ b/endpoint_test_results/docs/EndpointRealUserTestBase.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] @@ -20,19 +21,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_real_user_test_base import EndpointRealUserTestBase +from endpoint_test_results.models.endpoint_real_user_test_base import EndpointRealUserTestBase # TODO update the JSON string below json = "{}" # create an instance of EndpointRealUserTestBase from a JSON string endpoint_real_user_test_base_instance = EndpointRealUserTestBase.from_json(json) # print the JSON string representation of the object -print EndpointRealUserTestBase.to_json() +print(EndpointRealUserTestBase.to_json()) # convert the object into a dict endpoint_real_user_test_base_dict = endpoint_real_user_test_base_instance.to_dict() # create an instance of EndpointRealUserTestBase from a dict -endpoint_real_user_test_base_form_dict = endpoint_real_user_test_base.from_dict(endpoint_real_user_test_base_dict) +endpoint_real_user_test_base_from_dict = EndpointRealUserTestBase.from_dict(endpoint_real_user_test_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/endpoint/test_results_api/docs/EndpointRealUserTestDetail.md b/endpoint_test_results/docs/EndpointRealUserTestDetail.md similarity index 91% rename from endpoint/test_results_api/docs/EndpointRealUserTestDetail.md rename to endpoint_test_results/docs/EndpointRealUserTestDetail.md index ece656b4..b45a2c74 100644 --- a/endpoint/test_results_api/docs/EndpointRealUserTestDetail.md +++ b/endpoint_test_results/docs/EndpointRealUserTestDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] @@ -24,19 +25,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail +from endpoint_test_results.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail # TODO update the JSON string below json = "{}" # create an instance of EndpointRealUserTestDetail from a JSON string endpoint_real_user_test_detail_instance = EndpointRealUserTestDetail.from_json(json) # print the JSON string representation of the object -print EndpointRealUserTestDetail.to_json() +print(EndpointRealUserTestDetail.to_json()) # convert the object into a dict endpoint_real_user_test_detail_dict = endpoint_real_user_test_detail_instance.to_dict() # create an instance of EndpointRealUserTestDetail from a dict -endpoint_real_user_test_detail_form_dict = endpoint_real_user_test_detail.from_dict(endpoint_real_user_test_detail_dict) +endpoint_real_user_test_detail_from_dict = EndpointRealUserTestDetail.from_dict(endpoint_real_user_test_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/endpoint/test_results_api/docs/EndpointRealUserTestDetailResults.md b/endpoint_test_results/docs/EndpointRealUserTestDetailResults.md similarity index 75% rename from endpoint/test_results_api/docs/EndpointRealUserTestDetailResults.md rename to endpoint_test_results/docs/EndpointRealUserTestDetailResults.md index d7cca2f2..f2ec0485 100644 --- a/endpoint/test_results_api/docs/EndpointRealUserTestDetailResults.md +++ b/endpoint_test_results/docs/EndpointRealUserTestDetailResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[EndpointRealUserTestDetail]**](EndpointRealUserTestDetail.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults +from endpoint_test_results.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults # TODO update the JSON string below json = "{}" # create an instance of EndpointRealUserTestDetailResults from a JSON string endpoint_real_user_test_detail_results_instance = EndpointRealUserTestDetailResults.from_json(json) # print the JSON string representation of the object -print EndpointRealUserTestDetailResults.to_json() +print(EndpointRealUserTestDetailResults.to_json()) # convert the object into a dict endpoint_real_user_test_detail_results_dict = endpoint_real_user_test_detail_results_instance.to_dict() # create an instance of EndpointRealUserTestDetailResults from a dict -endpoint_real_user_test_detail_results_form_dict = endpoint_real_user_test_detail_results.from_dict(endpoint_real_user_test_detail_results_dict) +endpoint_real_user_test_detail_results_from_dict = EndpointRealUserTestDetailResults.from_dict(endpoint_real_user_test_detail_results_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/endpoint/test_results_api/docs/EndpointRealUserTestResultRequestFilter.md b/endpoint_test_results/docs/EndpointRealUserTestResultRequestFilter.md similarity index 84% rename from endpoint/test_results_api/docs/EndpointRealUserTestResultRequestFilter.md rename to endpoint_test_results/docs/EndpointRealUserTestResultRequestFilter.md index 4e713eb9..e55e1373 100644 --- a/endpoint/test_results_api/docs/EndpointRealUserTestResultRequestFilter.md +++ b/endpoint_test_results/docs/EndpointRealUserTestResultRequestFilter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location** | **List[str]** | Location of the endpoint agent. | [optional] @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter # TODO update the JSON string below json = "{}" # create an instance of EndpointRealUserTestResultRequestFilter from a JSON string endpoint_real_user_test_result_request_filter_instance = EndpointRealUserTestResultRequestFilter.from_json(json) # print the JSON string representation of the object -print EndpointRealUserTestResultRequestFilter.to_json() +print(EndpointRealUserTestResultRequestFilter.to_json()) # convert the object into a dict endpoint_real_user_test_result_request_filter_dict = endpoint_real_user_test_result_request_filter_instance.to_dict() # create an instance of EndpointRealUserTestResultRequestFilter from a dict -endpoint_real_user_test_result_request_filter_form_dict = endpoint_real_user_test_result_request_filter.from_dict(endpoint_real_user_test_result_request_filter_dict) +endpoint_real_user_test_result_request_filter_from_dict = EndpointRealUserTestResultRequestFilter.from_dict(endpoint_real_user_test_result_request_filter_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/endpoint/test_results_api/docs/EndpointRealUserTestResults.md b/endpoint_test_results/docs/EndpointRealUserTestResults.md similarity index 76% rename from endpoint/test_results_api/docs/EndpointRealUserTestResults.md rename to endpoint_test_results/docs/EndpointRealUserTestResults.md index 5e1a69ef..1bd8bde3 100644 --- a/endpoint/test_results_api/docs/EndpointRealUserTestResults.md +++ b/endpoint_test_results/docs/EndpointRealUserTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[EndpointRealUserTest]**](EndpointRealUserTest.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_real_user_test_results import EndpointRealUserTestResults +from endpoint_test_results.models.endpoint_real_user_test_results import EndpointRealUserTestResults # TODO update the JSON string below json = "{}" # create an instance of EndpointRealUserTestResults from a JSON string endpoint_real_user_test_results_instance = EndpointRealUserTestResults.from_json(json) # print the JSON string representation of the object -print EndpointRealUserTestResults.to_json() +print(EndpointRealUserTestResults.to_json()) # convert the object into a dict endpoint_real_user_test_results_dict = endpoint_real_user_test_results_instance.to_dict() # create an instance of EndpointRealUserTestResults from a dict -endpoint_real_user_test_results_form_dict = endpoint_real_user_test_results.from_dict(endpoint_real_user_test_results_dict) +endpoint_real_user_test_results_from_dict = EndpointRealUserTestResults.from_dict(endpoint_real_user_test_results_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/endpoint/test_results_api/docs/EndpointResultRequestFilter.md b/endpoint_test_results/docs/EndpointResultRequestFilter.md similarity index 85% rename from endpoint/test_results_api/docs/EndpointResultRequestFilter.md rename to endpoint_test_results/docs/EndpointResultRequestFilter.md index 3b1382ce..50b1898a 100644 --- a/endpoint/test_results_api/docs/EndpointResultRequestFilter.md +++ b/endpoint_test_results/docs/EndpointResultRequestFilter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location** | **List[str]** | Location of the endpoint agent. | [optional] @@ -18,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_result_request_filter import EndpointResultRequestFilter +from endpoint_test_results.models.endpoint_result_request_filter import EndpointResultRequestFilter # TODO update the JSON string below json = "{}" # create an instance of EndpointResultRequestFilter from a JSON string endpoint_result_request_filter_instance = EndpointResultRequestFilter.from_json(json) # print the JSON string representation of the object -print EndpointResultRequestFilter.to_json() +print(EndpointResultRequestFilter.to_json()) # convert the object into a dict endpoint_result_request_filter_dict = endpoint_result_request_filter_instance.to_dict() # create an instance of EndpointResultRequestFilter from a dict -endpoint_result_request_filter_form_dict = endpoint_result_request_filter.from_dict(endpoint_result_request_filter_dict) +endpoint_result_request_filter_from_dict = EndpointResultRequestFilter.from_dict(endpoint_result_request_filter_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/endpoint/test_results_api/docs/EndpointScheduledTest.md b/endpoint_test_results/docs/EndpointScheduledTest.md similarity index 83% rename from endpoint/test_results_api/docs/EndpointScheduledTest.md rename to endpoint_test_results/docs/EndpointScheduledTest.md index 91c3eacd..9ff262d7 100644 --- a/endpoint/test_results_api/docs/EndpointScheduledTest.md +++ b/endpoint_test_results/docs/EndpointScheduledTest.md @@ -2,13 +2,15 @@ ## 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] **links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] **agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] **created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] **interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] **is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] **has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] **modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] @@ -17,15 +19,16 @@ Name | Type | Description | Notes **protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] **server** | **str** | Target domain name or IP address. | [optional] **test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] **test_name** | **str** | Name of the test. | [optional] -**type** | [**EndpointHttpServerType**](EndpointHttpServerType.md) | | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] **http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] **url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.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] @@ -39,19 +42,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest # TODO update the JSON string below json = "{}" # create an instance of EndpointScheduledTest from a JSON string endpoint_scheduled_test_instance = EndpointScheduledTest.from_json(json) # print the JSON string representation of the object -print EndpointScheduledTest.to_json() +print(EndpointScheduledTest.to_json()) # convert the object into a dict endpoint_scheduled_test_dict = endpoint_scheduled_test_instance.to_dict() # create an instance of EndpointScheduledTest from a dict -endpoint_scheduled_test_form_dict = endpoint_scheduled_test.from_dict(endpoint_scheduled_test_dict) +endpoint_scheduled_test_from_dict = EndpointScheduledTest.from_dict(endpoint_scheduled_test_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/endpoint_test_results/docs/EndpointScheduledTestType.md b/endpoint_test_results/docs/EndpointScheduledTestType.md new file mode 100644 index 00000000..0d4f39c5 --- /dev/null +++ b/endpoint_test_results/docs/EndpointScheduledTestType.md @@ -0,0 +1,12 @@ +# EndpointScheduledTestType + +Type of test being queried. + +## 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/endpoint_test_results/docs/EndpointSpecificAgentsSelectorConfig.md b/endpoint_test_results/docs/EndpointSpecificAgentsSelectorConfig.md new file mode 100644 index 00000000..b6dc3c10 --- /dev/null +++ b/endpoint_test_results/docs/EndpointSpecificAgentsSelectorConfig.md @@ -0,0 +1,32 @@ +# EndpointSpecificAgentsSelectorConfig + +Specific agents selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointSpecificAgentsSelectorConfig from a JSON string +endpoint_specific_agents_selector_config_instance = EndpointSpecificAgentsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointSpecificAgentsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_specific_agents_selector_config_dict = endpoint_specific_agents_selector_config_instance.to_dict() +# create an instance of EndpointSpecificAgentsSelectorConfig from a dict +endpoint_specific_agents_selector_config_from_dict = EndpointSpecificAgentsSelectorConfig.from_dict(endpoint_specific_agents_selector_config_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/endpoint_test_results/docs/EndpointTest.md b/endpoint_test_results/docs/EndpointTest.md new file mode 100644 index 00000000..b944e4b9 --- /dev/null +++ b/endpoint_test_results/docs/EndpointTest.md @@ -0,0 +1,46 @@ +# EndpointTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | [**EndpointScheduledTestType**](EndpointScheduledTestType.md) | | +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_test import EndpointTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTest from a JSON string +endpoint_test_instance = EndpointTest.from_json(json) +# print the JSON string representation of the object +print(EndpointTest.to_json()) + +# convert the object into a dict +endpoint_test_dict = endpoint_test_instance.to_dict() +# create an instance of EndpointTest from a dict +endpoint_test_from_dict = EndpointTest.from_dict(endpoint_test_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/endpoint_test_results/docs/EndpointTestAuthType.md b/endpoint_test_results/docs/EndpointTestAuthType.md new file mode 100644 index 00000000..b0e0f2c0 --- /dev/null +++ b/endpoint_test_results/docs/EndpointTestAuthType.md @@ -0,0 +1,12 @@ +# EndpointTestAuthType + +HTTP authentication type. + +## 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/endpoint_test_results/docs/EndpointTestLinks.md b/endpoint_test_results/docs/EndpointTestLinks.md new file mode 100644 index 00000000..14c899c8 --- /dev/null +++ b/endpoint_test_results/docs/EndpointTestLinks.md @@ -0,0 +1,31 @@ +# EndpointTestLinks + +A list of links that can be accessed to get more information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**EndpointTestLinksSelf**](EndpointTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTestLinks from a JSON string +endpoint_test_links_instance = EndpointTestLinks.from_json(json) +# print the JSON string representation of the object +print(EndpointTestLinks.to_json()) + +# convert the object into a dict +endpoint_test_links_dict = endpoint_test_links_instance.to_dict() +# create an instance of EndpointTestLinks from a dict +endpoint_test_links_from_dict = EndpointTestLinks.from_dict(endpoint_test_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/endpoint_test_results/docs/EndpointTestLinksSelf.md b/endpoint_test_results/docs/EndpointTestLinksSelf.md new file mode 100644 index 00000000..028fb703 --- /dev/null +++ b/endpoint_test_results/docs/EndpointTestLinksSelf.md @@ -0,0 +1,36 @@ +# EndpointTestLinksSelf + + +## 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 endpoint_test_results.models.endpoint_test_links_self import EndpointTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTestLinksSelf from a JSON string +endpoint_test_links_self_instance = EndpointTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(EndpointTestLinksSelf.to_json()) + +# convert the object into a dict +endpoint_test_links_self_dict = endpoint_test_links_self_instance.to_dict() +# create an instance of EndpointTestLinksSelf from a dict +endpoint_test_links_self_from_dict = EndpointTestLinksSelf.from_dict(endpoint_test_links_self_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/endpoint_test_results/docs/EndpointTestProtocol.md b/endpoint_test_results/docs/EndpointTestProtocol.md new file mode 100644 index 00000000..8459ae85 --- /dev/null +++ b/endpoint_test_results/docs/EndpointTestProtocol.md @@ -0,0 +1,12 @@ +# EndpointTestProtocol + +Protocol used to perform the test. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint_test_results/docs/Error.md b/endpoint_test_results/docs/Error.md new file mode 100644 index 00000000..42ad31fa --- /dev/null +++ b/endpoint_test_results/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 endpoint_test_results.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/endpoint_test_results/docs/EthernetProfile.md b/endpoint_test_results/docs/EthernetProfile.md new file mode 100644 index 00000000..0f504ea1 --- /dev/null +++ b/endpoint_test_results/docs/EthernetProfile.md @@ -0,0 +1,29 @@ +# EthernetProfile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link_speed** | **float** | Ethernet profile link speed | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.ethernet_profile import EthernetProfile + +# TODO update the JSON string below +json = "{}" +# create an instance of EthernetProfile from a JSON string +ethernet_profile_instance = EthernetProfile.from_json(json) +# print the JSON string representation of the object +print(EthernetProfile.to_json()) + +# convert the object into a dict +ethernet_profile_dict = ethernet_profile_instance.to_dict() +# create an instance of EthernetProfile from a dict +ethernet_profile_from_dict = EthernetProfile.from_dict(ethernet_profile_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/endpoint_test_results/docs/Expand.md b/endpoint_test_results/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/endpoint_test_results/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/endpoint/test_results_api/docs/GetDynamicTestResultNetworkPathvis200Response.md b/endpoint_test_results/docs/GetDynamicTestResultNetworkPathvis200Response.md similarity index 77% rename from endpoint/test_results_api/docs/GetDynamicTestResultNetworkPathvis200Response.md rename to endpoint_test_results/docs/GetDynamicTestResultNetworkPathvis200Response.md index 442269af..0642d3df 100644 --- a/endpoint/test_results_api/docs/GetDynamicTestResultNetworkPathvis200Response.md +++ b/endpoint_test_results/docs/GetDynamicTestResultNetworkPathvis200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisDynamicTestResult]**](PathVisDynamicTestResult.md) | | [optional] **test** | [**DynamicTest**](DynamicTest.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** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response # TODO update the JSON string below json = "{}" # create an instance of GetDynamicTestResultNetworkPathvis200Response from a JSON string get_dynamic_test_result_network_pathvis200_response_instance = GetDynamicTestResultNetworkPathvis200Response.from_json(json) # print the JSON string representation of the object -print GetDynamicTestResultNetworkPathvis200Response.to_json() +print(GetDynamicTestResultNetworkPathvis200Response.to_json()) # convert the object into a dict get_dynamic_test_result_network_pathvis200_response_dict = get_dynamic_test_result_network_pathvis200_response_instance.to_dict() # create an instance of GetDynamicTestResultNetworkPathvis200Response from a dict -get_dynamic_test_result_network_pathvis200_response_form_dict = get_dynamic_test_result_network_pathvis200_response.from_dict(get_dynamic_test_result_network_pathvis200_response_dict) +get_dynamic_test_result_network_pathvis200_response_from_dict = GetDynamicTestResultNetworkPathvis200Response.from_dict(get_dynamic_test_result_network_pathvis200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_test_results/docs/GetDynamicTestResultPathvisAgentRound200Response.md b/endpoint_test_results/docs/GetDynamicTestResultPathvisAgentRound200Response.md new file mode 100644 index 00000000..4244b2ce --- /dev/null +++ b/endpoint_test_results/docs/GetDynamicTestResultPathvisAgentRound200Response.md @@ -0,0 +1,31 @@ +# GetDynamicTestResultPathvisAgentRound200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PathVisDetailDynamicTestResult]**](PathVisDetailDynamicTestResult.md) | | [optional] +**test** | [**DynamicTest**](DynamicTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDynamicTestResultPathvisAgentRound200Response from a JSON string +get_dynamic_test_result_pathvis_agent_round200_response_instance = GetDynamicTestResultPathvisAgentRound200Response.from_json(json) +# print the JSON string representation of the object +print(GetDynamicTestResultPathvisAgentRound200Response.to_json()) + +# convert the object into a dict +get_dynamic_test_result_pathvis_agent_round200_response_dict = get_dynamic_test_result_pathvis_agent_round200_response_instance.to_dict() +# create an instance of GetDynamicTestResultPathvisAgentRound200Response from a dict +get_dynamic_test_result_pathvis_agent_round200_response_from_dict = GetDynamicTestResultPathvisAgentRound200Response.from_dict(get_dynamic_test_result_pathvis_agent_round200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint_test_results/docs/GetEndpointLocalNetworkTopologyDetails200Response.md b/endpoint_test_results/docs/GetEndpointLocalNetworkTopologyDetails200Response.md new file mode 100644 index 00000000..07795e8a --- /dev/null +++ b/endpoint_test_results/docs/GetEndpointLocalNetworkTopologyDetails200Response.md @@ -0,0 +1,30 @@ +# GetEndpointLocalNetworkTopologyDetails200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[LocalNetworkTopologyResult]**](LocalNetworkTopologyResult.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEndpointLocalNetworkTopologyDetails200Response from a JSON string +get_endpoint_local_network_topology_details200_response_instance = GetEndpointLocalNetworkTopologyDetails200Response.from_json(json) +# print the JSON string representation of the object +print(GetEndpointLocalNetworkTopologyDetails200Response.to_json()) + +# convert the object into a dict +get_endpoint_local_network_topology_details200_response_dict = get_endpoint_local_network_topology_details200_response_instance.to_dict() +# create an instance of GetEndpointLocalNetworkTopologyDetails200Response from a dict +get_endpoint_local_network_topology_details200_response_from_dict = GetEndpointLocalNetworkTopologyDetails200Response.from_dict(get_endpoint_local_network_topology_details200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/test_results_api/docs/GetEndpointLocalNetworks200Response.md b/endpoint_test_results/docs/GetEndpointLocalNetworks200Response.md similarity index 75% rename from endpoint/test_results_api/docs/GetEndpointLocalNetworks200Response.md rename to endpoint_test_results/docs/GetEndpointLocalNetworks200Response.md index b4bc9e23..74fee9b1 100644 --- a/endpoint/test_results_api/docs/GetEndpointLocalNetworks200Response.md +++ b/endpoint_test_results/docs/GetEndpointLocalNetworks200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **local_networks** | [**List[LocalNetworkResult]**](LocalNetworkResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response +from endpoint_test_results.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointLocalNetworks200Response from a JSON string get_endpoint_local_networks200_response_instance = GetEndpointLocalNetworks200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointLocalNetworks200Response.to_json() +print(GetEndpointLocalNetworks200Response.to_json()) # convert the object into a dict get_endpoint_local_networks200_response_dict = get_endpoint_local_networks200_response_instance.to_dict() # create an instance of GetEndpointLocalNetworks200Response from a dict -get_endpoint_local_networks200_response_form_dict = get_endpoint_local_networks200_response.from_dict(get_endpoint_local_networks200_response_dict) +get_endpoint_local_networks200_response_from_dict = GetEndpointLocalNetworks200Response.from_dict(get_endpoint_local_networks200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologies200Response.md b/endpoint_test_results/docs/GetEndpointLocalNetworksTopologies200Response.md similarity index 81% rename from endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologies200Response.md rename to endpoint_test_results/docs/GetEndpointLocalNetworksTopologies200Response.md index 2739b201..5bd27717 100644 --- a/endpoint/test_results_api/docs/GetEndpointLocalNetworksTopologies200Response.md +++ b/endpoint_test_results/docs/GetEndpointLocalNetworksTopologies200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointLocalNetworksTopologies200Response from a JSON string get_endpoint_local_networks_topologies200_response_instance = GetEndpointLocalNetworksTopologies200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointLocalNetworksTopologies200Response.to_json() +print(GetEndpointLocalNetworksTopologies200Response.to_json()) # convert the object into a dict get_endpoint_local_networks_topologies200_response_dict = get_endpoint_local_networks_topologies200_response_instance.to_dict() # create an instance of GetEndpointLocalNetworksTopologies200Response from a dict -get_endpoint_local_networks_topologies200_response_form_dict = get_endpoint_local_networks_topologies200_response.from_dict(get_endpoint_local_networks_topologies200_response_dict) +get_endpoint_local_networks_topologies200_response_from_dict = GetEndpointLocalNetworksTopologies200Response.from_dict(get_endpoint_local_networks_topologies200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_test_results/docs/GetEndpointLocalNetworksTopologiesRequest.md b/endpoint_test_results/docs/GetEndpointLocalNetworksTopologiesRequest.md new file mode 100644 index 00000000..11e7ab4f --- /dev/null +++ b/endpoint_test_results/docs/GetEndpointLocalNetworksTopologiesRequest.md @@ -0,0 +1,29 @@ +# GetEndpointLocalNetworksTopologiesRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**search_filters** | [**EndpointNetworkTopologyResultRequestFilter**](EndpointNetworkTopologyResultRequestFilter.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEndpointLocalNetworksTopologiesRequest from a JSON string +get_endpoint_local_networks_topologies_request_instance = GetEndpointLocalNetworksTopologiesRequest.from_json(json) +# print the JSON string representation of the object +print(GetEndpointLocalNetworksTopologiesRequest.to_json()) + +# convert the object into a dict +get_endpoint_local_networks_topologies_request_dict = get_endpoint_local_networks_topologies_request_instance.to_dict() +# create an instance of GetEndpointLocalNetworksTopologiesRequest from a dict +get_endpoint_local_networks_topologies_request_from_dict = GetEndpointLocalNetworksTopologiesRequest.from_dict(get_endpoint_local_networks_topologies_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/endpoint_test_results/docs/GetEndpointRealUserTestDetails200Response.md b/endpoint_test_results/docs/GetEndpointRealUserTestDetails200Response.md new file mode 100644 index 00000000..acb27809 --- /dev/null +++ b/endpoint_test_results/docs/GetEndpointRealUserTestDetails200Response.md @@ -0,0 +1,30 @@ +# GetEndpointRealUserTestDetails200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[EndpointRealUserTestDetail]**](EndpointRealUserTestDetail.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEndpointRealUserTestDetails200Response from a JSON string +get_endpoint_real_user_test_details200_response_instance = GetEndpointRealUserTestDetails200Response.from_json(json) +# print the JSON string representation of the object +print(GetEndpointRealUserTestDetails200Response.to_json()) + +# convert the object into a dict +get_endpoint_real_user_test_details200_response_dict = get_endpoint_real_user_test_details200_response_instance.to_dict() +# create an instance of GetEndpointRealUserTestDetails200Response from a dict +get_endpoint_real_user_test_details200_response_from_dict = GetEndpointRealUserTestDetails200Response.from_dict(get_endpoint_real_user_test_details200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint_test_results/docs/GetEndpointRealUserTestPagesDetails200Response.md b/endpoint_test_results/docs/GetEndpointRealUserTestPagesDetails200Response.md new file mode 100644 index 00000000..54f13315 --- /dev/null +++ b/endpoint_test_results/docs/GetEndpointRealUserTestPagesDetails200Response.md @@ -0,0 +1,29 @@ +# GetEndpointRealUserTestPagesDetails200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEndpointRealUserTestPagesDetails200Response from a JSON string +get_endpoint_real_user_test_pages_details200_response_instance = GetEndpointRealUserTestPagesDetails200Response.from_json(json) +# print the JSON string representation of the object +print(GetEndpointRealUserTestPagesDetails200Response.to_json()) + +# convert the object into a dict +get_endpoint_real_user_test_pages_details200_response_dict = get_endpoint_real_user_test_pages_details200_response_instance.to_dict() +# create an instance of GetEndpointRealUserTestPagesDetails200Response from a dict +get_endpoint_real_user_test_pages_details200_response_from_dict = GetEndpointRealUserTestPagesDetails200Response.from_dict(get_endpoint_real_user_test_pages_details200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/test_results_api/docs/GetEndpointRealUserTests200Response.md b/endpoint_test_results/docs/GetEndpointRealUserTests200Response.md similarity index 83% rename from endpoint/test_results_api/docs/GetEndpointRealUserTests200Response.md rename to endpoint_test_results/docs/GetEndpointRealUserTests200Response.md index ca241c24..11162ddc 100644 --- a/endpoint/test_results_api/docs/GetEndpointRealUserTests200Response.md +++ b/endpoint_test_results/docs/GetEndpointRealUserTests200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response +from endpoint_test_results.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointRealUserTests200Response from a JSON string get_endpoint_real_user_tests200_response_instance = GetEndpointRealUserTests200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointRealUserTests200Response.to_json() +print(GetEndpointRealUserTests200Response.to_json()) # convert the object into a dict get_endpoint_real_user_tests200_response_dict = get_endpoint_real_user_tests200_response_instance.to_dict() # create an instance of GetEndpointRealUserTests200Response from a dict -get_endpoint_real_user_tests200_response_form_dict = get_endpoint_real_user_tests200_response.from_dict(get_endpoint_real_user_tests200_response_dict) +get_endpoint_real_user_tests200_response_from_dict = GetEndpointRealUserTests200Response.from_dict(get_endpoint_real_user_tests200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/GetEndpointRealUserTestsNetwork200Response.md b/endpoint_test_results/docs/GetEndpointRealUserTestsNetwork200Response.md similarity index 82% rename from endpoint/test_results_api/docs/GetEndpointRealUserTestsNetwork200Response.md rename to endpoint_test_results/docs/GetEndpointRealUserTestsNetwork200Response.md index 0a39d45e..86e4f6ef 100644 --- a/endpoint/test_results_api/docs/GetEndpointRealUserTestsNetwork200Response.md +++ b/endpoint_test_results/docs/GetEndpointRealUserTestsNetwork200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointRealUserTestsNetwork200Response from a JSON string get_endpoint_real_user_tests_network200_response_instance = GetEndpointRealUserTestsNetwork200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointRealUserTestsNetwork200Response.to_json() +print(GetEndpointRealUserTestsNetwork200Response.to_json()) # convert the object into a dict get_endpoint_real_user_tests_network200_response_dict = get_endpoint_real_user_tests_network200_response_instance.to_dict() # create an instance of GetEndpointRealUserTestsNetwork200Response from a dict -get_endpoint_real_user_tests_network200_response_form_dict = get_endpoint_real_user_tests_network200_response.from_dict(get_endpoint_real_user_tests_network200_response_dict) +get_endpoint_real_user_tests_network200_response_from_dict = GetEndpointRealUserTestsNetwork200Response.from_dict(get_endpoint_real_user_tests_network200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/GetEndpointRealUserTestsPages200Response.md b/endpoint_test_results/docs/GetEndpointRealUserTestsPages200Response.md similarity index 82% rename from endpoint/test_results_api/docs/GetEndpointRealUserTestsPages200Response.md rename to endpoint_test_results/docs/GetEndpointRealUserTestsPages200Response.md index 7cb3a2dc..8e146ed8 100644 --- a/endpoint/test_results_api/docs/GetEndpointRealUserTestsPages200Response.md +++ b/endpoint_test_results/docs/GetEndpointRealUserTestsPages200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointRealUserTestsPages200Response from a JSON string get_endpoint_real_user_tests_pages200_response_instance = GetEndpointRealUserTestsPages200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointRealUserTestsPages200Response.to_json() +print(GetEndpointRealUserTestsPages200Response.to_json()) # convert the object into a dict get_endpoint_real_user_tests_pages200_response_dict = get_endpoint_real_user_tests_pages200_response_instance.to_dict() # create an instance of GetEndpointRealUserTestsPages200Response from a dict -get_endpoint_real_user_tests_pages200_response_form_dict = get_endpoint_real_user_tests_pages200_response.from_dict(get_endpoint_real_user_tests_pages200_response_dict) +get_endpoint_real_user_tests_pages200_response_from_dict = GetEndpointRealUserTestsPages200Response.from_dict(get_endpoint_real_user_tests_pages200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/GetEndpointRealUserTestsRequest.md b/endpoint_test_results/docs/GetEndpointRealUserTestsRequest.md similarity index 76% rename from endpoint/test_results_api/docs/GetEndpointRealUserTestsRequest.md rename to endpoint_test_results/docs/GetEndpointRealUserTestsRequest.md index ba45c8c5..a678b467 100644 --- a/endpoint/test_results_api/docs/GetEndpointRealUserTestsRequest.md +++ b/endpoint_test_results/docs/GetEndpointRealUserTestsRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **search_filters** | [**EndpointRealUserTestResultRequestFilter**](EndpointRealUserTestResultRequestFilter.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest # TODO update the JSON string below json = "{}" # create an instance of GetEndpointRealUserTestsRequest from a JSON string get_endpoint_real_user_tests_request_instance = GetEndpointRealUserTestsRequest.from_json(json) # print the JSON string representation of the object -print GetEndpointRealUserTestsRequest.to_json() +print(GetEndpointRealUserTestsRequest.to_json()) # convert the object into a dict get_endpoint_real_user_tests_request_dict = get_endpoint_real_user_tests_request_instance.to_dict() # create an instance of GetEndpointRealUserTestsRequest from a dict -get_endpoint_real_user_tests_request_form_dict = get_endpoint_real_user_tests_request.from_dict(get_endpoint_real_user_tests_request_dict) +get_endpoint_real_user_tests_request_from_dict = GetEndpointRealUserTestsRequest.from_dict(get_endpoint_real_user_tests_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/endpoint_test_results/docs/GetTestResultHttpServer200Response.md b/endpoint_test_results/docs/GetTestResultHttpServer200Response.md new file mode 100644 index 00000000..ffc7f525 --- /dev/null +++ b/endpoint_test_results/docs/GetTestResultHttpServer200Response.md @@ -0,0 +1,33 @@ +# GetTestResultHttpServer200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] +**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.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** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultHttpServer200Response from a JSON string +get_test_result_http_server200_response_instance = GetTestResultHttpServer200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultHttpServer200Response.to_json()) + +# convert the object into a dict +get_test_result_http_server200_response_dict = get_test_result_http_server200_response_instance.to_dict() +# create an instance of GetTestResultHttpServer200Response from a dict +get_test_result_http_server200_response_from_dict = GetTestResultHttpServer200Response.from_dict(get_test_result_http_server200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint_test_results/docs/GetTestResultNetworkPathvis200Response.md b/endpoint_test_results/docs/GetTestResultNetworkPathvis200Response.md new file mode 100644 index 00000000..b88ed9b9 --- /dev/null +++ b/endpoint_test_results/docs/GetTestResultNetworkPathvis200Response.md @@ -0,0 +1,33 @@ +# GetTestResultNetworkPathvis200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [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] +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultNetworkPathvis200Response from a JSON string +get_test_result_network_pathvis200_response_instance = GetTestResultNetworkPathvis200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultNetworkPathvis200Response.to_json()) + +# convert the object into a dict +get_test_result_network_pathvis200_response_dict = get_test_result_network_pathvis200_response_instance.to_dict() +# create an instance of GetTestResultNetworkPathvis200Response from a dict +get_test_result_network_pathvis200_response_from_dict = GetTestResultNetworkPathvis200Response.from_dict(get_test_result_network_pathvis200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/test_results_api/docs/GetTestResultPathvisAgentRound200Response.md b/endpoint_test_results/docs/GetTestResultPathvisAgentRound200Response.md similarity index 75% rename from endpoint/test_results_api/docs/GetTestResultPathvisAgentRound200Response.md rename to endpoint_test_results/docs/GetTestResultPathvisAgentRound200Response.md index f80eeded..c34b66e2 100644 --- a/endpoint/test_results_api/docs/GetTestResultPathvisAgentRound200Response.md +++ b/endpoint_test_results/docs/GetTestResultPathvisAgentRound200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisDetailTestResult]**](PathVisDetailTestResult.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response +from endpoint_test_results.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultPathvisAgentRound200Response from a JSON string get_test_result_pathvis_agent_round200_response_instance = GetTestResultPathvisAgentRound200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultPathvisAgentRound200Response.to_json() +print(GetTestResultPathvisAgentRound200Response.to_json()) # convert the object into a dict get_test_result_pathvis_agent_round200_response_dict = get_test_result_pathvis_agent_round200_response_instance.to_dict() # create an instance of GetTestResultPathvisAgentRound200Response from a dict -get_test_result_pathvis_agent_round200_response_form_dict = get_test_result_pathvis_agent_round200_response.from_dict(get_test_result_pathvis_agent_round200_response_dict) +get_test_result_pathvis_agent_round200_response_from_dict = GetTestResultPathvisAgentRound200Response.from_dict(get_test_result_pathvis_agent_round200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/Hop.md b/endpoint_test_results/docs/Hop.md similarity index 88% rename from endpoint/test_results_api/docs/Hop.md rename to endpoint_test_results/docs/Hop.md index bf1b6050..ef8af0a5 100644 --- a/endpoint/test_results_api/docs/Hop.md +++ b/endpoint_test_results/docs/Hop.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hop** | **int** | The hop index. | [optional] [readonly] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.hop import Hop +from endpoint_test_results.models.hop import Hop # TODO update the JSON string below json = "{}" # create an instance of Hop from a JSON string hop_instance = Hop.from_json(json) # print the JSON string representation of the object -print Hop.to_json() +print(Hop.to_json()) # convert the object into a dict hop_dict = hop_instance.to_dict() # create an instance of Hop from a dict -hop_form_dict = hop.from_dict(hop_dict) +hop_from_dict = Hop.from_dict(hop_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/endpoint/test_results_api/docs/HttpErrorType.md b/endpoint_test_results/docs/HttpErrorType.md similarity index 99% rename from endpoint/test_results_api/docs/HttpErrorType.md rename to endpoint_test_results/docs/HttpErrorType.md index 44c5e0a2..54221d06 100644 --- a/endpoint/test_results_api/docs/HttpErrorType.md +++ b/endpoint_test_results/docs/HttpErrorType.md @@ -3,6 +3,7 @@ Type of error encountered; corresponds to phase of connection. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_test_results/docs/HttpTestResult.md b/endpoint_test_results/docs/HttpTestResult.md new file mode 100644 index 00000000..48a48641 --- /dev/null +++ b/endpoint_test_results/docs/HttpTestResult.md @@ -0,0 +1,49 @@ +# HttpTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of destination server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**connect_time** | **int** | Time required to establish a TCP connection to the server in milliseconds. | [optional] [readonly] +**dns_time** | **int** | Time required to resolve DNS in milliseconds. | [optional] [readonly] +**error_type** | [**HttpErrorType**](HttpErrorType.md) | | [optional] +**error_details** | **str** | Error details, if an error were encountered. | [optional] [readonly] +**headers** | [**HttpTestResultHeaders**](HttpTestResultHeaders.md) | | [optional] +**num_redirects** | **int** | Number of redirects. | [optional] [readonly] +**receive_time** | **int** | Elapsed time between first and last byte of response in milliseconds. | [optional] [readonly] +**redirect_time** | **int** | Cumulative redirect timing in milliseconds. | [optional] [readonly] +**response_code** | **int** | HTTP response code. | [optional] [readonly] +**response_time** | **int** | Time to first byte in milliseconds. | [optional] [readonly] +**ssl_time** | **int** | Time to negotiate SSL/TLS in milliseconds. | [optional] [readonly] +**total_time** | **int** | Total time is the response time + receive time. | [optional] [readonly] +**wait_time** | **int** | Time elapsed between completion of request and first byte of response in milliseconds. | [optional] [readonly] +**wire_size** | **int** | Size of content in bytes. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.http_test_result import HttpTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpTestResult from a JSON string +http_test_result_instance = HttpTestResult.from_json(json) +# print the JSON string representation of the object +print(HttpTestResult.to_json()) + +# convert the object into a dict +http_test_result_dict = http_test_result_instance.to_dict() +# create an instance of HttpTestResult from a dict +http_test_result_from_dict = HttpTestResult.from_dict(http_test_result_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/endpoint_test_results/docs/HttpTestResultHeaders.md b/endpoint_test_results/docs/HttpTestResultHeaders.md new file mode 100644 index 00000000..4b1ecf65 --- /dev/null +++ b/endpoint_test_results/docs/HttpTestResultHeaders.md @@ -0,0 +1,31 @@ +# HttpTestResultHeaders + +Expandable object containing both request and response headers. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_headers** | **str** | CRLF-delimited list of request headers in `header: value` format. | [optional] [readonly] +**response_headers** | **str** | CRLF-delimited list of response headers in `header: value` format. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.http_test_result_headers import HttpTestResultHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpTestResultHeaders from a JSON string +http_test_result_headers_instance = HttpTestResultHeaders.from_json(json) +# print the JSON string representation of the object +print(HttpTestResultHeaders.to_json()) + +# convert the object into a dict +http_test_result_headers_dict = http_test_result_headers_instance.to_dict() +# create an instance of HttpTestResultHeaders from a dict +http_test_result_headers_from_dict = HttpTestResultHeaders.from_dict(http_test_result_headers_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/endpoint_test_results/docs/HttpTestResults.md b/endpoint_test_results/docs/HttpTestResults.md new file mode 100644 index 00000000..d43ace54 --- /dev/null +++ b/endpoint_test_results/docs/HttpTestResults.md @@ -0,0 +1,30 @@ +# HttpTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] +**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.http_test_results import HttpTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpTestResults from a JSON string +http_test_results_instance = HttpTestResults.from_json(json) +# print the JSON string representation of the object +print(HttpTestResults.to_json()) + +# convert the object into a dict +http_test_results_dict = http_test_results_instance.to_dict() +# create an instance of HttpTestResults from a dict +http_test_results_from_dict = HttpTestResults.from_dict(http_test_results_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/endpoint_test_results/docs/InterfaceHardwareType.md b/endpoint_test_results/docs/InterfaceHardwareType.md new file mode 100644 index 00000000..f150d49d --- /dev/null +++ b/endpoint_test_results/docs/InterfaceHardwareType.md @@ -0,0 +1,11 @@ +# InterfaceHardwareType + + +## 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/endpoint_test_results/docs/Link.md b/endpoint_test_results/docs/Link.md new file mode 100644 index 00000000..c6359bd6 --- /dev/null +++ b/endpoint_test_results/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 endpoint_test_results.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/endpoint/test_results_api/docs/LocalNetworkResult.md b/endpoint_test_results/docs/LocalNetworkResult.md similarity index 83% rename from endpoint/test_results_api/docs/LocalNetworkResult.md rename to endpoint_test_results/docs/LocalNetworkResult.md index 87138a95..cd29c6e9 100644 --- a/endpoint/test_results_api/docs/LocalNetworkResult.md +++ b/endpoint_test_results/docs/LocalNetworkResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **network_id** | **str** | The network ID. Each network occurrence has a unique ID. | [optional] [readonly] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.local_network_result import LocalNetworkResult +from endpoint_test_results.models.local_network_result import LocalNetworkResult # TODO update the JSON string below json = "{}" # create an instance of LocalNetworkResult from a JSON string local_network_result_instance = LocalNetworkResult.from_json(json) # print the JSON string representation of the object -print LocalNetworkResult.to_json() +print(LocalNetworkResult.to_json()) # convert the object into a dict local_network_result_dict = local_network_result_instance.to_dict() # create an instance of LocalNetworkResult from a dict -local_network_result_form_dict = local_network_result.from_dict(local_network_result_dict) +local_network_result_from_dict = LocalNetworkResult.from_dict(local_network_result_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/endpoint/test_results_api/docs/LocalNetworkResults.md b/endpoint_test_results/docs/LocalNetworkResults.md similarity index 79% rename from endpoint/test_results_api/docs/LocalNetworkResults.md rename to endpoint_test_results/docs/LocalNetworkResults.md index 20ce0e6f..2b65a64c 100644 --- a/endpoint/test_results_api/docs/LocalNetworkResults.md +++ b/endpoint_test_results/docs/LocalNetworkResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **local_networks** | [**List[LocalNetworkResult]**](LocalNetworkResult.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.local_network_results import LocalNetworkResults +from endpoint_test_results.models.local_network_results import LocalNetworkResults # TODO update the JSON string below json = "{}" # create an instance of LocalNetworkResults from a JSON string local_network_results_instance = LocalNetworkResults.from_json(json) # print the JSON string representation of the object -print LocalNetworkResults.to_json() +print(LocalNetworkResults.to_json()) # convert the object into a dict local_network_results_dict = local_network_results_instance.to_dict() # create an instance of LocalNetworkResults from a dict -local_network_results_form_dict = local_network_results.from_dict(local_network_results_dict) +local_network_results_from_dict = LocalNetworkResults.from_dict(local_network_results_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/endpoint/test_results_api/docs/LocalNetworkTestsResultsApi.md b/endpoint_test_results/docs/LocalNetworkTestsResultsApi.md similarity index 87% rename from endpoint/test_results_api/docs/LocalNetworkTestsResultsApi.md rename to endpoint_test_results/docs/LocalNetworkTestsResultsApi.md index 33ba9a38..abf7f51b 100644 --- a/endpoint/test_results_api/docs/LocalNetworkTestsResultsApi.md +++ b/endpoint_test_results/docs/LocalNetworkTestsResultsApi.md @@ -1,4 +1,4 @@ -# test_results_api.LocalNetworkTestsResultsApi +# endpoint_test_results.LocalNetworkTestsResultsApi All URIs are relative to *https://api.thousandeyes.com* @@ -19,17 +19,16 @@ Returns detailed data of a local network topology. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,16 +38,16 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.LocalNetworkTestsResultsApi(api_client) + api_instance = endpoint_test_results.LocalNetworkTestsResultsApi(api_client) network_topology_id = '00160:39c518560de9:1491651900:236e6f18' # str | The network topology ID. - aid = '2067' # 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) + 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 @@ -63,6 +62,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **network_topology_id** | **str**| The network topology ID. | @@ -82,6 +82,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -104,17 +105,16 @@ Returns a list of all the networks used by endpoint agents. Sends back a `local ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -124,15 +124,15 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.LocalNetworkTestsResultsApi(api_client) - aid = '2067' # 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) + api_instance = 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 @@ -147,6 +147,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### 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] @@ -165,6 +166,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -187,18 +189,17 @@ Returns a list of all endpoint local network topologies probes. Results from th ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response -from test_results_api.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -208,20 +209,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.LocalNetworkTestsResultsApi(api_client) - aid = '2067' # 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) + api_instance = 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) 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 `_links` instead of this parameter. (optional) - get_endpoint_local_networks_topologies_request = test_results_api.GetEndpointLocalNetworksTopologiesRequest() # GetEndpointLocalNetworksTopologiesRequest | (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + get_endpoint_local_networks_topologies_request = endpoint_test_results.GetEndpointLocalNetworksTopologiesRequest() # GetEndpointLocalNetworksTopologiesRequest | (optional) try: # List endpoint network topologies probes @@ -236,13 +237,14 @@ with test_results_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] **get_endpoint_local_networks_topologies_request** | [**GetEndpointLocalNetworksTopologiesRequest**](GetEndpointLocalNetworksTopologiesRequest.md)| | [optional] ### Return type @@ -259,6 +261,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint/test_results_api/docs/LocalNetworkTopologyDetailResults.md b/endpoint_test_results/docs/LocalNetworkTopologyDetailResults.md similarity index 75% rename from endpoint/test_results_api/docs/LocalNetworkTopologyDetailResults.md rename to endpoint_test_results/docs/LocalNetworkTopologyDetailResults.md index c14a8a8a..6f1e23ce 100644 --- a/endpoint/test_results_api/docs/LocalNetworkTopologyDetailResults.md +++ b/endpoint_test_results/docs/LocalNetworkTopologyDetailResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[LocalNetworkTopologyResult]**](LocalNetworkTopologyResult.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults +from endpoint_test_results.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults # TODO update the JSON string below json = "{}" # create an instance of LocalNetworkTopologyDetailResults from a JSON string local_network_topology_detail_results_instance = LocalNetworkTopologyDetailResults.from_json(json) # print the JSON string representation of the object -print LocalNetworkTopologyDetailResults.to_json() +print(LocalNetworkTopologyDetailResults.to_json()) # convert the object into a dict local_network_topology_detail_results_dict = local_network_topology_detail_results_instance.to_dict() # create an instance of LocalNetworkTopologyDetailResults from a dict -local_network_topology_detail_results_form_dict = local_network_topology_detail_results.from_dict(local_network_topology_detail_results_dict) +local_network_topology_detail_results_from_dict = LocalNetworkTopologyDetailResults.from_dict(local_network_topology_detail_results_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/endpoint/test_results_api/docs/LocalNetworkTopologyResult.md b/endpoint_test_results/docs/LocalNetworkTopologyResult.md similarity index 89% rename from endpoint/test_results_api/docs/LocalNetworkTopologyResult.md rename to endpoint_test_results/docs/LocalNetworkTopologyResult.md index 7645f413..78f2929c 100644 --- a/endpoint/test_results_api/docs/LocalNetworkTopologyResult.md +++ b/endpoint_test_results/docs/LocalNetworkTopologyResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] @@ -10,7 +11,7 @@ Name | Type | Description | Notes **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] -**type** | [**NetworkTopologyType**](NetworkTopologyType.md) | | [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] **tcp_connect** | [**TcpConnect**](TcpConnect.md) | | [optional] @@ -23,19 +24,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.local_network_topology_result import LocalNetworkTopologyResult +from endpoint_test_results.models.local_network_topology_result import LocalNetworkTopologyResult # TODO update the JSON string below json = "{}" # create an instance of LocalNetworkTopologyResult from a JSON string local_network_topology_result_instance = LocalNetworkTopologyResult.from_json(json) # print the JSON string representation of the object -print LocalNetworkTopologyResult.to_json() +print(LocalNetworkTopologyResult.to_json()) # convert the object into a dict local_network_topology_result_dict = local_network_topology_result_instance.to_dict() # create an instance of LocalNetworkTopologyResult from a dict -local_network_topology_result_form_dict = local_network_topology_result.from_dict(local_network_topology_result_dict) +local_network_topology_result_from_dict = LocalNetworkTopologyResult.from_dict(local_network_topology_result_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/endpoint/test_results_api/docs/LocalNetworkTopologyResultBase.md b/endpoint_test_results/docs/LocalNetworkTopologyResultBase.md similarity index 86% rename from endpoint/test_results_api/docs/LocalNetworkTopologyResultBase.md rename to endpoint_test_results/docs/LocalNetworkTopologyResultBase.md index ea7b11d3..ed385886 100644 --- a/endpoint/test_results_api/docs/LocalNetworkTopologyResultBase.md +++ b/endpoint_test_results/docs/LocalNetworkTopologyResultBase.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] @@ -10,7 +11,7 @@ Name | Type | Description | Notes **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] -**type** | [**NetworkTopologyType**](NetworkTopologyType.md) | | [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] **tcp_connect** | [**TcpConnect**](TcpConnect.md) | | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.local_network_topology_result_base import LocalNetworkTopologyResultBase +from endpoint_test_results.models.local_network_topology_result_base import LocalNetworkTopologyResultBase # TODO update the JSON string below json = "{}" # create an instance of LocalNetworkTopologyResultBase from a JSON string local_network_topology_result_base_instance = LocalNetworkTopologyResultBase.from_json(json) # print the JSON string representation of the object -print LocalNetworkTopologyResultBase.to_json() +print(LocalNetworkTopologyResultBase.to_json()) # convert the object into a dict local_network_topology_result_base_dict = local_network_topology_result_base_instance.to_dict() # create an instance of LocalNetworkTopologyResultBase from a dict -local_network_topology_result_base_form_dict = local_network_topology_result_base.from_dict(local_network_topology_result_base_dict) +local_network_topology_result_base_from_dict = LocalNetworkTopologyResultBase.from_dict(local_network_topology_result_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/endpoint/test_results_api/docs/LocalNetworkTopologyResults.md b/endpoint_test_results/docs/LocalNetworkTopologyResults.md similarity index 77% rename from endpoint/test_results_api/docs/LocalNetworkTopologyResults.md rename to endpoint_test_results/docs/LocalNetworkTopologyResults.md index e5d865cf..072e192a 100644 --- a/endpoint/test_results_api/docs/LocalNetworkTopologyResults.md +++ b/endpoint_test_results/docs/LocalNetworkTopologyResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[LocalNetworkTopologyResultBase]**](LocalNetworkTopologyResultBase.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.local_network_topology_results import LocalNetworkTopologyResults +from endpoint_test_results.models.local_network_topology_results import LocalNetworkTopologyResults # TODO update the JSON string below json = "{}" # create an instance of LocalNetworkTopologyResults from a JSON string local_network_topology_results_instance = LocalNetworkTopologyResults.from_json(json) # print the JSON string representation of the object -print LocalNetworkTopologyResults.to_json() +print(LocalNetworkTopologyResults.to_json()) # convert the object into a dict local_network_topology_results_dict = local_network_topology_results_instance.to_dict() # create an instance of LocalNetworkTopologyResults from a dict -local_network_topology_results_form_dict = local_network_topology_results.from_dict(local_network_topology_results_dict) +local_network_topology_results_from_dict = LocalNetworkTopologyResults.from_dict(local_network_topology_results_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/endpoint_test_results/docs/MultiTestIdNetworkTestResults.md b/endpoint_test_results/docs/MultiTestIdNetworkTestResults.md new file mode 100644 index 00000000..03165699 --- /dev/null +++ b/endpoint_test_results/docs/MultiTestIdNetworkTestResults.md @@ -0,0 +1,30 @@ +# MultiTestIdNetworkTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] +**total_hits** | **float** | Total number of measurements that match the search criteria | [optional] + +## Example + +```python +from endpoint_test_results.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of MultiTestIdNetworkTestResults from a JSON string +multi_test_id_network_test_results_instance = MultiTestIdNetworkTestResults.from_json(json) +# print the JSON string representation of the object +print(MultiTestIdNetworkTestResults.to_json()) + +# convert the object into a dict +multi_test_id_network_test_results_dict = multi_test_id_network_test_results_instance.to_dict() +# create an instance of MultiTestIdNetworkTestResults from a dict +multi_test_id_network_test_results_from_dict = MultiTestIdNetworkTestResults.from_dict(multi_test_id_network_test_results_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/endpoint/test_results_api/docs/MultiTestIdTestsDataRoundsSearch.md b/endpoint_test_results/docs/MultiTestIdTestsDataRoundsSearch.md similarity index 78% rename from endpoint/test_results_api/docs/MultiTestIdTestsDataRoundsSearch.md rename to endpoint_test_results/docs/MultiTestIdTestsDataRoundsSearch.md index 14aea767..7617afac 100644 --- a/endpoint/test_results_api/docs/MultiTestIdTestsDataRoundsSearch.md +++ b/endpoint_test_results/docs/MultiTestIdTestsDataRoundsSearch.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **search_sort** | [**List[TestsDataSearchSort]**](TestsDataSearchSort.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch +from endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch # TODO update the JSON string below json = "{}" # create an instance of MultiTestIdTestsDataRoundsSearch from a JSON string multi_test_id_tests_data_rounds_search_instance = MultiTestIdTestsDataRoundsSearch.from_json(json) # print the JSON string representation of the object -print MultiTestIdTestsDataRoundsSearch.to_json() +print(MultiTestIdTestsDataRoundsSearch.to_json()) # convert the object into a dict multi_test_id_tests_data_rounds_search_dict = multi_test_id_tests_data_rounds_search_instance.to_dict() # create an instance of MultiTestIdTestsDataRoundsSearch from a dict -multi_test_id_tests_data_rounds_search_form_dict = multi_test_id_tests_data_rounds_search.from_dict(multi_test_id_tests_data_rounds_search_dict) +multi_test_id_tests_data_rounds_search_from_dict = MultiTestIdTestsDataRoundsSearch.from_dict(multi_test_id_tests_data_rounds_search_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/endpoint/test_results_api/docs/MultiTestIdTestsDataSearchFilter.md b/endpoint_test_results/docs/MultiTestIdTestsDataSearchFilter.md similarity index 75% rename from endpoint/test_results_api/docs/MultiTestIdTestsDataSearchFilter.md rename to endpoint_test_results/docs/MultiTestIdTestsDataSearchFilter.md index 43bdada0..1f90f720 100644 --- a/endpoint/test_results_api/docs/MultiTestIdTestsDataSearchFilter.md +++ b/endpoint_test_results/docs/MultiTestIdTestsDataSearchFilter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **List[str]** | Filter using the `agent-id`. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter +from endpoint_test_results.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter # TODO update the JSON string below json = "{}" # create an instance of MultiTestIdTestsDataSearchFilter from a JSON string multi_test_id_tests_data_search_filter_instance = MultiTestIdTestsDataSearchFilter.from_json(json) # print the JSON string representation of the object -print MultiTestIdTestsDataSearchFilter.to_json() +print(MultiTestIdTestsDataSearchFilter.to_json()) # convert the object into a dict multi_test_id_tests_data_search_filter_dict = multi_test_id_tests_data_search_filter_instance.to_dict() # create an instance of MultiTestIdTestsDataSearchFilter from a dict -multi_test_id_tests_data_search_filter_form_dict = multi_test_id_tests_data_search_filter.from_dict(multi_test_id_tests_data_search_filter_dict) +multi_test_id_tests_data_search_filter_from_dict = MultiTestIdTestsDataSearchFilter.from_dict(multi_test_id_tests_data_search_filter_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/endpoint/test_results_api/docs/NetworkDynamicTestResult.md b/endpoint_test_results/docs/NetworkDynamicTestResult.md similarity index 77% rename from endpoint/test_results_api/docs/NetworkDynamicTestResult.md rename to endpoint_test_results/docs/NetworkDynamicTestResult.md index e8fe0fbf..1d035ca0 100644 --- a/endpoint/test_results_api/docs/NetworkDynamicTestResult.md +++ b/endpoint_test_results/docs/NetworkDynamicTestResult.md @@ -2,15 +2,16 @@ ## 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] **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] -**aid** | [**AccountGroupId**](AccountGroupId.md) | | [optional] **round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] **server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] **system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] **vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] -**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] **avg_latency** | **float** | Average RTT for packets sent to destination. | [optional] [readonly] **error_details** | **str** | Error details, if an error was encountered. | [optional] [readonly] **jitter** | **float** | Standard deviation of latency. | [optional] [readonly] @@ -18,25 +19,25 @@ Name | Type | Description | Notes **loss** | **float** | Percentage of packets not reaching destination. | [optional] [readonly] **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** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] +**application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] **webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.md) | | [optional] ## Example ```python -from test_results_api.models.network_dynamic_test_result import NetworkDynamicTestResult +from endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult # TODO update the JSON string below json = "{}" # create an instance of NetworkDynamicTestResult from a JSON string network_dynamic_test_result_instance = NetworkDynamicTestResult.from_json(json) # print the JSON string representation of the object -print NetworkDynamicTestResult.to_json() +print(NetworkDynamicTestResult.to_json()) # convert the object into a dict network_dynamic_test_result_dict = network_dynamic_test_result_instance.to_dict() # create an instance of NetworkDynamicTestResult from a dict -network_dynamic_test_result_form_dict = network_dynamic_test_result.from_dict(network_dynamic_test_result_dict) +network_dynamic_test_result_from_dict = NetworkDynamicTestResult.from_dict(network_dynamic_test_result_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/endpoint/test_results_api/docs/NetworkDynamicTestResults.md b/endpoint_test_results/docs/NetworkDynamicTestResults.md similarity index 78% rename from endpoint/test_results_api/docs/NetworkDynamicTestResults.md rename to endpoint_test_results/docs/NetworkDynamicTestResults.md index 121c00f7..acad410c 100644 --- a/endpoint/test_results_api/docs/NetworkDynamicTestResults.md +++ b/endpoint_test_results/docs/NetworkDynamicTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkDynamicTestResult]**](NetworkDynamicTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_dynamic_test_results import NetworkDynamicTestResults +from endpoint_test_results.models.network_dynamic_test_results import NetworkDynamicTestResults # TODO update the JSON string below json = "{}" # create an instance of NetworkDynamicTestResults from a JSON string network_dynamic_test_results_instance = NetworkDynamicTestResults.from_json(json) # print the JSON string representation of the object -print NetworkDynamicTestResults.to_json() +print(NetworkDynamicTestResults.to_json()) # convert the object into a dict network_dynamic_test_results_dict = network_dynamic_test_results_instance.to_dict() # create an instance of NetworkDynamicTestResults from a dict -network_dynamic_test_results_form_dict = network_dynamic_test_results.from_dict(network_dynamic_test_results_dict) +network_dynamic_test_results_from_dict = NetworkDynamicTestResults.from_dict(network_dynamic_test_results_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/endpoint/test_results_api/docs/NetworkDynamicTestsResultsApi.md b/endpoint_test_results/docs/NetworkDynamicTestsResultsApi.md similarity index 84% rename from endpoint/test_results_api/docs/NetworkDynamicTestsResultsApi.md rename to endpoint_test_results/docs/NetworkDynamicTestsResultsApi.md index 9b6cebdc..9065daa6 100644 --- a/endpoint/test_results_api/docs/NetworkDynamicTestsResultsApi.md +++ b/endpoint_test_results/docs/NetworkDynamicTestsResultsApi.md @@ -1,35 +1,34 @@ -# test_results_api.NetworkDynamicTestsResultsApi +# endpoint_test_results.NetworkDynamicTestsResultsApi 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}/pathvis | Retrieve pathvis 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}/pathvis/agent/{agentId}/round/{roundId} | Retrieve pathvis network dynamic test results details +[**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 # **get_dynamic_test_result_network_pathvis** > GetDynamicTestResultNetworkPathvis200Response get_dynamic_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) -Retrieve pathvis network dynamic test results +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 time -import os -import test_results_api -from test_results_api.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,23 +38,23 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkDynamicTestsResultsApi(api_client) + api_instance = endpoint_test_results.NetworkDynamicTestsResultsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 pathvis network dynamic test results + # 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) @@ -67,6 +66,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -74,7 +74,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -90,6 +90,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -105,24 +106,23 @@ Name | Type | Description | Notes # **get_dynamic_test_result_pathvis_agent_round** > GetDynamicTestResultPathvisAgentRound200Response get_dynamic_test_result_pathvis_agent_round(test_id, agent_id, round_id, aid=aid) -Retrieve pathvis network dynamic test results details +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 time -import os -import test_results_api -from test_results_api.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -132,21 +132,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkDynamicTestsResultsApi(api_client) + api_instance = 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 = '2067' # 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) + 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 pathvis network dynamic test results details + # 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) @@ -158,6 +158,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -179,6 +180,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -202,18 +204,17 @@ Returns network metrics (`loss`, `latency`, `jitter` and `bandwidth`) from each ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch -from test_results_api.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch +from endpoint_test_results.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -223,21 +224,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkDynamicTestsResultsApi(api_client) + api_instance = endpoint_test_results.NetworkDynamicTestsResultsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (optional) - dynamic_tests_data_round_search = test_results_api.DynamicTestsDataRoundSearch() # DynamicTestsDataRoundSearch | Tests data search filters. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + dynamic_tests_data_round_search = endpoint_test_results.DynamicTestsDataRoundSearch() # DynamicTestsDataRoundSearch | Tests data search filters. (optional) try: # Retrieve network dynamic test results @@ -252,6 +253,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -259,7 +261,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] **dynamic_tests_data_round_search** | [**DynamicTestsDataRoundSearch**](DynamicTestsDataRoundSearch.md)| Tests data search filters. | [optional] ### Return type @@ -276,6 +278,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint/test_results_api/docs/NetworkInterface.md b/endpoint_test_results/docs/NetworkInterface.md similarity index 81% rename from endpoint/test_results_api/docs/NetworkInterface.md rename to endpoint_test_results/docs/NetworkInterface.md index 826e85c5..087481f2 100644 --- a/endpoint/test_results_api/docs/NetworkInterface.md +++ b/endpoint_test_results/docs/NetworkInterface.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ip_address** | **str** | Network IP address. | [optional] [readonly] -**subnet_mask** | **str** | Network subnet mask. | [optional] [readonly] +**subnet_mask** | **str** | Network subnet mask - only for IPv4. | [optional] [readonly] **public_ip_address** | **str** | Network public IP address. | [optional] [readonly] **local_prefix** | **str** | Network local prefix. | [optional] [readonly] **public_ip_range** | **str** | Network public IP range. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_interface import NetworkInterface +from endpoint_test_results.models.network_interface import NetworkInterface # TODO update the JSON string below json = "{}" # create an instance of NetworkInterface from a JSON string network_interface_instance = NetworkInterface.from_json(json) # print the JSON string representation of the object -print NetworkInterface.to_json() +print(NetworkInterface.to_json()) # convert the object into a dict network_interface_dict = network_interface_instance.to_dict() # create an instance of NetworkInterface from a dict -network_interface_form_dict = network_interface.from_dict(network_interface_dict) +network_interface_from_dict = NetworkInterface.from_dict(network_interface_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/endpoint/test_results_api/docs/NetworkMetrics.md b/endpoint_test_results/docs/NetworkMetrics.md similarity index 84% rename from endpoint/test_results_api/docs/NetworkMetrics.md rename to endpoint_test_results/docs/NetworkMetrics.md index 51508bf2..33e5061e 100644 --- a/endpoint/test_results_api/docs/NetworkMetrics.md +++ b/endpoint_test_results/docs/NetworkMetrics.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **jitter** | **int** | Network jitter. | [optional] [readonly] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_metrics import NetworkMetrics +from endpoint_test_results.models.network_metrics import NetworkMetrics # TODO update the JSON string below json = "{}" # create an instance of NetworkMetrics from a JSON string network_metrics_instance = NetworkMetrics.from_json(json) # print the JSON string representation of the object -print NetworkMetrics.to_json() +print(NetworkMetrics.to_json()) # convert the object into a dict network_metrics_dict = network_metrics_instance.to_dict() # create an instance of NetworkMetrics from a dict -network_metrics_form_dict = network_metrics.from_dict(network_metrics_dict) +network_metrics_from_dict = NetworkMetrics.from_dict(network_metrics_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/endpoint/test_results_api/docs/NetworkPing.md b/endpoint_test_results/docs/NetworkPing.md similarity index 88% rename from endpoint/test_results_api/docs/NetworkPing.md rename to endpoint_test_results/docs/NetworkPing.md index 89ccdc5f..eb030d59 100644 --- a/endpoint/test_results_api/docs/NetworkPing.md +++ b/endpoint_test_results/docs/NetworkPing.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avg_rtt** | **int** | Ping average response time. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_ping import NetworkPing +from endpoint_test_results.models.network_ping import NetworkPing # TODO update the JSON string below json = "{}" # create an instance of NetworkPing from a JSON string network_ping_instance = NetworkPing.from_json(json) # print the JSON string representation of the object -print NetworkPing.to_json() +print(NetworkPing.to_json()) # convert the object into a dict network_ping_dict = network_ping_instance.to_dict() # create an instance of NetworkPing from a dict -network_ping_form_dict = network_ping.from_dict(network_ping_dict) +network_ping_from_dict = NetworkPing.from_dict(network_ping_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/endpoint/test_results_api/docs/NetworkProfile.md b/endpoint_test_results/docs/NetworkProfile.md similarity index 86% rename from endpoint/test_results_api/docs/NetworkProfile.md rename to endpoint_test_results/docs/NetworkProfile.md index 03599b1e..85031b60 100644 --- a/endpoint/test_results_api/docs/NetworkProfile.md +++ b/endpoint_test_results/docs/NetworkProfile.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ip_address** | **str** | Network IP address. | [optional] [readonly] -**subnet_mask** | **str** | Network subnet mask. | [optional] [readonly] +**subnet_mask** | **str** | Network subnet mask - only for IPv4. | [optional] [readonly] **public_ip_address** | **str** | Network public IP address. | [optional] [readonly] **local_prefix** | **str** | Network local prefix. | [optional] [readonly] **public_ip_range** | **str** | Network public IP range. | [optional] [readonly] @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_profile import NetworkProfile +from endpoint_test_results.models.network_profile import NetworkProfile # TODO update the JSON string below json = "{}" # create an instance of NetworkProfile from a JSON string network_profile_instance = NetworkProfile.from_json(json) # print the JSON string representation of the object -print NetworkProfile.to_json() +print(NetworkProfile.to_json()) # convert the object into a dict network_profile_dict = network_profile_instance.to_dict() # create an instance of NetworkProfile from a dict -network_profile_form_dict = network_profile.from_dict(network_profile_dict) +network_profile_from_dict = NetworkProfile.from_dict(network_profile_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/endpoint/test_results_api/docs/NetworkProxyProfile.md b/endpoint_test_results/docs/NetworkProxyProfile.md similarity index 80% rename from endpoint/test_results_api/docs/NetworkProxyProfile.md rename to endpoint_test_results/docs/NetworkProxyProfile.md index 28a11a06..eb625c8e 100644 --- a/endpoint/test_results_api/docs/NetworkProxyProfile.md +++ b/endpoint_test_results/docs/NetworkProxyProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **method** | **str** | Proxy profile method. | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_proxy_profile import NetworkProxyProfile +from endpoint_test_results.models.network_proxy_profile import NetworkProxyProfile # TODO update the JSON string below json = "{}" # create an instance of NetworkProxyProfile from a JSON string network_proxy_profile_instance = NetworkProxyProfile.from_json(json) # print the JSON string representation of the object -print NetworkProxyProfile.to_json() +print(NetworkProxyProfile.to_json()) # convert the object into a dict network_proxy_profile_dict = network_proxy_profile_instance.to_dict() # create an instance of NetworkProxyProfile from a dict -network_proxy_profile_form_dict = network_proxy_profile.from_dict(network_proxy_profile_dict) +network_proxy_profile_from_dict = NetworkProxyProfile.from_dict(network_proxy_profile_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/endpoint/test_results_api/docs/NetworkProxyProfileProxiesInner.md b/endpoint_test_results/docs/NetworkProxyProfileProxiesInner.md similarity index 76% rename from endpoint/test_results_api/docs/NetworkProxyProfileProxiesInner.md rename to endpoint_test_results/docs/NetworkProxyProfileProxiesInner.md index e02d6f5c..24d4a0cf 100644 --- a/endpoint/test_results_api/docs/NetworkProxyProfileProxiesInner.md +++ b/endpoint_test_results/docs/NetworkProxyProfileProxiesInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bypass** | **str** | Proxy bypass expression. | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner +from endpoint_test_results.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner # TODO update the JSON string below json = "{}" # create an instance of NetworkProxyProfileProxiesInner from a JSON string network_proxy_profile_proxies_inner_instance = NetworkProxyProfileProxiesInner.from_json(json) # print the JSON string representation of the object -print NetworkProxyProfileProxiesInner.to_json() +print(NetworkProxyProfileProxiesInner.to_json()) # convert the object into a dict network_proxy_profile_proxies_inner_dict = network_proxy_profile_proxies_inner_instance.to_dict() # create an instance of NetworkProxyProfileProxiesInner from a dict -network_proxy_profile_proxies_inner_form_dict = network_proxy_profile_proxies_inner.from_dict(network_proxy_profile_proxies_inner_dict) +network_proxy_profile_proxies_inner_from_dict = NetworkProxyProfileProxiesInner.from_dict(network_proxy_profile_proxies_inner_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/endpoint/test_results_api/docs/NetworkScheduledTestsResultsApi.md b/endpoint_test_results/docs/NetworkScheduledTestsResultsApi.md similarity index 85% rename from endpoint/test_results_api/docs/NetworkScheduledTestsResultsApi.md rename to endpoint_test_results/docs/NetworkScheduledTestsResultsApi.md index 465e89da..5518a4be 100644 --- a/endpoint/test_results_api/docs/NetworkScheduledTestsResultsApi.md +++ b/endpoint_test_results/docs/NetworkScheduledTestsResultsApi.md @@ -1,11 +1,11 @@ -# test_results_api.NetworkScheduledTestsResultsApi +# endpoint_test_results.NetworkScheduledTestsResultsApi 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}/pathvis | Retrieve pathvis 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}/pathvis/agent/{agentId}/round/{roundId} | Retrieve pathvis network scheduled test results details +[**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 @@ -13,24 +13,23 @@ Method | HTTP request | Description # **get_test_result_network_pathvis** > GetTestResultNetworkPathvis200Response get_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) -Retrieve pathvis network scheduled test results +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 time -import os -import test_results_api -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -40,23 +39,23 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkScheduledTestsResultsApi(api_client) + api_instance = endpoint_test_results.NetworkScheduledTestsResultsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 pathvis network scheduled test results + # 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) @@ -68,6 +67,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -75,7 +75,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -91,6 +91,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -106,24 +107,23 @@ Name | Type | Description | Notes # **get_test_result_pathvis_agent_round** > GetTestResultPathvisAgentRound200Response get_test_result_pathvis_agent_round(test_id, agent_id, round_id, aid=aid) -Retrieve pathvis network scheduled test results details +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 time -import os -import test_results_api -from test_results_api.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -133,21 +133,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkScheduledTestsResultsApi(api_client) + api_instance = 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 = '2067' # 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) + 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 pathvis network scheduled test results details + # 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) @@ -159,6 +159,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -180,6 +181,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -202,18 +204,17 @@ Returns network metrics (loss, latency, and jitter) from each endpoint agent, fo ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response -from test_results_api.models.tests_data_rounds_search import TestsDataRoundsSearch -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response +from endpoint_test_results.models.tests_data_rounds_search import TestsDataRoundsSearch +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -223,21 +224,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkScheduledTestsResultsApi(api_client) + api_instance = endpoint_test_results.NetworkScheduledTestsResultsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (optional) - tests_data_rounds_search = test_results_api.TestsDataRoundsSearch() # TestsDataRoundsSearch | Tests data search filters. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + tests_data_rounds_search = endpoint_test_results.TestsDataRoundsSearch() # TestsDataRoundsSearch | Tests data search filters. (optional) try: # Retrieve network scheduled test results @@ -252,6 +253,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -259,7 +261,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] **tests_data_rounds_search** | [**TestsDataRoundsSearch**](TestsDataRoundsSearch.md)| Tests data search filters. | [optional] ### Return type @@ -276,6 +278,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -298,18 +301,17 @@ Returns network metrics, including loss, latency, and jitter, for multiple test ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch -from test_results_api.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch +from endpoint_test_results.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -319,21 +321,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkScheduledTestsResultsApi(api_client) - aid = '2067' # 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) + api_instance = endpoint_test_results.NetworkScheduledTestsResultsApi(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) max = 5 # float | (Optional) Maximum number of objects to return. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. (optional) - multi_test_id_tests_data_rounds_search = test_results_api.MultiTestIdTestsDataRoundsSearch() # MultiTestIdTestsDataRoundsSearch | Test data search filters. (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 = endpoint_test_results.MultiTestIdTestsDataRoundsSearch() # MultiTestIdTestsDataRoundsSearch | Test data search filters. (optional) try: # Retrieve network scheduled test results from multiple tests @@ -348,6 +350,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### 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] @@ -355,7 +358,7 @@ Name | Type | Description | Notes **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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [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] ### Return type @@ -372,6 +375,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint_test_results/docs/NetworkTestResult.md b/endpoint_test_results/docs/NetworkTestResult.md new file mode 100644 index 00000000..323e19b6 --- /dev/null +++ b/endpoint_test_results/docs/NetworkTestResult.md @@ -0,0 +1,42 @@ +# NetworkTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**avg_latency** | **float** | Average RTT for packets sent to destination. | [optional] [readonly] +**error_details** | **str** | Error details, if an error was encountered. | [optional] [readonly] +**jitter** | **float** | Standard deviation of latency. | [optional] [readonly] +**is_icmp_blocked** | **bool** | Set to `true` if network target is blocking ICMP echo (ping) queries. | [optional] [readonly] +**loss** | **float** | Percentage of packets not reaching destination. | [optional] [readonly] +**max_latency** | **float** | Maximum RTT for packets sent to destination. | [optional] [readonly] +**min_latency** | **float** | Minimum RTT for packets sent to destination. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.network_test_result import NetworkTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkTestResult from a JSON string +network_test_result_instance = NetworkTestResult.from_json(json) +# print the JSON string representation of the object +print(NetworkTestResult.to_json()) + +# convert the object into a dict +network_test_result_dict = network_test_result_instance.to_dict() +# create an instance of NetworkTestResult from a dict +network_test_result_from_dict = NetworkTestResult.from_dict(network_test_result_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/endpoint_test_results/docs/NetworkTestResults.md b/endpoint_test_results/docs/NetworkTestResults.md new file mode 100644 index 00000000..ca9efb50 --- /dev/null +++ b/endpoint_test_results/docs/NetworkTestResults.md @@ -0,0 +1,31 @@ +# NetworkTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] +**total_hits** | **float** | Total number of measurements that match the search criteria | [optional] +**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.network_test_results import NetworkTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkTestResults from a JSON string +network_test_results_instance = NetworkTestResults.from_json(json) +# print the JSON string representation of the object +print(NetworkTestResults.to_json()) + +# convert the object into a dict +network_test_results_dict = network_test_results_instance.to_dict() +# create an instance of NetworkTestResults from a dict +network_test_results_from_dict = NetworkTestResults.from_dict(network_test_results_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/endpoint/test_results_api/docs/NetworkTopologyType.md b/endpoint_test_results/docs/NetworkTopologyType.md similarity index 99% rename from endpoint/test_results_api/docs/NetworkTopologyType.md rename to endpoint_test_results/docs/NetworkTopologyType.md index 66a4cc25..6b9e6a2d 100644 --- a/endpoint/test_results_api/docs/NetworkTopologyType.md +++ b/endpoint_test_results/docs/NetworkTopologyType.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint/test_results_api/docs/NetworkWirelessProfile.md b/endpoint_test_results/docs/NetworkWirelessProfile.md similarity index 85% rename from endpoint/test_results_api/docs/NetworkWirelessProfile.md rename to endpoint_test_results/docs/NetworkWirelessProfile.md index 7a0bf330..9aee2a18 100644 --- a/endpoint/test_results_api/docs/NetworkWirelessProfile.md +++ b/endpoint_test_results/docs/NetworkWirelessProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ssid** | **str** | Wireless network SSID. | [optional] [readonly] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.network_wireless_profile import NetworkWirelessProfile +from endpoint_test_results.models.network_wireless_profile import NetworkWirelessProfile # TODO update the JSON string below json = "{}" # create an instance of NetworkWirelessProfile from a JSON string network_wireless_profile_instance = NetworkWirelessProfile.from_json(json) # print the JSON string representation of the object -print NetworkWirelessProfile.to_json() +print(NetworkWirelessProfile.to_json()) # convert the object into a dict network_wireless_profile_dict = network_wireless_profile_instance.to_dict() # create an instance of NetworkWirelessProfile from a dict -network_wireless_profile_form_dict = network_wireless_profile.from_dict(network_wireless_profile_dict) +network_wireless_profile_from_dict = NetworkWirelessProfile.from_dict(network_wireless_profile_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/endpoint_test_results/docs/PaginationNextAndSelfLink.md b/endpoint_test_results/docs/PaginationNextAndSelfLink.md new file mode 100644 index 00000000..5e184c08 --- /dev/null +++ b/endpoint_test_results/docs/PaginationNextAndSelfLink.md @@ -0,0 +1,30 @@ +# PaginationNextAndSelfLink + +A links object containing a related link for forward pagination. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationNextAndSelfLinkLinks**](PaginationNextAndSelfLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.pagination_next_and_self_link import PaginationNextAndSelfLink + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextAndSelfLink from a JSON string +pagination_next_and_self_link_instance = PaginationNextAndSelfLink.from_json(json) +# print the JSON string representation of the object +print(PaginationNextAndSelfLink.to_json()) + +# convert the object into a dict +pagination_next_and_self_link_dict = pagination_next_and_self_link_instance.to_dict() +# create an instance of PaginationNextAndSelfLink from a dict +pagination_next_and_self_link_from_dict = PaginationNextAndSelfLink.from_dict(pagination_next_and_self_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/endpoint_test_results/docs/PaginationNextAndSelfLinkLinks.md b/endpoint_test_results/docs/PaginationNextAndSelfLinkLinks.md new file mode 100644 index 00000000..3258a98f --- /dev/null +++ b/endpoint_test_results/docs/PaginationNextAndSelfLinkLinks.md @@ -0,0 +1,30 @@ +# PaginationNextAndSelfLinkLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextAndSelfLinkLinks from a JSON string +pagination_next_and_self_link_links_instance = PaginationNextAndSelfLinkLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationNextAndSelfLinkLinks.to_json()) + +# convert the object into a dict +pagination_next_and_self_link_links_dict = pagination_next_and_self_link_links_instance.to_dict() +# create an instance of PaginationNextAndSelfLinkLinks from a dict +pagination_next_and_self_link_links_from_dict = PaginationNextAndSelfLinkLinks.from_dict(pagination_next_and_self_link_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/endpoint_test_results/docs/PaginationNextLink.md b/endpoint_test_results/docs/PaginationNextLink.md new file mode 100644 index 00000000..39b09939 --- /dev/null +++ b/endpoint_test_results/docs/PaginationNextLink.md @@ -0,0 +1,30 @@ +# PaginationNextLink + +A links object containing a related link for forward pagination. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.pagination_next_link import PaginationNextLink + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextLink from a JSON string +pagination_next_link_instance = PaginationNextLink.from_json(json) +# print the JSON string representation of the object +print(PaginationNextLink.to_json()) + +# convert the object into a dict +pagination_next_link_dict = pagination_next_link_instance.to_dict() +# create an instance of PaginationNextLink from a dict +pagination_next_link_from_dict = PaginationNextLink.from_dict(pagination_next_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/endpoint_test_results/docs/PaginationNextLinkLinks.md b/endpoint_test_results/docs/PaginationNextLinkLinks.md new file mode 100644 index 00000000..5be366bf --- /dev/null +++ b/endpoint_test_results/docs/PaginationNextLinkLinks.md @@ -0,0 +1,29 @@ +# PaginationNextLinkLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**next** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationNextLinkLinks from a JSON string +pagination_next_link_links_instance = PaginationNextLinkLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationNextLinkLinks.to_json()) + +# convert the object into a dict +pagination_next_link_links_dict = pagination_next_link_links_instance.to_dict() +# create an instance of PaginationNextLinkLinks from a dict +pagination_next_link_links_from_dict = PaginationNextLinkLinks.from_dict(pagination_next_link_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/endpoint_test_results/docs/PathVisBaseTestResult.md b/endpoint_test_results/docs/PathVisBaseTestResult.md new file mode 100644 index 00000000..43cb2101 --- /dev/null +++ b/endpoint_test_results/docs/PathVisBaseTestResult.md @@ -0,0 +1,39 @@ +# PathVisBaseTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] +**server** | **str** | Target server, including port. | [optional] [readonly] +**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.path_vis_base_test_result import PathVisBaseTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisBaseTestResult from a JSON string +path_vis_base_test_result_instance = PathVisBaseTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisBaseTestResult.to_json()) + +# convert the object into a dict +path_vis_base_test_result_dict = path_vis_base_test_result_instance.to_dict() +# create an instance of PathVisBaseTestResult from a dict +path_vis_base_test_result_from_dict = PathVisBaseTestResult.from_dict(path_vis_base_test_result_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/endpoint_test_results/docs/PathVisDetailDynamicTestResult.md b/endpoint_test_results/docs/PathVisDetailDynamicTestResult.md new file mode 100644 index 00000000..f3feaf4e --- /dev/null +++ b/endpoint_test_results/docs/PathVisDetailDynamicTestResult.md @@ -0,0 +1,43 @@ +# PathVisDetailDynamicTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] +**server** | **str** | Target server, including port. | [optional] [readonly] +**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] +**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] +**webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisDetailDynamicTestResult from a JSON string +path_vis_detail_dynamic_test_result_instance = PathVisDetailDynamicTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisDetailDynamicTestResult.to_json()) + +# convert the object into a dict +path_vis_detail_dynamic_test_result_dict = path_vis_detail_dynamic_test_result_instance.to_dict() +# create an instance of PathVisDetailDynamicTestResult from a dict +path_vis_detail_dynamic_test_result_from_dict = PathVisDetailDynamicTestResult.from_dict(path_vis_detail_dynamic_test_result_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/endpoint/test_results_api/docs/PathVisDetailDynamicTestResults.md b/endpoint_test_results/docs/PathVisDetailDynamicTestResults.md similarity index 76% rename from endpoint/test_results_api/docs/PathVisDetailDynamicTestResults.md rename to endpoint_test_results/docs/PathVisDetailDynamicTestResults.md index 7a45bcd1..8bfa0688 100644 --- a/endpoint/test_results_api/docs/PathVisDetailDynamicTestResults.md +++ b/endpoint_test_results/docs/PathVisDetailDynamicTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisDetailDynamicTestResult]**](PathVisDetailDynamicTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults +from endpoint_test_results.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults # TODO update the JSON string below json = "{}" # create an instance of PathVisDetailDynamicTestResults from a JSON string path_vis_detail_dynamic_test_results_instance = PathVisDetailDynamicTestResults.from_json(json) # print the JSON string representation of the object -print PathVisDetailDynamicTestResults.to_json() +print(PathVisDetailDynamicTestResults.to_json()) # convert the object into a dict path_vis_detail_dynamic_test_results_dict = path_vis_detail_dynamic_test_results_instance.to_dict() # create an instance of PathVisDetailDynamicTestResults from a dict -path_vis_detail_dynamic_test_results_form_dict = path_vis_detail_dynamic_test_results.from_dict(path_vis_detail_dynamic_test_results_dict) +path_vis_detail_dynamic_test_results_from_dict = PathVisDetailDynamicTestResults.from_dict(path_vis_detail_dynamic_test_results_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/endpoint_test_results/docs/PathVisDetailTestResult.md b/endpoint_test_results/docs/PathVisDetailTestResult.md new file mode 100644 index 00000000..031af6ae --- /dev/null +++ b/endpoint_test_results/docs/PathVisDetailTestResult.md @@ -0,0 +1,41 @@ +# PathVisDetailTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] +**server** | **str** | Target server, including port. | [optional] [readonly] +**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] +**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] + +## Example + +```python +from endpoint_test_results.models.path_vis_detail_test_result import PathVisDetailTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisDetailTestResult from a JSON string +path_vis_detail_test_result_instance = PathVisDetailTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisDetailTestResult.to_json()) + +# convert the object into a dict +path_vis_detail_test_result_dict = path_vis_detail_test_result_instance.to_dict() +# create an instance of PathVisDetailTestResult from a dict +path_vis_detail_test_result_from_dict = PathVisDetailTestResult.from_dict(path_vis_detail_test_result_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/endpoint_test_results/docs/PathVisDetailTestResults.md b/endpoint_test_results/docs/PathVisDetailTestResults.md new file mode 100644 index 00000000..ba2ba29e --- /dev/null +++ b/endpoint_test_results/docs/PathVisDetailTestResults.md @@ -0,0 +1,30 @@ +# PathVisDetailTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PathVisDetailTestResult]**](PathVisDetailTestResult.md) | | [optional] +**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.path_vis_detail_test_results import PathVisDetailTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisDetailTestResults from a JSON string +path_vis_detail_test_results_instance = PathVisDetailTestResults.from_json(json) +# print the JSON string representation of the object +print(PathVisDetailTestResults.to_json()) + +# convert the object into a dict +path_vis_detail_test_results_dict = path_vis_detail_test_results_instance.to_dict() +# create an instance of PathVisDetailTestResults from a dict +path_vis_detail_test_results_from_dict = PathVisDetailTestResults.from_dict(path_vis_detail_test_results_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/endpoint_test_results/docs/PathVisDynamicTestResult.md b/endpoint_test_results/docs/PathVisDynamicTestResult.md new file mode 100644 index 00000000..a7cdb783 --- /dev/null +++ b/endpoint_test_results/docs/PathVisDynamicTestResult.md @@ -0,0 +1,43 @@ +# PathVisDynamicTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] +**server** | **str** | Target server, including port. | [optional] [readonly] +**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] +**webex** | [**DynamicBaseTestResultWebex**](DynamicBaseTestResultWebex.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] + +## Example + +```python +from endpoint_test_results.models.path_vis_dynamic_test_result import PathVisDynamicTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisDynamicTestResult from a JSON string +path_vis_dynamic_test_result_instance = PathVisDynamicTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisDynamicTestResult.to_json()) + +# convert the object into a dict +path_vis_dynamic_test_result_dict = path_vis_dynamic_test_result_instance.to_dict() +# create an instance of PathVisDynamicTestResult from a dict +path_vis_dynamic_test_result_from_dict = PathVisDynamicTestResult.from_dict(path_vis_dynamic_test_result_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/endpoint/test_results_api/docs/PathVisDynamicTestResults.md b/endpoint_test_results/docs/PathVisDynamicTestResults.md similarity index 78% rename from endpoint/test_results_api/docs/PathVisDynamicTestResults.md rename to endpoint_test_results/docs/PathVisDynamicTestResults.md index e9069941..1e9469ed 100644 --- a/endpoint/test_results_api/docs/PathVisDynamicTestResults.md +++ b/endpoint_test_results/docs/PathVisDynamicTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisDynamicTestResult]**](PathVisDynamicTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.path_vis_dynamic_test_results import PathVisDynamicTestResults +from endpoint_test_results.models.path_vis_dynamic_test_results import PathVisDynamicTestResults # TODO update the JSON string below json = "{}" # create an instance of PathVisDynamicTestResults from a JSON string path_vis_dynamic_test_results_instance = PathVisDynamicTestResults.from_json(json) # print the JSON string representation of the object -print PathVisDynamicTestResults.to_json() +print(PathVisDynamicTestResults.to_json()) # convert the object into a dict path_vis_dynamic_test_results_dict = path_vis_dynamic_test_results_instance.to_dict() # create an instance of PathVisDynamicTestResults from a dict -path_vis_dynamic_test_results_form_dict = path_vis_dynamic_test_results.from_dict(path_vis_dynamic_test_results_dict) +path_vis_dynamic_test_results_from_dict = PathVisDynamicTestResults.from_dict(path_vis_dynamic_test_results_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/endpoint_test_results/docs/PathVisEndpoint.md b/endpoint_test_results/docs/PathVisEndpoint.md new file mode 100644 index 00000000..3b2843e1 --- /dev/null +++ b/endpoint_test_results/docs/PathVisEndpoint.md @@ -0,0 +1,32 @@ +# PathVisEndpoint + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_address** | **str** | IP address of the hop destination. | [optional] [readonly] +**number_of_hops** | **int** | Number of hops for path trace to destination. | [optional] [readonly] +**path_id** | **str** | Unique ID of path trace. | [optional] [readonly] +**response_time** | **int** | RTT of the path trace to the destination in milliseconds. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisEndpoint from a JSON string +path_vis_endpoint_instance = PathVisEndpoint.from_json(json) +# print the JSON string representation of the object +print(PathVisEndpoint.to_json()) + +# convert the object into a dict +path_vis_endpoint_dict = path_vis_endpoint_instance.to_dict() +# create an instance of PathVisEndpoint from a dict +path_vis_endpoint_from_dict = PathVisEndpoint.from_dict(path_vis_endpoint_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/endpoint_test_results/docs/PathVisHop.md b/endpoint_test_results/docs/PathVisHop.md new file mode 100644 index 00000000..a8f7fef1 --- /dev/null +++ b/endpoint_test_results/docs/PathVisHop.md @@ -0,0 +1,35 @@ +# PathVisHop + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hop** | **int** | The hop index. | [optional] [readonly] +**ip_address** | **str** | IP address of the hop. | [optional] [readonly] +**prefix** | **str** | Prefix of IP address shown in CIDR. | [optional] [readonly] +**rdns** | **str** | Reverse DNS entry of IP, if available. | [optional] [readonly] +**network** | **str** | Autonomous System originating the prefix. | [optional] [readonly] +**response_time** | **int** | RTT to the hop’s IP in milliseconds. | [optional] [readonly] +**location** | **str** | Location information for the hop. | [optional] [readonly] + +## Example + +```python +from endpoint_test_results.models.path_vis_hop import PathVisHop + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisHop from a JSON string +path_vis_hop_instance = PathVisHop.from_json(json) +# print the JSON string representation of the object +print(PathVisHop.to_json()) + +# convert the object into a dict +path_vis_hop_dict = path_vis_hop_instance.to_dict() +# create an instance of PathVisHop from a dict +path_vis_hop_from_dict = PathVisHop.from_dict(path_vis_hop_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/endpoint_test_results/docs/PathVisRoute.md b/endpoint_test_results/docs/PathVisRoute.md new file mode 100644 index 00000000..084a9807 --- /dev/null +++ b/endpoint_test_results/docs/PathVisRoute.md @@ -0,0 +1,30 @@ +# PathVisRoute + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path_id** | **str** | Unique ID of path trace. | [optional] [readonly] +**hops** | [**List[PathVisHop]**](PathVisHop.md) | Array of hop objects indicating each step in the traceroute. | [optional] + +## Example + +```python +from endpoint_test_results.models.path_vis_route import PathVisRoute + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisRoute from a JSON string +path_vis_route_instance = PathVisRoute.from_json(json) +# print the JSON string representation of the object +print(PathVisRoute.to_json()) + +# convert the object into a dict +path_vis_route_dict = path_vis_route_instance.to_dict() +# create an instance of PathVisRoute from a dict +path_vis_route_from_dict = PathVisRoute.from_dict(path_vis_route_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/endpoint_test_results/docs/PathVisTestResult.md b/endpoint_test_results/docs/PathVisTestResult.md new file mode 100644 index 00000000..eea4e4cd --- /dev/null +++ b/endpoint_test_results/docs/PathVisTestResult.md @@ -0,0 +1,41 @@ +# PathVisTestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] +**asn_details** | [**AsnDetails**](AsnDetails.md) | | [optional] +**server** | **str** | Target server, including port. | [optional] [readonly] +**source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] +**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] + +## Example + +```python +from endpoint_test_results.models.path_vis_test_result import PathVisTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisTestResult from a JSON string +path_vis_test_result_instance = PathVisTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisTestResult.to_json()) + +# convert the object into a dict +path_vis_test_result_dict = path_vis_test_result_instance.to_dict() +# create an instance of PathVisTestResult from a dict +path_vis_test_result_from_dict = PathVisTestResult.from_dict(path_vis_test_result_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/endpoint_test_results/docs/PathVisTestResults.md b/endpoint_test_results/docs/PathVisTestResults.md new file mode 100644 index 00000000..49fc50cb --- /dev/null +++ b/endpoint_test_results/docs/PathVisTestResults.md @@ -0,0 +1,30 @@ +# PathVisTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [optional] +**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.path_vis_test_results import PathVisTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisTestResults from a JSON string +path_vis_test_results_instance = PathVisTestResults.from_json(json) +# print the JSON string representation of the object +print(PathVisTestResults.to_json()) + +# convert the object into a dict +path_vis_test_results_dict = path_vis_test_results_instance.to_dict() +# create an instance of PathVisTestResults from a dict +path_vis_test_results_from_dict = PathVisTestResults.from_dict(path_vis_test_results_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/endpoint/test_results_api/docs/PhysicalMemoryUsedBytes.md b/endpoint_test_results/docs/PhysicalMemoryUsedBytes.md similarity index 86% rename from endpoint/test_results_api/docs/PhysicalMemoryUsedBytes.md rename to endpoint_test_results/docs/PhysicalMemoryUsedBytes.md index 2e66a806..5b090b78 100644 --- a/endpoint/test_results_api/docs/PhysicalMemoryUsedBytes.md +++ b/endpoint_test_results/docs/PhysicalMemoryUsedBytes.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **min** | **float** | The minimum sampled memory usage value recorded during the monitored period. | [optional] [readonly] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes +from endpoint_test_results.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes # TODO update the JSON string below json = "{}" # create an instance of PhysicalMemoryUsedBytes from a JSON string physical_memory_used_bytes_instance = PhysicalMemoryUsedBytes.from_json(json) # print the JSON string representation of the object -print PhysicalMemoryUsedBytes.to_json() +print(PhysicalMemoryUsedBytes.to_json()) # convert the object into a dict physical_memory_used_bytes_dict = physical_memory_used_bytes_instance.to_dict() # create an instance of PhysicalMemoryUsedBytes from a dict -physical_memory_used_bytes_form_dict = physical_memory_used_bytes.from_dict(physical_memory_used_bytes_dict) +physical_memory_used_bytes_from_dict = PhysicalMemoryUsedBytes.from_dict(physical_memory_used_bytes_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/endpoint_test_results/docs/Platform.md b/endpoint_test_results/docs/Platform.md new file mode 100644 index 00000000..97f29ba7 --- /dev/null +++ b/endpoint_test_results/docs/Platform.md @@ -0,0 +1,12 @@ +# Platform + +OS platform types + +## 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/endpoint/test_results_api/docs/PostFetchDynamicTestResultMetrics200Response.md b/endpoint_test_results/docs/PostFetchDynamicTestResultMetrics200Response.md similarity index 82% rename from endpoint/test_results_api/docs/PostFetchDynamicTestResultMetrics200Response.md rename to endpoint_test_results/docs/PostFetchDynamicTestResultMetrics200Response.md index 8caa4c6d..2c7b9187 100644 --- a/endpoint/test_results_api/docs/PostFetchDynamicTestResultMetrics200Response.md +++ b/endpoint_test_results/docs/PostFetchDynamicTestResultMetrics200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkDynamicTestResult]**](NetworkDynamicTestResult.md) | | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response # TODO update the JSON string below json = "{}" # create an instance of PostFetchDynamicTestResultMetrics200Response from a JSON string post_fetch_dynamic_test_result_metrics200_response_instance = PostFetchDynamicTestResultMetrics200Response.from_json(json) # print the JSON string representation of the object -print PostFetchDynamicTestResultMetrics200Response.to_json() +print(PostFetchDynamicTestResultMetrics200Response.to_json()) # convert the object into a dict post_fetch_dynamic_test_result_metrics200_response_dict = post_fetch_dynamic_test_result_metrics200_response_instance.to_dict() # create an instance of PostFetchDynamicTestResultMetrics200Response from a dict -post_fetch_dynamic_test_result_metrics200_response_form_dict = post_fetch_dynamic_test_result_metrics200_response.from_dict(post_fetch_dynamic_test_result_metrics200_response_dict) +post_fetch_dynamic_test_result_metrics200_response_from_dict = PostFetchDynamicTestResultMetrics200Response.from_dict(post_fetch_dynamic_test_result_metrics200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/PostFetchTestResultMetrics200Response.md b/endpoint_test_results/docs/PostFetchTestResultMetrics200Response.md similarity index 79% rename from endpoint/test_results_api/docs/PostFetchTestResultMetrics200Response.md rename to endpoint_test_results/docs/PostFetchTestResultMetrics200Response.md index 70c7584b..7f9b92e2 100644 --- a/endpoint/test_results_api/docs/PostFetchTestResultMetrics200Response.md +++ b/endpoint_test_results/docs/PostFetchTestResultMetrics200Response.md @@ -2,9 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] +**total_hits** | **float** | 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] @@ -13,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response # TODO update the JSON string below json = "{}" # create an instance of PostFetchTestResultMetrics200Response from a JSON string post_fetch_test_result_metrics200_response_instance = PostFetchTestResultMetrics200Response.from_json(json) # print the JSON string representation of the object -print PostFetchTestResultMetrics200Response.to_json() +print(PostFetchTestResultMetrics200Response.to_json()) # convert the object into a dict post_fetch_test_result_metrics200_response_dict = post_fetch_test_result_metrics200_response_instance.to_dict() # create an instance of PostFetchTestResultMetrics200Response from a dict -post_fetch_test_result_metrics200_response_form_dict = post_fetch_test_result_metrics200_response.from_dict(post_fetch_test_result_metrics200_response_dict) +post_fetch_test_result_metrics200_response_from_dict = PostFetchTestResultMetrics200Response.from_dict(post_fetch_test_result_metrics200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/PostFetchTestResultMetricsMultiTest200Response.md b/endpoint_test_results/docs/PostFetchTestResultMetricsMultiTest200Response.md similarity index 77% rename from endpoint/test_results_api/docs/PostFetchTestResultMetricsMultiTest200Response.md rename to endpoint_test_results/docs/PostFetchTestResultMetricsMultiTest200Response.md index 9f42a1db..a884195b 100644 --- a/endpoint/test_results_api/docs/PostFetchTestResultMetricsMultiTest200Response.md +++ b/endpoint_test_results/docs/PostFetchTestResultMetricsMultiTest200Response.md @@ -2,9 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] +**total_hits** | **float** | 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** | [**PaginationNextLinkLinks**](PaginationNextLinkLinks.md) | | [optional] @@ -12,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response +from endpoint_test_results.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response # TODO update the JSON string below json = "{}" # create an instance of PostFetchTestResultMetricsMultiTest200Response from a JSON string post_fetch_test_result_metrics_multi_test200_response_instance = PostFetchTestResultMetricsMultiTest200Response.from_json(json) # print the JSON string representation of the object -print PostFetchTestResultMetricsMultiTest200Response.to_json() +print(PostFetchTestResultMetricsMultiTest200Response.to_json()) # convert the object into a dict post_fetch_test_result_metrics_multi_test200_response_dict = post_fetch_test_result_metrics_multi_test200_response_instance.to_dict() # create an instance of PostFetchTestResultMetricsMultiTest200Response from a dict -post_fetch_test_result_metrics_multi_test200_response_form_dict = post_fetch_test_result_metrics_multi_test200_response.from_dict(post_fetch_test_result_metrics_multi_test200_response_dict) +post_fetch_test_result_metrics_multi_test200_response_from_dict = PostFetchTestResultMetricsMultiTest200Response.from_dict(post_fetch_test_result_metrics_multi_test200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_test_results/docs/QueryWindow.md b/endpoint_test_results/docs/QueryWindow.md new file mode 100644 index 00000000..6d66a54f --- /dev/null +++ b/endpoint_test_results/docs/QueryWindow.md @@ -0,0 +1,30 @@ +# QueryWindow + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +## Example + +```python +from endpoint_test_results.models.query_window import QueryWindow + +# TODO update the JSON string below +json = "{}" +# create an instance of QueryWindow from a JSON string +query_window_instance = QueryWindow.from_json(json) +# print the JSON string representation of the object +print(QueryWindow.to_json()) + +# convert the object into a dict +query_window_dict = query_window_instance.to_dict() +# create an instance of QueryWindow from a dict +query_window_from_dict = QueryWindow.from_dict(query_window_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/endpoint/test_results_api/docs/RealUserTestCoordinates.md b/endpoint_test_results/docs/RealUserTestCoordinates.md similarity index 82% rename from endpoint/test_results_api/docs/RealUserTestCoordinates.md rename to endpoint_test_results/docs/RealUserTestCoordinates.md index 688f5c74..a319e6dd 100644 --- a/endpoint/test_results_api/docs/RealUserTestCoordinates.md +++ b/endpoint_test_results/docs/RealUserTestCoordinates.md @@ -3,6 +3,7 @@ Contains approximate GPS location of the endpoint agent, based on endpoint agent’s public IP address. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **latitude** | **float** | Numeric representations of GPS coordinates. | [optional] [readonly] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_coordinates import RealUserTestCoordinates +from endpoint_test_results.models.real_user_test_coordinates import RealUserTestCoordinates # TODO update the JSON string below json = "{}" # create an instance of RealUserTestCoordinates from a JSON string real_user_test_coordinates_instance = RealUserTestCoordinates.from_json(json) # print the JSON string representation of the object -print RealUserTestCoordinates.to_json() +print(RealUserTestCoordinates.to_json()) # convert the object into a dict real_user_test_coordinates_dict = real_user_test_coordinates_instance.to_dict() # create an instance of RealUserTestCoordinates from a dict -real_user_test_coordinates_form_dict = real_user_test_coordinates.from_dict(real_user_test_coordinates_dict) +real_user_test_coordinates_from_dict = RealUserTestCoordinates.from_dict(real_user_test_coordinates_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/endpoint/test_results_api/docs/RealUserTestNetwork.md b/endpoint_test_results/docs/RealUserTestNetwork.md similarity index 89% rename from endpoint/test_results_api/docs/RealUserTestNetwork.md rename to endpoint_test_results/docs/RealUserTestNetwork.md index a4b5e10f..464663ce 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetwork.md +++ b/endpoint_test_results/docs/RealUserTestNetwork.md @@ -3,6 +3,7 @@ Contains details about network profile and conditions during session. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network import RealUserTestNetwork +from endpoint_test_results.models.real_user_test_network import RealUserTestNetwork # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetwork from a JSON string real_user_test_network_instance = RealUserTestNetwork.from_json(json) # print the JSON string representation of the object -print RealUserTestNetwork.to_json() +print(RealUserTestNetwork.to_json()) # convert the object into a dict real_user_test_network_dict = real_user_test_network_instance.to_dict() # create an instance of RealUserTestNetwork from a dict -real_user_test_network_form_dict = real_user_test_network.from_dict(real_user_test_network_dict) +real_user_test_network_from_dict = RealUserTestNetwork.from_dict(real_user_test_network_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/endpoint/test_results_api/docs/RealUserTestNetworkGatewayPing.md b/endpoint_test_results/docs/RealUserTestNetworkGatewayPing.md similarity index 83% rename from endpoint/test_results_api/docs/RealUserTestNetworkGatewayPing.md rename to endpoint_test_results/docs/RealUserTestNetworkGatewayPing.md index 6608030f..8af57efe 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkGatewayPing.md +++ b/endpoint_test_results/docs/RealUserTestNetworkGatewayPing.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avg_rtt** | **int** | Ping average response time. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing +from endpoint_test_results.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkGatewayPing from a JSON string real_user_test_network_gateway_ping_instance = RealUserTestNetworkGatewayPing.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkGatewayPing.to_json() +print(RealUserTestNetworkGatewayPing.to_json()) # convert the object into a dict real_user_test_network_gateway_ping_dict = real_user_test_network_gateway_ping_instance.to_dict() # create an instance of RealUserTestNetworkGatewayPing from a dict -real_user_test_network_gateway_ping_form_dict = real_user_test_network_gateway_ping.from_dict(real_user_test_network_gateway_ping_dict) +real_user_test_network_gateway_ping_from_dict = RealUserTestNetworkGatewayPing.from_dict(real_user_test_network_gateway_ping_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/endpoint/test_results_api/docs/RealUserTestNetworkPing.md b/endpoint_test_results/docs/RealUserTestNetworkPing.md similarity index 84% rename from endpoint/test_results_api/docs/RealUserTestNetworkPing.md rename to endpoint_test_results/docs/RealUserTestNetworkPing.md index 51b679c7..f53ce4ee 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkPing.md +++ b/endpoint_test_results/docs/RealUserTestNetworkPing.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avg_rtt** | **int** | Ping average response time. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_ping import RealUserTestNetworkPing +from endpoint_test_results.models.real_user_test_network_ping import RealUserTestNetworkPing # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkPing from a JSON string real_user_test_network_ping_instance = RealUserTestNetworkPing.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkPing.to_json() +print(RealUserTestNetworkPing.to_json()) # convert the object into a dict real_user_test_network_ping_dict = real_user_test_network_ping_instance.to_dict() # create an instance of RealUserTestNetworkPing from a dict -real_user_test_network_ping_form_dict = real_user_test_network_ping.from_dict(real_user_test_network_ping_dict) +real_user_test_network_ping_from_dict = RealUserTestNetworkPing.from_dict(real_user_test_network_ping_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/endpoint/test_results_api/docs/RealUserTestNetworkResult.md b/endpoint_test_results/docs/RealUserTestNetworkResult.md similarity index 85% rename from endpoint/test_results_api/docs/RealUserTestNetworkResult.md rename to endpoint_test_results/docs/RealUserTestNetworkResult.md index 80c47f7a..9d57300f 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkResult.md +++ b/endpoint_test_results/docs/RealUserTestNetworkResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_result import RealUserTestNetworkResult +from endpoint_test_results.models.real_user_test_network_result import RealUserTestNetworkResult # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkResult from a JSON string real_user_test_network_result_instance = RealUserTestNetworkResult.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkResult.to_json() +print(RealUserTestNetworkResult.to_json()) # convert the object into a dict real_user_test_network_result_dict = real_user_test_network_result_instance.to_dict() # create an instance of RealUserTestNetworkResult from a dict -real_user_test_network_result_form_dict = real_user_test_network_result.from_dict(real_user_test_network_result_dict) +real_user_test_network_result_from_dict = RealUserTestNetworkResult.from_dict(real_user_test_network_result_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/endpoint/test_results_api/docs/RealUserTestNetworkResults.md b/endpoint_test_results/docs/RealUserTestNetworkResults.md similarity index 76% rename from endpoint/test_results_api/docs/RealUserTestNetworkResults.md rename to endpoint_test_results/docs/RealUserTestNetworkResults.md index 0170a249..949e2ee4 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkResults.md +++ b/endpoint_test_results/docs/RealUserTestNetworkResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[RealUserTestNetworkResult]**](RealUserTestNetworkResult.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_results import RealUserTestNetworkResults +from endpoint_test_results.models.real_user_test_network_results import RealUserTestNetworkResults # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkResults from a JSON string real_user_test_network_results_instance = RealUserTestNetworkResults.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkResults.to_json() +print(RealUserTestNetworkResults.to_json()) # convert the object into a dict real_user_test_network_results_dict = real_user_test_network_results_instance.to_dict() # create an instance of RealUserTestNetworkResults from a dict -real_user_test_network_results_form_dict = real_user_test_network_results.from_dict(real_user_test_network_results_dict) +real_user_test_network_results_from_dict = RealUserTestNetworkResults.from_dict(real_user_test_network_results_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/endpoint/test_results_api/docs/RealUserTestNetworkTraceroute.md b/endpoint_test_results/docs/RealUserTestNetworkTraceroute.md similarity index 80% rename from endpoint/test_results_api/docs/RealUserTestNetworkTraceroute.md rename to endpoint_test_results/docs/RealUserTestNetworkTraceroute.md index bbda1112..039c4027 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkTraceroute.md +++ b/endpoint_test_results/docs/RealUserTestNetworkTraceroute.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **destination** | **str** | The target IP address. | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute +from endpoint_test_results.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkTraceroute from a JSON string real_user_test_network_traceroute_instance = RealUserTestNetworkTraceroute.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkTraceroute.to_json() +print(RealUserTestNetworkTraceroute.to_json()) # convert the object into a dict real_user_test_network_traceroute_dict = real_user_test_network_traceroute_instance.to_dict() # create an instance of RealUserTestNetworkTraceroute from a dict -real_user_test_network_traceroute_form_dict = real_user_test_network_traceroute.from_dict(real_user_test_network_traceroute_dict) +real_user_test_network_traceroute_from_dict = RealUserTestNetworkTraceroute.from_dict(real_user_test_network_traceroute_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/endpoint/test_results_api/docs/RealUserTestNetworkVpnPing.md b/endpoint_test_results/docs/RealUserTestNetworkVpnPing.md similarity index 84% rename from endpoint/test_results_api/docs/RealUserTestNetworkVpnPing.md rename to endpoint_test_results/docs/RealUserTestNetworkVpnPing.md index 89e3e4a2..da8a9601 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkVpnPing.md +++ b/endpoint_test_results/docs/RealUserTestNetworkVpnPing.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avg_rtt** | **int** | Ping average response time. | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing +from endpoint_test_results.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkVpnPing from a JSON string real_user_test_network_vpn_ping_instance = RealUserTestNetworkVpnPing.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkVpnPing.to_json() +print(RealUserTestNetworkVpnPing.to_json()) # convert the object into a dict real_user_test_network_vpn_ping_dict = real_user_test_network_vpn_ping_instance.to_dict() # create an instance of RealUserTestNetworkVpnPing from a dict -real_user_test_network_vpn_ping_form_dict = real_user_test_network_vpn_ping.from_dict(real_user_test_network_vpn_ping_dict) +real_user_test_network_vpn_ping_from_dict = RealUserTestNetworkVpnPing.from_dict(real_user_test_network_vpn_ping_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/endpoint/test_results_api/docs/RealUserTestNetworkVpnTraceroute.md b/endpoint_test_results/docs/RealUserTestNetworkVpnTraceroute.md similarity index 79% rename from endpoint/test_results_api/docs/RealUserTestNetworkVpnTraceroute.md rename to endpoint_test_results/docs/RealUserTestNetworkVpnTraceroute.md index 80f8c426..d2c6fae5 100644 --- a/endpoint/test_results_api/docs/RealUserTestNetworkVpnTraceroute.md +++ b/endpoint_test_results/docs/RealUserTestNetworkVpnTraceroute.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **destination** | **str** | The target IP address. | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute +from endpoint_test_results.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute # TODO update the JSON string below json = "{}" # create an instance of RealUserTestNetworkVpnTraceroute from a JSON string real_user_test_network_vpn_traceroute_instance = RealUserTestNetworkVpnTraceroute.from_json(json) # print the JSON string representation of the object -print RealUserTestNetworkVpnTraceroute.to_json() +print(RealUserTestNetworkVpnTraceroute.to_json()) # convert the object into a dict real_user_test_network_vpn_traceroute_dict = real_user_test_network_vpn_traceroute_instance.to_dict() # create an instance of RealUserTestNetworkVpnTraceroute from a dict -real_user_test_network_vpn_traceroute_form_dict = real_user_test_network_vpn_traceroute.from_dict(real_user_test_network_vpn_traceroute_dict) +real_user_test_network_vpn_traceroute_from_dict = RealUserTestNetworkVpnTraceroute.from_dict(real_user_test_network_vpn_traceroute_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/endpoint/test_results_api/docs/RealUserTestPage.md b/endpoint_test_results/docs/RealUserTestPage.md similarity index 86% rename from endpoint/test_results_api/docs/RealUserTestPage.md rename to endpoint_test_results/docs/RealUserTestPage.md index 07214da9..1faf741e 100644 --- a/endpoint/test_results_api/docs/RealUserTestPage.md +++ b/endpoint_test_results/docs/RealUserTestPage.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **page_id** | **str** | Web page ID. The page ID is unique only within an endpoint real user test. | [optional] [readonly] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_page import RealUserTestPage +from endpoint_test_results.models.real_user_test_page import RealUserTestPage # TODO update the JSON string below json = "{}" # create an instance of RealUserTestPage from a JSON string real_user_test_page_instance = RealUserTestPage.from_json(json) # print the JSON string representation of the object -print RealUserTestPage.to_json() +print(RealUserTestPage.to_json()) # convert the object into a dict real_user_test_page_dict = real_user_test_page_instance.to_dict() # create an instance of RealUserTestPage from a dict -real_user_test_page_form_dict = real_user_test_page.from_dict(real_user_test_page_dict) +real_user_test_page_from_dict = RealUserTestPage.from_dict(real_user_test_page_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/endpoint/test_results_api/docs/RealUserTestPagePageTimings.md b/endpoint_test_results/docs/RealUserTestPagePageTimings.md similarity index 77% rename from endpoint/test_results_api/docs/RealUserTestPagePageTimings.md rename to endpoint_test_results/docs/RealUserTestPagePageTimings.md index 4cd5eec2..31d410e9 100644 --- a/endpoint/test_results_api/docs/RealUserTestPagePageTimings.md +++ b/endpoint_test_results/docs/RealUserTestPagePageTimings.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **on_content_load** | **int** | DOM load time in milliseconds. | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_page_page_timings import RealUserTestPagePageTimings +from endpoint_test_results.models.real_user_test_page_page_timings import RealUserTestPagePageTimings # TODO update the JSON string below json = "{}" # create an instance of RealUserTestPagePageTimings from a JSON string real_user_test_page_page_timings_instance = RealUserTestPagePageTimings.from_json(json) # print the JSON string representation of the object -print RealUserTestPagePageTimings.to_json() +print(RealUserTestPagePageTimings.to_json()) # convert the object into a dict real_user_test_page_page_timings_dict = real_user_test_page_page_timings_instance.to_dict() # create an instance of RealUserTestPagePageTimings from a dict -real_user_test_page_page_timings_form_dict = real_user_test_page_page_timings.from_dict(real_user_test_page_page_timings_dict) +real_user_test_page_page_timings_from_dict = RealUserTestPagePageTimings.from_dict(real_user_test_page_page_timings_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/endpoint/test_results_api/docs/RealUserTestPageResult.md b/endpoint_test_results/docs/RealUserTestPageResult.md similarity index 88% rename from endpoint/test_results_api/docs/RealUserTestPageResult.md rename to endpoint_test_results/docs/RealUserTestPageResult.md index c8e56497..28e6439a 100644 --- a/endpoint/test_results_api/docs/RealUserTestPageResult.md +++ b/endpoint_test_results/docs/RealUserTestPageResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **page_id** | **str** | Web page ID. The page ID is unique only within an endpoint real user test. | [optional] [readonly] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_page_result import RealUserTestPageResult +from endpoint_test_results.models.real_user_test_page_result import RealUserTestPageResult # TODO update the JSON string below json = "{}" # create an instance of RealUserTestPageResult from a JSON string real_user_test_page_result_instance = RealUserTestPageResult.from_json(json) # print the JSON string representation of the object -print RealUserTestPageResult.to_json() +print(RealUserTestPageResult.to_json()) # convert the object into a dict real_user_test_page_result_dict = real_user_test_page_result_instance.to_dict() # create an instance of RealUserTestPageResult from a dict -real_user_test_page_result_form_dict = real_user_test_page_result.from_dict(real_user_test_page_result_dict) +real_user_test_page_result_from_dict = RealUserTestPageResult.from_dict(real_user_test_page_result_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/endpoint/test_results_api/docs/RealUserTestPageResults.md b/endpoint_test_results/docs/RealUserTestPageResults.md similarity index 77% rename from endpoint/test_results_api/docs/RealUserTestPageResults.md rename to endpoint_test_results/docs/RealUserTestPageResults.md index badb0d08..ce81521c 100644 --- a/endpoint/test_results_api/docs/RealUserTestPageResults.md +++ b/endpoint_test_results/docs/RealUserTestPageResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[RealUserTestPageResult]**](RealUserTestPageResult.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.real_user_test_page_results import RealUserTestPageResults +from endpoint_test_results.models.real_user_test_page_results import RealUserTestPageResults # TODO update the JSON string below json = "{}" # create an instance of RealUserTestPageResults from a JSON string real_user_test_page_results_instance = RealUserTestPageResults.from_json(json) # print the JSON string representation of the object -print RealUserTestPageResults.to_json() +print(RealUserTestPageResults.to_json()) # convert the object into a dict real_user_test_page_results_dict = real_user_test_page_results_instance.to_dict() # create an instance of RealUserTestPageResults from a dict -real_user_test_page_results_form_dict = real_user_test_page_results.from_dict(real_user_test_page_results_dict) +real_user_test_page_results_from_dict = RealUserTestPageResults.from_dict(real_user_test_page_results_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/endpoint/test_results_api/docs/RealUserTestsResultsApi.md b/endpoint_test_results/docs/RealUserTestsResultsApi.md similarity index 88% rename from endpoint/test_results_api/docs/RealUserTestsResultsApi.md rename to endpoint_test_results/docs/RealUserTestsResultsApi.md index fbc679c1..ceb11a3c 100644 --- a/endpoint/test_results_api/docs/RealUserTestsResultsApi.md +++ b/endpoint_test_results/docs/RealUserTestsResultsApi.md @@ -1,4 +1,4 @@ -# test_results_api.RealUserTestsResultsApi +# endpoint_test_results.RealUserTestsResultsApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,17 +21,16 @@ Provides details for an endpoint real user test. Returns a results array contain ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -41,16 +40,16 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.RealUserTestsResultsApi(api_client) + api_instance = endpoint_test_results.RealUserTestsResultsApi(api_client) id = '07625:1490529480:h3qJQTpl' # str | The real user test id. - aid = '2067' # 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) + 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 @@ -65,6 +64,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The real user test id. | @@ -84,6 +84,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -106,17 +107,16 @@ Returns details for endpoint real user test web page request. Provides complete ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,17 +126,17 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.RealUserTestsResultsApi(api_client) + api_instance = endpoint_test_results.RealUserTestsResultsApi(api_client) id = '07625:1490529480:h3qJQTpl' # str | The real user test id. page_id = '281474976710706' # str | Web page ID - aid = '2067' # 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) + 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 @@ -151,6 +151,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| The real user test id. | @@ -171,6 +172,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -193,18 +195,17 @@ Returns a list of all endpoint real user tests. Results from the last round are ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -214,20 +215,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.RealUserTestsResultsApi(api_client) - aid = '2067' # 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) + api_instance = 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 `_links` instead of this parameter. (optional) - get_endpoint_real_user_tests_request = test_results_api.GetEndpointRealUserTestsRequest() # GetEndpointRealUserTestsRequest | (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + get_endpoint_real_user_tests_request = endpoint_test_results.GetEndpointRealUserTestsRequest() # GetEndpointRealUserTestsRequest | (optional) try: # List endpoint real user tests @@ -242,13 +243,14 @@ with test_results_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] **get_endpoint_real_user_tests_request** | [**GetEndpointRealUserTestsRequest**](GetEndpointRealUserTestsRequest.md)| | [optional] ### Return type @@ -265,6 +267,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -288,18 +291,17 @@ Returns a list of all endpoint real user tests. Sessions from the last round ar ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -309,20 +311,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.RealUserTestsResultsApi(api_client) - aid = '2067' # 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) + api_instance = 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 `_links` instead of this parameter. (optional) - get_endpoint_real_user_tests_request = test_results_api.GetEndpointRealUserTestsRequest() # GetEndpointRealUserTestsRequest | (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + get_endpoint_real_user_tests_request = endpoint_test_results.GetEndpointRealUserTestsRequest() # GetEndpointRealUserTestsRequest | (optional) try: # List endpoint real user tests @@ -337,13 +339,14 @@ with test_results_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] **get_endpoint_real_user_tests_request** | [**GetEndpointRealUserTestsRequest**](GetEndpointRealUserTestsRequest.md)| | [optional] ### Return type @@ -360,6 +363,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -383,18 +387,17 @@ Returns a list of all endpoint real user tests visited pages. Sessions from the ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter -from test_results_api.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from endpoint_test_results.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -404,20 +407,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.RealUserTestsResultsApi(api_client) - aid = '2067' # 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) + api_instance = 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 `_links` instead of this parameter. (optional) - endpoint_real_user_test_result_request_filter = test_results_api.EndpointRealUserTestResultRequestFilter() # EndpointRealUserTestResultRequestFilter | (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_result_request_filter = endpoint_test_results.EndpointRealUserTestResultRequestFilter() # EndpointRealUserTestResultRequestFilter | (optional) try: # List endpoint real user tests visited pages @@ -432,13 +435,14 @@ with test_results_api.ApiClient(configuration) as api_client: ### 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 `_links` instead of this parameter. | [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_result_request_filter** | [**EndpointRealUserTestResultRequestFilter**](EndpointRealUserTestResultRequestFilter.md)| | [optional] ### Return type @@ -455,6 +459,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint_test_results/docs/SelfLinks.md b/endpoint_test_results/docs/SelfLinks.md new file mode 100644 index 00000000..f2002320 --- /dev/null +++ b/endpoint_test_results/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_test_results.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/endpoint_test_results/docs/SelfLinksLinks.md b/endpoint_test_results/docs/SelfLinksLinks.md new file mode 100644 index 00000000..64d87962 --- /dev/null +++ b/endpoint_test_results/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/endpoint_test_results/docs/Severity.md b/endpoint_test_results/docs/Severity.md new file mode 100644 index 00000000..3abd8037 --- /dev/null +++ b/endpoint_test_results/docs/Severity.md @@ -0,0 +1,12 @@ +# Severity + +The severity of the alert. + +## 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/endpoint_test_results/docs/SortOrder.md b/endpoint_test_results/docs/SortOrder.md new file mode 100644 index 00000000..f5616229 --- /dev/null +++ b/endpoint_test_results/docs/SortOrder.md @@ -0,0 +1,12 @@ +# SortOrder + +Parameter indicates the ascending/descending order of the sorting, using either the asc or desc values. + +## 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/endpoint/test_results_api/docs/SystemMetrics.md b/endpoint_test_results/docs/SystemMetrics.md similarity index 87% rename from endpoint/test_results_api/docs/SystemMetrics.md rename to endpoint_test_results/docs/SystemMetrics.md index 015b985a..92e0c1d6 100644 --- a/endpoint/test_results_api/docs/SystemMetrics.md +++ b/endpoint_test_results/docs/SystemMetrics.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_time_ms** | **float** | The start time of metrics collection, expressed in milliseconds since the Epoch. | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.system_metrics import SystemMetrics +from endpoint_test_results.models.system_metrics import SystemMetrics # TODO update the JSON string below json = "{}" # create an instance of SystemMetrics from a JSON string system_metrics_instance = SystemMetrics.from_json(json) # print the JSON string representation of the object -print SystemMetrics.to_json() +print(SystemMetrics.to_json()) # convert the object into a dict system_metrics_dict = system_metrics_instance.to_dict() # create an instance of SystemMetrics from a dict -system_metrics_form_dict = system_metrics.from_dict(system_metrics_dict) +system_metrics_from_dict = SystemMetrics.from_dict(system_metrics_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/endpoint/test_results_api/docs/TcpConnect.md b/endpoint_test_results/docs/TcpConnect.md similarity index 86% rename from endpoint/test_results_api/docs/TcpConnect.md rename to endpoint_test_results/docs/TcpConnect.md index 59beaa84..9f2c105f 100644 --- a/endpoint/test_results_api/docs/TcpConnect.md +++ b/endpoint_test_results/docs/TcpConnect.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rtt** | **float** | Represents the number of milliseconds required to establish TCP connectivity with the target | [optional] [readonly] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.tcp_connect import TcpConnect +from endpoint_test_results.models.tcp_connect import TcpConnect # TODO update the JSON string below json = "{}" # create an instance of TcpConnect from a JSON string tcp_connect_instance = TcpConnect.from_json(json) # print the JSON string representation of the object -print TcpConnect.to_json() +print(TcpConnect.to_json()) # convert the object into a dict tcp_connect_dict = tcp_connect_instance.to_dict() # create an instance of TcpConnect from a dict -tcp_connect_form_dict = tcp_connect.from_dict(tcp_connect_dict) +tcp_connect_from_dict = TcpConnect.from_dict(tcp_connect_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/endpoint_test_results/docs/TestInterval.md b/endpoint_test_results/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/endpoint_test_results/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/endpoint_test_results/docs/TestLabelsInner.md b/endpoint_test_results/docs/TestLabelsInner.md new file mode 100644 index 00000000..dfea9e4d --- /dev/null +++ b/endpoint_test_results/docs/TestLabelsInner.md @@ -0,0 +1,31 @@ +# TestLabelsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Label ID. | [optional] +**name** | **str** | Name of the label. | [optional] +**is_builtin** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] + +## Example + +```python +from endpoint_test_results.models.test_labels_inner import TestLabelsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestLabelsInner from a JSON string +test_labels_inner_instance = TestLabelsInner.from_json(json) +# print the JSON string representation of the object +print(TestLabelsInner.to_json()) + +# convert the object into a dict +test_labels_inner_dict = test_labels_inner_instance.to_dict() +# create an instance of TestLabelsInner from a dict +test_labels_inner_from_dict = TestLabelsInner.from_dict(test_labels_inner_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/endpoint_test_results/docs/TestProbeModeResponse.md b/endpoint_test_results/docs/TestProbeModeResponse.md new file mode 100644 index 00000000..9a6c5555 --- /dev/null +++ b/endpoint_test_results/docs/TestProbeModeResponse.md @@ -0,0 +1,12 @@ +# TestProbeModeResponse + +Probe mode used by network test, only valid when the protocol is set to TCP. + +## 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/endpoint_test_results/docs/TestResult.md b/endpoint_test_results/docs/TestResult.md new file mode 100644 index 00000000..323cc26e --- /dev/null +++ b/endpoint_test_results/docs/TestResult.md @@ -0,0 +1,35 @@ +# TestResult + + +## 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] +**agent_id** | **str** | Unique ID of endpoint agent, from `/endpoint/agents` endpoint. | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] +**server_ip** | **str** | IP address of target server. | [optional] [readonly] +**network_profile** | [**NetworkProfile**](NetworkProfile.md) | | [optional] +**system_metrics** | [**SystemMetrics**](SystemMetrics.md) | | [optional] +**vpn_profile** | [**VpnProfile**](VpnProfile.md) | | [optional] + +## Example + +```python +from endpoint_test_results.models.test_result import TestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of TestResult from a JSON string +test_result_instance = TestResult.from_json(json) +# print the JSON string representation of the object +print(TestResult.to_json()) + +# convert the object into a dict +test_result_dict = test_result_instance.to_dict() +# create an instance of TestResult from a dict +test_result_from_dict = TestResult.from_dict(test_result_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/endpoint_test_results/docs/TestSslVersionId.md b/endpoint_test_results/docs/TestSslVersionId.md new file mode 100644 index 00000000..f13419ab --- /dev/null +++ b/endpoint_test_results/docs/TestSslVersionId.md @@ -0,0 +1,12 @@ +# TestSslVersionId + +SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + +## 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/endpoint/test_results_api/docs/TestsDataRoundsSearch.md b/endpoint_test_results/docs/TestsDataRoundsSearch.md similarity index 81% rename from endpoint/test_results_api/docs/TestsDataRoundsSearch.md rename to endpoint_test_results/docs/TestsDataRoundsSearch.md index 48f40658..836e0895 100644 --- a/endpoint/test_results_api/docs/TestsDataRoundsSearch.md +++ b/endpoint_test_results/docs/TestsDataRoundsSearch.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **search_sort** | [**List[TestsDataSearchSort]**](TestsDataSearchSort.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.tests_data_rounds_search import TestsDataRoundsSearch +from endpoint_test_results.models.tests_data_rounds_search import TestsDataRoundsSearch # TODO update the JSON string below json = "{}" # create an instance of TestsDataRoundsSearch from a JSON string tests_data_rounds_search_instance = TestsDataRoundsSearch.from_json(json) # print the JSON string representation of the object -print TestsDataRoundsSearch.to_json() +print(TestsDataRoundsSearch.to_json()) # convert the object into a dict tests_data_rounds_search_dict = tests_data_rounds_search_instance.to_dict() # create an instance of TestsDataRoundsSearch from a dict -tests_data_rounds_search_form_dict = tests_data_rounds_search.from_dict(tests_data_rounds_search_dict) +tests_data_rounds_search_from_dict = TestsDataRoundsSearch.from_dict(tests_data_rounds_search_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/endpoint/test_results_api/docs/TestsDataSearchFilter.md b/endpoint_test_results/docs/TestsDataSearchFilter.md similarity index 78% rename from endpoint/test_results_api/docs/TestsDataSearchFilter.md rename to endpoint_test_results/docs/TestsDataSearchFilter.md index 6b201ee7..2f33a5c0 100644 --- a/endpoint/test_results_api/docs/TestsDataSearchFilter.md +++ b/endpoint_test_results/docs/TestsDataSearchFilter.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **List[str]** | Filter using the `agent-id`. | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.tests_data_search_filter import TestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_filter import TestsDataSearchFilter # TODO update the JSON string below json = "{}" # create an instance of TestsDataSearchFilter from a JSON string tests_data_search_filter_instance = TestsDataSearchFilter.from_json(json) # print the JSON string representation of the object -print TestsDataSearchFilter.to_json() +print(TestsDataSearchFilter.to_json()) # convert the object into a dict tests_data_search_filter_dict = tests_data_search_filter_instance.to_dict() # create an instance of TestsDataSearchFilter from a dict -tests_data_search_filter_form_dict = tests_data_search_filter.from_dict(tests_data_search_filter_dict) +tests_data_search_filter_from_dict = TestsDataSearchFilter.from_dict(tests_data_search_filter_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/endpoint/test_results_api/docs/TestsDataSearchSort.md b/endpoint_test_results/docs/TestsDataSearchSort.md similarity index 80% rename from endpoint/test_results_api/docs/TestsDataSearchSort.md rename to endpoint_test_results/docs/TestsDataSearchSort.md index 31a96e03..213ad0ae 100644 --- a/endpoint/test_results_api/docs/TestsDataSearchSort.md +++ b/endpoint_test_results/docs/TestsDataSearchSort.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sort** | [**TestsDataSearchSortKey**](TestsDataSearchSortKey.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort # TODO update the JSON string below json = "{}" # create an instance of TestsDataSearchSort from a JSON string tests_data_search_sort_instance = TestsDataSearchSort.from_json(json) # print the JSON string representation of the object -print TestsDataSearchSort.to_json() +print(TestsDataSearchSort.to_json()) # convert the object into a dict tests_data_search_sort_dict = tests_data_search_sort_instance.to_dict() # create an instance of TestsDataSearchSort from a dict -tests_data_search_sort_form_dict = tests_data_search_sort.from_dict(tests_data_search_sort_dict) +tests_data_search_sort_from_dict = TestsDataSearchSort.from_dict(tests_data_search_sort_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/endpoint/test_results_api/docs/TestsDataSearchSortKey.md b/endpoint_test_results/docs/TestsDataSearchSortKey.md similarity index 99% rename from endpoint/test_results_api/docs/TestsDataSearchSortKey.md rename to endpoint_test_results/docs/TestsDataSearchSortKey.md index ba4f6ae0..08c0631b 100644 --- a/endpoint/test_results_api/docs/TestsDataSearchSortKey.md +++ b/endpoint_test_results/docs/TestsDataSearchSortKey.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint/test_results_api/docs/TestsDataThresholdFilter.md b/endpoint_test_results/docs/TestsDataThresholdFilter.md similarity index 81% rename from endpoint/test_results_api/docs/TestsDataThresholdFilter.md rename to endpoint_test_results/docs/TestsDataThresholdFilter.md index 7966cb06..02477065 100644 --- a/endpoint/test_results_api/docs/TestsDataThresholdFilter.md +++ b/endpoint_test_results/docs/TestsDataThresholdFilter.md @@ -3,6 +3,7 @@ The metric is filtered based on the threshold value and operator provided. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | [**ThresholdFilterName**](ThresholdFilterName.md) | | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.tests_data_threshold_filter import TestsDataThresholdFilter +from endpoint_test_results.models.tests_data_threshold_filter import TestsDataThresholdFilter # TODO update the JSON string below json = "{}" # create an instance of TestsDataThresholdFilter from a JSON string tests_data_threshold_filter_instance = TestsDataThresholdFilter.from_json(json) # print the JSON string representation of the object -print TestsDataThresholdFilter.to_json() +print(TestsDataThresholdFilter.to_json()) # convert the object into a dict tests_data_threshold_filter_dict = tests_data_threshold_filter_instance.to_dict() # create an instance of TestsDataThresholdFilter from a dict -tests_data_threshold_filter_form_dict = tests_data_threshold_filter.from_dict(tests_data_threshold_filter_dict) +tests_data_threshold_filter_from_dict = TestsDataThresholdFilter.from_dict(tests_data_threshold_filter_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/endpoint/test_results_api/docs/TestsDataThresholdFilters.md b/endpoint_test_results/docs/TestsDataThresholdFilters.md similarity index 80% rename from endpoint/test_results_api/docs/TestsDataThresholdFilters.md rename to endpoint_test_results/docs/TestsDataThresholdFilters.md index df266f08..022e1312 100644 --- a/endpoint/test_results_api/docs/TestsDataThresholdFilters.md +++ b/endpoint_test_results/docs/TestsDataThresholdFilters.md @@ -3,6 +3,7 @@ All filters are applied based on the conditional operator (and/or). ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **filters** | [**List[TestsDataThresholdFilter]**](TestsDataThresholdFilter.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters # TODO update the JSON string below json = "{}" # create an instance of TestsDataThresholdFilters from a JSON string tests_data_threshold_filters_instance = TestsDataThresholdFilters.from_json(json) # print the JSON string representation of the object -print TestsDataThresholdFilters.to_json() +print(TestsDataThresholdFilters.to_json()) # convert the object into a dict tests_data_threshold_filters_dict = tests_data_threshold_filters_instance.to_dict() # create an instance of TestsDataThresholdFilters from a dict -tests_data_threshold_filters_form_dict = tests_data_threshold_filters.from_dict(tests_data_threshold_filters_dict) +tests_data_threshold_filters_from_dict = TestsDataThresholdFilters.from_dict(tests_data_threshold_filters_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/test_results_api/docs/ThresholdFilterName.md b/endpoint_test_results/docs/ThresholdFilterName.md similarity index 99% rename from endpoint/test_results_api/docs/ThresholdFilterName.md rename to endpoint_test_results/docs/ThresholdFilterName.md index 61aa3064..a4c3a9ae 100644 --- a/endpoint/test_results_api/docs/ThresholdFilterName.md +++ b/endpoint_test_results/docs/ThresholdFilterName.md @@ -3,6 +3,7 @@ Metric on which the threshold filter is applied. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_test_results/docs/ThresholdFilterOperator.md b/endpoint_test_results/docs/ThresholdFilterOperator.md new file mode 100644 index 00000000..c580dd34 --- /dev/null +++ b/endpoint_test_results/docs/ThresholdFilterOperator.md @@ -0,0 +1,11 @@ +# ThresholdFilterOperator + + +## 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/endpoint/test_results_api/docs/Traceroute.md b/endpoint_test_results/docs/Traceroute.md similarity index 86% rename from endpoint/test_results_api/docs/Traceroute.md rename to endpoint_test_results/docs/Traceroute.md index 1373edbf..af987a6b 100644 --- a/endpoint/test_results_api/docs/Traceroute.md +++ b/endpoint_test_results/docs/Traceroute.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **destination** | **str** | The target IP address. | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.traceroute import Traceroute +from endpoint_test_results.models.traceroute import Traceroute # TODO update the JSON string below json = "{}" # create an instance of Traceroute from a JSON string traceroute_instance = Traceroute.from_json(json) # print the JSON string representation of the object -print Traceroute.to_json() +print(Traceroute.to_json()) # convert the object into a dict traceroute_dict = traceroute_instance.to_dict() # create an instance of Traceroute from a dict -traceroute_form_dict = traceroute.from_dict(traceroute_dict) +traceroute_from_dict = Traceroute.from_dict(traceroute_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/endpoint/test_results_api/docs/TracerouteHop.md b/endpoint_test_results/docs/TracerouteHop.md similarity index 87% rename from endpoint/test_results_api/docs/TracerouteHop.md rename to endpoint_test_results/docs/TracerouteHop.md index b7adabfd..a602c716 100644 --- a/endpoint/test_results_api/docs/TracerouteHop.md +++ b/endpoint_test_results/docs/TracerouteHop.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hop** | **int** | The hop index. | [optional] [readonly] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.traceroute_hop import TracerouteHop +from endpoint_test_results.models.traceroute_hop import TracerouteHop # TODO update the JSON string below json = "{}" # create an instance of TracerouteHop from a JSON string traceroute_hop_instance = TracerouteHop.from_json(json) # print the JSON string representation of the object -print TracerouteHop.to_json() +print(TracerouteHop.to_json()) # convert the object into a dict traceroute_hop_dict = traceroute_hop_instance.to_dict() # create an instance of TracerouteHop from a dict -traceroute_hop_form_dict = traceroute_hop.from_dict(traceroute_hop_dict) +traceroute_hop_from_dict = TracerouteHop.from_dict(traceroute_hop_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/endpoint/test_results_api/docs/Trigger.md b/endpoint_test_results/docs/Trigger.md similarity index 99% rename from endpoint/test_results_api/docs/Trigger.md rename to endpoint_test_results/docs/Trigger.md index 5c08a2b3..e7526930 100644 --- a/endpoint/test_results_api/docs/Trigger.md +++ b/endpoint_test_results/docs/Trigger.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/endpoint_test_results/docs/UnauthorizedError.md b/endpoint_test_results/docs/UnauthorizedError.md new file mode 100644 index 00000000..8b73eded --- /dev/null +++ b/endpoint_test_results/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from endpoint_test_results.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/endpoint_test_results/docs/ValidationError.md b/endpoint_test_results/docs/ValidationError.md new file mode 100644 index 00000000..e5f4cb56 --- /dev/null +++ b/endpoint_test_results/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from endpoint_test_results.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/endpoint_test_results/docs/ValidationErrorAllOfErrors.md b/endpoint_test_results/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..f6693eb5 --- /dev/null +++ b/endpoint_test_results/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from endpoint_test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/endpoint/test_results_api/docs/VpnProfile.md b/endpoint_test_results/docs/VpnProfile.md similarity index 87% rename from endpoint/test_results_api/docs/VpnProfile.md rename to endpoint_test_results/docs/VpnProfile.md index 0509f991..66f70a1d 100644 --- a/endpoint/test_results_api/docs/VpnProfile.md +++ b/endpoint_test_results/docs/VpnProfile.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **vpn_client_addresses** | **List[str]** | A list of private IP addresses assigned to the device by the VPN server. | [optional] [readonly] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.vpn_profile import VpnProfile +from endpoint_test_results.models.vpn_profile import VpnProfile # TODO update the JSON string below json = "{}" # create an instance of VpnProfile from a JSON string vpn_profile_instance = VpnProfile.from_json(json) # print the JSON string representation of the object -print VpnProfile.to_json() +print(VpnProfile.to_json()) # convert the object into a dict vpn_profile_dict = vpn_profile_instance.to_dict() # create an instance of VpnProfile from a dict -vpn_profile_form_dict = vpn_profile.from_dict(vpn_profile_dict) +vpn_profile_from_dict = VpnProfile.from_dict(vpn_profile_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/endpoint_test_results/docs/VpnType.md b/endpoint_test_results/docs/VpnType.md new file mode 100644 index 00000000..3212772d --- /dev/null +++ b/endpoint_test_results/docs/VpnType.md @@ -0,0 +1,12 @@ +# VpnType + +Name of the VPN provider. + +## 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/endpoint/test_results_api/docs/WebHTTPServerScheduledTestResultsApi.md b/endpoint_test_results/docs/WebHTTPServerScheduledTestResultsApi.md similarity index 83% rename from endpoint/test_results_api/docs/WebHTTPServerScheduledTestResultsApi.md rename to endpoint_test_results/docs/WebHTTPServerScheduledTestResultsApi.md index 8a52c097..8814affe 100644 --- a/endpoint/test_results_api/docs/WebHTTPServerScheduledTestResultsApi.md +++ b/endpoint_test_results/docs/WebHTTPServerScheduledTestResultsApi.md @@ -1,4 +1,4 @@ -# test_results_api.WebHTTPServerScheduledTestResultsApi +# endpoint_test_results.WebHTTPServerScheduledTestResultsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,18 +17,17 @@ Returns component-level (DNS, Connect, Wait and Receive) timing for the load of ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.expand import Expand -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.rest import ApiException +import endpoint_test_results +from endpoint_test_results.models.expand import Expand +from endpoint_test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response +from 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 = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,21 +37,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = endpoint_test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with endpoint_test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebHTTPServerScheduledTestResultsApi(api_client) + api_instance = endpoint_test_results.WebHTTPServerScheduledTestResultsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (optional) - expand = [test_results_api.Expand()] # List[Expand] | This parameter is optional and determines whether to expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + expand = [endpoint_test_results.Expand()] # List[Expand] | This parameter is optional and determines whether to expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. (optional) try: # Retrieve HTTP server scheduled test results @@ -67,6 +66,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -74,7 +74,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. | [optional] ### Return type @@ -91,6 +91,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint_test_results/endpoint_test_results/__init__.py b/endpoint_test_results/endpoint_test_results/__init__.py new file mode 100644 index 00000000..96f949ea --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/__init__.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_test_results.api.local_network_tests_results_api import LocalNetworkTestsResultsApi +from endpoint_test_results.api.network_dynamic_tests_results_api import NetworkDynamicTestsResultsApi +from endpoint_test_results.api.network_scheduled_tests_results_api import NetworkScheduledTestsResultsApi +from endpoint_test_results.api.real_user_tests_results_api import RealUserTestsResultsApi +from endpoint_test_results.api.web_http_server_scheduled_test_results_api import WebHTTPServerScheduledTestResultsApi + +# import ApiClient +from endpoint_test_results.api_response import ApiResponse +from endpoint_test_results.api_client import ApiClient +from endpoint_test_results.configuration import Configuration +from endpoint_test_results.exceptions import OpenApiException +from endpoint_test_results.exceptions import ApiTypeError +from endpoint_test_results.exceptions import ApiValueError +from endpoint_test_results.exceptions import ApiKeyError +from endpoint_test_results.exceptions import ApiAttributeError +from endpoint_test_results.exceptions import ApiException + +# import models into sdk package +from endpoint_test_results.models.account_group_id import AccountGroupId +from endpoint_test_results.models.alert_direction import AlertDirection +from endpoint_test_results.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_test_results.models.alert_rule import AlertRule +from endpoint_test_results.models.alert_type import AlertType +from endpoint_test_results.models.application_score_quality import ApplicationScoreQuality +from endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.conditional_operator import ConditionalOperator +from endpoint_test_results.models.cpu_utilization import CpuUtilization +from endpoint_test_results.models.dynamic_base_test_result import DynamicBaseTestResult +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.dynamic_test_links import DynamicTestLinks +from endpoint_test_results.models.dynamic_test_links_self import DynamicTestLinksSelf +from endpoint_test_results.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch +from endpoint_test_results.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter +from endpoint_test_results.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_test_results.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_test_results.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_test_results.models.endpoint_browser import EndpointBrowser +from endpoint_test_results.models.endpoint_http_data_point_score import EndpointHttpDataPointScore +from endpoint_test_results.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest +from endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_test_results.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter +from endpoint_test_results.models.endpoint_ping_data_point_score import EndpointPingDataPointScore +from endpoint_test_results.models.endpoint_real_user_test import EndpointRealUserTest +from endpoint_test_results.models.endpoint_real_user_test_base import EndpointRealUserTestBase +from endpoint_test_results.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail +from endpoint_test_results.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from endpoint_test_results.models.endpoint_real_user_test_results import EndpointRealUserTestResults +from endpoint_test_results.models.endpoint_result_request_filter import EndpointResultRequestFilter +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_test_results.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from endpoint_test_results.models.endpoint_test import EndpointTest +from endpoint_test_results.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks +from endpoint_test_results.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.error import Error +from endpoint_test_results.models.ethernet_profile import EthernetProfile +from endpoint_test_results.models.expand import Expand +from endpoint_test_results.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response +from endpoint_test_results.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response +from endpoint_test_results.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest +from endpoint_test_results.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest +from endpoint_test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response +from endpoint_test_results.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response +from endpoint_test_results.models.hop import Hop +from endpoint_test_results.models.http_error_type import HttpErrorType +from endpoint_test_results.models.http_test_result import HttpTestResult +from endpoint_test_results.models.http_test_result_headers import HttpTestResultHeaders +from endpoint_test_results.models.http_test_results import HttpTestResults +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from endpoint_test_results.models.link import Link +from endpoint_test_results.models.local_network_result import LocalNetworkResult +from endpoint_test_results.models.local_network_results import LocalNetworkResults +from endpoint_test_results.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults +from endpoint_test_results.models.local_network_topology_result import LocalNetworkTopologyResult +from endpoint_test_results.models.local_network_topology_result_base import LocalNetworkTopologyResultBase +from endpoint_test_results.models.local_network_topology_results import LocalNetworkTopologyResults +from endpoint_test_results.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults +from endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch +from endpoint_test_results.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter +from endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult +from endpoint_test_results.models.network_dynamic_test_results import NetworkDynamicTestResults +from endpoint_test_results.models.network_interface import NetworkInterface +from endpoint_test_results.models.network_metrics import NetworkMetrics +from endpoint_test_results.models.network_ping import NetworkPing +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.network_proxy_profile import NetworkProxyProfile +from endpoint_test_results.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner +from endpoint_test_results.models.network_test_result import NetworkTestResult +from endpoint_test_results.models.network_test_results import NetworkTestResults +from endpoint_test_results.models.network_topology_type import NetworkTopologyType +from endpoint_test_results.models.network_wireless_profile import NetworkWirelessProfile +from endpoint_test_results.models.pagination_next_and_self_link import PaginationNextAndSelfLink +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_test_results.models.pagination_next_link import PaginationNextLink +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from endpoint_test_results.models.path_vis_base_test_result import PathVisBaseTestResult +from endpoint_test_results.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult +from endpoint_test_results.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults +from endpoint_test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from endpoint_test_results.models.path_vis_detail_test_results import PathVisDetailTestResults +from endpoint_test_results.models.path_vis_dynamic_test_result import PathVisDynamicTestResult +from endpoint_test_results.models.path_vis_dynamic_test_results import PathVisDynamicTestResults +from endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint +from endpoint_test_results.models.path_vis_hop import PathVisHop +from endpoint_test_results.models.path_vis_route import PathVisRoute +from endpoint_test_results.models.path_vis_test_result import PathVisTestResult +from endpoint_test_results.models.path_vis_test_results import PathVisTestResults +from endpoint_test_results.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes +from endpoint_test_results.models.platform import Platform +from endpoint_test_results.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response +from endpoint_test_results.models.query_window import QueryWindow +from endpoint_test_results.models.real_user_test_coordinates import RealUserTestCoordinates +from endpoint_test_results.models.real_user_test_network import RealUserTestNetwork +from endpoint_test_results.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing +from endpoint_test_results.models.real_user_test_network_ping import RealUserTestNetworkPing +from endpoint_test_results.models.real_user_test_network_result import RealUserTestNetworkResult +from endpoint_test_results.models.real_user_test_network_results import RealUserTestNetworkResults +from endpoint_test_results.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute +from endpoint_test_results.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing +from endpoint_test_results.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute +from endpoint_test_results.models.real_user_test_page import RealUserTestPage +from endpoint_test_results.models.real_user_test_page_page_timings import RealUserTestPagePageTimings +from endpoint_test_results.models.real_user_test_page_result import RealUserTestPageResult +from endpoint_test_results.models.real_user_test_page_results import RealUserTestPageResults +from endpoint_test_results.models.self_links import SelfLinks +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from endpoint_test_results.models.severity import Severity +from endpoint_test_results.models.sort_order import SortOrder +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.tcp_connect import TcpConnect +from endpoint_test_results.models.test_interval import TestInterval +from endpoint_test_results.models.test_labels_inner import TestLabelsInner +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_test_results.models.test_result import TestResult +from endpoint_test_results.models.test_ssl_version_id import TestSslVersionId +from endpoint_test_results.models.tests_data_rounds_search import TestsDataRoundsSearch +from endpoint_test_results.models.tests_data_search_filter import TestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_search_sort_key import TestsDataSearchSortKey +from endpoint_test_results.models.tests_data_threshold_filter import TestsDataThresholdFilter +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters +from endpoint_test_results.models.threshold_filter_name import ThresholdFilterName +from endpoint_test_results.models.threshold_filter_operator import ThresholdFilterOperator +from endpoint_test_results.models.traceroute import Traceroute +from endpoint_test_results.models.traceroute_hop import TracerouteHop +from endpoint_test_results.models.trigger import Trigger +from endpoint_test_results.models.unauthorized_error import UnauthorizedError +from endpoint_test_results.models.validation_error import ValidationError +from endpoint_test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from endpoint_test_results.models.vpn_profile import VpnProfile +from endpoint_test_results.models.vpn_type import VpnType diff --git a/endpoint_test_results/endpoint_test_results/api/__init__.py b/endpoint_test_results/endpoint_test_results/api/__init__.py new file mode 100644 index 00000000..cbedbff6 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/api/__init__.py @@ -0,0 +1,9 @@ +# flake8: noqa + +# import apis into api package +from endpoint_test_results.api.local_network_tests_results_api import LocalNetworkTestsResultsApi +from endpoint_test_results.api.network_dynamic_tests_results_api import NetworkDynamicTestsResultsApi +from endpoint_test_results.api.network_scheduled_tests_results_api import NetworkScheduledTestsResultsApi +from endpoint_test_results.api.real_user_tests_results_api import RealUserTestsResultsApi +from endpoint_test_results.api.web_http_server_scheduled_test_results_api import WebHTTPServerScheduledTestResultsApi + diff --git a/endpoint/test_results_api/test_results_api/api/local_network_tests_results_api.py b/endpoint_test_results/endpoint_test_results/api/local_network_tests_results_api.py similarity index 96% rename from endpoint/test_results_api/test_results_api/api/local_network_tests_results_api.py rename to endpoint_test_results/endpoint_test_results/api/local_network_tests_results_api.py index 6f4f4d6e..5285b4db 100644 --- a/endpoint/test_results_api/test_results_api/api/local_network_tests_results_api.py +++ b/endpoint_test_results/endpoint_test_results/api/local_network_tests_results_api.py @@ -5,40 +5,29 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from endpoint_test_results.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response +from endpoint_test_results.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest -from test_results_api.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response -from test_results_api.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response -from test_results_api.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response -from test_results_api.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from endpoint_test_results.api_client import ApiClient, RequestSerialized +from endpoint_test_results.api_response import ApiResponse +from endpoint_test_results.rest import RESTResponseType class LocalNetworkTestsResultsApi: @@ -118,8 +107,7 @@ class LocalNetworkTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -196,8 +184,7 @@ class LocalNetworkTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -274,8 +261,7 @@ class LocalNetworkTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -292,19 +278,18 @@ class LocalNetworkTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -412,8 +397,7 @@ class LocalNetworkTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -486,8 +470,7 @@ class LocalNetworkTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -560,8 +543,7 @@ class LocalNetworkTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -577,19 +559,18 @@ class LocalNetworkTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -642,7 +623,7 @@ class LocalNetworkTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_local_networks_topologies_request: Optional[GetEndpointLocalNetworksTopologiesRequest] = None, _request_timeout: Union[ None, @@ -669,7 +650,7 @@ class LocalNetworkTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_local_networks_topologies_request: :type get_endpoint_local_networks_topologies_request: GetEndpointLocalNetworksTopologiesRequest @@ -710,14 +691,13 @@ class LocalNetworkTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointLocalNetworksTopologies200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -737,7 +717,7 @@ class LocalNetworkTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_local_networks_topologies_request: Optional[GetEndpointLocalNetworksTopologiesRequest] = None, _request_timeout: Union[ None, @@ -764,7 +744,7 @@ class LocalNetworkTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_local_networks_topologies_request: :type get_endpoint_local_networks_topologies_request: GetEndpointLocalNetworksTopologiesRequest @@ -805,14 +785,13 @@ class LocalNetworkTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointLocalNetworksTopologies200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -832,7 +811,7 @@ class LocalNetworkTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_local_networks_topologies_request: Optional[GetEndpointLocalNetworksTopologiesRequest] = None, _request_timeout: Union[ None, @@ -859,7 +838,7 @@ class LocalNetworkTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_local_networks_topologies_request: :type get_endpoint_local_networks_topologies_request: GetEndpointLocalNetworksTopologiesRequest @@ -900,14 +879,13 @@ class LocalNetworkTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointLocalNetworksTopologies200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -928,19 +906,18 @@ class LocalNetworkTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/test_results_api/test_results_api/api/network_dynamic_tests_results_api.py b/endpoint_test_results/endpoint_test_results/api/network_dynamic_tests_results_api.py similarity index 95% rename from endpoint/test_results_api/test_results_api/api/network_dynamic_tests_results_api.py rename to endpoint_test_results/endpoint_test_results/api/network_dynamic_tests_results_api.py index 6a28b997..8c8f4e3a 100644 --- a/endpoint/test_results_api/test_results_api/api/network_dynamic_tests_results_api.py +++ b/endpoint_test_results/endpoint_test_results/api/network_dynamic_tests_results_api.py @@ -5,40 +5,29 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from endpoint_test_results.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch +from endpoint_test_results.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response +from endpoint_test_results.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response -from test_results_api.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch -from test_results_api.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response -from test_results_api.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response -from test_results_api.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from endpoint_test_results.api_client import ApiClient, RequestSerialized +from endpoint_test_results.api_response import ApiResponse +from endpoint_test_results.rest import RESTResponseType class NetworkDynamicTestsResultsApi: @@ -62,7 +51,7 @@ class NetworkDynamicTestsResultsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -76,7 +65,7 @@ class NetworkDynamicTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetDynamicTestResultNetworkPathvis200Response: - """Retrieve pathvis network dynamic test results + """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. @@ -90,7 +79,7 @@ class NetworkDynamicTestsResultsApi: :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 `_links` instead of this parameter. + :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 @@ -134,8 +123,7 @@ class NetworkDynamicTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -156,7 +144,7 @@ class NetworkDynamicTestsResultsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -170,7 +158,7 @@ class NetworkDynamicTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetDynamicTestResultNetworkPathvis200Response]: - """Retrieve pathvis network dynamic test results + """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. @@ -184,7 +172,7 @@ class NetworkDynamicTestsResultsApi: :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 `_links` instead of this parameter. + :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 @@ -228,8 +216,7 @@ class NetworkDynamicTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -250,7 +237,7 @@ class NetworkDynamicTestsResultsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -264,7 +251,7 @@ class NetworkDynamicTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve pathvis network dynamic test results + """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. @@ -278,7 +265,7 @@ class NetworkDynamicTestsResultsApi: :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 `_links` instead of this parameter. + :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 @@ -322,8 +309,7 @@ class NetworkDynamicTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -344,19 +330,18 @@ class NetworkDynamicTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -422,7 +407,7 @@ class NetworkDynamicTestsResultsApi: return self.api_client.param_serialize( method='GET', - resource_path='/v7/endpoint/test-results/dynamic-tests/{testId}/pathvis', + resource_path='/v7/endpoint/test-results/dynamic-tests/{testId}/path-vis', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -458,7 +443,7 @@ class NetworkDynamicTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetDynamicTestResultPathvisAgentRound200Response: - """Retrieve pathvis network dynamic test results details + """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. @@ -505,14 +490,13 @@ class NetworkDynamicTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetDynamicTestResultPathvisAgentRound200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -545,7 +529,7 @@ class NetworkDynamicTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetDynamicTestResultPathvisAgentRound200Response]: - """Retrieve pathvis network dynamic test results details + """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. @@ -592,14 +576,13 @@ class NetworkDynamicTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetDynamicTestResultPathvisAgentRound200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -632,7 +615,7 @@ class NetworkDynamicTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve pathvis network dynamic test results details + """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. @@ -679,14 +662,13 @@ class NetworkDynamicTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetDynamicTestResultPathvisAgentRound200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -705,19 +687,18 @@ class NetworkDynamicTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -753,7 +734,7 @@ class NetworkDynamicTestsResultsApi: return self.api_client.param_serialize( method='GET', - resource_path='/v7/endpoint/test-results/dynamic-tests/{testId}/pathvis/agent/{agentId}/round/{roundId}', + 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, @@ -777,7 +758,7 @@ class NetworkDynamicTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, dynamic_tests_data_round_search: Annotated[Optional[DynamicTestsDataRoundSearch], Field(description="Tests data search filters.")] = None, _request_timeout: Union[ None, @@ -806,7 +787,7 @@ class NetworkDynamicTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param dynamic_tests_data_round_search: Tests data search filters. :type dynamic_tests_data_round_search: DynamicTestsDataRoundSearch @@ -853,8 +834,7 @@ class NetworkDynamicTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -875,7 +855,7 @@ class NetworkDynamicTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, dynamic_tests_data_round_search: Annotated[Optional[DynamicTestsDataRoundSearch], Field(description="Tests data search filters.")] = None, _request_timeout: Union[ None, @@ -904,7 +884,7 @@ class NetworkDynamicTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param dynamic_tests_data_round_search: Tests data search filters. :type dynamic_tests_data_round_search: DynamicTestsDataRoundSearch @@ -951,8 +931,7 @@ class NetworkDynamicTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -973,7 +952,7 @@ class NetworkDynamicTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, dynamic_tests_data_round_search: Annotated[Optional[DynamicTestsDataRoundSearch], Field(description="Tests data search filters.")] = None, _request_timeout: Union[ None, @@ -1002,7 +981,7 @@ class NetworkDynamicTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param dynamic_tests_data_round_search: Tests data search filters. :type dynamic_tests_data_round_search: DynamicTestsDataRoundSearch @@ -1049,8 +1028,7 @@ class NetworkDynamicTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1072,19 +1050,18 @@ class NetworkDynamicTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/test_results_api/test_results_api/api/network_scheduled_tests_results_api.py b/endpoint_test_results/endpoint_test_results/api/network_scheduled_tests_results_api.py similarity index 95% rename from endpoint/test_results_api/test_results_api/api/network_scheduled_tests_results_api.py rename to endpoint_test_results/endpoint_test_results/api/network_scheduled_tests_results_api.py index c55726b2..53eb07d3 100644 --- a/endpoint/test_results_api/test_results_api/api/network_scheduled_tests_results_api.py +++ b/endpoint_test_results/endpoint_test_results/api/network_scheduled_tests_results_api.py @@ -5,42 +5,31 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictFloat, StrictInt, StrictStr, field_validator - +from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Optional, Union +from typing_extensions import Annotated +from endpoint_test_results.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response +from endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch +from endpoint_test_results.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response +from endpoint_test_results.models.tests_data_rounds_search import TestsDataRoundsSearch -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response -from test_results_api.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch -from test_results_api.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response -from test_results_api.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response -from test_results_api.models.tests_data_rounds_search import TestsDataRoundsSearch - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from endpoint_test_results.api_client import ApiClient, RequestSerialized +from endpoint_test_results.api_response import ApiResponse +from endpoint_test_results.rest import RESTResponseType class NetworkScheduledTestsResultsApi: @@ -64,7 +53,7 @@ class NetworkScheduledTestsResultsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -78,7 +67,7 @@ class NetworkScheduledTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetTestResultNetworkPathvis200Response: - """Retrieve pathvis network scheduled test results + """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. @@ -92,7 +81,7 @@ class NetworkScheduledTestsResultsApi: :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 `_links` instead of this parameter. + :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 @@ -136,8 +125,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -158,7 +146,7 @@ class NetworkScheduledTestsResultsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -172,7 +160,7 @@ class NetworkScheduledTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetTestResultNetworkPathvis200Response]: - """Retrieve pathvis network scheduled test results + """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. @@ -186,7 +174,7 @@ class NetworkScheduledTestsResultsApi: :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 `_links` instead of this parameter. + :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 @@ -230,8 +218,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -252,7 +239,7 @@ class NetworkScheduledTestsResultsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -266,7 +253,7 @@ class NetworkScheduledTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve pathvis network scheduled test results + """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. @@ -280,7 +267,7 @@ class NetworkScheduledTestsResultsApi: :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 `_links` instead of this parameter. + :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 @@ -324,8 +311,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -346,19 +332,18 @@ class NetworkScheduledTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -424,7 +409,7 @@ class NetworkScheduledTestsResultsApi: return self.api_client.param_serialize( method='GET', - resource_path='/v7/endpoint/test-results/scheduled-tests/{testId}/pathvis', + resource_path='/v7/endpoint/test-results/scheduled-tests/{testId}/path-vis', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -460,7 +445,7 @@ class NetworkScheduledTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetTestResultPathvisAgentRound200Response: - """Retrieve pathvis network scheduled test results details + """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. @@ -512,8 +497,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -546,7 +530,7 @@ class NetworkScheduledTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetTestResultPathvisAgentRound200Response]: - """Retrieve pathvis network scheduled test results details + """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. @@ -598,8 +582,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -632,7 +615,7 @@ class NetworkScheduledTestsResultsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve pathvis network scheduled test results details + """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. @@ -684,8 +667,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -704,19 +686,18 @@ class NetworkScheduledTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -752,7 +733,7 @@ class NetworkScheduledTestsResultsApi: return self.api_client.param_serialize( method='GET', - resource_path='/v7/endpoint/test-results/scheduled-tests/{testId}/pathvis/agent/{agentId}/round/{roundId}', + 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, @@ -776,7 +757,7 @@ class NetworkScheduledTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, tests_data_rounds_search: Annotated[Optional[TestsDataRoundsSearch], Field(description="Tests data search filters.")] = None, _request_timeout: Union[ None, @@ -805,7 +786,7 @@ class NetworkScheduledTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param tests_data_rounds_search: Tests data search filters. :type tests_data_rounds_search: TestsDataRoundsSearch @@ -852,8 +833,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -874,7 +854,7 @@ class NetworkScheduledTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, tests_data_rounds_search: Annotated[Optional[TestsDataRoundsSearch], Field(description="Tests data search filters.")] = None, _request_timeout: Union[ None, @@ -903,7 +883,7 @@ class NetworkScheduledTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param tests_data_rounds_search: Tests data search filters. :type tests_data_rounds_search: TestsDataRoundsSearch @@ -950,8 +930,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -972,7 +951,7 @@ class NetworkScheduledTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, tests_data_rounds_search: Annotated[Optional[TestsDataRoundsSearch], Field(description="Tests data search filters.")] = None, _request_timeout: Union[ None, @@ -1001,7 +980,7 @@ class NetworkScheduledTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param tests_data_rounds_search: Tests data search filters. :type tests_data_rounds_search: TestsDataRoundsSearch @@ -1048,8 +1027,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1071,19 +1049,18 @@ class NetworkScheduledTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1188,7 +1165,7 @@ class NetworkScheduledTestsResultsApi: 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter.")] = 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[ None, @@ -1217,7 +1194,7 @@ class NetworkScheduledTestsResultsApi: :type end_date: datetime :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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. :type multi_test_id_tests_data_rounds_search: MultiTestIdTestsDataRoundsSearch @@ -1264,8 +1241,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1286,7 +1262,7 @@ class NetworkScheduledTestsResultsApi: 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter.")] = 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[ None, @@ -1315,7 +1291,7 @@ class NetworkScheduledTestsResultsApi: :type end_date: datetime :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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. :type multi_test_id_tests_data_rounds_search: MultiTestIdTestsDataRoundsSearch @@ -1362,8 +1338,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1384,7 +1359,7 @@ class NetworkScheduledTestsResultsApi: 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter.")] = 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[ None, @@ -1413,7 +1388,7 @@ class NetworkScheduledTestsResultsApi: :type end_date: datetime :param max: (Optional) Maximum number of objects to return. :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. + :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. :type multi_test_id_tests_data_rounds_search: MultiTestIdTestsDataRoundsSearch @@ -1460,8 +1435,7 @@ class NetworkScheduledTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1483,19 +1457,18 @@ class NetworkScheduledTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/test_results_api/test_results_api/api/real_user_tests_results_api.py b/endpoint_test_results/endpoint_test_results/api/real_user_tests_results_api.py similarity index 96% rename from endpoint/test_results_api/test_results_api/api/real_user_tests_results_api.py rename to endpoint_test_results/endpoint_test_results/api/real_user_tests_results_api.py index cb5cd683..c543afdb 100644 --- a/endpoint/test_results_api/test_results_api/api/real_user_tests_results_api.py +++ b/endpoint_test_results/endpoint_test_results/api/real_user_tests_results_api.py @@ -5,43 +5,32 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from endpoint_test_results.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter -from test_results_api.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response -from test_results_api.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response -from test_results_api.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response -from test_results_api.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response -from test_results_api.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from endpoint_test_results.api_client import ApiClient, RequestSerialized +from endpoint_test_results.api_response import ApiResponse +from endpoint_test_results.rest import RESTResponseType class RealUserTestsResultsApi: @@ -121,8 +110,7 @@ class RealUserTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -199,8 +187,7 @@ class RealUserTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -277,8 +264,7 @@ class RealUserTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -295,19 +281,18 @@ class RealUserTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -423,8 +408,7 @@ class RealUserTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -505,8 +489,7 @@ class RealUserTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -587,8 +570,7 @@ class RealUserTestsResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -606,19 +588,18 @@ class RealUserTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -675,7 +656,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_real_user_tests_request: Optional[GetEndpointRealUserTestsRequest] = None, _request_timeout: Union[ None, @@ -702,7 +683,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_real_user_tests_request: :type get_endpoint_real_user_tests_request: GetEndpointRealUserTestsRequest @@ -743,14 +724,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTests200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -770,7 +750,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_real_user_tests_request: Optional[GetEndpointRealUserTestsRequest] = None, _request_timeout: Union[ None, @@ -797,7 +777,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_real_user_tests_request: :type get_endpoint_real_user_tests_request: GetEndpointRealUserTestsRequest @@ -838,14 +818,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTests200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -865,7 +844,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_real_user_tests_request: Optional[GetEndpointRealUserTestsRequest] = None, _request_timeout: Union[ None, @@ -892,7 +871,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_real_user_tests_request: :type get_endpoint_real_user_tests_request: GetEndpointRealUserTestsRequest @@ -933,14 +912,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTests200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -961,19 +939,18 @@ class RealUserTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1075,7 +1052,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_real_user_tests_request: Optional[GetEndpointRealUserTestsRequest] = None, _request_timeout: Union[ None, @@ -1102,7 +1079,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_real_user_tests_request: :type get_endpoint_real_user_tests_request: GetEndpointRealUserTestsRequest @@ -1143,14 +1120,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTestsNetwork200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1170,7 +1146,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_real_user_tests_request: Optional[GetEndpointRealUserTestsRequest] = None, _request_timeout: Union[ None, @@ -1197,7 +1173,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_real_user_tests_request: :type get_endpoint_real_user_tests_request: GetEndpointRealUserTestsRequest @@ -1238,14 +1214,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTestsNetwork200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1265,7 +1240,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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, get_endpoint_real_user_tests_request: Optional[GetEndpointRealUserTestsRequest] = None, _request_timeout: Union[ None, @@ -1292,7 +1267,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param get_endpoint_real_user_tests_request: :type get_endpoint_real_user_tests_request: GetEndpointRealUserTestsRequest @@ -1333,14 +1308,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTestsNetwork200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1361,19 +1335,18 @@ class RealUserTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1475,7 +1448,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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_result_request_filter: Optional[EndpointRealUserTestResultRequestFilter] = None, _request_timeout: Union[ None, @@ -1502,7 +1475,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :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_result_request_filter: :type endpoint_real_user_test_result_request_filter: EndpointRealUserTestResultRequestFilter @@ -1543,14 +1516,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTestsPages200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1570,7 +1542,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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_result_request_filter: Optional[EndpointRealUserTestResultRequestFilter] = None, _request_timeout: Union[ None, @@ -1597,7 +1569,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :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_result_request_filter: :type endpoint_real_user_test_result_request_filter: EndpointRealUserTestResultRequestFilter @@ -1638,14 +1610,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTestsPages200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1665,7 +1636,7 @@ class RealUserTestsResultsApi: 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 `_links` instead of this parameter.")] = 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_result_request_filter: Optional[EndpointRealUserTestResultRequestFilter] = None, _request_timeout: Union[ None, @@ -1692,7 +1663,7 @@ class RealUserTestsResultsApi: :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 `_links` instead of this parameter. + :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_result_request_filter: :type endpoint_real_user_test_result_request_filter: EndpointRealUserTestResultRequestFilter @@ -1733,14 +1704,13 @@ class RealUserTestsResultsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetEndpointRealUserTestsPages200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -1761,19 +1731,18 @@ class RealUserTestsResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint/test_results_api/test_results_api/api/web_http_server_scheduled_test_results_api.py b/endpoint_test_results/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py similarity index 95% rename from endpoint/test_results_api/test_results_api/api/web_http_server_scheduled_test_results_api.py rename to endpoint_test_results/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py index 77cf7ffc..4cec2a4b 100644 --- a/endpoint/test_results_api/test_results_api/api/web_http_server_scheduled_test_results_api.py +++ b/endpoint_test_results/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py @@ -5,38 +5,27 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import List, Optional +from typing_extensions import Annotated +from endpoint_test_results.models.expand import Expand +from endpoint_test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.models.expand import Expand -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from endpoint_test_results.api_client import ApiClient, RequestSerialized +from endpoint_test_results.api_response import ApiResponse +from endpoint_test_results.rest import RESTResponseType class WebHTTPServerScheduledTestResultsApi: @@ -60,7 +49,7 @@ class WebHTTPServerScheduledTestResultsApi: 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 `_links` instead of this parameter.")] = 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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query.")] = None, _request_timeout: Union[ None, @@ -89,7 +78,7 @@ class WebHTTPServerScheduledTestResultsApi: :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 `_links` instead of this parameter. + :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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. :type expand: List[Expand] @@ -136,8 +125,7 @@ class WebHTTPServerScheduledTestResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -158,7 +146,7 @@ class WebHTTPServerScheduledTestResultsApi: 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 `_links` instead of this parameter.")] = 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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query.")] = None, _request_timeout: Union[ None, @@ -187,7 +175,7 @@ class WebHTTPServerScheduledTestResultsApi: :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 `_links` instead of this parameter. + :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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. :type expand: List[Expand] @@ -234,8 +222,7 @@ class WebHTTPServerScheduledTestResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -256,7 +243,7 @@ class WebHTTPServerScheduledTestResultsApi: 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 `_links` instead of this parameter.")] = 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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query.")] = None, _request_timeout: Union[ None, @@ -285,7 +272,7 @@ class WebHTTPServerScheduledTestResultsApi: :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 `_links` instead of this parameter. + :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 expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. :type expand: List[Expand] @@ -332,8 +319,7 @@ class WebHTTPServerScheduledTestResultsApi: '404': "Error", '429': "Error", '500': "Error", - '502': "Error" - + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -355,12 +341,11 @@ class WebHTTPServerScheduledTestResultsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -368,7 +353,7 @@ class WebHTTPServerScheduledTestResultsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint_test_results/endpoint_test_results/api_client.py b/endpoint_test_results/endpoint_test_results/api_client.py new file mode 100644 index 00000000..97848df9 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from endpoint_test_results.configuration import Configuration +from endpoint_test_results.api_response import ApiResponse, T as ApiResponseT +import endpoint_test_results.models +from endpoint_test_results import rest +from endpoint_test_results.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(endpoint_test_results.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/endpoint_test_results/endpoint_test_results/api_response.py b/endpoint_test_results/endpoint_test_results/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/endpoint_test_results/endpoint_test_results/configuration.py b/endpoint_test_results/endpoint_test_results/configuration.py new file mode 100644 index 00000000..6001302a --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("endpoint_test_results") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/endpoint_test_results/endpoint_test_results/exceptions.py b/endpoint_test_results/endpoint_test_results/exceptions.py new file mode 100644 index 00000000..95ca7876 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/endpoint_test_results/endpoint_test_results/models/__init__.py b/endpoint_test_results/endpoint_test_results/models/__init__.py new file mode 100644 index 00000000..7e1c774b --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/__init__.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +# flake8: noqa +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from endpoint_test_results.models.account_group_id import AccountGroupId +from endpoint_test_results.models.alert_direction import AlertDirection +from endpoint_test_results.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_test_results.models.alert_rule import AlertRule +from endpoint_test_results.models.alert_type import AlertType +from endpoint_test_results.models.application_score_quality import ApplicationScoreQuality +from endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.conditional_operator import ConditionalOperator +from endpoint_test_results.models.cpu_utilization import CpuUtilization +from endpoint_test_results.models.dynamic_base_test_result import DynamicBaseTestResult +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.dynamic_test_links import DynamicTestLinks +from endpoint_test_results.models.dynamic_test_links_self import DynamicTestLinksSelf +from endpoint_test_results.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch +from endpoint_test_results.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter +from endpoint_test_results.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_test_results.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_test_results.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_test_results.models.endpoint_browser import EndpointBrowser +from endpoint_test_results.models.endpoint_http_data_point_score import EndpointHttpDataPointScore +from endpoint_test_results.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest +from endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_test_results.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter +from endpoint_test_results.models.endpoint_ping_data_point_score import EndpointPingDataPointScore +from endpoint_test_results.models.endpoint_real_user_test import EndpointRealUserTest +from endpoint_test_results.models.endpoint_real_user_test_base import EndpointRealUserTestBase +from endpoint_test_results.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail +from endpoint_test_results.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from endpoint_test_results.models.endpoint_real_user_test_results import EndpointRealUserTestResults +from endpoint_test_results.models.endpoint_result_request_filter import EndpointResultRequestFilter +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_test_results.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from endpoint_test_results.models.endpoint_test import EndpointTest +from endpoint_test_results.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks +from endpoint_test_results.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.error import Error +from endpoint_test_results.models.ethernet_profile import EthernetProfile +from endpoint_test_results.models.expand import Expand +from endpoint_test_results.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response +from endpoint_test_results.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response +from endpoint_test_results.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest +from endpoint_test_results.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest +from endpoint_test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response +from endpoint_test_results.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response +from endpoint_test_results.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response +from endpoint_test_results.models.hop import Hop +from endpoint_test_results.models.http_error_type import HttpErrorType +from endpoint_test_results.models.http_test_result import HttpTestResult +from endpoint_test_results.models.http_test_result_headers import HttpTestResultHeaders +from endpoint_test_results.models.http_test_results import HttpTestResults +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from endpoint_test_results.models.link import Link +from endpoint_test_results.models.local_network_result import LocalNetworkResult +from endpoint_test_results.models.local_network_results import LocalNetworkResults +from endpoint_test_results.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults +from endpoint_test_results.models.local_network_topology_result import LocalNetworkTopologyResult +from endpoint_test_results.models.local_network_topology_result_base import LocalNetworkTopologyResultBase +from endpoint_test_results.models.local_network_topology_results import LocalNetworkTopologyResults +from endpoint_test_results.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults +from endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch +from endpoint_test_results.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter +from endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult +from endpoint_test_results.models.network_dynamic_test_results import NetworkDynamicTestResults +from endpoint_test_results.models.network_interface import NetworkInterface +from endpoint_test_results.models.network_metrics import NetworkMetrics +from endpoint_test_results.models.network_ping import NetworkPing +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.network_proxy_profile import NetworkProxyProfile +from endpoint_test_results.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner +from endpoint_test_results.models.network_test_result import NetworkTestResult +from endpoint_test_results.models.network_test_results import NetworkTestResults +from endpoint_test_results.models.network_topology_type import NetworkTopologyType +from endpoint_test_results.models.network_wireless_profile import NetworkWirelessProfile +from endpoint_test_results.models.pagination_next_and_self_link import PaginationNextAndSelfLink +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_test_results.models.pagination_next_link import PaginationNextLink +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from endpoint_test_results.models.path_vis_base_test_result import PathVisBaseTestResult +from endpoint_test_results.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult +from endpoint_test_results.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults +from endpoint_test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from endpoint_test_results.models.path_vis_detail_test_results import PathVisDetailTestResults +from endpoint_test_results.models.path_vis_dynamic_test_result import PathVisDynamicTestResult +from endpoint_test_results.models.path_vis_dynamic_test_results import PathVisDynamicTestResults +from endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint +from endpoint_test_results.models.path_vis_hop import PathVisHop +from endpoint_test_results.models.path_vis_route import PathVisRoute +from endpoint_test_results.models.path_vis_test_result import PathVisTestResult +from endpoint_test_results.models.path_vis_test_results import PathVisTestResults +from endpoint_test_results.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes +from endpoint_test_results.models.platform import Platform +from endpoint_test_results.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response +from endpoint_test_results.models.query_window import QueryWindow +from endpoint_test_results.models.real_user_test_coordinates import RealUserTestCoordinates +from endpoint_test_results.models.real_user_test_network import RealUserTestNetwork +from endpoint_test_results.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing +from endpoint_test_results.models.real_user_test_network_ping import RealUserTestNetworkPing +from endpoint_test_results.models.real_user_test_network_result import RealUserTestNetworkResult +from endpoint_test_results.models.real_user_test_network_results import RealUserTestNetworkResults +from endpoint_test_results.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute +from endpoint_test_results.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing +from endpoint_test_results.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute +from endpoint_test_results.models.real_user_test_page import RealUserTestPage +from endpoint_test_results.models.real_user_test_page_page_timings import RealUserTestPagePageTimings +from endpoint_test_results.models.real_user_test_page_result import RealUserTestPageResult +from endpoint_test_results.models.real_user_test_page_results import RealUserTestPageResults +from endpoint_test_results.models.self_links import SelfLinks +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from endpoint_test_results.models.severity import Severity +from endpoint_test_results.models.sort_order import SortOrder +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.tcp_connect import TcpConnect +from endpoint_test_results.models.test_interval import TestInterval +from endpoint_test_results.models.test_labels_inner import TestLabelsInner +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_test_results.models.test_result import TestResult +from endpoint_test_results.models.test_ssl_version_id import TestSslVersionId +from endpoint_test_results.models.tests_data_rounds_search import TestsDataRoundsSearch +from endpoint_test_results.models.tests_data_search_filter import TestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_search_sort_key import TestsDataSearchSortKey +from endpoint_test_results.models.tests_data_threshold_filter import TestsDataThresholdFilter +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters +from endpoint_test_results.models.threshold_filter_name import ThresholdFilterName +from endpoint_test_results.models.threshold_filter_operator import ThresholdFilterOperator +from endpoint_test_results.models.traceroute import Traceroute +from endpoint_test_results.models.traceroute_hop import TracerouteHop +from endpoint_test_results.models.trigger import Trigger +from endpoint_test_results.models.unauthorized_error import UnauthorizedError +from endpoint_test_results.models.validation_error import ValidationError +from endpoint_test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from endpoint_test_results.models.vpn_profile import VpnProfile +from endpoint_test_results.models.vpn_type import VpnType diff --git a/endpoint_test_results/endpoint_test_results/models/account_group_id.py b/endpoint_test_results/endpoint_test_results/models/account_group_id.py new file mode 100644 index 00000000..214f7695 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/account_group_id.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AccountGroupId(BaseModel): + """ + AccountGroupId + """ # 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.") + __properties: ClassVar[List[str]] = ["aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupId 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 AccountGroupId 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") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/alert_direction.py b/endpoint_test_results/endpoint_test_results/models/alert_direction.py new file mode 100644 index 00000000..74b946a1 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/alert_direction.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AlertDirection(str, Enum): + """ + Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/alert_rounds_violation_mode.py b/endpoint_test_results/endpoint_test_results/models/alert_rounds_violation_mode.py new file mode 100644 index 00000000..5912d62c --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/alert_rounds_violation_mode.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.2 + 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 AlertRoundsViolationMode(str, Enum): + """ + `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + """ + + """ + allowed enum values + """ + EXACT = 'exact' + ANY = 'any' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertRoundsViolationMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/alert_rule.py b/endpoint_test_results/endpoint_test_results/models/alert_rule.py new file mode 100644 index 00000000..6ebc4761 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/alert_rule.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.alert_direction import AlertDirection +from endpoint_test_results.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_test_results.models.alert_type import AlertType +from endpoint_test_results.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class AlertRule(BaseModel): + """ + AlertRule + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") + rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") + expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") + direction: Optional[AlertDirection] = None + is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") + severity: Optional[Severity] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "severity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertRule 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([ + "rule_id", + "rule_name", + "expression", + "is_default", + "minimum_sources", + "minimum_sources_pct", + "rounds_violating_out_of", + "rounds_violating_required", + ]) + + _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 AlertRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/alert_type.py b/endpoint_test_results/endpoint_test_results/models/alert_type.py new file mode 100644 index 00000000..358948c2 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/alert_type.py @@ -0,0 +1,62 @@ +# 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.2 + 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 AlertType(str, Enum): + """ + Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + """ + + """ + allowed enum values + """ + PAGE_MINUS_LOAD = 'page-load' + HTTP_MINUS_SERVER = 'http-server' + END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' + END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' + VOICE = 'voice' + DNS_MINUS_SERVER = 'dns-server' + DNS_MINUS_TRACE = 'dns-trace' + DNSSEC = 'dnssec' + BGP = 'bgp' + PATH_MINUS_TRACE = 'path-trace' + FTP = 'ftp' + SIP_MINUS_SERVER = 'sip-server' + TRANSACTIONS = 'transactions' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + AGENT = 'agent' + NETWORK_MINUS_OUTAGE = 'network-outage' + APPLICATION_MINUS_OUTAGE = 'application-outage' + DEVICE_MINUS_DEVICE = 'device-device' + DEVICE_MINUS_INTERFACE = 'device-interface' + ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' + ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' + ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' + API = 'api' + WEB_MINUS_TRANSACTION = 'web-transaction' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/models/application_score_quality.py b/endpoint_test_results/endpoint_test_results/models/application_score_quality.py similarity index 79% rename from endpoint/test_results_api/test_results_api/models/application_score_quality.py rename to endpoint_test_results/endpoint_test_results/models/application_score_quality.py index bcbff3d3..cb8bb1ad 100644 --- a/endpoint/test_results_api/test_results_api/models/application_score_quality.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ApplicationScoreQuality(str, Enum): diff --git a/endpoint/test_results_api/test_results_api/models/asn_details.py b/endpoint_test_results/endpoint_test_results/models/asn_details.py similarity index 79% rename from endpoint/test_results_api/test_results_api/models/asn_details.py rename to endpoint_test_results/endpoint_test_results/models/asn_details.py index 56c471c3..effd4021 100644 --- a/endpoint/test_results_api/test_results_api/models/asn_details.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class AsnDetails(BaseModel): """ @@ -34,10 +30,11 @@ class AsnDetails(BaseModel): as_number: Optional[Union[StrictFloat, 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 = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class AsnDetails(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AsnDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class AsnDetails(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "as_name", + "as_number", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "as_name", - "as_number", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AsnDetails from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/conditional_operator.py b/endpoint_test_results/endpoint_test_results/models/conditional_operator.py new file mode 100644 index 00000000..1cbf5bd3 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/conditional_operator.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.2 + 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 ConditionalOperator(str, Enum): + """ + ConditionalOperator + """ + + """ + allowed enum values + """ + AND = 'and' + OR = 'or' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ConditionalOperator from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/models/cpu_utilization.py b/endpoint_test_results/endpoint_test_results/models/cpu_utilization.py similarity index 85% rename from endpoint/test_results_api/test_results_api/models/cpu_utilization.py rename to endpoint_test_results/endpoint_test_results/models/cpu_utilization.py index b62f3967..675ac66d 100644 --- a/endpoint/test_results_api/test_results_api/models/cpu_utilization.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CpuUtilization(BaseModel): """ @@ -39,10 +35,11 @@ class CpuUtilization(BaseModel): count: Optional[Union[StrictFloat, 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 = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class CpuUtilization(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CpuUtilization from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,22 +72,24 @@ class CpuUtilization(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "min", + "max", + "mean", + "median", + "std_dev", + "count", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "min", - "max", - "mean", - "median", - "std_dev", - "count", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CpuUtilization from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result.py b/endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result.py new file mode 100644 index 00000000..94f408d5 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result.py @@ -0,0 +1,93 @@ +# 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.2 + 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 endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from typing import Optional, Set +from typing_extensions import Self + +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`.") + webex: Optional[DynamicBaseTestResultWebex] = None + __properties: ClassVar[List[str]] = ["application", "webex"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicBaseTestResult 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 webex + if self.webex: + _dict['webex'] = self.webex.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicBaseTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "application": obj.get("application"), + "webex": DynamicBaseTestResultWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result_webex.py b/endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result_webex.py new file mode 100644 index 00000000..f827f92d --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/dynamic_base_test_result_webex.py @@ -0,0 +1,101 @@ +# 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.2 + 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 DynamicBaseTestResultWebex(BaseModel): + """ + Contains object with webex information. Only returned for webex applications. + """ # noqa: E501 + conference_id: Optional[StrictStr] = Field(default=None, description="Webex conference ID.", alias="conferenceId") + correlation_id: Optional[StrictStr] = Field(default=None, description="Webex conference correlation ID.", alias="correlationId") + local_sip_session_id: Optional[StrictStr] = Field(default=None, description="Webex calling local sip session ID.", alias="localSipSessionId") + remote_sip_session_id: Optional[StrictStr] = Field(default=None, description="Webex calling remote sip session ID.", alias="remoteSipSessionId") + __properties: ClassVar[List[str]] = ["conferenceId", "correlationId", "localSipSessionId", "remoteSipSessionId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicBaseTestResultWebex 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. + """ + excluded_fields: Set[str] = set([ + "conference_id", + "correlation_id", + "local_sip_session_id", + "remote_sip_session_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 DynamicBaseTestResultWebex from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "conferenceId": obj.get("conferenceId"), + "correlationId": obj.get("correlationId"), + "localSipSessionId": obj.get("localSipSessionId"), + "remoteSipSessionId": obj.get("remoteSipSessionId") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/dynamic_test.py b/endpoint_test_results/endpoint_test_results/models/dynamic_test.py new file mode 100644 index 00000000..904be9d8 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/dynamic_test.py @@ -0,0 +1,147 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.dynamic_test_links import DynamicTestLinks +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.test_interval import TestInterval +from endpoint_test_results.models.test_labels_inner import TestLabelsInner +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class DynamicTest(BaseModel): + """ + DynamicTest + """ # 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.") + links: Optional[DynamicTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "testName", "labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "modified_date", + "test_id", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicTest 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"), + "_links": DynamicTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "application": obj.get("application"), + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/dynamic_test_links.py b/endpoint_test_results/endpoint_test_results/models/dynamic_test_links.py new file mode 100644 index 00000000..86e3c8d2 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/dynamic_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_test_results.models.dynamic_test_links_self import DynamicTestLinksSelf +from endpoint_test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class DynamicTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information. + """ # noqa: E501 + var_self: Optional[DynamicTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": DynamicTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/dynamic_test_links_self.py b/endpoint_test_results/endpoint_test_results/models/dynamic_test_links_self.py new file mode 100644 index 00000000..3d3e78c5 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/dynamic_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 DynamicTestLinksSelf(BaseModel): + """ + DynamicTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTestLinksSelf 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 DynamicTestLinksSelf 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/endpoint/test_results_api/test_results_api/models/dynamic_tests_data_round_search.py b/endpoint_test_results/endpoint_test_results/models/dynamic_tests_data_round_search.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/dynamic_tests_data_round_search.py rename to endpoint_test_results/endpoint_test_results/models/dynamic_tests_data_round_search.py index 9bec00b2..41a8567f 100644 --- a/endpoint/test_results_api/test_results_api/models/dynamic_tests_data_round_search.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters +from typing import Optional, Set +from typing_extensions import Self class DynamicTestsDataRoundSearch(BaseModel): """ @@ -38,10 +34,11 @@ class DynamicTestsDataRoundSearch(BaseModel): search_filters: Optional[DynamicTestsDataSearchFilter] = Field(default=None, alias="searchFilters") __properties: ClassVar[List[str]] = ["searchSort", "thresholdFilter", "searchFilters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class DynamicTestsDataRoundSearch(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DynamicTestsDataRoundSearch from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,10 +65,12 @@ class DynamicTestsDataRoundSearch(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in search_sort (list) @@ -90,7 +89,7 @@ class DynamicTestsDataRoundSearch(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DynamicTestsDataRoundSearch from a dict""" if obj is None: return None @@ -99,9 +98,9 @@ class DynamicTestsDataRoundSearch(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "searchSort": [TestsDataSearchSort.from_dict(_item) for _item in obj.get("searchSort")] if obj.get("searchSort") is not None else None, - "thresholdFilter": TestsDataThresholdFilters.from_dict(obj.get("thresholdFilter")) if obj.get("thresholdFilter") is not None else None, - "searchFilters": DynamicTestsDataSearchFilter.from_dict(obj.get("searchFilters")) if obj.get("searchFilters") is not None else None + "searchSort": [TestsDataSearchSort.from_dict(_item) for _item in obj["searchSort"]] if obj.get("searchSort") is not None else None, + "thresholdFilter": TestsDataThresholdFilters.from_dict(obj["thresholdFilter"]) if obj.get("thresholdFilter") is not None else None, + "searchFilters": DynamicTestsDataSearchFilter.from_dict(obj["searchFilters"]) if obj.get("searchFilters") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/dynamic_tests_data_search_filter.py b/endpoint_test_results/endpoint_test_results/models/dynamic_tests_data_search_filter.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/dynamic_tests_data_search_filter.py rename to endpoint_test_results/endpoint_test_results/models/dynamic_tests_data_search_filter.py index 75727b9b..3436f069 100644 --- a/endpoint/test_results_api/test_results_api/models/dynamic_tests_data_search_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DynamicTestsDataSearchFilter(BaseModel): """ @@ -34,10 +30,11 @@ class DynamicTestsDataSearchFilter(BaseModel): webex_conference_id: Optional[List[StrictStr]] = Field(default=None, description="Filter using the `conference-id` of the webex call.", alias="webexConferenceId") __properties: ClassVar[List[str]] = ["agentId", "webexConferenceId"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class DynamicTestsDataSearchFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DynamicTestsDataSearchFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class DynamicTestsDataSearchFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DynamicTestsDataSearchFilter from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_agent_labels_selector_config.py b/endpoint_test_results/endpoint_test_results/models/endpoint_agent_labels_selector_config.py new file mode 100644 index 00000000..dc620f3c --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_agent_labels_selector_config.py @@ -0,0 +1,99 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentLabelsSelectorConfig(BaseModel): + """ + Agent labels selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "endpointAgentLabels"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^agent-labels$", value): + raise ValueError(r"must validate the regular expression /^agent-labels$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentLabelsSelectorConfig 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 EndpointAgentLabelsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines"), + "endpointAgentLabels": obj.get("endpointAgentLabels") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_agent_selector_config.py b/endpoint_test_results/endpoint_test_results/models/endpoint_agent_selector_config.py new file mode 100644 index 00000000..4d30fcd1 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_agent_selector_config.py @@ -0,0 +1,154 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from endpoint_test_results.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_test_results.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_test_results.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ENDPOINTAGENTSELECTORCONFIG_ONE_OF_SCHEMAS = ["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] + +class EndpointAgentSelectorConfig(BaseModel): + """ + Agents selection object based on agentSelectorType. + """ + # data type: EndpointAllAgentsSelectorConfig + oneof_schema_1_validator: Optional[EndpointAllAgentsSelectorConfig] = None + # data type: EndpointAgentLabelsSelectorConfig + oneof_schema_2_validator: Optional[EndpointAgentLabelsSelectorConfig] = None + # data type: EndpointSpecificAgentsSelectorConfig + oneof_schema_3_validator: Optional[EndpointSpecificAgentsSelectorConfig] = None + actual_instance: Optional[Union[EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]] = None + one_of_schemas: Set[str] = { "EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = EndpointAgentSelectorConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: EndpointAllAgentsSelectorConfig + if not isinstance(v, EndpointAllAgentsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAllAgentsSelectorConfig`") + else: + match += 1 + # validate data type: EndpointAgentLabelsSelectorConfig + if not isinstance(v, EndpointAgentLabelsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAgentLabelsSelectorConfig`") + else: + match += 1 + # validate data type: EndpointSpecificAgentsSelectorConfig + if not isinstance(v, EndpointSpecificAgentsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointSpecificAgentsSelectorConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into EndpointAllAgentsSelectorConfig + try: + instance.actual_instance = EndpointAllAgentsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EndpointAgentLabelsSelectorConfig + try: + instance.actual_instance = EndpointAgentLabelsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EndpointSpecificAgentsSelectorConfig + try: + instance.actual_instance = EndpointSpecificAgentsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_agent_to_server_test.py b/endpoint_test_results/endpoint_test_results/models/endpoint_agent_to_server_test.py new file mode 100644 index 00000000..10e88d68 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_agent_to_server_test.py @@ -0,0 +1,171 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_test_results.models.alert_rule import AlertRule +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.test_interval import TestInterval +from endpoint_test_results.models.test_labels_inner import TestLabelsInner +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentToServerTest(BaseModel): + """ + EndpointAgentToServerTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: Annotated[str, Field(strict=True)] = Field(description="Type of test being queried.") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules", "labels"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^agent-to-server$", value): + raise ValueError(r"must validate the regular expression /^agent-to-server$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + "type", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_all_agents_selector_config.py b/endpoint_test_results/endpoint_test_results/models/endpoint_all_agents_selector_config.py new file mode 100644 index 00000000..ff96f831 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_all_agents_selector_config.py @@ -0,0 +1,97 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAllAgentsSelectorConfig(BaseModel): + """ + Any agent selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^all-agents$", value): + raise ValueError(r"must validate the regular expression /^all-agents$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAllAgentsSelectorConfig 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 EndpointAllAgentsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines") + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_browser.py b/endpoint_test_results/endpoint_test_results/models/endpoint_browser.py similarity index 79% rename from endpoint/test_results_api/test_results_api/models/endpoint_browser.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_browser.py index 8f65ae14..fd729873 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_browser.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EndpointBrowser(BaseModel): """ @@ -34,10 +30,11 @@ class EndpointBrowser(BaseModel): version: Optional[StrictStr] = Field(default=None, description="Browser version.") __properties: ClassVar[List[str]] = ["name", "version"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class EndpointBrowser(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointBrowser from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class EndpointBrowser(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "name", + "version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "name", - "version", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointBrowser from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_http_data_point_score.py b/endpoint_test_results/endpoint_test_results/models/endpoint_http_data_point_score.py similarity index 78% rename from endpoint/test_results_api/test_results_api/models/endpoint_http_data_point_score.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_http_data_point_score.py index 2c324abe..82a37914 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_http_data_point_score.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from test_results_api.models.application_score_quality import ApplicationScoreQuality -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.application_score_quality import ApplicationScoreQuality +from typing import Optional, Set +from typing_extensions import Self class EndpointHttpDataPointScore(BaseModel): """ @@ -35,10 +31,11 @@ class EndpointHttpDataPointScore(BaseModel): quality: Optional[ApplicationScoreQuality] = None __properties: ClassVar[List[str]] = ["applicationScore", "quality"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class EndpointHttpDataPointScore(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointHttpDataPointScore from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class EndpointHttpDataPointScore(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointHttpDataPointScore from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_http_server_base_test.py b/endpoint_test_results/endpoint_test_results/models/endpoint_http_server_base_test.py new file mode 100644 index 00000000..e240446a --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_http_server_base_test.py @@ -0,0 +1,107 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_test_results.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerBaseTest(BaseModel): + """ + EndpointHttpServerBaseTest + """ # noqa: E501 + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + protocol: Optional[EndpointTestProtocol] = None + url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") + __properties: ClassVar[List[str]] = ["authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerBaseTest 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 EndpointHttpServerBaseTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "protocol": obj.get("protocol"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "verifyCertificate": obj.get("verifyCertificate") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_http_server_test.py b/endpoint_test_results/endpoint_test_results/models/endpoint_http_server_test.py new file mode 100644 index 00000000..a03eaf5d --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_http_server_test.py @@ -0,0 +1,203 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_test_results.models.alert_rule import AlertRule +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_test_results.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.test_interval import TestInterval +from endpoint_test_results.models.test_labels_inner import TestLabelsInner +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_test_results.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerTest(BaseModel): + """ + EndpointHttpServerTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: Annotated[str, Field(strict=True)] = Field(description="Type of test being queried.") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + 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") + 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") + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent", "labels"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^http-server$", value): + raise ValueError(r"must validate the regular expression /^http-server$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerTest 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([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + "type", + "ssl_version", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointHttpServerTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "authType": obj.get("authType"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "verifyCertificate": obj.get("verifyCertificate"), + "contentRegex": obj.get("contentRegex"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "postBody": obj.get("postBody"), + "sslVersion": obj.get("sslVersion"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_network_topology_result_request_filter.py b/endpoint_test_results/endpoint_test_results/models/endpoint_network_topology_result_request_filter.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/endpoint_network_topology_result_request_filter.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_network_topology_result_request_filter.py index c26f97f0..b44c88ba 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_network_topology_result_request_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -from test_results_api.models.network_topology_type import NetworkTopologyType -from test_results_api.models.platform import Platform -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from endpoint_test_results.models.network_topology_type import NetworkTopologyType +from endpoint_test_results.models.platform import Platform +from typing import Optional, Set +from typing_extensions import Self class EndpointNetworkTopologyResultRequestFilter(BaseModel): """ @@ -46,10 +42,11 @@ class EndpointNetworkTopologyResultRequestFilter(BaseModel): type: Optional[List[NetworkTopologyType]] = Field(default=None, description="Web site base domain visited during the session.") __properties: ClassVar[List[str]] = ["location", "connection", "platform", "gateway", "proxyTarget", "vpnTarget", "agentId", "networkId", "ssid", "bssid", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +59,7 @@ class EndpointNetworkTopologyResultRequestFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointNetworkTopologyResultRequestFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,16 +73,18 @@ class EndpointNetworkTopologyResultRequestFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointNetworkTopologyResultRequestFilter from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_ping_data_point_score.py b/endpoint_test_results/endpoint_test_results/models/endpoint_ping_data_point_score.py similarity index 78% rename from endpoint/test_results_api/test_results_api/models/endpoint_ping_data_point_score.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_ping_data_point_score.py index ee083eb9..bf43802f 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_ping_data_point_score.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from test_results_api.models.application_score_quality import ApplicationScoreQuality -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.application_score_quality import ApplicationScoreQuality +from typing import Optional, Set +from typing_extensions import Self class EndpointPingDataPointScore(BaseModel): """ @@ -35,10 +31,11 @@ class EndpointPingDataPointScore(BaseModel): quality: Optional[ApplicationScoreQuality] = None __properties: ClassVar[List[str]] = ["applicationScore", "quality"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class EndpointPingDataPointScore(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointPingDataPointScore from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class EndpointPingDataPointScore(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointPingDataPointScore from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test.py b/endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test.py similarity index 86% rename from endpoint/test_results_api/test_results_api/models/endpoint_real_user_test.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test.py index e20a1918..2dbf4020 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ 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, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EndpointRealUserTest(BaseModel): """ @@ -46,10 +43,11 @@ class EndpointRealUserTest(BaseModel): page_id: Optional[StrictStr] = Field(default=None, description="Web page ID. The page ID is unique only within an endpoint real user test.", alias="pageId") __properties: ClassVar[List[str]] = ["agentId", "committed", "date", "experienceScore", "numberOfPages", "organizationName", "port", "protocol", "roundId", "sourceAddress", "id", "visitedSite", "pageId"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +60,7 @@ class EndpointRealUserTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointRealUserTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,29 +87,31 @@ class EndpointRealUserTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "agent_id", + "committed", + "var_date", + "experience_score", + "number_of_pages", + "organization_name", + "port", + "protocol", + "round_id", + "source_address", + "id", + "visited_site", + "page_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - "committed", - "var_date", - "experience_score", - "number_of_pages", - "organization_name", - "port", - "protocol", - "round_id", - "source_address", - "id", - "visited_site", - "page_id", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointRealUserTest from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_base.py b/endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_base.py similarity index 86% rename from endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_base.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_base.py index 9cfefbce..63969ecc 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_base.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ 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, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EndpointRealUserTestBase(BaseModel): """ @@ -45,10 +42,11 @@ class EndpointRealUserTestBase(BaseModel): visited_site: Optional[StrictStr] = Field(default=None, description="Domain used to visit target website.", alias="visitedSite") __properties: ClassVar[List[str]] = ["agentId", "committed", "date", "experienceScore", "numberOfPages", "organizationName", "port", "protocol", "roundId", "sourceAddress", "id", "visitedSite"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +59,7 @@ class EndpointRealUserTestBase(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointRealUserTestBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,28 +85,30 @@ class EndpointRealUserTestBase(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "agent_id", + "committed", + "var_date", + "experience_score", + "number_of_pages", + "organization_name", + "port", + "protocol", + "round_id", + "source_address", + "id", + "visited_site", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - "committed", - "var_date", - "experience_score", - "number_of_pages", - "organization_name", - "port", - "protocol", - "round_id", - "source_address", - "id", - "visited_site", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointRealUserTestBase from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_detail.py b/endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_detail.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_detail.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_detail.py index eca95a1c..9cf40e8e 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_detail.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,18 +18,15 @@ 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, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from test_results_api.models.endpoint_browser import EndpointBrowser -from test_results_api.models.real_user_test_coordinates import RealUserTestCoordinates -from test_results_api.models.real_user_test_network import RealUserTestNetwork -from test_results_api.models.real_user_test_page import RealUserTestPage -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_browser import EndpointBrowser +from endpoint_test_results.models.real_user_test_coordinates import RealUserTestCoordinates +from endpoint_test_results.models.real_user_test_network import RealUserTestNetwork +from endpoint_test_results.models.real_user_test_page import RealUserTestPage +from typing import Optional, Set +from typing_extensions import Self class EndpointRealUserTestDetail(BaseModel): """ @@ -53,10 +50,11 @@ class EndpointRealUserTestDetail(BaseModel): network: Optional[RealUserTestNetwork] = None __properties: ClassVar[List[str]] = ["agentId", "committed", "date", "experienceScore", "numberOfPages", "organizationName", "port", "protocol", "roundId", "sourceAddress", "id", "visitedSite", "browser", "coordinates", "pages", "network"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -69,7 +67,7 @@ class EndpointRealUserTestDetail(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointRealUserTestDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -95,22 +93,24 @@ class EndpointRealUserTestDetail(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "agent_id", + "committed", + "var_date", + "experience_score", + "number_of_pages", + "organization_name", + "port", + "protocol", + "round_id", + "source_address", + "id", + "visited_site", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - "committed", - "var_date", - "experience_score", - "number_of_pages", - "organization_name", - "port", - "protocol", - "round_id", - "source_address", - "id", - "visited_site", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of browser @@ -132,7 +132,7 @@ class EndpointRealUserTestDetail(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointRealUserTestDetail from a dict""" if obj is None: return None @@ -153,10 +153,10 @@ class EndpointRealUserTestDetail(BaseModel): "sourceAddress": obj.get("sourceAddress"), "id": obj.get("id"), "visitedSite": obj.get("visitedSite"), - "browser": EndpointBrowser.from_dict(obj.get("browser")) if obj.get("browser") is not None else None, - "coordinates": RealUserTestCoordinates.from_dict(obj.get("coordinates")) if obj.get("coordinates") is not None else None, - "pages": [RealUserTestPage.from_dict(_item) for _item in obj.get("pages")] if obj.get("pages") is not None else None, - "network": RealUserTestNetwork.from_dict(obj.get("network")) if obj.get("network") is not None else None + "browser": EndpointBrowser.from_dict(obj["browser"]) if obj.get("browser") is not None else None, + "coordinates": RealUserTestCoordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None, + "pages": [RealUserTestPage.from_dict(_item) for _item in obj["pages"]] if obj.get("pages") is not None else None, + "network": RealUserTestNetwork.from_dict(obj["network"]) if obj.get("network") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_detail_results.py b/endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_detail_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_detail_results.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_detail_results.py index a4b3611d..d3e18676 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_detail_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail +from typing import Optional, Set +from typing_extensions import Self class EndpointRealUserTestDetailResults(BaseModel): """ @@ -33,10 +30,11 @@ class EndpointRealUserTestDetailResults(BaseModel): results: Optional[List[EndpointRealUserTestDetail]] = None __properties: ClassVar[List[str]] = ["results"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class EndpointRealUserTestDetailResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointRealUserTestDetailResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class EndpointRealUserTestDetailResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +79,7 @@ class EndpointRealUserTestDetailResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointRealUserTestDetailResults from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class EndpointRealUserTestDetailResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [EndpointRealUserTestDetail.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None + "results": [EndpointRealUserTestDetail.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_result_request_filter.py b/endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py similarity index 85% rename from endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_result_request_filter.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py index f29647c0..eb2e5edb 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_result_request_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -from test_results_api.models.platform import Platform -from test_results_api.models.trigger import Trigger -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from endpoint_test_results.models.platform import Platform +from endpoint_test_results.models.trigger import Trigger +from typing import Optional, Set +from typing_extensions import Self class EndpointRealUserTestResultRequestFilter(BaseModel): """ @@ -49,10 +45,11 @@ class EndpointRealUserTestResultRequestFilter(BaseModel): visited_site: Optional[List[StrictStr]] = Field(default=None, description="Web site domain visited during the session.", alias="visitedSite") __properties: ClassVar[List[str]] = ["location", "connection", "platform", "gateway", "proxyTarget", "vpnTarget", "agentId", "networkId", "ssid", "bssid", "destinationIp", "domain", "trigger", "visitedSite"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -65,7 +62,7 @@ class EndpointRealUserTestResultRequestFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointRealUserTestResultRequestFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,16 +76,18 @@ class EndpointRealUserTestResultRequestFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointRealUserTestResultRequestFilter from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_results.py b/endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_results.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_real_user_test_results.py index 62242853..a311728a 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_real_user_test_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.endpoint_real_user_test import EndpointRealUserTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_real_user_test import EndpointRealUserTest +from typing import Optional, Set +from typing_extensions import Self class EndpointRealUserTestResults(BaseModel): """ @@ -33,10 +30,11 @@ class EndpointRealUserTestResults(BaseModel): results: Optional[List[EndpointRealUserTest]] = None __properties: ClassVar[List[str]] = ["results"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class EndpointRealUserTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointRealUserTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class EndpointRealUserTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +79,7 @@ class EndpointRealUserTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointRealUserTestResults from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class EndpointRealUserTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [EndpointRealUserTest.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None + "results": [EndpointRealUserTest.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_result_request_filter.py b/endpoint_test_results/endpoint_test_results/models/endpoint_result_request_filter.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/endpoint_result_request_filter.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_result_request_filter.py index 6003d12b..9b276e5b 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_result_request_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -from test_results_api.models.platform import Platform -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from endpoint_test_results.models.platform import Platform +from typing import Optional, Set +from typing_extensions import Self class EndpointResultRequestFilter(BaseModel): """ @@ -44,10 +40,11 @@ class EndpointResultRequestFilter(BaseModel): bssid: Optional[List[StrictStr]] = Field(default=None, description="WiFi BSSID.") __properties: ClassVar[List[str]] = ["location", "connection", "platform", "gateway", "proxyTarget", "vpnTarget", "agentId", "networkId", "ssid", "bssid"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +57,7 @@ class EndpointResultRequestFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointResultRequestFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,16 +71,18 @@ class EndpointResultRequestFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointResultRequestFilter from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test.py b/endpoint_test_results/endpoint_test_results/models/endpoint_scheduled_test.py similarity index 82% rename from endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test.py rename to endpoint_test_results/endpoint_test_results/models/endpoint_scheduled_test.py index 98f885d3..deaa6e84 100644 --- a/endpoint/test_results_api/test_results_api/models/endpoint_scheduled_test.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,22 +13,15 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from test_results_api.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from test_results_api.models.endpoint_http_server_test import EndpointHttpServerTest -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal +from endpoint_test_results.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self ENDPOINTSCHEDULEDTEST_ONE_OF_SCHEMAS = ["EndpointAgentToServerTest", "EndpointHttpServerTest"] @@ -41,11 +34,12 @@ class EndpointScheduledTest(BaseModel): # data type: EndpointHttpServerTest oneof_schema_2_validator: Optional[EndpointHttpServerTest] = None actual_instance: Optional[Union[EndpointAgentToServerTest, EndpointHttpServerTest]] = None - one_of_schemas: List[str] = Literal["EndpointAgentToServerTest", "EndpointHttpServerTest"] + one_of_schemas: Set[str] = { "EndpointAgentToServerTest", "EndpointHttpServerTest" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -86,7 +80,7 @@ class EndpointScheduledTest(BaseModel): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -123,19 +117,17 @@ class EndpointScheduledTest(BaseModel): if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], EndpointAgentToServerTest, EndpointHttpServerTest]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_scheduled_test_type.py b/endpoint_test_results/endpoint_test_results/models/endpoint_scheduled_test_type.py new file mode 100644 index 00000000..bc8cf1d9 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_scheduled_test_type.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.2 + 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 EndpointScheduledTestType(str, Enum): + """ + Type of test being queried. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + HTTP_MINUS_SERVER = 'http-server' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointScheduledTestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_specific_agents_selector_config.py b/endpoint_test_results/endpoint_test_results/models/endpoint_specific_agents_selector_config.py new file mode 100644 index 00000000..ebba9f4a --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_specific_agents_selector_config.py @@ -0,0 +1,99 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointSpecificAgentsSelectorConfig(BaseModel): + """ + Specific agents selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "agents"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^specific-agents$", value): + raise ValueError(r"must validate the regular expression /^specific-agents$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointSpecificAgentsSelectorConfig 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 EndpointSpecificAgentsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines"), + "agents": obj.get("agents") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_test.py b/endpoint_test_results/endpoint_test_results/models/endpoint_test.py new file mode 100644 index 00000000..33616e43 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_test.py @@ -0,0 +1,150 @@ +# 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.2 + 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 endpoint_test_results.models.alert_rule import AlertRule +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_test_results.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_test_results.models.test_interval import TestInterval +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class EndpointTest(BaseModel): + """ + EndpointTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: EndpointScheduledTestType + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_test_auth_type.py b/endpoint_test_results/endpoint_test_results/models/endpoint_test_auth_type.py new file mode 100644 index 00000000..dd2e62a2 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_test_auth_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 EndpointTestAuthType(str, Enum): + """ + HTTP authentication type. + """ + + """ + allowed enum values + """ + NONE = 'none' + BASIC = 'basic' + NTLM = 'ntlm' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestAuthType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_test_links.py b/endpoint_test_results/endpoint_test_results/models/endpoint_test_links.py new file mode 100644 index 00000000..30624536 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_test_results.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class EndpointTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information. + """ # noqa: E501 + var_self: Optional[EndpointTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": EndpointTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/endpoint_test_links_self.py b/endpoint_test_results/endpoint_test_results/models/endpoint_test_links_self.py new file mode 100644 index 00000000..2ce97ef0 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 EndpointTestLinksSelf(BaseModel): + """ + EndpointTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTestLinksSelf 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 EndpointTestLinksSelf 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/endpoint_test_results/endpoint_test_results/models/endpoint_test_protocol.py b/endpoint_test_results/endpoint_test_results/models/endpoint_test_protocol.py new file mode 100644 index 00000000..3530bacb --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/endpoint_test_protocol.py @@ -0,0 +1,41 @@ +# 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.2 + 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 EndpointTestProtocol(str, Enum): + """ + Protocol used to perform the test. + """ + + """ + allowed enum values + """ + ICMP = 'icmp' + ICMP_MINUS_WITH_MINUS_TCP_MINUS_CONNECT = 'icmp-with-tcp-connect' + TCP = 'tcp' + PREFER_MINUS_TCP = 'prefer-tcp' + AST_MINUS_AUTODETECT = 'ast-autodetect' + AUTODETECT = 'autodetect' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/error.py b/endpoint_test_results/endpoint_test_results/models/error.py new file mode 100644 index 00000000..70ec0c6d --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_test_results/endpoint_test_results/models/ethernet_profile.py b/endpoint_test_results/endpoint_test_results/models/ethernet_profile.py new file mode 100644 index 00000000..2f85317f --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/ethernet_profile.py @@ -0,0 +1,89 @@ +# 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.2 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class EthernetProfile(BaseModel): + """ + EthernetProfile + """ # noqa: E501 + link_speed: Optional[Union[StrictFloat, 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EthernetProfile 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([ + "link_speed", + ]) + + _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 EthernetProfile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "linkSpeed": obj.get("linkSpeed") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/expand.py b/endpoint_test_results/endpoint_test_results/models/expand.py new file mode 100644 index 00000000..8174385e --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/expand.py @@ -0,0 +1,36 @@ +# 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.2 + 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 + """ + HEADER = 'header' + + @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/endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_network_pathvis200_response.py b/endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_network_pathvis200_response.py new file mode 100644 index 00000000..6807d67e --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_network_pathvis200_response.py @@ -0,0 +1,116 @@ +# 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.2 + 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 endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_test_results.models.path_vis_dynamic_test_result import PathVisDynamicTestResult +from typing import Optional, Set +from typing_extensions import Self + +class GetDynamicTestResultNetworkPathvis200Response(BaseModel): + """ + GetDynamicTestResultNetworkPathvis200Response + """ # noqa: E501 + results: Optional[List[PathVisDynamicTestResult]] = None + test: Optional[DynamicTest] = 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") + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDynamicTestResultNetworkPathvis200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetDynamicTestResultNetworkPathvis200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDynamicTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": DynamicTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_pathvis_agent_round200_response.py b/endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_pathvis_agent_round200_response.py new file mode 100644 index 00000000..788a99d3 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/get_dynamic_test_result_pathvis_agent_round200_response.py @@ -0,0 +1,107 @@ +# 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.2 + 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 endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetDynamicTestResultPathvisAgentRound200Response(BaseModel): + """ + GetDynamicTestResultPathvisAgentRound200Response + """ # noqa: E501 + results: Optional[List[PathVisDetailDynamicTestResult]] = None + test: Optional[DynamicTest] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDynamicTestResultPathvisAgentRound200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetDynamicTestResultPathvisAgentRound200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDetailDynamicTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": DynamicTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_network_topology_details200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_network_topology_details200_response.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_local_network_topology_details200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_local_network_topology_details200_response.py index 80443561..83d76322 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_network_topology_details200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_network_topology_details200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.local_network_topology_result import LocalNetworkTopologyResult -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.local_network_topology_result import LocalNetworkTopologyResult +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetEndpointLocalNetworkTopologyDetails200Response(BaseModel): """ @@ -36,10 +32,11 @@ class GetEndpointLocalNetworkTopologyDetails200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["results", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class GetEndpointLocalNetworkTopologyDetails200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworkTopologyDetails200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class GetEndpointLocalNetworkTopologyDetails200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -85,7 +84,7 @@ class GetEndpointLocalNetworkTopologyDetails200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworkTopologyDetails200Response from a dict""" if obj is None: return None @@ -94,8 +93,8 @@ class GetEndpointLocalNetworkTopologyDetails200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [LocalNetworkTopologyResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [LocalNetworkTopologyResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks200_response.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks200_response.py index a56988fd..e66f1ba4 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.local_network_result import LocalNetworkResult -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.local_network_result import LocalNetworkResult +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetEndpointLocalNetworks200Response(BaseModel): """ @@ -36,10 +32,11 @@ class GetEndpointLocalNetworks200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["localNetworks", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class GetEndpointLocalNetworks200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworks200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class GetEndpointLocalNetworks200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in local_networks (list) @@ -85,7 +84,7 @@ class GetEndpointLocalNetworks200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworks200Response from a dict""" if obj is None: return None @@ -94,8 +93,8 @@ class GetEndpointLocalNetworks200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "localNetworks": [LocalNetworkResult.from_dict(_item) for _item in obj.get("localNetworks")] if obj.get("localNetworks") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "localNetworks": [LocalNetworkResult.from_dict(_item) for _item in obj["localNetworks"]] if obj.get("localNetworks") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks_topologies200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks_topologies200_response.py similarity index 78% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks_topologies200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks_topologies200_response.py index 39069f21..11a93014 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks_topologies200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks_topologies200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.local_network_topology_result_base import LocalNetworkTopologyResultBase -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.local_network_topology_result_base import LocalNetworkTopologyResultBase +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self class GetEndpointLocalNetworksTopologies200Response(BaseModel): """ @@ -38,10 +35,11 @@ class GetEndpointLocalNetworksTopologies200Response(BaseModel): links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +52,7 @@ class GetEndpointLocalNetworksTopologies200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworksTopologies200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,12 +68,14 @@ class GetEndpointLocalNetworksTopologies200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -91,7 +91,7 @@ class GetEndpointLocalNetworksTopologies200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworksTopologies200Response from a dict""" if obj is None: return None @@ -102,8 +102,8 @@ class GetEndpointLocalNetworksTopologies200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [LocalNetworkTopologyResultBase.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [LocalNetworkTopologyResultBase.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks_topologies_request.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks_topologies_request.py similarity index 76% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks_topologies_request.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks_topologies_request.py index e76421bb..2268a29b 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_local_networks_topologies_request.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_local_networks_topologies_request.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter +from typing import Optional, Set +from typing_extensions import Self class GetEndpointLocalNetworksTopologiesRequest(BaseModel): """ @@ -34,10 +30,11 @@ class GetEndpointLocalNetworksTopologiesRequest(BaseModel): search_filters: Optional[EndpointNetworkTopologyResultRequestFilter] = Field(default=None, alias="searchFilters") __properties: ClassVar[List[str]] = ["searchFilters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class GetEndpointLocalNetworksTopologiesRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworksTopologiesRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +61,12 @@ class GetEndpointLocalNetworksTopologiesRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of search_filters @@ -76,7 +75,7 @@ class GetEndpointLocalNetworksTopologiesRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointLocalNetworksTopologiesRequest from a dict""" if obj is None: return None @@ -85,7 +84,7 @@ class GetEndpointLocalNetworksTopologiesRequest(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "searchFilters": EndpointNetworkTopologyResultRequestFilter.from_dict(obj.get("searchFilters")) if obj.get("searchFilters") is not None else None + "searchFilters": EndpointNetworkTopologyResultRequestFilter.from_dict(obj["searchFilters"]) if obj.get("searchFilters") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_test_details200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_test_details200_response.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_test_details200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_test_details200_response.py index e0d52f28..bb7e97b2 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_test_details200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_test_details200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetEndpointRealUserTestDetails200Response(BaseModel): """ @@ -36,10 +32,11 @@ class GetEndpointRealUserTestDetails200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["results", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class GetEndpointRealUserTestDetails200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestDetails200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class GetEndpointRealUserTestDetails200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -85,7 +84,7 @@ class GetEndpointRealUserTestDetails200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestDetails200Response from a dict""" if obj is None: return None @@ -94,8 +93,8 @@ class GetEndpointRealUserTestDetails200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [EndpointRealUserTestDetail.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [EndpointRealUserTestDetail.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_test_pages_details200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_test_pages_details200_response.py similarity index 76% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_test_pages_details200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_test_pages_details200_response.py index 05a8f6e2..6e6975d5 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_test_pages_details200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_test_pages_details200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class GetEndpointRealUserTestPagesDetails200Response(BaseModel): """ @@ -34,10 +30,11 @@ class GetEndpointRealUserTestPagesDetails200Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class GetEndpointRealUserTestPagesDetails200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestPagesDetails200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +61,12 @@ class GetEndpointRealUserTestPagesDetails200Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -76,7 +75,7 @@ class GetEndpointRealUserTestPagesDetails200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestPagesDetails200Response from a dict""" if obj is None: return None @@ -85,7 +84,7 @@ class GetEndpointRealUserTestPagesDetails200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests200_response.py similarity index 78% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests200_response.py index 77db832b..34936501 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_real_user_test import EndpointRealUserTest -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_real_user_test import EndpointRealUserTest +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self class GetEndpointRealUserTests200Response(BaseModel): """ @@ -38,10 +35,11 @@ class GetEndpointRealUserTests200Response(BaseModel): links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +52,7 @@ class GetEndpointRealUserTests200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointRealUserTests200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,12 +68,14 @@ class GetEndpointRealUserTests200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -91,7 +91,7 @@ class GetEndpointRealUserTests200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointRealUserTests200Response from a dict""" if obj is None: return None @@ -102,8 +102,8 @@ class GetEndpointRealUserTests200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [EndpointRealUserTest.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [EndpointRealUserTest.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_network200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_network200_response.py similarity index 78% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_network200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_network200_response.py index 8d2410a6..756824dd 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_network200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_network200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -from test_results_api.models.real_user_test_network_result import RealUserTestNetworkResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from endpoint_test_results.models.real_user_test_network_result import RealUserTestNetworkResult +from typing import Optional, Set +from typing_extensions import Self class GetEndpointRealUserTestsNetwork200Response(BaseModel): """ @@ -38,10 +35,11 @@ class GetEndpointRealUserTestsNetwork200Response(BaseModel): links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +52,7 @@ class GetEndpointRealUserTestsNetwork200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestsNetwork200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,12 +68,14 @@ class GetEndpointRealUserTestsNetwork200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -91,7 +91,7 @@ class GetEndpointRealUserTestsNetwork200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestsNetwork200Response from a dict""" if obj is None: return None @@ -102,8 +102,8 @@ class GetEndpointRealUserTestsNetwork200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [RealUserTestNetworkResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [RealUserTestNetworkResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_pages200_response.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_pages200_response.py similarity index 78% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_pages200_response.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_pages200_response.py index 8cf68fb5..9fbf9f37 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_pages200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_pages200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -from test_results_api.models.real_user_test_page_result import RealUserTestPageResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from endpoint_test_results.models.real_user_test_page_result import RealUserTestPageResult +from typing import Optional, Set +from typing_extensions import Self class GetEndpointRealUserTestsPages200Response(BaseModel): """ @@ -38,10 +35,11 @@ class GetEndpointRealUserTestsPages200Response(BaseModel): links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +52,7 @@ class GetEndpointRealUserTestsPages200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestsPages200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,12 +68,14 @@ class GetEndpointRealUserTestsPages200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -91,7 +91,7 @@ class GetEndpointRealUserTestsPages200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestsPages200Response from a dict""" if obj is None: return None @@ -102,8 +102,8 @@ class GetEndpointRealUserTestsPages200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [RealUserTestPageResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [RealUserTestPageResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_request.py b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_request.py similarity index 76% rename from endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_request.py rename to endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_request.py index eb56759e..c215108b 100644 --- a/endpoint/test_results_api/test_results_api/models/get_endpoint_real_user_tests_request.py +++ b/endpoint_test_results/endpoint_test_results/models/get_endpoint_real_user_tests_request.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from typing import Optional, Set +from typing_extensions import Self class GetEndpointRealUserTestsRequest(BaseModel): """ @@ -34,10 +30,11 @@ class GetEndpointRealUserTestsRequest(BaseModel): search_filters: Optional[EndpointRealUserTestResultRequestFilter] = Field(default=None, alias="searchFilters") __properties: ClassVar[List[str]] = ["searchFilters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class GetEndpointRealUserTestsRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +61,12 @@ class GetEndpointRealUserTestsRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of search_filters @@ -76,7 +75,7 @@ class GetEndpointRealUserTestsRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEndpointRealUserTestsRequest from a dict""" if obj is None: return None @@ -85,7 +84,7 @@ class GetEndpointRealUserTestsRequest(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "searchFilters": EndpointRealUserTestResultRequestFilter.from_dict(obj.get("searchFilters")) if obj.get("searchFilters") is not None else None + "searchFilters": EndpointRealUserTestResultRequestFilter.from_dict(obj["searchFilters"]) if obj.get("searchFilters") is not None else None }) return _obj diff --git a/endpoint_test_results/endpoint_test_results/models/get_test_result_http_server200_response.py b/endpoint_test_results/endpoint_test_results/models/get_test_result_http_server200_response.py new file mode 100644 index 00000000..8fb2cbe7 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/get_test_result_http_server200_response.py @@ -0,0 +1,116 @@ +# 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.2 + 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 endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_test_results.models.http_test_result import HttpTestResult +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultHttpServer200Response(BaseModel): + """ + GetTestResultHttpServer200Response + """ # noqa: E501 + results: Optional[List[HttpTestResult]] = None + test: Optional[EndpointHttpServerTest] = 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") + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultHttpServer200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultHttpServer200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [HttpTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": EndpointHttpServerTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/get_test_result_network_pathvis200_response.py b/endpoint_test_results/endpoint_test_results/models/get_test_result_network_pathvis200_response.py new file mode 100644 index 00000000..742bd2fb --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/get_test_result_network_pathvis200_response.py @@ -0,0 +1,116 @@ +# 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.2 + 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 endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from endpoint_test_results.models.path_vis_test_result import PathVisTestResult +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultNetworkPathvis200Response(BaseModel): + """ + GetTestResultNetworkPathvis200Response + """ # noqa: E501 + results: Optional[List[PathVisTestResult]] = None + 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") + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultNetworkPathvis200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultNetworkPathvis200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": EndpointScheduledTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/get_test_result_pathvis_agent_round200_response.py b/endpoint_test_results/endpoint_test_results/models/get_test_result_pathvis_agent_round200_response.py new file mode 100644 index 00000000..0544fbf5 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/get_test_result_pathvis_agent_round200_response.py @@ -0,0 +1,107 @@ +# 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.2 + 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 endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultPathvisAgentRound200Response(BaseModel): + """ + GetTestResultPathvisAgentRound200Response + """ # noqa: E501 + results: Optional[List[PathVisDetailTestResult]] = None + test: Optional[EndpointScheduledTest] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultPathvisAgentRound200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultPathvisAgentRound200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": EndpointScheduledTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/hop.py b/endpoint_test_results/endpoint_test_results/models/hop.py similarity index 79% rename from endpoint/test_results_api/test_results_api/models/hop.py rename to endpoint_test_results/endpoint_test_results/models/hop.py index 746cb5dd..0ba7f623 100644 --- a/endpoint/test_results_api/test_results_api/models/hop.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Hop(BaseModel): """ @@ -35,10 +31,11 @@ class Hop(BaseModel): prefix: Optional[StrictStr] = Field(default=None, description="Prefix of IP address shown in CIDR.") __properties: ClassVar[List[str]] = ["hop", "ipAddress", "prefix"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class Hop(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Hop from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,19 +65,21 @@ class Hop(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "hop", + "ip_address", + "prefix", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "hop", - "ip_address", - "prefix", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Hop from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/http_error_type.py b/endpoint_test_results/endpoint_test_results/models/http_error_type.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/http_error_type.py rename to endpoint_test_results/endpoint_test_results/models/http_error_type.py index 43b37586..09bf8392 100644 --- a/endpoint/test_results_api/test_results_api/models/http_error_type.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class HttpErrorType(str, Enum): diff --git a/endpoint_test_results/endpoint_test_results/models/http_test_result.py b/endpoint_test_results/endpoint_test_results/models/http_test_result.py new file mode 100644 index 00000000..945bfe2e --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/http_test_result.py @@ -0,0 +1,174 @@ +# 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.2 + 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 endpoint_test_results.models.http_error_type import HttpErrorType +from endpoint_test_results.models.http_test_result_headers import HttpTestResultHeaders +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class HttpTestResult(BaseModel): + """ + HttpTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of destination server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server in milliseconds.", alias="connectTime") + dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds.", alias="dnsTime") + error_type: Optional[HttpErrorType] = Field(default=None, alias="errorType") + error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered.", alias="errorDetails") + headers: Optional[HttpTestResultHeaders] = None + num_redirects: Optional[StrictInt] = Field(default=None, description="Number of redirects.", alias="numRedirects") + receive_time: Optional[StrictInt] = Field(default=None, description="Elapsed time between first and last byte of response in milliseconds.", alias="receiveTime") + redirect_time: Optional[StrictInt] = Field(default=None, description="Cumulative redirect timing in milliseconds.", alias="redirectTime") + response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code.", alias="responseCode") + response_time: Optional[StrictInt] = Field(default=None, description="Time to first byte in milliseconds.", alias="responseTime") + ssl_time: Optional[StrictInt] = Field(default=None, description="Time to negotiate SSL/TLS in milliseconds.", alias="sslTime") + total_time: Optional[StrictInt] = Field(default=None, description="Total time is the response time + receive time.", alias="totalTime") + wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response in milliseconds.", alias="waitTime") + wire_size: Optional[StrictInt] = Field(default=None, description="Size of content in bytes.", alias="wireSize") + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile", "connectTime", "dnsTime", "errorType", "errorDetails", "headers", "numRedirects", "receiveTime", "redirectTime", "responseCode", "responseTime", "sslTime", "totalTime", "waitTime", "wireSize"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpTestResult 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([ + "agent_id", + "round_id", + "server_ip", + "connect_time", + "dns_time", + "error_details", + "num_redirects", + "receive_time", + "redirect_time", + "response_code", + "response_time", + "ssl_time", + "total_time", + "wait_time", + "wire_size", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of headers + if self.headers: + _dict['headers'] = self.headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "connectTime": obj.get("connectTime"), + "dnsTime": obj.get("dnsTime"), + "errorType": obj.get("errorType"), + "errorDetails": obj.get("errorDetails"), + "headers": HttpTestResultHeaders.from_dict(obj["headers"]) if obj.get("headers") is not None else None, + "numRedirects": obj.get("numRedirects"), + "receiveTime": obj.get("receiveTime"), + "redirectTime": obj.get("redirectTime"), + "responseCode": obj.get("responseCode"), + "responseTime": obj.get("responseTime"), + "sslTime": obj.get("sslTime"), + "totalTime": obj.get("totalTime"), + "waitTime": obj.get("waitTime"), + "wireSize": obj.get("wireSize") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/http_test_result_headers.py b/endpoint_test_results/endpoint_test_results/models/http_test_result_headers.py new file mode 100644 index 00000000..f4431938 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/http_test_result_headers.py @@ -0,0 +1,93 @@ +# 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.2 + 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 HttpTestResultHeaders(BaseModel): + """ + Expandable object containing both request and response headers. + """ # noqa: E501 + request_headers: Optional[StrictStr] = Field(default=None, description="CRLF-delimited list of request headers in `header: value` format.", alias="requestHeaders") + response_headers: Optional[StrictStr] = Field(default=None, description="CRLF-delimited list of response headers in `header: value` format.", alias="responseHeaders") + __properties: ClassVar[List[str]] = ["requestHeaders", "responseHeaders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpTestResultHeaders 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([ + "request_headers", + "response_headers", + ]) + + _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 HttpTestResultHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestHeaders": obj.get("requestHeaders"), + "responseHeaders": obj.get("responseHeaders") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/http_test_results.py b/endpoint_test_results/endpoint_test_results/models/http_test_results.py new file mode 100644 index 00000000..94667cf6 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/http_test_results.py @@ -0,0 +1,101 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_test_results.models.http_test_result import HttpTestResult +from typing import Optional, Set +from typing_extensions import Self + +class HttpTestResults(BaseModel): + """ + HttpTestResults + """ # noqa: E501 + results: Optional[List[HttpTestResult]] = None + test: Optional[EndpointHttpServerTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [HttpTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": EndpointHttpServerTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/interface_hardware_type.py b/endpoint_test_results/endpoint_test_results/models/interface_hardware_type.py new file mode 100644 index 00000000..4ab00659 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/interface_hardware_type.py @@ -0,0 +1,42 @@ +# 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.2 + 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 InterfaceHardwareType(str, Enum): + """ + InterfaceHardwareType + """ + + """ + allowed enum values + """ + UNKNOWN = 'unknown' + WIRELESS = 'wireless' + ETHERNET = 'ethernet' + MODEM = 'modem' + VIRTUAL = 'virtual' + LOOPBACK = 'loopback' + OTHER = 'other' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of InterfaceHardwareType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/link.py b/endpoint_test_results/endpoint_test_results/models/link.py new file mode 100644 index 00000000..92f596df --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint/test_results_api/test_results_api/models/local_network_result.py b/endpoint_test_results/endpoint_test_results/models/local_network_result.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/local_network_result.py rename to endpoint_test_results/endpoint_test_results/models/local_network_result.py index a6800d7c..149300c6 100644 --- a/endpoint/test_results_api/test_results_api/models/local_network_result.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class LocalNetworkResult(BaseModel): """ @@ -36,10 +32,11 @@ class LocalNetworkResult(BaseModel): public_ip_range: Optional[StrictStr] = Field(default=None, description="Network public IP range.", alias="publicIpRange") __properties: ClassVar[List[str]] = ["networkId", "networkName", "localPrefix", "publicIpRange"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class LocalNetworkResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LocalNetworkResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,20 +67,22 @@ class LocalNetworkResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "network_id", + "network_name", + "local_prefix", + "public_ip_range", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "network_id", - "network_name", - "local_prefix", - "public_ip_range", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LocalNetworkResult from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/local_network_results.py b/endpoint_test_results/endpoint_test_results/models/local_network_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/local_network_results.py rename to endpoint_test_results/endpoint_test_results/models/local_network_results.py index a696dc2f..52fea767 100644 --- a/endpoint/test_results_api/test_results_api/models/local_network_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.local_network_result import LocalNetworkResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.local_network_result import LocalNetworkResult +from typing import Optional, Set +from typing_extensions import Self class LocalNetworkResults(BaseModel): """ @@ -34,10 +30,11 @@ class LocalNetworkResults(BaseModel): local_networks: Optional[List[LocalNetworkResult]] = Field(default=None, alias="localNetworks") __properties: ClassVar[List[str]] = ["localNetworks"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class LocalNetworkResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LocalNetworkResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +61,12 @@ class LocalNetworkResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in local_networks (list) @@ -80,7 +79,7 @@ class LocalNetworkResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LocalNetworkResults from a dict""" if obj is None: return None @@ -89,7 +88,7 @@ class LocalNetworkResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "localNetworks": [LocalNetworkResult.from_dict(_item) for _item in obj.get("localNetworks")] if obj.get("localNetworks") is not None else None + "localNetworks": [LocalNetworkResult.from_dict(_item) for _item in obj["localNetworks"]] if obj.get("localNetworks") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/local_network_topology_detail_results.py b/endpoint_test_results/endpoint_test_results/models/local_network_topology_detail_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/local_network_topology_detail_results.py rename to endpoint_test_results/endpoint_test_results/models/local_network_topology_detail_results.py index 9785768c..252ec3e3 100644 --- a/endpoint/test_results_api/test_results_api/models/local_network_topology_detail_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.local_network_topology_result import LocalNetworkTopologyResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.local_network_topology_result import LocalNetworkTopologyResult +from typing import Optional, Set +from typing_extensions import Self class LocalNetworkTopologyDetailResults(BaseModel): """ @@ -33,10 +30,11 @@ class LocalNetworkTopologyDetailResults(BaseModel): results: Optional[List[LocalNetworkTopologyResult]] = None __properties: ClassVar[List[str]] = ["results"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class LocalNetworkTopologyDetailResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LocalNetworkTopologyDetailResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class LocalNetworkTopologyDetailResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +79,7 @@ class LocalNetworkTopologyDetailResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LocalNetworkTopologyDetailResults from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class LocalNetworkTopologyDetailResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [LocalNetworkTopologyResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None + "results": [LocalNetworkTopologyResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/local_network_topology_result.py b/endpoint_test_results/endpoint_test_results/models/local_network_topology_result.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/local_network_topology_result.py rename to endpoint_test_results/endpoint_test_results/models/local_network_topology_result.py index b57c31cc..3bc462d4 100644 --- a/endpoint/test_results_api/test_results_api/models/local_network_topology_result.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,20 +18,17 @@ 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, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.network_ping import NetworkPing -from test_results_api.models.network_profile import NetworkProfile -from test_results_api.models.network_topology_type import NetworkTopologyType -from test_results_api.models.real_user_test_coordinates import RealUserTestCoordinates -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.tcp_connect import TcpConnect -from test_results_api.models.traceroute import Traceroute -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.network_ping import NetworkPing +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.network_topology_type import NetworkTopologyType +from endpoint_test_results.models.real_user_test_coordinates import RealUserTestCoordinates +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.tcp_connect import TcpConnect +from endpoint_test_results.models.traceroute import Traceroute +from typing import Optional, Set +from typing_extensions import Self class LocalNetworkTopologyResult(BaseModel): """ @@ -54,10 +51,11 @@ class LocalNetworkTopologyResult(BaseModel): icmp_traceroutes: Optional[List[Traceroute]] = Field(default=None, alias="icmpTraceroutes") __properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics", "coordinates", "networkProfile", "icmpTraceroute", "icmpTraceroutes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -70,7 +68,7 @@ class LocalNetworkTopologyResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LocalNetworkTopologyResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -90,20 +88,20 @@ class LocalNetworkTopologyResult(BaseModel): * 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([ + "agent_id", + "var_date", + "network_topology_id", + "round_id", + "target", + "target_port", + "is_icmp_blocked", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - "var_date", - "network_topology_id", - "round_id", - "target", - "target_port", - "type", - "is_icmp_blocked", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of icmp_ping @@ -134,7 +132,7 @@ class LocalNetworkTopologyResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LocalNetworkTopologyResult from a dict""" if obj is None: return None @@ -150,14 +148,14 @@ class LocalNetworkTopologyResult(BaseModel): "target": obj.get("target"), "targetPort": obj.get("targetPort"), "type": obj.get("type"), - "icmpPing": NetworkPing.from_dict(obj.get("icmpPing")) if obj.get("icmpPing") is not None else None, + "icmpPing": NetworkPing.from_dict(obj["icmpPing"]) if obj.get("icmpPing") is not None else None, "isIcmpBlocked": obj.get("isIcmpBlocked"), - "tcpConnect": TcpConnect.from_dict(obj.get("tcpConnect")) if obj.get("tcpConnect") is not None else None, - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None, - "coordinates": RealUserTestCoordinates.from_dict(obj.get("coordinates")) if obj.get("coordinates") is not None else None, - "networkProfile": NetworkProfile.from_dict(obj.get("networkProfile")) if obj.get("networkProfile") is not None else None, - "icmpTraceroute": Traceroute.from_dict(obj.get("icmpTraceroute")) if obj.get("icmpTraceroute") is not None else None, - "icmpTraceroutes": [Traceroute.from_dict(_item) for _item in obj.get("icmpTraceroutes")] if obj.get("icmpTraceroutes") is not None else None + "tcpConnect": TcpConnect.from_dict(obj["tcpConnect"]) if obj.get("tcpConnect") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "coordinates": RealUserTestCoordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None, + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "icmpTraceroute": Traceroute.from_dict(obj["icmpTraceroute"]) if obj.get("icmpTraceroute") is not None else None, + "icmpTraceroutes": [Traceroute.from_dict(_item) for _item in obj["icmpTraceroutes"]] if obj.get("icmpTraceroutes") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/local_network_topology_result_base.py b/endpoint_test_results/endpoint_test_results/models/local_network_topology_result_base.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/local_network_topology_result_base.py rename to endpoint_test_results/endpoint_test_results/models/local_network_topology_result_base.py index e3119074..71c491cc 100644 --- a/endpoint/test_results_api/test_results_api/models/local_network_topology_result_base.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,17 +18,14 @@ 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, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.network_ping import NetworkPing -from test_results_api.models.network_topology_type import NetworkTopologyType -from test_results_api.models.system_metrics import SystemMetrics -from test_results_api.models.tcp_connect import TcpConnect -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.network_ping import NetworkPing +from endpoint_test_results.models.network_topology_type import NetworkTopologyType +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.tcp_connect import TcpConnect +from typing import Optional, Set +from typing_extensions import Self class LocalNetworkTopologyResultBase(BaseModel): """ @@ -47,10 +44,11 @@ class LocalNetworkTopologyResultBase(BaseModel): system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") __properties: ClassVar[List[str]] = ["agentId", "date", "networkTopologyId", "roundId", "target", "targetPort", "type", "icmpPing", "isIcmpBlocked", "tcpConnect", "systemMetrics"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -63,7 +61,7 @@ class LocalNetworkTopologyResultBase(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LocalNetworkTopologyResultBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,20 +81,20 @@ class LocalNetworkTopologyResultBase(BaseModel): * 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([ + "agent_id", + "var_date", + "network_topology_id", + "round_id", + "target", + "target_port", + "is_icmp_blocked", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - "var_date", - "network_topology_id", - "round_id", - "target", - "target_port", - "type", - "is_icmp_blocked", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of icmp_ping @@ -111,7 +109,7 @@ class LocalNetworkTopologyResultBase(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LocalNetworkTopologyResultBase from a dict""" if obj is None: return None @@ -127,10 +125,10 @@ class LocalNetworkTopologyResultBase(BaseModel): "target": obj.get("target"), "targetPort": obj.get("targetPort"), "type": obj.get("type"), - "icmpPing": NetworkPing.from_dict(obj.get("icmpPing")) if obj.get("icmpPing") is not None else None, + "icmpPing": NetworkPing.from_dict(obj["icmpPing"]) if obj.get("icmpPing") is not None else None, "isIcmpBlocked": obj.get("isIcmpBlocked"), - "tcpConnect": TcpConnect.from_dict(obj.get("tcpConnect")) if obj.get("tcpConnect") is not None else None, - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None + "tcpConnect": TcpConnect.from_dict(obj["tcpConnect"]) if obj.get("tcpConnect") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/local_network_topology_results.py b/endpoint_test_results/endpoint_test_results/models/local_network_topology_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/local_network_topology_results.py rename to endpoint_test_results/endpoint_test_results/models/local_network_topology_results.py index d09f427d..30705687 100644 --- a/endpoint/test_results_api/test_results_api/models/local_network_topology_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.local_network_topology_result_base import LocalNetworkTopologyResultBase -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.local_network_topology_result_base import LocalNetworkTopologyResultBase +from typing import Optional, Set +from typing_extensions import Self class LocalNetworkTopologyResults(BaseModel): """ @@ -33,10 +30,11 @@ class LocalNetworkTopologyResults(BaseModel): results: Optional[List[LocalNetworkTopologyResultBase]] = None __properties: ClassVar[List[str]] = ["results"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class LocalNetworkTopologyResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LocalNetworkTopologyResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class LocalNetworkTopologyResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +79,7 @@ class LocalNetworkTopologyResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LocalNetworkTopologyResults from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class LocalNetworkTopologyResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [LocalNetworkTopologyResultBase.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None + "results": [LocalNetworkTopologyResultBase.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/endpoint_test_results/endpoint_test_results/models/multi_test_id_network_test_results.py b/endpoint_test_results/endpoint_test_results/models/multi_test_id_network_test_results.py new file mode 100644 index 00000000..1bc4a922 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/multi_test_id_network_test_results.py @@ -0,0 +1,97 @@ +# 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.2 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.network_test_result import NetworkTestResult +from typing import Optional, Set +from typing_extensions import Self + +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") + __properties: ClassVar[List[str]] = ["results", "totalHits"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MultiTestIdNetworkTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MultiTestIdNetworkTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NetworkTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "totalHits": obj.get("totalHits") + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/multi_test_id_tests_data_rounds_search.py b/endpoint_test_results/endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/multi_test_id_tests_data_rounds_search.py rename to endpoint_test_results/endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py index ed190025..0edaa30a 100644 --- a/endpoint/test_results_api/test_results_api/models/multi_test_id_tests_data_rounds_search.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters +from typing import Optional, Set +from typing_extensions import Self class MultiTestIdTestsDataRoundsSearch(BaseModel): """ @@ -38,10 +34,11 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): search_filters: Optional[MultiTestIdTestsDataSearchFilter] = Field(default=None, alias="searchFilters") __properties: ClassVar[List[str]] = ["searchSort", "thresholdFilter", "searchFilters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MultiTestIdTestsDataRoundsSearch from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,10 +65,12 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in search_sort (list) @@ -90,7 +89,7 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MultiTestIdTestsDataRoundsSearch from a dict""" if obj is None: return None @@ -99,9 +98,9 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "searchSort": [TestsDataSearchSort.from_dict(_item) for _item in obj.get("searchSort")] if obj.get("searchSort") is not None else None, - "thresholdFilter": TestsDataThresholdFilters.from_dict(obj.get("thresholdFilter")) if obj.get("thresholdFilter") is not None else None, - "searchFilters": MultiTestIdTestsDataSearchFilter.from_dict(obj.get("searchFilters")) if obj.get("searchFilters") is not None else None + "searchSort": [TestsDataSearchSort.from_dict(_item) for _item in obj["searchSort"]] if obj.get("searchSort") is not None else None, + "thresholdFilter": TestsDataThresholdFilters.from_dict(obj["thresholdFilter"]) if obj.get("thresholdFilter") is not None else None, + "searchFilters": MultiTestIdTestsDataSearchFilter.from_dict(obj["searchFilters"]) if obj.get("searchFilters") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/multi_test_id_tests_data_search_filter.py b/endpoint_test_results/endpoint_test_results/models/multi_test_id_tests_data_search_filter.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/multi_test_id_tests_data_search_filter.py rename to endpoint_test_results/endpoint_test_results/models/multi_test_id_tests_data_search_filter.py index cb84d953..86032f5e 100644 --- a/endpoint/test_results_api/test_results_api/models/multi_test_id_tests_data_search_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class MultiTestIdTestsDataSearchFilter(BaseModel): """ @@ -34,10 +30,11 @@ class MultiTestIdTestsDataSearchFilter(BaseModel): test_id: Optional[List[StrictStr]] = Field(default=None, alias="testId") __properties: ClassVar[List[str]] = ["agentId", "testId"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class MultiTestIdTestsDataSearchFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MultiTestIdTestsDataSearchFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class MultiTestIdTestsDataSearchFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MultiTestIdTestsDataSearchFilter from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/network_dynamic_test_result.py b/endpoint_test_results/endpoint_test_results/models/network_dynamic_test_result.py new file mode 100644 index 00000000..b037f726 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/network_dynamic_test_result.py @@ -0,0 +1,153 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class NetworkDynamicTestResult(BaseModel): + """ + NetworkDynamicTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination.", alias="avgLatency") + error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered.", alias="errorDetails") + jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency.") + is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") + loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination.") + 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`.") + webex: Optional[DynamicBaseTestResultWebex] = None + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile", "avgLatency", "errorDetails", "jitter", "isIcmpBlocked", "loss", "maxLatency", "minLatency", "application", "webex"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkDynamicTestResult 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. + """ + excluded_fields: Set[str] = set([ + "agent_id", + "round_id", + "server_ip", + "avg_latency", + "error_details", + "jitter", + "is_icmp_blocked", + "loss", + "max_latency", + "min_latency", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of webex + if self.webex: + _dict['webex'] = self.webex.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkDynamicTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "avgLatency": obj.get("avgLatency"), + "errorDetails": obj.get("errorDetails"), + "jitter": obj.get("jitter"), + "isIcmpBlocked": obj.get("isIcmpBlocked"), + "loss": obj.get("loss"), + "maxLatency": obj.get("maxLatency"), + "minLatency": obj.get("minLatency"), + "application": obj.get("application"), + "webex": DynamicBaseTestResultWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/network_dynamic_test_results.py b/endpoint_test_results/endpoint_test_results/models/network_dynamic_test_results.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/network_dynamic_test_results.py rename to endpoint_test_results/endpoint_test_results/models/network_dynamic_test_results.py index 371c9c6a..7177fe84 100644 --- a/endpoint/test_results_api/test_results_api/models/network_dynamic_test_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.network_dynamic_test_result import NetworkDynamicTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult +from typing import Optional, Set +from typing_extensions import Self class NetworkDynamicTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class NetworkDynamicTestResults(BaseModel): test: Optional[DynamicTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class NetworkDynamicTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkDynamicTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class NetworkDynamicTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class NetworkDynamicTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkDynamicTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class NetworkDynamicTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [NetworkDynamicTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": DynamicTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [NetworkDynamicTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": DynamicTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/network_interface.py b/endpoint_test_results/endpoint_test_results/models/network_interface.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/network_interface.py rename to endpoint_test_results/endpoint_test_results/models/network_interface.py index c59dbd15..a8820cee 100644 --- a/endpoint/test_results_api/test_results_api/models/network_interface.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,22 +17,18 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from typing import Optional, Set +from typing_extensions import Self class NetworkInterface(BaseModel): """ NetworkInterface """ # noqa: E501 ip_address: Optional[StrictStr] = Field(default=None, description="Network IP address.", alias="ipAddress") - subnet_mask: Optional[StrictStr] = Field(default=None, description="Network subnet mask.", alias="subnetMask") + subnet_mask: Optional[StrictStr] = Field(default=None, description="Network subnet mask - only for IPv4.", alias="subnetMask") public_ip_address: Optional[StrictStr] = Field(default=None, description="Network public IP address.", alias="publicIpAddress") local_prefix: Optional[StrictStr] = Field(default=None, description="Network local prefix.", alias="localPrefix") public_ip_range: Optional[StrictStr] = Field(default=None, description="Network public IP range.", alias="publicIpRange") @@ -41,10 +37,11 @@ class NetworkInterface(BaseModel): interface_name: Optional[StrictStr] = Field(default=None, description="Network interface name.", alias="interfaceName") __properties: ClassVar[List[str]] = ["ipAddress", "subnetMask", "publicIpAddress", "localPrefix", "publicIpRange", "dnsServers", "hardwareType", "interfaceName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ class NetworkInterface(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkInterface from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,23 +75,25 @@ class NetworkInterface(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "ip_address", + "subnet_mask", + "public_ip_address", + "local_prefix", + "public_ip_range", + "dns_servers", + "interface_name", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "ip_address", - "subnet_mask", - "public_ip_address", - "local_prefix", - "public_ip_range", - "dns_servers", - "interface_name", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkInterface from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/network_metrics.py b/endpoint_test_results/endpoint_test_results/models/network_metrics.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/network_metrics.py rename to endpoint_test_results/endpoint_test_results/models/network_metrics.py index c829f6f0..8de6110b 100644 --- a/endpoint/test_results_api/test_results_api/models/network_metrics.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class NetworkMetrics(BaseModel): """ @@ -36,10 +32,11 @@ class NetworkMetrics(BaseModel): target: Optional[StrictStr] = Field(default=None, description="Network target IP address.") __properties: ClassVar[List[str]] = ["jitter", "latency", "loss", "target"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class NetworkMetrics(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkMetrics from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,20 +67,22 @@ class NetworkMetrics(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "jitter", + "latency", + "loss", + "target", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "jitter", - "latency", - "loss", - "target", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkMetrics from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/network_ping.py b/endpoint_test_results/endpoint_test_results/models/network_ping.py similarity index 82% rename from endpoint/test_results_api/test_results_api/models/network_ping.py rename to endpoint_test_results/endpoint_test_results/models/network_ping.py index df584a3e..d99fd8bf 100644 --- a/endpoint/test_results_api/test_results_api/models/network_ping.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class NetworkPing(BaseModel): """ @@ -40,10 +36,11 @@ class NetworkPing(BaseModel): info_flags: Optional[List[StrictStr]] = Field(default=None, alias="infoFlags") __properties: ClassVar[List[str]] = ["avgRtt", "maxRtt", "meanDevRtt", "minRtt", "pktsReceived", "pktsSent", "error", "infoFlags"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ class NetworkPing(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkPing from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,24 +75,26 @@ class NetworkPing(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "avg_rtt", + "max_rtt", + "mean_dev_rtt", + "min_rtt", + "pkts_received", + "pkts_sent", + "error", + "info_flags", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "avg_rtt", - "max_rtt", - "mean_dev_rtt", - "min_rtt", - "pkts_received", - "pkts_sent", - "error", - "info_flags", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkPing from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/network_profile.py b/endpoint_test_results/endpoint_test_results/models/network_profile.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/network_profile.py rename to endpoint_test_results/endpoint_test_results/models/network_profile.py index afbef86e..743fb525 100644 --- a/endpoint/test_results_api/test_results_api/models/network_profile.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,26 +17,22 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.ethernet_profile import EthernetProfile -from test_results_api.models.interface_hardware_type import InterfaceHardwareType -from test_results_api.models.network_interface import NetworkInterface -from test_results_api.models.network_proxy_profile import NetworkProxyProfile -from test_results_api.models.network_wireless_profile import NetworkWirelessProfile -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.ethernet_profile import EthernetProfile +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType +from endpoint_test_results.models.network_interface import NetworkInterface +from endpoint_test_results.models.network_proxy_profile import NetworkProxyProfile +from endpoint_test_results.models.network_wireless_profile import NetworkWirelessProfile +from typing import Optional, Set +from typing_extensions import Self class NetworkProfile(BaseModel): """ NetworkProfile """ # noqa: E501 ip_address: Optional[StrictStr] = Field(default=None, description="Network IP address.", alias="ipAddress") - subnet_mask: Optional[StrictStr] = Field(default=None, description="Network subnet mask.", alias="subnetMask") + subnet_mask: Optional[StrictStr] = Field(default=None, description="Network subnet mask - only for IPv4.", alias="subnetMask") public_ip_address: Optional[StrictStr] = Field(default=None, description="Network public IP address.", alias="publicIpAddress") local_prefix: Optional[StrictStr] = Field(default=None, description="Network local prefix.", alias="localPrefix") public_ip_range: Optional[StrictStr] = Field(default=None, description="Network public IP range.", alias="publicIpRange") @@ -51,10 +47,11 @@ class NetworkProfile(BaseModel): previous_interface: Optional[NetworkInterface] = Field(default=None, alias="previousInterface") __properties: ClassVar[List[str]] = ["ipAddress", "subnetMask", "publicIpAddress", "localPrefix", "publicIpRange", "dnsServers", "hardwareType", "interfaceName", "error", "gateway", "wirelessProfile", "proxyProfile", "ethernetProfile", "previousInterface"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -67,7 +64,7 @@ class NetworkProfile(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkProfile from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -90,19 +87,21 @@ class NetworkProfile(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "ip_address", + "subnet_mask", + "public_ip_address", + "local_prefix", + "public_ip_range", + "dns_servers", + "interface_name", + "error", + "gateway", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "ip_address", - "subnet_mask", - "public_ip_address", - "local_prefix", - "public_ip_range", - "dns_servers", - "interface_name", - "error", - "gateway", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of wireless_profile @@ -120,7 +119,7 @@ class NetworkProfile(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkProfile from a dict""" if obj is None: return None @@ -139,10 +138,10 @@ class NetworkProfile(BaseModel): "interfaceName": obj.get("interfaceName"), "error": obj.get("error"), "gateway": obj.get("gateway"), - "wirelessProfile": NetworkWirelessProfile.from_dict(obj.get("wirelessProfile")) if obj.get("wirelessProfile") is not None else None, - "proxyProfile": NetworkProxyProfile.from_dict(obj.get("proxyProfile")) if obj.get("proxyProfile") is not None else None, - "ethernetProfile": EthernetProfile.from_dict(obj.get("ethernetProfile")) if obj.get("ethernetProfile") is not None else None, - "previousInterface": NetworkInterface.from_dict(obj.get("previousInterface")) if obj.get("previousInterface") is not None else None + "wirelessProfile": NetworkWirelessProfile.from_dict(obj["wirelessProfile"]) if obj.get("wirelessProfile") is not None else None, + "proxyProfile": NetworkProxyProfile.from_dict(obj["proxyProfile"]) if obj.get("proxyProfile") is not None else None, + "ethernetProfile": EthernetProfile.from_dict(obj["ethernetProfile"]) if obj.get("ethernetProfile") is not None else None, + "previousInterface": NetworkInterface.from_dict(obj["previousInterface"]) if obj.get("previousInterface") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/network_proxy_profile.py b/endpoint_test_results/endpoint_test_results/models/network_proxy_profile.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/network_proxy_profile.py rename to endpoint_test_results/endpoint_test_results/models/network_proxy_profile.py index 408026aa..33ade1ed 100644 --- a/endpoint/test_results_api/test_results_api/models/network_proxy_profile.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner +from typing import Optional, Set +from typing_extensions import Self class NetworkProxyProfile(BaseModel): """ @@ -35,10 +31,11 @@ class NetworkProxyProfile(BaseModel): proxies: Optional[List[NetworkProxyProfileProxiesInner]] = None __properties: ClassVar[List[str]] = ["method", "proxies"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class NetworkProxyProfile(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkProxyProfile from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,11 +63,13 @@ class NetworkProxyProfile(BaseModel): are ignored. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "method", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "method", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in proxies (list) @@ -83,7 +82,7 @@ class NetworkProxyProfile(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkProxyProfile from a dict""" if obj is None: return None @@ -93,7 +92,7 @@ class NetworkProxyProfile(BaseModel): _obj = cls.model_validate({ "method": obj.get("method"), - "proxies": [NetworkProxyProfileProxiesInner.from_dict(_item) for _item in obj.get("proxies")] if obj.get("proxies") is not None else None + "proxies": [NetworkProxyProfileProxiesInner.from_dict(_item) for _item in obj["proxies"]] if obj.get("proxies") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/network_proxy_profile_proxies_inner.py b/endpoint_test_results/endpoint_test_results/models/network_proxy_profile_proxies_inner.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/network_proxy_profile_proxies_inner.py rename to endpoint_test_results/endpoint_test_results/models/network_proxy_profile_proxies_inner.py index f049d54c..c5e8e7ae 100644 --- a/endpoint/test_results_api/test_results_api/models/network_proxy_profile_proxies_inner.py +++ b/endpoint_test_results/endpoint_test_results/models/network_proxy_profile_proxies_inner.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class NetworkProxyProfileProxiesInner(BaseModel): """ @@ -34,10 +30,11 @@ class NetworkProxyProfileProxiesInner(BaseModel): proxy: Optional[StrictStr] = Field(default=None, description="Proxy mode.") __properties: ClassVar[List[str]] = ["bypass", "proxy"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class NetworkProxyProfileProxiesInner(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkProxyProfileProxiesInner from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class NetworkProxyProfileProxiesInner(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "bypass", + "proxy", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "bypass", - "proxy", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkProxyProfileProxiesInner from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/network_test_result.py b/endpoint_test_results/endpoint_test_results/models/network_test_result.py new file mode 100644 index 00000000..f115e7d2 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/network_test_result.py @@ -0,0 +1,145 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class NetworkTestResult(BaseModel): + """ + NetworkTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination.", alias="avgLatency") + error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered.", alias="errorDetails") + jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency.") + is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") + loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination.") + 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") + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile", "avgLatency", "errorDetails", "jitter", "isIcmpBlocked", "loss", "maxLatency", "minLatency"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkTestResult 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. + """ + excluded_fields: Set[str] = set([ + "agent_id", + "round_id", + "server_ip", + "avg_latency", + "error_details", + "jitter", + "is_icmp_blocked", + "loss", + "max_latency", + "min_latency", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "avgLatency": obj.get("avgLatency"), + "errorDetails": obj.get("errorDetails"), + "jitter": obj.get("jitter"), + "isIcmpBlocked": obj.get("isIcmpBlocked"), + "loss": obj.get("loss"), + "maxLatency": obj.get("maxLatency"), + "minLatency": obj.get("minLatency") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/network_test_results.py b/endpoint_test_results/endpoint_test_results/models/network_test_results.py new file mode 100644 index 00000000..a040eec7 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/network_test_results.py @@ -0,0 +1,103 @@ +# 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.2 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.network_test_result import NetworkTestResult +from typing import Optional, Set +from typing_extensions import Self + +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") + test: Optional[EndpointScheduledTest] = None + __properties: ClassVar[List[str]] = ["results", "totalHits", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NetworkTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "totalHits": obj.get("totalHits"), + "test": EndpointScheduledTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/network_topology_type.py b/endpoint_test_results/endpoint_test_results/models/network_topology_type.py similarity index 79% rename from endpoint/test_results_api/test_results_api/models/network_topology_type.py rename to endpoint_test_results/endpoint_test_results/models/network_topology_type.py index 3fd665aa..478abc15 100644 --- a/endpoint/test_results_api/test_results_api/models/network_topology_type.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class NetworkTopologyType(str, Enum): diff --git a/endpoint/test_results_api/test_results_api/models/network_wireless_profile.py b/endpoint_test_results/endpoint_test_results/models/network_wireless_profile.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/network_wireless_profile.py rename to endpoint_test_results/endpoint_test_results/models/network_wireless_profile.py index 3c562554..197f79eb 100644 --- a/endpoint/test_results_api/test_results_api/models/network_wireless_profile.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class NetworkWirelessProfile(BaseModel): """ @@ -41,10 +37,11 @@ class NetworkWirelessProfile(BaseModel): vendor: Optional[StrictStr] = Field(default=None, description="Wireless network device vendor.") __properties: ClassVar[List[str]] = ["ssid", "bssid", "channel", "phyMode", "rssi", "noise", "quality", "txRate", "vendor"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ class NetworkWirelessProfile(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NetworkWirelessProfile from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,25 +77,27 @@ class NetworkWirelessProfile(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "ssid", + "bssid", + "channel", + "phy_mode", + "rssi", + "noise", + "quality", + "tx_rate", + "vendor", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "ssid", - "bssid", - "channel", - "phy_mode", - "rssi", - "noise", - "quality", - "tx_rate", - "vendor", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NetworkWirelessProfile from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link.py b/endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link.py new file mode 100644 index 00000000..ea833fa0 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextAndSelfLink(BaseModel): + """ + A links object containing a related link for forward pagination. + """ # noqa: E501 + links: Optional[PaginationNextAndSelfLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextAndSelfLink 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 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 PaginationNextAndSelfLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationNextAndSelfLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link_links.py b/endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link_links.py new file mode 100644 index 00000000..b7fdcc68 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/pagination_next_and_self_link_links.py @@ -0,0 +1,96 @@ +# 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.2 + 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 endpoint_test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextAndSelfLinkLinks(BaseModel): + """ + PaginationNextAndSelfLinkLinks + """ # noqa: E501 + next: Optional[Link] = None + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["next", "self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextAndSelfLinkLinks 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 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 PaginationNextAndSelfLinkLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "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/endpoint_test_results/endpoint_test_results/models/pagination_next_link.py b/endpoint_test_results/endpoint_test_results/models/pagination_next_link.py new file mode 100644 index 00000000..e2fe2f7c --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/pagination_next_link.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextLink(BaseModel): + """ + A links object containing a related link for forward pagination. + """ # noqa: E501 + links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextLink 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 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 PaginationNextLink from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/pagination_next_link_links.py b/endpoint_test_results/endpoint_test_results/models/pagination_next_link_links.py new file mode 100644 index 00000000..bf2b2e91 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/pagination_next_link_links.py @@ -0,0 +1,91 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationNextLinkLinks(BaseModel): + """ + PaginationNextLinkLinks + """ # noqa: E501 + next: Optional[Link] = None + __properties: ClassVar[List[str]] = ["next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationNextLinkLinks 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 next + if self.next: + _dict['next'] = self.next.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginationNextLinkLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "next": Link.from_dict(obj["next"]) if obj.get("next") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_base_test_result.py b/endpoint_test_results/endpoint_test_results/models/path_vis_base_test_result.py new file mode 100644 index 00000000..7a616ed6 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_base_test_result.py @@ -0,0 +1,135 @@ +# 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.2 + 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 endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class PathVisBaseTestResult(BaseModel): + """ + PathVisBaseTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") + server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") + 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") + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisBaseTestResult 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. + """ + excluded_fields: Set[str] = set([ + "agent_id", + "round_id", + "server_ip", + "server", + "source_ip", + "source_prefix", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of asn_details + if self.asn_details: + _dict['asnDetails'] = self.asn_details.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisBaseTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, + "server": obj.get("server"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py new file mode 100644 index 00000000..436dd451 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py @@ -0,0 +1,162 @@ +# 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.2 + 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 endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.path_vis_route import PathVisRoute +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDetailDynamicTestResult(BaseModel): + """ + PathVisDetailDynamicTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") + server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") + 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") + 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`.") + webex: Optional[DynamicBaseTestResultWebex] = None + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces", "application", "webex"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDetailDynamicTestResult 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. + """ + excluded_fields: Set[str] = set([ + "agent_id", + "round_id", + "server_ip", + "server", + "source_ip", + "source_prefix", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of asn_details + if self.asn_details: + _dict['asnDetails'] = self.asn_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in path_traces (list) + _items = [] + if self.path_traces: + for _item in self.path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['pathTraces'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vpn_path_traces (list) + _items = [] + if self.vpn_path_traces: + for _item in self.vpn_path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['vpnPathTraces'] = _items + # override the default output from pydantic by calling `to_dict()` of webex + if self.webex: + _dict['webex'] = self.webex.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDetailDynamicTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, + "server": obj.get("server"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "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"), + "webex": DynamicBaseTestResultWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py new file mode 100644 index 00000000..93b6292c --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py @@ -0,0 +1,101 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDetailDynamicTestResults(BaseModel): + """ + PathVisDetailDynamicTestResults + """ # noqa: E501 + results: Optional[List[PathVisDetailDynamicTestResult]] = None + test: Optional[DynamicTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDetailDynamicTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDetailDynamicTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDetailDynamicTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": DynamicTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_result.py b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_result.py new file mode 100644 index 00000000..0a09bd05 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_result.py @@ -0,0 +1,154 @@ +# 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.2 + 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 endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.path_vis_route import PathVisRoute +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDetailTestResult(BaseModel): + """ + PathVisDetailTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") + server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") + 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") + 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") + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDetailTestResult 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. + """ + excluded_fields: Set[str] = set([ + "agent_id", + "round_id", + "server_ip", + "server", + "source_ip", + "source_prefix", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of asn_details + if self.asn_details: + _dict['asnDetails'] = self.asn_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in path_traces (list) + _items = [] + if self.path_traces: + for _item in self.path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['pathTraces'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in vpn_path_traces (list) + _items = [] + if self.vpn_path_traces: + for _item in self.vpn_path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['vpnPathTraces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDetailTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, + "server": obj.get("server"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "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 + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_results.py b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_results.py new file mode 100644 index 00000000..7b8050fa --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_detail_test_results.py @@ -0,0 +1,101 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDetailTestResults(BaseModel): + """ + PathVisDetailTestResults + """ # noqa: E501 + results: Optional[List[PathVisDetailTestResult]] = None + test: Optional[EndpointScheduledTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDetailTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDetailTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": EndpointScheduledTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_dynamic_test_result.py b/endpoint_test_results/endpoint_test_results/models/path_vis_dynamic_test_result.py new file mode 100644 index 00000000..131c0dd7 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_dynamic_test_result.py @@ -0,0 +1,157 @@ +# 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.2 + 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 endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDynamicTestResult(BaseModel): + """ + PathVisDynamicTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") + server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") + 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`.") + webex: Optional[DynamicBaseTestResultWebex] = 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", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "application", "webex", "location", "pathTraces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDynamicTestResult 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([ + "agent_id", + "round_id", + "server_ip", + "server", + "source_ip", + "source_prefix", + "location", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of asn_details + if self.asn_details: + _dict['asnDetails'] = self.asn_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of webex + if self.webex: + _dict['webex'] = self.webex.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in path_traces (list) + _items = [] + if self.path_traces: + for _item in self.path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['pathTraces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDynamicTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, + "server": obj.get("server"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "application": obj.get("application"), + "webex": DynamicBaseTestResultWebex.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 + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_results.py b/endpoint_test_results/endpoint_test_results/models/path_vis_dynamic_test_results.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_results.py rename to endpoint_test_results/endpoint_test_results/models/path_vis_dynamic_test_results.py index 9226cc55..82444ddb 100644 --- a/endpoint/test_results_api/test_results_api/models/path_vis_dynamic_test_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.path_vis_dynamic_test_result import PathVisDynamicTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.path_vis_dynamic_test_result import PathVisDynamicTestResult +from typing import Optional, Set +from typing_extensions import Self class PathVisDynamicTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class PathVisDynamicTestResults(BaseModel): test: Optional[DynamicTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class PathVisDynamicTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PathVisDynamicTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class PathVisDynamicTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class PathVisDynamicTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PathVisDynamicTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class PathVisDynamicTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [PathVisDynamicTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": DynamicTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [PathVisDynamicTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": DynamicTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_endpoint.py b/endpoint_test_results/endpoint_test_results/models/path_vis_endpoint.py new file mode 100644 index 00000000..1139860a --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_endpoint.py @@ -0,0 +1,101 @@ +# 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.2 + 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 PathVisEndpoint(BaseModel): + """ + PathVisEndpoint + """ # noqa: E501 + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop destination.", alias="ipAddress") + number_of_hops: Optional[StrictInt] = Field(default=None, description="Number of hops for path trace to destination.", alias="numberOfHops") + path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace.", alias="pathId") + response_time: Optional[StrictInt] = Field(default=None, description="RTT of the path trace to the destination in milliseconds.", alias="responseTime") + __properties: ClassVar[List[str]] = ["ipAddress", "numberOfHops", "pathId", "responseTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisEndpoint 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. + """ + excluded_fields: Set[str] = set([ + "ip_address", + "number_of_hops", + "path_id", + "response_time", + ]) + + _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 PathVisEndpoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipAddress": obj.get("ipAddress"), + "numberOfHops": obj.get("numberOfHops"), + "pathId": obj.get("pathId"), + "responseTime": obj.get("responseTime") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_hop.py b/endpoint_test_results/endpoint_test_results/models/path_vis_hop.py new file mode 100644 index 00000000..c3482fe5 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_hop.py @@ -0,0 +1,113 @@ +# 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.2 + 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 PathVisHop(BaseModel): + """ + PathVisHop + """ # noqa: E501 + hop: Optional[StrictInt] = Field(default=None, description="The hop index.") + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop.", alias="ipAddress") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix of IP address shown in CIDR.") + rdns: Optional[StrictStr] = Field(default=None, description="Reverse DNS entry of IP, if available.") + network: Optional[StrictStr] = Field(default=None, description="Autonomous System originating the prefix.") + response_time: Optional[StrictInt] = Field(default=None, description="RTT to the hop’s IP in milliseconds.", alias="responseTime") + location: Optional[StrictStr] = Field(default=None, description="Location information for the hop.") + __properties: ClassVar[List[str]] = ["hop", "ipAddress", "prefix", "rdns", "network", "responseTime", "location"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisHop 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([ + "hop", + "ip_address", + "prefix", + "rdns", + "network", + "response_time", + "location", + ]) + + _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 PathVisHop from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hop": obj.get("hop"), + "ipAddress": obj.get("ipAddress"), + "prefix": obj.get("prefix"), + "rdns": obj.get("rdns"), + "network": obj.get("network"), + "responseTime": obj.get("responseTime"), + "location": obj.get("location") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_route.py b/endpoint_test_results/endpoint_test_results/models/path_vis_route.py new file mode 100644 index 00000000..3622a9d4 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_route.py @@ -0,0 +1,99 @@ +# 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.2 + 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 endpoint_test_results.models.path_vis_hop import PathVisHop +from typing import Optional, Set +from typing_extensions import Self + +class PathVisRoute(BaseModel): + """ + PathVisRoute + """ # noqa: E501 + path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace.", alias="pathId") + hops: Optional[List[PathVisHop]] = Field(default=None, description="Array of hop objects indicating each step in the traceroute.") + __properties: ClassVar[List[str]] = ["pathId", "hops"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisRoute 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([ + "path_id", + ]) + + _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 hops (list) + _items = [] + if self.hops: + for _item in self.hops: + if _item: + _items.append(_item.to_dict()) + _dict['hops'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisRoute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pathId": obj.get("pathId"), + "hops": [PathVisHop.from_dict(_item) for _item in obj["hops"]] if obj.get("hops") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_test_result.py b/endpoint_test_results/endpoint_test_results/models/path_vis_test_result.py new file mode 100644 index 00000000..c1836db9 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_test_result.py @@ -0,0 +1,149 @@ +# 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.2 + 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 endpoint_test_results.models.asn_details import AsnDetails +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class PathVisTestResult(BaseModel): + """ + PathVisTestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + asn_details: Optional[AsnDetails] = Field(default=None, alias="asnDetails") + server: Optional[StrictStr] = Field(default=None, description="Target server, including port.") + 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") + 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", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "location", "pathTraces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisTestResult 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([ + "agent_id", + "round_id", + "server_ip", + "server", + "source_ip", + "source_prefix", + "location", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of asn_details + if self.asn_details: + _dict['asnDetails'] = self.asn_details.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in path_traces (list) + _items = [] + if self.path_traces: + for _item in self.path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['pathTraces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisTestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None, + "asnDetails": AsnDetails.from_dict(obj["asnDetails"]) if obj.get("asnDetails") is not None else None, + "server": obj.get("server"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "location": obj.get("location"), + "pathTraces": [PathVisEndpoint.from_dict(_item) for _item in obj["pathTraces"]] if obj.get("pathTraces") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/path_vis_test_results.py b/endpoint_test_results/endpoint_test_results/models/path_vis_test_results.py new file mode 100644 index 00000000..26cd085b --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/path_vis_test_results.py @@ -0,0 +1,101 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.path_vis_test_result import PathVisTestResult +from typing import Optional, Set +from typing_extensions import Self + +class PathVisTestResults(BaseModel): + """ + PathVisTestResults + """ # noqa: E501 + results: Optional[List[PathVisTestResult]] = None + test: Optional[EndpointScheduledTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": EndpointScheduledTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/physical_memory_used_bytes.py b/endpoint_test_results/endpoint_test_results/models/physical_memory_used_bytes.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/physical_memory_used_bytes.py rename to endpoint_test_results/endpoint_test_results/models/physical_memory_used_bytes.py index 9734c74a..7a4d911b 100644 --- a/endpoint/test_results_api/test_results_api/models/physical_memory_used_bytes.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PhysicalMemoryUsedBytes(BaseModel): """ @@ -38,10 +34,11 @@ class PhysicalMemoryUsedBytes(BaseModel): count: Optional[Union[StrictFloat, 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 = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class PhysicalMemoryUsedBytes(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PhysicalMemoryUsedBytes from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,22 +71,24 @@ class PhysicalMemoryUsedBytes(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "min", + "max", + "mean", + "median", + "std_dev", + "count", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "min", - "max", - "mean", - "median", - "std_dev", - "count", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PhysicalMemoryUsedBytes from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/platform.py b/endpoint_test_results/endpoint_test_results/models/platform.py new file mode 100644 index 00000000..40a3c5f0 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/platform.py @@ -0,0 +1,38 @@ +# 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.2 + 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 Platform(str, Enum): + """ + OS platform types + """ + + """ + allowed enum values + """ + WINDOWS = 'windows' + LINUX = 'linux' + MAC = 'mac' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Platform from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/models/post_fetch_dynamic_test_result_metrics200_response.py b/endpoint_test_results/endpoint_test_results/models/post_fetch_dynamic_test_result_metrics200_response.py similarity index 76% rename from endpoint/test_results_api/test_results_api/models/post_fetch_dynamic_test_result_metrics200_response.py rename to endpoint_test_results/endpoint_test_results/models/post_fetch_dynamic_test_result_metrics200_response.py index a78f6a61..2d33556b 100644 --- a/endpoint/test_results_api/test_results_api/models/post_fetch_dynamic_test_result_metrics200_response.py +++ b/endpoint_test_results/endpoint_test_results/models/post_fetch_dynamic_test_result_metrics200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dynamic_test import DynamicTest -from test_results_api.models.network_dynamic_test_result import NetworkDynamicTestResult -from test_results_api.models.pagination_next_link_links import PaginationNextLinkLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.dynamic_test import DynamicTest +from endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self class PostFetchDynamicTestResultMetrics200Response(BaseModel): """ @@ -40,10 +37,11 @@ class PostFetchDynamicTestResultMetrics200Response(BaseModel): links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class PostFetchDynamicTestResultMetrics200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PostFetchDynamicTestResultMetrics200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class PostFetchDynamicTestResultMetrics200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class PostFetchDynamicTestResultMetrics200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PostFetchDynamicTestResultMetrics200Response from a dict""" if obj is None: return None @@ -105,11 +105,11 @@ class PostFetchDynamicTestResultMetrics200Response(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [NetworkDynamicTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": DynamicTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, + "results": [NetworkDynamicTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": DynamicTest.from_dict(obj["test"]) if obj.get("test") is not None else None, "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "_links": PaginationNextLinkLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics200_response.py b/endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics200_response.py new file mode 100644 index 00000000..4c490b0f --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics200_response.py @@ -0,0 +1,118 @@ +# 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.2 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest +from endpoint_test_results.models.network_test_result import NetworkTestResult +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PostFetchTestResultMetrics200Response(BaseModel): + """ + PostFetchTestResultMetrics200Response + """ # 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") + 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") + links: Optional[PaginationNextLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "totalHits", "test", "startDate", "endDate", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFetchTestResultMetrics200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 PostFetchTestResultMetrics200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NetworkTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "totalHits": obj.get("totalHits"), + "test": EndpointScheduledTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics_multi_test200_response.py b/endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics_multi_test200_response.py new file mode 100644 index 00000000..d268d375 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/post_fetch_test_result_metrics_multi_test200_response.py @@ -0,0 +1,112 @@ +# 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.2 + 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, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.network_test_result import NetworkTestResult +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks +from typing import Optional, Set +from typing_extensions import Self + +class PostFetchTestResultMetricsMultiTest200Response(BaseModel): + """ + PostFetchTestResultMetricsMultiTest200Response + """ # 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") + 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[PaginationNextLinkLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "totalHits", "startDate", "endDate", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PostFetchTestResultMetricsMultiTest200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _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 PostFetchTestResultMetricsMultiTest200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NetworkTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "totalHits": obj.get("totalHits"), + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "_links": PaginationNextLinkLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/query_window.py b/endpoint_test_results/endpoint_test_results/models/query_window.py new file mode 100644 index 00000000..85bea1bb --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/query_window.py @@ -0,0 +1,94 @@ +# 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.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class QueryWindow(BaseModel): + """ + QueryWindow + """ # noqa: E501 + 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") + __properties: ClassVar[List[str]] = ["startDate", "endDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueryWindow 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, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueryWindow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_coordinates.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_coordinates.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/real_user_test_coordinates.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_coordinates.py index 01594124..25186a49 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_coordinates.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RealUserTestCoordinates(BaseModel): """ @@ -35,10 +31,11 @@ class RealUserTestCoordinates(BaseModel): longitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Numeric representations of GPS coordinates.") __properties: ClassVar[List[str]] = ["latitude", "location", "longitude"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class RealUserTestCoordinates(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestCoordinates from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,19 +65,21 @@ class RealUserTestCoordinates(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "latitude", + "location", + "longitude", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "latitude", - "location", - "longitude", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestCoordinates from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/real_user_test_network.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network.py new file mode 100644 index 00000000..6650efe0 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_network.py @@ -0,0 +1,139 @@ +# 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.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing +from endpoint_test_results.models.real_user_test_network_ping import RealUserTestNetworkPing +from endpoint_test_results.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute +from endpoint_test_results.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing +from endpoint_test_results.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute +from endpoint_test_results.models.system_metrics import SystemMetrics +from typing import Optional, Set +from typing_extensions import Self + +class RealUserTestNetwork(BaseModel): + """ + Contains details about network profile and conditions during session. + """ # noqa: E501 + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + gateway_ping: Optional[RealUserTestNetworkGatewayPing] = Field(default=None, alias="gatewayPing") + ping: Optional[RealUserTestNetworkPing] = None + traceroute: Optional[RealUserTestNetworkTraceroute] = None + connect_rtt: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Represents the number of milliseconds required to establish TCP connectivity with the target.", alias="connectRtt") + is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") + errors: Optional[List[StrictStr]] = Field(default=None, description="Array of string representing possible network errors.") + vpn_ping: Optional[RealUserTestNetworkVpnPing] = Field(default=None, alias="vpnPing") + vpn_traceroute: Optional[RealUserTestNetworkVpnTraceroute] = Field(default=None, alias="vpnTraceroute") + __properties: ClassVar[List[str]] = ["networkProfile", "systemMetrics", "gatewayPing", "ping", "traceroute", "connectRtt", "isIcmpBlocked", "errors", "vpnPing", "vpnTraceroute"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RealUserTestNetwork 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([ + "connect_rtt", + "is_icmp_blocked", + "errors", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of gateway_ping + if self.gateway_ping: + _dict['gatewayPing'] = self.gateway_ping.to_dict() + # override the default output from pydantic by calling `to_dict()` of ping + if self.ping: + _dict['ping'] = self.ping.to_dict() + # override the default output from pydantic by calling `to_dict()` of traceroute + if self.traceroute: + _dict['traceroute'] = self.traceroute.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_ping + if self.vpn_ping: + _dict['vpnPing'] = self.vpn_ping.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_traceroute + if self.vpn_traceroute: + _dict['vpnTraceroute'] = self.vpn_traceroute.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RealUserTestNetwork from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "gatewayPing": RealUserTestNetworkGatewayPing.from_dict(obj["gatewayPing"]) if obj.get("gatewayPing") is not None else None, + "ping": RealUserTestNetworkPing.from_dict(obj["ping"]) if obj.get("ping") is not None else None, + "traceroute": RealUserTestNetworkTraceroute.from_dict(obj["traceroute"]) if obj.get("traceroute") is not None else None, + "connectRtt": obj.get("connectRtt"), + "isIcmpBlocked": obj.get("isIcmpBlocked"), + "errors": obj.get("errors"), + "vpnPing": RealUserTestNetworkVpnPing.from_dict(obj["vpnPing"]) if obj.get("vpnPing") is not None else None, + "vpnTraceroute": RealUserTestNetworkVpnTraceroute.from_dict(obj["vpnTraceroute"]) if obj.get("vpnTraceroute") is not None else None + }) + return _obj + + diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_gateway_ping.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_gateway_ping.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_gateway_ping.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_gateway_ping.py index 14bcca9e..cc0da741 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_gateway_ping.py +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_gateway_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkGatewayPing(BaseModel): """ @@ -40,10 +36,11 @@ class RealUserTestNetworkGatewayPing(BaseModel): info_flags: Optional[List[StrictStr]] = Field(default=None, alias="infoFlags") __properties: ClassVar[List[str]] = ["avgRtt", "maxRtt", "meanDevRtt", "minRtt", "pktsReceived", "pktsSent", "error", "infoFlags"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ class RealUserTestNetworkGatewayPing(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkGatewayPing from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,24 +75,26 @@ class RealUserTestNetworkGatewayPing(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "avg_rtt", + "max_rtt", + "mean_dev_rtt", + "min_rtt", + "pkts_received", + "pkts_sent", + "error", + "info_flags", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "avg_rtt", - "max_rtt", - "mean_dev_rtt", - "min_rtt", - "pkts_received", - "pkts_sent", - "error", - "info_flags", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkGatewayPing from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_ping.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_ping.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_ping.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_ping.py index b070c31d..f223a179 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_ping.py +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkPing(BaseModel): """ @@ -40,10 +36,11 @@ class RealUserTestNetworkPing(BaseModel): info_flags: Optional[List[StrictStr]] = Field(default=None, alias="infoFlags") __properties: ClassVar[List[str]] = ["avgRtt", "maxRtt", "meanDevRtt", "minRtt", "pktsReceived", "pktsSent", "error", "infoFlags"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ class RealUserTestNetworkPing(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkPing from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,24 +75,26 @@ class RealUserTestNetworkPing(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "avg_rtt", + "max_rtt", + "mean_dev_rtt", + "min_rtt", + "pkts_received", + "pkts_sent", + "error", + "info_flags", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "avg_rtt", - "max_rtt", - "mean_dev_rtt", - "min_rtt", - "pkts_received", - "pkts_sent", - "error", - "info_flags", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkPing from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_result.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_result.py similarity index 76% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_result.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_result.py index 181707de..f3bc8d82 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_result.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.network_metrics import NetworkMetrics -from test_results_api.models.system_metrics import SystemMetrics -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.network_metrics import NetworkMetrics +from endpoint_test_results.models.system_metrics import SystemMetrics +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkResult(BaseModel): """ @@ -42,10 +39,11 @@ class RealUserTestNetworkResult(BaseModel): system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") __properties: ClassVar[List[str]] = ["agentId", "date", "id", "roundId", "destination", "vpn", "proxy", "systemMetrics"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ class RealUserTestNetworkResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,14 +74,16 @@ class RealUserTestNetworkResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "agent_id", + "var_date", + "id", + "round_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "agent_id", - "var_date", - "id", - "round_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of destination @@ -101,7 +101,7 @@ class RealUserTestNetworkResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkResult from a dict""" if obj is None: return None @@ -114,10 +114,10 @@ class RealUserTestNetworkResult(BaseModel): "date": obj.get("date"), "id": obj.get("id"), "roundId": obj.get("roundId"), - "destination": NetworkMetrics.from_dict(obj.get("destination")) if obj.get("destination") is not None else None, - "vpn": NetworkMetrics.from_dict(obj.get("vpn")) if obj.get("vpn") is not None else None, - "proxy": NetworkMetrics.from_dict(obj.get("proxy")) if obj.get("proxy") is not None else None, - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None + "destination": NetworkMetrics.from_dict(obj["destination"]) if obj.get("destination") is not None else None, + "vpn": NetworkMetrics.from_dict(obj["vpn"]) if obj.get("vpn") is not None else None, + "proxy": NetworkMetrics.from_dict(obj["proxy"]) if obj.get("proxy") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_results.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_results.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_results.py index 7a096643..e25e98c5 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.real_user_test_network_result import RealUserTestNetworkResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.real_user_test_network_result import RealUserTestNetworkResult +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkResults(BaseModel): """ @@ -33,10 +30,11 @@ class RealUserTestNetworkResults(BaseModel): results: Optional[List[RealUserTestNetworkResult]] = None __properties: ClassVar[List[str]] = ["results"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class RealUserTestNetworkResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class RealUserTestNetworkResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +79,7 @@ class RealUserTestNetworkResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkResults from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class RealUserTestNetworkResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [RealUserTestNetworkResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None + "results": [RealUserTestNetworkResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_traceroute.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_traceroute.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_traceroute.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_traceroute.py index e9174edd..6c5cbf63 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_traceroute.py +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_traceroute.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.traceroute_hop import TracerouteHop -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.traceroute_hop import TracerouteHop +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkTraceroute(BaseModel): """ @@ -38,10 +34,11 @@ class RealUserTestNetworkTraceroute(BaseModel): hops: Optional[List[TracerouteHop]] = None __properties: ClassVar[List[str]] = ["destination", "error", "infoFlags", "internalErrors", "hops"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class RealUserTestNetworkTraceroute(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkTraceroute from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,14 +69,16 @@ class RealUserTestNetworkTraceroute(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "destination", + "error", + "info_flags", + "internal_errors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "destination", - "error", - "info_flags", - "internal_errors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in hops (list) @@ -92,7 +91,7 @@ class RealUserTestNetworkTraceroute(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkTraceroute from a dict""" if obj is None: return None @@ -105,7 +104,7 @@ class RealUserTestNetworkTraceroute(BaseModel): "error": obj.get("error"), "infoFlags": obj.get("infoFlags"), "internalErrors": obj.get("internalErrors"), - "hops": [TracerouteHop.from_dict(_item) for _item in obj.get("hops")] if obj.get("hops") is not None else None + "hops": [TracerouteHop.from_dict(_item) for _item in obj["hops"]] if obj.get("hops") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_vpn_ping.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_vpn_ping.py similarity index 83% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_vpn_ping.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_vpn_ping.py index fd9e77c9..6eae3031 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_vpn_ping.py +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_vpn_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkVpnPing(BaseModel): """ @@ -40,10 +36,11 @@ class RealUserTestNetworkVpnPing(BaseModel): info_flags: Optional[List[StrictStr]] = Field(default=None, alias="infoFlags") __properties: ClassVar[List[str]] = ["avgRtt", "maxRtt", "meanDevRtt", "minRtt", "pktsReceived", "pktsSent", "error", "infoFlags"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ class RealUserTestNetworkVpnPing(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkVpnPing from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,24 +75,26 @@ class RealUserTestNetworkVpnPing(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "avg_rtt", + "max_rtt", + "mean_dev_rtt", + "min_rtt", + "pkts_received", + "pkts_sent", + "error", + "info_flags", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "avg_rtt", - "max_rtt", - "mean_dev_rtt", - "min_rtt", - "pkts_received", - "pkts_sent", - "error", - "info_flags", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkVpnPing from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_network_vpn_traceroute.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_vpn_traceroute.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/real_user_test_network_vpn_traceroute.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_network_vpn_traceroute.py index 1174a249..626a6dad 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_network_vpn_traceroute.py +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_network_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.traceroute_hop import TracerouteHop -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.traceroute_hop import TracerouteHop +from typing import Optional, Set +from typing_extensions import Self class RealUserTestNetworkVpnTraceroute(BaseModel): """ @@ -38,10 +34,11 @@ class RealUserTestNetworkVpnTraceroute(BaseModel): hops: Optional[List[TracerouteHop]] = None __properties: ClassVar[List[str]] = ["destination", "error", "infoFlags", "internalErrors", "hops"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class RealUserTestNetworkVpnTraceroute(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestNetworkVpnTraceroute from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,14 +69,16 @@ class RealUserTestNetworkVpnTraceroute(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "destination", + "error", + "info_flags", + "internal_errors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "destination", - "error", - "info_flags", - "internal_errors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in hops (list) @@ -92,7 +91,7 @@ class RealUserTestNetworkVpnTraceroute(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestNetworkVpnTraceroute from a dict""" if obj is None: return None @@ -105,7 +104,7 @@ class RealUserTestNetworkVpnTraceroute(BaseModel): "error": obj.get("error"), "infoFlags": obj.get("infoFlags"), "internalErrors": obj.get("internalErrors"), - "hops": [TracerouteHop.from_dict(_item) for _item in obj.get("hops")] if obj.get("hops") is not None else None + "hops": [TracerouteHop.from_dict(_item) for _item in obj["hops"]] if obj.get("hops") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_page.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_page.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/real_user_test_page.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_page.py index 603c2435..8d03b0af 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_page.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.real_user_test_page_page_timings import RealUserTestPagePageTimings -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.real_user_test_page_page_timings import RealUserTestPagePageTimings +from typing import Optional, Set +from typing_extensions import Self class RealUserTestPage(BaseModel): """ @@ -39,10 +36,11 @@ class RealUserTestPage(BaseModel): page_timings: Optional[RealUserTestPagePageTimings] = Field(default=None, alias="pageTimings") __properties: ClassVar[List[str]] = ["pageId", "pageTitle", "pageUrl", "loadDate", "responseCode", "pageTimings"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ class RealUserTestPage(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestPage from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,15 +72,17 @@ class RealUserTestPage(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "page_id", + "page_title", + "page_url", + "load_date", + "response_code", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "page_id", - "page_title", - "page_url", - "load_date", - "response_code", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of page_timings @@ -91,7 +91,7 @@ class RealUserTestPage(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestPage from a dict""" if obj is None: return None @@ -105,7 +105,7 @@ class RealUserTestPage(BaseModel): "pageUrl": obj.get("pageUrl"), "loadDate": obj.get("loadDate"), "responseCode": obj.get("responseCode"), - "pageTimings": RealUserTestPagePageTimings.from_dict(obj.get("pageTimings")) if obj.get("pageTimings") is not None else None + "pageTimings": RealUserTestPagePageTimings.from_dict(obj["pageTimings"]) if obj.get("pageTimings") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_page_page_timings.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_page_page_timings.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/real_user_test_page_page_timings.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_page_page_timings.py index 8da842eb..f3a9db2e 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_page_page_timings.py +++ b/endpoint_test_results/endpoint_test_results/models/real_user_test_page_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RealUserTestPagePageTimings(BaseModel): """ @@ -34,10 +30,11 @@ class RealUserTestPagePageTimings(BaseModel): on_load: Optional[StrictInt] = Field(default=None, description="Page load time in milliseconds.", alias="onLoad") __properties: ClassVar[List[str]] = ["onContentLoad", "onLoad"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class RealUserTestPagePageTimings(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestPagePageTimings from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class RealUserTestPagePageTimings(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "on_content_load", + "on_load", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "on_content_load", - "on_load", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestPagePageTimings from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_page_result.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_page_result.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/real_user_test_page_result.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_page_result.py index d8d8ae38..6fcfec76 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_page_result.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.real_user_test_page_page_timings import RealUserTestPagePageTimings -from test_results_api.models.system_metrics import SystemMetrics -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.real_user_test_page_page_timings import RealUserTestPagePageTimings +from endpoint_test_results.models.system_metrics import SystemMetrics +from typing import Optional, Set +from typing_extensions import Self class RealUserTestPageResult(BaseModel): """ @@ -45,10 +42,11 @@ class RealUserTestPageResult(BaseModel): system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") __properties: ClassVar[List[str]] = ["pageId", "pageTitle", "pageUrl", "loadDate", "responseCode", "pageTimings", "agentId", "id", "roundId", "responseTime", "systemMetrics"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +59,7 @@ class RealUserTestPageResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestPageResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,19 +82,21 @@ class RealUserTestPageResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "page_id", + "page_title", + "page_url", + "load_date", + "response_code", + "agent_id", + "id", + "round_id", + "response_time", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "page_id", - "page_title", - "page_url", - "load_date", - "response_code", - "agent_id", - "id", - "round_id", - "response_time", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of page_timings @@ -108,7 +108,7 @@ class RealUserTestPageResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestPageResult from a dict""" if obj is None: return None @@ -122,12 +122,12 @@ class RealUserTestPageResult(BaseModel): "pageUrl": obj.get("pageUrl"), "loadDate": obj.get("loadDate"), "responseCode": obj.get("responseCode"), - "pageTimings": RealUserTestPagePageTimings.from_dict(obj.get("pageTimings")) if obj.get("pageTimings") is not None else None, + "pageTimings": RealUserTestPagePageTimings.from_dict(obj["pageTimings"]) if obj.get("pageTimings") is not None else None, "agentId": obj.get("agentId"), "id": obj.get("id"), "roundId": obj.get("roundId"), "responseTime": obj.get("responseTime"), - "systemMetrics": SystemMetrics.from_dict(obj.get("systemMetrics")) if obj.get("systemMetrics") is not None else None + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/real_user_test_page_results.py b/endpoint_test_results/endpoint_test_results/models/real_user_test_page_results.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/real_user_test_page_results.py rename to endpoint_test_results/endpoint_test_results/models/real_user_test_page_results.py index a0be53d4..5b34be6e 100644 --- a/endpoint/test_results_api/test_results_api/models/real_user_test_page_results.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.real_user_test_page_result import RealUserTestPageResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.real_user_test_page_result import RealUserTestPageResult +from typing import Optional, Set +from typing_extensions import Self class RealUserTestPageResults(BaseModel): """ @@ -33,10 +30,11 @@ class RealUserTestPageResults(BaseModel): results: Optional[List[RealUserTestPageResult]] = None __properties: ClassVar[List[str]] = ["results"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class RealUserTestPageResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RealUserTestPageResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class RealUserTestPageResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -79,7 +79,7 @@ class RealUserTestPageResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RealUserTestPageResults from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class RealUserTestPageResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [RealUserTestPageResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None + "results": [RealUserTestPageResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None }) return _obj diff --git a/endpoint_test_results/endpoint_test_results/models/self_links.py b/endpoint_test_results/endpoint_test_results/models/self_links.py new file mode 100644 index 00000000..34cb596c --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/self_links_links.py b/endpoint_test_results/endpoint_test_results/models/self_links_links.py new file mode 100644 index 00000000..729d8bcf --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/endpoint_test_results/endpoint_test_results/models/severity.py b/endpoint_test_results/endpoint_test_results/models/severity.py new file mode 100644 index 00000000..706eec9d --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/severity.py @@ -0,0 +1,40 @@ +# 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.2 + 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 Severity(str, Enum): + """ + The severity of the alert. + """ + + """ + allowed enum values + """ + INFO = 'info' + MAJOR = 'major' + MINOR = 'minor' + CRITICAL = 'critical' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Severity from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/sort_order.py b/endpoint_test_results/endpoint_test_results/models/sort_order.py new file mode 100644 index 00000000..b220fc10 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/sort_order.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.2 + 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 SortOrder(str, Enum): + """ + Parameter indicates the ascending/descending order of the sorting, using either the asc or desc values. + """ + + """ + allowed enum values + """ + ASC = 'asc' + DESC = 'desc' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SortOrder from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/models/system_metrics.py b/endpoint_test_results/endpoint_test_results/models/system_metrics.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/system_metrics.py rename to endpoint_test_results/endpoint_test_results/models/system_metrics.py index aed64107..fbd3bdbd 100644 --- a/endpoint/test_results_api/test_results_api/models/system_metrics.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from test_results_api.models.cpu_utilization import CpuUtilization -from test_results_api.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.cpu_utilization import CpuUtilization +from endpoint_test_results.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes +from typing import Optional, Set +from typing_extensions import Self class SystemMetrics(BaseModel): """ @@ -39,10 +35,11 @@ class SystemMetrics(BaseModel): physical_memory_total_bytes: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total physical memory of the system.", alias="physicalMemoryTotalBytes") __properties: ClassVar[List[str]] = ["startTimeMs", "endTimeMs", "cpuUtilization", "physicalMemoryUsedBytes", "physicalMemoryTotalBytes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class SystemMetrics(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SystemMetrics from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,13 +69,15 @@ class SystemMetrics(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "start_time_ms", + "end_time_ms", + "physical_memory_total_bytes", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "start_time_ms", - "end_time_ms", - "physical_memory_total_bytes", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of cpu_utilization @@ -90,7 +89,7 @@ class SystemMetrics(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SystemMetrics from a dict""" if obj is None: return None @@ -101,8 +100,8 @@ class SystemMetrics(BaseModel): _obj = cls.model_validate({ "startTimeMs": obj.get("startTimeMs"), "endTimeMs": obj.get("endTimeMs"), - "cpuUtilization": CpuUtilization.from_dict(obj.get("cpuUtilization")) if obj.get("cpuUtilization") is not None else None, - "physicalMemoryUsedBytes": PhysicalMemoryUsedBytes.from_dict(obj.get("physicalMemoryUsedBytes")) if obj.get("physicalMemoryUsedBytes") is not None else None, + "cpuUtilization": CpuUtilization.from_dict(obj["cpuUtilization"]) if obj.get("cpuUtilization") is not None else None, + "physicalMemoryUsedBytes": PhysicalMemoryUsedBytes.from_dict(obj["physicalMemoryUsedBytes"]) if obj.get("physicalMemoryUsedBytes") is not None else None, "physicalMemoryTotalBytes": obj.get("physicalMemoryTotalBytes") }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/tcp_connect.py b/endpoint_test_results/endpoint_test_results/models/tcp_connect.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/tcp_connect.py rename to endpoint_test_results/endpoint_test_results/models/tcp_connect.py index 3e45b34b..c12ab76e 100644 --- a/endpoint/test_results_api/test_results_api/models/tcp_connect.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TcpConnect(BaseModel): """ @@ -36,10 +32,11 @@ class TcpConnect(BaseModel): info_flags: Optional[List[StrictStr]] = Field(default=None, alias="infoFlags") __properties: ClassVar[List[str]] = ["rtt", "errorCode", "error", "infoFlags"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class TcpConnect(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TcpConnect from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,20 +67,22 @@ class TcpConnect(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "rtt", + "error_code", + "error", + "info_flags", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "rtt", - "error_code", - "error", - "info_flags", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TcpConnect from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/test_interval.py b/endpoint_test_results/endpoint_test_results/models/test_interval.py new file mode 100644 index 00000000..c247c40e --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/test_interval.py @@ -0,0 +1,42 @@ +# 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.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/test_labels_inner.py b/endpoint_test_results/endpoint_test_results/models/test_labels_inner.py new file mode 100644 index 00000000..4890dd62 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/test_labels_inner.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestLabelsInner(BaseModel): + """ + TestLabelsInner + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") + name: Optional[StrictStr] = Field(default=None, description="Name of the label.") + is_builtin: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestLabelsInner 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 TestLabelsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "name": obj.get("name"), + "isBuiltin": obj.get("isBuiltin") + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/test_probe_mode_response.py b/endpoint_test_results/endpoint_test_results/models/test_probe_mode_response.py new file mode 100644 index 00000000..47822979 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/test_probe_mode_response.py @@ -0,0 +1,39 @@ +# 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.2 + 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 TestProbeModeResponse(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to TCP. + """ + + """ + allowed enum values + """ + AUTO = 'auto' + SACK = 'sack' + SYN = 'syn' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProbeModeResponse from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_test_results/endpoint_test_results/models/test_result.py b/endpoint_test_results/endpoint_test_results/models/test_result.py new file mode 100644 index 00000000..d2bcd94e --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/test_result.py @@ -0,0 +1,117 @@ +# 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.2 + 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 endpoint_test_results.models.network_profile import NetworkProfile +from endpoint_test_results.models.system_metrics import SystemMetrics +from endpoint_test_results.models.vpn_profile import VpnProfile +from typing import Optional, Set +from typing_extensions import Self + +class TestResult(BaseModel): + """ + TestResult + """ # 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.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of endpoint agent, from `/endpoint/agents` endpoint.", alias="agentId") + round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of target server.", alias="serverIp") + network_profile: Optional[NetworkProfile] = Field(default=None, alias="networkProfile") + system_metrics: Optional[SystemMetrics] = Field(default=None, alias="systemMetrics") + vpn_profile: Optional[VpnProfile] = Field(default=None, alias="vpnProfile") + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "vpnProfile"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestResult 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([ + "agent_id", + "round_id", + "server_ip", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of network_profile + if self.network_profile: + _dict['networkProfile'] = self.network_profile.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_metrics + if self.system_metrics: + _dict['systemMetrics'] = self.system_metrics.to_dict() + # override the default output from pydantic by calling `to_dict()` of vpn_profile + if self.vpn_profile: + _dict['vpnProfile'] = self.vpn_profile.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestResult 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"), + "agentId": obj.get("agentId"), + "roundId": obj.get("roundId"), + "serverIp": obj.get("serverIp"), + "networkProfile": NetworkProfile.from_dict(obj["networkProfile"]) if obj.get("networkProfile") is not None else None, + "systemMetrics": SystemMetrics.from_dict(obj["systemMetrics"]) if obj.get("systemMetrics") is not None else None, + "vpnProfile": VpnProfile.from_dict(obj["vpnProfile"]) if obj.get("vpnProfile") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/test_ssl_version_id.py b/endpoint_test_results/endpoint_test_results/models/test_ssl_version_id.py new file mode 100644 index 00000000..6afc8fc1 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/test_ssl_version_id.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestSslVersionId(str, Enum): + """ + SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestSslVersionId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/models/tests_data_rounds_search.py b/endpoint_test_results/endpoint_test_results/models/tests_data_rounds_search.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/tests_data_rounds_search.py rename to endpoint_test_results/endpoint_test_results/models/tests_data_rounds_search.py index 41b6418f..e6ba0b53 100644 --- a/endpoint/test_results_api/test_results_api/models/tests_data_rounds_search.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.tests_data_search_filter import TestsDataSearchFilter -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.tests_data_search_filter import TestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters +from typing import Optional, Set +from typing_extensions import Self class TestsDataRoundsSearch(BaseModel): """ @@ -38,10 +34,11 @@ class TestsDataRoundsSearch(BaseModel): search_filters: Optional[TestsDataSearchFilter] = Field(default=None, alias="searchFilters") __properties: ClassVar[List[str]] = ["searchSort", "thresholdFilter", "searchFilters"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class TestsDataRoundsSearch(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestsDataRoundsSearch from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,10 +65,12 @@ class TestsDataRoundsSearch(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in search_sort (list) @@ -90,7 +89,7 @@ class TestsDataRoundsSearch(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestsDataRoundsSearch from a dict""" if obj is None: return None @@ -99,9 +98,9 @@ class TestsDataRoundsSearch(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "searchSort": [TestsDataSearchSort.from_dict(_item) for _item in obj.get("searchSort")] if obj.get("searchSort") is not None else None, - "thresholdFilter": TestsDataThresholdFilters.from_dict(obj.get("thresholdFilter")) if obj.get("thresholdFilter") is not None else None, - "searchFilters": TestsDataSearchFilter.from_dict(obj.get("searchFilters")) if obj.get("searchFilters") is not None else None + "searchSort": [TestsDataSearchSort.from_dict(_item) for _item in obj["searchSort"]] if obj.get("searchSort") is not None else None, + "thresholdFilter": TestsDataThresholdFilters.from_dict(obj["thresholdFilter"]) if obj.get("thresholdFilter") is not None else None, + "searchFilters": TestsDataSearchFilter.from_dict(obj["searchFilters"]) if obj.get("searchFilters") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/tests_data_search_filter.py b/endpoint_test_results/endpoint_test_results/models/tests_data_search_filter.py similarity index 79% rename from endpoint/test_results_api/test_results_api/models/tests_data_search_filter.py rename to endpoint_test_results/endpoint_test_results/models/tests_data_search_filter.py index c472e75d..451d0780 100644 --- a/endpoint/test_results_api/test_results_api/models/tests_data_search_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TestsDataSearchFilter(BaseModel): """ @@ -33,10 +29,11 @@ class TestsDataSearchFilter(BaseModel): agent_id: Optional[List[StrictStr]] = Field(default=None, description="Filter using the `agent-id`.", alias="agentId") __properties: ClassVar[List[str]] = ["agentId"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +46,7 @@ class TestsDataSearchFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestsDataSearchFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +60,18 @@ class TestsDataSearchFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestsDataSearchFilter from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/tests_data_search_sort.py b/endpoint_test_results/endpoint_test_results/models/tests_data_search_sort.py similarity index 75% rename from endpoint/test_results_api/test_results_api/models/tests_data_search_sort.py rename to endpoint_test_results/endpoint_test_results/models/tests_data_search_sort.py index e87be271..007dc6e5 100644 --- a/endpoint/test_results_api/test_results_api/models/tests_data_search_sort.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.sort_order import SortOrder -from test_results_api.models.tests_data_search_sort_key import TestsDataSearchSortKey -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.sort_order import SortOrder +from endpoint_test_results.models.tests_data_search_sort_key import TestsDataSearchSortKey +from typing import Optional, Set +from typing_extensions import Self class TestsDataSearchSort(BaseModel): """ @@ -35,10 +32,11 @@ class TestsDataSearchSort(BaseModel): order: Optional[SortOrder] = None __properties: ClassVar[List[str]] = ["sort", "order"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class TestsDataSearchSort(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestsDataSearchSort from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +63,18 @@ class TestsDataSearchSort(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestsDataSearchSort from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/tests_data_search_sort_key.py b/endpoint_test_results/endpoint_test_results/models/tests_data_search_sort_key.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/tests_data_search_sort_key.py rename to endpoint_test_results/endpoint_test_results/models/tests_data_search_sort_key.py index c38bbfde..bfbf5bee 100644 --- a/endpoint/test_results_api/test_results_api/models/tests_data_search_sort_key.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class TestsDataSearchSortKey(str, Enum): diff --git a/endpoint/test_results_api/test_results_api/models/tests_data_threshold_filter.py b/endpoint_test_results/endpoint_test_results/models/tests_data_threshold_filter.py similarity index 76% rename from endpoint/test_results_api/test_results_api/models/tests_data_threshold_filter.py rename to endpoint_test_results/endpoint_test_results/models/tests_data_threshold_filter.py index bfda69b5..f325455c 100644 --- a/endpoint/test_results_api/test_results_api/models/tests_data_threshold_filter.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from test_results_api.models.threshold_filter_name import ThresholdFilterName -from test_results_api.models.threshold_filter_operator import ThresholdFilterOperator -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.threshold_filter_name import ThresholdFilterName +from endpoint_test_results.models.threshold_filter_operator import ThresholdFilterOperator +from typing import Optional, Set +from typing_extensions import Self class TestsDataThresholdFilter(BaseModel): """ @@ -37,10 +33,11 @@ class TestsDataThresholdFilter(BaseModel): operator: Optional[ThresholdFilterOperator] = None __properties: ClassVar[List[str]] = ["name", "value", "operator"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class TestsDataThresholdFilter(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestsDataThresholdFilter from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ class TestsDataThresholdFilter(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestsDataThresholdFilter from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/tests_data_threshold_filters.py b/endpoint_test_results/endpoint_test_results/models/tests_data_threshold_filters.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/tests_data_threshold_filters.py rename to endpoint_test_results/endpoint_test_results/models/tests_data_threshold_filters.py index 6f1600ec..257d12d3 100644 --- a/endpoint/test_results_api/test_results_api/models/tests_data_threshold_filters.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.conditional_operator import ConditionalOperator -from test_results_api.models.tests_data_threshold_filter import TestsDataThresholdFilter -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.conditional_operator import ConditionalOperator +from endpoint_test_results.models.tests_data_threshold_filter import TestsDataThresholdFilter +from typing import Optional, Set +from typing_extensions import Self class TestsDataThresholdFilters(BaseModel): """ @@ -36,10 +32,11 @@ class TestsDataThresholdFilters(BaseModel): conditional_operator: Optional[ConditionalOperator] = Field(default=None, alias="conditionalOperator") __properties: ClassVar[List[str]] = ["filters", "conditionalOperator"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ class TestsDataThresholdFilters(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestsDataThresholdFilters from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ class TestsDataThresholdFilters(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in filters (list) @@ -82,7 +81,7 @@ class TestsDataThresholdFilters(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestsDataThresholdFilters from a dict""" if obj is None: return None @@ -91,7 +90,7 @@ class TestsDataThresholdFilters(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "filters": [TestsDataThresholdFilter.from_dict(_item) for _item in obj.get("filters")] if obj.get("filters") is not None else None, + "filters": [TestsDataThresholdFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, "conditionalOperator": obj.get("conditionalOperator") }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/threshold_filter_name.py b/endpoint_test_results/endpoint_test_results/models/threshold_filter_name.py similarity index 81% rename from endpoint/test_results_api/test_results_api/models/threshold_filter_name.py rename to endpoint_test_results/endpoint_test_results/models/threshold_filter_name.py index 53e71780..948d62ff 100644 --- a/endpoint/test_results_api/test_results_api/models/threshold_filter_name.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class ThresholdFilterName(str, Enum): diff --git a/endpoint_test_results/endpoint_test_results/models/threshold_filter_operator.py b/endpoint_test_results/endpoint_test_results/models/threshold_filter_operator.py new file mode 100644 index 00000000..1dd5d834 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/threshold_filter_operator.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.2 + 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 ThresholdFilterOperator(str, Enum): + """ + ThresholdFilterOperator + """ + + """ + allowed enum values + """ + GTE = 'gte' + LTE = 'lte' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ThresholdFilterOperator from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/models/traceroute.py b/endpoint_test_results/endpoint_test_results/models/traceroute.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/traceroute.py rename to endpoint_test_results/endpoint_test_results/models/traceroute.py index 4db0699c..dba64129 100644 --- a/endpoint/test_results_api/test_results_api/models/traceroute.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.traceroute_hop import TracerouteHop -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.traceroute_hop import TracerouteHop +from typing import Optional, Set +from typing_extensions import Self class Traceroute(BaseModel): """ @@ -38,10 +34,11 @@ class Traceroute(BaseModel): hops: Optional[List[TracerouteHop]] = None __properties: ClassVar[List[str]] = ["destination", "error", "infoFlags", "internalErrors", "hops"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class Traceroute(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Traceroute from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,14 +69,16 @@ class Traceroute(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "destination", + "error", + "info_flags", + "internal_errors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "destination", - "error", - "info_flags", - "internal_errors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in hops (list) @@ -92,7 +91,7 @@ class Traceroute(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Traceroute from a dict""" if obj is None: return None @@ -105,7 +104,7 @@ class Traceroute(BaseModel): "error": obj.get("error"), "infoFlags": obj.get("infoFlags"), "internalErrors": obj.get("internalErrors"), - "hops": [TracerouteHop.from_dict(_item) for _item in obj.get("hops")] if obj.get("hops") is not None else None + "hops": [TracerouteHop.from_dict(_item) for _item in obj["hops"]] if obj.get("hops") is not None else None }) return _obj diff --git a/endpoint/test_results_api/test_results_api/models/traceroute_hop.py b/endpoint_test_results/endpoint_test_results/models/traceroute_hop.py similarity index 82% rename from endpoint/test_results_api/test_results_api/models/traceroute_hop.py rename to endpoint_test_results/endpoint_test_results/models/traceroute_hop.py index a0fd7f48..61cc52cb 100644 --- a/endpoint/test_results_api/test_results_api/models/traceroute_hop.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TracerouteHop(BaseModel): """ @@ -39,10 +35,11 @@ class TracerouteHop(BaseModel): name: Optional[StrictStr] = Field(default=None, description="The hop name.") __properties: ClassVar[List[str]] = ["hop", "ipAddress", "prefix", "asn", "delay", "mpls", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ class TracerouteHop(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TracerouteHop from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,23 +73,25 @@ class TracerouteHop(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "hop", + "ip_address", + "prefix", + "asn", + "delay", + "mpls", + "name", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "hop", - "ip_address", - "prefix", - "asn", - "delay", - "mpls", - "name", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TracerouteHop from a dict""" if obj is None: return None diff --git a/endpoint/test_results_api/test_results_api/models/trigger.py b/endpoint_test_results/endpoint_test_results/models/trigger.py similarity index 77% rename from endpoint/test_results_api/test_results_api/models/trigger.py rename to endpoint_test_results/endpoint_test_results/models/trigger.py index c7d5a6c5..85c4bc62 100644 --- a/endpoint/test_results_api/test_results_api/models/trigger.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class Trigger(str, Enum): diff --git a/endpoint_test_results/endpoint_test_results/models/unauthorized_error.py b/endpoint_test_results/endpoint_test_results/models/unauthorized_error.py new file mode 100644 index 00000000..afb97b28 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_test_results/endpoint_test_results/models/validation_error.py b/endpoint_test_results/endpoint_test_results/models/validation_error.py new file mode 100644 index 00000000..3591deaa --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 endpoint_test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/endpoint_test_results/endpoint_test_results/models/validation_error_all_of_errors.py b/endpoint_test_results/endpoint_test_results/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..dcc50401 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/endpoint/test_results_api/test_results_api/models/vpn_profile.py b/endpoint_test_results/endpoint_test_results/models/vpn_profile.py similarity index 80% rename from endpoint/test_results_api/test_results_api/models/vpn_profile.py rename to endpoint_test_results/endpoint_test_results/models/vpn_profile.py index c8819d91..1f5fdee7 100644 --- a/endpoint/test_results_api/test_results_api/models/vpn_profile.py +++ b/endpoint_test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.vpn_type import VpnType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_test_results.models.vpn_type import VpnType +from typing import Optional, Set +from typing_extensions import Self class VpnProfile(BaseModel): """ @@ -37,10 +33,11 @@ class VpnProfile(BaseModel): vpn_type: Optional[VpnType] = Field(default=None, alias="vpnType") __properties: ClassVar[List[str]] = ["vpnClientAddresses", "vpnClientNetworkRange", "vpnGatewayAddress", "vpnType"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class VpnProfile(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of VpnProfile from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,19 +67,21 @@ class VpnProfile(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "vpn_client_addresses", + "vpn_client_network_range", + "vpn_gateway_address", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "vpn_client_addresses", - "vpn_client_network_range", - "vpn_gateway_address", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of VpnProfile from a dict""" if obj is None: return None diff --git a/endpoint_test_results/endpoint_test_results/models/vpn_type.py b/endpoint_test_results/endpoint_test_results/models/vpn_type.py new file mode 100644 index 00000000..c7e67f67 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/models/vpn_type.py @@ -0,0 +1,40 @@ +# 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.2 + 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 VpnType(str, Enum): + """ + Name of the VPN provider. + """ + + """ + allowed enum values + """ + CISCO_MINUS_ANYCONNECT = 'cisco-anyconnect' + PALO_MINUS_ALTO_MINUS_GLOBALPROTECT = 'palo-alto-globalprotect' + IVANTI_MINUS_CONNECT_MINUS_SECURE = 'ivanti-connect-secure' + ZSCALER_MINUS_INTERNET_MINUS_ACCESS = 'zscaler-internet-access' + F5_MINUS_BIG_MINUS_IP = 'f5-big-ip' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of VpnType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/test_results_api/test_results_api/py.typed b/endpoint_test_results/endpoint_test_results/py.typed similarity index 100% rename from endpoint/test_results_api/test_results_api/py.typed rename to endpoint_test_results/endpoint_test_results/py.typed diff --git a/endpoint_test_results/endpoint_test_results/rest.py b/endpoint_test_results/endpoint_test_results/rest.py new file mode 100644 index 00000000..93390a54 --- /dev/null +++ b/endpoint_test_results/endpoint_test_results/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from endpoint_test_results.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/endpoint_test_results/pyproject.toml b/endpoint_test_results/pyproject.toml new file mode 100644 index 00000000..ae2ba198 --- /dev/null +++ b/endpoint_test_results/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "endpoint_test_results" +version = "1.0.0" +description = "Endpoint Test Results API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Test Results API"] +include = ["endpoint_test_results/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "endpoint_test_results", + #"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/endpoint/test_results_api/requirements.txt b/endpoint_test_results/requirements.txt similarity index 100% rename from endpoint/test_results_api/requirements.txt rename to endpoint_test_results/requirements.txt diff --git a/endpoint/test_results_api/setup.cfg b/endpoint_test_results/setup.cfg similarity index 100% rename from endpoint/test_results_api/setup.cfg rename to endpoint_test_results/setup.cfg diff --git a/endpoint_test_results/setup.py b/endpoint_test_results/setup.py new file mode 100644 index 00000000..6737e1b6 --- /dev/null +++ b/endpoint_test_results/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "endpoint-test-results" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Endpoint Test Results API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/endpoint_test_results", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Endpoint Test Results API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + Retrieve results for scheduled and dynamic tests on endpoint agents. + """, # noqa: E501 + package_data={"endpoint_test_results": ["py.typed"]}, +) diff --git a/endpoint_test_results/test-requirements.txt b/endpoint_test_results/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/endpoint_test_results/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/endpoint/test_results_api/test/__init__.py b/endpoint_test_results/test/__init__.py similarity index 100% rename from endpoint/test_results_api/test/__init__.py rename to endpoint_test_results/test/__init__.py diff --git a/endpoint_test_results/test/test_account_group_id.py b/endpoint_test_results/test/test_account_group_id.py new file mode 100644 index 00000000..353b023b --- /dev/null +++ b/endpoint_test_results/test/test_account_group_id.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.account_group_id import AccountGroupId + +class TestAccountGroupId(unittest.TestCase): + """AccountGroupId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupId: + """Test AccountGroupId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupId` + """ + model = AccountGroupId() + if include_optional: + return AccountGroupId( + aid = '1234' + ) + else: + return AccountGroupId( + ) + """ + + def testAccountGroupId(self): + """Test AccountGroupId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_alert_direction.py b/endpoint_test_results/test/test_alert_direction.py new file mode 100644 index 00000000..a913aff8 --- /dev/null +++ b/endpoint_test_results/test/test_alert_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.alert_direction import AlertDirection + +class TestAlertDirection(unittest.TestCase): + """AlertDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertDirection(self): + """Test AlertDirection""" + # inst = AlertDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_alert_rounds_violation_mode.py b/endpoint_test_results/test/test_alert_rounds_violation_mode.py new file mode 100644 index 00000000..50380e90 --- /dev/null +++ b/endpoint_test_results/test/test_alert_rounds_violation_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.alert_rounds_violation_mode import AlertRoundsViolationMode + +class TestAlertRoundsViolationMode(unittest.TestCase): + """AlertRoundsViolationMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertRoundsViolationMode(self): + """Test AlertRoundsViolationMode""" + # inst = AlertRoundsViolationMode() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_alert_rule.py b/endpoint_test_results/test/test_alert_rule.py new file mode 100644 index 00000000..fbdc7352 --- /dev/null +++ b/endpoint_test_results/test/test_alert_rule.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.alert_rule import AlertRule + +class TestAlertRule(unittest.TestCase): + """AlertRule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertRule: + """Test AlertRule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertRule` + """ + model = AlertRule() + if include_optional: + return AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major' + ) + else: + return AlertRule( + ) + """ + + def testAlertRule(self): + """Test AlertRule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_alert_type.py b/endpoint_test_results/test/test_alert_type.py new file mode 100644 index 00000000..09982da7 --- /dev/null +++ b/endpoint_test_results/test/test_alert_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.alert_type import AlertType + +class TestAlertType(unittest.TestCase): + """AlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertType(self): + """Test AlertType""" + # inst = AlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_application_score_quality.py b/endpoint_test_results/test/test_application_score_quality.py similarity index 80% rename from endpoint/test_results_api/test/test_application_score_quality.py rename to endpoint_test_results/test/test_application_score_quality.py index e2914a2f..c190bb22 100644 --- a/endpoint/test_results_api/test/test_application_score_quality.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.application_score_quality import ApplicationScoreQuality +from endpoint_test_results.models.application_score_quality import ApplicationScoreQuality class TestApplicationScoreQuality(unittest.TestCase): """ApplicationScoreQuality unit test stubs""" diff --git a/endpoint/test_results_api/test/test_asn_details.py b/endpoint_test_results/test/test_asn_details.py similarity index 91% rename from endpoint/test_results_api/test/test_asn_details.py rename to endpoint_test_results/test/test_asn_details.py index 3c57ecce..35612b2b 100644 --- a/endpoint/test_results_api/test/test_asn_details.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.asn_details import AsnDetails +from endpoint_test_results.models.asn_details import AsnDetails class TestAsnDetails(unittest.TestCase): """AsnDetails unit test stubs""" diff --git a/endpoint_test_results/test/test_conditional_operator.py b/endpoint_test_results/test/test_conditional_operator.py new file mode 100644 index 00000000..b67e39c3 --- /dev/null +++ b/endpoint_test_results/test/test_conditional_operator.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.conditional_operator import ConditionalOperator + +class TestConditionalOperator(unittest.TestCase): + """ConditionalOperator unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testConditionalOperator(self): + """Test ConditionalOperator""" + # inst = ConditionalOperator() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_cpu_utilization.py b/endpoint_test_results/test/test_cpu_utilization.py similarity index 91% rename from endpoint/test_results_api/test/test_cpu_utilization.py rename to endpoint_test_results/test/test_cpu_utilization.py index e573ad8d..d2b69f5c 100644 --- a/endpoint/test_results_api/test/test_cpu_utilization.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.cpu_utilization import CpuUtilization +from endpoint_test_results.models.cpu_utilization import CpuUtilization class TestCpuUtilization(unittest.TestCase): """CpuUtilization unit test stubs""" diff --git a/endpoint/test_results_api/test/test_dynamic_base_test_result.py b/endpoint_test_results/test/test_dynamic_base_test_result.py similarity index 75% rename from endpoint/test_results_api/test/test_dynamic_base_test_result.py rename to endpoint_test_results/test/test_dynamic_base_test_result.py index df2705dd..e6d52c7d 100644 --- a/endpoint/test_results_api/test/test_dynamic_base_test_result.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dynamic_base_test_result import DynamicBaseTestResult +from endpoint_test_results.models.dynamic_base_test_result import DynamicBaseTestResult class TestDynamicBaseTestResult(unittest.TestCase): """DynamicBaseTestResult unit test stubs""" @@ -37,9 +36,11 @@ class TestDynamicBaseTestResult(unittest.TestCase): if include_optional: return DynamicBaseTestResult( application = 'webex', - webex = test_results_api.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( + webex = endpoint_test_results.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( conference_id = '225817074608419375', - correlation_id = '22581707460321454', ) + correlation_id = '22581707460321454', + local_sip_session_id = '22581707460321454', + remote_sip_session_id = '22581707460321454', ) ) else: return DynamicBaseTestResult( diff --git a/endpoint/test_results_api/test/test_dynamic_base_test_result_webex.py b/endpoint_test_results/test/test_dynamic_base_test_result_webex.py similarity index 81% rename from endpoint/test_results_api/test/test_dynamic_base_test_result_webex.py rename to endpoint_test_results/test/test_dynamic_base_test_result_webex.py index 783118f1..29a7e8eb 100644 --- a/endpoint/test_results_api/test/test_dynamic_base_test_result_webex.py +++ b/endpoint_test_results/test/test_dynamic_base_test_result_webex.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex +from endpoint_test_results.models.dynamic_base_test_result_webex import DynamicBaseTestResultWebex class TestDynamicBaseTestResultWebex(unittest.TestCase): """DynamicBaseTestResultWebex unit test stubs""" @@ -37,7 +36,9 @@ class TestDynamicBaseTestResultWebex(unittest.TestCase): if include_optional: return DynamicBaseTestResultWebex( conference_id = '225817074608419375', - correlation_id = '22581707460321454' + correlation_id = '22581707460321454', + local_sip_session_id = '22581707460321454', + remote_sip_session_id = '22581707460321454' ) else: return DynamicBaseTestResultWebex( diff --git a/endpoint_test_results/test/test_dynamic_test.py b/endpoint_test_results/test/test_dynamic_test.py new file mode 100644 index 00000000..2e2d7892 --- /dev/null +++ b/endpoint_test_results/test/test_dynamic_test.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.dynamic_test import DynamicTest + +class TestDynamicTest(unittest.TestCase): + """DynamicTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTest: + """Test DynamicTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTest` + """ + model = DynamicTest() + if include_optional: + return DynamicTest( + aid = '1234', + links = endpoint_test_results.models.dynamic_test_links.DynamicTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_test_results.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + application = 'webex', + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + has_path_trace_in_session = True, + has_ping = True, + has_traceroute = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + protocol = 'icmp', + tcp_probe_mode = 'auto', + test_id = '281474976710706', + test_name = 'Test name', + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return DynamicTest( + ) + """ + + def testDynamicTest(self): + """Test DynamicTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_dynamic_test_links.py b/endpoint_test_results/test/test_dynamic_test_links.py new file mode 100644 index 00000000..9ba92b0d --- /dev/null +++ b/endpoint_test_results/test/test_dynamic_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.dynamic_test_links import DynamicTestLinks + +class TestDynamicTestLinks(unittest.TestCase): + """DynamicTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTestLinks: + """Test DynamicTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTestLinks` + """ + model = DynamicTestLinks() + if include_optional: + return DynamicTestLinks( + var_self = None, + test_results = [{"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"}] + ) + else: + return DynamicTestLinks( + ) + """ + + def testDynamicTestLinks(self): + """Test DynamicTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_dynamic_test_links_self.py b/endpoint_test_results/test/test_dynamic_test_links_self.py new file mode 100644 index 00000000..8fd1dbef --- /dev/null +++ b/endpoint_test_results/test/test_dynamic_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.dynamic_test_links_self import DynamicTestLinksSelf + +class TestDynamicTestLinksSelf(unittest.TestCase): + """DynamicTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTestLinksSelf: + """Test DynamicTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTestLinksSelf` + """ + model = DynamicTestLinksSelf() + if include_optional: + return DynamicTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return DynamicTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testDynamicTestLinksSelf(self): + """Test DynamicTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_dynamic_tests_data_round_search.py b/endpoint_test_results/test/test_dynamic_tests_data_round_search.py similarity index 77% rename from endpoint/test_results_api/test/test_dynamic_tests_data_round_search.py rename to endpoint_test_results/test/test_dynamic_tests_data_round_search.py index 38351854..92ab0d76 100644 --- a/endpoint/test_results_api/test/test_dynamic_tests_data_round_search.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch +from endpoint_test_results.models.dynamic_tests_data_round_search import DynamicTestsDataRoundSearch class TestDynamicTestsDataRoundSearch(unittest.TestCase): """DynamicTestsDataRoundSearch unit test stubs""" @@ -37,19 +36,19 @@ class TestDynamicTestsDataRoundSearch(unittest.TestCase): if include_optional: return DynamicTestsDataRoundSearch( search_sort = [ - test_results_api.models.tests_data_search_sort.TestsDataSearchSort( + endpoint_test_results.models.tests_data_search_sort.TestsDataSearchSort( sort = 'round-id', order = 'desc', ) ], - threshold_filter = test_results_api.models.tests_data_threshold_filters.TestsDataThresholdFilters( + threshold_filter = endpoint_test_results.models.tests_data_threshold_filters.TestsDataThresholdFilters( filters = [ - test_results_api.models.tests_data_threshold_filter.TestsDataThresholdFilter( + endpoint_test_results.models.tests_data_threshold_filter.TestsDataThresholdFilter( name = 'loss', value = 1.337, operator = 'gte', ) ], conditional_operator = 'and', ), - search_filters = test_results_api.models.dynamic_tests_data_search_filter.DynamicTestsDataSearchFilter( + search_filters = endpoint_test_results.models.dynamic_tests_data_search_filter.DynamicTestsDataSearchFilter( agent_id = [ '52455b09-ff1b-4849-8194-99026cc890e0' ], diff --git a/endpoint/test_results_api/test/test_dynamic_tests_data_search_filter.py b/endpoint_test_results/test/test_dynamic_tests_data_search_filter.py similarity index 90% rename from endpoint/test_results_api/test/test_dynamic_tests_data_search_filter.py rename to endpoint_test_results/test/test_dynamic_tests_data_search_filter.py index 33629210..7ff43569 100644 --- a/endpoint/test_results_api/test/test_dynamic_tests_data_search_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter +from endpoint_test_results.models.dynamic_tests_data_search_filter import DynamicTestsDataSearchFilter class TestDynamicTestsDataSearchFilter(unittest.TestCase): """DynamicTestsDataSearchFilter unit test stubs""" diff --git a/endpoint_test_results/test/test_endpoint_agent_labels_selector_config.py b/endpoint_test_results/test/test_endpoint_agent_labels_selector_config.py new file mode 100644 index 00000000..73ac35b2 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_agent_labels_selector_config.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig + +class TestEndpointAgentLabelsSelectorConfig(unittest.TestCase): + """EndpointAgentLabelsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentLabelsSelectorConfig: + """Test EndpointAgentLabelsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentLabelsSelectorConfig` + """ + model = EndpointAgentLabelsSelectorConfig() + if include_optional: + return EndpointAgentLabelsSelectorConfig( + agent_selector_type = 'agent-labels', + max_machines = 10, + endpoint_agent_labels = ["567","214"] + ) + else: + return EndpointAgentLabelsSelectorConfig( + agent_selector_type = 'agent-labels', + ) + """ + + def testEndpointAgentLabelsSelectorConfig(self): + """Test EndpointAgentLabelsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_agent_selector_config.py b/endpoint_test_results/test/test_endpoint_agent_selector_config.py new file mode 100644 index 00000000..71678908 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_agent_selector_config.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig + +class TestEndpointAgentSelectorConfig(unittest.TestCase): + """EndpointAgentSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentSelectorConfig: + """Test EndpointAgentSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentSelectorConfig` + """ + model = EndpointAgentSelectorConfig() + if include_optional: + return EndpointAgentSelectorConfig( + agent_selector_type = 'specific-agents', + max_machines = 10, + endpoint_agent_labels = [567, 214], + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c] + ) + else: + return EndpointAgentSelectorConfig( + agent_selector_type = 'specific-agents', + ) + """ + + def testEndpointAgentSelectorConfig(self): + """Test EndpointAgentSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_agent_to_server_test.py b/endpoint_test_results/test/test_endpoint_agent_to_server_test.py new file mode 100644 index 00000000..ae40bb6a --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_agent_to_server_test.py @@ -0,0 +1,88 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_agent_to_server_test import EndpointAgentToServerTest + +class TestEndpointAgentToServerTest(unittest.TestCase): + """EndpointAgentToServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentToServerTest: + """Test EndpointAgentToServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentToServerTest` + """ + model = EndpointAgentToServerTest() + if include_optional: + return EndpointAgentToServerTest( + aid = '1234', + links = endpoint_test_results.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_test_results.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'agent-to-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_test_results.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return EndpointAgentToServerTest( + type = 'agent-to-server', + ) + """ + + def testEndpointAgentToServerTest(self): + """Test EndpointAgentToServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_all_agents_selector_config.py b/endpoint_test_results/test/test_endpoint_all_agents_selector_config.py new file mode 100644 index 00000000..a4a264d4 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_all_agents_selector_config.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig + +class TestEndpointAllAgentsSelectorConfig(unittest.TestCase): + """EndpointAllAgentsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAllAgentsSelectorConfig: + """Test EndpointAllAgentsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAllAgentsSelectorConfig` + """ + model = EndpointAllAgentsSelectorConfig() + if include_optional: + return EndpointAllAgentsSelectorConfig( + agent_selector_type = 'all-agents', + max_machines = 10 + ) + else: + return EndpointAllAgentsSelectorConfig( + agent_selector_type = 'all-agents', + ) + """ + + def testEndpointAllAgentsSelectorConfig(self): + """Test EndpointAllAgentsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_browser.py b/endpoint_test_results/test/test_endpoint_browser.py similarity index 90% rename from endpoint/test_results_api/test/test_endpoint_browser.py rename to endpoint_test_results/test/test_endpoint_browser.py index c590a455..22dcb1e4 100644 --- a/endpoint/test_results_api/test/test_endpoint_browser.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_browser import EndpointBrowser +from endpoint_test_results.models.endpoint_browser import EndpointBrowser class TestEndpointBrowser(unittest.TestCase): """EndpointBrowser unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_http_data_point_score.py b/endpoint_test_results/test/test_endpoint_http_data_point_score.py similarity index 90% rename from endpoint/test_results_api/test/test_endpoint_http_data_point_score.py rename to endpoint_test_results/test/test_endpoint_http_data_point_score.py index 03bfb0d7..eadaf350 100644 --- a/endpoint/test_results_api/test/test_endpoint_http_data_point_score.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_http_data_point_score import EndpointHttpDataPointScore +from endpoint_test_results.models.endpoint_http_data_point_score import EndpointHttpDataPointScore class TestEndpointHttpDataPointScore(unittest.TestCase): """EndpointHttpDataPointScore unit test stubs""" diff --git a/endpoint_test_results/test/test_endpoint_http_server_base_test.py b/endpoint_test_results/test/test_endpoint_http_server_base_test.py new file mode 100644 index 00000000..9d312431 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_http_server_base_test.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest + +class TestEndpointHttpServerBaseTest(unittest.TestCase): + """EndpointHttpServerBaseTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerBaseTest: + """Test EndpointHttpServerBaseTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerBaseTest` + """ + model = EndpointHttpServerBaseTest() + if include_optional: + return EndpointHttpServerBaseTest( + auth_type = 'none', + has_path_trace_in_session = True, + http_time_limit = 5000, + protocol = 'icmp', + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + tcp_probe_mode = 'auto', + verify_certificate = False + ) + else: + return EndpointHttpServerBaseTest( + ) + """ + + def testEndpointHttpServerBaseTest(self): + """Test EndpointHttpServerBaseTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_http_server_test.py b/endpoint_test_results/test/test_endpoint_http_server_test.py new file mode 100644 index 00000000..f2958dbf --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_http_server_test.py @@ -0,0 +1,102 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest + +class TestEndpointHttpServerTest(unittest.TestCase): + """EndpointHttpServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerTest: + """Test EndpointHttpServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerTest` + """ + model = EndpointHttpServerTest() + if include_optional: + return EndpointHttpServerTest( + aid = '1234', + links = endpoint_test_results.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_test_results.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'http-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_test_results.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + auth_type = 'none', + http_time_limit = 5000, + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + verify_certificate = False, + content_regex = '(regex)+', + follow_redirects = True, + http_target_time = 100, + http_version = 1, + post_body = 'body', + ssl_version = 'Auto', + use_ntlm = False, + user_agent = 'curl', + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return EndpointHttpServerTest( + type = 'http-server', + ) + """ + + def testEndpointHttpServerTest(self): + """Test EndpointHttpServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_endpoint_network_topology_result_request_filter.py b/endpoint_test_results/test/test_endpoint_network_topology_result_request_filter.py similarity index 92% rename from endpoint/test_results_api/test/test_endpoint_network_topology_result_request_filter.py rename to endpoint_test_results/test/test_endpoint_network_topology_result_request_filter.py index 2fb39291..927f601b 100644 --- a/endpoint/test_results_api/test/test_endpoint_network_topology_result_request_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter +from endpoint_test_results.models.endpoint_network_topology_result_request_filter import EndpointNetworkTopologyResultRequestFilter class TestEndpointNetworkTopologyResultRequestFilter(unittest.TestCase): """EndpointNetworkTopologyResultRequestFilter unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_ping_data_point_score.py b/endpoint_test_results/test/test_endpoint_ping_data_point_score.py similarity index 90% rename from endpoint/test_results_api/test/test_endpoint_ping_data_point_score.py rename to endpoint_test_results/test/test_endpoint_ping_data_point_score.py index 04f246c9..9137b5b9 100644 --- a/endpoint/test_results_api/test/test_endpoint_ping_data_point_score.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_ping_data_point_score import EndpointPingDataPointScore +from endpoint_test_results.models.endpoint_ping_data_point_score import EndpointPingDataPointScore class TestEndpointPingDataPointScore(unittest.TestCase): """EndpointPingDataPointScore unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_real_user_test.py b/endpoint_test_results/test/test_endpoint_real_user_test.py similarity index 92% rename from endpoint/test_results_api/test/test_endpoint_real_user_test.py rename to endpoint_test_results/test/test_endpoint_real_user_test.py index cd0c3d94..c0929cdb 100644 --- a/endpoint/test_results_api/test/test_endpoint_real_user_test.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_real_user_test import EndpointRealUserTest +from endpoint_test_results.models.endpoint_real_user_test import EndpointRealUserTest class TestEndpointRealUserTest(unittest.TestCase): """EndpointRealUserTest unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_real_user_test_base.py b/endpoint_test_results/test/test_endpoint_real_user_test_base.py similarity index 92% rename from endpoint/test_results_api/test/test_endpoint_real_user_test_base.py rename to endpoint_test_results/test/test_endpoint_real_user_test_base.py index 7b599221..d1895393 100644 --- a/endpoint/test_results_api/test/test_endpoint_real_user_test_base.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_real_user_test_base import EndpointRealUserTestBase +from endpoint_test_results.models.endpoint_real_user_test_base import EndpointRealUserTestBase class TestEndpointRealUserTestBase(unittest.TestCase): """EndpointRealUserTestBase unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_real_user_test_detail.py b/endpoint_test_results/test/test_endpoint_real_user_test_detail.py similarity index 78% rename from endpoint/test_results_api/test/test_endpoint_real_user_test_detail.py rename to endpoint_test_results/test/test_endpoint_real_user_test_detail.py index 830a878a..a47cb7a6 100644 --- a/endpoint/test_results_api/test/test_endpoint_real_user_test_detail.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail +from endpoint_test_results.models.endpoint_real_user_test_detail import EndpointRealUserTestDetail class TestEndpointRealUserTestDetail(unittest.TestCase): """EndpointRealUserTestDetail unit test stubs""" @@ -48,37 +47,37 @@ class TestEndpointRealUserTestDetail(unittest.TestCase): source_address = '84.255.241.1', id = '07625:1490529480:aVDViw0i', visited_site = 'www.thousandeyes.com', - browser = test_results_api.models.endpoint_browser.EndpointBrowser( + browser = endpoint_test_results.models.endpoint_browser.EndpointBrowser( name = 'Google Chrome', version = '116.0.0.0', ), - coordinates = test_results_api.models.real_user_test_coordinates.RealUserTestCoordinates( + coordinates = endpoint_test_results.models.real_user_test_coordinates.RealUserTestCoordinates( latitude = 46.0552778, location = 'Slovenia', longitude = 14.5144444, ), pages = [ - test_results_api.models.real_user_test_page.RealUserTestPage( + endpoint_test_results.models.real_user_test_page.RealUserTestPage( page_id = 'C31gBrYJ', page_title = 'Network Performance Resources | ThousandEyes', page_url = 'https://app.thousandeyes.com/settings/integrations', load_date = '2022-07-17T22:00:54Z', response_code = 200, - page_timings = test_results_api.models.real_user_test_page_page_timings.RealUserTestPage_pageTimings( + page_timings = endpoint_test_results.models.real_user_test_page_page_timings.RealUserTestPage_pageTimings( on_content_load = 1483, on_load = 4569, ), ) ], - network = test_results_api.models.real_user_test_network.RealUserTestNetwork( + network = endpoint_test_results.models.real_user_test_network.RealUserTestNetwork( network_profile = null, - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_endpoint_real_user_test_detail_results.py b/endpoint_test_results/test/test_endpoint_real_user_test_detail_results.py similarity index 89% rename from endpoint/test_results_api/test/test_endpoint_real_user_test_detail_results.py rename to endpoint_test_results/test/test_endpoint_real_user_test_detail_results.py index 33b597b4..4991d7e4 100644 --- a/endpoint/test_results_api/test/test_endpoint_real_user_test_detail_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults +from endpoint_test_results.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults class TestEndpointRealUserTestDetailResults(unittest.TestCase): """EndpointRealUserTestDetailResults unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_real_user_test_result_request_filter.py b/endpoint_test_results/test/test_endpoint_real_user_test_result_request_filter.py similarity index 92% rename from endpoint/test_results_api/test/test_endpoint_real_user_test_result_request_filter.py rename to endpoint_test_results/test/test_endpoint_real_user_test_result_request_filter.py index c9310f12..82926711 100644 --- a/endpoint/test_results_api/test/test_endpoint_real_user_test_result_request_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter +from endpoint_test_results.models.endpoint_real_user_test_result_request_filter import EndpointRealUserTestResultRequestFilter class TestEndpointRealUserTestResultRequestFilter(unittest.TestCase): """EndpointRealUserTestResultRequestFilter unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_real_user_test_results.py b/endpoint_test_results/test/test_endpoint_real_user_test_results.py similarity index 89% rename from endpoint/test_results_api/test/test_endpoint_real_user_test_results.py rename to endpoint_test_results/test/test_endpoint_real_user_test_results.py index 3a16480b..55a26add 100644 --- a/endpoint/test_results_api/test/test_endpoint_real_user_test_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_real_user_test_results import EndpointRealUserTestResults +from endpoint_test_results.models.endpoint_real_user_test_results import EndpointRealUserTestResults class TestEndpointRealUserTestResults(unittest.TestCase): """EndpointRealUserTestResults unit test stubs""" diff --git a/endpoint/test_results_api/test/test_endpoint_result_request_filter.py b/endpoint_test_results/test/test_endpoint_result_request_filter.py similarity index 92% rename from endpoint/test_results_api/test/test_endpoint_result_request_filter.py rename to endpoint_test_results/test/test_endpoint_result_request_filter.py index 47c5d608..55dc3868 100644 --- a/endpoint/test_results_api/test/test_endpoint_result_request_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.endpoint_result_request_filter import EndpointResultRequestFilter +from endpoint_test_results.models.endpoint_result_request_filter import EndpointResultRequestFilter class TestEndpointResultRequestFilter(unittest.TestCase): """EndpointResultRequestFilter unit test stubs""" diff --git a/endpoint_test_results/test/test_endpoint_scheduled_test.py b/endpoint_test_results/test/test_endpoint_scheduled_test.py new file mode 100644 index 00000000..94b55056 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_scheduled_test.py @@ -0,0 +1,102 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest + +class TestEndpointScheduledTest(unittest.TestCase): + """EndpointScheduledTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointScheduledTest: + """Test EndpointScheduledTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointScheduledTest` + """ + model = EndpointScheduledTest() + if include_optional: + return EndpointScheduledTest( + aid = '1234', + links = endpoint_test_results.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_test_results.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'http-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_test_results.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + auth_type = 'none', + http_time_limit = 5000, + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + verify_certificate = False, + content_regex = '(regex)+', + follow_redirects = True, + http_target_time = 100, + http_version = 1, + post_body = 'body', + ssl_version = 'Auto', + use_ntlm = False, + user_agent = 'curl' + ) + else: + return EndpointScheduledTest( + type = 'http-server', + ) + """ + + def testEndpointScheduledTest(self): + """Test EndpointScheduledTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_scheduled_test_type.py b/endpoint_test_results/test/test_endpoint_scheduled_test_type.py new file mode 100644 index 00000000..32de2590 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_scheduled_test_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_scheduled_test_type import EndpointScheduledTestType + +class TestEndpointScheduledTestType(unittest.TestCase): + """EndpointScheduledTestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointScheduledTestType(self): + """Test EndpointScheduledTestType""" + # inst = EndpointScheduledTestType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_specific_agents_selector_config.py b/endpoint_test_results/test/test_endpoint_specific_agents_selector_config.py new file mode 100644 index 00000000..d8af3a67 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_specific_agents_selector_config.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig + +class TestEndpointSpecificAgentsSelectorConfig(unittest.TestCase): + """EndpointSpecificAgentsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointSpecificAgentsSelectorConfig: + """Test EndpointSpecificAgentsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointSpecificAgentsSelectorConfig` + """ + model = EndpointSpecificAgentsSelectorConfig() + if include_optional: + return EndpointSpecificAgentsSelectorConfig( + agent_selector_type = 'specific-agents', + max_machines = 10, + agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] + ) + else: + return EndpointSpecificAgentsSelectorConfig( + agent_selector_type = 'specific-agents', + ) + """ + + def testEndpointSpecificAgentsSelectorConfig(self): + """Test EndpointSpecificAgentsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_test.py b/endpoint_test_results/test/test_endpoint_test.py new file mode 100644 index 00000000..9f0c1ba4 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_test.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_test import EndpointTest + +class TestEndpointTest(unittest.TestCase): + """EndpointTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTest: + """Test EndpointTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTest` + """ + model = EndpointTest() + if include_optional: + return EndpointTest( + aid = '1234', + links = endpoint_test_results.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_test_results.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'agent-to-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_test_results.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ] + ) + else: + return EndpointTest( + type = 'agent-to-server', + ) + """ + + def testEndpointTest(self): + """Test EndpointTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_test_auth_type.py b/endpoint_test_results/test/test_endpoint_test_auth_type.py new file mode 100644 index 00000000..9ab171b1 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_test_auth_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_test_auth_type import EndpointTestAuthType + +class TestEndpointTestAuthType(unittest.TestCase): + """EndpointTestAuthType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestAuthType(self): + """Test EndpointTestAuthType""" + # inst = EndpointTestAuthType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_test_links.py b/endpoint_test_results/test/test_endpoint_test_links.py new file mode 100644 index 00000000..72c7c441 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_test_links import EndpointTestLinks + +class TestEndpointTestLinks(unittest.TestCase): + """EndpointTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTestLinks: + """Test EndpointTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTestLinks` + """ + model = EndpointTestLinks() + if include_optional: + return EndpointTestLinks( + var_self = None, + test_results = [{"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"}] + ) + else: + return EndpointTestLinks( + ) + """ + + def testEndpointTestLinks(self): + """Test EndpointTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_test_links_self.py b/endpoint_test_results/test/test_endpoint_test_links_self.py new file mode 100644 index 00000000..0a33b889 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_test_links_self import EndpointTestLinksSelf + +class TestEndpointTestLinksSelf(unittest.TestCase): + """EndpointTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTestLinksSelf: + """Test EndpointTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTestLinksSelf` + """ + model = EndpointTestLinksSelf() + if include_optional: + return EndpointTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return EndpointTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testEndpointTestLinksSelf(self): + """Test EndpointTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_endpoint_test_protocol.py b/endpoint_test_results/test/test_endpoint_test_protocol.py new file mode 100644 index 00000000..cd15a467 --- /dev/null +++ b/endpoint_test_results/test/test_endpoint_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol + +class TestEndpointTestProtocol(unittest.TestCase): + """EndpointTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestProtocol(self): + """Test EndpointTestProtocol""" + # inst = EndpointTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_error.py b/endpoint_test_results/test/test_error.py new file mode 100644 index 00000000..0582beee --- /dev/null +++ b/endpoint_test_results/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_ethernet_profile.py b/endpoint_test_results/test/test_ethernet_profile.py new file mode 100644 index 00000000..9f38d477 --- /dev/null +++ b/endpoint_test_results/test/test_ethernet_profile.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.ethernet_profile import EthernetProfile + +class TestEthernetProfile(unittest.TestCase): + """EthernetProfile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EthernetProfile: + """Test EthernetProfile + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EthernetProfile` + """ + model = EthernetProfile() + if include_optional: + return EthernetProfile( + link_speed = 860 + ) + else: + return EthernetProfile( + ) + """ + + def testEthernetProfile(self): + """Test EthernetProfile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_expand.py b/endpoint_test_results/test/test_expand.py new file mode 100644 index 00000000..d505e549 --- /dev/null +++ b/endpoint_test_results/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_get_dynamic_test_result_network_pathvis200_response.py b/endpoint_test_results/test/test_get_dynamic_test_result_network_pathvis200_response.py new file mode 100644 index 00000000..b8d58e8c --- /dev/null +++ b/endpoint_test_results/test/test_get_dynamic_test_result_network_pathvis200_response.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.get_dynamic_test_result_network_pathvis200_response import GetDynamicTestResultNetworkPathvis200Response + +class TestGetDynamicTestResultNetworkPathvis200Response(unittest.TestCase): + """GetDynamicTestResultNetworkPathvis200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDynamicTestResultNetworkPathvis200Response: + """Test GetDynamicTestResultNetworkPathvis200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDynamicTestResultNetworkPathvis200Response` + """ + model = GetDynamicTestResultNetworkPathvis200Response() + if include_optional: + return GetDynamicTestResultNetworkPathvis200Response( + results = [ + null + ], + test = None, + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + links = endpoint_test_results.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetDynamicTestResultNetworkPathvis200Response( + ) + """ + + def testGetDynamicTestResultNetworkPathvis200Response(self): + """Test GetDynamicTestResultNetworkPathvis200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py b/endpoint_test_results/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py new file mode 100644 index 00000000..3577b974 --- /dev/null +++ b/endpoint_test_results/test/test_get_dynamic_test_result_pathvis_agent_round200_response.py @@ -0,0 +1,64 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.get_dynamic_test_result_pathvis_agent_round200_response import GetDynamicTestResultPathvisAgentRound200Response + +class TestGetDynamicTestResultPathvisAgentRound200Response(unittest.TestCase): + """GetDynamicTestResultPathvisAgentRound200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDynamicTestResultPathvisAgentRound200Response: + """Test GetDynamicTestResultPathvisAgentRound200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDynamicTestResultPathvisAgentRound200Response` + """ + model = GetDynamicTestResultPathvisAgentRound200Response() + if include_optional: + return GetDynamicTestResultPathvisAgentRound200Response( + results = [ + null + ], + test = None, + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetDynamicTestResultPathvisAgentRound200Response( + ) + """ + + def testGetDynamicTestResultPathvisAgentRound200Response(self): + """Test GetDynamicTestResultPathvisAgentRound200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_get_endpoint_local_network_topology_details200_response.py b/endpoint_test_results/test/test_get_endpoint_local_network_topology_details200_response.py similarity index 85% rename from endpoint/test_results_api/test/test_get_endpoint_local_network_topology_details200_response.py rename to endpoint_test_results/test/test_get_endpoint_local_network_topology_details200_response.py index f050c438..22d7a5bc 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_local_network_topology_details200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_local_network_topology_details200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response +from endpoint_test_results.models.get_endpoint_local_network_topology_details200_response import GetEndpointLocalNetworkTopologyDetails200Response class TestGetEndpointLocalNetworkTopologyDetails200Response(unittest.TestCase): """GetEndpointLocalNetworkTopologyDetails200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetEndpointLocalNetworkTopologyDetails200Response(unittest.TestCase): results = [ null ], - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_local_networks200_response.py b/endpoint_test_results/test/test_get_endpoint_local_networks200_response.py similarity index 83% rename from endpoint/test_results_api/test/test_get_endpoint_local_networks200_response.py rename to endpoint_test_results/test/test_get_endpoint_local_networks200_response.py index a7c35201..3c0e7728 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_local_networks200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_local_networks200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response +from endpoint_test_results.models.get_endpoint_local_networks200_response import GetEndpointLocalNetworks200Response class TestGetEndpointLocalNetworks200Response(unittest.TestCase): """GetEndpointLocalNetworks200Response unit test stubs""" @@ -37,14 +36,14 @@ class TestGetEndpointLocalNetworks200Response(unittest.TestCase): if include_optional: return GetEndpointLocalNetworks200Response( local_networks = [ - test_results_api.models.local_network_result.LocalNetworkResult( + endpoint_test_results.models.local_network_result.LocalNetworkResult( network_id = '006c4fa7a054', network_name = '10.5.51.0 (in 178.216.56.0/21)', local_prefix = '10.5.51.0', public_ip_range = '178.216.56.0-178.216.63.255', ) ], - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_local_networks_topologies200_response.py b/endpoint_test_results/test/test_get_endpoint_local_networks_topologies200_response.py similarity index 78% rename from endpoint/test_results_api/test/test_get_endpoint_local_networks_topologies200_response.py rename to endpoint_test_results/test/test_get_endpoint_local_networks_topologies200_response.py index dc1c949c..3a57da2f 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_local_networks_topologies200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_local_networks_topologies200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response +from endpoint_test_results.models.get_endpoint_local_networks_topologies200_response import GetEndpointLocalNetworksTopologies200Response class TestGetEndpointLocalNetworksTopologies200Response(unittest.TestCase): """GetEndpointLocalNetworksTopologies200Response unit test stubs""" @@ -39,15 +38,15 @@ class TestGetEndpointLocalNetworksTopologies200Response(unittest.TestCase): start_date = '2022-07-17T22:00:54Z', end_date = '2022-07-18T22:00:54Z', results = [ - test_results_api.models.local_network_topology_result_base.LocalNetworkTopologyResultBase( + endpoint_test_results.models.local_network_topology_result_base.LocalNetworkTopologyResultBase( agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', date = '2022-07-17T22:00:54Z', network_topology_id = '00160:54c3a4b180c6:1490536500:c7a58c49', round_id = 1384309800, target = '10.0.2.2', target_port = 80, - type = null, - icmp_ping = test_results_api.models.network_ping.NetworkPing( + type = 'vpn', + icmp_ping = endpoint_test_results.models.network_ping.NetworkPing( avg_rtt = 7, max_rtt = 66, mean_dev_rtt = 11, @@ -57,22 +56,22 @@ class TestGetEndpointLocalNetworksTopologies200Response(unittest.TestCase): error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), is_icmp_blocked = True, - tcp_connect = test_results_api.models.tcp_connect.TcpConnect( + tcp_connect = endpoint_test_results.models.tcp_connect.TcpConnect( rtt = 77.777, error_code = 'ERR_TIMED_OUT', error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, @@ -81,8 +80,8 @@ class TestGetEndpointLocalNetworksTopologies200Response(unittest.TestCase): count = 155, ), physical_memory_total_bytes = 1024, ), ) ], - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_local_networks_topologies_request.py b/endpoint_test_results/test/test_get_endpoint_local_networks_topologies_request.py similarity index 89% rename from endpoint/test_results_api/test/test_get_endpoint_local_networks_topologies_request.py rename to endpoint_test_results/test/test_get_endpoint_local_networks_topologies_request.py index 17bec529..1c8a1911 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_local_networks_topologies_request.py +++ b/endpoint_test_results/test/test_get_endpoint_local_networks_topologies_request.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest +from endpoint_test_results.models.get_endpoint_local_networks_topologies_request import GetEndpointLocalNetworksTopologiesRequest class TestGetEndpointLocalNetworksTopologiesRequest(unittest.TestCase): """GetEndpointLocalNetworksTopologiesRequest unit test stubs""" diff --git a/endpoint/test_results_api/test/test_get_endpoint_real_user_test_details200_response.py b/endpoint_test_results/test/test_get_endpoint_real_user_test_details200_response.py similarity index 85% rename from endpoint/test_results_api/test/test_get_endpoint_real_user_test_details200_response.py rename to endpoint_test_results/test/test_get_endpoint_real_user_test_details200_response.py index 7469b136..0c69b401 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_real_user_test_details200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_real_user_test_details200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_test_details200_response import GetEndpointRealUserTestDetails200Response class TestGetEndpointRealUserTestDetails200Response(unittest.TestCase): """GetEndpointRealUserTestDetails200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetEndpointRealUserTestDetails200Response(unittest.TestCase): results = [ null ], - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_real_user_test_pages_details200_response.py b/endpoint_test_results/test/test_get_endpoint_real_user_test_pages_details200_response.py similarity index 84% rename from endpoint/test_results_api/test/test_get_endpoint_real_user_test_pages_details200_response.py rename to endpoint_test_results/test/test_get_endpoint_real_user_test_pages_details200_response.py index 54d0b253..d8be57df 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_real_user_test_pages_details200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_real_user_test_pages_details200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response +from endpoint_test_results.models.get_endpoint_real_user_test_pages_details200_response import GetEndpointRealUserTestPagesDetails200Response class TestGetEndpointRealUserTestPagesDetails200Response(unittest.TestCase): """GetEndpointRealUserTestPagesDetails200Response unit test stubs""" @@ -36,8 +35,8 @@ class TestGetEndpointRealUserTestPagesDetails200Response(unittest.TestCase): model = GetEndpointRealUserTestPagesDetails200Response() if include_optional: return GetEndpointRealUserTestPagesDetails200Response( - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests200_response.py b/endpoint_test_results/test/test_get_endpoint_real_user_tests200_response.py similarity index 85% rename from endpoint/test_results_api/test/test_get_endpoint_real_user_tests200_response.py rename to endpoint_test_results/test/test_get_endpoint_real_user_tests200_response.py index c0712eb7..40827efa 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_real_user_tests200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response +from endpoint_test_results.models.get_endpoint_real_user_tests200_response import GetEndpointRealUserTests200Response class TestGetEndpointRealUserTests200Response(unittest.TestCase): """GetEndpointRealUserTests200Response unit test stubs""" @@ -41,8 +40,8 @@ class TestGetEndpointRealUserTests200Response(unittest.TestCase): results = [ null ], - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests_network200_response.py b/endpoint_test_results/test/test_get_endpoint_real_user_tests_network200_response.py similarity index 77% rename from endpoint/test_results_api/test/test_get_endpoint_real_user_tests_network200_response.py rename to endpoint_test_results/test/test_get_endpoint_real_user_tests_network200_response.py index f28dde38..92801a0e 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests_network200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_real_user_tests_network200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_network200_response import GetEndpointRealUserTestsNetwork200Response class TestGetEndpointRealUserTestsNetwork200Response(unittest.TestCase): """GetEndpointRealUserTestsNetwork200Response unit test stubs""" @@ -39,33 +38,33 @@ class TestGetEndpointRealUserTestsNetwork200Response(unittest.TestCase): start_date = '2022-07-17T22:00:54Z', end_date = '2022-07-18T22:00:54Z', results = [ - test_results_api.models.real_user_test_network_result.RealUserTestNetworkResult( + endpoint_test_results.models.real_user_test_network_result.RealUserTestNetworkResult( agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', date = '2022-07-17T22:00:54Z', id = '07625:1490529480:aVDViw0i', round_id = 1384309800, - destination = test_results_api.models.network_metrics.NetworkMetrics( + destination = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), - vpn = test_results_api.models.network_metrics.NetworkMetrics( + vpn = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), proxy = , - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, @@ -74,8 +73,8 @@ class TestGetEndpointRealUserTestsNetwork200Response(unittest.TestCase): count = 155, ), physical_memory_total_bytes = 1024, ), ) ], - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests_pages200_response.py b/endpoint_test_results/test/test_get_endpoint_real_user_tests_pages200_response.py similarity index 85% rename from endpoint/test_results_api/test/test_get_endpoint_real_user_tests_pages200_response.py rename to endpoint_test_results/test/test_get_endpoint_real_user_tests_pages200_response.py index a2f53641..f3bccecc 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests_pages200_response.py +++ b/endpoint_test_results/test/test_get_endpoint_real_user_tests_pages200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response +from endpoint_test_results.models.get_endpoint_real_user_tests_pages200_response import GetEndpointRealUserTestsPages200Response class TestGetEndpointRealUserTestsPages200Response(unittest.TestCase): """GetEndpointRealUserTestsPages200Response unit test stubs""" @@ -41,8 +40,8 @@ class TestGetEndpointRealUserTestsPages200Response(unittest.TestCase): results = [ null ], - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests_request.py b/endpoint_test_results/test/test_get_endpoint_real_user_tests_request.py similarity index 89% rename from endpoint/test_results_api/test/test_get_endpoint_real_user_tests_request.py rename to endpoint_test_results/test/test_get_endpoint_real_user_tests_request.py index e6dffaa5..3bb9756a 100644 --- a/endpoint/test_results_api/test/test_get_endpoint_real_user_tests_request.py +++ b/endpoint_test_results/test/test_get_endpoint_real_user_tests_request.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest +from endpoint_test_results.models.get_endpoint_real_user_tests_request import GetEndpointRealUserTestsRequest class TestGetEndpointRealUserTestsRequest(unittest.TestCase): """GetEndpointRealUserTestsRequest unit test stubs""" diff --git a/endpoint_test_results/test/test_get_test_result_http_server200_response.py b/endpoint_test_results/test/test_get_test_result_http_server200_response.py new file mode 100644 index 00000000..6fc87a77 --- /dev/null +++ b/endpoint_test_results/test/test_get_test_result_http_server200_response.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response + +class TestGetTestResultHttpServer200Response(unittest.TestCase): + """GetTestResultHttpServer200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultHttpServer200Response: + """Test GetTestResultHttpServer200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultHttpServer200Response` + """ + model = GetTestResultHttpServer200Response() + if include_optional: + return GetTestResultHttpServer200Response( + results = [ + null + ], + test = None, + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + links = endpoint_test_results.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetTestResultHttpServer200Response( + ) + """ + + def testGetTestResultHttpServer200Response(self): + """Test GetTestResultHttpServer200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_get_test_result_network_pathvis200_response.py b/endpoint_test_results/test/test_get_test_result_network_pathvis200_response.py new file mode 100644 index 00000000..5cb77242 --- /dev/null +++ b/endpoint_test_results/test/test_get_test_result_network_pathvis200_response.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response + +class TestGetTestResultNetworkPathvis200Response(unittest.TestCase): + """GetTestResultNetworkPathvis200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultNetworkPathvis200Response: + """Test GetTestResultNetworkPathvis200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultNetworkPathvis200Response` + """ + model = GetTestResultNetworkPathvis200Response() + if include_optional: + return GetTestResultNetworkPathvis200Response( + results = [ + null + ], + test = None, + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + links = endpoint_test_results.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetTestResultNetworkPathvis200Response( + ) + """ + + def testGetTestResultNetworkPathvis200Response(self): + """Test GetTestResultNetworkPathvis200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_get_test_result_pathvis_agent_round200_response.py b/endpoint_test_results/test/test_get_test_result_pathvis_agent_round200_response.py similarity index 85% rename from endpoint/test_results_api/test/test_get_test_result_pathvis_agent_round200_response.py rename to endpoint_test_results/test/test_get_test_result_pathvis_agent_round200_response.py index 77ffde25..5f6e4aad 100644 --- a/endpoint/test_results_api/test/test_get_test_result_pathvis_agent_round200_response.py +++ b/endpoint_test_results/test/test_get_test_result_pathvis_agent_round200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response +from endpoint_test_results.models.get_test_result_pathvis_agent_round200_response import GetTestResultPathvisAgentRound200Response class TestGetTestResultPathvisAgentRound200Response(unittest.TestCase): """GetTestResultPathvisAgentRound200Response unit test stubs""" @@ -40,8 +39,8 @@ class TestGetTestResultPathvisAgentRound200Response(unittest.TestCase): null ], test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_hop.py b/endpoint_test_results/test/test_hop.py similarity index 91% rename from endpoint/test_results_api/test/test_hop.py rename to endpoint_test_results/test/test_hop.py index e534fb7d..b045759f 100644 --- a/endpoint/test_results_api/test/test_hop.py +++ b/endpoint_test_results/test/test_hop.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.hop import Hop +from endpoint_test_results.models.hop import Hop class TestHop(unittest.TestCase): """Hop unit test stubs""" diff --git a/endpoint/test_results_api/test/test_http_error_type.py b/endpoint_test_results/test/test_http_error_type.py similarity index 81% rename from endpoint/test_results_api/test/test_http_error_type.py rename to endpoint_test_results/test/test_http_error_type.py index 50ee939d..5a30b31f 100644 --- a/endpoint/test_results_api/test/test_http_error_type.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.http_error_type import HttpErrorType +from endpoint_test_results.models.http_error_type import HttpErrorType class TestHttpErrorType(unittest.TestCase): """HttpErrorType unit test stubs""" diff --git a/endpoint_test_results/test/test_http_test_result.py b/endpoint_test_results/test/test_http_test_result.py new file mode 100644 index 00000000..bb56d860 --- /dev/null +++ b/endpoint_test_results/test/test_http_test_result.py @@ -0,0 +1,121 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.http_test_result import HttpTestResult + +class TestHttpTestResult(unittest.TestCase): + """HttpTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpTestResult: + """Test HttpTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpTestResult` + """ + model = HttpTestResult() + if include_optional: + return HttpTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '193.2.1.88', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + connect_time = 2, + dns_time = 0, + error_type = 'connect', + error_details = '', + headers = endpoint_test_results.models.http_test_result_headers.HttpTestResultHeaders( + request_headers = 'GET / HTTP/1.1 +Host: www.thousandeyes.com +User-Agent: curl/7.58.0-DEV +Accept: */* +Accept-Encoding: deflate, gzip +X-ThousandEyes-Agent: yes +', + response_headers = 'HTTP/1.1 200 OK +Content-Type: text/html;charset=UTF-8 +Content-Length: 9993 +Connection: keep-alive +Date: Mon, 04 May 2020 16:13:00 GMT +Server: Apache +Content-Language: en-US +Content-Encoding: gzip +X-Frame-Options: sameorigin +Cache-Control: max-age=600, must-revalidate +Strict-Transport-Security: max-age=31536000 +X-Content-Type-Options: nosniff +X-XSS-Protection: 1; mode=block +Vary: Accept-Encoding +X-Cache: Hit from cloudfront +Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) +X-Amz-Cf-Pop: SFO5-C3 +X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== +Age: 132 +', ), + num_redirects = 0, + receive_time = 1, + redirect_time = 10, + response_code = 200, + response_time = 14, + ssl_time = 9, + total_time = 15, + wait_time = 3, + wire_size = 9993 + ) + else: + return HttpTestResult( + ) + """ + + def testHttpTestResult(self): + """Test HttpTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_http_test_result_headers.py b/endpoint_test_results/test/test_http_test_result_headers.py new file mode 100644 index 00000000..82787818 --- /dev/null +++ b/endpoint_test_results/test/test_http_test_result_headers.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.http_test_result_headers import HttpTestResultHeaders + +class TestHttpTestResultHeaders(unittest.TestCase): + """HttpTestResultHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpTestResultHeaders: + """Test HttpTestResultHeaders + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpTestResultHeaders` + """ + model = HttpTestResultHeaders() + if include_optional: + return HttpTestResultHeaders( + request_headers = 'GET / HTTP/1.1 +Host: www.thousandeyes.com +User-Agent: curl/7.58.0-DEV +Accept: */* +Accept-Encoding: deflate, gzip +X-ThousandEyes-Agent: yes +', + response_headers = 'HTTP/1.1 200 OK +Content-Type: text/html;charset=UTF-8 +Content-Length: 9993 +Connection: keep-alive +Date: Mon, 04 May 2020 16:13:00 GMT +Server: Apache +Content-Language: en-US +Content-Encoding: gzip +X-Frame-Options: sameorigin +Cache-Control: max-age=600, must-revalidate +Strict-Transport-Security: max-age=31536000 +X-Content-Type-Options: nosniff +X-XSS-Protection: 1; mode=block +Vary: Accept-Encoding +X-Cache: Hit from cloudfront +Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) +X-Amz-Cf-Pop: SFO5-C3 +X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== +Age: 132 +' + ) + else: + return HttpTestResultHeaders( + ) + """ + + def testHttpTestResultHeaders(self): + """Test HttpTestResultHeaders""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_http_test_results.py b/endpoint_test_results/test/test_http_test_results.py new file mode 100644 index 00000000..30789d71 --- /dev/null +++ b/endpoint_test_results/test/test_http_test_results.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.http_test_results import HttpTestResults + +class TestHttpTestResults(unittest.TestCase): + """HttpTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpTestResults: + """Test HttpTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpTestResults` + """ + model = HttpTestResults() + if include_optional: + return HttpTestResults( + results = [ + null + ], + test = None + ) + else: + return HttpTestResults( + ) + """ + + def testHttpTestResults(self): + """Test HttpTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_interface_hardware_type.py b/endpoint_test_results/test/test_interface_hardware_type.py new file mode 100644 index 00000000..2790598d --- /dev/null +++ b/endpoint_test_results/test/test_interface_hardware_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.interface_hardware_type import InterfaceHardwareType + +class TestInterfaceHardwareType(unittest.TestCase): + """InterfaceHardwareType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInterfaceHardwareType(self): + """Test InterfaceHardwareType""" + # inst = InterfaceHardwareType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_link.py b/endpoint_test_results/test/test_link.py new file mode 100644 index 00000000..15fb364c --- /dev/null +++ b/endpoint_test_results/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_local_network_result.py b/endpoint_test_results/test/test_local_network_result.py similarity index 91% rename from endpoint/test_results_api/test/test_local_network_result.py rename to endpoint_test_results/test/test_local_network_result.py index 7e85db41..570bbe0b 100644 --- a/endpoint/test_results_api/test/test_local_network_result.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.local_network_result import LocalNetworkResult +from endpoint_test_results.models.local_network_result import LocalNetworkResult class TestLocalNetworkResult(unittest.TestCase): """LocalNetworkResult unit test stubs""" diff --git a/endpoint/test_results_api/test/test_local_network_results.py b/endpoint_test_results/test/test_local_network_results.py similarity index 87% rename from endpoint/test_results_api/test/test_local_network_results.py rename to endpoint_test_results/test/test_local_network_results.py index 9d261efb..1869ad29 100644 --- a/endpoint/test_results_api/test/test_local_network_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.local_network_results import LocalNetworkResults +from endpoint_test_results.models.local_network_results import LocalNetworkResults class TestLocalNetworkResults(unittest.TestCase): """LocalNetworkResults unit test stubs""" @@ -37,7 +36,7 @@ class TestLocalNetworkResults(unittest.TestCase): if include_optional: return LocalNetworkResults( local_networks = [ - test_results_api.models.local_network_result.LocalNetworkResult( + endpoint_test_results.models.local_network_result.LocalNetworkResult( network_id = '006c4fa7a054', network_name = '10.5.51.0 (in 178.216.56.0/21)', local_prefix = '10.5.51.0', diff --git a/endpoint/test_results_api/test/test_local_network_topology_detail_results.py b/endpoint_test_results/test/test_local_network_topology_detail_results.py similarity index 89% rename from endpoint/test_results_api/test/test_local_network_topology_detail_results.py rename to endpoint_test_results/test/test_local_network_topology_detail_results.py index 7b6a78ec..1cd3866b 100644 --- a/endpoint/test_results_api/test/test_local_network_topology_detail_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults +from endpoint_test_results.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults class TestLocalNetworkTopologyDetailResults(unittest.TestCase): """LocalNetworkTopologyDetailResults unit test stubs""" diff --git a/endpoint/test_results_api/test/test_local_network_topology_result.py b/endpoint_test_results/test/test_local_network_topology_result.py similarity index 81% rename from endpoint/test_results_api/test/test_local_network_topology_result.py rename to endpoint_test_results/test/test_local_network_topology_result.py index 247e92a3..9d3dc55e 100644 --- a/endpoint/test_results_api/test/test_local_network_topology_result.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.local_network_topology_result import LocalNetworkTopologyResult +from endpoint_test_results.models.local_network_topology_result import LocalNetworkTopologyResult class TestLocalNetworkTopologyResult(unittest.TestCase): """LocalNetworkTopologyResult unit test stubs""" @@ -43,7 +42,7 @@ class TestLocalNetworkTopologyResult(unittest.TestCase): target = '10.0.2.2', target_port = 80, type = 'vpn', - icmp_ping = test_results_api.models.network_ping.NetworkPing( + icmp_ping = endpoint_test_results.models.network_ping.NetworkPing( avg_rtt = 7, max_rtt = 66, mean_dev_rtt = 11, @@ -53,22 +52,22 @@ class TestLocalNetworkTopologyResult(unittest.TestCase): error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), is_icmp_blocked = True, - tcp_connect = test_results_api.models.tcp_connect.TcpConnect( + tcp_connect = endpoint_test_results.models.tcp_connect.TcpConnect( rtt = 77.777, error_code = 'ERR_TIMED_OUT', error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, @@ -76,12 +75,12 @@ class TestLocalNetworkTopologyResult(unittest.TestCase): std_dev = 0.25, count = 155, ), physical_memory_total_bytes = 1024, ), - coordinates = test_results_api.models.real_user_test_coordinates.RealUserTestCoordinates( + coordinates = endpoint_test_results.models.real_user_test_coordinates.RealUserTestCoordinates( latitude = 46.0552778, location = 'Slovenia', longitude = 14.5144444, ), network_profile = None, - icmp_traceroute = test_results_api.models.traceroute.Traceroute( + icmp_traceroute = endpoint_test_results.models.traceroute.Traceroute( destination = '13.32.22.232', error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], @@ -90,7 +89,7 @@ class TestLocalNetworkTopologyResult(unittest.TestCase): null ], ), icmp_traceroutes = [ - test_results_api.models.traceroute.Traceroute( + endpoint_test_results.models.traceroute.Traceroute( destination = '13.32.22.232', error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], diff --git a/endpoint/test_results_api/test/test_local_network_topology_result_base.py b/endpoint_test_results/test/test_local_network_topology_result_base.py similarity index 82% rename from endpoint/test_results_api/test/test_local_network_topology_result_base.py rename to endpoint_test_results/test/test_local_network_topology_result_base.py index 920eee63..3f4e90cd 100644 --- a/endpoint/test_results_api/test/test_local_network_topology_result_base.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.local_network_topology_result_base import LocalNetworkTopologyResultBase +from endpoint_test_results.models.local_network_topology_result_base import LocalNetworkTopologyResultBase class TestLocalNetworkTopologyResultBase(unittest.TestCase): """LocalNetworkTopologyResultBase unit test stubs""" @@ -43,7 +42,7 @@ class TestLocalNetworkTopologyResultBase(unittest.TestCase): target = '10.0.2.2', target_port = 80, type = 'vpn', - icmp_ping = test_results_api.models.network_ping.NetworkPing( + icmp_ping = endpoint_test_results.models.network_ping.NetworkPing( avg_rtt = 7, max_rtt = 66, mean_dev_rtt = 11, @@ -53,22 +52,22 @@ class TestLocalNetworkTopologyResultBase(unittest.TestCase): error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), is_icmp_blocked = True, - tcp_connect = test_results_api.models.tcp_connect.TcpConnect( + tcp_connect = endpoint_test_results.models.tcp_connect.TcpConnect( rtt = 77.777, error_code = 'ERR_TIMED_OUT', error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_local_network_topology_results.py b/endpoint_test_results/test/test_local_network_topology_results.py similarity index 79% rename from endpoint/test_results_api/test/test_local_network_topology_results.py rename to endpoint_test_results/test/test_local_network_topology_results.py index 0f041c62..ccddbcd6 100644 --- a/endpoint/test_results_api/test/test_local_network_topology_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.local_network_topology_results import LocalNetworkTopologyResults +from endpoint_test_results.models.local_network_topology_results import LocalNetworkTopologyResults class TestLocalNetworkTopologyResults(unittest.TestCase): """LocalNetworkTopologyResults unit test stubs""" @@ -37,15 +36,15 @@ class TestLocalNetworkTopologyResults(unittest.TestCase): if include_optional: return LocalNetworkTopologyResults( results = [ - test_results_api.models.local_network_topology_result_base.LocalNetworkTopologyResultBase( + endpoint_test_results.models.local_network_topology_result_base.LocalNetworkTopologyResultBase( agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', date = '2022-07-17T22:00:54Z', network_topology_id = '00160:54c3a4b180c6:1490536500:c7a58c49', round_id = 1384309800, target = '10.0.2.2', target_port = 80, - type = null, - icmp_ping = test_results_api.models.network_ping.NetworkPing( + type = 'vpn', + icmp_ping = endpoint_test_results.models.network_ping.NetworkPing( avg_rtt = 7, max_rtt = 66, mean_dev_rtt = 11, @@ -55,22 +54,22 @@ class TestLocalNetworkTopologyResults(unittest.TestCase): error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), is_icmp_blocked = True, - tcp_connect = test_results_api.models.tcp_connect.TcpConnect( + tcp_connect = endpoint_test_results.models.tcp_connect.TcpConnect( rtt = 77.777, error_code = 'ERR_TIMED_OUT', error = 'An operation timed out.', info_flags = ["TE_INFO_ICMP_BLOCKED_BY_FIREWALL"], ), - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_multi_test_id_network_test_results.py b/endpoint_test_results/test/test_multi_test_id_network_test_results.py similarity index 87% rename from endpoint/test_results_api/test/test_multi_test_id_network_test_results.py rename to endpoint_test_results/test/test_multi_test_id_network_test_results.py index 2cec6c89..df9e0dc2 100644 --- a/endpoint/test_results_api/test/test_multi_test_id_network_test_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults +from endpoint_test_results.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults class TestMultiTestIdNetworkTestResults(unittest.TestCase): """MultiTestIdNetworkTestResults unit test stubs""" @@ -38,7 +37,8 @@ class TestMultiTestIdNetworkTestResults(unittest.TestCase): return MultiTestIdNetworkTestResults( results = [ null - ] + ], + total_hits = 12 ) else: return MultiTestIdNetworkTestResults( diff --git a/endpoint/test_results_api/test/test_multi_test_id_tests_data_rounds_search.py b/endpoint_test_results/test/test_multi_test_id_tests_data_rounds_search.py similarity index 76% rename from endpoint/test_results_api/test/test_multi_test_id_tests_data_rounds_search.py rename to endpoint_test_results/test/test_multi_test_id_tests_data_rounds_search.py index 003a410b..ec853fe3 100644 --- a/endpoint/test_results_api/test/test_multi_test_id_tests_data_rounds_search.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch +from endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch class TestMultiTestIdTestsDataRoundsSearch(unittest.TestCase): """MultiTestIdTestsDataRoundsSearch unit test stubs""" @@ -37,19 +36,19 @@ class TestMultiTestIdTestsDataRoundsSearch(unittest.TestCase): if include_optional: return MultiTestIdTestsDataRoundsSearch( search_sort = [ - test_results_api.models.tests_data_search_sort.TestsDataSearchSort( + endpoint_test_results.models.tests_data_search_sort.TestsDataSearchSort( sort = 'round-id', order = 'desc', ) ], - threshold_filter = test_results_api.models.tests_data_threshold_filters.TestsDataThresholdFilters( + threshold_filter = endpoint_test_results.models.tests_data_threshold_filters.TestsDataThresholdFilters( filters = [ - test_results_api.models.tests_data_threshold_filter.TestsDataThresholdFilter( + endpoint_test_results.models.tests_data_threshold_filter.TestsDataThresholdFilter( name = 'loss', value = 1.337, operator = 'gte', ) ], conditional_operator = 'and', ), - search_filters = test_results_api.models.multi_test_id_tests_data_search_filter.MultiTestIdTestsDataSearchFilter( + search_filters = endpoint_test_results.models.multi_test_id_tests_data_search_filter.MultiTestIdTestsDataSearchFilter( agent_id = [ '52455b09-ff1b-4849-8194-99026cc890e0' ], diff --git a/endpoint/test_results_api/test/test_multi_test_id_tests_data_search_filter.py b/endpoint_test_results/test/test_multi_test_id_tests_data_search_filter.py similarity index 90% rename from endpoint/test_results_api/test/test_multi_test_id_tests_data_search_filter.py rename to endpoint_test_results/test/test_multi_test_id_tests_data_search_filter.py index 6811bc2c..da963cf6 100644 --- a/endpoint/test_results_api/test/test_multi_test_id_tests_data_search_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter +from endpoint_test_results.models.multi_test_id_tests_data_search_filter import MultiTestIdTestsDataSearchFilter class TestMultiTestIdTestsDataSearchFilter(unittest.TestCase): """MultiTestIdTestsDataSearchFilter unit test stubs""" diff --git a/endpoint/test_results_api/test/test_network_dynamic_test_result.py b/endpoint_test_results/test/test_network_dynamic_test_result.py similarity index 76% rename from endpoint/test_results_api/test/test_network_dynamic_test_result.py rename to endpoint_test_results/test/test_network_dynamic_test_result.py index 2d8032ab..c839c411 100644 --- a/endpoint/test_results_api/test/test_network_dynamic_test_result.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_dynamic_test_result import NetworkDynamicTestResult +from endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult class TestNetworkDynamicTestResult(unittest.TestCase): """NetworkDynamicTestResult unit test stubs""" @@ -36,22 +35,22 @@ class TestNetworkDynamicTestResult(unittest.TestCase): model = NetworkDynamicTestResult() if include_optional: return NetworkDynamicTestResult( + aid = '1234', agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', - aid = test_results_api.models.account_group_id.AccountGroupId( - aid = '11', ), round_id = 1384309800, server_ip = '185.199.108.153', - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, @@ -59,14 +58,13 @@ class TestNetworkDynamicTestResult(unittest.TestCase): std_dev = 0.25, count = 155, ), physical_memory_total_bytes = 1024, ), - vpn_profile = test_results_api.models.vpn_profile.VpnProfile( + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( vpn_client_addresses = ["184.81.113.85","13.129.91.62"], vpn_client_network_range = [ '9.88.37.27' ], vpn_gateway_address = '120.98.134.7', vpn_type = 'cisco-anyconnect', ), - network_profile = None, avg_latency = 167.04, error_details = 'Error', jitter = 0.076808, @@ -75,9 +73,11 @@ class TestNetworkDynamicTestResult(unittest.TestCase): max_latency = 168.0, min_latency = 167.0, application = 'webex', - webex = test_results_api.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( + webex = endpoint_test_results.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( conference_id = '225817074608419375', - correlation_id = '22581707460321454', ) + correlation_id = '22581707460321454', + local_sip_session_id = '22581707460321454', + remote_sip_session_id = '22581707460321454', ) ) else: return NetworkDynamicTestResult( diff --git a/endpoint_test_results/test/test_network_dynamic_test_results.py b/endpoint_test_results/test/test_network_dynamic_test_results.py new file mode 100644 index 00000000..95619251 --- /dev/null +++ b/endpoint_test_results/test/test_network_dynamic_test_results.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.network_dynamic_test_results import NetworkDynamicTestResults + +class TestNetworkDynamicTestResults(unittest.TestCase): + """NetworkDynamicTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkDynamicTestResults: + """Test NetworkDynamicTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkDynamicTestResults` + """ + model = NetworkDynamicTestResults() + if include_optional: + return NetworkDynamicTestResults( + results = [ + null + ], + test = None + ) + else: + return NetworkDynamicTestResults( + ) + """ + + def testNetworkDynamicTestResults(self): + """Test NetworkDynamicTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_network_interface.py b/endpoint_test_results/test/test_network_interface.py similarity index 92% rename from endpoint/test_results_api/test/test_network_interface.py rename to endpoint_test_results/test/test_network_interface.py index b954741d..94c98641 100644 --- a/endpoint/test_results_api/test/test_network_interface.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_interface import NetworkInterface +from endpoint_test_results.models.network_interface import NetworkInterface class TestNetworkInterface(unittest.TestCase): """NetworkInterface unit test stubs""" diff --git a/endpoint/test_results_api/test/test_network_metrics.py b/endpoint_test_results/test/test_network_metrics.py similarity index 91% rename from endpoint/test_results_api/test/test_network_metrics.py rename to endpoint_test_results/test/test_network_metrics.py index 97de72c3..dfb5abef 100644 --- a/endpoint/test_results_api/test/test_network_metrics.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_metrics import NetworkMetrics +from endpoint_test_results.models.network_metrics import NetworkMetrics class TestNetworkMetrics(unittest.TestCase): """NetworkMetrics unit test stubs""" diff --git a/endpoint/test_results_api/test/test_network_ping.py b/endpoint_test_results/test/test_network_ping.py similarity index 92% rename from endpoint/test_results_api/test/test_network_ping.py rename to endpoint_test_results/test/test_network_ping.py index 40020897..d4972af2 100644 --- a/endpoint/test_results_api/test/test_network_ping.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_ping import NetworkPing +from endpoint_test_results.models.network_ping import NetworkPing class TestNetworkPing(unittest.TestCase): """NetworkPing unit test stubs""" diff --git a/endpoint/test_results_api/test/test_network_profile.py b/endpoint_test_results/test/test_network_profile.py similarity index 80% rename from endpoint/test_results_api/test/test_network_profile.py rename to endpoint_test_results/test/test_network_profile.py index 4513d9cf..27431e8f 100644 --- a/endpoint/test_results_api/test/test_network_profile.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_profile import NetworkProfile +from endpoint_test_results.models.network_profile import NetworkProfile class TestNetworkProfile(unittest.TestCase): """NetworkProfile unit test stubs""" @@ -46,7 +45,7 @@ class TestNetworkProfile(unittest.TestCase): interface_name = 'en0', error = 'An operation timed out.', gateway = '10.0.0.1', - wireless_profile = test_results_api.models.network_wireless_profile.NetworkWirelessProfile( + wireless_profile = endpoint_test_results.models.network_wireless_profile.NetworkWirelessProfile( ssid = 'Internet for the masses', bssid = '4c:ba:ba:f4:fa:fa', channel = 1, @@ -56,16 +55,16 @@ class TestNetworkProfile(unittest.TestCase): quality = 100, tx_rate = 130, vendor = 'Cisco', ), - proxy_profile = test_results_api.models.network_proxy_profile.NetworkProxyProfile( + proxy_profile = endpoint_test_results.models.network_proxy_profile.NetworkProxyProfile( method = 'System', proxies = [ - test_results_api.models.network_proxy_profile_proxies_inner.NetworkProxyProfile_proxies_inner( + endpoint_test_results.models.network_proxy_profile_proxies_inner.NetworkProxyProfile_proxies_inner( bypass = '*.local;169.254/16', proxy = '', ) ], ), - ethernet_profile = test_results_api.models.ethernet_profile.EthernetProfile( + ethernet_profile = endpoint_test_results.models.ethernet_profile.EthernetProfile( link_speed = 860, ), - previous_interface = test_results_api.models.network_interface.NetworkInterface( + previous_interface = endpoint_test_results.models.network_interface.NetworkInterface( ip_address = '10.0.0.13', subnet_mask = '255.255.255.0', public_ip_address = '84.255.241.1', diff --git a/endpoint/test_results_api/test/test_network_proxy_profile.py b/endpoint_test_results/test/test_network_proxy_profile.py similarity index 85% rename from endpoint/test_results_api/test/test_network_proxy_profile.py rename to endpoint_test_results/test/test_network_proxy_profile.py index 79ab3ecf..058598c3 100644 --- a/endpoint/test_results_api/test/test_network_proxy_profile.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_proxy_profile import NetworkProxyProfile +from endpoint_test_results.models.network_proxy_profile import NetworkProxyProfile class TestNetworkProxyProfile(unittest.TestCase): """NetworkProxyProfile unit test stubs""" @@ -38,7 +37,7 @@ class TestNetworkProxyProfile(unittest.TestCase): return NetworkProxyProfile( method = 'System', proxies = [ - test_results_api.models.network_proxy_profile_proxies_inner.NetworkProxyProfile_proxies_inner( + endpoint_test_results.models.network_proxy_profile_proxies_inner.NetworkProxyProfile_proxies_inner( bypass = '*.local;169.254/16', proxy = '', ) ] diff --git a/endpoint/test_results_api/test/test_network_proxy_profile_proxies_inner.py b/endpoint_test_results/test/test_network_proxy_profile_proxies_inner.py similarity index 89% rename from endpoint/test_results_api/test/test_network_proxy_profile_proxies_inner.py rename to endpoint_test_results/test/test_network_proxy_profile_proxies_inner.py index c4efb49c..eddb8971 100644 --- a/endpoint/test_results_api/test/test_network_proxy_profile_proxies_inner.py +++ b/endpoint_test_results/test/test_network_proxy_profile_proxies_inner.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner +from endpoint_test_results.models.network_proxy_profile_proxies_inner import NetworkProxyProfileProxiesInner class TestNetworkProxyProfileProxiesInner(unittest.TestCase): """NetworkProxyProfileProxiesInner unit test stubs""" diff --git a/endpoint_test_results/test/test_network_test_result.py b/endpoint_test_results/test/test_network_test_result.py new file mode 100644 index 00000000..5d3c4d4e --- /dev/null +++ b/endpoint_test_results/test/test_network_test_result.py @@ -0,0 +1,87 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.network_test_result import NetworkTestResult + +class TestNetworkTestResult(unittest.TestCase): + """NetworkTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkTestResult: + """Test NetworkTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkTestResult` + """ + model = NetworkTestResult() + if include_optional: + return NetworkTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + avg_latency = 167.04, + error_details = 'Error', + jitter = 0.076808, + is_icmp_blocked = True, + loss = 0.0, + max_latency = 168.0, + min_latency = 167.0 + ) + else: + return NetworkTestResult( + ) + """ + + def testNetworkTestResult(self): + """Test NetworkTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_network_test_results.py b/endpoint_test_results/test/test_network_test_results.py new file mode 100644 index 00000000..88bac824 --- /dev/null +++ b/endpoint_test_results/test/test_network_test_results.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.network_test_results import NetworkTestResults + +class TestNetworkTestResults(unittest.TestCase): + """NetworkTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkTestResults: + """Test NetworkTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkTestResults` + """ + model = NetworkTestResults() + if include_optional: + return NetworkTestResults( + results = [ + null + ], + total_hits = 12, + test = None + ) + else: + return NetworkTestResults( + ) + """ + + def testNetworkTestResults(self): + """Test NetworkTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_network_topology_type.py b/endpoint_test_results/test/test_network_topology_type.py similarity index 81% rename from endpoint/test_results_api/test/test_network_topology_type.py rename to endpoint_test_results/test/test_network_topology_type.py index d8efdbd0..cfae6a44 100644 --- a/endpoint/test_results_api/test/test_network_topology_type.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_topology_type import NetworkTopologyType +from endpoint_test_results.models.network_topology_type import NetworkTopologyType class TestNetworkTopologyType(unittest.TestCase): """NetworkTopologyType unit test stubs""" diff --git a/endpoint/test_results_api/test/test_network_wireless_profile.py b/endpoint_test_results/test/test_network_wireless_profile.py similarity index 91% rename from endpoint/test_results_api/test/test_network_wireless_profile.py rename to endpoint_test_results/test/test_network_wireless_profile.py index f8abf65d..e493c9b8 100644 --- a/endpoint/test_results_api/test/test_network_wireless_profile.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.network_wireless_profile import NetworkWirelessProfile +from endpoint_test_results.models.network_wireless_profile import NetworkWirelessProfile class TestNetworkWirelessProfile(unittest.TestCase): """NetworkWirelessProfile unit test stubs""" diff --git a/endpoint_test_results/test/test_pagination_next_and_self_link.py b/endpoint_test_results/test/test_pagination_next_and_self_link.py new file mode 100644 index 00000000..5cf129e8 --- /dev/null +++ b/endpoint_test_results/test/test_pagination_next_and_self_link.py @@ -0,0 +1,69 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.pagination_next_and_self_link import PaginationNextAndSelfLink + +class TestPaginationNextAndSelfLink(unittest.TestCase): + """PaginationNextAndSelfLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextAndSelfLink: + """Test PaginationNextAndSelfLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextAndSelfLink` + """ + model = PaginationNextAndSelfLink() + if include_optional: + return PaginationNextAndSelfLink( + links = endpoint_test_results.models.pagination_next_and_self_link__links.PaginationNextAndSelfLink__links( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return PaginationNextAndSelfLink( + ) + """ + + def testPaginationNextAndSelfLink(self): + """Test PaginationNextAndSelfLink""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_pagination_next_and_self_link_links.py b/endpoint_test_results/test/test_pagination_next_and_self_link_links.py new file mode 100644 index 00000000..fb7271fe --- /dev/null +++ b/endpoint_test_results/test/test_pagination_next_and_self_link_links.py @@ -0,0 +1,68 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.pagination_next_and_self_link_links import PaginationNextAndSelfLinkLinks + +class TestPaginationNextAndSelfLinkLinks(unittest.TestCase): + """PaginationNextAndSelfLinkLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextAndSelfLinkLinks: + """Test PaginationNextAndSelfLinkLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextAndSelfLinkLinks` + """ + model = PaginationNextAndSelfLinkLinks() + if include_optional: + return PaginationNextAndSelfLinkLinks( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationNextAndSelfLinkLinks( + ) + """ + + def testPaginationNextAndSelfLinkLinks(self): + """Test PaginationNextAndSelfLinkLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_pagination_next_link.py b/endpoint_test_results/test/test_pagination_next_link.py new file mode 100644 index 00000000..30f632f7 --- /dev/null +++ b/endpoint_test_results/test/test_pagination_next_link.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.pagination_next_link import PaginationNextLink + +class TestPaginationNextLink(unittest.TestCase): + """PaginationNextLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextLink: + """Test PaginationNextLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextLink` + """ + model = PaginationNextLink() + if include_optional: + return PaginationNextLink( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return PaginationNextLink( + ) + """ + + def testPaginationNextLink(self): + """Test PaginationNextLink""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_pagination_next_link_links.py b/endpoint_test_results/test/test_pagination_next_link_links.py new file mode 100644 index 00000000..caa23bc9 --- /dev/null +++ b/endpoint_test_results/test/test_pagination_next_link_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.pagination_next_link_links import PaginationNextLinkLinks + +class TestPaginationNextLinkLinks(unittest.TestCase): + """PaginationNextLinkLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationNextLinkLinks: + """Test PaginationNextLinkLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationNextLinkLinks` + """ + model = PaginationNextLinkLinks() + if include_optional: + return PaginationNextLinkLinks( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationNextLinkLinks( + ) + """ + + def testPaginationNextLinkLinks(self): + """Test PaginationNextLinkLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_base_test_result.py b/endpoint_test_results/test/test_path_vis_base_test_result.py new file mode 100644 index 00000000..c461a0da --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_base_test_result.py @@ -0,0 +1,86 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_base_test_result import PathVisBaseTestResult + +class TestPathVisBaseTestResult(unittest.TestCase): + """PathVisBaseTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisBaseTestResult: + """Test PathVisBaseTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisBaseTestResult` + """ + model = PathVisBaseTestResult() + if include_optional: + return PathVisBaseTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + asn_details = endpoint_test_results.models.asn_details.AsnDetails( + as_name = 'ThousandEyes, Inc', + as_number = 394101, ), + server = 'www.google.com:443', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20' + ) + else: + return PathVisBaseTestResult( + ) + """ + + def testPathVisBaseTestResult(self): + """Test PathVisBaseTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_detail_dynamic_test_result.py b/endpoint_test_results/test/test_path_vis_detail_dynamic_test_result.py new file mode 100644 index 00000000..79fa3c7c --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_detail_dynamic_test_result.py @@ -0,0 +1,106 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_detail_dynamic_test_result import PathVisDetailDynamicTestResult + +class TestPathVisDetailDynamicTestResult(unittest.TestCase): + """PathVisDetailDynamicTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDetailDynamicTestResult: + """Test PathVisDetailDynamicTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDetailDynamicTestResult` + """ + model = PathVisDetailDynamicTestResult() + if include_optional: + return PathVisDetailDynamicTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + asn_details = endpoint_test_results.models.asn_details.AsnDetails( + as_name = 'ThousandEyes, Inc', + as_number = 394101, ), + server = 'www.google.com:443', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + path_traces = [ + endpoint_test_results.models.path_vis_route.PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + null + ], ) + ], + vpn_path_traces = [ + endpoint_test_results.models.path_vis_route.PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + null + ], ) + ], + application = 'webex', + webex = endpoint_test_results.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( + conference_id = '225817074608419375', + correlation_id = '22581707460321454', + local_sip_session_id = '22581707460321454', + remote_sip_session_id = '22581707460321454', ) + ) + else: + return PathVisDetailDynamicTestResult( + ) + """ + + def testPathVisDetailDynamicTestResult(self): + """Test PathVisDetailDynamicTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_detail_dynamic_test_results.py b/endpoint_test_results/test/test_path_vis_detail_dynamic_test_results.py new file mode 100644 index 00000000..03af5b1c --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_detail_dynamic_test_results.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults + +class TestPathVisDetailDynamicTestResults(unittest.TestCase): + """PathVisDetailDynamicTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDetailDynamicTestResults: + """Test PathVisDetailDynamicTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDetailDynamicTestResults` + """ + model = PathVisDetailDynamicTestResults() + if include_optional: + return PathVisDetailDynamicTestResults( + results = [ + null + ], + test = None + ) + else: + return PathVisDetailDynamicTestResults( + ) + """ + + def testPathVisDetailDynamicTestResults(self): + """Test PathVisDetailDynamicTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_detail_test_result.py b/endpoint_test_results/test/test_path_vis_detail_test_result.py new file mode 100644 index 00000000..2791aa04 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_detail_test_result.py @@ -0,0 +1,100 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_detail_test_result import PathVisDetailTestResult + +class TestPathVisDetailTestResult(unittest.TestCase): + """PathVisDetailTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDetailTestResult: + """Test PathVisDetailTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDetailTestResult` + """ + model = PathVisDetailTestResult() + if include_optional: + return PathVisDetailTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + asn_details = endpoint_test_results.models.asn_details.AsnDetails( + as_name = 'ThousandEyes, Inc', + as_number = 394101, ), + server = 'www.google.com:443', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + path_traces = [ + endpoint_test_results.models.path_vis_route.PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + null + ], ) + ], + vpn_path_traces = [ + endpoint_test_results.models.path_vis_route.PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + null + ], ) + ] + ) + else: + return PathVisDetailTestResult( + ) + """ + + def testPathVisDetailTestResult(self): + """Test PathVisDetailTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_detail_test_results.py b/endpoint_test_results/test/test_path_vis_detail_test_results.py new file mode 100644 index 00000000..2aba46c8 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_detail_test_results.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_detail_test_results import PathVisDetailTestResults + +class TestPathVisDetailTestResults(unittest.TestCase): + """PathVisDetailTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDetailTestResults: + """Test PathVisDetailTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDetailTestResults` + """ + model = PathVisDetailTestResults() + if include_optional: + return PathVisDetailTestResults( + results = [ + null + ], + test = None + ) + else: + return PathVisDetailTestResults( + ) + """ + + def testPathVisDetailTestResults(self): + """Test PathVisDetailTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_dynamic_test_result.py b/endpoint_test_results/test/test_path_vis_dynamic_test_result.py new file mode 100644 index 00000000..a3f4f5f2 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_dynamic_test_result.py @@ -0,0 +1,100 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_dynamic_test_result import PathVisDynamicTestResult + +class TestPathVisDynamicTestResult(unittest.TestCase): + """PathVisDynamicTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDynamicTestResult: + """Test PathVisDynamicTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDynamicTestResult` + """ + model = PathVisDynamicTestResult() + if include_optional: + return PathVisDynamicTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + asn_details = endpoint_test_results.models.asn_details.AsnDetails( + as_name = 'ThousandEyes, Inc', + as_number = 394101, ), + server = 'www.google.com:443', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + application = 'webex', + webex = endpoint_test_results.models.dynamic_base_test_result_webex.DynamicBaseTestResult_webex( + conference_id = '225817074608419375', + correlation_id = '22581707460321454', + local_sip_session_id = '22581707460321454', + remote_sip_session_id = '22581707460321454', ), + location = 'San Francisco Area', + path_traces = [ + endpoint_test_results.models.path_vis_endpoint.PathVisEndpoint( + ip_address = '196.40.106.237', + number_of_hops = 15, + path_id = '1230899668701775614109128428722974545787322404682781961521', + response_time = 1500, ) + ] + ) + else: + return PathVisDynamicTestResult( + ) + """ + + def testPathVisDynamicTestResult(self): + """Test PathVisDynamicTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_dynamic_test_results.py b/endpoint_test_results/test/test_path_vis_dynamic_test_results.py new file mode 100644 index 00000000..0681ac4e --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_dynamic_test_results.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_dynamic_test_results import PathVisDynamicTestResults + +class TestPathVisDynamicTestResults(unittest.TestCase): + """PathVisDynamicTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDynamicTestResults: + """Test PathVisDynamicTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDynamicTestResults` + """ + model = PathVisDynamicTestResults() + if include_optional: + return PathVisDynamicTestResults( + results = [ + null + ], + test = None + ) + else: + return PathVisDynamicTestResults( + ) + """ + + def testPathVisDynamicTestResults(self): + """Test PathVisDynamicTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_endpoint.py b/endpoint_test_results/test/test_path_vis_endpoint.py new file mode 100644 index 00000000..f4ea6b17 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_endpoint.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint + +class TestPathVisEndpoint(unittest.TestCase): + """PathVisEndpoint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisEndpoint: + """Test PathVisEndpoint + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisEndpoint` + """ + model = PathVisEndpoint() + if include_optional: + return PathVisEndpoint( + ip_address = '196.40.106.237', + number_of_hops = 15, + path_id = '1230899668701775614109128428722974545787322404682781961521', + response_time = 1500 + ) + else: + return PathVisEndpoint( + ) + """ + + def testPathVisEndpoint(self): + """Test PathVisEndpoint""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_hop.py b/endpoint_test_results/test/test_path_vis_hop.py new file mode 100644 index 00000000..ddc2cb60 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_hop.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_hop import PathVisHop + +class TestPathVisHop(unittest.TestCase): + """PathVisHop unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisHop: + """Test PathVisHop + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisHop` + """ + model = PathVisHop() + if include_optional: + return PathVisHop( + hop = 1, + ip_address = '196.40.106.237', + prefix = '196.40.96.0/20', + rdns = 'core-router1.cpt2.host-h.net', + network = 'HETZNER (Pty) Ltd (AS 37153)', + response_time = 1, + location = 'Cape Town, South Africa' + ) + else: + return PathVisHop( + ) + """ + + def testPathVisHop(self): + """Test PathVisHop""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_route.py b/endpoint_test_results/test/test_path_vis_route.py new file mode 100644 index 00000000..89e2f1fd --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_route.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_route import PathVisRoute + +class TestPathVisRoute(unittest.TestCase): + """PathVisRoute unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisRoute: + """Test PathVisRoute + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisRoute` + """ + model = PathVisRoute() + if include_optional: + return PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + null + ] + ) + else: + return PathVisRoute( + ) + """ + + def testPathVisRoute(self): + """Test PathVisRoute""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_test_result.py b/endpoint_test_results/test/test_path_vis_test_result.py new file mode 100644 index 00000000..a8982632 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_test_result.py @@ -0,0 +1,94 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_test_result import PathVisTestResult + +class TestPathVisTestResult(unittest.TestCase): + """PathVisTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisTestResult: + """Test PathVisTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisTestResult` + """ + model = PathVisTestResult() + if include_optional: + return PathVisTestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ), + asn_details = endpoint_test_results.models.asn_details.AsnDetails( + as_name = 'ThousandEyes, Inc', + as_number = 394101, ), + server = 'www.google.com:443', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + location = 'San Francisco Area', + path_traces = [ + endpoint_test_results.models.path_vis_endpoint.PathVisEndpoint( + ip_address = '196.40.106.237', + number_of_hops = 15, + path_id = '1230899668701775614109128428722974545787322404682781961521', + response_time = 1500, ) + ] + ) + else: + return PathVisTestResult( + ) + """ + + def testPathVisTestResult(self): + """Test PathVisTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_path_vis_test_results.py b/endpoint_test_results/test/test_path_vis_test_results.py new file mode 100644 index 00000000..486ea826 --- /dev/null +++ b/endpoint_test_results/test/test_path_vis_test_results.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.path_vis_test_results import PathVisTestResults + +class TestPathVisTestResults(unittest.TestCase): + """PathVisTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisTestResults: + """Test PathVisTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisTestResults` + """ + model = PathVisTestResults() + if include_optional: + return PathVisTestResults( + results = [ + null + ], + test = None + ) + else: + return PathVisTestResults( + ) + """ + + def testPathVisTestResults(self): + """Test PathVisTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_physical_memory_used_bytes.py b/endpoint_test_results/test/test_physical_memory_used_bytes.py similarity index 90% rename from endpoint/test_results_api/test/test_physical_memory_used_bytes.py rename to endpoint_test_results/test/test_physical_memory_used_bytes.py index b41d0d45..ced1fabd 100644 --- a/endpoint/test_results_api/test/test_physical_memory_used_bytes.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes +from endpoint_test_results.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes class TestPhysicalMemoryUsedBytes(unittest.TestCase): """PhysicalMemoryUsedBytes unit test stubs""" diff --git a/endpoint_test_results/test/test_platform.py b/endpoint_test_results/test/test_platform.py new file mode 100644 index 00000000..2ce6866d --- /dev/null +++ b/endpoint_test_results/test/test_platform.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.platform import Platform + +class TestPlatform(unittest.TestCase): + """Platform unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPlatform(self): + """Test Platform""" + # inst = Platform() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_post_fetch_dynamic_test_result_metrics200_response.py b/endpoint_test_results/test/test_post_fetch_dynamic_test_result_metrics200_response.py new file mode 100644 index 00000000..b98dd9c2 --- /dev/null +++ b/endpoint_test_results/test/test_post_fetch_dynamic_test_result_metrics200_response.py @@ -0,0 +1,66 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.post_fetch_dynamic_test_result_metrics200_response import PostFetchDynamicTestResultMetrics200Response + +class TestPostFetchDynamicTestResultMetrics200Response(unittest.TestCase): + """PostFetchDynamicTestResultMetrics200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PostFetchDynamicTestResultMetrics200Response: + """Test PostFetchDynamicTestResultMetrics200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PostFetchDynamicTestResultMetrics200Response` + """ + model = PostFetchDynamicTestResultMetrics200Response() + if include_optional: + return PostFetchDynamicTestResultMetrics200Response( + results = [ + null + ], + test = None, + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return PostFetchDynamicTestResultMetrics200Response( + ) + """ + + def testPostFetchDynamicTestResultMetrics200Response(self): + """Test PostFetchDynamicTestResultMetrics200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_post_fetch_test_result_metrics200_response.py b/endpoint_test_results/test/test_post_fetch_test_result_metrics200_response.py similarity index 84% rename from endpoint/test_results_api/test/test_post_fetch_test_result_metrics200_response.py rename to endpoint_test_results/test/test_post_fetch_test_result_metrics200_response.py index 49fa36c8..23839cb9 100644 --- a/endpoint/test_results_api/test/test_post_fetch_test_result_metrics200_response.py +++ b/endpoint_test_results/test/test_post_fetch_test_result_metrics200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response +from endpoint_test_results.models.post_fetch_test_result_metrics200_response import PostFetchTestResultMetrics200Response class TestPostFetchTestResultMetrics200Response(unittest.TestCase): """PostFetchTestResultMetrics200Response unit test stubs""" @@ -39,11 +38,12 @@ class TestPostFetchTestResultMetrics200Response(unittest.TestCase): results = [ null ], + total_hits = 12, test = None, start_date = '2022-07-17T22:00:54Z', end_date = '2022-07-18T22:00:54Z', - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/test_results_api/test/test_post_fetch_test_result_metrics_multi_test200_response.py b/endpoint_test_results/test/test_post_fetch_test_result_metrics_multi_test200_response.py similarity index 84% rename from endpoint/test_results_api/test/test_post_fetch_test_result_metrics_multi_test200_response.py rename to endpoint_test_results/test/test_post_fetch_test_result_metrics_multi_test200_response.py index 36656572..0e3420f8 100644 --- a/endpoint/test_results_api/test/test_post_fetch_test_result_metrics_multi_test200_response.py +++ b/endpoint_test_results/test/test_post_fetch_test_result_metrics_multi_test200_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response +from endpoint_test_results.models.post_fetch_test_result_metrics_multi_test200_response import PostFetchTestResultMetricsMultiTest200Response class TestPostFetchTestResultMetricsMultiTest200Response(unittest.TestCase): """PostFetchTestResultMetricsMultiTest200Response unit test stubs""" @@ -39,10 +38,11 @@ class TestPostFetchTestResultMetricsMultiTest200Response(unittest.TestCase): results = [ null ], + total_hits = 12, start_date = '2022-07-17T22:00:54Z', end_date = '2022-07-18T22:00:54Z', - links = test_results_api.models.pagination_next_link__links.PaginationNextLink__links( - next = test_results_api.models.link.Link( + links = endpoint_test_results.models.pagination_next_link__links.PaginationNextLink__links( + next = endpoint_test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint_test_results/test/test_query_window.py b/endpoint_test_results/test/test_query_window.py new file mode 100644 index 00000000..3adf8c6f --- /dev/null +++ b/endpoint_test_results/test/test_query_window.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.query_window import QueryWindow + +class TestQueryWindow(unittest.TestCase): + """QueryWindow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QueryWindow: + """Test QueryWindow + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QueryWindow` + """ + model = QueryWindow() + if include_optional: + return QueryWindow( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z' + ) + else: + return QueryWindow( + ) + """ + + def testQueryWindow(self): + """Test QueryWindow""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_real_user_test_coordinates.py b/endpoint_test_results/test/test_real_user_test_coordinates.py similarity index 90% rename from endpoint/test_results_api/test/test_real_user_test_coordinates.py rename to endpoint_test_results/test/test_real_user_test_coordinates.py index 5b45db4d..5ee5997f 100644 --- a/endpoint/test_results_api/test/test_real_user_test_coordinates.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_coordinates import RealUserTestCoordinates +from endpoint_test_results.models.real_user_test_coordinates import RealUserTestCoordinates class TestRealUserTestCoordinates(unittest.TestCase): """RealUserTestCoordinates unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_network.py b/endpoint_test_results/test/test_real_user_test_network.py similarity index 83% rename from endpoint/test_results_api/test/test_real_user_test_network.py rename to endpoint_test_results/test/test_real_user_test_network.py index f8b3116a..39fc3e2f 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network import RealUserTestNetwork +from endpoint_test_results.models.real_user_test_network import RealUserTestNetwork class TestRealUserTestNetwork(unittest.TestCase): """RealUserTestNetwork unit test stubs""" @@ -37,17 +36,17 @@ class TestRealUserTestNetwork(unittest.TestCase): if include_optional: return RealUserTestNetwork( network_profile = None, - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_real_user_test_network_gateway_ping.py b/endpoint_test_results/test/test_real_user_test_network_gateway_ping.py similarity index 91% rename from endpoint/test_results_api/test/test_real_user_test_network_gateway_ping.py rename to endpoint_test_results/test/test_real_user_test_network_gateway_ping.py index ac63ddc6..110351d5 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_gateway_ping.py +++ b/endpoint_test_results/test/test_real_user_test_network_gateway_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing +from endpoint_test_results.models.real_user_test_network_gateway_ping import RealUserTestNetworkGatewayPing class TestRealUserTestNetworkGatewayPing(unittest.TestCase): """RealUserTestNetworkGatewayPing unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_network_ping.py b/endpoint_test_results/test/test_real_user_test_network_ping.py similarity index 91% rename from endpoint/test_results_api/test/test_real_user_test_network_ping.py rename to endpoint_test_results/test/test_real_user_test_network_ping.py index 02be4278..927b8c9b 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_ping.py +++ b/endpoint_test_results/test/test_real_user_test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_ping import RealUserTestNetworkPing +from endpoint_test_results.models.real_user_test_network_ping import RealUserTestNetworkPing class TestRealUserTestNetworkPing(unittest.TestCase): """RealUserTestNetworkPing unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_network_result.py b/endpoint_test_results/test/test_real_user_test_network_result.py similarity index 78% rename from endpoint/test_results_api/test/test_real_user_test_network_result.py rename to endpoint_test_results/test/test_real_user_test_network_result.py index 2fbf0403..3a9998d9 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_result.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_result import RealUserTestNetworkResult +from endpoint_test_results.models.real_user_test_network_result import RealUserTestNetworkResult class TestRealUserTestNetworkResult(unittest.TestCase): """RealUserTestNetworkResult unit test stubs""" @@ -40,32 +39,32 @@ class TestRealUserTestNetworkResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', id = '07625:1490529480:aVDViw0i', round_id = 1384309800, - destination = test_results_api.models.network_metrics.NetworkMetrics( + destination = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), - vpn = test_results_api.models.network_metrics.NetworkMetrics( + vpn = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), - proxy = test_results_api.models.network_metrics.NetworkMetrics( + proxy = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_real_user_test_network_results.py b/endpoint_test_results/test/test_real_user_test_network_results.py similarity index 77% rename from endpoint/test_results_api/test/test_real_user_test_network_results.py rename to endpoint_test_results/test/test_real_user_test_network_results.py index a41dd666..2da2cbc1 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_results import RealUserTestNetworkResults +from endpoint_test_results.models.real_user_test_network_results import RealUserTestNetworkResults class TestRealUserTestNetworkResults(unittest.TestCase): """RealUserTestNetworkResults unit test stubs""" @@ -37,33 +36,33 @@ class TestRealUserTestNetworkResults(unittest.TestCase): if include_optional: return RealUserTestNetworkResults( results = [ - test_results_api.models.real_user_test_network_result.RealUserTestNetworkResult( + endpoint_test_results.models.real_user_test_network_result.RealUserTestNetworkResult( agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', date = '2022-07-17T22:00:54Z', id = '07625:1490529480:aVDViw0i', round_id = 1384309800, - destination = test_results_api.models.network_metrics.NetworkMetrics( + destination = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), - vpn = test_results_api.models.network_metrics.NetworkMetrics( + vpn = endpoint_test_results.models.network_metrics.NetworkMetrics( jitter = 46, latency = 150, loss = 0.1, target = '54.208.6.220', ), proxy = , - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_real_user_test_network_traceroute.py b/endpoint_test_results/test/test_real_user_test_network_traceroute.py similarity index 91% rename from endpoint/test_results_api/test/test_real_user_test_network_traceroute.py rename to endpoint_test_results/test/test_real_user_test_network_traceroute.py index c1a4eee5..24452e04 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_traceroute.py +++ b/endpoint_test_results/test/test_real_user_test_network_traceroute.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute +from endpoint_test_results.models.real_user_test_network_traceroute import RealUserTestNetworkTraceroute class TestRealUserTestNetworkTraceroute(unittest.TestCase): """RealUserTestNetworkTraceroute unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_network_vpn_ping.py b/endpoint_test_results/test/test_real_user_test_network_vpn_ping.py similarity index 91% rename from endpoint/test_results_api/test/test_real_user_test_network_vpn_ping.py rename to endpoint_test_results/test/test_real_user_test_network_vpn_ping.py index 0653a16e..e7ba0af0 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_vpn_ping.py +++ b/endpoint_test_results/test/test_real_user_test_network_vpn_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing +from endpoint_test_results.models.real_user_test_network_vpn_ping import RealUserTestNetworkVpnPing class TestRealUserTestNetworkVpnPing(unittest.TestCase): """RealUserTestNetworkVpnPing unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_network_vpn_traceroute.py b/endpoint_test_results/test/test_real_user_test_network_vpn_traceroute.py similarity index 90% rename from endpoint/test_results_api/test/test_real_user_test_network_vpn_traceroute.py rename to endpoint_test_results/test/test_real_user_test_network_vpn_traceroute.py index 44fdc00e..567c47f4 100644 --- a/endpoint/test_results_api/test/test_real_user_test_network_vpn_traceroute.py +++ b/endpoint_test_results/test/test_real_user_test_network_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute +from endpoint_test_results.models.real_user_test_network_vpn_traceroute import RealUserTestNetworkVpnTraceroute class TestRealUserTestNetworkVpnTraceroute(unittest.TestCase): """RealUserTestNetworkVpnTraceroute unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_page.py b/endpoint_test_results/test/test_real_user_test_page.py similarity index 86% rename from endpoint/test_results_api/test/test_real_user_test_page.py rename to endpoint_test_results/test/test_real_user_test_page.py index adb14c43..6b3f388b 100644 --- a/endpoint/test_results_api/test/test_real_user_test_page.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_page import RealUserTestPage +from endpoint_test_results.models.real_user_test_page import RealUserTestPage class TestRealUserTestPage(unittest.TestCase): """RealUserTestPage unit test stubs""" @@ -41,7 +40,7 @@ class TestRealUserTestPage(unittest.TestCase): page_url = 'https://app.thousandeyes.com/settings/integrations', load_date = '2022-07-17T22:00:54Z', response_code = 200, - page_timings = test_results_api.models.real_user_test_page_page_timings.RealUserTestPage_pageTimings( + page_timings = endpoint_test_results.models.real_user_test_page_page_timings.RealUserTestPage_pageTimings( on_content_load = 1483, on_load = 4569, ) ) diff --git a/endpoint/test_results_api/test/test_real_user_test_page_page_timings.py b/endpoint_test_results/test/test_real_user_test_page_page_timings.py similarity index 89% rename from endpoint/test_results_api/test/test_real_user_test_page_page_timings.py rename to endpoint_test_results/test/test_real_user_test_page_page_timings.py index 0f35d90a..cb1f228f 100644 --- a/endpoint/test_results_api/test/test_real_user_test_page_page_timings.py +++ b/endpoint_test_results/test/test_real_user_test_page_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_page_page_timings import RealUserTestPagePageTimings +from endpoint_test_results.models.real_user_test_page_page_timings import RealUserTestPagePageTimings class TestRealUserTestPagePageTimings(unittest.TestCase): """RealUserTestPagePageTimings unit test stubs""" diff --git a/endpoint/test_results_api/test/test_real_user_test_page_result.py b/endpoint_test_results/test/test_real_user_test_page_result.py similarity index 81% rename from endpoint/test_results_api/test/test_real_user_test_page_result.py rename to endpoint_test_results/test/test_real_user_test_page_result.py index efd17d67..9f705509 100644 --- a/endpoint/test_results_api/test/test_real_user_test_page_result.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_page_result import RealUserTestPageResult +from endpoint_test_results.models.real_user_test_page_result import RealUserTestPageResult class TestRealUserTestPageResult(unittest.TestCase): """RealUserTestPageResult unit test stubs""" @@ -41,24 +40,24 @@ class TestRealUserTestPageResult(unittest.TestCase): page_url = 'https://app.thousandeyes.com/settings/integrations', load_date = '2022-07-17T22:00:54Z', response_code = 200, - page_timings = test_results_api.models.real_user_test_page_page_timings.RealUserTestPage_pageTimings( + page_timings = endpoint_test_results.models.real_user_test_page_page_timings.RealUserTestPage_pageTimings( on_content_load = 1483, on_load = 4569, ), agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', id = '07625:1490529480:aVDViw0i', round_id = 1384309800, response_time = 240, - system_metrics = test_results_api.models.system_metrics.SystemMetrics( + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_real_user_test_page_results.py b/endpoint_test_results/test/test_real_user_test_page_results.py similarity index 90% rename from endpoint/test_results_api/test/test_real_user_test_page_results.py rename to endpoint_test_results/test/test_real_user_test_page_results.py index b91b54f1..dd85f3b6 100644 --- a/endpoint/test_results_api/test/test_real_user_test_page_results.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.real_user_test_page_results import RealUserTestPageResults +from endpoint_test_results.models.real_user_test_page_results import RealUserTestPageResults class TestRealUserTestPageResults(unittest.TestCase): """RealUserTestPageResults unit test stubs""" diff --git a/endpoint_test_results/test/test_self_links.py b/endpoint_test_results/test/test_self_links.py new file mode 100644 index 00000000..f272c9ae --- /dev/null +++ b/endpoint_test_results/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = endpoint_test_results.models.self_links__links.SelfLinks__links( + self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_self_links_links.py b/endpoint_test_results/test/test_self_links_links.py new file mode 100644 index 00000000..cc085e61 --- /dev/null +++ b/endpoint_test_results/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = endpoint_test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_severity.py b/endpoint_test_results/test/test_severity.py new file mode 100644 index 00000000..38234ef7 --- /dev/null +++ b/endpoint_test_results/test/test_severity.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.severity import Severity + +class TestSeverity(unittest.TestCase): + """Severity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSeverity(self): + """Test Severity""" + # inst = Severity() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_sort_order.py b/endpoint_test_results/test/test_sort_order.py new file mode 100644 index 00000000..e9964e43 --- /dev/null +++ b/endpoint_test_results/test/test_sort_order.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.sort_order import SortOrder + +class TestSortOrder(unittest.TestCase): + """SortOrder unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSortOrder(self): + """Test SortOrder""" + # inst = SortOrder() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_system_metrics.py b/endpoint_test_results/test/test_system_metrics.py similarity index 83% rename from endpoint/test_results_api/test/test_system_metrics.py rename to endpoint_test_results/test/test_system_metrics.py index ec23465e..8cb574d4 100644 --- a/endpoint/test_results_api/test/test_system_metrics.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.system_metrics import SystemMetrics +from endpoint_test_results.models.system_metrics import SystemMetrics class TestSystemMetrics(unittest.TestCase): """SystemMetrics unit test stubs""" @@ -38,14 +37,14 @@ class TestSystemMetrics(unittest.TestCase): return SystemMetrics( start_time_ms = 1581508857327, end_time_ms = 1581508867333, - cpu_utilization = test_results_api.models.cpu_utilization.CpuUtilization( + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( min = 0.22, max = 0.75, mean = 0.55, median = 0.61, std_dev = 0.01, count = 150, ), - physical_memory_used_bytes = test_results_api.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( min = 1.2, max = 2.5, mean = 1.77, diff --git a/endpoint/test_results_api/test/test_tcp_connect.py b/endpoint_test_results/test/test_tcp_connect.py similarity index 91% rename from endpoint/test_results_api/test/test_tcp_connect.py rename to endpoint_test_results/test/test_tcp_connect.py index 72edc400..2c510ede 100644 --- a/endpoint/test_results_api/test/test_tcp_connect.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tcp_connect import TcpConnect +from endpoint_test_results.models.tcp_connect import TcpConnect class TestTcpConnect(unittest.TestCase): """TcpConnect unit test stubs""" diff --git a/endpoint_test_results/test/test_test_interval.py b/endpoint_test_results/test/test_test_interval.py new file mode 100644 index 00000000..e3af81b5 --- /dev/null +++ b/endpoint_test_results/test/test_test_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_test_labels_inner.py b/endpoint_test_results/test/test_test_labels_inner.py new file mode 100644 index 00000000..43eab095 --- /dev/null +++ b/endpoint_test_results/test/test_test_labels_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.test_labels_inner import TestLabelsInner + +class TestTestLabelsInner(unittest.TestCase): + """TestLabelsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestLabelsInner: + """Test TestLabelsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestLabelsInner` + """ + model = TestLabelsInner() + if include_optional: + return TestLabelsInner( + label_id = '', + name = '', + is_builtin = True + ) + else: + return TestLabelsInner( + ) + """ + + def testTestLabelsInner(self): + """Test TestLabelsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_test_probe_mode_response.py b/endpoint_test_results/test/test_test_probe_mode_response.py new file mode 100644 index 00000000..99395bdd --- /dev/null +++ b/endpoint_test_results/test/test_test_probe_mode_response.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse + +class TestTestProbeModeResponse(unittest.TestCase): + """TestProbeModeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProbeModeResponse(self): + """Test TestProbeModeResponse""" + # inst = TestProbeModeResponse() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_test_result.py b/endpoint_test_results/test/test_test_result.py new file mode 100644 index 00000000..186cf4ad --- /dev/null +++ b/endpoint_test_results/test/test_test_result.py @@ -0,0 +1,80 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.test_result import TestResult + +class TestTestResult(unittest.TestCase): + """TestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestResult: + """Test TestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestResult` + """ + model = TestResult() + if include_optional: + return TestResult( + aid = '1234', + agent_id = '861b7557-cd57-4bbb-b648-00bddf88ef49', + round_id = 1384309800, + server_ip = '185.199.108.153', + network_profile = None, + system_metrics = endpoint_test_results.models.system_metrics.SystemMetrics( + start_time_ms = 1581508857327, + end_time_ms = 1581508867333, + cpu_utilization = endpoint_test_results.models.cpu_utilization.CpuUtilization( + min = 0.22, + max = 0.75, + mean = 0.55, + median = 0.61, + std_dev = 0.01, + count = 150, ), + physical_memory_used_bytes = endpoint_test_results.models.physical_memory_used_bytes.PhysicalMemoryUsedBytes( + min = 1.2, + max = 2.5, + mean = 1.77, + median = 1.85, + std_dev = 0.25, + count = 155, ), + physical_memory_total_bytes = 1024, ), + vpn_profile = endpoint_test_results.models.vpn_profile.VpnProfile( + vpn_client_addresses = ["184.81.113.85","13.129.91.62"], + vpn_client_network_range = [ + '9.88.37.27' + ], + vpn_gateway_address = '120.98.134.7', + vpn_type = 'cisco-anyconnect', ) + ) + else: + return TestResult( + ) + """ + + def testTestResult(self): + """Test TestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_test_ssl_version_id.py b/endpoint_test_results/test/test_test_ssl_version_id.py new file mode 100644 index 00000000..bb706a58 --- /dev/null +++ b/endpoint_test_results/test/test_test_ssl_version_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.test_ssl_version_id import TestSslVersionId + +class TestTestSslVersionId(unittest.TestCase): + """TestSslVersionId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestSslVersionId(self): + """Test TestSslVersionId""" + # inst = TestSslVersionId() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_tests_data_rounds_search.py b/endpoint_test_results/test/test_tests_data_rounds_search.py similarity index 76% rename from endpoint/test_results_api/test/test_tests_data_rounds_search.py rename to endpoint_test_results/test/test_tests_data_rounds_search.py index bd7ad644..b6dec649 100644 --- a/endpoint/test_results_api/test/test_tests_data_rounds_search.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tests_data_rounds_search import TestsDataRoundsSearch +from endpoint_test_results.models.tests_data_rounds_search import TestsDataRoundsSearch class TestTestsDataRoundsSearch(unittest.TestCase): """TestsDataRoundsSearch unit test stubs""" @@ -37,19 +36,19 @@ class TestTestsDataRoundsSearch(unittest.TestCase): if include_optional: return TestsDataRoundsSearch( search_sort = [ - test_results_api.models.tests_data_search_sort.TestsDataSearchSort( + endpoint_test_results.models.tests_data_search_sort.TestsDataSearchSort( sort = 'round-id', order = 'desc', ) ], - threshold_filter = test_results_api.models.tests_data_threshold_filters.TestsDataThresholdFilters( + threshold_filter = endpoint_test_results.models.tests_data_threshold_filters.TestsDataThresholdFilters( filters = [ - test_results_api.models.tests_data_threshold_filter.TestsDataThresholdFilter( + endpoint_test_results.models.tests_data_threshold_filter.TestsDataThresholdFilter( name = 'loss', value = 1.337, operator = 'gte', ) ], conditional_operator = 'and', ), - search_filters = test_results_api.models.tests_data_search_filter.TestsDataSearchFilter( + search_filters = endpoint_test_results.models.tests_data_search_filter.TestsDataSearchFilter( agent_id = [ '52455b09-ff1b-4849-8194-99026cc890e0' ], ) diff --git a/endpoint/test_results_api/test/test_tests_data_search_filter.py b/endpoint_test_results/test/test_tests_data_search_filter.py similarity index 90% rename from endpoint/test_results_api/test/test_tests_data_search_filter.py rename to endpoint_test_results/test/test_tests_data_search_filter.py index d3750051..f8e88170 100644 --- a/endpoint/test_results_api/test/test_tests_data_search_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tests_data_search_filter import TestsDataSearchFilter +from endpoint_test_results.models.tests_data_search_filter import TestsDataSearchFilter class TestTestsDataSearchFilter(unittest.TestCase): """TestsDataSearchFilter unit test stubs""" diff --git a/endpoint/test_results_api/test/test_tests_data_search_sort.py b/endpoint_test_results/test/test_tests_data_search_sort.py similarity index 90% rename from endpoint/test_results_api/test/test_tests_data_search_sort.py rename to endpoint_test_results/test/test_tests_data_search_sort.py index 91b40127..c8fb1462 100644 --- a/endpoint/test_results_api/test/test_tests_data_search_sort.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tests_data_search_sort import TestsDataSearchSort +from endpoint_test_results.models.tests_data_search_sort import TestsDataSearchSort class TestTestsDataSearchSort(unittest.TestCase): """TestsDataSearchSort unit test stubs""" diff --git a/endpoint/test_results_api/test/test_tests_data_search_sort_key.py b/endpoint_test_results/test/test_tests_data_search_sort_key.py similarity index 80% rename from endpoint/test_results_api/test/test_tests_data_search_sort_key.py rename to endpoint_test_results/test/test_tests_data_search_sort_key.py index 7747d1b5..7b696573 100644 --- a/endpoint/test_results_api/test/test_tests_data_search_sort_key.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tests_data_search_sort_key import TestsDataSearchSortKey +from endpoint_test_results.models.tests_data_search_sort_key import TestsDataSearchSortKey class TestTestsDataSearchSortKey(unittest.TestCase): """TestsDataSearchSortKey unit test stubs""" diff --git a/endpoint/test_results_api/test/test_tests_data_threshold_filter.py b/endpoint_test_results/test/test_tests_data_threshold_filter.py similarity index 90% rename from endpoint/test_results_api/test/test_tests_data_threshold_filter.py rename to endpoint_test_results/test/test_tests_data_threshold_filter.py index e48924a9..f84ee7ba 100644 --- a/endpoint/test_results_api/test/test_tests_data_threshold_filter.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tests_data_threshold_filter import TestsDataThresholdFilter +from endpoint_test_results.models.tests_data_threshold_filter import TestsDataThresholdFilter class TestTestsDataThresholdFilter(unittest.TestCase): """TestsDataThresholdFilter unit test stubs""" diff --git a/endpoint/test_results_api/test/test_tests_data_threshold_filters.py b/endpoint_test_results/test/test_tests_data_threshold_filters.py similarity index 86% rename from endpoint/test_results_api/test/test_tests_data_threshold_filters.py rename to endpoint_test_results/test/test_tests_data_threshold_filters.py index eb626dec..3869e4b2 100644 --- a/endpoint/test_results_api/test/test_tests_data_threshold_filters.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.tests_data_threshold_filters import TestsDataThresholdFilters +from endpoint_test_results.models.tests_data_threshold_filters import TestsDataThresholdFilters class TestTestsDataThresholdFilters(unittest.TestCase): """TestsDataThresholdFilters unit test stubs""" @@ -37,7 +36,7 @@ class TestTestsDataThresholdFilters(unittest.TestCase): if include_optional: return TestsDataThresholdFilters( filters = [ - test_results_api.models.tests_data_threshold_filter.TestsDataThresholdFilter( + endpoint_test_results.models.tests_data_threshold_filter.TestsDataThresholdFilter( name = 'loss', value = 1.337, operator = 'gte', ) diff --git a/endpoint/test_results_api/test/test_threshold_filter_name.py b/endpoint_test_results/test/test_threshold_filter_name.py similarity index 81% rename from endpoint/test_results_api/test/test_threshold_filter_name.py rename to endpoint_test_results/test/test_threshold_filter_name.py index 66966420..f50f958c 100644 --- a/endpoint/test_results_api/test/test_threshold_filter_name.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.threshold_filter_name import ThresholdFilterName +from endpoint_test_results.models.threshold_filter_name import ThresholdFilterName class TestThresholdFilterName(unittest.TestCase): """ThresholdFilterName unit test stubs""" diff --git a/endpoint_test_results/test/test_threshold_filter_operator.py b/endpoint_test_results/test/test_threshold_filter_operator.py new file mode 100644 index 00000000..d42fae32 --- /dev/null +++ b/endpoint_test_results/test/test_threshold_filter_operator.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.threshold_filter_operator import ThresholdFilterOperator + +class TestThresholdFilterOperator(unittest.TestCase): + """ThresholdFilterOperator unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testThresholdFilterOperator(self): + """Test ThresholdFilterOperator""" + # inst = ThresholdFilterOperator() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_traceroute.py b/endpoint_test_results/test/test_traceroute.py similarity index 92% rename from endpoint/test_results_api/test/test_traceroute.py rename to endpoint_test_results/test/test_traceroute.py index c23c75ac..77c3d1bb 100644 --- a/endpoint/test_results_api/test/test_traceroute.py +++ b/endpoint_test_results/test/test_traceroute.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.traceroute import Traceroute +from endpoint_test_results.models.traceroute import Traceroute class TestTraceroute(unittest.TestCase): """Traceroute unit test stubs""" diff --git a/endpoint/test_results_api/test/test_traceroute_hop.py b/endpoint_test_results/test/test_traceroute_hop.py similarity index 92% rename from endpoint/test_results_api/test/test_traceroute_hop.py rename to endpoint_test_results/test/test_traceroute_hop.py index 9929d72e..baead17d 100644 --- a/endpoint/test_results_api/test/test_traceroute_hop.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.traceroute_hop import TracerouteHop +from endpoint_test_results.models.traceroute_hop import TracerouteHop class TestTracerouteHop(unittest.TestCase): """TracerouteHop unit test stubs""" diff --git a/endpoint/test_results_api/test/test_trigger.py b/endpoint_test_results/test/test_trigger.py similarity index 82% rename from endpoint/test_results_api/test/test_trigger.py rename to endpoint_test_results/test/test_trigger.py index f34f51b7..8798f021 100644 --- a/endpoint/test_results_api/test/test_trigger.py +++ b/endpoint_test_results/test/test_trigger.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.trigger import Trigger +from endpoint_test_results.models.trigger import Trigger class TestTrigger(unittest.TestCase): """Trigger unit test stubs""" diff --git a/endpoint_test_results/test/test_unauthorized_error.py b/endpoint_test_results/test/test_unauthorized_error.py new file mode 100644 index 00000000..806d5791 --- /dev/null +++ b/endpoint_test_results/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_validation_error.py b/endpoint_test_results/test/test_validation_error.py new file mode 100644 index 00000000..56c5a9ed --- /dev/null +++ b/endpoint_test_results/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + endpoint_test_results.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_test_results/test/test_validation_error_all_of_errors.py b/endpoint_test_results/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..d6f351db --- /dev/null +++ b/endpoint_test_results/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/test_results_api/test/test_vpn_profile.py b/endpoint_test_results/test/test_vpn_profile.py similarity index 92% rename from endpoint/test_results_api/test/test_vpn_profile.py rename to endpoint_test_results/test/test_vpn_profile.py index 41908f84..42de6cf4 100644 --- a/endpoint/test_results_api/test/test_vpn_profile.py +++ b/endpoint_test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.vpn_profile import VpnProfile +from endpoint_test_results.models.vpn_profile import VpnProfile class TestVpnProfile(unittest.TestCase): """VpnProfile unit test stubs""" diff --git a/endpoint_test_results/test/test_vpn_type.py b/endpoint_test_results/test/test_vpn_type.py new file mode 100644 index 00000000..a5db686e --- /dev/null +++ b/endpoint_test_results/test/test_vpn_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_test_results.models.vpn_type import VpnType + +class TestVpnType(unittest.TestCase): + """VpnType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVpnType(self): + """Test VpnType""" + # inst = VpnType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/tests_api/.gitignore b/endpoint_tests/.gitignore similarity index 100% rename from endpoint/tests_api/.gitignore rename to endpoint_tests/.gitignore diff --git a/endpoint/tests_api/.openapi-generator-ignore b/endpoint_tests/.openapi-generator-ignore similarity index 100% rename from endpoint/tests_api/.openapi-generator-ignore rename to endpoint_tests/.openapi-generator-ignore diff --git a/endpoint_tests/.openapi-generator/FILES b/endpoint_tests/.openapi-generator/FILES new file mode 100644 index 00000000..5b072258 --- /dev/null +++ b/endpoint_tests/.openapi-generator/FILES @@ -0,0 +1,185 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AccountGroupId.md +docs/AlertDirection.md +docs/AlertRoundsViolationMode.md +docs/AlertRule.md +docs/AlertType.md +docs/DynamicTest.md +docs/DynamicTestLinks.md +docs/DynamicTestLinksSelf.md +docs/DynamicTestRequest.md +docs/DynamicTests.md +docs/DynamicTestsAgentToServerApi.md +docs/EndpointAgentLabelsSelectorConfig.md +docs/EndpointAgentSelectorConfig.md +docs/EndpointAgentToServerInstantTest.md +docs/EndpointAgentToServerTest.md +docs/EndpointAgentToServerTestRequest.md +docs/EndpointAgentToServerTests.md +docs/EndpointAllAgentsSelectorConfig.md +docs/EndpointDynamicTestUpdate.md +docs/EndpointHttpServerBaseTest.md +docs/EndpointHttpServerInstantTest.md +docs/EndpointHttpServerTest.md +docs/EndpointHttpServerTestRequest.md +docs/EndpointHttpServerTests.md +docs/EndpointHttpTestUpdate.md +docs/EndpointInstantTest.md +docs/EndpointNetworkTestUpdate.md +docs/EndpointScheduledTestType.md +docs/EndpointSpecificAgentsSelectorConfig.md +docs/EndpointTest.md +docs/EndpointTestAgentSelectorType.md +docs/EndpointTestAuthType.md +docs/EndpointTestLinks.md +docs/EndpointTestLinksSelf.md +docs/EndpointTestProtocol.md +docs/EndpointTests.md +docs/Error.md +docs/GetDynamicTestsList200Response.md +docs/GetEndpointAgentToserverTestsList200Response.md +docs/GetEndpointHttpserverTestsList200Response.md +docs/GetEndpointTestsList200Response.md +docs/Link.md +docs/ListEndpointScheduledTestsApi.md +docs/ScheduledTestsAgentToServerApi.md +docs/ScheduledTestsHTTPServerApi.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/Severity.md +docs/TestInterval.md +docs/TestLabelsInner.md +docs/TestProbeMode.md +docs/TestProbeModeResponse.md +docs/TestSslVersionId.md +docs/TestUpdate.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +endpoint_tests/__init__.py +endpoint_tests/api/__init__.py +endpoint_tests/api/dynamic_tests_agent_to_server_api.py +endpoint_tests/api/list_endpoint_scheduled_tests_api.py +endpoint_tests/api/scheduled_tests_agent_to_server_api.py +endpoint_tests/api/scheduled_tests_http_server_api.py +endpoint_tests/api_client.py +endpoint_tests/api_response.py +endpoint_tests/configuration.py +endpoint_tests/exceptions.py +endpoint_tests/models/__init__.py +endpoint_tests/models/account_group_id.py +endpoint_tests/models/alert_direction.py +endpoint_tests/models/alert_rounds_violation_mode.py +endpoint_tests/models/alert_rule.py +endpoint_tests/models/alert_type.py +endpoint_tests/models/dynamic_test.py +endpoint_tests/models/dynamic_test_links.py +endpoint_tests/models/dynamic_test_links_self.py +endpoint_tests/models/dynamic_test_request.py +endpoint_tests/models/dynamic_tests.py +endpoint_tests/models/endpoint_agent_labels_selector_config.py +endpoint_tests/models/endpoint_agent_selector_config.py +endpoint_tests/models/endpoint_agent_to_server_instant_test.py +endpoint_tests/models/endpoint_agent_to_server_test.py +endpoint_tests/models/endpoint_agent_to_server_test_request.py +endpoint_tests/models/endpoint_agent_to_server_tests.py +endpoint_tests/models/endpoint_all_agents_selector_config.py +endpoint_tests/models/endpoint_dynamic_test_update.py +endpoint_tests/models/endpoint_http_server_base_test.py +endpoint_tests/models/endpoint_http_server_instant_test.py +endpoint_tests/models/endpoint_http_server_test.py +endpoint_tests/models/endpoint_http_server_test_request.py +endpoint_tests/models/endpoint_http_server_tests.py +endpoint_tests/models/endpoint_http_test_update.py +endpoint_tests/models/endpoint_instant_test.py +endpoint_tests/models/endpoint_network_test_update.py +endpoint_tests/models/endpoint_scheduled_test_type.py +endpoint_tests/models/endpoint_specific_agents_selector_config.py +endpoint_tests/models/endpoint_test.py +endpoint_tests/models/endpoint_test_agent_selector_type.py +endpoint_tests/models/endpoint_test_auth_type.py +endpoint_tests/models/endpoint_test_links.py +endpoint_tests/models/endpoint_test_links_self.py +endpoint_tests/models/endpoint_test_protocol.py +endpoint_tests/models/endpoint_tests.py +endpoint_tests/models/error.py +endpoint_tests/models/get_dynamic_tests_list200_response.py +endpoint_tests/models/get_endpoint_agent_toserver_tests_list200_response.py +endpoint_tests/models/get_endpoint_httpserver_tests_list200_response.py +endpoint_tests/models/get_endpoint_tests_list200_response.py +endpoint_tests/models/link.py +endpoint_tests/models/self_links.py +endpoint_tests/models/self_links_links.py +endpoint_tests/models/severity.py +endpoint_tests/models/test_interval.py +endpoint_tests/models/test_labels_inner.py +endpoint_tests/models/test_probe_mode.py +endpoint_tests/models/test_probe_mode_response.py +endpoint_tests/models/test_ssl_version_id.py +endpoint_tests/models/test_update.py +endpoint_tests/models/unauthorized_error.py +endpoint_tests/models/validation_error.py +endpoint_tests/models/validation_error_all_of_errors.py +endpoint_tests/py.typed +endpoint_tests/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_account_group_id.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_links_self.py +test/test_dynamic_test_request.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_links_self.py +test/test_endpoint_test_protocol.py +test/test_endpoint_tests.py +test/test_error.py +test/test_get_dynamic_tests_list200_response.py +test/test_get_endpoint_agent_toserver_tests_list200_response.py +test/test_get_endpoint_httpserver_tests_list200_response.py +test/test_get_endpoint_tests_list200_response.py +test/test_link.py +test/test_self_links.py +test/test_self_links_links.py +test/test_severity.py +test/test_test_interval.py +test/test_test_labels_inner.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_all_of_errors.py diff --git a/endpoint_tests/.openapi-generator/VERSION b/endpoint_tests/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/endpoint_tests/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/endpoint_tests/README.md b/endpoint_tests/README.md new file mode 100644 index 00000000..7802fe4a --- /dev/null +++ b/endpoint_tests/README.md @@ -0,0 +1,188 @@ +# endpoint-tests + +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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import endpoint_tests +``` + +### 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 endpoint_tests +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import endpoint_tests +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 ApiException as e: + print("Exception when calling DynamicTestsAgentToServerApi->delete_endpoint_dynamic_test: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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_toserver_tests_list**](docs/ScheduledTestsAgentToServerApi.md#get_endpoint_agent_toserver_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 + + +## Documentation For Models + + - [AccountGroupId](docs/AccountGroupId.md) + - [AlertDirection](docs/AlertDirection.md) + - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) + - [AlertRule](docs/AlertRule.md) + - [AlertType](docs/AlertType.md) + - [DynamicTest](docs/DynamicTest.md) + - [DynamicTestLinks](docs/DynamicTestLinks.md) + - [DynamicTestLinksSelf](docs/DynamicTestLinksSelf.md) + - [DynamicTestRequest](docs/DynamicTestRequest.md) + - [DynamicTests](docs/DynamicTests.md) + - [EndpointAgentLabelsSelectorConfig](docs/EndpointAgentLabelsSelectorConfig.md) + - [EndpointAgentSelectorConfig](docs/EndpointAgentSelectorConfig.md) + - [EndpointAgentToServerInstantTest](docs/EndpointAgentToServerInstantTest.md) + - [EndpointAgentToServerTest](docs/EndpointAgentToServerTest.md) + - [EndpointAgentToServerTestRequest](docs/EndpointAgentToServerTestRequest.md) + - [EndpointAgentToServerTests](docs/EndpointAgentToServerTests.md) + - [EndpointAllAgentsSelectorConfig](docs/EndpointAllAgentsSelectorConfig.md) + - [EndpointDynamicTestUpdate](docs/EndpointDynamicTestUpdate.md) + - [EndpointHttpServerBaseTest](docs/EndpointHttpServerBaseTest.md) + - [EndpointHttpServerInstantTest](docs/EndpointHttpServerInstantTest.md) + - [EndpointHttpServerTest](docs/EndpointHttpServerTest.md) + - [EndpointHttpServerTestRequest](docs/EndpointHttpServerTestRequest.md) + - [EndpointHttpServerTests](docs/EndpointHttpServerTests.md) + - [EndpointHttpTestUpdate](docs/EndpointHttpTestUpdate.md) + - [EndpointInstantTest](docs/EndpointInstantTest.md) + - [EndpointNetworkTestUpdate](docs/EndpointNetworkTestUpdate.md) + - [EndpointScheduledTestType](docs/EndpointScheduledTestType.md) + - [EndpointSpecificAgentsSelectorConfig](docs/EndpointSpecificAgentsSelectorConfig.md) + - [EndpointTest](docs/EndpointTest.md) + - [EndpointTestAgentSelectorType](docs/EndpointTestAgentSelectorType.md) + - [EndpointTestAuthType](docs/EndpointTestAuthType.md) + - [EndpointTestLinks](docs/EndpointTestLinks.md) + - [EndpointTestLinksSelf](docs/EndpointTestLinksSelf.md) + - [EndpointTestProtocol](docs/EndpointTestProtocol.md) + - [EndpointTests](docs/EndpointTests.md) + - [Error](docs/Error.md) + - [GetDynamicTestsList200Response](docs/GetDynamicTestsList200Response.md) + - [GetEndpointAgentToserverTestsList200Response](docs/GetEndpointAgentToserverTestsList200Response.md) + - [GetEndpointHttpserverTestsList200Response](docs/GetEndpointHttpserverTestsList200Response.md) + - [GetEndpointTestsList200Response](docs/GetEndpointTestsList200Response.md) + - [Link](docs/Link.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [Severity](docs/Severity.md) + - [TestInterval](docs/TestInterval.md) + - [TestLabelsInner](docs/TestLabelsInner.md) + - [TestProbeMode](docs/TestProbeMode.md) + - [TestProbeModeResponse](docs/TestProbeModeResponse.md) + - [TestSslVersionId](docs/TestSslVersionId.md) + - [TestUpdate](docs/TestUpdate.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/endpoint_tests/docs/AccountGroupId.md b/endpoint_tests/docs/AccountGroupId.md new file mode 100644 index 00000000..c9448a96 --- /dev/null +++ b/endpoint_tests/docs/AccountGroupId.md @@ -0,0 +1,29 @@ +# AccountGroupId + + +## 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] + +## Example + +```python +from endpoint_tests.models.account_group_id import AccountGroupId + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupId from a JSON string +account_group_id_instance = AccountGroupId.from_json(json) +# print the JSON string representation of the object +print(AccountGroupId.to_json()) + +# convert the object into a dict +account_group_id_dict = account_group_id_instance.to_dict() +# create an instance of AccountGroupId from a dict +account_group_id_from_dict = AccountGroupId.from_dict(account_group_id_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/endpoint_tests/docs/AlertDirection.md b/endpoint_tests/docs/AlertDirection.md new file mode 100644 index 00000000..8902e9bf --- /dev/null +++ b/endpoint_tests/docs/AlertDirection.md @@ -0,0 +1,12 @@ +# AlertDirection + +Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + +## 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/endpoint_tests/docs/AlertRoundsViolationMode.md b/endpoint_tests/docs/AlertRoundsViolationMode.md new file mode 100644 index 00000000..efe78921 --- /dev/null +++ b/endpoint_tests/docs/AlertRoundsViolationMode.md @@ -0,0 +1,12 @@ +# AlertRoundsViolationMode + +`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + +## 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/endpoint_tests/docs/AlertRule.md b/endpoint_tests/docs/AlertRule.md new file mode 100644 index 00000000..1aeca62a --- /dev/null +++ b/endpoint_tests/docs/AlertRule.md @@ -0,0 +1,40 @@ +# AlertRule + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] +**rule_name** | **str** | Name of the alert rule | [optional] [readonly] +**expression** | **str** | String expression of alert rule | [optional] [readonly] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] +**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] +**alert_type** | [**AlertType**](AlertType.md) | | [optional] +**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] +**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] +**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] +**severity** | [**Severity**](Severity.md) | | [optional] + +## Example + +```python +from endpoint_tests.models.alert_rule import AlertRule + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertRule from a JSON string +alert_rule_instance = AlertRule.from_json(json) +# print the JSON string representation of the object +print(AlertRule.to_json()) + +# convert the object into a dict +alert_rule_dict = alert_rule_instance.to_dict() +# create an instance of AlertRule from a dict +alert_rule_from_dict = AlertRule.from_dict(alert_rule_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/endpoint_tests/docs/AlertType.md b/endpoint_tests/docs/AlertType.md new file mode 100644 index 00000000..cde41743 --- /dev/null +++ b/endpoint_tests/docs/AlertType.md @@ -0,0 +1,12 @@ +# AlertType + +Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + +## 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/endpoint_tests/docs/DynamicTest.md b/endpoint_tests/docs/DynamicTest.md new file mode 100644 index 00000000..53f2e399 --- /dev/null +++ b/endpoint_tests/docs/DynamicTest.md @@ -0,0 +1,45 @@ +# DynamicTest + + +## 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] +**links** | [**DynamicTestLinks**](DynamicTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**test_id** | **str** | Each test is assigned a unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_tests.models.dynamic_test import DynamicTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicTest from a JSON string +dynamic_test_instance = DynamicTest.from_json(json) +# print the JSON string representation of the object +print(DynamicTest.to_json()) + +# convert the object into a dict +dynamic_test_dict = dynamic_test_instance.to_dict() +# create an instance of DynamicTest from a dict +dynamic_test_from_dict = DynamicTest.from_dict(dynamic_test_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/endpoint_tests/docs/DynamicTestLinks.md b/endpoint_tests/docs/DynamicTestLinks.md new file mode 100644 index 00000000..76f49b8d --- /dev/null +++ b/endpoint_tests/docs/DynamicTestLinks.md @@ -0,0 +1,31 @@ +# DynamicTestLinks + +A list of links that can be accessed to get more information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**DynamicTestLinksSelf**](DynamicTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from endpoint_tests.models.dynamic_test_links import DynamicTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicTestLinks from a JSON string +dynamic_test_links_instance = DynamicTestLinks.from_json(json) +# print the JSON string representation of the object +print(DynamicTestLinks.to_json()) + +# convert the object into a dict +dynamic_test_links_dict = dynamic_test_links_instance.to_dict() +# create an instance of DynamicTestLinks from a dict +dynamic_test_links_from_dict = DynamicTestLinks.from_dict(dynamic_test_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/endpoint_tests/docs/DynamicTestLinksSelf.md b/endpoint_tests/docs/DynamicTestLinksSelf.md new file mode 100644 index 00000000..f3212dec --- /dev/null +++ b/endpoint_tests/docs/DynamicTestLinksSelf.md @@ -0,0 +1,36 @@ +# DynamicTestLinksSelf + + +## 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 endpoint_tests.models.dynamic_test_links_self import DynamicTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicTestLinksSelf from a JSON string +dynamic_test_links_self_instance = DynamicTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(DynamicTestLinksSelf.to_json()) + +# convert the object into a dict +dynamic_test_links_self_dict = dynamic_test_links_self_instance.to_dict() +# create an instance of DynamicTestLinksSelf from a dict +dynamic_test_links_self_from_dict = DynamicTestLinksSelf.from_dict(dynamic_test_links_self_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/endpoint/tests_api/docs/DynamicTestRequest.md b/endpoint_tests/docs/DynamicTestRequest.md similarity index 76% rename from endpoint/tests_api/docs/DynamicTestRequest.md rename to endpoint_tests/docs/DynamicTestRequest.md index ab98b95f..0f68bff7 100644 --- a/endpoint/tests_api/docs/DynamicTestRequest.md +++ b/endpoint_tests/docs/DynamicTestRequest.md @@ -2,24 +2,26 @@ ## 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] **links** | [**DynamicTestLinks**](DynamicTestLinks.md) | | [optional] **agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] -**application** | [**DynamicTestApplication**](DynamicTestApplication.md) | | [optional] +**application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] **created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] **interval** | [**TestInterval**](TestInterval.md) | | [optional] -**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [readonly] [default to True] -**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] [readonly] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] **has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] **has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] **modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] **test_id** | **str** | Each test is assigned a unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**aid** | [**EndpointTestAid**](EndpointTestAid.md) | | [optional] **test_name** | **str** | Name of the test. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | [optional] **agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] **endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] @@ -28,19 +30,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.dynamic_test_request import DynamicTestRequest +from endpoint_tests.models.dynamic_test_request import DynamicTestRequest # TODO update the JSON string below json = "{}" # create an instance of DynamicTestRequest from a JSON string dynamic_test_request_instance = DynamicTestRequest.from_json(json) # print the JSON string representation of the object -print DynamicTestRequest.to_json() +print(DynamicTestRequest.to_json()) # convert the object into a dict dynamic_test_request_dict = dynamic_test_request_instance.to_dict() # create an instance of DynamicTestRequest from a dict -dynamic_test_request_form_dict = dynamic_test_request.from_dict(dynamic_test_request_dict) +dynamic_test_request_from_dict = DynamicTestRequest.from_dict(dynamic_test_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/endpoint/tests_api/docs/DynamicTests.md b/endpoint_tests/docs/DynamicTests.md similarity index 82% rename from endpoint/tests_api/docs/DynamicTests.md rename to endpoint_tests/docs/DynamicTests.md index faf60540..d68b978c 100644 --- a/endpoint/tests_api/docs/DynamicTests.md +++ b/endpoint_tests/docs/DynamicTests.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[DynamicTest]**](DynamicTest.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.dynamic_tests import DynamicTests +from endpoint_tests.models.dynamic_tests import DynamicTests # TODO update the JSON string below json = "{}" # create an instance of DynamicTests from a JSON string dynamic_tests_instance = DynamicTests.from_json(json) # print the JSON string representation of the object -print DynamicTests.to_json() +print(DynamicTests.to_json()) # convert the object into a dict dynamic_tests_dict = dynamic_tests_instance.to_dict() # create an instance of DynamicTests from a dict -dynamic_tests_form_dict = dynamic_tests.from_dict(dynamic_tests_dict) +dynamic_tests_from_dict = DynamicTests.from_dict(dynamic_tests_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/endpoint_tests/docs/DynamicTestsAgentToServerApi.md b/endpoint_tests/docs/DynamicTestsAgentToServerApi.md new file mode 100644 index 00000000..a4327581 --- /dev/null +++ b/endpoint_tests/docs/DynamicTestsAgentToServerApi.md @@ -0,0 +1,449 @@ +# endpoint_tests.DynamicTestsAgentToServerApi + +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 + + +# **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 endpoint_tests +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 endpoint_tests +from endpoint_tests.models.dynamic_test import DynamicTest +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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** +> GetDynamicTestsList200Response 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 endpoint_tests +from endpoint_tests.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 + +[**GetDynamicTestsList200Response**](GetDynamicTestsList200Response.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 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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_tests +from endpoint_tests.models.dynamic_test import DynamicTest +from endpoint_tests.models.dynamic_test_request import DynamicTestRequest +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_tests.DynamicTestsAgentToServerApi(api_client) + dynamic_test_request = 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: + # 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") + pprint(api_response) + except Exception as e: + print("Exception when calling DynamicTestsAgentToServerApi->post_dynamic_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dynamic_test_request** | [**DynamicTestRequest**](DynamicTestRequest.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 + +[**DynamicTest**](DynamicTest.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 | - | +**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) + +# **update_endpoint_dynamic_test_detail** +> DynamicTest update_endpoint_dynamic_test_detail(test_id, endpoint_dynamic_test_update, aid=aid) + +Update agent to server dynamic test + +Updates an agent to server endpoint dynamic test. Includes support for enabling and disabling the test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_tests +from endpoint_tests.models.dynamic_test import DynamicTest +from endpoint_tests.models.endpoint_dynamic_test_update import EndpointDynamicTestUpdate +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_tests.DynamicTestsAgentToServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + endpoint_dynamic_test_update = endpoint_tests.EndpointDynamicTestUpdate() # EndpointDynamicTestUpdate | + 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling DynamicTestsAgentToServerApi->update_endpoint_dynamic_test_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **endpoint_dynamic_test_update** | [**EndpointDynamicTestUpdate**](EndpointDynamicTestUpdate.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 + +[**DynamicTest**](DynamicTest.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 | - | +**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) + diff --git a/endpoint_tests/docs/EndpointAgentLabelsSelectorConfig.md b/endpoint_tests/docs/EndpointAgentLabelsSelectorConfig.md new file mode 100644 index 00000000..c2738c11 --- /dev/null +++ b/endpoint_tests/docs/EndpointAgentLabelsSelectorConfig.md @@ -0,0 +1,32 @@ +# EndpointAgentLabelsSelectorConfig + +Agent labels selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentLabelsSelectorConfig from a JSON string +endpoint_agent_labels_selector_config_instance = EndpointAgentLabelsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentLabelsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_agent_labels_selector_config_dict = endpoint_agent_labels_selector_config_instance.to_dict() +# create an instance of EndpointAgentLabelsSelectorConfig from a dict +endpoint_agent_labels_selector_config_from_dict = EndpointAgentLabelsSelectorConfig.from_dict(endpoint_agent_labels_selector_config_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/endpoint_tests/docs/EndpointAgentSelectorConfig.md b/endpoint_tests/docs/EndpointAgentSelectorConfig.md new file mode 100644 index 00000000..2acd9744 --- /dev/null +++ b/endpoint_tests/docs/EndpointAgentSelectorConfig.md @@ -0,0 +1,33 @@ +# EndpointAgentSelectorConfig + +Agents selection object based on agentSelectorType. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentSelectorConfig from a JSON string +endpoint_agent_selector_config_instance = EndpointAgentSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_agent_selector_config_dict = endpoint_agent_selector_config_instance.to_dict() +# create an instance of EndpointAgentSelectorConfig from a dict +endpoint_agent_selector_config_from_dict = EndpointAgentSelectorConfig.from_dict(endpoint_agent_selector_config_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/endpoint_tests/docs/EndpointAgentToServerInstantTest.md b/endpoint_tests/docs/EndpointAgentToServerInstantTest.md new file mode 100644 index 00000000..0ecf0584 --- /dev/null +++ b/endpoint_tests/docs/EndpointAgentToServerInstantTest.md @@ -0,0 +1,37 @@ +# EndpointAgentToServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**max_machines** | **int** | Maximum number of agents which can execute the test. | +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**test_name** | **str** | Name of the test. | +**server_name** | **str** | A server address without a protocol or IP address. | + +## Example + +```python +from endpoint_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentToServerInstantTest from a JSON string +endpoint_agent_to_server_instant_test_instance = EndpointAgentToServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentToServerInstantTest.to_json()) + +# convert the object into a dict +endpoint_agent_to_server_instant_test_dict = endpoint_agent_to_server_instant_test_instance.to_dict() +# create an instance of EndpointAgentToServerInstantTest from a dict +endpoint_agent_to_server_instant_test_from_dict = EndpointAgentToServerInstantTest.from_dict(endpoint_agent_to_server_instant_test_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/endpoint_tests/docs/EndpointAgentToServerTest.md b/endpoint_tests/docs/EndpointAgentToServerTest.md new file mode 100644 index 00000000..b65ef799 --- /dev/null +++ b/endpoint_tests/docs/EndpointAgentToServerTest.md @@ -0,0 +1,47 @@ +# EndpointAgentToServerTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAgentToServerTest from a JSON string +endpoint_agent_to_server_test_instance = EndpointAgentToServerTest.from_json(json) +# print the JSON string representation of the object +print(EndpointAgentToServerTest.to_json()) + +# convert the object into a dict +endpoint_agent_to_server_test_dict = endpoint_agent_to_server_test_instance.to_dict() +# create an instance of EndpointAgentToServerTest from a dict +endpoint_agent_to_server_test_from_dict = EndpointAgentToServerTest.from_dict(endpoint_agent_to_server_test_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/endpoint/tests_api/docs/EndpointAgentToServerTestRequest.md b/endpoint_tests/docs/EndpointAgentToServerTestRequest.md similarity index 87% rename from endpoint/tests_api/docs/EndpointAgentToServerTestRequest.md rename to endpoint_tests/docs/EndpointAgentToServerTestRequest.md index e87bba80..71507bab 100644 --- a/endpoint/tests_api/docs/EndpointAgentToServerTestRequest.md +++ b/endpoint_tests/docs/EndpointAgentToServerTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | @@ -18,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest +from endpoint_tests.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentToServerTestRequest from a JSON string endpoint_agent_to_server_test_request_instance = EndpointAgentToServerTestRequest.from_json(json) # print the JSON string representation of the object -print EndpointAgentToServerTestRequest.to_json() +print(EndpointAgentToServerTestRequest.to_json()) # convert the object into a dict endpoint_agent_to_server_test_request_dict = endpoint_agent_to_server_test_request_instance.to_dict() # create an instance of EndpointAgentToServerTestRequest from a dict -endpoint_agent_to_server_test_request_form_dict = endpoint_agent_to_server_test_request.from_dict(endpoint_agent_to_server_test_request_dict) +endpoint_agent_to_server_test_request_from_dict = EndpointAgentToServerTestRequest.from_dict(endpoint_agent_to_server_test_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/endpoint/tests_api/docs/EndpointAgentToServerTests.md b/endpoint_tests/docs/EndpointAgentToServerTests.md similarity index 77% rename from endpoint/tests_api/docs/EndpointAgentToServerTests.md rename to endpoint_tests/docs/EndpointAgentToServerTests.md index 3db44741..4e836351 100644 --- a/endpoint/tests_api/docs/EndpointAgentToServerTests.md +++ b/endpoint_tests/docs/EndpointAgentToServerTests.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[EndpointAgentToServerTest]**](EndpointAgentToServerTest.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests +from endpoint_tests.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentToServerTests from a JSON string endpoint_agent_to_server_tests_instance = EndpointAgentToServerTests.from_json(json) # print the JSON string representation of the object -print EndpointAgentToServerTests.to_json() +print(EndpointAgentToServerTests.to_json()) # convert the object into a dict endpoint_agent_to_server_tests_dict = endpoint_agent_to_server_tests_instance.to_dict() # create an instance of EndpointAgentToServerTests from a dict -endpoint_agent_to_server_tests_form_dict = endpoint_agent_to_server_tests.from_dict(endpoint_agent_to_server_tests_dict) +endpoint_agent_to_server_tests_from_dict = EndpointAgentToServerTests.from_dict(endpoint_agent_to_server_tests_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/endpoint_tests/docs/EndpointAllAgentsSelectorConfig.md b/endpoint_tests/docs/EndpointAllAgentsSelectorConfig.md new file mode 100644 index 00000000..d24362aa --- /dev/null +++ b/endpoint_tests/docs/EndpointAllAgentsSelectorConfig.md @@ -0,0 +1,31 @@ +# EndpointAllAgentsSelectorConfig + +Any agent selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointAllAgentsSelectorConfig from a JSON string +endpoint_all_agents_selector_config_instance = EndpointAllAgentsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointAllAgentsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_all_agents_selector_config_dict = endpoint_all_agents_selector_config_instance.to_dict() +# create an instance of EndpointAllAgentsSelectorConfig from a dict +endpoint_all_agents_selector_config_from_dict = EndpointAllAgentsSelectorConfig.from_dict(endpoint_all_agents_selector_config_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/endpoint_tests/docs/EndpointDynamicTestUpdate.md b/endpoint_tests/docs/EndpointDynamicTestUpdate.md new file mode 100644 index 00000000..70f8817f --- /dev/null +++ b/endpoint_tests/docs/EndpointDynamicTestUpdate.md @@ -0,0 +1,34 @@ +# EndpointDynamicTestUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**test_name** | **str** | Name of the test. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_dynamic_test_update import EndpointDynamicTestUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointDynamicTestUpdate from a JSON string +endpoint_dynamic_test_update_instance = EndpointDynamicTestUpdate.from_json(json) +# print the JSON string representation of the object +print(EndpointDynamicTestUpdate.to_json()) + +# convert the object into a dict +endpoint_dynamic_test_update_dict = endpoint_dynamic_test_update_instance.to_dict() +# create an instance of EndpointDynamicTestUpdate from a dict +endpoint_dynamic_test_update_from_dict = EndpointDynamicTestUpdate.from_dict(endpoint_dynamic_test_update_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/endpoint_tests/docs/EndpointHttpServerBaseTest.md b/endpoint_tests/docs/EndpointHttpServerBaseTest.md new file mode 100644 index 00000000..c1bc1b77 --- /dev/null +++ b/endpoint_tests/docs/EndpointHttpServerBaseTest.md @@ -0,0 +1,37 @@ +# EndpointHttpServerBaseTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerBaseTest from a JSON string +endpoint_http_server_base_test_instance = EndpointHttpServerBaseTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerBaseTest.to_json()) + +# convert the object into a dict +endpoint_http_server_base_test_dict = endpoint_http_server_base_test_instance.to_dict() +# create an instance of EndpointHttpServerBaseTest from a dict +endpoint_http_server_base_test_from_dict = EndpointHttpServerBaseTest.from_dict(endpoint_http_server_base_test_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/endpoint_tests/docs/EndpointHttpServerInstantTest.md b/endpoint_tests/docs/EndpointHttpServerInstantTest.md new file mode 100644 index 00000000..3eb593db --- /dev/null +++ b/endpoint_tests/docs/EndpointHttpServerInstantTest.md @@ -0,0 +1,47 @@ +# EndpointHttpServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**max_machines** | **int** | Maximum number of agents which can execute the test. | +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**test_name** | **str** | Name of the test. | +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | +**target_response_time** | **int** | Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red). | +**password** | **str** | Password for Basic/NTLM authentication. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerInstantTest from a JSON string +endpoint_http_server_instant_test_instance = EndpointHttpServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerInstantTest.to_json()) + +# convert the object into a dict +endpoint_http_server_instant_test_dict = endpoint_http_server_instant_test_instance.to_dict() +# create an instance of EndpointHttpServerInstantTest from a dict +endpoint_http_server_instant_test_from_dict = EndpointHttpServerInstantTest.from_dict(endpoint_http_server_instant_test_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/endpoint_tests/docs/EndpointHttpServerTest.md b/endpoint_tests/docs/EndpointHttpServerTest.md new file mode 100644 index 00000000..7a2d1001 --- /dev/null +++ b/endpoint_tests/docs/EndpointHttpServerTest.md @@ -0,0 +1,61 @@ +# EndpointHttpServerTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | **str** | Type of test being queried. | [readonly] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**auth_type** | [**EndpointTestAuthType**](EndpointTestAuthType.md) | | [optional] +**http_time_limit** | **int** | Maximum amount of time in milliseconds the agents wait before a request times out. | [optional] +**url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**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] +**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] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] + +## Example + +```python +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpServerTest from a JSON string +endpoint_http_server_test_instance = EndpointHttpServerTest.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpServerTest.to_json()) + +# convert the object into a dict +endpoint_http_server_test_dict = endpoint_http_server_test_instance.to_dict() +# create an instance of EndpointHttpServerTest from a dict +endpoint_http_server_test_from_dict = EndpointHttpServerTest.from_dict(endpoint_http_server_test_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/endpoint/tests_api/docs/EndpointHttpServerTestRequest.md b/endpoint_tests/docs/EndpointHttpServerTestRequest.md similarity index 89% rename from endpoint/tests_api/docs/EndpointHttpServerTestRequest.md rename to endpoint_tests/docs/EndpointHttpServerTestRequest.md index 4afd2624..cc76c3a1 100644 --- a/endpoint/tests_api/docs/EndpointHttpServerTestRequest.md +++ b/endpoint_tests/docs/EndpointHttpServerTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | @@ -19,7 +20,7 @@ Name | Type | Description | Notes **url** | **str** | Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used. | **username** | **str** | Username for Basic/NTLM authentication. | [optional] **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | -**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] **verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | **target_response_time** | **int** | Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red). | **password** | **str** | Password for Basic/NTLM authentication. | [optional] @@ -28,19 +29,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest +from endpoint_tests.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest # TODO update the JSON string below json = "{}" # create an instance of EndpointHttpServerTestRequest from a JSON string endpoint_http_server_test_request_instance = EndpointHttpServerTestRequest.from_json(json) # print the JSON string representation of the object -print EndpointHttpServerTestRequest.to_json() +print(EndpointHttpServerTestRequest.to_json()) # convert the object into a dict endpoint_http_server_test_request_dict = endpoint_http_server_test_request_instance.to_dict() # create an instance of EndpointHttpServerTestRequest from a dict -endpoint_http_server_test_request_form_dict = endpoint_http_server_test_request.from_dict(endpoint_http_server_test_request_dict) +endpoint_http_server_test_request_from_dict = EndpointHttpServerTestRequest.from_dict(endpoint_http_server_test_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/endpoint/tests_api/docs/EndpointHttpServerTests.md b/endpoint_tests/docs/EndpointHttpServerTests.md similarity index 78% rename from endpoint/tests_api/docs/EndpointHttpServerTests.md rename to endpoint_tests/docs/EndpointHttpServerTests.md index 00c0da5c..f0a3cb7b 100644 --- a/endpoint/tests_api/docs/EndpointHttpServerTests.md +++ b/endpoint_tests/docs/EndpointHttpServerTests.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[EndpointHttpServerTest]**](EndpointHttpServerTest.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.endpoint_http_server_tests import EndpointHttpServerTests +from endpoint_tests.models.endpoint_http_server_tests import EndpointHttpServerTests # TODO update the JSON string below json = "{}" # create an instance of EndpointHttpServerTests from a JSON string endpoint_http_server_tests_instance = EndpointHttpServerTests.from_json(json) # print the JSON string representation of the object -print EndpointHttpServerTests.to_json() +print(EndpointHttpServerTests.to_json()) # convert the object into a dict endpoint_http_server_tests_dict = endpoint_http_server_tests_instance.to_dict() # create an instance of EndpointHttpServerTests from a dict -endpoint_http_server_tests_form_dict = endpoint_http_server_tests.from_dict(endpoint_http_server_tests_dict) +endpoint_http_server_tests_from_dict = EndpointHttpServerTests.from_dict(endpoint_http_server_tests_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/endpoint_tests/docs/EndpointHttpTestUpdate.md b/endpoint_tests/docs/EndpointHttpTestUpdate.md new file mode 100644 index 00000000..c3c21458 --- /dev/null +++ b/endpoint_tests/docs/EndpointHttpTestUpdate.md @@ -0,0 +1,34 @@ +# EndpointHttpTestUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**test_name** | **str** | Name of the test. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**url** | **str** | Target for the test. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointHttpTestUpdate from a JSON string +endpoint_http_test_update_instance = EndpointHttpTestUpdate.from_json(json) +# print the JSON string representation of the object +print(EndpointHttpTestUpdate.to_json()) + +# convert the object into a dict +endpoint_http_test_update_dict = endpoint_http_test_update_instance.to_dict() +# create an instance of EndpointHttpTestUpdate from a dict +endpoint_http_test_update_from_dict = EndpointHttpTestUpdate.from_dict(endpoint_http_test_update_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/endpoint_tests/docs/EndpointInstantTest.md b/endpoint_tests/docs/EndpointInstantTest.md new file mode 100644 index 00000000..a675cb4e --- /dev/null +++ b/endpoint_tests/docs/EndpointInstantTest.md @@ -0,0 +1,36 @@ +# EndpointInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | [**EndpointTestAgentSelectorType**](EndpointTestAgentSelectorType.md) | | +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] +**has_ping** | **bool** | Optional flag indicating if the test should run ping. | [optional] [default to True] +**has_traceroute** | **bool** | Optional flag indicating if the test should run traceroute. | [optional] [default to True] +**endpoint_agent_labels** | **List[str]** | List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`. | [optional] +**max_machines** | **int** | Maximum number of agents which can execute the test. | +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**test_name** | **str** | Name of the test. | + +## Example + +```python +from endpoint_tests.models.endpoint_instant_test import EndpointInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointInstantTest from a JSON string +endpoint_instant_test_instance = EndpointInstantTest.from_json(json) +# print the JSON string representation of the object +print(EndpointInstantTest.to_json()) + +# convert the object into a dict +endpoint_instant_test_dict = endpoint_instant_test_instance.to_dict() +# create an instance of EndpointInstantTest from a dict +endpoint_instant_test_from_dict = EndpointInstantTest.from_dict(endpoint_instant_test_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/endpoint_tests/docs/EndpointNetworkTestUpdate.md b/endpoint_tests/docs/EndpointNetworkTestUpdate.md new file mode 100644 index 00000000..9b8fd283 --- /dev/null +++ b/endpoint_tests/docs/EndpointNetworkTestUpdate.md @@ -0,0 +1,35 @@ +# EndpointNetworkTestUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**test_name** | **str** | Name of the test. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**server** | **str** | Target domain name or IP address. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointNetworkTestUpdate from a JSON string +endpoint_network_test_update_instance = EndpointNetworkTestUpdate.from_json(json) +# print the JSON string representation of the object +print(EndpointNetworkTestUpdate.to_json()) + +# convert the object into a dict +endpoint_network_test_update_dict = endpoint_network_test_update_instance.to_dict() +# create an instance of EndpointNetworkTestUpdate from a dict +endpoint_network_test_update_from_dict = EndpointNetworkTestUpdate.from_dict(endpoint_network_test_update_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/endpoint_tests/docs/EndpointScheduledTestType.md b/endpoint_tests/docs/EndpointScheduledTestType.md new file mode 100644 index 00000000..0d4f39c5 --- /dev/null +++ b/endpoint_tests/docs/EndpointScheduledTestType.md @@ -0,0 +1,12 @@ +# EndpointScheduledTestType + +Type of test being queried. + +## 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/endpoint_tests/docs/EndpointSpecificAgentsSelectorConfig.md b/endpoint_tests/docs/EndpointSpecificAgentsSelectorConfig.md new file mode 100644 index 00000000..ddc2a7b3 --- /dev/null +++ b/endpoint_tests/docs/EndpointSpecificAgentsSelectorConfig.md @@ -0,0 +1,32 @@ +# EndpointSpecificAgentsSelectorConfig + +Specific agents selection object. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_selector_type** | **str** | | +**max_machines** | **int** | Maximum number of agents which can execute the test. | [optional] +**agents** | **List[str]** | List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointSpecificAgentsSelectorConfig from a JSON string +endpoint_specific_agents_selector_config_instance = EndpointSpecificAgentsSelectorConfig.from_json(json) +# print the JSON string representation of the object +print(EndpointSpecificAgentsSelectorConfig.to_json()) + +# convert the object into a dict +endpoint_specific_agents_selector_config_dict = endpoint_specific_agents_selector_config_instance.to_dict() +# create an instance of EndpointSpecificAgentsSelectorConfig from a dict +endpoint_specific_agents_selector_config_from_dict = EndpointSpecificAgentsSelectorConfig.from_dict(endpoint_specific_agents_selector_config_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/endpoint_tests/docs/EndpointTest.md b/endpoint_tests/docs/EndpointTest.md new file mode 100644 index 00000000..ceafb149 --- /dev/null +++ b/endpoint_tests/docs/EndpointTest.md @@ -0,0 +1,46 @@ +# EndpointTest + + +## 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] +**links** | [**EndpointTestLinks**](EndpointTestLinks.md) | | [optional] +**agent_selector_config** | [**EndpointAgentSelectorConfig**](EndpointAgentSelectorConfig.md) | | [optional] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**is_saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**has_path_trace_in_session** | **bool** | Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session. | [optional] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] +**port** | **int** | Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443). | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**server** | **str** | Target domain name or IP address. | [optional] +**test_id** | **str** | Each test is assigned a unique ID to access test data from other endpoints. | [optional] [readonly] +**test_name** | **str** | Name of the test. | [optional] +**type** | [**EndpointScheduledTestType**](EndpointScheduledTestType.md) | | +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_test import EndpointTest + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTest from a JSON string +endpoint_test_instance = EndpointTest.from_json(json) +# print the JSON string representation of the object +print(EndpointTest.to_json()) + +# convert the object into a dict +endpoint_test_dict = endpoint_test_instance.to_dict() +# create an instance of EndpointTest from a dict +endpoint_test_from_dict = EndpointTest.from_dict(endpoint_test_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/endpoint_tests/docs/EndpointTestAgentSelectorType.md b/endpoint_tests/docs/EndpointTestAgentSelectorType.md new file mode 100644 index 00000000..e088812e --- /dev/null +++ b/endpoint_tests/docs/EndpointTestAgentSelectorType.md @@ -0,0 +1,12 @@ +# EndpointTestAgentSelectorType + +Retrieve either all available agents, a specific list of agents, or a list of agent labels. + +## 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/endpoint_tests/docs/EndpointTestAuthType.md b/endpoint_tests/docs/EndpointTestAuthType.md new file mode 100644 index 00000000..b0e0f2c0 --- /dev/null +++ b/endpoint_tests/docs/EndpointTestAuthType.md @@ -0,0 +1,12 @@ +# EndpointTestAuthType + +HTTP authentication type. + +## 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/endpoint_tests/docs/EndpointTestLinks.md b/endpoint_tests/docs/EndpointTestLinks.md new file mode 100644 index 00000000..8d69697f --- /dev/null +++ b/endpoint_tests/docs/EndpointTestLinks.md @@ -0,0 +1,31 @@ +# EndpointTestLinks + +A list of links that can be accessed to get more information. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**EndpointTestLinksSelf**](EndpointTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTestLinks from a JSON string +endpoint_test_links_instance = EndpointTestLinks.from_json(json) +# print the JSON string representation of the object +print(EndpointTestLinks.to_json()) + +# convert the object into a dict +endpoint_test_links_dict = endpoint_test_links_instance.to_dict() +# create an instance of EndpointTestLinks from a dict +endpoint_test_links_from_dict = EndpointTestLinks.from_dict(endpoint_test_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/endpoint_tests/docs/EndpointTestLinksSelf.md b/endpoint_tests/docs/EndpointTestLinksSelf.md new file mode 100644 index 00000000..df162e05 --- /dev/null +++ b/endpoint_tests/docs/EndpointTestLinksSelf.md @@ -0,0 +1,36 @@ +# EndpointTestLinksSelf + + +## 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 endpoint_tests.models.endpoint_test_links_self import EndpointTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of EndpointTestLinksSelf from a JSON string +endpoint_test_links_self_instance = EndpointTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(EndpointTestLinksSelf.to_json()) + +# convert the object into a dict +endpoint_test_links_self_dict = endpoint_test_links_self_instance.to_dict() +# create an instance of EndpointTestLinksSelf from a dict +endpoint_test_links_self_from_dict = EndpointTestLinksSelf.from_dict(endpoint_test_links_self_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/endpoint_tests/docs/EndpointTestProtocol.md b/endpoint_tests/docs/EndpointTestProtocol.md new file mode 100644 index 00000000..8459ae85 --- /dev/null +++ b/endpoint_tests/docs/EndpointTestProtocol.md @@ -0,0 +1,12 @@ +# EndpointTestProtocol + +Protocol used to perform the test. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/tests_api/docs/EndpointTests.md b/endpoint_tests/docs/EndpointTests.md similarity index 81% rename from endpoint/tests_api/docs/EndpointTests.md rename to endpoint_tests/docs/EndpointTests.md index de309810..065660c6 100644 --- a/endpoint/tests_api/docs/EndpointTests.md +++ b/endpoint_tests/docs/EndpointTests.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[EndpointTest]**](EndpointTest.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.endpoint_tests import EndpointTests +from endpoint_tests.models.endpoint_tests import EndpointTests # TODO update the JSON string below json = "{}" # create an instance of EndpointTests from a JSON string endpoint_tests_instance = EndpointTests.from_json(json) # print the JSON string representation of the object -print EndpointTests.to_json() +print(EndpointTests.to_json()) # convert the object into a dict endpoint_tests_dict = endpoint_tests_instance.to_dict() # create an instance of EndpointTests from a dict -endpoint_tests_form_dict = endpoint_tests.from_dict(endpoint_tests_dict) +endpoint_tests_from_dict = EndpointTests.from_dict(endpoint_tests_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/endpoint_tests/docs/Error.md b/endpoint_tests/docs/Error.md new file mode 100644 index 00000000..2bc9d670 --- /dev/null +++ b/endpoint_tests/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 endpoint_tests.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/endpoint/tests_api/docs/GetDynamicTestsList200Response.md b/endpoint_tests/docs/GetDynamicTestsList200Response.md similarity index 77% rename from endpoint/tests_api/docs/GetDynamicTestsList200Response.md rename to endpoint_tests/docs/GetDynamicTestsList200Response.md index 12505905..9cee806f 100644 --- a/endpoint/tests_api/docs/GetDynamicTestsList200Response.md +++ b/endpoint_tests/docs/GetDynamicTestsList200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[DynamicTest]**](DynamicTest.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response +from endpoint_tests.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response # TODO update the JSON string below json = "{}" # create an instance of GetDynamicTestsList200Response from a JSON string get_dynamic_tests_list200_response_instance = GetDynamicTestsList200Response.from_json(json) # print the JSON string representation of the object -print GetDynamicTestsList200Response.to_json() +print(GetDynamicTestsList200Response.to_json()) # convert the object into a dict get_dynamic_tests_list200_response_dict = get_dynamic_tests_list200_response_instance.to_dict() # create an instance of GetDynamicTestsList200Response from a dict -get_dynamic_tests_list200_response_form_dict = get_dynamic_tests_list200_response.from_dict(get_dynamic_tests_list200_response_dict) +get_dynamic_tests_list200_response_from_dict = GetDynamicTestsList200Response.from_dict(get_dynamic_tests_list200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_tests/docs/GetEndpointAgentToserverTestsList200Response.md b/endpoint_tests/docs/GetEndpointAgentToserverTestsList200Response.md new file mode 100644 index 00000000..7908c3f2 --- /dev/null +++ b/endpoint_tests/docs/GetEndpointAgentToserverTestsList200Response.md @@ -0,0 +1,30 @@ +# GetEndpointAgentToserverTestsList200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[EndpointAgentToServerTest]**](EndpointAgentToServerTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_tests.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEndpointAgentToserverTestsList200Response from a JSON string +get_endpoint_agent_toserver_tests_list200_response_instance = GetEndpointAgentToserverTestsList200Response.from_json(json) +# print the JSON string representation of the object +print(GetEndpointAgentToserverTestsList200Response.to_json()) + +# convert the object into a dict +get_endpoint_agent_toserver_tests_list200_response_dict = get_endpoint_agent_toserver_tests_list200_response_instance.to_dict() +# create an instance of GetEndpointAgentToserverTestsList200Response from a dict +get_endpoint_agent_toserver_tests_list200_response_from_dict = GetEndpointAgentToserverTestsList200Response.from_dict(get_endpoint_agent_toserver_tests_list200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/endpoint/tests_api/docs/GetEndpointHttpserverTestsList200Response.md b/endpoint_tests/docs/GetEndpointHttpserverTestsList200Response.md similarity index 75% rename from endpoint/tests_api/docs/GetEndpointHttpserverTestsList200Response.md rename to endpoint_tests/docs/GetEndpointHttpserverTestsList200Response.md index c3d0fcc7..d1fe8ec5 100644 --- a/endpoint/tests_api/docs/GetEndpointHttpserverTestsList200Response.md +++ b/endpoint_tests/docs/GetEndpointHttpserverTestsList200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[EndpointHttpServerTest]**](EndpointHttpServerTest.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response +from endpoint_tests.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointHttpserverTestsList200Response from a JSON string get_endpoint_httpserver_tests_list200_response_instance = GetEndpointHttpserverTestsList200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointHttpserverTestsList200Response.to_json() +print(GetEndpointHttpserverTestsList200Response.to_json()) # convert the object into a dict get_endpoint_httpserver_tests_list200_response_dict = get_endpoint_httpserver_tests_list200_response_instance.to_dict() # create an instance of GetEndpointHttpserverTestsList200Response from a dict -get_endpoint_httpserver_tests_list200_response_form_dict = get_endpoint_httpserver_tests_list200_response.from_dict(get_endpoint_httpserver_tests_list200_response_dict) +get_endpoint_httpserver_tests_list200_response_from_dict = GetEndpointHttpserverTestsList200Response.from_dict(get_endpoint_httpserver_tests_list200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint/tests_api/docs/GetEndpointTestsList200Response.md b/endpoint_tests/docs/GetEndpointTestsList200Response.md similarity index 76% rename from endpoint/tests_api/docs/GetEndpointTestsList200Response.md rename to endpoint_tests/docs/GetEndpointTestsList200Response.md index a5d2d066..629f3f93 100644 --- a/endpoint/tests_api/docs/GetEndpointTestsList200Response.md +++ b/endpoint_tests/docs/GetEndpointTestsList200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[EndpointTest]**](EndpointTest.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response +from endpoint_tests.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response # TODO update the JSON string below json = "{}" # create an instance of GetEndpointTestsList200Response from a JSON string get_endpoint_tests_list200_response_instance = GetEndpointTestsList200Response.from_json(json) # print the JSON string representation of the object -print GetEndpointTestsList200Response.to_json() +print(GetEndpointTestsList200Response.to_json()) # convert the object into a dict get_endpoint_tests_list200_response_dict = get_endpoint_tests_list200_response_instance.to_dict() # create an instance of GetEndpointTestsList200Response from a dict -get_endpoint_tests_list200_response_form_dict = get_endpoint_tests_list200_response.from_dict(get_endpoint_tests_list200_response_dict) +get_endpoint_tests_list200_response_from_dict = GetEndpointTestsList200Response.from_dict(get_endpoint_tests_list200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/endpoint_tests/docs/Link.md b/endpoint_tests/docs/Link.md new file mode 100644 index 00000000..8a5e0cf5 --- /dev/null +++ b/endpoint_tests/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 endpoint_tests.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/endpoint/tests_api/docs/ListEndpointScheduledTestsApi.md b/endpoint_tests/docs/ListEndpointScheduledTestsApi.md similarity index 86% rename from endpoint/tests_api/docs/ListEndpointScheduledTestsApi.md rename to endpoint_tests/docs/ListEndpointScheduledTestsApi.md index d2036bd6..144825a9 100644 --- a/endpoint/tests_api/docs/ListEndpointScheduledTestsApi.md +++ b/endpoint_tests/docs/ListEndpointScheduledTestsApi.md @@ -1,4 +1,4 @@ -# tests_api.ListEndpointScheduledTestsApi +# endpoint_tests.ListEndpointScheduledTestsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns a list of all endpoint scheduled tests configured in ThousandEyes. This ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response -from tests_api.rest import ApiException +import endpoint_tests +from endpoint_tests.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response +from 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 = tests_api.Configuration( +configuration = endpoint_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,15 +36,15 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = endpoint_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with endpoint_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.ListEndpointScheduledTestsApi(api_client) - aid = '2067' # 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) + api_instance = endpoint_tests.ListEndpointScheduledTestsApi(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 scheduled tests @@ -60,6 +59,7 @@ with tests_api.ApiClient(configuration) as api_client: ### 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] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/endpoint_tests/docs/ScheduledTestsAgentToServerApi.md b/endpoint_tests/docs/ScheduledTestsAgentToServerApi.md new file mode 100644 index 00000000..90a069c0 --- /dev/null +++ b/endpoint_tests/docs/ScheduledTestsAgentToServerApi.md @@ -0,0 +1,449 @@ +# endpoint_tests.ScheduledTestsAgentToServerApi + +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_toserver_tests_list**](ScheduledTestsAgentToServerApi.md#get_endpoint_agent_toserver_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 + + +# **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 endpoint_tests +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 endpoint_tests +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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_toserver_tests_list** +> GetEndpointAgentToserverTestsList200Response get_endpoint_agent_toserver_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 endpoint_tests +from endpoint_tests.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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_toserver_tests_list(aid=aid) + print("The response of ScheduledTestsAgentToServerApi->get_endpoint_agent_toserver_tests_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsAgentToServerApi->get_endpoint_agent_toserver_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 + +[**GetEndpointAgentToserverTestsList200Response**](GetEndpointAgentToserverTestsList200Response.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) + +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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_tests +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_tests.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_tests.ScheduledTestsAgentToServerApi(api_client) + endpoint_agent_to_server_test_request = endpoint_tests.EndpointAgentToServerTestRequest() # EndpointAgentToServerTestRequest | + 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: + # 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") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsAgentToServerApi->post_endpoint_agent_to_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **endpoint_agent_to_server_test_request** | [**EndpointAgentToServerTestRequest**](EndpointAgentToServerTestRequest.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 + +[**EndpointAgentToServerTest**](EndpointAgentToServerTest.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 | - | +**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) + +# **update_endpoint_agent_to_server_detail** +> EndpointAgentToServerTest update_endpoint_agent_to_server_detail(test_id, endpoint_network_test_update, aid=aid) + +Update agent to server endpoint scheduled test + +Updates an agent to server scheduled test. Includes support for enabling and disabling the test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_tests +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_tests.ScheduledTestsAgentToServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + endpoint_network_test_update = endpoint_tests.EndpointNetworkTestUpdate() # EndpointNetworkTestUpdate | + 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsAgentToServerApi->update_endpoint_agent_to_server_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **endpoint_network_test_update** | [**EndpointNetworkTestUpdate**](EndpointNetworkTestUpdate.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 + +[**EndpointAgentToServerTest**](EndpointAgentToServerTest.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 | - | +**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) + diff --git a/endpoint_tests/docs/ScheduledTestsHTTPServerApi.md b/endpoint_tests/docs/ScheduledTestsHTTPServerApi.md new file mode 100644 index 00000000..b3ea117c --- /dev/null +++ b/endpoint_tests/docs/ScheduledTestsHTTPServerApi.md @@ -0,0 +1,449 @@ +# endpoint_tests.ScheduledTestsHTTPServerApi + +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 + + +# **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 endpoint_tests +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 endpoint_tests +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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** +> GetEndpointHttpserverTestsList200Response 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 endpoint_tests +from endpoint_tests.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 + +[**GetEndpointHttpserverTestsList200Response**](GetEndpointHttpserverTestsList200Response.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 + +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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_tests +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_tests.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_tests.ScheduledTestsHTTPServerApi(api_client) + endpoint_http_server_test_request = endpoint_tests.EndpointHttpServerTestRequest() # EndpointHttpServerTestRequest | + 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsHTTPServerApi->post_endpoint_httpserver_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **endpoint_http_server_test_request** | [**EndpointHttpServerTestRequest**](EndpointHttpServerTestRequest.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 + +[**EndpointHttpServerTest**](EndpointHttpServerTest.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 | - | +**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) + +# **update_endpoint_http_server_detail** +> EndpointHttpServerTest update_endpoint_http_server_detail(test_id, endpoint_http_test_update, aid=aid) + +Update HTTP server endpoint scheduled test + +Updates an HTTP server scheduled test. Includes support for enabling and disabling the test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import endpoint_tests +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate +from 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 = endpoint_tests.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 = endpoint_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = endpoint_tests.ScheduledTestsHTTPServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + endpoint_http_test_update = endpoint_tests.EndpointHttpTestUpdate() # EndpointHttpTestUpdate | + 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsHTTPServerApi->update_endpoint_http_server_detail: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **endpoint_http_test_update** | [**EndpointHttpTestUpdate**](EndpointHttpTestUpdate.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 + +[**EndpointHttpServerTest**](EndpointHttpServerTest.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 | - | +**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) + diff --git a/endpoint_tests/docs/SelfLinks.md b/endpoint_tests/docs/SelfLinks.md new file mode 100644 index 00000000..fe12275a --- /dev/null +++ b/endpoint_tests/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from endpoint_tests.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/endpoint_tests/docs/SelfLinksLinks.md b/endpoint_tests/docs/SelfLinksLinks.md new file mode 100644 index 00000000..7a535dbf --- /dev/null +++ b/endpoint_tests/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from endpoint_tests.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/endpoint_tests/docs/Severity.md b/endpoint_tests/docs/Severity.md new file mode 100644 index 00000000..3abd8037 --- /dev/null +++ b/endpoint_tests/docs/Severity.md @@ -0,0 +1,12 @@ +# Severity + +The severity of the alert. + +## 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/endpoint_tests/docs/TestInterval.md b/endpoint_tests/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/endpoint_tests/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/endpoint_tests/docs/TestLabelsInner.md b/endpoint_tests/docs/TestLabelsInner.md new file mode 100644 index 00000000..8ab6e946 --- /dev/null +++ b/endpoint_tests/docs/TestLabelsInner.md @@ -0,0 +1,31 @@ +# TestLabelsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Label ID. | [optional] +**name** | **str** | Name of the label. | [optional] +**is_builtin** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] + +## Example + +```python +from endpoint_tests.models.test_labels_inner import TestLabelsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestLabelsInner from a JSON string +test_labels_inner_instance = TestLabelsInner.from_json(json) +# print the JSON string representation of the object +print(TestLabelsInner.to_json()) + +# convert the object into a dict +test_labels_inner_dict = test_labels_inner_instance.to_dict() +# create an instance of TestLabelsInner from a dict +test_labels_inner_from_dict = TestLabelsInner.from_dict(test_labels_inner_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/endpoint_tests/docs/TestProbeMode.md b/endpoint_tests/docs/TestProbeMode.md new file mode 100644 index 00000000..78dc8563 --- /dev/null +++ b/endpoint_tests/docs/TestProbeMode.md @@ -0,0 +1,12 @@ +# TestProbeMode + +Probe mode used by network test, only valid when the protocol is set to TCP. + +## 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/endpoint_tests/docs/TestProbeModeResponse.md b/endpoint_tests/docs/TestProbeModeResponse.md new file mode 100644 index 00000000..9a6c5555 --- /dev/null +++ b/endpoint_tests/docs/TestProbeModeResponse.md @@ -0,0 +1,12 @@ +# TestProbeModeResponse + +Probe mode used by network test, only valid when the protocol is set to TCP. + +## 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/endpoint_tests/docs/TestSslVersionId.md b/endpoint_tests/docs/TestSslVersionId.md new file mode 100644 index 00000000..f13419ab --- /dev/null +++ b/endpoint_tests/docs/TestSslVersionId.md @@ -0,0 +1,12 @@ +# TestSslVersionId + +SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + +## 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/endpoint_tests/docs/TestUpdate.md b/endpoint_tests/docs/TestUpdate.md new file mode 100644 index 00000000..5a874bba --- /dev/null +++ b/endpoint_tests/docs/TestUpdate.md @@ -0,0 +1,33 @@ +# TestUpdate + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**test_name** | **str** | Name of the test. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**is_enabled** | **bool** | Indicates if test is enabled. | [optional] [default to True] +**tcp_probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] + +## Example + +```python +from endpoint_tests.models.test_update import TestUpdate + +# TODO update the JSON string below +json = "{}" +# create an instance of TestUpdate from a JSON string +test_update_instance = TestUpdate.from_json(json) +# print the JSON string representation of the object +print(TestUpdate.to_json()) + +# convert the object into a dict +test_update_dict = test_update_instance.to_dict() +# create an instance of TestUpdate from a dict +test_update_from_dict = TestUpdate.from_dict(test_update_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/endpoint_tests/docs/UnauthorizedError.md b/endpoint_tests/docs/UnauthorizedError.md new file mode 100644 index 00000000..796137ea --- /dev/null +++ b/endpoint_tests/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from endpoint_tests.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/endpoint_tests/docs/ValidationError.md b/endpoint_tests/docs/ValidationError.md new file mode 100644 index 00000000..164a47b1 --- /dev/null +++ b/endpoint_tests/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from endpoint_tests.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/endpoint_tests/docs/ValidationErrorAllOfErrors.md b/endpoint_tests/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..0853d2c5 --- /dev/null +++ b/endpoint_tests/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from endpoint_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/endpoint_tests/endpoint_tests/__init__.py b/endpoint_tests/endpoint_tests/__init__.py new file mode 100644 index 00000000..eca345d8 --- /dev/null +++ b/endpoint_tests/endpoint_tests/__init__.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Endpoint Tests API + + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + + The version of the OpenAPI document: 7.0.2 + 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 endpoint_tests.api.dynamic_tests_agent_to_server_api import DynamicTestsAgentToServerApi +from endpoint_tests.api.list_endpoint_scheduled_tests_api import ListEndpointScheduledTestsApi +from endpoint_tests.api.scheduled_tests_agent_to_server_api import ScheduledTestsAgentToServerApi +from endpoint_tests.api.scheduled_tests_http_server_api import ScheduledTestsHTTPServerApi + +# import ApiClient +from endpoint_tests.api_response import ApiResponse +from endpoint_tests.api_client import ApiClient +from endpoint_tests.configuration import Configuration +from endpoint_tests.exceptions import OpenApiException +from endpoint_tests.exceptions import ApiTypeError +from endpoint_tests.exceptions import ApiValueError +from endpoint_tests.exceptions import ApiKeyError +from endpoint_tests.exceptions import ApiAttributeError +from endpoint_tests.exceptions import ApiException + +# import models into sdk package +from endpoint_tests.models.account_group_id import AccountGroupId +from endpoint_tests.models.alert_direction import AlertDirection +from endpoint_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_tests.models.alert_rule import AlertRule +from endpoint_tests.models.alert_type import AlertType +from endpoint_tests.models.dynamic_test import DynamicTest +from endpoint_tests.models.dynamic_test_links import DynamicTestLinks +from endpoint_tests.models.dynamic_test_links_self import DynamicTestLinksSelf +from endpoint_tests.models.dynamic_test_request import DynamicTestRequest +from endpoint_tests.models.dynamic_tests import DynamicTests +from endpoint_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_tests.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest +from endpoint_tests.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests +from endpoint_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_tests.models.endpoint_dynamic_test_update import EndpointDynamicTestUpdate +from endpoint_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest +from endpoint_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_tests.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest +from endpoint_tests.models.endpoint_http_server_tests import EndpointHttpServerTests +from endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate +from endpoint_tests.models.endpoint_instant_test import EndpointInstantTest +from endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate +from endpoint_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from endpoint_tests.models.endpoint_test import EndpointTest +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_tests.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.endpoint_tests import EndpointTests +from endpoint_tests.models.error import Error +from endpoint_tests.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response +from endpoint_tests.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response +from endpoint_tests.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response +from endpoint_tests.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response +from endpoint_tests.models.link import Link +from endpoint_tests.models.self_links import SelfLinks +from endpoint_tests.models.self_links_links import SelfLinksLinks +from endpoint_tests.models.severity import Severity +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_labels_inner import TestLabelsInner +from endpoint_tests.models.test_probe_mode import TestProbeMode +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId +from endpoint_tests.models.test_update import TestUpdate +from endpoint_tests.models.unauthorized_error import UnauthorizedError +from endpoint_tests.models.validation_error import ValidationError +from endpoint_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/endpoint_tests/endpoint_tests/api/__init__.py b/endpoint_tests/endpoint_tests/api/__init__.py new file mode 100644 index 00000000..473cc93d --- /dev/null +++ b/endpoint_tests/endpoint_tests/api/__init__.py @@ -0,0 +1,8 @@ +# flake8: noqa + +# import apis into api package +from endpoint_tests.api.dynamic_tests_agent_to_server_api import DynamicTestsAgentToServerApi +from endpoint_tests.api.list_endpoint_scheduled_tests_api import ListEndpointScheduledTestsApi +from endpoint_tests.api.scheduled_tests_agent_to_server_api import ScheduledTestsAgentToServerApi +from endpoint_tests.api.scheduled_tests_http_server_api import ScheduledTestsHTTPServerApi + diff --git a/endpoint_tests/endpoint_tests/api/dynamic_tests_agent_to_server_api.py b/endpoint_tests/endpoint_tests/api/dynamic_tests_agent_to_server_api.py new file mode 100644 index 00000000..01538ff2 --- /dev/null +++ b/endpoint_tests/endpoint_tests/api/dynamic_tests_agent_to_server_api.py @@ -0,0 +1,1543 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from endpoint_tests.models.dynamic_test import DynamicTest +from endpoint_tests.models.dynamic_test_request import DynamicTestRequest +from endpoint_tests.models.endpoint_dynamic_test_update import EndpointDynamicTestUpdate +from endpoint_tests.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response + +from endpoint_tests.api_client import ApiClient, RequestSerialized +from endpoint_tests.api_response import ApiResponse +from endpoint_tests.rest import RESTResponseType + + +class DynamicTestsAgentToServerApi: + """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() + self.api_client = api_client + + + @validate_call + def delete_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, + _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 agent to server dynamic test + + Deletes an agent to server endpoint dynamic test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_dynamic_test_serialize( + test_id=test_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", + '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, + ).data + + + @validate_call + def delete_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, + _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 agent to server dynamic test + + Deletes an agent to server endpoint dynamic test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_dynamic_test_serialize( + test_id=test_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", + '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, + ) + + + @validate_call + def delete_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, + _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 agent to server dynamic test + + Deletes an agent to server endpoint dynamic test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_dynamic_test_serialize( + test_id=test_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", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_endpoint_dynamic_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/endpoint/tests/dynamic-tests/agent-to-server/{testId}', + 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_detail( + 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, + _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: + """Retrieve endpoint dynamic test + + Returns details of an endpoint dynamic test, including test type, name, intervals, targets. + + :param test_id: Unique ID of endpoint test. (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 _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_detail_serialize( + test_id=test_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': "DynamicTest", + '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, + ).data + + + @validate_call + def get_dynamic_test_detail_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, + _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]: + """Retrieve endpoint dynamic test + + Returns details of an endpoint dynamic test, including test type, name, intervals, targets. + + :param test_id: Unique ID of endpoint test. (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 _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_detail_serialize( + test_id=test_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': "DynamicTest", + '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, + ) + + + @validate_call + def get_dynamic_test_detail_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, + _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 dynamic test + + Returns details of an endpoint dynamic test, including test type, name, intervals, targets. + + :param test_id: Unique ID of endpoint test. (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 _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_detail_serialize( + test_id=test_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': "DynamicTest", + '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_detail_serialize( + self, + test_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 + # 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/tests/dynamic-tests/agent-to-server/{testId}', + 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_tests_list( + 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, + ) -> GetDynamicTestsList200Response: + """List endpoint dynamic tests + + Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. + + :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_tests_list_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': "GetDynamicTestsList200Response", + '401': "UnauthorizedError", + '403': "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, + ).data + + + @validate_call + def get_dynamic_tests_list_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[GetDynamicTestsList200Response]: + """List endpoint dynamic tests + + Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. + + :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_tests_list_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': "GetDynamicTestsList200Response", + '401': "UnauthorizedError", + '403': "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, + ) + + + @validate_call + def get_dynamic_tests_list_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 endpoint dynamic tests + + Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. + + :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_tests_list_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': "GetDynamicTestsList200Response", + '401': "UnauthorizedError", + '403': "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_tests_list_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/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 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, + ).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, + ) + + + @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( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_dynamic_test_update: EndpointDynamicTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: + """Update agent to server dynamic test + + Updates an agent to server endpoint dynamic test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_dynamic_test_update: (required) + :type endpoint_dynamic_test_update: EndpointDynamicTestUpdate + :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_endpoint_dynamic_test_detail_serialize( + test_id=test_id, + endpoint_dynamic_test_update=endpoint_dynamic_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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, + ).data + + + @validate_call + def update_endpoint_dynamic_test_detail_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_dynamic_test_update: EndpointDynamicTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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]: + """Update agent to server dynamic test + + Updates an agent to server endpoint dynamic test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_dynamic_test_update: (required) + :type endpoint_dynamic_test_update: EndpointDynamicTestUpdate + :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_endpoint_dynamic_test_detail_serialize( + test_id=test_id, + endpoint_dynamic_test_update=endpoint_dynamic_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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, + ) + + + @validate_call + def update_endpoint_dynamic_test_detail_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_dynamic_test_update: EndpointDynamicTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 agent to server dynamic test + + Updates an agent to server endpoint dynamic test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_dynamic_test_update: (required) + :type endpoint_dynamic_test_update: EndpointDynamicTestUpdate + :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_endpoint_dynamic_test_detail_serialize( + test_id=test_id, + endpoint_dynamic_test_update=endpoint_dynamic_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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 _update_endpoint_dynamic_test_detail_serialize( + self, + test_id, + endpoint_dynamic_test_update, + 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 + # 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_dynamic_test_update is not None: + _body_params = endpoint_dynamic_test_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/tests/dynamic-tests/agent-to-server/{testId}', + 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/endpoint/tests_api/tests_api/api/list_endpoint_scheduled_tests_api.py b/endpoint_tests/endpoint_tests/api/list_endpoint_scheduled_tests_api.py similarity index 94% rename from endpoint/tests_api/tests_api/api/list_endpoint_scheduled_tests_api.py rename to endpoint_tests/endpoint_tests/api/list_endpoint_scheduled_tests_api.py index ce13bb4a..c0a69dde 100644 --- a/endpoint/tests_api/tests_api/api/list_endpoint_scheduled_tests_api.py +++ b/endpoint_tests/endpoint_tests/api/list_endpoint_scheduled_tests_api.py @@ -3,37 +3,27 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from endpoint_tests.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response -from tests_api.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType +from endpoint_tests.api_client import ApiClient, RequestSerialized +from endpoint_tests.api_response import ApiResponse +from endpoint_tests.rest import RESTResponseType class ListEndpointScheduledTestsApi: @@ -109,8 +99,6 @@ class ListEndpointScheduledTestsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -183,8 +171,6 @@ class ListEndpointScheduledTestsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -257,8 +243,6 @@ class ListEndpointScheduledTestsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -274,19 +258,18 @@ class ListEndpointScheduledTestsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/endpoint_tests/endpoint_tests/api/scheduled_tests_agent_to_server_api.py b/endpoint_tests/endpoint_tests/api/scheduled_tests_agent_to_server_api.py new file mode 100644 index 00000000..bbe2893b --- /dev/null +++ b/endpoint_tests/endpoint_tests/api/scheduled_tests_agent_to_server_api.py @@ -0,0 +1,1543 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_tests.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest +from endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate +from endpoint_tests.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response + +from endpoint_tests.api_client import ApiClient, RequestSerialized +from endpoint_tests.api_response import ApiResponse +from endpoint_tests.rest import RESTResponseType + + +class ScheduledTestsAgentToServerApi: + """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() + self.api_client = api_client + + + @validate_call + def delete_endpoint_agent_to_server_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, + _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 agent to server scheduled test + + Deletes an agent to server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_agent_to_server_test_serialize( + test_id=test_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", + '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, + ).data + + + @validate_call + def delete_endpoint_agent_to_server_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, + _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 agent to server scheduled test + + Deletes an agent to server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_agent_to_server_test_serialize( + test_id=test_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", + '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, + ) + + + @validate_call + def delete_endpoint_agent_to_server_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, + _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 agent to server scheduled test + + Deletes an agent to server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_agent_to_server_test_serialize( + test_id=test_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", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_endpoint_agent_to_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/endpoint/tests/scheduled-tests/agent-to-server/{testId}', + 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_to_server_detail( + 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, + _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: + """Retrieve agent to server endpoint scheduled test + + Retrieves details of an agent to server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_agent_to_server_detail_serialize( + test_id=test_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': "EndpointAgentToServerTest", + '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, + ).data + + + @validate_call + def get_endpoint_agent_to_server_detail_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, + _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]: + """Retrieve agent to server endpoint scheduled test + + Retrieves details of an agent to server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_agent_to_server_detail_serialize( + test_id=test_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': "EndpointAgentToServerTest", + '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, + ) + + + @validate_call + def get_endpoint_agent_to_server_detail_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, + _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 agent to server endpoint scheduled test + + Retrieves details of an agent to server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_agent_to_server_detail_serialize( + test_id=test_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': "EndpointAgentToServerTest", + '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_agent_to_server_detail_serialize( + self, + test_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 + # 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/tests/scheduled-tests/agent-to-server/{testId}', + 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_toserver_tests_list( + 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, + ) -> GetEndpointAgentToserverTestsList200Response: + """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. + + :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_agent_toserver_tests_list_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': "GetEndpointAgentToserverTestsList200Response", + '401': "UnauthorizedError", + '403': "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, + ).data + + + @validate_call + def get_endpoint_agent_toserver_tests_list_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[GetEndpointAgentToserverTestsList200Response]: + """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. + + :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_agent_toserver_tests_list_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': "GetEndpointAgentToserverTestsList200Response", + '401': "UnauthorizedError", + '403': "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, + ) + + + @validate_call + def get_endpoint_agent_toserver_tests_list_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 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. + + :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_agent_toserver_tests_list_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': "GetEndpointAgentToserverTestsList200Response", + '401': "UnauthorizedError", + '403': "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_agent_toserver_tests_list_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/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 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, + ).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, + ) + + + @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( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_network_test_update: EndpointNetworkTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: + """Update agent to server endpoint scheduled test + + Updates an agent to server scheduled test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_network_test_update: (required) + :type endpoint_network_test_update: EndpointNetworkTestUpdate + :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_endpoint_agent_to_server_detail_serialize( + test_id=test_id, + endpoint_network_test_update=endpoint_network_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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, + ).data + + + @validate_call + def update_endpoint_agent_to_server_detail_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_network_test_update: EndpointNetworkTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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]: + """Update agent to server endpoint scheduled test + + Updates an agent to server scheduled test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_network_test_update: (required) + :type endpoint_network_test_update: EndpointNetworkTestUpdate + :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_endpoint_agent_to_server_detail_serialize( + test_id=test_id, + endpoint_network_test_update=endpoint_network_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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, + ) + + + @validate_call + def update_endpoint_agent_to_server_detail_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_network_test_update: EndpointNetworkTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 agent to server endpoint scheduled test + + Updates an agent to server scheduled test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_network_test_update: (required) + :type endpoint_network_test_update: EndpointNetworkTestUpdate + :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_endpoint_agent_to_server_detail_serialize( + test_id=test_id, + endpoint_network_test_update=endpoint_network_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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 _update_endpoint_agent_to_server_detail_serialize( + self, + test_id, + endpoint_network_test_update, + 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 + # 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_network_test_update is not None: + _body_params = endpoint_network_test_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/tests/scheduled-tests/agent-to-server/{testId}', + 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/endpoint_tests/endpoint_tests/api/scheduled_tests_http_server_api.py b/endpoint_tests/endpoint_tests/api/scheduled_tests_http_server_api.py new file mode 100644 index 00000000..f2a43335 --- /dev/null +++ b/endpoint_tests/endpoint_tests/api/scheduled_tests_http_server_api.py @@ -0,0 +1,1543 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_tests.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest +from endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate +from endpoint_tests.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response + +from endpoint_tests.api_client import ApiClient, RequestSerialized +from endpoint_tests.api_response import ApiResponse +from endpoint_tests.rest import RESTResponseType + + +class ScheduledTestsHTTPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def delete_endpoint_http_server_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, + _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 HTTP server scheduled test + + Deletes an HTTP server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_http_server_test_serialize( + test_id=test_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", + '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, + ).data + + + @validate_call + def delete_endpoint_http_server_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, + _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 HTTP server scheduled test + + Deletes an HTTP server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_http_server_test_serialize( + test_id=test_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", + '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, + ) + + + @validate_call + def delete_endpoint_http_server_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, + _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 HTTP server scheduled test + + Deletes an HTTP server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_endpoint_http_server_test_serialize( + test_id=test_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", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_endpoint_http_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/endpoint/tests/scheduled-tests/http-server/{testId}', + 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_httpserver_test_detail( + 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, + _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: + """Retrieves HTTP server endpoint scheduled test + + Retrieves details of an HTTP Server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_httpserver_test_detail_serialize( + test_id=test_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': "EndpointHttpServerTest", + '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, + ).data + + + @validate_call + def get_endpoint_httpserver_test_detail_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, + _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]: + """Retrieves HTTP server endpoint scheduled test + + Retrieves details of an HTTP Server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_httpserver_test_detail_serialize( + test_id=test_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': "EndpointHttpServerTest", + '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, + ) + + + @validate_call + def get_endpoint_httpserver_test_detail_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, + _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: + """Retrieves HTTP server endpoint scheduled test + + Retrieves details of an HTTP Server endpoint scheduled test. + + :param test_id: Unique ID of endpoint test. (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 _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_httpserver_test_detail_serialize( + test_id=test_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': "EndpointHttpServerTest", + '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_httpserver_test_detail_serialize( + self, + test_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 + # 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/tests/scheduled-tests/http-server/{testId}', + 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_httpserver_tests_list( + 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, + ) -> GetEndpointHttpserverTestsList200Response: + """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. + + :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_httpserver_tests_list_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': "GetEndpointHttpserverTestsList200Response", + '401': "UnauthorizedError", + '403': "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, + ).data + + + @validate_call + def get_endpoint_httpserver_tests_list_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[GetEndpointHttpserverTestsList200Response]: + """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. + + :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_httpserver_tests_list_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': "GetEndpointHttpserverTestsList200Response", + '401': "UnauthorizedError", + '403': "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, + ) + + + @validate_call + def get_endpoint_httpserver_tests_list_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 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. + + :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_httpserver_tests_list_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': "GetEndpointHttpserverTestsList200Response", + '401': "UnauthorizedError", + '403': "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_httpserver_tests_list_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/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 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, + ).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, + ) + + + @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( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_http_test_update: EndpointHttpTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: + """Update HTTP server endpoint scheduled test + + Updates an HTTP server scheduled test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_http_test_update: (required) + :type endpoint_http_test_update: EndpointHttpTestUpdate + :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_endpoint_http_server_detail_serialize( + test_id=test_id, + endpoint_http_test_update=endpoint_http_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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, + ).data + + + @validate_call + def update_endpoint_http_server_detail_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_http_test_update: EndpointHttpTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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]: + """Update HTTP server endpoint scheduled test + + Updates an HTTP server scheduled test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_http_test_update: (required) + :type endpoint_http_test_update: EndpointHttpTestUpdate + :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_endpoint_http_server_detail_serialize( + test_id=test_id, + endpoint_http_test_update=endpoint_http_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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, + ) + + + @validate_call + def update_endpoint_http_server_detail_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], + endpoint_http_test_update: EndpointHttpTestUpdate, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 HTTP server endpoint scheduled test + + Updates an HTTP server scheduled test. Includes support for enabling and disabling the test. + + :param test_id: Unique ID of endpoint test. (required) + :type test_id: str + :param endpoint_http_test_update: (required) + :type endpoint_http_test_update: EndpointHttpTestUpdate + :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_endpoint_http_server_detail_serialize( + test_id=test_id, + endpoint_http_test_update=endpoint_http_test_update, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "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 _update_endpoint_http_server_detail_serialize( + self, + test_id, + endpoint_http_test_update, + 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 + # 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_test_update is not None: + _body_params = endpoint_http_test_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/tests/scheduled-tests/http-server/{testId}', + 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/endpoint_tests/endpoint_tests/api_client.py b/endpoint_tests/endpoint_tests/api_client.py new file mode 100644 index 00000000..e303f0e7 --- /dev/null +++ b/endpoint_tests/endpoint_tests/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from endpoint_tests.configuration import Configuration +from endpoint_tests.api_response import ApiResponse, T as ApiResponseT +import endpoint_tests.models +from endpoint_tests import rest +from endpoint_tests.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(endpoint_tests.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/endpoint_tests/endpoint_tests/api_response.py b/endpoint_tests/endpoint_tests/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/endpoint_tests/endpoint_tests/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/endpoint_tests/endpoint_tests/configuration.py b/endpoint_tests/endpoint_tests/configuration.py new file mode 100644 index 00000000..74b12817 --- /dev/null +++ b/endpoint_tests/endpoint_tests/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("endpoint_tests") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/endpoint_tests/endpoint_tests/exceptions.py b/endpoint_tests/endpoint_tests/exceptions.py new file mode 100644 index 00000000..e5c06222 --- /dev/null +++ b/endpoint_tests/endpoint_tests/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/endpoint_tests/endpoint_tests/models/__init__.py b/endpoint_tests/endpoint_tests/models/__init__.py new file mode 100644 index 00000000..12f947bc --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/__init__.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +# flake8: noqa +""" + Endpoint Tests API + + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from endpoint_tests.models.account_group_id import AccountGroupId +from endpoint_tests.models.alert_direction import AlertDirection +from endpoint_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_tests.models.alert_rule import AlertRule +from endpoint_tests.models.alert_type import AlertType +from endpoint_tests.models.dynamic_test import DynamicTest +from endpoint_tests.models.dynamic_test_links import DynamicTestLinks +from endpoint_tests.models.dynamic_test_links_self import DynamicTestLinksSelf +from endpoint_tests.models.dynamic_test_request import DynamicTestRequest +from endpoint_tests.models.dynamic_tests import DynamicTests +from endpoint_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_tests.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest +from endpoint_tests.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests +from endpoint_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_tests.models.endpoint_dynamic_test_update import EndpointDynamicTestUpdate +from endpoint_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest +from endpoint_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_tests.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest +from endpoint_tests.models.endpoint_http_server_tests import EndpointHttpServerTests +from endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate +from endpoint_tests.models.endpoint_instant_test import EndpointInstantTest +from endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate +from endpoint_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from endpoint_tests.models.endpoint_test import EndpointTest +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_tests.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.endpoint_tests import EndpointTests +from endpoint_tests.models.error import Error +from endpoint_tests.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response +from endpoint_tests.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response +from endpoint_tests.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response +from endpoint_tests.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response +from endpoint_tests.models.link import Link +from endpoint_tests.models.self_links import SelfLinks +from endpoint_tests.models.self_links_links import SelfLinksLinks +from endpoint_tests.models.severity import Severity +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_labels_inner import TestLabelsInner +from endpoint_tests.models.test_probe_mode import TestProbeMode +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId +from endpoint_tests.models.test_update import TestUpdate +from endpoint_tests.models.unauthorized_error import UnauthorizedError +from endpoint_tests.models.validation_error import ValidationError +from endpoint_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/endpoint_tests/endpoint_tests/models/account_group_id.py b/endpoint_tests/endpoint_tests/models/account_group_id.py new file mode 100644 index 00000000..a8e855c4 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/account_group_id.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AccountGroupId(BaseModel): + """ + AccountGroupId + """ # 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.") + __properties: ClassVar[List[str]] = ["aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupId 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 AccountGroupId 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") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/alert_direction.py b/endpoint_tests/endpoint_tests/models/alert_direction.py new file mode 100644 index 00000000..8fd6d400 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/alert_direction.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AlertDirection(str, Enum): + """ + Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/alert_rounds_violation_mode.py b/endpoint_tests/endpoint_tests/models/alert_rounds_violation_mode.py new file mode 100644 index 00000000..2482b866 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/alert_rounds_violation_mode.py @@ -0,0 +1,37 @@ +# 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.2 + 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 AlertRoundsViolationMode(str, Enum): + """ + `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + """ + + """ + allowed enum values + """ + EXACT = 'exact' + ANY = 'any' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertRoundsViolationMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/alert_rule.py b/endpoint_tests/endpoint_tests/models/alert_rule.py new file mode 100644 index 00000000..6682c0e2 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/alert_rule.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_tests.models.alert_direction import AlertDirection +from endpoint_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from endpoint_tests.models.alert_type import AlertType +from endpoint_tests.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class AlertRule(BaseModel): + """ + AlertRule + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") + rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") + expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") + direction: Optional[AlertDirection] = None + is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") + severity: Optional[Severity] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "severity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertRule 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([ + "rule_id", + "rule_name", + "expression", + "is_default", + "minimum_sources", + "minimum_sources_pct", + "rounds_violating_out_of", + "rounds_violating_required", + ]) + + _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 AlertRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/alert_type.py b/endpoint_tests/endpoint_tests/models/alert_type.py new file mode 100644 index 00000000..7118a0ff --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/alert_type.py @@ -0,0 +1,62 @@ +# 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.2 + 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 AlertType(str, Enum): + """ + Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + """ + + """ + allowed enum values + """ + PAGE_MINUS_LOAD = 'page-load' + HTTP_MINUS_SERVER = 'http-server' + END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' + END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' + VOICE = 'voice' + DNS_MINUS_SERVER = 'dns-server' + DNS_MINUS_TRACE = 'dns-trace' + DNSSEC = 'dnssec' + BGP = 'bgp' + PATH_MINUS_TRACE = 'path-trace' + FTP = 'ftp' + SIP_MINUS_SERVER = 'sip-server' + TRANSACTIONS = 'transactions' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + AGENT = 'agent' + NETWORK_MINUS_OUTAGE = 'network-outage' + APPLICATION_MINUS_OUTAGE = 'application-outage' + DEVICE_MINUS_DEVICE = 'device-device' + DEVICE_MINUS_INTERFACE = 'device-interface' + ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' + ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' + ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' + API = 'api' + WEB_MINUS_TRANSACTION = 'web-transaction' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/dynamic_test.py b/endpoint_tests/endpoint_tests/models/dynamic_test.py new file mode 100644 index 00000000..3c2657b8 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/dynamic_test.py @@ -0,0 +1,147 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_tests.models.dynamic_test_links import DynamicTestLinks +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_labels_inner import TestLabelsInner +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class DynamicTest(BaseModel): + """ + DynamicTest + """ # 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.") + links: Optional[DynamicTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "testName", "labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "modified_date", + "test_id", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicTest 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"), + "_links": DynamicTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "application": obj.get("application"), + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/dynamic_test_links.py b/endpoint_tests/endpoint_tests/models/dynamic_test_links.py new file mode 100644 index 00000000..a147a740 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/dynamic_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_tests.models.dynamic_test_links_self import DynamicTestLinksSelf +from endpoint_tests.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class DynamicTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information. + """ # noqa: E501 + var_self: Optional[DynamicTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": DynamicTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/dynamic_test_links_self.py b/endpoint_tests/endpoint_tests/models/dynamic_test_links_self.py new file mode 100644 index 00000000..de3f7f9f --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/dynamic_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 DynamicTestLinksSelf(BaseModel): + """ + DynamicTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTestLinksSelf 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 DynamicTestLinksSelf 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/endpoint_tests/endpoint_tests/models/dynamic_test_request.py b/endpoint_tests/endpoint_tests/models/dynamic_test_request.py new file mode 100644 index 00000000..5c0694e1 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/dynamic_test_request.py @@ -0,0 +1,157 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.dynamic_test_links import DynamicTestLinks +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_labels_inner import TestLabelsInner +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class DynamicTestRequest(BaseModel): + """ + DynamicTestRequest + """ # 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.") + links: Optional[DynamicTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + labels: Optional[List[TestLabelsInner]] = None + agent_selector_type: Optional[EndpointTestAgentSelectorType] = Field(default=None, alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute this test.", alias="maxMachines") + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "application", "createdDate", "interval", "isEnabled", "hasPathTraceInSession", "hasPing", "hasTraceroute", "modifiedDate", "networkMeasurements", "protocol", "tcpProbeMode", "testId", "testName", "labels", "agentSelectorType", "agents", "endpointAgentLabels", "maxMachines"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DynamicTestRequest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "modified_date", + "test_id", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DynamicTestRequest 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"), + "_links": DynamicTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "application": obj.get("application"), + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines") + }) + return _obj + + diff --git a/endpoint/tests_api/tests_api/models/dynamic_tests.py b/endpoint_tests/endpoint_tests/models/dynamic_tests.py similarity index 75% rename from endpoint/tests_api/tests_api/models/dynamic_tests.py rename to endpoint_tests/endpoint_tests/models/dynamic_tests.py index bf17a3e2..1669ed43 100644 --- a/endpoint/tests_api/tests_api/models/dynamic_tests.py +++ b/endpoint_tests/endpoint_tests/models/dynamic_tests.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.dynamic_test import DynamicTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_tests.models.dynamic_test import DynamicTest +from typing import Optional, Set +from typing_extensions import Self class DynamicTests(BaseModel): """ @@ -33,10 +30,11 @@ class DynamicTests(BaseModel): tests: Optional[List[DynamicTest]] = None __properties: ClassVar[List[str]] = ["tests"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class DynamicTests(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DynamicTests from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class DynamicTests(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in tests (list) @@ -79,7 +79,7 @@ class DynamicTests(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DynamicTests from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class DynamicTests(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "tests": [DynamicTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None + "tests": [DynamicTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None }) return _obj diff --git a/endpoint_tests/endpoint_tests/models/endpoint_agent_labels_selector_config.py b/endpoint_tests/endpoint_tests/models/endpoint_agent_labels_selector_config.py new file mode 100644 index 00000000..ad028a33 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_agent_labels_selector_config.py @@ -0,0 +1,99 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentLabelsSelectorConfig(BaseModel): + """ + Agent labels selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "endpointAgentLabels"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^agent-labels$", value): + raise ValueError(r"must validate the regular expression /^agent-labels$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentLabelsSelectorConfig 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 EndpointAgentLabelsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines"), + "endpointAgentLabels": obj.get("endpointAgentLabels") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_agent_selector_config.py b/endpoint_tests/endpoint_tests/models/endpoint_agent_selector_config.py new file mode 100644 index 00000000..d1e618d0 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_agent_selector_config.py @@ -0,0 +1,154 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from endpoint_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig +from endpoint_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig +from endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +ENDPOINTAGENTSELECTORCONFIG_ONE_OF_SCHEMAS = ["EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig"] + +class EndpointAgentSelectorConfig(BaseModel): + """ + Agents selection object based on agentSelectorType. + """ + # data type: EndpointAllAgentsSelectorConfig + oneof_schema_1_validator: Optional[EndpointAllAgentsSelectorConfig] = None + # data type: EndpointAgentLabelsSelectorConfig + oneof_schema_2_validator: Optional[EndpointAgentLabelsSelectorConfig] = None + # data type: EndpointSpecificAgentsSelectorConfig + oneof_schema_3_validator: Optional[EndpointSpecificAgentsSelectorConfig] = None + actual_instance: Optional[Union[EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]] = None + one_of_schemas: Set[str] = { "EndpointAgentLabelsSelectorConfig", "EndpointAllAgentsSelectorConfig", "EndpointSpecificAgentsSelectorConfig" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = EndpointAgentSelectorConfig.model_construct() + error_messages = [] + match = 0 + # validate data type: EndpointAllAgentsSelectorConfig + if not isinstance(v, EndpointAllAgentsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAllAgentsSelectorConfig`") + else: + match += 1 + # validate data type: EndpointAgentLabelsSelectorConfig + if not isinstance(v, EndpointAgentLabelsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointAgentLabelsSelectorConfig`") + else: + match += 1 + # validate data type: EndpointSpecificAgentsSelectorConfig + if not isinstance(v, EndpointSpecificAgentsSelectorConfig): + error_messages.append(f"Error! Input type `{type(v)}` is not `EndpointSpecificAgentsSelectorConfig`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into EndpointAllAgentsSelectorConfig + try: + instance.actual_instance = EndpointAllAgentsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EndpointAgentLabelsSelectorConfig + try: + instance.actual_instance = EndpointAgentLabelsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into EndpointSpecificAgentsSelectorConfig + try: + instance.actual_instance = EndpointSpecificAgentsSelectorConfig.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into EndpointAgentSelectorConfig with oneOf schemas: EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], EndpointAgentLabelsSelectorConfig, EndpointAllAgentsSelectorConfig, EndpointSpecificAgentsSelectorConfig]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_instant_test.py b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_instant_test.py new file mode 100644 index 00000000..ba3d1d46 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_instant_test.py @@ -0,0 +1,105 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentToServerInstantTest(BaseModel): + """ + EndpointAgentToServerInstantTest + """ # noqa: E501 + agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + test_name: StrictStr = Field(description="Name of the test.", alias="testName") + server_name: StrictStr = Field(description="A server address without a protocol or IP address.", alias="serverName") + __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "serverName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentToServerInstantTest 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 EndpointAgentToServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines"), + "port": obj.get("port"), + "testName": obj.get("testName"), + "serverName": obj.get("serverName") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test.py b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test.py new file mode 100644 index 00000000..ee938c2f --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test.py @@ -0,0 +1,171 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.alert_rule import AlertRule +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_labels_inner import TestLabelsInner +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentToServerTest(BaseModel): + """ + EndpointAgentToServerTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: Annotated[str, Field(strict=True)] = Field(description="Type of test being queried.") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules", "labels"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^agent-to-server$", value): + raise ValueError(r"must validate the regular expression /^agent-to-server$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + "type", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test_request.py b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test_request.py similarity index 80% rename from endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test_request.py rename to endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test_request.py index c6f3b940..ff1ff39c 100644 --- a/endpoint/tests_api/tests_api/models/endpoint_agent_to_server_test_request.py +++ b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_test_request.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,17 +17,13 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_tests.models.test_interval import TestInterval +from typing import Optional, Set +from typing_extensions import Self class EndpointAgentToServerTestRequest(BaseModel): """ @@ -38,17 +34,18 @@ class EndpointAgentToServerTestRequest(BaseModel): has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") test_name: StrictStr = Field(description="Name of the test.", alias="testName") server_name: StrictStr = Field(description="A server address without a protocol or IP address.", alias="serverName") interval: TestInterval __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "serverName", "interval"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ class EndpointAgentToServerTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointAgentToServerTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,16 +72,18 @@ class EndpointAgentToServerTestRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointAgentToServerTestRequest from a dict""" if obj is None: return None diff --git a/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_tests.py b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_tests.py new file mode 100644 index 00000000..9bc07af2 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_agent_to_server_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentToServerTests(BaseModel): + """ + EndpointAgentToServerTests + """ # noqa: E501 + tests: Optional[List[EndpointAgentToServerTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentToServerTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [EndpointAgentToServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_all_agents_selector_config.py b/endpoint_tests/endpoint_tests/models/endpoint_all_agents_selector_config.py new file mode 100644 index 00000000..c7835ecd --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_all_agents_selector_config.py @@ -0,0 +1,97 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAllAgentsSelectorConfig(BaseModel): + """ + Any agent selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^all-agents$", value): + raise ValueError(r"must validate the regular expression /^all-agents$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAllAgentsSelectorConfig 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 EndpointAllAgentsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_dynamic_test_update.py b/endpoint_tests/endpoint_tests/models/endpoint_dynamic_test_update.py new file mode 100644 index 00000000..3011ab90 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_dynamic_test_update.py @@ -0,0 +1,100 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_probe_mode import TestProbeMode +from typing import Optional, Set +from typing_extensions import Self + +class EndpointDynamicTestUpdate(BaseModel): + """ + EndpointDynamicTestUpdate + """ # noqa: E501 + interval: Optional[TestInterval] = None + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + protocol: Optional[EndpointTestProtocol] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") + application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + __properties: ClassVar[List[str]] = ["interval", "testName", "protocol", "isEnabled", "tcpProbeMode", "application"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointDynamicTestUpdate 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 EndpointDynamicTestUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "testName": obj.get("testName"), + "protocol": obj.get("protocol"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "tcpProbeMode": obj.get("tcpProbeMode"), + "application": obj.get("application") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_http_server_base_test.py b/endpoint_tests/endpoint_tests/models/endpoint_http_server_base_test.py new file mode 100644 index 00000000..ba3f8b10 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_http_server_base_test.py @@ -0,0 +1,107 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerBaseTest(BaseModel): + """ + EndpointHttpServerBaseTest + """ # noqa: E501 + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + protocol: Optional[EndpointTestProtocol] = None + url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") + __properties: ClassVar[List[str]] = ["authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerBaseTest 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 EndpointHttpServerBaseTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "protocol": obj.get("protocol"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "verifyCertificate": obj.get("verifyCertificate") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_http_server_instant_test.py b/endpoint_tests/endpoint_tests/models/endpoint_http_server_instant_test.py new file mode 100644 index 00000000..c547b4fb --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_http_server_instant_test.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerInstantTest(BaseModel): + """ + EndpointHttpServerInstantTest + """ # noqa: E501 + agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + test_name: StrictStr = Field(description="Name of the test.", alias="testName") + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + http_time_limit: StrictInt = Field(description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + protocol: Optional[EndpointTestProtocol] = None + url: StrictStr = Field(description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + ssl_version_id: TestSslVersionId = Field(alias="sslVersionId") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + verify_certificate: StrictBool = Field(description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") + target_response_time: StrictInt = Field(description="Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red).", alias="targetResponseTime") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "targetResponseTime", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerInstantTest 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 EndpointHttpServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines"), + "port": obj.get("port"), + "testName": obj.get("testName"), + "authType": obj.get("authType"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "protocol": obj.get("protocol"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "verifyCertificate": obj.get("verifyCertificate"), + "targetResponseTime": obj.get("targetResponseTime"), + "password": obj.get("password") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_http_server_test.py b/endpoint_tests/endpoint_tests/models/endpoint_http_server_test.py new file mode 100644 index 00000000..bbde5c43 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_http_server_test.py @@ -0,0 +1,203 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.alert_rule import AlertRule +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_labels_inner import TestLabelsInner +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpServerTest(BaseModel): + """ + EndpointHttpServerTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: Annotated[str, Field(strict=True)] = Field(description="Type of test being queried.") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") + http_time_limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of time in milliseconds the agents wait before a request times out.", alias="httpTimeLimit") + url: Optional[StrictStr] = Field(default=None, description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + 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") + 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") + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + labels: Optional[List[TestLabelsInner]] = None + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules", "authType", "httpTimeLimit", "url", "username", "sslVersionId", "verifyCertificate", "contentRegex", "followRedirects", "httpTargetTime", "httpVersion", "postBody", "sslVersion", "useNtlm", "userAgent", "labels"] + + @field_validator('type') + def type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^http-server$", value): + raise ValueError(r"must validate the regular expression /^http-server$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpServerTest 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([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + "type", + "ssl_version", + "labels", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointHttpServerTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "authType": obj.get("authType"), + "httpTimeLimit": obj.get("httpTimeLimit"), + "url": obj.get("url"), + "username": obj.get("username"), + "sslVersionId": obj.get("sslVersionId"), + "verifyCertificate": obj.get("verifyCertificate"), + "contentRegex": obj.get("contentRegex"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "postBody": obj.get("postBody"), + "sslVersion": obj.get("sslVersion"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/endpoint/tests_api/tests_api/models/endpoint_http_server_test_request.py b/endpoint_tests/endpoint_tests/models/endpoint_http_server_test_request.py similarity index 81% rename from endpoint/tests_api/tests_api/models/endpoint_http_server_test_request.py rename to endpoint_tests/endpoint_tests/models/endpoint_http_server_test_request.py index d70bfc46..5a268a3d 100644 --- a/endpoint/tests_api/tests_api/models/endpoint_http_server_test_request.py +++ b/endpoint_tests/endpoint_tests/models/endpoint_http_server_test_request.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,21 +17,17 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType -from tests_api.models.endpoint_test_auth_type import EndpointTestAuthType -from tests_api.models.endpoint_test_protocol import EndpointTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self class EndpointHttpServerTestRequest(BaseModel): """ @@ -42,7 +38,7 @@ class EndpointHttpServerTestRequest(BaseModel): has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") - max_machines: Annotated[int, Field(le=5000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") test_name: StrictStr = Field(description="Name of the test.", alias="testName") auth_type: Optional[EndpointTestAuthType] = Field(default=None, alias="authType") @@ -52,17 +48,18 @@ class EndpointHttpServerTestRequest(BaseModel): url: StrictStr = Field(description="Test target URL. Optionally, you can specify a protocol (http or https). If no protocol is provided, the default `https` protocol is used.") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") ssl_version_id: TestSslVersionId = Field(alias="sslVersionId") - tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") verify_certificate: StrictBool = Field(description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") target_response_time: StrictInt = Field(description="Response time target in milliseconds. Affects the colors of agents and legends on the view page. The value is compared with actual response time in order to determine the color scale (from green to red).", alias="targetResponseTime") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") interval: TestInterval __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName", "authType", "hasPathTraceInSession", "httpTimeLimit", "protocol", "url", "username", "sslVersionId", "tcpProbeMode", "verifyCertificate", "targetResponseTime", "password", "interval"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -75,7 +72,7 @@ class EndpointHttpServerTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointHttpServerTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,16 +86,18 @@ class EndpointHttpServerTestRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointHttpServerTestRequest from a dict""" if obj is None: return None diff --git a/endpoint/tests_api/tests_api/models/endpoint_http_server_tests.py b/endpoint_tests/endpoint_tests/models/endpoint_http_server_tests.py similarity index 75% rename from endpoint/tests_api/tests_api/models/endpoint_http_server_tests.py rename to endpoint_tests/endpoint_tests/models/endpoint_http_server_tests.py index 52b8b5c1..6d616ac9 100644 --- a/endpoint/tests_api/tests_api/models/endpoint_http_server_tests.py +++ b/endpoint_tests/endpoint_tests/models/endpoint_http_server_tests.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.endpoint_http_server_test import EndpointHttpServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from typing import Optional, Set +from typing_extensions import Self class EndpointHttpServerTests(BaseModel): """ @@ -33,10 +30,11 @@ class EndpointHttpServerTests(BaseModel): tests: Optional[List[EndpointHttpServerTest]] = None __properties: ClassVar[List[str]] = ["tests"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class EndpointHttpServerTests(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointHttpServerTests from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class EndpointHttpServerTests(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in tests (list) @@ -79,7 +79,7 @@ class EndpointHttpServerTests(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointHttpServerTests from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class EndpointHttpServerTests(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "tests": [EndpointHttpServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None + "tests": [EndpointHttpServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None }) return _obj diff --git a/endpoint_tests/endpoint_tests/models/endpoint_http_test_update.py b/endpoint_tests/endpoint_tests/models/endpoint_http_test_update.py new file mode 100644 index 00000000..7d6809d6 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_http_test_update.py @@ -0,0 +1,100 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_probe_mode import TestProbeMode +from typing import Optional, Set +from typing_extensions import Self + +class EndpointHttpTestUpdate(BaseModel): + """ + EndpointHttpTestUpdate + """ # noqa: E501 + interval: Optional[TestInterval] = None + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + protocol: Optional[EndpointTestProtocol] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") + url: Optional[StrictStr] = Field(default=None, description="Target for the test.") + __properties: ClassVar[List[str]] = ["interval", "testName", "protocol", "isEnabled", "tcpProbeMode", "url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointHttpTestUpdate 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 EndpointHttpTestUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "testName": obj.get("testName"), + "protocol": obj.get("protocol"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "tcpProbeMode": obj.get("tcpProbeMode"), + "url": obj.get("url") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_instant_test.py b/endpoint_tests/endpoint_tests/models/endpoint_instant_test.py new file mode 100644 index 00000000..65aae122 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_instant_test.py @@ -0,0 +1,103 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType +from typing import Optional, Set +from typing_extensions import Self + +class EndpointInstantTest(BaseModel): + """ + EndpointInstantTest + """ # noqa: E501 + agent_selector_type: EndpointTestAgentSelectorType = Field(alias="agentSelectorType") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + has_ping: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run ping.", alias="hasPing") + has_traceroute: Optional[StrictBool] = Field(default=True, description="Optional flag indicating if the test should run traceroute.", alias="hasTraceroute") + endpoint_agent_labels: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.", alias="endpointAgentLabels") + max_machines: Annotated[int, Field(le=50000, strict=True, ge=1)] = Field(description="Maximum number of agents which can execute the test.", alias="maxMachines") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + test_name: StrictStr = Field(description="Name of the test.", alias="testName") + __properties: ClassVar[List[str]] = ["agentSelectorType", "agents", "hasPing", "hasTraceroute", "endpointAgentLabels", "maxMachines", "port", "testName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointInstantTest 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 EndpointInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "agents": obj.get("agents"), + "hasPing": obj.get("hasPing") if obj.get("hasPing") is not None else True, + "hasTraceroute": obj.get("hasTraceroute") if obj.get("hasTraceroute") is not None else True, + "endpointAgentLabels": obj.get("endpointAgentLabels"), + "maxMachines": obj.get("maxMachines"), + "port": obj.get("port"), + "testName": obj.get("testName") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_network_test_update.py b/endpoint_tests/endpoint_tests/models/endpoint_network_test_update.py new file mode 100644 index 00000000..0329d444 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_network_test_update.py @@ -0,0 +1,103 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_probe_mode import TestProbeMode +from typing import Optional, Set +from typing_extensions import Self + +class EndpointNetworkTestUpdate(BaseModel): + """ + EndpointNetworkTestUpdate + """ # noqa: E501 + interval: Optional[TestInterval] = None + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + protocol: Optional[EndpointTestProtocol] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + __properties: ClassVar[List[str]] = ["interval", "testName", "protocol", "isEnabled", "tcpProbeMode", "port", "server"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointNetworkTestUpdate 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 EndpointNetworkTestUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "testName": obj.get("testName"), + "protocol": obj.get("protocol"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "tcpProbeMode": obj.get("tcpProbeMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "server": obj.get("server") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_scheduled_test_type.py b/endpoint_tests/endpoint_tests/models/endpoint_scheduled_test_type.py new file mode 100644 index 00000000..9d26672b --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_scheduled_test_type.py @@ -0,0 +1,37 @@ +# 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.2 + 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 EndpointScheduledTestType(str, Enum): + """ + Type of test being queried. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + HTTP_MINUS_SERVER = 'http-server' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointScheduledTestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_specific_agents_selector_config.py b/endpoint_tests/endpoint_tests/models/endpoint_specific_agents_selector_config.py new file mode 100644 index 00000000..7b71a85d --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_specific_agents_selector_config.py @@ -0,0 +1,99 @@ +# 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.2 + 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EndpointSpecificAgentsSelectorConfig(BaseModel): + """ + Specific agents selection object. + """ # noqa: E501 + agent_selector_type: Annotated[str, Field(strict=True)] = Field(alias="agentSelectorType") + max_machines: Optional[Annotated[int, Field(le=50000, strict=True, ge=1)]] = Field(default=None, description="Maximum number of agents which can execute the test.", alias="maxMachines") + agents: Optional[List[StrictStr]] = Field(default=None, description="List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.") + __properties: ClassVar[List[str]] = ["agentSelectorType", "maxMachines", "agents"] + + @field_validator('agent_selector_type') + def agent_selector_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^specific-agents$", value): + raise ValueError(r"must validate the regular expression /^specific-agents$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointSpecificAgentsSelectorConfig 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 EndpointSpecificAgentsSelectorConfig from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentSelectorType": obj.get("agentSelectorType"), + "maxMachines": obj.get("maxMachines"), + "agents": obj.get("agents") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_test.py b/endpoint_tests/endpoint_tests/models/endpoint_test.py new file mode 100644 index 00000000..f6f6a857 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_test.py @@ -0,0 +1,150 @@ +# 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.2 + 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 endpoint_tests.models.alert_rule import AlertRule +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig +from endpoint_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse +from typing import Optional, Set +from typing_extensions import Self + +class EndpointTest(BaseModel): + """ + EndpointTest + """ # 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.") + links: Optional[EndpointTestLinks] = Field(default=None, alias="_links") + agent_selector_config: Optional[EndpointAgentSelectorConfig] = Field(default=None, alias="agentSelectorConfig") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + interval: Optional[TestInterval] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + is_saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="isSavedEvent") + has_path_trace_in_session: Optional[StrictBool] = Field(default=None, description="Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session.", alias="hasPathTraceInSession") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + 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") + port: Optional[StrictInt] = Field(default=None, description="Port number, if not specified, the port is selected based on a protocol (HTTP 80, HTTPS 443).") + protocol: Optional[EndpointTestProtocol] = None + server: Optional[StrictStr] = Field(default=None, description="Target domain name or IP address.") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned a unique ID to access test data from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + type: EndpointScheduledTestType + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + __properties: ClassVar[List[str]] = ["aid", "_links", "agentSelectorConfig", "createdDate", "interval", "isEnabled", "isSavedEvent", "hasPathTraceInSession", "modifiedDate", "networkMeasurements", "port", "protocol", "server", "testId", "testName", "type", "tcpProbeMode", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTest 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. + """ + excluded_fields: Set[str] = set([ + "created_date", + "is_saved_event", + "modified_date", + "test_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 agent_selector_config + if self.agent_selector_config: + _dict['agentSelectorConfig'] = self.agent_selector_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointTest 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"), + "_links": EndpointTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agentSelectorConfig": EndpointAgentSelectorConfig.from_dict(obj["agentSelectorConfig"]) if obj.get("agentSelectorConfig") is not None else None, + "createdDate": obj.get("createdDate"), + "interval": obj.get("interval"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "isSavedEvent": obj.get("isSavedEvent"), + "hasPathTraceInSession": obj.get("hasPathTraceInSession"), + "modifiedDate": obj.get("modifiedDate"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "port": obj.get("port"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_test_agent_selector_type.py b/endpoint_tests/endpoint_tests/models/endpoint_test_agent_selector_type.py new file mode 100644 index 00000000..f125d4fd --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_test_agent_selector_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 EndpointTestAgentSelectorType(str, Enum): + """ + Retrieve either all available agents, a specific list of agents, or a list of agent labels. + """ + + """ + allowed enum values + """ + ALL_MINUS_AGENTS = 'all-agents' + SPECIFIC_MINUS_AGENTS = 'specific-agents' + AGENT_MINUS_LABELS = 'agent-labels' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestAgentSelectorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_test_auth_type.py b/endpoint_tests/endpoint_tests/models/endpoint_test_auth_type.py new file mode 100644 index 00000000..524bc02b --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_test_auth_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 EndpointTestAuthType(str, Enum): + """ + HTTP authentication type. + """ + + """ + allowed enum values + """ + NONE = 'none' + BASIC = 'basic' + NTLM = 'ntlm' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestAuthType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_test_links.py b/endpoint_tests/endpoint_tests/models/endpoint_test_links.py new file mode 100644 index 00000000..6bd30815 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_test_links_self import EndpointTestLinksSelf +from endpoint_tests.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class EndpointTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information. + """ # noqa: E501 + var_self: Optional[EndpointTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": EndpointTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/endpoint_test_links_self.py b/endpoint_tests/endpoint_tests/models/endpoint_test_links_self.py new file mode 100644 index 00000000..990d1f54 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 EndpointTestLinksSelf(BaseModel): + """ + EndpointTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointTestLinksSelf 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 EndpointTestLinksSelf 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/endpoint_tests/endpoint_tests/models/endpoint_test_protocol.py b/endpoint_tests/endpoint_tests/models/endpoint_test_protocol.py new file mode 100644 index 00000000..40595c3b --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/endpoint_test_protocol.py @@ -0,0 +1,41 @@ +# 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.2 + 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 EndpointTestProtocol(str, Enum): + """ + Protocol used to perform the test. + """ + + """ + allowed enum values + """ + ICMP = 'icmp' + ICMP_MINUS_WITH_MINUS_TCP_MINUS_CONNECT = 'icmp-with-tcp-connect' + TCP = 'tcp' + PREFER_MINUS_TCP = 'prefer-tcp' + AST_MINUS_AUTODETECT = 'ast-autodetect' + AUTODETECT = 'autodetect' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint/tests_api/tests_api/models/endpoint_tests.py b/endpoint_tests/endpoint_tests/models/endpoint_tests.py similarity index 75% rename from endpoint/tests_api/tests_api/models/endpoint_tests.py rename to endpoint_tests/endpoint_tests/models/endpoint_tests.py index 4aff38f0..cae5b636 100644 --- a/endpoint/tests_api/tests_api/models/endpoint_tests.py +++ b/endpoint_tests/endpoint_tests/models/endpoint_tests.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.endpoint_test import EndpointTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from endpoint_tests.models.endpoint_test import EndpointTest +from typing import Optional, Set +from typing_extensions import Self class EndpointTests(BaseModel): """ @@ -33,10 +30,11 @@ class EndpointTests(BaseModel): tests: Optional[List[EndpointTest]] = None __properties: ClassVar[List[str]] = ["tests"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ class EndpointTests(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EndpointTests from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +61,12 @@ class EndpointTests(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in tests (list) @@ -79,7 +79,7 @@ class EndpointTests(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EndpointTests from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ class EndpointTests(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "tests": [EndpointTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None + "tests": [EndpointTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None }) return _obj diff --git a/endpoint_tests/endpoint_tests/models/error.py b/endpoint_tests/endpoint_tests/models/error.py new file mode 100644 index 00000000..61517952 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_tests/endpoint_tests/models/get_dynamic_tests_list200_response.py b/endpoint_tests/endpoint_tests/models/get_dynamic_tests_list200_response.py new file mode 100644 index 00000000..8ee46af6 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/get_dynamic_tests_list200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_tests.models.dynamic_test import DynamicTest +from endpoint_tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetDynamicTestsList200Response(BaseModel): + """ + GetDynamicTestsList200Response + """ # noqa: E501 + tests: Optional[List[DynamicTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDynamicTestsList200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetDynamicTestsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [DynamicTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/get_endpoint_agent_toserver_tests_list200_response.py b/endpoint_tests/endpoint_tests/models/get_endpoint_agent_toserver_tests_list200_response.py new file mode 100644 index 00000000..2839c86a --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/get_endpoint_agent_toserver_tests_list200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from endpoint_tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetEndpointAgentToserverTestsList200Response(BaseModel): + """ + GetEndpointAgentToserverTestsList200Response + """ # noqa: E501 + tests: Optional[List[EndpointAgentToServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetEndpointAgentToserverTestsList200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetEndpointAgentToserverTestsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [EndpointAgentToServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/get_endpoint_httpserver_tests_list200_response.py b/endpoint_tests/endpoint_tests/models/get_endpoint_httpserver_tests_list200_response.py new file mode 100644 index 00000000..bc8c9bad --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/get_endpoint_httpserver_tests_list200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from endpoint_tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetEndpointHttpserverTestsList200Response(BaseModel): + """ + GetEndpointHttpserverTestsList200Response + """ # noqa: E501 + tests: Optional[List[EndpointHttpServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetEndpointHttpserverTestsList200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetEndpointHttpserverTestsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [EndpointHttpServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/get_endpoint_tests_list200_response.py b/endpoint_tests/endpoint_tests/models/get_endpoint_tests_list200_response.py new file mode 100644 index 00000000..beb2c7e8 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/get_endpoint_tests_list200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_test import EndpointTest +from endpoint_tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetEndpointTestsList200Response(BaseModel): + """ + GetEndpointTestsList200Response + """ # noqa: E501 + tests: Optional[List[EndpointTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetEndpointTestsList200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetEndpointTestsList200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [EndpointTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/link.py b/endpoint_tests/endpoint_tests/models/link.py new file mode 100644 index 00000000..9aa9c7ea --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_tests/endpoint_tests/models/self_links.py b/endpoint_tests/endpoint_tests/models/self_links.py new file mode 100644 index 00000000..d8fa1086 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/self_links_links.py b/endpoint_tests/endpoint_tests/models/self_links_links.py new file mode 100644 index 00000000..71dc12f0 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 endpoint_tests.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/endpoint_tests/endpoint_tests/models/severity.py b/endpoint_tests/endpoint_tests/models/severity.py new file mode 100644 index 00000000..02b88e2e --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/severity.py @@ -0,0 +1,40 @@ +# 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.2 + 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 Severity(str, Enum): + """ + The severity of the alert. + """ + + """ + allowed enum values + """ + INFO = 'info' + MAJOR = 'major' + MINOR = 'minor' + CRITICAL = 'critical' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Severity from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/test_interval.py b/endpoint_tests/endpoint_tests/models/test_interval.py new file mode 100644 index 00000000..0797bd85 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/test_interval.py @@ -0,0 +1,42 @@ +# 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.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/test_labels_inner.py b/endpoint_tests/endpoint_tests/models/test_labels_inner.py new file mode 100644 index 00000000..cd53d7dd --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/test_labels_inner.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestLabelsInner(BaseModel): + """ + TestLabelsInner + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") + name: Optional[StrictStr] = Field(default=None, description="Name of the label.") + is_builtin: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestLabelsInner 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 TestLabelsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "name": obj.get("name"), + "isBuiltin": obj.get("isBuiltin") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/test_probe_mode.py b/endpoint_tests/endpoint_tests/models/test_probe_mode.py new file mode 100644 index 00000000..545e9da9 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/test_probe_mode.py @@ -0,0 +1,38 @@ +# 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.2 + 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 TestProbeMode(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to TCP. + """ + + """ + allowed enum values + """ + AUTO = 'auto' + SACK = 'sack' + SYN = 'syn' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProbeMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/test_probe_mode_response.py b/endpoint_tests/endpoint_tests/models/test_probe_mode_response.py new file mode 100644 index 00000000..33a386e3 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/test_probe_mode_response.py @@ -0,0 +1,39 @@ +# 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.2 + 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 TestProbeModeResponse(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to TCP. + """ + + """ + allowed enum values + """ + AUTO = 'auto' + SACK = 'sack' + SYN = 'syn' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProbeModeResponse from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/test_ssl_version_id.py b/endpoint_tests/endpoint_tests/models/test_ssl_version_id.py new file mode 100644 index 00000000..a55e4d05 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/test_ssl_version_id.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestSslVersionId(str, Enum): + """ + SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestSslVersionId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/endpoint_tests/endpoint_tests/models/test_update.py b/endpoint_tests/endpoint_tests/models/test_update.py new file mode 100644 index 00000000..b5abe46c --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/test_update.py @@ -0,0 +1,98 @@ +# 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.2 + 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 endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol +from endpoint_tests.models.test_interval import TestInterval +from endpoint_tests.models.test_probe_mode import TestProbeMode +from typing import Optional, Set +from typing_extensions import Self + +class TestUpdate(BaseModel): + """ + TestUpdate + """ # noqa: E501 + interval: Optional[TestInterval] = None + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test.", alias="testName") + protocol: Optional[EndpointTestProtocol] = None + is_enabled: Optional[StrictBool] = Field(default=True, description="Indicates if test is enabled.", alias="isEnabled") + tcp_probe_mode: Optional[TestProbeMode] = Field(default=None, alias="tcpProbeMode") + __properties: ClassVar[List[str]] = ["interval", "testName", "protocol", "isEnabled", "tcpProbeMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestUpdate 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 TestUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "testName": obj.get("testName"), + "protocol": obj.get("protocol"), + "isEnabled": obj.get("isEnabled") if obj.get("isEnabled") is not None else True, + "tcpProbeMode": obj.get("tcpProbeMode") + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/unauthorized_error.py b/endpoint_tests/endpoint_tests/models/unauthorized_error.py new file mode 100644 index 00000000..b0b3a487 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/endpoint_tests/endpoint_tests/models/validation_error.py b/endpoint_tests/endpoint_tests/models/validation_error.py new file mode 100644 index 00000000..daa396c4 --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 endpoint_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/endpoint_tests/endpoint_tests/models/validation_error_all_of_errors.py b/endpoint_tests/endpoint_tests/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..b9f6669c --- /dev/null +++ b/endpoint_tests/endpoint_tests/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/endpoint/tests_api/tests_api/py.typed b/endpoint_tests/endpoint_tests/py.typed similarity index 100% rename from endpoint/tests_api/tests_api/py.typed rename to endpoint_tests/endpoint_tests/py.typed diff --git a/endpoint_tests/endpoint_tests/rest.py b/endpoint_tests/endpoint_tests/rest.py new file mode 100644 index 00000000..3905336f --- /dev/null +++ b/endpoint_tests/endpoint_tests/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from endpoint_tests.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/endpoint_tests/pyproject.toml b/endpoint_tests/pyproject.toml new file mode 100644 index 00000000..d6cfbeee --- /dev/null +++ b/endpoint_tests/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "endpoint_tests" +version = "1.0.0" +description = "Endpoint Tests API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Endpoint Tests API"] +include = ["endpoint_tests/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "endpoint_tests", + #"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/endpoint/tests_api/requirements.txt b/endpoint_tests/requirements.txt similarity index 100% rename from endpoint/tests_api/requirements.txt rename to endpoint_tests/requirements.txt diff --git a/endpoint/tests_api/setup.cfg b/endpoint_tests/setup.cfg similarity index 100% rename from endpoint/tests_api/setup.cfg rename to endpoint_tests/setup.cfg diff --git a/endpoint_tests/setup.py b/endpoint_tests/setup.py new file mode 100644 index 00000000..b8f26078 --- /dev/null +++ b/endpoint_tests/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "endpoint-tests" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Endpoint Tests API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/endpoint_tests", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Endpoint Tests API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + """, # noqa: E501 + package_data={"endpoint_tests": ["py.typed"]}, +) diff --git a/endpoint_tests/test-requirements.txt b/endpoint_tests/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/endpoint_tests/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/endpoint/tests_api/test/__init__.py b/endpoint_tests/test/__init__.py similarity index 100% rename from endpoint/tests_api/test/__init__.py rename to endpoint_tests/test/__init__.py diff --git a/endpoint_tests/test/test_account_group_id.py b/endpoint_tests/test/test_account_group_id.py new file mode 100644 index 00000000..c0c56a15 --- /dev/null +++ b/endpoint_tests/test/test_account_group_id.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.account_group_id import AccountGroupId + +class TestAccountGroupId(unittest.TestCase): + """AccountGroupId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupId: + """Test AccountGroupId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupId` + """ + model = AccountGroupId() + if include_optional: + return AccountGroupId( + aid = '1234' + ) + else: + return AccountGroupId( + ) + """ + + def testAccountGroupId(self): + """Test AccountGroupId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_alert_direction.py b/endpoint_tests/test/test_alert_direction.py new file mode 100644 index 00000000..22de2613 --- /dev/null +++ b/endpoint_tests/test/test_alert_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.alert_direction import AlertDirection + +class TestAlertDirection(unittest.TestCase): + """AlertDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertDirection(self): + """Test AlertDirection""" + # inst = AlertDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_alert_rounds_violation_mode.py b/endpoint_tests/test/test_alert_rounds_violation_mode.py new file mode 100644 index 00000000..0b8e35fe --- /dev/null +++ b/endpoint_tests/test/test_alert_rounds_violation_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode + +class TestAlertRoundsViolationMode(unittest.TestCase): + """AlertRoundsViolationMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertRoundsViolationMode(self): + """Test AlertRoundsViolationMode""" + # inst = AlertRoundsViolationMode() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_alert_rule.py b/endpoint_tests/test/test_alert_rule.py new file mode 100644 index 00000000..e0e4b0fa --- /dev/null +++ b/endpoint_tests/test/test_alert_rule.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.alert_rule import AlertRule + +class TestAlertRule(unittest.TestCase): + """AlertRule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertRule: + """Test AlertRule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertRule` + """ + model = AlertRule() + if include_optional: + return AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major' + ) + else: + return AlertRule( + ) + """ + + def testAlertRule(self): + """Test AlertRule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_alert_type.py b/endpoint_tests/test/test_alert_type.py new file mode 100644 index 00000000..a5868028 --- /dev/null +++ b/endpoint_tests/test/test_alert_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.alert_type import AlertType + +class TestAlertType(unittest.TestCase): + """AlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertType(self): + """Test AlertType""" + # inst = AlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_dynamic_test.py b/endpoint_tests/test/test_dynamic_test.py new file mode 100644 index 00000000..c825e1da --- /dev/null +++ b/endpoint_tests/test/test_dynamic_test.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.dynamic_test import DynamicTest + +class TestDynamicTest(unittest.TestCase): + """DynamicTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTest: + """Test DynamicTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTest` + """ + model = DynamicTest() + if include_optional: + return DynamicTest( + aid = '1234', + links = endpoint_tests.models.dynamic_test_links.DynamicTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + application = 'webex', + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + has_path_trace_in_session = True, + has_ping = True, + has_traceroute = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + protocol = 'icmp', + tcp_probe_mode = 'auto', + test_id = '281474976710706', + test_name = 'Test name', + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return DynamicTest( + ) + """ + + def testDynamicTest(self): + """Test DynamicTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_dynamic_test_links.py b/endpoint_tests/test/test_dynamic_test_links.py new file mode 100644 index 00000000..e21ac7fe --- /dev/null +++ b/endpoint_tests/test/test_dynamic_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.dynamic_test_links import DynamicTestLinks + +class TestDynamicTestLinks(unittest.TestCase): + """DynamicTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTestLinks: + """Test DynamicTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTestLinks` + """ + model = DynamicTestLinks() + if include_optional: + return DynamicTestLinks( + var_self = None, + test_results = [{"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"}] + ) + else: + return DynamicTestLinks( + ) + """ + + def testDynamicTestLinks(self): + """Test DynamicTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_dynamic_test_links_self.py b/endpoint_tests/test/test_dynamic_test_links_self.py new file mode 100644 index 00000000..cb9f10d2 --- /dev/null +++ b/endpoint_tests/test/test_dynamic_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.dynamic_test_links_self import DynamicTestLinksSelf + +class TestDynamicTestLinksSelf(unittest.TestCase): + """DynamicTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTestLinksSelf: + """Test DynamicTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTestLinksSelf` + """ + model = DynamicTestLinksSelf() + if include_optional: + return DynamicTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return DynamicTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testDynamicTestLinksSelf(self): + """Test DynamicTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/tests_api/test/test_dynamic_test_request.py b/endpoint_tests/test/test_dynamic_test_request.py similarity index 79% rename from endpoint/tests_api/test/test_dynamic_test_request.py rename to endpoint_tests/test/test_dynamic_test_request.py index 35e07498..45f842aa 100644 --- a/endpoint/tests_api/test/test_dynamic_test_request.py +++ b/endpoint_tests/test/test_dynamic_test_request.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dynamic_test_request import DynamicTestRequest +from endpoint_tests.models.dynamic_test_request import DynamicTestRequest class TestDynamicTestRequest(unittest.TestCase): """DynamicTestRequest unit test stubs""" @@ -36,10 +35,11 @@ class TestDynamicTestRequest(unittest.TestCase): model = DynamicTestRequest() if include_optional: return DynamicTestRequest( - links = tests_api.models.dynamic_test_links.DynamicTestLinks( + aid = '1234', + links = endpoint_tests.models.dynamic_test_links.DynamicTestLinks( self = null, test_results = [{"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"}], ), - agent_selector_config = tests_api.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + agent_selector_config = endpoint_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), application = 'webex', created_date = '2022-07-17T22:00:54Z', interval = 120, @@ -52,8 +52,10 @@ class TestDynamicTestRequest(unittest.TestCase): protocol = 'icmp', tcp_probe_mode = 'auto', test_id = '281474976710706', - aid = None, test_name = 'Test name', + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], agent_selector_type = 'all-agents', agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], endpoint_agent_labels = ["567","214"], diff --git a/endpoint_tests/test/test_dynamic_tests.py b/endpoint_tests/test/test_dynamic_tests.py new file mode 100644 index 00000000..ad117b3b --- /dev/null +++ b/endpoint_tests/test/test_dynamic_tests.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.dynamic_tests import DynamicTests + +class TestDynamicTests(unittest.TestCase): + """DynamicTests unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DynamicTests: + """Test DynamicTests + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DynamicTests` + """ + model = DynamicTests() + if include_optional: + return DynamicTests( + tests = [ + null + ] + ) + else: + return DynamicTests( + ) + """ + + def testDynamicTests(self): + """Test DynamicTests""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_agent_labels_selector_config.py b/endpoint_tests/test/test_endpoint_agent_labels_selector_config.py new file mode 100644 index 00000000..84e93fd2 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_agent_labels_selector_config.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig + +class TestEndpointAgentLabelsSelectorConfig(unittest.TestCase): + """EndpointAgentLabelsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentLabelsSelectorConfig: + """Test EndpointAgentLabelsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentLabelsSelectorConfig` + """ + model = EndpointAgentLabelsSelectorConfig() + if include_optional: + return EndpointAgentLabelsSelectorConfig( + agent_selector_type = 'agent-labels', + max_machines = 10, + endpoint_agent_labels = ["567","214"] + ) + else: + return EndpointAgentLabelsSelectorConfig( + agent_selector_type = 'agent-labels', + ) + """ + + def testEndpointAgentLabelsSelectorConfig(self): + """Test EndpointAgentLabelsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_agent_selector_config.py b/endpoint_tests/test/test_endpoint_agent_selector_config.py new file mode 100644 index 00000000..6c3ecb2b --- /dev/null +++ b/endpoint_tests/test/test_endpoint_agent_selector_config.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_agent_selector_config import EndpointAgentSelectorConfig + +class TestEndpointAgentSelectorConfig(unittest.TestCase): + """EndpointAgentSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentSelectorConfig: + """Test EndpointAgentSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentSelectorConfig` + """ + model = EndpointAgentSelectorConfig() + if include_optional: + return EndpointAgentSelectorConfig( + agent_selector_type = 'specific-agents', + max_machines = 10, + endpoint_agent_labels = [567, 214], + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c] + ) + else: + return EndpointAgentSelectorConfig( + agent_selector_type = 'specific-agents', + ) + """ + + def testEndpointAgentSelectorConfig(self): + """Test EndpointAgentSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_agent_to_server_instant_test.py b/endpoint_tests/test/test_endpoint_agent_to_server_instant_test.py new file mode 100644 index 00000000..6db143fa --- /dev/null +++ b/endpoint_tests/test/test_endpoint_agent_to_server_instant_test.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_agent_to_server_instant_test import EndpointAgentToServerInstantTest + +class TestEndpointAgentToServerInstantTest(unittest.TestCase): + """EndpointAgentToServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentToServerInstantTest: + """Test EndpointAgentToServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentToServerInstantTest` + """ + model = EndpointAgentToServerInstantTest() + if include_optional: + return EndpointAgentToServerInstantTest( + agent_selector_type = 'all-agents', + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], + has_ping = True, + has_traceroute = True, + endpoint_agent_labels = [567, 214], + max_machines = 10, + port = 80, + test_name = 'Test name', + server_name = 'www.example.com' + ) + else: + return EndpointAgentToServerInstantTest( + agent_selector_type = 'all-agents', + max_machines = 10, + test_name = 'Test name', + server_name = 'www.example.com', + ) + """ + + def testEndpointAgentToServerInstantTest(self): + """Test EndpointAgentToServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_agent_to_server_test.py b/endpoint_tests/test/test_endpoint_agent_to_server_test.py new file mode 100644 index 00000000..69f1a016 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_agent_to_server_test.py @@ -0,0 +1,88 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest + +class TestEndpointAgentToServerTest(unittest.TestCase): + """EndpointAgentToServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentToServerTest: + """Test EndpointAgentToServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentToServerTest` + """ + model = EndpointAgentToServerTest() + if include_optional: + return EndpointAgentToServerTest( + aid = '1234', + links = endpoint_tests.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'agent-to-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return EndpointAgentToServerTest( + type = 'agent-to-server', + ) + """ + + def testEndpointAgentToServerTest(self): + """Test EndpointAgentToServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_agent_to_server_test_request.py b/endpoint_tests/test/test_endpoint_agent_to_server_test_request.py similarity index 81% rename from endpoint/tests_api/test/test_endpoint_agent_to_server_test_request.py rename to endpoint_tests/test/test_endpoint_agent_to_server_test_request.py index e2b62e72..351914a9 100644 --- a/endpoint/tests_api/test/test_endpoint_agent_to_server_test_request.py +++ b/endpoint_tests/test/test_endpoint_agent_to_server_test_request.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest +from endpoint_tests.models.endpoint_agent_to_server_test_request import EndpointAgentToServerTestRequest class TestEndpointAgentToServerTestRequest(unittest.TestCase): """EndpointAgentToServerTestRequest unit test stubs""" @@ -37,10 +36,10 @@ class TestEndpointAgentToServerTestRequest(unittest.TestCase): if include_optional: return EndpointAgentToServerTestRequest( agent_selector_type = 'all-agents', - agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], has_ping = True, has_traceroute = True, - endpoint_agent_labels = ["567","214"], + endpoint_agent_labels = [567, 214], max_machines = 10, port = 80, test_name = 'Test name', diff --git a/endpoint/tests_api/test/test_endpoint_agent_to_server_tests.py b/endpoint_tests/test/test_endpoint_agent_to_server_tests.py similarity index 84% rename from endpoint/tests_api/test/test_endpoint_agent_to_server_tests.py rename to endpoint_tests/test/test_endpoint_agent_to_server_tests.py index a8d776a5..5363d51a 100644 --- a/endpoint/tests_api/test/test_endpoint_agent_to_server_tests.py +++ b/endpoint_tests/test/test_endpoint_agent_to_server_tests.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests +from endpoint_tests.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests class TestEndpointAgentToServerTests(unittest.TestCase): """EndpointAgentToServerTests unit test stubs""" diff --git a/endpoint_tests/test/test_endpoint_all_agents_selector_config.py b/endpoint_tests/test/test_endpoint_all_agents_selector_config.py new file mode 100644 index 00000000..4709d119 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_all_agents_selector_config.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig + +class TestEndpointAllAgentsSelectorConfig(unittest.TestCase): + """EndpointAllAgentsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAllAgentsSelectorConfig: + """Test EndpointAllAgentsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAllAgentsSelectorConfig` + """ + model = EndpointAllAgentsSelectorConfig() + if include_optional: + return EndpointAllAgentsSelectorConfig( + agent_selector_type = 'all-agents', + max_machines = 10 + ) + else: + return EndpointAllAgentsSelectorConfig( + agent_selector_type = 'all-agents', + ) + """ + + def testEndpointAllAgentsSelectorConfig(self): + """Test EndpointAllAgentsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_dynamic_test_update.py b/endpoint_tests/test/test_endpoint_dynamic_test_update.py new file mode 100644 index 00000000..4549683f --- /dev/null +++ b/endpoint_tests/test/test_endpoint_dynamic_test_update.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_dynamic_test_update import EndpointDynamicTestUpdate + +class TestEndpointDynamicTestUpdate(unittest.TestCase): + """EndpointDynamicTestUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointDynamicTestUpdate: + """Test EndpointDynamicTestUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointDynamicTestUpdate` + """ + model = EndpointDynamicTestUpdate() + if include_optional: + return EndpointDynamicTestUpdate( + interval = 120, + test_name = 'Test name', + protocol = 'icmp', + is_enabled = True, + tcp_probe_mode = 'auto', + application = 'webex' + ) + else: + return EndpointDynamicTestUpdate( + ) + """ + + def testEndpointDynamicTestUpdate(self): + """Test EndpointDynamicTestUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_http_server_base_test.py b/endpoint_tests/test/test_endpoint_http_server_base_test.py new file mode 100644 index 00000000..1391f8af --- /dev/null +++ b/endpoint_tests/test/test_endpoint_http_server_base_test.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_http_server_base_test import EndpointHttpServerBaseTest + +class TestEndpointHttpServerBaseTest(unittest.TestCase): + """EndpointHttpServerBaseTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerBaseTest: + """Test EndpointHttpServerBaseTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerBaseTest` + """ + model = EndpointHttpServerBaseTest() + if include_optional: + return EndpointHttpServerBaseTest( + auth_type = 'none', + has_path_trace_in_session = True, + http_time_limit = 5000, + protocol = 'icmp', + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + tcp_probe_mode = 'auto', + verify_certificate = False + ) + else: + return EndpointHttpServerBaseTest( + ) + """ + + def testEndpointHttpServerBaseTest(self): + """Test EndpointHttpServerBaseTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_http_server_instant_test.py b/endpoint_tests/test/test_endpoint_http_server_instant_test.py new file mode 100644 index 00000000..fcedc37c --- /dev/null +++ b/endpoint_tests/test/test_endpoint_http_server_instant_test.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_http_server_instant_test import EndpointHttpServerInstantTest + +class TestEndpointHttpServerInstantTest(unittest.TestCase): + """EndpointHttpServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerInstantTest: + """Test EndpointHttpServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerInstantTest` + """ + model = EndpointHttpServerInstantTest() + if include_optional: + return EndpointHttpServerInstantTest( + agent_selector_type = 'all-agents', + agents = [0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1, 66eec0f1-72b4-4755-aa83-3aed61d17f3c], + has_ping = True, + has_traceroute = True, + endpoint_agent_labels = [567, 214], + max_machines = 10, + port = 80, + test_name = 'Test name', + auth_type = 'none', + has_path_trace_in_session = True, + http_time_limit = 5000, + protocol = 'icmp', + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + tcp_probe_mode = 'auto', + verify_certificate = False, + target_response_time = 1000, + password = 'password' + ) + else: + return EndpointHttpServerInstantTest( + agent_selector_type = 'all-agents', + max_machines = 10, + test_name = 'Test name', + http_time_limit = 5000, + url = 'www.example.com', + ssl_version_id = '0', + verify_certificate = False, + target_response_time = 1000, + ) + """ + + def testEndpointHttpServerInstantTest(self): + """Test EndpointHttpServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_http_server_test.py b/endpoint_tests/test/test_endpoint_http_server_test.py new file mode 100644 index 00000000..af9570dd --- /dev/null +++ b/endpoint_tests/test/test_endpoint_http_server_test.py @@ -0,0 +1,102 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest + +class TestEndpointHttpServerTest(unittest.TestCase): + """EndpointHttpServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpServerTest: + """Test EndpointHttpServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpServerTest` + """ + model = EndpointHttpServerTest() + if include_optional: + return EndpointHttpServerTest( + aid = '1234', + links = endpoint_tests.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'http-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + auth_type = 'none', + http_time_limit = 5000, + url = 'www.example.com', + username = 'username', + ssl_version_id = '0', + verify_certificate = False, + content_regex = '(regex)+', + follow_redirects = True, + http_target_time = 100, + http_version = 1, + post_body = 'body', + ssl_version = 'Auto', + use_ntlm = False, + user_agent = 'curl', + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ] + ) + else: + return EndpointHttpServerTest( + type = 'http-server', + ) + """ + + def testEndpointHttpServerTest(self): + """Test EndpointHttpServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/tests_api/test/test_endpoint_http_server_test_request.py b/endpoint_tests/test/test_endpoint_http_server_test_request.py similarity index 90% rename from endpoint/tests_api/test/test_endpoint_http_server_test_request.py rename to endpoint_tests/test/test_endpoint_http_server_test_request.py index a59ede30..c2312390 100644 --- a/endpoint/tests_api/test/test_endpoint_http_server_test_request.py +++ b/endpoint_tests/test/test_endpoint_http_server_test_request.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest +from endpoint_tests.models.endpoint_http_server_test_request import EndpointHttpServerTestRequest class TestEndpointHttpServerTestRequest(unittest.TestCase): """EndpointHttpServerTestRequest unit test stubs""" diff --git a/endpoint/tests_api/test/test_endpoint_http_server_tests.py b/endpoint_tests/test/test_endpoint_http_server_tests.py similarity index 84% rename from endpoint/tests_api/test/test_endpoint_http_server_tests.py rename to endpoint_tests/test/test_endpoint_http_server_tests.py index c3eed5b9..d0146aad 100644 --- a/endpoint/tests_api/test/test_endpoint_http_server_tests.py +++ b/endpoint_tests/test/test_endpoint_http_server_tests.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.endpoint_http_server_tests import EndpointHttpServerTests +from endpoint_tests.models.endpoint_http_server_tests import EndpointHttpServerTests class TestEndpointHttpServerTests(unittest.TestCase): """EndpointHttpServerTests unit test stubs""" diff --git a/endpoint_tests/test/test_endpoint_http_test_update.py b/endpoint_tests/test/test_endpoint_http_test_update.py new file mode 100644 index 00000000..91d2cfe8 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_http_test_update.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate + +class TestEndpointHttpTestUpdate(unittest.TestCase): + """EndpointHttpTestUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointHttpTestUpdate: + """Test EndpointHttpTestUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointHttpTestUpdate` + """ + model = EndpointHttpTestUpdate() + if include_optional: + return EndpointHttpTestUpdate( + interval = 120, + test_name = 'Test name', + protocol = 'icmp', + is_enabled = True, + tcp_probe_mode = 'auto', + url = 'www.thousandeyes.com' + ) + else: + return EndpointHttpTestUpdate( + ) + """ + + def testEndpointHttpTestUpdate(self): + """Test EndpointHttpTestUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_instant_test.py b/endpoint_tests/test/test_endpoint_instant_test.py new file mode 100644 index 00000000..5acd28db --- /dev/null +++ b/endpoint_tests/test/test_endpoint_instant_test.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_instant_test import EndpointInstantTest + +class TestEndpointInstantTest(unittest.TestCase): + """EndpointInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointInstantTest: + """Test EndpointInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointInstantTest` + """ + model = EndpointInstantTest() + if include_optional: + return EndpointInstantTest( + agent_selector_type = 'all-agents', + agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"], + has_ping = True, + has_traceroute = True, + endpoint_agent_labels = ["567","214"], + max_machines = 10, + port = 80, + test_name = 'Test name' + ) + else: + return EndpointInstantTest( + agent_selector_type = 'all-agents', + max_machines = 10, + test_name = 'Test name', + ) + """ + + def testEndpointInstantTest(self): + """Test EndpointInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_network_test_update.py b/endpoint_tests/test/test_endpoint_network_test_update.py new file mode 100644 index 00000000..b95048e4 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_network_test_update.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate + +class TestEndpointNetworkTestUpdate(unittest.TestCase): + """EndpointNetworkTestUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointNetworkTestUpdate: + """Test EndpointNetworkTestUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointNetworkTestUpdate` + """ + model = EndpointNetworkTestUpdate() + if include_optional: + return EndpointNetworkTestUpdate( + interval = 120, + test_name = 'Test name', + protocol = 'icmp', + is_enabled = True, + tcp_probe_mode = 'auto', + port = 1, + server = 'www.example.com' + ) + else: + return EndpointNetworkTestUpdate( + ) + """ + + def testEndpointNetworkTestUpdate(self): + """Test EndpointNetworkTestUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_scheduled_test_type.py b/endpoint_tests/test/test_endpoint_scheduled_test_type.py new file mode 100644 index 00000000..1c287f41 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_scheduled_test_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType + +class TestEndpointScheduledTestType(unittest.TestCase): + """EndpointScheduledTestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointScheduledTestType(self): + """Test EndpointScheduledTestType""" + # inst = EndpointScheduledTestType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_specific_agents_selector_config.py b/endpoint_tests/test/test_endpoint_specific_agents_selector_config.py new file mode 100644 index 00000000..ee885313 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_specific_agents_selector_config.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig + +class TestEndpointSpecificAgentsSelectorConfig(unittest.TestCase): + """EndpointSpecificAgentsSelectorConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointSpecificAgentsSelectorConfig: + """Test EndpointSpecificAgentsSelectorConfig + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointSpecificAgentsSelectorConfig` + """ + model = EndpointSpecificAgentsSelectorConfig() + if include_optional: + return EndpointSpecificAgentsSelectorConfig( + agent_selector_type = 'specific-agents', + max_machines = 10, + agents = ["0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1","66eec0f1-72b4-4755-aa83-3aed61d17f3c"] + ) + else: + return EndpointSpecificAgentsSelectorConfig( + agent_selector_type = 'specific-agents', + ) + """ + + def testEndpointSpecificAgentsSelectorConfig(self): + """Test EndpointSpecificAgentsSelectorConfig""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_test.py b/endpoint_tests/test/test_endpoint_test.py new file mode 100644 index 00000000..71bd3d0c --- /dev/null +++ b/endpoint_tests/test/test_endpoint_test.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_test import EndpointTest + +class TestEndpointTest(unittest.TestCase): + """EndpointTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTest: + """Test EndpointTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTest` + """ + model = EndpointTest() + if include_optional: + return EndpointTest( + aid = '1234', + links = endpoint_tests.models.endpoint_test_links.EndpointTestLinks( + self = null, + test_results = [{"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"}], ), + agent_selector_config = endpoint_tests.models.endpoint_agent_selector_config.EndpointAgentSelectorConfig(), + created_date = '2022-07-17T22:00:54Z', + interval = 120, + is_enabled = True, + is_saved_event = False, + has_path_trace_in_session = True, + modified_date = '2022-07-17T22:00:54Z', + network_measurements = True, + port = 80, + protocol = 'icmp', + server = 'www.example.com', + test_id = '281474976710706', + test_name = 'Test name', + type = 'agent-to-server', + tcp_probe_mode = 'auto', + alert_rules = [ + endpoint_tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ] + ) + else: + return EndpointTest( + type = 'agent-to-server', + ) + """ + + def testEndpointTest(self): + """Test EndpointTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_test_agent_selector_type.py b/endpoint_tests/test/test_endpoint_test_agent_selector_type.py new file mode 100644 index 00000000..a9f76dd8 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_test_agent_selector_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_test_agent_selector_type import EndpointTestAgentSelectorType + +class TestEndpointTestAgentSelectorType(unittest.TestCase): + """EndpointTestAgentSelectorType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestAgentSelectorType(self): + """Test EndpointTestAgentSelectorType""" + # inst = EndpointTestAgentSelectorType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_test_auth_type.py b/endpoint_tests/test/test_endpoint_test_auth_type.py new file mode 100644 index 00000000..62bc556e --- /dev/null +++ b/endpoint_tests/test/test_endpoint_test_auth_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_test_auth_type import EndpointTestAuthType + +class TestEndpointTestAuthType(unittest.TestCase): + """EndpointTestAuthType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestAuthType(self): + """Test EndpointTestAuthType""" + # inst = EndpointTestAuthType() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_test_links.py b/endpoint_tests/test/test_endpoint_test_links.py new file mode 100644 index 00000000..09cde271 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_test_links import EndpointTestLinks + +class TestEndpointTestLinks(unittest.TestCase): + """EndpointTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTestLinks: + """Test EndpointTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTestLinks` + """ + model = EndpointTestLinks() + if include_optional: + return EndpointTestLinks( + var_self = None, + test_results = [{"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"}] + ) + else: + return EndpointTestLinks( + ) + """ + + def testEndpointTestLinks(self): + """Test EndpointTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_test_links_self.py b/endpoint_tests/test/test_endpoint_test_links_self.py new file mode 100644 index 00000000..5d8fcc41 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_test_links_self import EndpointTestLinksSelf + +class TestEndpointTestLinksSelf(unittest.TestCase): + """EndpointTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTestLinksSelf: + """Test EndpointTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTestLinksSelf` + """ + model = EndpointTestLinksSelf() + if include_optional: + return EndpointTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return EndpointTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testEndpointTestLinksSelf(self): + """Test EndpointTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_test_protocol.py b/endpoint_tests/test/test_endpoint_test_protocol.py new file mode 100644 index 00000000..06ec09f3 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_test_protocol import EndpointTestProtocol + +class TestEndpointTestProtocol(unittest.TestCase): + """EndpointTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointTestProtocol(self): + """Test EndpointTestProtocol""" + # inst = EndpointTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_endpoint_tests.py b/endpoint_tests/test/test_endpoint_tests.py new file mode 100644 index 00000000..f0fa5158 --- /dev/null +++ b/endpoint_tests/test/test_endpoint_tests.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.endpoint_tests import EndpointTests + +class TestEndpointTests(unittest.TestCase): + """EndpointTests unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointTests: + """Test EndpointTests + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointTests` + """ + model = EndpointTests() + if include_optional: + return EndpointTests( + tests = [ + null + ] + ) + else: + return EndpointTests( + ) + """ + + def testEndpointTests(self): + """Test EndpointTests""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_error.py b/endpoint_tests/test/test_error.py new file mode 100644 index 00000000..f958e75b --- /dev/null +++ b/endpoint_tests/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_get_dynamic_tests_list200_response.py b/endpoint_tests/test/test_get_dynamic_tests_list200_response.py new file mode 100644 index 00000000..f87e5998 --- /dev/null +++ b/endpoint_tests/test/test_get_dynamic_tests_list200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.get_dynamic_tests_list200_response import GetDynamicTestsList200Response + +class TestGetDynamicTestsList200Response(unittest.TestCase): + """GetDynamicTestsList200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDynamicTestsList200Response: + """Test GetDynamicTestsList200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDynamicTestsList200Response` + """ + model = GetDynamicTestsList200Response() + if include_optional: + return GetDynamicTestsList200Response( + tests = [ + null + ], + links = endpoint_tests.models.self_links__links.SelfLinks__links( + self = endpoint_tests.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetDynamicTestsList200Response( + ) + """ + + def testGetDynamicTestsList200Response(self): + """Test GetDynamicTestsList200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint/tests_api/test/test_get_endpoint_agent_toserver_tests_list200_response.py b/endpoint_tests/test/test_get_endpoint_agent_toserver_tests_list200_response.py similarity index 81% rename from endpoint/tests_api/test/test_get_endpoint_agent_toserver_tests_list200_response.py rename to endpoint_tests/test/test_get_endpoint_agent_toserver_tests_list200_response.py index 948e3862..6f0bbb16 100644 --- a/endpoint/tests_api/test/test_get_endpoint_agent_toserver_tests_list200_response.py +++ b/endpoint_tests/test/test_get_endpoint_agent_toserver_tests_list200_response.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response +from endpoint_tests.models.get_endpoint_agent_toserver_tests_list200_response import GetEndpointAgentToserverTestsList200Response class TestGetEndpointAgentToserverTestsList200Response(unittest.TestCase): """GetEndpointAgentToserverTestsList200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetEndpointAgentToserverTestsList200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = endpoint_tests.models.self_links__links.SelfLinks__links( + self = endpoint_tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint/tests_api/test/test_get_endpoint_httpserver_tests_list200_response.py b/endpoint_tests/test/test_get_endpoint_httpserver_tests_list200_response.py similarity index 81% rename from endpoint/tests_api/test/test_get_endpoint_httpserver_tests_list200_response.py rename to endpoint_tests/test/test_get_endpoint_httpserver_tests_list200_response.py index 537549ac..8576639b 100644 --- a/endpoint/tests_api/test/test_get_endpoint_httpserver_tests_list200_response.py +++ b/endpoint_tests/test/test_get_endpoint_httpserver_tests_list200_response.py @@ -3,9 +3,9 @@ """ Endpoint Tests API - ## Overview Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response +from endpoint_tests.models.get_endpoint_httpserver_tests_list200_response import GetEndpointHttpserverTestsList200Response class TestGetEndpointHttpserverTestsList200Response(unittest.TestCase): """GetEndpointHttpserverTestsList200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetEndpointHttpserverTestsList200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = endpoint_tests.models.self_links__links.SelfLinks__links( + self = endpoint_tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/endpoint_tests/test/test_get_endpoint_tests_list200_response.py b/endpoint_tests/test/test_get_endpoint_tests_list200_response.py new file mode 100644 index 00000000..429e7835 --- /dev/null +++ b/endpoint_tests/test/test_get_endpoint_tests_list200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.get_endpoint_tests_list200_response import GetEndpointTestsList200Response + +class TestGetEndpointTestsList200Response(unittest.TestCase): + """GetEndpointTestsList200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetEndpointTestsList200Response: + """Test GetEndpointTestsList200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetEndpointTestsList200Response` + """ + model = GetEndpointTestsList200Response() + if include_optional: + return GetEndpointTestsList200Response( + tests = [ + null + ], + links = endpoint_tests.models.self_links__links.SelfLinks__links( + self = endpoint_tests.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetEndpointTestsList200Response( + ) + """ + + def testGetEndpointTestsList200Response(self): + """Test GetEndpointTestsList200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_link.py b/endpoint_tests/test/test_link.py new file mode 100644 index 00000000..0813c735 --- /dev/null +++ b/endpoint_tests/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_self_links.py b/endpoint_tests/test/test_self_links.py new file mode 100644 index 00000000..a95a84af --- /dev/null +++ b/endpoint_tests/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = endpoint_tests.models.self_links__links.SelfLinks__links( + self = endpoint_tests.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_self_links_links.py b/endpoint_tests/test/test_self_links_links.py new file mode 100644 index 00000000..28c5cb09 --- /dev/null +++ b/endpoint_tests/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = endpoint_tests.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_severity.py b/endpoint_tests/test/test_severity.py new file mode 100644 index 00000000..b4fce0a0 --- /dev/null +++ b/endpoint_tests/test/test_severity.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.severity import Severity + +class TestSeverity(unittest.TestCase): + """Severity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSeverity(self): + """Test Severity""" + # inst = Severity() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_test_interval.py b/endpoint_tests/test/test_test_interval.py new file mode 100644 index 00000000..b4057518 --- /dev/null +++ b/endpoint_tests/test/test_test_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_test_labels_inner.py b/endpoint_tests/test/test_test_labels_inner.py new file mode 100644 index 00000000..53cc002a --- /dev/null +++ b/endpoint_tests/test/test_test_labels_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.test_labels_inner import TestLabelsInner + +class TestTestLabelsInner(unittest.TestCase): + """TestLabelsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestLabelsInner: + """Test TestLabelsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestLabelsInner` + """ + model = TestLabelsInner() + if include_optional: + return TestLabelsInner( + label_id = '', + name = '', + is_builtin = True + ) + else: + return TestLabelsInner( + ) + """ + + def testTestLabelsInner(self): + """Test TestLabelsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_test_probe_mode.py b/endpoint_tests/test/test_test_probe_mode.py new file mode 100644 index 00000000..1a0308d5 --- /dev/null +++ b/endpoint_tests/test/test_test_probe_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.test_probe_mode import TestProbeMode + +class TestTestProbeMode(unittest.TestCase): + """TestProbeMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProbeMode(self): + """Test TestProbeMode""" + # inst = TestProbeMode() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_test_probe_mode_response.py b/endpoint_tests/test/test_test_probe_mode_response.py new file mode 100644 index 00000000..eb6700d9 --- /dev/null +++ b/endpoint_tests/test/test_test_probe_mode_response.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.test_probe_mode_response import TestProbeModeResponse + +class TestTestProbeModeResponse(unittest.TestCase): + """TestProbeModeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProbeModeResponse(self): + """Test TestProbeModeResponse""" + # inst = TestProbeModeResponse() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_test_ssl_version_id.py b/endpoint_tests/test/test_test_ssl_version_id.py new file mode 100644 index 00000000..078ce19f --- /dev/null +++ b/endpoint_tests/test/test_test_ssl_version_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.test_ssl_version_id import TestSslVersionId + +class TestTestSslVersionId(unittest.TestCase): + """TestSslVersionId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestSslVersionId(self): + """Test TestSslVersionId""" + # inst = TestSslVersionId() + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_test_update.py b/endpoint_tests/test/test_test_update.py new file mode 100644 index 00000000..d4dda34e --- /dev/null +++ b/endpoint_tests/test/test_test_update.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.test_update import TestUpdate + +class TestTestUpdate(unittest.TestCase): + """TestUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestUpdate: + """Test TestUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestUpdate` + """ + model = TestUpdate() + if include_optional: + return TestUpdate( + interval = 120, + test_name = 'Test name', + protocol = 'icmp', + is_enabled = True, + tcp_probe_mode = 'auto' + ) + else: + return TestUpdate( + ) + """ + + def testTestUpdate(self): + """Test TestUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_unauthorized_error.py b/endpoint_tests/test/test_unauthorized_error.py new file mode 100644 index 00000000..763594a6 --- /dev/null +++ b/endpoint_tests/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_validation_error.py b/endpoint_tests/test/test_validation_error.py new file mode 100644 index 00000000..6050020c --- /dev/null +++ b/endpoint_tests/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + endpoint_tests.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/endpoint_tests/test/test_validation_error_all_of_errors.py b/endpoint_tests/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..b773787b --- /dev/null +++ b/endpoint_tests/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from endpoint_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests_api/.gitignore b/instant_tests/.gitignore similarity index 100% rename from instant_tests_api/.gitignore rename to instant_tests/.gitignore diff --git a/instant_tests_api/.openapi-generator-ignore b/instant_tests/.openapi-generator-ignore similarity index 100% rename from instant_tests_api/.openapi-generator-ignore rename to instant_tests/.openapi-generator-ignore diff --git a/instant_tests/.openapi-generator/FILES b/instant_tests/.openapi-generator/FILES new file mode 100644 index 00000000..4384321c --- /dev/null +++ b/instant_tests/.openapi-generator/FILES @@ -0,0 +1,258 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/Agent.md +docs/AgentBase.md +docs/AgentToAgentApi.md +docs/AgentToAgentInstantTest.md +docs/AgentToAgentInstantTestRequest.md +docs/AgentToAgentProperties.md +docs/AgentToAgentTestProtocol.md +docs/AgentToServerApi.md +docs/AgentToServerInstantTest.md +docs/AgentToServerInstantTestRequest.md +docs/AgentToServerProperties.md +docs/CloudEnterpriseAgentType.md +docs/DNSSecurityApi.md +docs/DNSServerApi.md +docs/DNSTraceApi.md +docs/DnsQueryClass.md +docs/DnsSecInstantTest.md +docs/DnsSecInstantTestRequest.md +docs/DnsSecProperties.md +docs/DnsServerInstantTest.md +docs/DnsServerInstantTestRequest.md +docs/DnsServerProperties.md +docs/DnsServersRequest.md +docs/DnsTraceInstantTest.md +docs/DnsTraceInstantTestRequest.md +docs/DnsTraceProperties.md +docs/Error.md +docs/Expand.md +docs/FTPServerApi.md +docs/FtpServerInstantTest.md +docs/FtpServerProperties.md +docs/FtpServerRequestType.md +docs/HTTPPageLoadApi.md +docs/HTTPServerApi.md +docs/HttpServerInstantTest.md +docs/HttpServerInstantTestRequest.md +docs/HttpServerProperties.md +docs/InstantTest.md +docs/InstantTestRequest.md +docs/InstantTestRequestAgentsInner.md +docs/Link.md +docs/PageLoadInstantTest.md +docs/PageLoadInstantTestRequest.md +docs/PageLoadProperties.md +docs/RunApi.md +docs/SIPServerApi.md +docs/ServerInstantTestRequest.md +docs/SimpleAgent.md +docs/SipServerInstantTest.md +docs/SipServerInstantTestRequest.md +docs/SipServerInstantTestRequest1.md +docs/SipServerInstantTestResponse.md +docs/SipServerProperties.md +docs/SipTestProtocol.md +docs/TestAuthType.md +docs/TestCustomHeaders.md +docs/TestDirection.md +docs/TestDnsServer.md +docs/TestDnsTransportProtocol.md +docs/TestDscpId.md +docs/TestIpv6Policy.md +docs/TestLabelsInner.md +docs/TestPageLoadingStrategy.md +docs/TestPathTraceMode.md +docs/TestProbeMode.md +docs/TestProtocol.md +docs/TestSharedAccountsInner.md +docs/TestSipCredentials.md +docs/TestSslVersionId.md +docs/TestType.md +docs/UnauthorizedError.md +docs/UnexpandedInstantTest.md +docs/UnexpandedInstantTestLinks.md +docs/UnexpandedInstantTestLinksSelf.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/VoiceApi.md +docs/VoiceInstantTest.md +docs/VoiceInstantTestRequest.md +docs/VoiceProperties.md +docs/WebTransactionApi.md +docs/WebTransactionInstantTest.md +docs/WebTransactionInstantTestRequest.md +docs/WebTransactionProperties.md +instant_tests/__init__.py +instant_tests/api/__init__.py +instant_tests/api/agent_to_agent_api.py +instant_tests/api/agent_to_server_api.py +instant_tests/api/dns_security_api.py +instant_tests/api/dns_server_api.py +instant_tests/api/dns_trace_api.py +instant_tests/api/ftp_server_api.py +instant_tests/api/http_page_load_api.py +instant_tests/api/http_server_api.py +instant_tests/api/run_api.py +instant_tests/api/sip_server_api.py +instant_tests/api/voice_api.py +instant_tests/api/web_transaction_api.py +instant_tests/api_client.py +instant_tests/api_response.py +instant_tests/configuration.py +instant_tests/exceptions.py +instant_tests/models/__init__.py +instant_tests/models/agent.py +instant_tests/models/agent_base.py +instant_tests/models/agent_to_agent_instant_test.py +instant_tests/models/agent_to_agent_instant_test_request.py +instant_tests/models/agent_to_agent_properties.py +instant_tests/models/agent_to_agent_test_protocol.py +instant_tests/models/agent_to_server_instant_test.py +instant_tests/models/agent_to_server_instant_test_request.py +instant_tests/models/agent_to_server_properties.py +instant_tests/models/cloud_enterprise_agent_type.py +instant_tests/models/dns_query_class.py +instant_tests/models/dns_sec_instant_test.py +instant_tests/models/dns_sec_instant_test_request.py +instant_tests/models/dns_sec_properties.py +instant_tests/models/dns_server_instant_test.py +instant_tests/models/dns_server_instant_test_request.py +instant_tests/models/dns_server_properties.py +instant_tests/models/dns_servers_request.py +instant_tests/models/dns_trace_instant_test.py +instant_tests/models/dns_trace_instant_test_request.py +instant_tests/models/dns_trace_properties.py +instant_tests/models/error.py +instant_tests/models/expand.py +instant_tests/models/ftp_server_instant_test.py +instant_tests/models/ftp_server_properties.py +instant_tests/models/ftp_server_request_type.py +instant_tests/models/http_server_instant_test.py +instant_tests/models/http_server_instant_test_request.py +instant_tests/models/http_server_properties.py +instant_tests/models/instant_test.py +instant_tests/models/instant_test_request.py +instant_tests/models/instant_test_request_agents_inner.py +instant_tests/models/link.py +instant_tests/models/page_load_instant_test.py +instant_tests/models/page_load_instant_test_request.py +instant_tests/models/page_load_properties.py +instant_tests/models/server_instant_test_request.py +instant_tests/models/simple_agent.py +instant_tests/models/sip_server_instant_test.py +instant_tests/models/sip_server_instant_test_request.py +instant_tests/models/sip_server_instant_test_request1.py +instant_tests/models/sip_server_instant_test_response.py +instant_tests/models/sip_server_properties.py +instant_tests/models/sip_test_protocol.py +instant_tests/models/test_auth_type.py +instant_tests/models/test_custom_headers.py +instant_tests/models/test_direction.py +instant_tests/models/test_dns_server.py +instant_tests/models/test_dns_transport_protocol.py +instant_tests/models/test_dscp_id.py +instant_tests/models/test_ipv6_policy.py +instant_tests/models/test_labels_inner.py +instant_tests/models/test_page_loading_strategy.py +instant_tests/models/test_path_trace_mode.py +instant_tests/models/test_probe_mode.py +instant_tests/models/test_protocol.py +instant_tests/models/test_shared_accounts_inner.py +instant_tests/models/test_sip_credentials.py +instant_tests/models/test_ssl_version_id.py +instant_tests/models/test_type.py +instant_tests/models/unauthorized_error.py +instant_tests/models/unexpanded_instant_test.py +instant_tests/models/unexpanded_instant_test_links.py +instant_tests/models/unexpanded_instant_test_links_self.py +instant_tests/models/validation_error.py +instant_tests/models/validation_error_all_of_errors.py +instant_tests/models/voice_instant_test.py +instant_tests/models/voice_instant_test_request.py +instant_tests/models/voice_properties.py +instant_tests/models/web_transaction_instant_test.py +instant_tests/models/web_transaction_instant_test_request.py +instant_tests/models/web_transaction_properties.py +instant_tests/py.typed +instant_tests/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +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_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_instant_test_request_agents_inner.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_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_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_labels_inner.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_shared_accounts_inner.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_unexpanded_instant_test_links.py +test/test_unexpanded_instant_test_links_self.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.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 diff --git a/instant_tests/.openapi-generator/VERSION b/instant_tests/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/instant_tests/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/instant_tests/README.md b/instant_tests/README.md new file mode 100644 index 00000000..24e53a0b --- /dev/null +++ b/instant_tests/README.md @@ -0,0 +1,209 @@ +# instant-tests +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. + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import instant_tests +``` + +### 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 instant_tests +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import instant_tests +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.AgentToAgentApi(api_client) + agent_to_agent_instant_test_request = instant_tests.AgentToAgentInstantTestRequest() # AgentToAgentInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except ApiException as e: + print("Exception when calling AgentToAgentApi->post_instant_test_agent_to_agent: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*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 + + +## Documentation For Models + + - [Agent](docs/Agent.md) + - [AgentBase](docs/AgentBase.md) + - [AgentToAgentInstantTest](docs/AgentToAgentInstantTest.md) + - [AgentToAgentInstantTestRequest](docs/AgentToAgentInstantTestRequest.md) + - [AgentToAgentProperties](docs/AgentToAgentProperties.md) + - [AgentToAgentTestProtocol](docs/AgentToAgentTestProtocol.md) + - [AgentToServerInstantTest](docs/AgentToServerInstantTest.md) + - [AgentToServerInstantTestRequest](docs/AgentToServerInstantTestRequest.md) + - [AgentToServerProperties](docs/AgentToServerProperties.md) + - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) + - [DnsQueryClass](docs/DnsQueryClass.md) + - [DnsSecInstantTest](docs/DnsSecInstantTest.md) + - [DnsSecInstantTestRequest](docs/DnsSecInstantTestRequest.md) + - [DnsSecProperties](docs/DnsSecProperties.md) + - [DnsServerInstantTest](docs/DnsServerInstantTest.md) + - [DnsServerInstantTestRequest](docs/DnsServerInstantTestRequest.md) + - [DnsServerProperties](docs/DnsServerProperties.md) + - [DnsServersRequest](docs/DnsServersRequest.md) + - [DnsTraceInstantTest](docs/DnsTraceInstantTest.md) + - [DnsTraceInstantTestRequest](docs/DnsTraceInstantTestRequest.md) + - [DnsTraceProperties](docs/DnsTraceProperties.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [FtpServerInstantTest](docs/FtpServerInstantTest.md) + - [FtpServerProperties](docs/FtpServerProperties.md) + - [FtpServerRequestType](docs/FtpServerRequestType.md) + - [HttpServerInstantTest](docs/HttpServerInstantTest.md) + - [HttpServerInstantTestRequest](docs/HttpServerInstantTestRequest.md) + - [HttpServerProperties](docs/HttpServerProperties.md) + - [InstantTest](docs/InstantTest.md) + - [InstantTestRequest](docs/InstantTestRequest.md) + - [InstantTestRequestAgentsInner](docs/InstantTestRequestAgentsInner.md) + - [Link](docs/Link.md) + - [PageLoadInstantTest](docs/PageLoadInstantTest.md) + - [PageLoadInstantTestRequest](docs/PageLoadInstantTestRequest.md) + - [PageLoadProperties](docs/PageLoadProperties.md) + - [ServerInstantTestRequest](docs/ServerInstantTestRequest.md) + - [SimpleAgent](docs/SimpleAgent.md) + - [SipServerInstantTest](docs/SipServerInstantTest.md) + - [SipServerInstantTestRequest](docs/SipServerInstantTestRequest.md) + - [SipServerInstantTestRequest1](docs/SipServerInstantTestRequest1.md) + - [SipServerInstantTestResponse](docs/SipServerInstantTestResponse.md) + - [SipServerProperties](docs/SipServerProperties.md) + - [SipTestProtocol](docs/SipTestProtocol.md) + - [TestAuthType](docs/TestAuthType.md) + - [TestCustomHeaders](docs/TestCustomHeaders.md) + - [TestDirection](docs/TestDirection.md) + - [TestDnsServer](docs/TestDnsServer.md) + - [TestDnsTransportProtocol](docs/TestDnsTransportProtocol.md) + - [TestDscpId](docs/TestDscpId.md) + - [TestIpv6Policy](docs/TestIpv6Policy.md) + - [TestLabelsInner](docs/TestLabelsInner.md) + - [TestPageLoadingStrategy](docs/TestPageLoadingStrategy.md) + - [TestPathTraceMode](docs/TestPathTraceMode.md) + - [TestProbeMode](docs/TestProbeMode.md) + - [TestProtocol](docs/TestProtocol.md) + - [TestSharedAccountsInner](docs/TestSharedAccountsInner.md) + - [TestSipCredentials](docs/TestSipCredentials.md) + - [TestSslVersionId](docs/TestSslVersionId.md) + - [TestType](docs/TestType.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) + - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) + - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [VoiceInstantTest](docs/VoiceInstantTest.md) + - [VoiceInstantTestRequest](docs/VoiceInstantTestRequest.md) + - [VoiceProperties](docs/VoiceProperties.md) + - [WebTransactionInstantTest](docs/WebTransactionInstantTest.md) + - [WebTransactionInstantTestRequest](docs/WebTransactionInstantTestRequest.md) + - [WebTransactionProperties](docs/WebTransactionProperties.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/instant_tests/docs/Agent.md b/instant_tests/docs/Agent.md new file mode 100644 index 00000000..654c165c --- /dev/null +++ b/instant_tests/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 instant_tests.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/instant_tests/docs/AgentBase.md b/instant_tests/docs/AgentBase.md new file mode 100644 index 00000000..5a1f740a --- /dev/null +++ b/instant_tests/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 instant_tests.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/instant_tests/docs/AgentToAgentApi.md b/instant_tests/docs/AgentToAgentApi.md new file mode 100644 index 00000000..0b125d07 --- /dev/null +++ b/instant_tests/docs/AgentToAgentApi.md @@ -0,0 +1,101 @@ +# instant_tests.AgentToAgentApi + +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 + + +# **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 + +Creates and runs a new agent-to-agent instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest +from instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest +from instant_tests.models.expand import Expand +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.AgentToAgentApi(api_client) + agent_to_agent_instant_test_request = instant_tests.AgentToAgentInstantTestRequest() # AgentToAgentInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToAgentApi->post_instant_test_agent_to_agent: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **agent_to_agent_instant_test_request** | [**AgentToAgentInstantTestRequest**](AgentToAgentInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**AgentToAgentInstantTest**](AgentToAgentInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/AgentToAgentInstantTest.md b/instant_tests/docs/AgentToAgentInstantTest.md new file mode 100644 index 00000000..bdf06d93 --- /dev/null +++ b/instant_tests/docs/AgentToAgentInstantTest.md @@ -0,0 +1,55 @@ +# AgentToAgentInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**mss** | **int** | Maximum segment size, in bytes. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] +**target_agent_id** | **str** | `agentId` of the target agent for the test. | +**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] +**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] +**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToAgentInstantTest from a JSON string +agent_to_agent_instant_test_instance = AgentToAgentInstantTest.from_json(json) +# print the JSON string representation of the object +print(AgentToAgentInstantTest.to_json()) + +# convert the object into a dict +agent_to_agent_instant_test_dict = agent_to_agent_instant_test_instance.to_dict() +# create an instance of AgentToAgentInstantTest from a dict +agent_to_agent_instant_test_from_dict = AgentToAgentInstantTest.from_dict(agent_to_agent_instant_test_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/instant_tests_api/docs/AgentToAgentInstantTestRequest.md b/instant_tests/docs/AgentToAgentInstantTestRequest.md similarity index 92% rename from instant_tests_api/docs/AgentToAgentInstantTestRequest.md rename to instant_tests/docs/AgentToAgentInstantTestRequest.md index 025fbf18..ca7b88d8 100644 --- a/instant_tests_api/docs/AgentToAgentInstantTestRequest.md +++ b/instant_tests/docs/AgentToAgentInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,7 +18,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **direction** | [**TestDirection**](TestDirection.md) | | [optional] **dscp** | **str** | DSCP label. | [optional] [readonly] **dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] @@ -31,23 +31,24 @@ Name | Type | Description | Notes **throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] **throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest +from instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of AgentToAgentInstantTestRequest from a JSON string agent_to_agent_instant_test_request_instance = AgentToAgentInstantTestRequest.from_json(json) # print the JSON string representation of the object -print AgentToAgentInstantTestRequest.to_json() +print(AgentToAgentInstantTestRequest.to_json()) # convert the object into a dict agent_to_agent_instant_test_request_dict = agent_to_agent_instant_test_request_instance.to_dict() # create an instance of AgentToAgentInstantTestRequest from a dict -agent_to_agent_instant_test_request_form_dict = agent_to_agent_instant_test_request.from_dict(agent_to_agent_instant_test_request_dict) +agent_to_agent_instant_test_request_from_dict = AgentToAgentInstantTestRequest.from_dict(agent_to_agent_instant_test_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/instant_tests/docs/AgentToAgentProperties.md b/instant_tests/docs/AgentToAgentProperties.md new file mode 100644 index 00000000..11d722b2 --- /dev/null +++ b/instant_tests/docs/AgentToAgentProperties.md @@ -0,0 +1,42 @@ +# AgentToAgentProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**mss** | **int** | Maximum segment size, in bytes. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] +**target_agent_id** | **str** | `agentId` of the target agent for the test. | +**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] +**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] +**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.agent_to_agent_properties import AgentToAgentProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToAgentProperties from a JSON string +agent_to_agent_properties_instance = AgentToAgentProperties.from_json(json) +# print the JSON string representation of the object +print(AgentToAgentProperties.to_json()) + +# convert the object into a dict +agent_to_agent_properties_dict = agent_to_agent_properties_instance.to_dict() +# create an instance of AgentToAgentProperties from a dict +agent_to_agent_properties_from_dict = AgentToAgentProperties.from_dict(agent_to_agent_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/AgentToAgentTestProtocol.md b/instant_tests/docs/AgentToAgentTestProtocol.md new file mode 100644 index 00000000..0b65947f --- /dev/null +++ b/instant_tests/docs/AgentToAgentTestProtocol.md @@ -0,0 +1,11 @@ +# AgentToAgentTestProtocol + + +## 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/instant_tests/docs/AgentToServerApi.md b/instant_tests/docs/AgentToServerApi.md new file mode 100644 index 00000000..2614de1f --- /dev/null +++ b/instant_tests/docs/AgentToServerApi.md @@ -0,0 +1,101 @@ +# instant_tests.AgentToServerApi + +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 + + +# **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 + +Creates and runs a new agent-to-server instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest +from instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest +from instant_tests.models.expand import Expand +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.AgentToServerApi(api_client) + agent_to_server_instant_test_request = instant_tests.AgentToServerInstantTestRequest() # AgentToServerInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToServerApi->post_instant_agent_to_server: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **agent_to_server_instant_test_request** | [**AgentToServerInstantTestRequest**](AgentToServerInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**AgentToServerInstantTest**](AgentToServerInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/AgentToServerInstantTest.md b/instant_tests/docs/AgentToServerInstantTest.md new file mode 100644 index 00000000..9efab157 --- /dev/null +++ b/instant_tests/docs/AgentToServerInstantTest.md @@ -0,0 +1,57 @@ +# AgentToServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] +**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] +**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**server** | **str** | Target name or IP address. | +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] +**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToServerInstantTest from a JSON string +agent_to_server_instant_test_instance = AgentToServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(AgentToServerInstantTest.to_json()) + +# convert the object into a dict +agent_to_server_instant_test_dict = agent_to_server_instant_test_instance.to_dict() +# create an instance of AgentToServerInstantTest from a dict +agent_to_server_instant_test_from_dict = AgentToServerInstantTest.from_dict(agent_to_server_instant_test_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/instant_tests_api/docs/AgentToServerInstantTestRequest.md b/instant_tests/docs/AgentToServerInstantTestRequest.md similarity index 93% rename from instant_tests_api/docs/AgentToServerInstantTestRequest.md rename to instant_tests/docs/AgentToServerInstantTestRequest.md index 1c80dc66..1d1dc38b 100644 --- a/instant_tests_api/docs/AgentToServerInstantTestRequest.md +++ b/instant_tests/docs/AgentToServerInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,7 +18,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] **fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] @@ -33,23 +33,24 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] **network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest +from instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of AgentToServerInstantTestRequest from a JSON string agent_to_server_instant_test_request_instance = AgentToServerInstantTestRequest.from_json(json) # print the JSON string representation of the object -print AgentToServerInstantTestRequest.to_json() +print(AgentToServerInstantTestRequest.to_json()) # convert the object into a dict agent_to_server_instant_test_request_dict = agent_to_server_instant_test_request_instance.to_dict() # create an instance of AgentToServerInstantTestRequest from a dict -agent_to_server_instant_test_request_form_dict = agent_to_server_instant_test_request.from_dict(agent_to_server_instant_test_request_dict) +agent_to_server_instant_test_request_from_dict = AgentToServerInstantTestRequest.from_dict(agent_to_server_instant_test_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/instant_tests/docs/AgentToServerProperties.md b/instant_tests/docs/AgentToServerProperties.md new file mode 100644 index 00000000..917ffb11 --- /dev/null +++ b/instant_tests/docs/AgentToServerProperties.md @@ -0,0 +1,44 @@ +# AgentToServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] +**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] +**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**server** | **str** | Target name or IP address. | +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] +**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.agent_to_server_properties import AgentToServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToServerProperties from a JSON string +agent_to_server_properties_instance = AgentToServerProperties.from_json(json) +# print the JSON string representation of the object +print(AgentToServerProperties.to_json()) + +# convert the object into a dict +agent_to_server_properties_dict = agent_to_server_properties_instance.to_dict() +# create an instance of AgentToServerProperties from a dict +agent_to_server_properties_from_dict = AgentToServerProperties.from_dict(agent_to_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/CloudEnterpriseAgentType.md b/instant_tests/docs/CloudEnterpriseAgentType.md new file mode 100644 index 00000000..371c853b --- /dev/null +++ b/instant_tests/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/instant_tests_api/docs/DNSSecurityApi.md b/instant_tests/docs/DNSSecurityApi.md similarity index 78% rename from instant_tests_api/docs/DNSSecurityApi.md rename to instant_tests/docs/DNSSecurityApi.md index a0d9b7cc..b648b1b2 100644 --- a/instant_tests_api/docs/DNSSecurityApi.md +++ b/instant_tests/docs/DNSSecurityApi.md @@ -1,4 +1,4 @@ -# instant_tests_api.DNSSecurityApi +# instant_tests.DNSSecurityApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,19 +17,18 @@ Creates and runs a new DNS security instant test. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import instant_tests_api -from instant_tests_api.models.dns_sec_instant_test import DnsSecInstantTest -from instant_tests_api.models.dns_sec_instant_test_request import DnsSecInstantTestRequest -from instant_tests_api.models.expand import Expand -from instant_tests_api.rest import ApiException +import instant_tests +from instant_tests.models.dns_sec_instant_test import DnsSecInstantTest +from instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest +from instant_tests.models.expand import Expand +from instant_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 = instant_tests_api.Configuration( +configuration = instant_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,17 +38,17 @@ configuration = instant_tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = instant_tests_api.Configuration( +configuration = instant_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: +with instant_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = instant_tests_api.DNSSecurityApi(api_client) - dns_sec_instant_test_request = instant_tests_api.DnsSecInstantTestRequest() # DnsSecInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + api_instance = instant_tests.DNSSecurityApi(api_client) + dns_sec_instant_test_request = instant_tests.DnsSecInstantTestRequest() # DnsSecInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) try: # Create DNS security instant test @@ -64,6 +63,7 @@ with instant_tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **dns_sec_instant_test_request** | [**DnsSecInstantTestRequest**](DnsSecInstantTestRequest.md)| | @@ -84,6 +84,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| diff --git a/instant_tests/docs/DNSServerApi.md b/instant_tests/docs/DNSServerApi.md new file mode 100644 index 00000000..af5e0691 --- /dev/null +++ b/instant_tests/docs/DNSServerApi.md @@ -0,0 +1,101 @@ +# instant_tests.DNSServerApi + +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 + + +# **post_instant_dns_server** +> DnsServerInstantTest post_instant_dns_server(dns_server_instant_test_request, aid=aid, expand=expand) + +Create DNS server instant test + +Creates and runs a new DNS server instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.dns_server_instant_test import DnsServerInstantTest +from instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest +from instant_tests.models.expand import Expand +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.DNSServerApi(api_client) + dns_server_instant_test_request = instant_tests.DnsServerInstantTestRequest() # DnsServerInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSServerApi->post_instant_dns_server: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dns_server_instant_test_request** | [**DnsServerInstantTestRequest**](DnsServerInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**DnsServerInstantTest**](DnsServerInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/DNSTraceApi.md b/instant_tests/docs/DNSTraceApi.md new file mode 100644 index 00000000..2f7b0ce3 --- /dev/null +++ b/instant_tests/docs/DNSTraceApi.md @@ -0,0 +1,101 @@ +# instant_tests.DNSTraceApi + +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 + + +# **post_instant_dns_trace** +> DnsTraceInstantTest post_instant_dns_trace(dns_trace_instant_test_request, aid=aid, expand=expand) + +Create DNS trace instant test + +Creates and runs a new DNS trace instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest +from instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest +from instant_tests.models.expand import Expand +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.DNSTraceApi(api_client) + dns_trace_instant_test_request = instant_tests.DnsTraceInstantTestRequest() # DnsTraceInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSTraceApi->post_instant_dns_trace: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dns_trace_instant_test_request** | [**DnsTraceInstantTestRequest**](DnsTraceInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**DnsTraceInstantTest**](DnsTraceInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/DnsQueryClass.md b/instant_tests/docs/DnsQueryClass.md new file mode 100644 index 00000000..7dccf1c5 --- /dev/null +++ b/instant_tests/docs/DnsQueryClass.md @@ -0,0 +1,12 @@ +# DnsQueryClass + +Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. + +## 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/instant_tests/docs/DnsSecInstantTest.md b/instant_tests/docs/DnsSecInstantTest.md new file mode 100644 index 00000000..7d84e87b --- /dev/null +++ b/instant_tests/docs/DnsSecInstantTest.md @@ -0,0 +1,44 @@ +# DnsSecInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.dns_sec_instant_test import DnsSecInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsSecInstantTest from a JSON string +dns_sec_instant_test_instance = DnsSecInstantTest.from_json(json) +# print the JSON string representation of the object +print(DnsSecInstantTest.to_json()) + +# convert the object into a dict +dns_sec_instant_test_dict = dns_sec_instant_test_instance.to_dict() +# create an instance of DnsSecInstantTest from a dict +dns_sec_instant_test_from_dict = DnsSecInstantTest.from_dict(dns_sec_instant_test_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/instant_tests_api/docs/DnsSecInstantTestRequest.md b/instant_tests/docs/DnsSecInstantTestRequest.md similarity index 91% rename from instant_tests_api/docs/DnsSecInstantTestRequest.md rename to instant_tests/docs/DnsSecInstantTestRequest.md index d4830e5b..645f21a6 100644 --- a/instant_tests_api/docs/DnsSecInstantTestRequest.md +++ b/instant_tests/docs/DnsSecInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,26 +18,26 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.dns_sec_instant_test_request import DnsSecInstantTestRequest +from instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of DnsSecInstantTestRequest from a JSON string dns_sec_instant_test_request_instance = DnsSecInstantTestRequest.from_json(json) # print the JSON string representation of the object -print DnsSecInstantTestRequest.to_json() +print(DnsSecInstantTestRequest.to_json()) # convert the object into a dict dns_sec_instant_test_request_dict = dns_sec_instant_test_request_instance.to_dict() # create an instance of DnsSecInstantTestRequest from a dict -dns_sec_instant_test_request_form_dict = dns_sec_instant_test_request.from_dict(dns_sec_instant_test_request_dict) +dns_sec_instant_test_request_from_dict = DnsSecInstantTestRequest.from_dict(dns_sec_instant_test_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/instant_tests/docs/DnsSecProperties.md b/instant_tests/docs/DnsSecProperties.md new file mode 100644 index 00000000..9993f349 --- /dev/null +++ b/instant_tests/docs/DnsSecProperties.md @@ -0,0 +1,31 @@ +# DnsSecProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.dns_sec_properties import DnsSecProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsSecProperties from a JSON string +dns_sec_properties_instance = DnsSecProperties.from_json(json) +# print the JSON string representation of the object +print(DnsSecProperties.to_json()) + +# convert the object into a dict +dns_sec_properties_dict = dns_sec_properties_instance.to_dict() +# create an instance of DnsSecProperties from a dict +dns_sec_properties_from_dict = DnsSecProperties.from_dict(dns_sec_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/DnsServerInstantTest.md b/instant_tests/docs/DnsServerInstantTest.md new file mode 100644 index 00000000..d2df9012 --- /dev/null +++ b/instant_tests/docs/DnsServerInstantTest.md @@ -0,0 +1,56 @@ +# DnsServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**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] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.dns_server_instant_test import DnsServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServerInstantTest from a JSON string +dns_server_instant_test_instance = DnsServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(DnsServerInstantTest.to_json()) + +# convert the object into a dict +dns_server_instant_test_dict = dns_server_instant_test_instance.to_dict() +# create an instance of DnsServerInstantTest from a dict +dns_server_instant_test_from_dict = DnsServerInstantTest.from_dict(dns_server_instant_test_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/instant_tests_api/docs/DnsServerInstantTestRequest.md b/instant_tests/docs/DnsServerInstantTestRequest.md similarity index 93% rename from instant_tests_api/docs/DnsServerInstantTestRequest.md rename to instant_tests/docs/DnsServerInstantTestRequest.md index 52689368..82d11cd2 100644 --- a/instant_tests_api/docs/DnsServerInstantTestRequest.md +++ b/instant_tests/docs/DnsServerInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,7 +18,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **dns_servers** | **List[str]** | A list of DNS server FQDN. | **dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] @@ -32,23 +32,24 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.dns_server_instant_test_request import DnsServerInstantTestRequest +from instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of DnsServerInstantTestRequest from a JSON string dns_server_instant_test_request_instance = DnsServerInstantTestRequest.from_json(json) # print the JSON string representation of the object -print DnsServerInstantTestRequest.to_json() +print(DnsServerInstantTestRequest.to_json()) # convert the object into a dict dns_server_instant_test_request_dict = dns_server_instant_test_request_instance.to_dict() # create an instance of DnsServerInstantTestRequest from a dict -dns_server_instant_test_request_form_dict = dns_server_instant_test_request.from_dict(dns_server_instant_test_request_dict) +dns_server_instant_test_request_from_dict = DnsServerInstantTestRequest.from_dict(dns_server_instant_test_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/instant_tests/docs/DnsServerProperties.md b/instant_tests/docs/DnsServerProperties.md new file mode 100644 index 00000000..e42bf4d6 --- /dev/null +++ b/instant_tests/docs/DnsServerProperties.md @@ -0,0 +1,43 @@ +# DnsServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**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] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.dns_server_properties import DnsServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServerProperties from a JSON string +dns_server_properties_instance = DnsServerProperties.from_json(json) +# print the JSON string representation of the object +print(DnsServerProperties.to_json()) + +# convert the object into a dict +dns_server_properties_dict = dns_server_properties_instance.to_dict() +# create an instance of DnsServerProperties from a dict +dns_server_properties_from_dict = DnsServerProperties.from_dict(dns_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/DnsServersRequest.md b/instant_tests/docs/DnsServersRequest.md new file mode 100644 index 00000000..68984b44 --- /dev/null +++ b/instant_tests/docs/DnsServersRequest.md @@ -0,0 +1,29 @@ +# DnsServersRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns_servers** | **List[str]** | A list of DNS server FQDN. | [optional] + +## Example + +```python +from instant_tests.models.dns_servers_request import DnsServersRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServersRequest from a JSON string +dns_servers_request_instance = DnsServersRequest.from_json(json) +# print the JSON string representation of the object +print(DnsServersRequest.to_json()) + +# convert the object into a dict +dns_servers_request_dict = dns_servers_request_instance.to_dict() +# create an instance of DnsServersRequest from a dict +dns_servers_request_from_dict = DnsServersRequest.from_dict(dns_servers_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/instant_tests/docs/DnsTraceInstantTest.md b/instant_tests/docs/DnsTraceInstantTest.md new file mode 100644 index 00000000..b9cab96f --- /dev/null +++ b/instant_tests/docs/DnsTraceInstantTest.md @@ -0,0 +1,45 @@ +# DnsTraceInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsTraceInstantTest from a JSON string +dns_trace_instant_test_instance = DnsTraceInstantTest.from_json(json) +# print the JSON string representation of the object +print(DnsTraceInstantTest.to_json()) + +# convert the object into a dict +dns_trace_instant_test_dict = dns_trace_instant_test_instance.to_dict() +# create an instance of DnsTraceInstantTest from a dict +dns_trace_instant_test_from_dict = DnsTraceInstantTest.from_dict(dns_trace_instant_test_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/instant_tests_api/docs/DnsTraceInstantTestRequest.md b/instant_tests/docs/DnsTraceInstantTestRequest.md similarity index 91% rename from instant_tests_api/docs/DnsTraceInstantTestRequest.md rename to instant_tests/docs/DnsTraceInstantTestRequest.md index da5d7353..35368067 100644 --- a/instant_tests_api/docs/DnsTraceInstantTestRequest.md +++ b/instant_tests/docs/DnsTraceInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,27 +18,27 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest +from instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of DnsTraceInstantTestRequest from a JSON string dns_trace_instant_test_request_instance = DnsTraceInstantTestRequest.from_json(json) # print the JSON string representation of the object -print DnsTraceInstantTestRequest.to_json() +print(DnsTraceInstantTestRequest.to_json()) # convert the object into a dict dns_trace_instant_test_request_dict = dns_trace_instant_test_request_instance.to_dict() # create an instance of DnsTraceInstantTestRequest from a dict -dns_trace_instant_test_request_form_dict = dns_trace_instant_test_request.from_dict(dns_trace_instant_test_request_dict) +dns_trace_instant_test_request_from_dict = DnsTraceInstantTestRequest.from_dict(dns_trace_instant_test_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/instant_tests/docs/DnsTraceProperties.md b/instant_tests/docs/DnsTraceProperties.md new file mode 100644 index 00000000..09924499 --- /dev/null +++ b/instant_tests/docs/DnsTraceProperties.md @@ -0,0 +1,32 @@ +# DnsTraceProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.dns_trace_properties import DnsTraceProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsTraceProperties from a JSON string +dns_trace_properties_instance = DnsTraceProperties.from_json(json) +# print the JSON string representation of the object +print(DnsTraceProperties.to_json()) + +# convert the object into a dict +dns_trace_properties_dict = dns_trace_properties_instance.to_dict() +# create an instance of DnsTraceProperties from a dict +dns_trace_properties_from_dict = DnsTraceProperties.from_dict(dns_trace_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/Error.md b/instant_tests/docs/Error.md new file mode 100644 index 00000000..79ccbb10 --- /dev/null +++ b/instant_tests/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 instant_tests.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/instant_tests/docs/Expand.md b/instant_tests/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/instant_tests/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/instant_tests/docs/FTPServerApi.md b/instant_tests/docs/FTPServerApi.md new file mode 100644 index 00000000..0a5d1de2 --- /dev/null +++ b/instant_tests/docs/FTPServerApi.md @@ -0,0 +1,101 @@ +# instant_tests.FTPServerApi + +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 + + +# **post_instant_ftp_server** +> FtpServerInstantTest post_instant_ftp_server(server_instant_test_request, aid=aid, expand=expand) + +Create FTP server instant test + +Creates and runs a new FTP server instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.expand import Expand +from instant_tests.models.ftp_server_instant_test import FtpServerInstantTest +from instant_tests.models.server_instant_test_request import ServerInstantTestRequest +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.FTPServerApi(api_client) + server_instant_test_request = instant_tests.ServerInstantTestRequest() # ServerInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling FTPServerApi->post_instant_ftp_server: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **server_instant_test_request** | [**ServerInstantTestRequest**](ServerInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**FtpServerInstantTest**](FtpServerInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/FtpServerInstantTest.md b/instant_tests/docs/FtpServerInstantTest.md new file mode 100644 index 00000000..53e1ba27 --- /dev/null +++ b/instant_tests/docs/FtpServerInstantTest.md @@ -0,0 +1,60 @@ +# FtpServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] +**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] +**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] +**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] +**password** | **str** | Password for Basic/NTLM authentication. | +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | +**url** | **str** | Target for the test. | +**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] +**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.ftp_server_instant_test import FtpServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of FtpServerInstantTest from a JSON string +ftp_server_instant_test_instance = FtpServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(FtpServerInstantTest.to_json()) + +# convert the object into a dict +ftp_server_instant_test_dict = ftp_server_instant_test_instance.to_dict() +# create an instance of FtpServerInstantTest from a dict +ftp_server_instant_test_from_dict = FtpServerInstantTest.from_dict(ftp_server_instant_test_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/instant_tests/docs/FtpServerProperties.md b/instant_tests/docs/FtpServerProperties.md new file mode 100644 index 00000000..b927367c --- /dev/null +++ b/instant_tests/docs/FtpServerProperties.md @@ -0,0 +1,47 @@ +# FtpServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] +**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] +**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] +**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] +**password** | **str** | Password for Basic/NTLM authentication. | +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | +**url** | **str** | Target for the test. | +**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] +**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.ftp_server_properties import FtpServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of FtpServerProperties from a JSON string +ftp_server_properties_instance = FtpServerProperties.from_json(json) +# print the JSON string representation of the object +print(FtpServerProperties.to_json()) + +# convert the object into a dict +ftp_server_properties_dict = ftp_server_properties_instance.to_dict() +# create an instance of FtpServerProperties from a dict +ftp_server_properties_from_dict = FtpServerProperties.from_dict(ftp_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/FtpServerRequestType.md b/instant_tests/docs/FtpServerRequestType.md new file mode 100644 index 00000000..58d16832 --- /dev/null +++ b/instant_tests/docs/FtpServerRequestType.md @@ -0,0 +1,12 @@ +# FtpServerRequestType + +Set the type of activity for the test. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests_api/docs/HTTPPageLoadApi.md b/instant_tests/docs/HTTPPageLoadApi.md similarity index 78% rename from instant_tests_api/docs/HTTPPageLoadApi.md rename to instant_tests/docs/HTTPPageLoadApi.md index ce1dd5b3..da83aab7 100644 --- a/instant_tests_api/docs/HTTPPageLoadApi.md +++ b/instant_tests/docs/HTTPPageLoadApi.md @@ -1,4 +1,4 @@ -# instant_tests_api.HTTPPageLoadApi +# instant_tests.HTTPPageLoadApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,19 +17,18 @@ Creates and runs a new HTTP page load instant test. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import instant_tests_api -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.page_load_instant_test import PageLoadInstantTest -from instant_tests_api.models.page_load_instant_test_request import PageLoadInstantTestRequest -from instant_tests_api.rest import ApiException +import instant_tests +from instant_tests.models.expand import Expand +from instant_tests.models.page_load_instant_test import PageLoadInstantTest +from instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest +from instant_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 = instant_tests_api.Configuration( +configuration = instant_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,17 +38,17 @@ configuration = instant_tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = instant_tests_api.Configuration( +configuration = instant_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: +with instant_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = instant_tests_api.HTTPPageLoadApi(api_client) - page_load_instant_test_request = instant_tests_api.PageLoadInstantTestRequest() # PageLoadInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + api_instance = instant_tests.HTTPPageLoadApi(api_client) + page_load_instant_test_request = instant_tests.PageLoadInstantTestRequest() # PageLoadInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) try: # Create HTTP page load instant test @@ -64,6 +63,7 @@ with instant_tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page_load_instant_test_request** | [**PageLoadInstantTestRequest**](PageLoadInstantTestRequest.md)| | @@ -84,6 +84,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| diff --git a/instant_tests/docs/HTTPServerApi.md b/instant_tests/docs/HTTPServerApi.md new file mode 100644 index 00000000..708d1046 --- /dev/null +++ b/instant_tests/docs/HTTPServerApi.md @@ -0,0 +1,101 @@ +# instant_tests.HTTPServerApi + +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 + + +# **post_instant_http_server** +> HttpServerInstantTest post_instant_http_server(http_server_instant_test_request, aid=aid, expand=expand) + +Create HTTP server instant test + +Creates and runs a new HTTP server instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.expand import Expand +from instant_tests.models.http_server_instant_test import HttpServerInstantTest +from instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.HTTPServerApi(api_client) + http_server_instant_test_request = instant_tests.HttpServerInstantTestRequest() # HttpServerInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling HTTPServerApi->post_instant_http_server: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **http_server_instant_test_request** | [**HttpServerInstantTestRequest**](HttpServerInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**HttpServerInstantTest**](HttpServerInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/HttpServerInstantTest.md b/instant_tests/docs/HttpServerInstantTest.md new file mode 100644 index 00000000..2668051e --- /dev/null +++ b/instant_tests/docs/HttpServerInstantTest.md @@ -0,0 +1,74 @@ +# HttpServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] +**headers** | **List[str]** | HTTP request headers used. | [optional] +**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'] +**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] +**dns_override** | **str** | IP address to use for DNS override. | [optional] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**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] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.http_server_instant_test import HttpServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpServerInstantTest from a JSON string +http_server_instant_test_instance = HttpServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(HttpServerInstantTest.to_json()) + +# convert the object into a dict +http_server_instant_test_dict = http_server_instant_test_instance.to_dict() +# create an instance of HttpServerInstantTest from a dict +http_server_instant_test_from_dict = HttpServerInstantTest.from_dict(http_server_instant_test_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/instant_tests_api/docs/HttpServerInstantTestRequest.md b/instant_tests/docs/HttpServerInstantTestRequest.md similarity index 92% rename from instant_tests_api/docs/HttpServerInstantTestRequest.md rename to instant_tests/docs/HttpServerInstantTestRequest.md index 616281d1..b82121a5 100644 --- a/instant_tests_api/docs/HttpServerInstantTestRequest.md +++ b/instant_tests/docs/HttpServerInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,7 +18,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] @@ -46,26 +46,28 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.http_server_instant_test_request import HttpServerInstantTestRequest +from instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of HttpServerInstantTestRequest from a JSON string http_server_instant_test_request_instance = HttpServerInstantTestRequest.from_json(json) # print the JSON string representation of the object -print HttpServerInstantTestRequest.to_json() +print(HttpServerInstantTestRequest.to_json()) # convert the object into a dict http_server_instant_test_request_dict = http_server_instant_test_request_instance.to_dict() # create an instance of HttpServerInstantTestRequest from a dict -http_server_instant_test_request_form_dict = http_server_instant_test_request.from_dict(http_server_instant_test_request_dict) +http_server_instant_test_request_from_dict = HttpServerInstantTestRequest.from_dict(http_server_instant_test_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/instant_tests/docs/HttpServerProperties.md b/instant_tests/docs/HttpServerProperties.md new file mode 100644 index 00000000..e12ba58c --- /dev/null +++ b/instant_tests/docs/HttpServerProperties.md @@ -0,0 +1,61 @@ +# HttpServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] +**headers** | **List[str]** | HTTP request headers used. | [optional] +**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'] +**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] +**dns_override** | **str** | IP address to use for DNS override. | [optional] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**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] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.http_server_properties import HttpServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpServerProperties from a JSON string +http_server_properties_instance = HttpServerProperties.from_json(json) +# print the JSON string representation of the object +print(HttpServerProperties.to_json()) + +# convert the object into a dict +http_server_properties_dict = http_server_properties_instance.to_dict() +# create an instance of HttpServerProperties from a dict +http_server_properties_from_dict = HttpServerProperties.from_dict(http_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/InstantTest.md b/instant_tests/docs/InstantTest.md new file mode 100644 index 00000000..c7940749 --- /dev/null +++ b/instant_tests/docs/InstantTest.md @@ -0,0 +1,41 @@ +# InstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.instant_test import InstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of InstantTest from a JSON string +instant_test_instance = InstantTest.from_json(json) +# print the JSON string representation of the object +print(InstantTest.to_json()) + +# convert the object into a dict +instant_test_dict = instant_test_instance.to_dict() +# create an instance of InstantTest from a dict +instant_test_from_dict = InstantTest.from_dict(instant_test_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/instant_tests_api/docs/InstantTestRequest.md b/instant_tests/docs/InstantTestRequest.md similarity index 80% rename from instant_tests_api/docs/InstantTestRequest.md rename to instant_tests/docs/InstantTestRequest.md index a294d629..fe832223 100644 --- a/instant_tests_api/docs/InstantTestRequest.md +++ b/instant_tests/docs/InstantTestRequest.md @@ -2,28 +2,29 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.instant_test_request import InstantTestRequest +from instant_tests.models.instant_test_request import InstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of InstantTestRequest from a JSON string instant_test_request_instance = InstantTestRequest.from_json(json) # print the JSON string representation of the object -print InstantTestRequest.to_json() +print(InstantTestRequest.to_json()) # convert the object into a dict instant_test_request_dict = instant_test_request_instance.to_dict() # create an instance of InstantTestRequest from a dict -instant_test_request_form_dict = instant_test_request.from_dict(instant_test_request_dict) +instant_test_request_from_dict = InstantTestRequest.from_dict(instant_test_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/instant_tests_api/docs/InstantTestRequestAgentsInner.md b/instant_tests/docs/InstantTestRequestAgentsInner.md similarity index 80% rename from instant_tests_api/docs/InstantTestRequestAgentsInner.md rename to instant_tests/docs/InstantTestRequestAgentsInner.md index 2bf2609f..d126df01 100644 --- a/instant_tests_api/docs/InstantTestRequestAgentsInner.md +++ b/instant_tests/docs/InstantTestRequestAgentsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Identifier for the agent (get `agentId` from `/agents` endpoint). | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner # TODO update the JSON string below json = "{}" # create an instance of InstantTestRequestAgentsInner from a JSON string instant_test_request_agents_inner_instance = InstantTestRequestAgentsInner.from_json(json) # print the JSON string representation of the object -print InstantTestRequestAgentsInner.to_json() +print(InstantTestRequestAgentsInner.to_json()) # convert the object into a dict instant_test_request_agents_inner_dict = instant_test_request_agents_inner_instance.to_dict() # create an instance of InstantTestRequestAgentsInner from a dict -instant_test_request_agents_inner_form_dict = instant_test_request_agents_inner.from_dict(instant_test_request_agents_inner_dict) +instant_test_request_agents_inner_from_dict = InstantTestRequestAgentsInner.from_dict(instant_test_request_agents_inner_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/instant_tests/docs/Link.md b/instant_tests/docs/Link.md new file mode 100644 index 00000000..8f226b0b --- /dev/null +++ b/instant_tests/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 instant_tests.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/instant_tests/docs/PageLoadInstantTest.md b/instant_tests/docs/PageLoadInstantTest.md new file mode 100644 index 00000000..b15dc5bb --- /dev/null +++ b/instant_tests/docs/PageLoadInstantTest.md @@ -0,0 +1,77 @@ +# PageLoadInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] +**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.page_load_instant_test import PageLoadInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of PageLoadInstantTest from a JSON string +page_load_instant_test_instance = PageLoadInstantTest.from_json(json) +# print the JSON string representation of the object +print(PageLoadInstantTest.to_json()) + +# convert the object into a dict +page_load_instant_test_dict = page_load_instant_test_instance.to_dict() +# create an instance of PageLoadInstantTest from a dict +page_load_instant_test_from_dict = PageLoadInstantTest.from_dict(page_load_instant_test_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/instant_tests_api/docs/PageLoadInstantTestRequest.md b/instant_tests/docs/PageLoadInstantTestRequest.md similarity index 91% rename from instant_tests_api/docs/PageLoadInstantTestRequest.md rename to instant_tests/docs/PageLoadInstantTestRequest.md index 35425b47..e2f275a7 100644 --- a/instant_tests_api/docs/PageLoadInstantTestRequest.md +++ b/instant_tests/docs/PageLoadInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,12 +18,12 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] **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'] **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] @@ -44,6 +45,7 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] **disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] **allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] @@ -51,23 +53,24 @@ Name | Type | Description | Notes **browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.page_load_instant_test_request import PageLoadInstantTestRequest +from instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of PageLoadInstantTestRequest from a JSON string page_load_instant_test_request_instance = PageLoadInstantTestRequest.from_json(json) # print the JSON string representation of the object -print PageLoadInstantTestRequest.to_json() +print(PageLoadInstantTestRequest.to_json()) # convert the object into a dict page_load_instant_test_request_dict = page_load_instant_test_request_instance.to_dict() # create an instance of PageLoadInstantTestRequest from a dict -page_load_instant_test_request_form_dict = page_load_instant_test_request.from_dict(page_load_instant_test_request_dict) +page_load_instant_test_request_from_dict = PageLoadInstantTestRequest.from_dict(page_load_instant_test_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/instant_tests/docs/PageLoadProperties.md b/instant_tests/docs/PageLoadProperties.md new file mode 100644 index 00000000..c5857fa6 --- /dev/null +++ b/instant_tests/docs/PageLoadProperties.md @@ -0,0 +1,64 @@ +# PageLoadProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] +**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.page_load_properties import PageLoadProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of PageLoadProperties from a JSON string +page_load_properties_instance = PageLoadProperties.from_json(json) +# print the JSON string representation of the object +print(PageLoadProperties.to_json()) + +# convert the object into a dict +page_load_properties_dict = page_load_properties_instance.to_dict() +# create an instance of PageLoadProperties from a dict +page_load_properties_from_dict = PageLoadProperties.from_dict(page_load_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests_api/docs/RunApi.md b/instant_tests/docs/RunApi.md similarity index 86% rename from instant_tests_api/docs/RunApi.md rename to instant_tests/docs/RunApi.md index a72807e5..67af688c 100644 --- a/instant_tests_api/docs/RunApi.md +++ b/instant_tests/docs/RunApi.md @@ -1,4 +1,4 @@ -# instant_tests_api.RunApi +# instant_tests.RunApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,16 +17,15 @@ Run an existing instant test. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import instant_tests_api -from instant_tests_api.rest import ApiException +import instant_tests +from instant_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 = instant_tests_api.Configuration( +configuration = instant_tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -36,16 +35,16 @@ configuration = instant_tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = instant_tests_api.Configuration( +configuration = instant_tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: +with instant_tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = instant_tests_api.RunApi(api_client) + api_instance = instant_tests.RunApi(api_client) test_id = '105' # str | Identifier for the instant test you wish to rerun. - aid = '2067' # 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) + 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: # Run instant test @@ -58,6 +57,7 @@ with instant_tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Identifier for the instant test you wish to rerun. | @@ -74,9 +74,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/instant_tests/docs/SIPServerApi.md b/instant_tests/docs/SIPServerApi.md new file mode 100644 index 00000000..57cfbb7c --- /dev/null +++ b/instant_tests/docs/SIPServerApi.md @@ -0,0 +1,101 @@ +# instant_tests.SIPServerApi + +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 + + +# **post_instant_sip_server** +> SipServerInstantTestResponse post_instant_sip_server(sip_server_instant_test_request, aid=aid, expand=expand) + +Create SIP server instant test + +Creates and runs a new SIP server instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.expand import Expand +from instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest +from instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.SIPServerApi(api_client) + sip_server_instant_test_request = instant_tests.SipServerInstantTestRequest() # SipServerInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling SIPServerApi->post_instant_sip_server: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sip_server_instant_test_request** | [**SipServerInstantTestRequest**](SipServerInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**SipServerInstantTestResponse**](SipServerInstantTestResponse.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 | - | +**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) + diff --git a/instant_tests_api/docs/ServerInstantTestRequest.md b/instant_tests/docs/ServerInstantTestRequest.md similarity index 94% rename from instant_tests_api/docs/ServerInstantTestRequest.md rename to instant_tests/docs/ServerInstantTestRequest.md index dc576c01..f9e3f665 100644 --- a/instant_tests_api/docs/ServerInstantTestRequest.md +++ b/instant_tests/docs/ServerInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,7 +18,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] **ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] @@ -36,23 +36,24 @@ Name | Type | Description | Notes **username** | **str** | Username for Basic/NTLM authentication. | **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.server_instant_test_request import ServerInstantTestRequest +from instant_tests.models.server_instant_test_request import ServerInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of ServerInstantTestRequest from a JSON string server_instant_test_request_instance = ServerInstantTestRequest.from_json(json) # print the JSON string representation of the object -print ServerInstantTestRequest.to_json() +print(ServerInstantTestRequest.to_json()) # convert the object into a dict server_instant_test_request_dict = server_instant_test_request_instance.to_dict() # create an instance of ServerInstantTestRequest from a dict -server_instant_test_request_form_dict = server_instant_test_request.from_dict(server_instant_test_request_dict) +server_instant_test_request_from_dict = ServerInstantTestRequest.from_dict(server_instant_test_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/instant_tests/docs/SimpleAgent.md b/instant_tests/docs/SimpleAgent.md new file mode 100644 index 00000000..d3e17fb7 --- /dev/null +++ b/instant_tests/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 instant_tests.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/instant_tests/docs/SipServerInstantTest.md b/instant_tests/docs/SipServerInstantTest.md new file mode 100644 index 00000000..7208ee62 --- /dev/null +++ b/instant_tests/docs/SipServerInstantTest.md @@ -0,0 +1,53 @@ +# SipServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.sip_server_instant_test import SipServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTest from a JSON string +sip_server_instant_test_instance = SipServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTest.to_json()) + +# convert the object into a dict +sip_server_instant_test_dict = sip_server_instant_test_instance.to_dict() +# create an instance of SipServerInstantTest from a dict +sip_server_instant_test_from_dict = SipServerInstantTest.from_dict(sip_server_instant_test_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/instant_tests/docs/SipServerInstantTestRequest.md b/instant_tests/docs/SipServerInstantTestRequest.md new file mode 100644 index 00000000..caabb3b4 --- /dev/null +++ b/instant_tests/docs/SipServerInstantTestRequest.md @@ -0,0 +1,54 @@ +# SipServerInstantTestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | + +## Example + +```python +from instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTestRequest from a JSON string +sip_server_instant_test_request_instance = SipServerInstantTestRequest.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTestRequest.to_json()) + +# convert the object into a dict +sip_server_instant_test_request_dict = sip_server_instant_test_request_instance.to_dict() +# create an instance of SipServerInstantTestRequest from a dict +sip_server_instant_test_request_from_dict = SipServerInstantTestRequest.from_dict(sip_server_instant_test_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/instant_tests/docs/SipServerInstantTestRequest1.md b/instant_tests/docs/SipServerInstantTestRequest1.md new file mode 100644 index 00000000..90bd6fcc --- /dev/null +++ b/instant_tests/docs/SipServerInstantTestRequest1.md @@ -0,0 +1,54 @@ +# SipServerInstantTestRequest1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | + +## Example + +```python +from instant_tests.models.sip_server_instant_test_request1 import SipServerInstantTestRequest1 + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTestRequest1 from a JSON string +sip_server_instant_test_request1_instance = SipServerInstantTestRequest1.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTestRequest1.to_json()) + +# convert the object into a dict +sip_server_instant_test_request1_dict = sip_server_instant_test_request1_instance.to_dict() +# create an instance of SipServerInstantTestRequest1 from a dict +sip_server_instant_test_request1_from_dict = SipServerInstantTestRequest1.from_dict(sip_server_instant_test_request1_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/instant_tests/docs/SipServerInstantTestResponse.md b/instant_tests/docs/SipServerInstantTestResponse.md new file mode 100644 index 00000000..7e7ca686 --- /dev/null +++ b/instant_tests/docs/SipServerInstantTestResponse.md @@ -0,0 +1,59 @@ +# SipServerInstantTestResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**auth_user** | **str** | Username for authentication with SIP server. | [optional] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**port** | **int** | Target port. | [default to 49153] +**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] +**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] + +## Example + +```python +from instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTestResponse from a JSON string +sip_server_instant_test_response_instance = SipServerInstantTestResponse.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTestResponse.to_json()) + +# convert the object into a dict +sip_server_instant_test_response_dict = sip_server_instant_test_response_instance.to_dict() +# create an instance of SipServerInstantTestResponse from a dict +sip_server_instant_test_response_from_dict = SipServerInstantTestResponse.from_dict(sip_server_instant_test_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/SipServerProperties.md b/instant_tests/docs/SipServerProperties.md new file mode 100644 index 00000000..0e19de29 --- /dev/null +++ b/instant_tests/docs/SipServerProperties.md @@ -0,0 +1,40 @@ +# SipServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.sip_server_properties import SipServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerProperties from a JSON string +sip_server_properties_instance = SipServerProperties.from_json(json) +# print the JSON string representation of the object +print(SipServerProperties.to_json()) + +# convert the object into a dict +sip_server_properties_dict = sip_server_properties_instance.to_dict() +# create an instance of SipServerProperties from a dict +sip_server_properties_from_dict = SipServerProperties.from_dict(sip_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/SipTestProtocol.md b/instant_tests/docs/SipTestProtocol.md new file mode 100644 index 00000000..1bb598f2 --- /dev/null +++ b/instant_tests/docs/SipTestProtocol.md @@ -0,0 +1,12 @@ +# SipTestProtocol + +Transport layer for SIP communication. + +## 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/instant_tests/docs/TestAuthType.md b/instant_tests/docs/TestAuthType.md new file mode 100644 index 00000000..8b16a105 --- /dev/null +++ b/instant_tests/docs/TestAuthType.md @@ -0,0 +1,12 @@ +# TestAuthType + +HTTP authentication type. + +## 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/instant_tests/docs/TestCustomHeaders.md b/instant_tests/docs/TestCustomHeaders.md new file mode 100644 index 00000000..33665769 --- /dev/null +++ b/instant_tests/docs/TestCustomHeaders.md @@ -0,0 +1,31 @@ +# TestCustomHeaders + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**root** | **Dict[str, str]** | Use these HTTP headers for root server request. | [optional] +**domains** | **Dict[str, Dict[str, str]]** | Use these HTTP headers for the specified domains. | [optional] +**all** | **Dict[str, str]** | Use these HTTP headers for all domains. | [optional] + +## Example + +```python +from instant_tests.models.test_custom_headers import TestCustomHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of TestCustomHeaders from a JSON string +test_custom_headers_instance = TestCustomHeaders.from_json(json) +# print the JSON string representation of the object +print(TestCustomHeaders.to_json()) + +# convert the object into a dict +test_custom_headers_dict = test_custom_headers_instance.to_dict() +# create an instance of TestCustomHeaders from a dict +test_custom_headers_from_dict = TestCustomHeaders.from_dict(test_custom_headers_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/instant_tests/docs/TestDirection.md b/instant_tests/docs/TestDirection.md new file mode 100644 index 00000000..27747f93 --- /dev/null +++ b/instant_tests/docs/TestDirection.md @@ -0,0 +1,12 @@ +# TestDirection + +Direction of the test, which affects how results are shown. + +## 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/instant_tests/docs/TestDnsServer.md b/instant_tests/docs/TestDnsServer.md new file mode 100644 index 00000000..6855f19d --- /dev/null +++ b/instant_tests/docs/TestDnsServer.md @@ -0,0 +1,30 @@ +# TestDnsServer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_id** | **str** | Unique identifier of the DNS server. | [optional] +**server_name** | **str** | Fully qualified domain name (FQDN) of DNS server. | [optional] + +## Example + +```python +from instant_tests.models.test_dns_server import TestDnsServer + +# TODO update the JSON string below +json = "{}" +# create an instance of TestDnsServer from a JSON string +test_dns_server_instance = TestDnsServer.from_json(json) +# print the JSON string representation of the object +print(TestDnsServer.to_json()) + +# convert the object into a dict +test_dns_server_dict = test_dns_server_instance.to_dict() +# create an instance of TestDnsServer from a dict +test_dns_server_from_dict = TestDnsServer.from_dict(test_dns_server_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/instant_tests/docs/TestDnsTransportProtocol.md b/instant_tests/docs/TestDnsTransportProtocol.md new file mode 100644 index 00000000..44d75f1f --- /dev/null +++ b/instant_tests/docs/TestDnsTransportProtocol.md @@ -0,0 +1,12 @@ +# TestDnsTransportProtocol + +Transport protocol used for DNS requests. + +## 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/instant_tests/docs/TestDscpId.md b/instant_tests/docs/TestDscpId.md new file mode 100644 index 00000000..f061ff55 --- /dev/null +++ b/instant_tests/docs/TestDscpId.md @@ -0,0 +1,12 @@ +# TestDscpId + +DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) + +## 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/instant_tests/docs/TestIpv6Policy.md b/instant_tests/docs/TestIpv6Policy.md new file mode 100644 index 00000000..c13e4258 --- /dev/null +++ b/instant_tests/docs/TestIpv6Policy.md @@ -0,0 +1,12 @@ +# TestIpv6Policy + +IP version policy. Overrides the IPv6 policy configured at the agent level. + +## 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/instant_tests/docs/TestLabelsInner.md b/instant_tests/docs/TestLabelsInner.md new file mode 100644 index 00000000..53919e61 --- /dev/null +++ b/instant_tests/docs/TestLabelsInner.md @@ -0,0 +1,31 @@ +# TestLabelsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Label ID. | [optional] +**name** | **str** | Name of the label. | [optional] +**is_builtin** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] + +## Example + +```python +from instant_tests.models.test_labels_inner import TestLabelsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestLabelsInner from a JSON string +test_labels_inner_instance = TestLabelsInner.from_json(json) +# print the JSON string representation of the object +print(TestLabelsInner.to_json()) + +# convert the object into a dict +test_labels_inner_dict = test_labels_inner_instance.to_dict() +# create an instance of TestLabelsInner from a dict +test_labels_inner_from_dict = TestLabelsInner.from_dict(test_labels_inner_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/instant_tests/docs/TestPageLoadingStrategy.md b/instant_tests/docs/TestPageLoadingStrategy.md new file mode 100644 index 00000000..c8413cc8 --- /dev/null +++ b/instant_tests/docs/TestPageLoadingStrategy.md @@ -0,0 +1,12 @@ +# TestPageLoadingStrategy + +* `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. + +## 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/instant_tests/docs/TestPathTraceMode.md b/instant_tests/docs/TestPathTraceMode.md new file mode 100644 index 00000000..53d53a32 --- /dev/null +++ b/instant_tests/docs/TestPathTraceMode.md @@ -0,0 +1,12 @@ +# TestPathTraceMode + +Select `inSession` to perform the path trace within a TCP session. + +## 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/instant_tests/docs/TestProbeMode.md b/instant_tests/docs/TestProbeMode.md new file mode 100644 index 00000000..78dc8563 --- /dev/null +++ b/instant_tests/docs/TestProbeMode.md @@ -0,0 +1,12 @@ +# TestProbeMode + +Probe mode used by network test, only valid when the protocol is set to TCP. + +## 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/instant_tests/docs/TestProtocol.md b/instant_tests/docs/TestProtocol.md new file mode 100644 index 00000000..bf59ffa0 --- /dev/null +++ b/instant_tests/docs/TestProtocol.md @@ -0,0 +1,12 @@ +# TestProtocol + +Protocol used by dependent network tests (end-to-end, path trace, PMTUD). + +## 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/instant_tests/docs/TestSharedAccountsInner.md b/instant_tests/docs/TestSharedAccountsInner.md new file mode 100644 index 00000000..9e4261a6 --- /dev/null +++ b/instant_tests/docs/TestSharedAccountsInner.md @@ -0,0 +1,30 @@ +# TestSharedAccountsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | Account group ID. | [optional] +**name** | **str** | Account group name. | [optional] + +## Example + +```python +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestSharedAccountsInner from a JSON string +test_shared_accounts_inner_instance = TestSharedAccountsInner.from_json(json) +# print the JSON string representation of the object +print(TestSharedAccountsInner.to_json()) + +# convert the object into a dict +test_shared_accounts_inner_dict = test_shared_accounts_inner_instance.to_dict() +# create an instance of TestSharedAccountsInner from a dict +test_shared_accounts_inner_from_dict = TestSharedAccountsInner.from_dict(test_shared_accounts_inner_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/instant_tests/docs/TestSipCredentials.md b/instant_tests/docs/TestSipCredentials.md new file mode 100644 index 00000000..afb1841b --- /dev/null +++ b/instant_tests/docs/TestSipCredentials.md @@ -0,0 +1,34 @@ +# TestSipCredentials + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_user** | **str** | Username for authentication with SIP server. | [optional] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**port** | **int** | Target port. | [default to 49153] +**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] +**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] + +## Example + +```python +from instant_tests.models.test_sip_credentials import TestSipCredentials + +# TODO update the JSON string below +json = "{}" +# create an instance of TestSipCredentials from a JSON string +test_sip_credentials_instance = TestSipCredentials.from_json(json) +# print the JSON string representation of the object +print(TestSipCredentials.to_json()) + +# convert the object into a dict +test_sip_credentials_dict = test_sip_credentials_instance.to_dict() +# create an instance of TestSipCredentials from a dict +test_sip_credentials_from_dict = TestSipCredentials.from_dict(test_sip_credentials_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/instant_tests/docs/TestSslVersionId.md b/instant_tests/docs/TestSslVersionId.md new file mode 100644 index 00000000..f13419ab --- /dev/null +++ b/instant_tests/docs/TestSslVersionId.md @@ -0,0 +1,12 @@ +# TestSslVersionId + +SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + +## 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/instant_tests/docs/TestType.md b/instant_tests/docs/TestType.md new file mode 100644 index 00000000..8093a739 --- /dev/null +++ b/instant_tests/docs/TestType.md @@ -0,0 +1,12 @@ +# TestType + +This is a read only value, as test type is implicit in the test creation url. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/UnauthorizedError.md b/instant_tests/docs/UnauthorizedError.md new file mode 100644 index 00000000..3390f1b7 --- /dev/null +++ b/instant_tests/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from instant_tests.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/instant_tests/docs/UnexpandedInstantTest.md b/instant_tests/docs/UnexpandedInstantTest.md new file mode 100644 index 00000000..e0e5c8f1 --- /dev/null +++ b/instant_tests/docs/UnexpandedInstantTest.md @@ -0,0 +1,39 @@ +# UnexpandedInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] + +## Example + +```python +from instant_tests.models.unexpanded_instant_test import UnexpandedInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTest from a JSON string +unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTest.to_json()) + +# convert the object into a dict +unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() +# create an instance of UnexpandedInstantTest from a dict +unexpanded_instant_test_from_dict = UnexpandedInstantTest.from_dict(unexpanded_instant_test_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/instant_tests/docs/UnexpandedInstantTestLinks.md b/instant_tests/docs/UnexpandedInstantTestLinks.md new file mode 100644 index 00000000..93aaae14 --- /dev/null +++ b/instant_tests/docs/UnexpandedInstantTestLinks.md @@ -0,0 +1,31 @@ +# UnexpandedInstantTestLinks + +A list of links that can be accessed to get more information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTestLinks from a JSON string +unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTestLinks.to_json()) + +# convert the object into a dict +unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() +# create an instance of UnexpandedInstantTestLinks from a dict +unexpanded_instant_test_links_from_dict = UnexpandedInstantTestLinks.from_dict(unexpanded_instant_test_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/instant_tests/docs/UnexpandedInstantTestLinksSelf.md b/instant_tests/docs/UnexpandedInstantTestLinksSelf.md new file mode 100644 index 00000000..080078af --- /dev/null +++ b/instant_tests/docs/UnexpandedInstantTestLinksSelf.md @@ -0,0 +1,36 @@ +# UnexpandedInstantTestLinksSelf + + +## 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 instant_tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTestLinksSelf from a JSON string +unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTestLinksSelf.to_json()) + +# convert the object into a dict +unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() +# create an instance of UnexpandedInstantTestLinksSelf from a dict +unexpanded_instant_test_links_self_from_dict = UnexpandedInstantTestLinksSelf.from_dict(unexpanded_instant_test_links_self_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/instant_tests/docs/ValidationError.md b/instant_tests/docs/ValidationError.md new file mode 100644 index 00000000..a0a3af56 --- /dev/null +++ b/instant_tests/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from instant_tests.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/instant_tests/docs/ValidationErrorAllOfErrors.md b/instant_tests/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..555c8435 --- /dev/null +++ b/instant_tests/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/instant_tests/docs/VoiceApi.md b/instant_tests/docs/VoiceApi.md new file mode 100644 index 00000000..735b9ff4 --- /dev/null +++ b/instant_tests/docs/VoiceApi.md @@ -0,0 +1,101 @@ +# instant_tests.VoiceApi + +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 + + +# **post_instant_voice** +> VoiceInstantTest post_instant_voice(voice_instant_test_request, aid=aid, expand=expand) + +Create voice instant test + +Creates and runs a voice instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.expand import Expand +from instant_tests.models.voice_instant_test import VoiceInstantTest +from instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.VoiceApi(api_client) + voice_instant_test_request = instant_tests.VoiceInstantTestRequest() # VoiceInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling VoiceApi->post_instant_voice: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **voice_instant_test_request** | [**VoiceInstantTestRequest**](VoiceInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**VoiceInstantTest**](VoiceInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/VoiceInstantTest.md b/instant_tests/docs/VoiceInstantTest.md new file mode 100644 index 00000000..45a1db9b --- /dev/null +++ b/instant_tests/docs/VoiceInstantTest.md @@ -0,0 +1,51 @@ +# VoiceInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**codec** | **str** | Codec label | [optional] [readonly] +**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] +**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**port** | **int** | Port number for the chosen protocol. | [optional] +**target_agent_id** | **str** | Agent ID of the target agent for the test. | +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from instant_tests.models.voice_instant_test import VoiceInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceInstantTest from a JSON string +voice_instant_test_instance = VoiceInstantTest.from_json(json) +# print the JSON string representation of the object +print(VoiceInstantTest.to_json()) + +# convert the object into a dict +voice_instant_test_dict = voice_instant_test_instance.to_dict() +# create an instance of VoiceInstantTest from a dict +voice_instant_test_from_dict = VoiceInstantTest.from_dict(voice_instant_test_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/instant_tests_api/docs/VoiceInstantTestRequest.md b/instant_tests/docs/VoiceInstantTestRequest.md similarity index 92% rename from instant_tests_api/docs/VoiceInstantTestRequest.md rename to instant_tests/docs/VoiceInstantTestRequest.md index 527a54df..cdaf50d4 100644 --- a/instant_tests_api/docs/VoiceInstantTestRequest.md +++ b/instant_tests/docs/VoiceInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,7 +18,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **codec** | **str** | Codec label | [optional] [readonly] **codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] **dscp** | **str** | DSCP label. | [optional] [readonly] @@ -27,23 +27,24 @@ Name | Type | Description | Notes **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] **port** | **int** | Port number for the chosen protocol. | [optional] **target_agent_id** | **str** | Agent ID of the target agent for the test. | +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | ## Example ```python -from instant_tests_api.models.voice_instant_test_request import VoiceInstantTestRequest +from instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of VoiceInstantTestRequest from a JSON string voice_instant_test_request_instance = VoiceInstantTestRequest.from_json(json) # print the JSON string representation of the object -print VoiceInstantTestRequest.to_json() +print(VoiceInstantTestRequest.to_json()) # convert the object into a dict voice_instant_test_request_dict = voice_instant_test_request_instance.to_dict() # create an instance of VoiceInstantTestRequest from a dict -voice_instant_test_request_form_dict = voice_instant_test_request.from_dict(voice_instant_test_request_dict) +voice_instant_test_request_from_dict = VoiceInstantTestRequest.from_dict(voice_instant_test_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/instant_tests/docs/VoiceProperties.md b/instant_tests/docs/VoiceProperties.md new file mode 100644 index 00000000..929dc314 --- /dev/null +++ b/instant_tests/docs/VoiceProperties.md @@ -0,0 +1,38 @@ +# VoiceProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**codec** | **str** | Codec label | [optional] [readonly] +**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] +**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**port** | **int** | Port number for the chosen protocol. | [optional] +**target_agent_id** | **str** | Agent ID of the target agent for the test. | +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.voice_properties import VoiceProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceProperties from a JSON string +voice_properties_instance = VoiceProperties.from_json(json) +# print the JSON string representation of the object +print(VoiceProperties.to_json()) + +# convert the object into a dict +voice_properties_dict = voice_properties_instance.to_dict() +# create an instance of VoiceProperties from a dict +voice_properties_from_dict = VoiceProperties.from_dict(voice_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/docs/WebTransactionApi.md b/instant_tests/docs/WebTransactionApi.md new file mode 100644 index 00000000..f86bdb94 --- /dev/null +++ b/instant_tests/docs/WebTransactionApi.md @@ -0,0 +1,101 @@ +# instant_tests.WebTransactionApi + +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 + + +# **post_instant_web_transactions** +> WebTransactionInstantTest post_instant_web_transactions(web_transaction_instant_test_request, aid=aid, expand=expand) + +Create web transactions instant test + +Creates and runs a new Web transactions instant test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import instant_tests +from instant_tests.models.expand import Expand +from instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest +from instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest +from instant_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 = instant_tests.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 = instant_tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with instant_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = instant_tests.WebTransactionApi(api_client) + web_transaction_instant_test_request = instant_tests.WebTransactionInstantTestRequest() # WebTransactionInstantTestRequest | + 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 = [instant_tests.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionApi->post_instant_web_transactions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **web_transaction_instant_test_request** | [**WebTransactionInstantTestRequest**](WebTransactionInstantTestRequest.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] + **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] + +### Return type + +[**WebTransactionInstantTest**](WebTransactionInstantTest.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 | - | +**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) + diff --git a/instant_tests/docs/WebTransactionInstantTest.md b/instant_tests/docs/WebTransactionInstantTest.md new file mode 100644 index 00000000..f22fcfb8 --- /dev/null +++ b/instant_tests/docs/WebTransactionInstantTest.md @@ -0,0 +1,79 @@ +# WebTransactionInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] +**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] +**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] + +## Example + +```python +from instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of WebTransactionInstantTest from a JSON string +web_transaction_instant_test_instance = WebTransactionInstantTest.from_json(json) +# print the JSON string representation of the object +print(WebTransactionInstantTest.to_json()) + +# convert the object into a dict +web_transaction_instant_test_dict = web_transaction_instant_test_instance.to_dict() +# create an instance of WebTransactionInstantTest from a dict +web_transaction_instant_test_from_dict = WebTransactionInstantTest.from_dict(web_transaction_instant_test_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/instant_tests_api/docs/WebTransactionInstantTestRequest.md b/instant_tests/docs/WebTransactionInstantTestRequest.md similarity index 91% rename from instant_tests_api/docs/WebTransactionInstantTestRequest.md rename to instant_tests/docs/WebTransactionInstantTestRequest.md index 0c59b5b4..9d367247 100644 --- a/instant_tests_api/docs/WebTransactionInstantTestRequest.md +++ b/instant_tests/docs/WebTransactionInstantTestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,12 +18,10 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **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'] **follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] @@ -39,7 +38,7 @@ Name | Type | Description | Notes **protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] **ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] **time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] **transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | **url** | **str** | Target for the test. | @@ -47,6 +46,7 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] **disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] **allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] @@ -54,23 +54,25 @@ Name | Type | Description | Notes **browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | +**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] ## Example ```python -from instant_tests_api.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest +from instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest # TODO update the JSON string below json = "{}" # create an instance of WebTransactionInstantTestRequest from a JSON string web_transaction_instant_test_request_instance = WebTransactionInstantTestRequest.from_json(json) # print the JSON string representation of the object -print WebTransactionInstantTestRequest.to_json() +print(WebTransactionInstantTestRequest.to_json()) # convert the object into a dict web_transaction_instant_test_request_dict = web_transaction_instant_test_request_instance.to_dict() # create an instance of WebTransactionInstantTestRequest from a dict -web_transaction_instant_test_request_form_dict = web_transaction_instant_test_request.from_dict(web_transaction_instant_test_request_dict) +web_transaction_instant_test_request_from_dict = WebTransactionInstantTestRequest.from_dict(web_transaction_instant_test_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/instant_tests/docs/WebTransactionProperties.md b/instant_tests/docs/WebTransactionProperties.md new file mode 100644 index 00000000..028af776 --- /dev/null +++ b/instant_tests/docs/WebTransactionProperties.md @@ -0,0 +1,65 @@ +# WebTransactionProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] +**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] +**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from instant_tests.models.web_transaction_properties import WebTransactionProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of WebTransactionProperties from a JSON string +web_transaction_properties_instance = WebTransactionProperties.from_json(json) +# print the JSON string representation of the object +print(WebTransactionProperties.to_json()) + +# convert the object into a dict +web_transaction_properties_dict = web_transaction_properties_instance.to_dict() +# create an instance of WebTransactionProperties from a dict +web_transaction_properties_from_dict = WebTransactionProperties.from_dict(web_transaction_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/instant_tests/instant_tests/__init__.py b/instant_tests/instant_tests/__init__.py new file mode 100644 index 00000000..676c8092 --- /dev/null +++ b/instant_tests/instant_tests/__init__.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 instant_tests.api.agent_to_agent_api import AgentToAgentApi +from instant_tests.api.agent_to_server_api import AgentToServerApi +from instant_tests.api.dns_security_api import DNSSecurityApi +from instant_tests.api.dns_server_api import DNSServerApi +from instant_tests.api.dns_trace_api import DNSTraceApi +from instant_tests.api.ftp_server_api import FTPServerApi +from instant_tests.api.http_page_load_api import HTTPPageLoadApi +from instant_tests.api.http_server_api import HTTPServerApi +from instant_tests.api.run_api import RunApi +from instant_tests.api.sip_server_api import SIPServerApi +from instant_tests.api.voice_api import VoiceApi +from instant_tests.api.web_transaction_api import WebTransactionApi + +# import ApiClient +from instant_tests.api_response import ApiResponse +from instant_tests.api_client import ApiClient +from instant_tests.configuration import Configuration +from instant_tests.exceptions import OpenApiException +from instant_tests.exceptions import ApiTypeError +from instant_tests.exceptions import ApiValueError +from instant_tests.exceptions import ApiKeyError +from instant_tests.exceptions import ApiAttributeError +from instant_tests.exceptions import ApiException + +# import models into sdk package +from instant_tests.models.agent import Agent +from instant_tests.models.agent_base import AgentBase +from instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest +from instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest +from instant_tests.models.agent_to_agent_properties import AgentToAgentProperties +from instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest +from instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest +from instant_tests.models.agent_to_server_properties import AgentToServerProperties +from instant_tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.dns_sec_instant_test import DnsSecInstantTest +from instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest +from instant_tests.models.dns_sec_properties import DnsSecProperties +from instant_tests.models.dns_server_instant_test import DnsServerInstantTest +from instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest +from instant_tests.models.dns_server_properties import DnsServerProperties +from instant_tests.models.dns_servers_request import DnsServersRequest +from instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest +from instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest +from instant_tests.models.dns_trace_properties import DnsTraceProperties +from instant_tests.models.error import Error +from instant_tests.models.expand import Expand +from instant_tests.models.ftp_server_instant_test import FtpServerInstantTest +from instant_tests.models.ftp_server_properties import FtpServerProperties +from instant_tests.models.ftp_server_request_type import FtpServerRequestType +from instant_tests.models.http_server_instant_test import HttpServerInstantTest +from instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest +from instant_tests.models.http_server_properties import HttpServerProperties +from instant_tests.models.instant_test import InstantTest +from instant_tests.models.instant_test_request import InstantTestRequest +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.link import Link +from instant_tests.models.page_load_instant_test import PageLoadInstantTest +from instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest +from instant_tests.models.page_load_properties import PageLoadProperties +from instant_tests.models.server_instant_test_request import ServerInstantTestRequest +from instant_tests.models.simple_agent import SimpleAgent +from instant_tests.models.sip_server_instant_test import SipServerInstantTest +from instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest +from instant_tests.models.sip_server_instant_test_request1 import SipServerInstantTestRequest1 +from instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse +from instant_tests.models.sip_server_properties import SipServerProperties +from instant_tests.models.sip_test_protocol import SipTestProtocol +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_direction import TestDirection +from instant_tests.models.test_dns_server import TestDnsServer +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_sip_credentials import TestSipCredentials +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.test_type import TestType +from instant_tests.models.unauthorized_error import UnauthorizedError +from instant_tests.models.unexpanded_instant_test import UnexpandedInstantTest +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from instant_tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from instant_tests.models.validation_error import ValidationError +from instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from instant_tests.models.voice_instant_test import VoiceInstantTest +from instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest +from instant_tests.models.voice_properties import VoiceProperties +from instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest +from instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest +from instant_tests.models.web_transaction_properties import WebTransactionProperties diff --git a/instant_tests/instant_tests/api/__init__.py b/instant_tests/instant_tests/api/__init__.py new file mode 100644 index 00000000..dcf87ef7 --- /dev/null +++ b/instant_tests/instant_tests/api/__init__.py @@ -0,0 +1,16 @@ +# flake8: noqa + +# import apis into api package +from instant_tests.api.agent_to_agent_api import AgentToAgentApi +from instant_tests.api.agent_to_server_api import AgentToServerApi +from instant_tests.api.dns_security_api import DNSSecurityApi +from instant_tests.api.dns_server_api import DNSServerApi +from instant_tests.api.dns_trace_api import DNSTraceApi +from instant_tests.api.ftp_server_api import FTPServerApi +from instant_tests.api.http_page_load_api import HTTPPageLoadApi +from instant_tests.api.http_server_api import HTTPServerApi +from instant_tests.api.run_api import RunApi +from instant_tests.api.sip_server_api import SIPServerApi +from instant_tests.api.voice_api import VoiceApi +from instant_tests.api.web_transaction_api import WebTransactionApi + diff --git a/instant_tests/instant_tests/api/agent_to_agent_api.py b/instant_tests/instant_tests/api/agent_to_agent_api.py new file mode 100644 index 00000000..d7b5044a --- /dev/null +++ b/instant_tests/instant_tests/api/agent_to_agent_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest +from instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest +from instant_tests.models.expand import Expand + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class AgentToAgentApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_test_agent_to_agent( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> AgentToAgentInstantTest: + """Create agent-to-agent instant test + + Creates and runs a new agent-to-agent instant test. + + :param agent_to_agent_instant_test_request: (required) + :type agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_test_agent_to_agent_serialize( + agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToAgentInstantTest", + '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, + ).data + + + @validate_call + def post_instant_test_agent_to_agent_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[AgentToAgentInstantTest]: + """Create agent-to-agent instant test + + Creates and runs a new agent-to-agent instant test. + + :param agent_to_agent_instant_test_request: (required) + :type agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_test_agent_to_agent_serialize( + agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToAgentInstantTest", + '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, + ) + + + @validate_call + def post_instant_test_agent_to_agent_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create agent-to-agent instant test + + Creates and runs a new agent-to-agent instant test. + + :param agent_to_agent_instant_test_request: (required) + :type agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_test_agent_to_agent_serialize( + agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToAgentInstantTest", + '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_instant_test_agent_to_agent_serialize( + self, + agent_to_agent_instant_test_request, + aid, + 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 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 agent_to_agent_instant_test_request is not None: + _body_params = agent_to_agent_instant_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/tests/agent-to-agent/instant', + 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/instant_tests/instant_tests/api/agent_to_server_api.py b/instant_tests/instant_tests/api/agent_to_server_api.py new file mode 100644 index 00000000..271c0eb7 --- /dev/null +++ b/instant_tests/instant_tests/api/agent_to_server_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest +from instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest +from instant_tests.models.expand import Expand + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class AgentToServerApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_agent_to_server( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> AgentToServerInstantTest: + """Create agent-to-server instant test + + Creates and runs a new agent-to-server instant test. + + :param agent_to_server_instant_test_request: (required) + :type agent_to_server_instant_test_request: AgentToServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_agent_to_server_serialize( + agent_to_server_instant_test_request=agent_to_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToServerInstantTest", + '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, + ).data + + + @validate_call + def post_instant_agent_to_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[AgentToServerInstantTest]: + """Create agent-to-server instant test + + Creates and runs a new agent-to-server instant test. + + :param agent_to_server_instant_test_request: (required) + :type agent_to_server_instant_test_request: AgentToServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_agent_to_server_serialize( + agent_to_server_instant_test_request=agent_to_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToServerInstantTest", + '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, + ) + + + @validate_call + def post_instant_agent_to_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create agent-to-server instant test + + Creates and runs a new agent-to-server instant test. + + :param agent_to_server_instant_test_request: (required) + :type agent_to_server_instant_test_request: AgentToServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_agent_to_server_serialize( + agent_to_server_instant_test_request=agent_to_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToServerInstantTest", + '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_instant_agent_to_server_serialize( + self, + agent_to_server_instant_test_request, + aid, + 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 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 agent_to_server_instant_test_request is not None: + _body_params = agent_to_server_instant_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/tests/agent-to-server/instant', + 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/instant_tests_api/instant_tests_api/api/dns_security_api.py b/instant_tests/instant_tests/api/dns_security_api.py similarity index 92% rename from instant_tests_api/instant_tests_api/api/dns_security_api.py rename to instant_tests/instant_tests/api/dns_security_api.py index d19522be..a5eb2986 100644 --- a/instant_tests_api/instant_tests_api/api/dns_security_api.py +++ b/instant_tests/instant_tests/api/dns_security_api.py @@ -3,39 +3,29 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.dns_sec_instant_test import DnsSecInstantTest +from instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest +from instant_tests.models.expand import Expand -from instant_tests_api.models.dns_sec_instant_test import DnsSecInstantTest -from instant_tests_api.models.dns_sec_instant_test_request import DnsSecInstantTestRequest -from instant_tests_api.models.expand import Expand - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType class DNSSecurityApi: @@ -114,15 +104,13 @@ class DNSSecurityApi: _response_types_map: Dict[str, Optional[str]] = { '201': "DnsSecInstantTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -198,15 +186,13 @@ class DNSSecurityApi: _response_types_map: Dict[str, Optional[str]] = { '201': "DnsSecInstantTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -282,15 +268,13 @@ class DNSSecurityApi: _response_types_map: Dict[str, Optional[str]] = { '201': "DnsSecInstantTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -308,12 +292,11 @@ class DNSSecurityApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -321,7 +304,7 @@ class DNSSecurityApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/instant_tests/instant_tests/api/dns_server_api.py b/instant_tests/instant_tests/api/dns_server_api.py new file mode 100644 index 00000000..29a3c09d --- /dev/null +++ b/instant_tests/instant_tests/api/dns_server_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.dns_server_instant_test import DnsServerInstantTest +from instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest +from instant_tests.models.expand import Expand + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class DNSServerApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_dns_server( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> DnsServerInstantTest: + """Create DNS server instant test + + Creates and runs a new DNS server instant test. + + :param dns_server_instant_test_request: (required) + :type dns_server_instant_test_request: DnsServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_dns_server_serialize( + dns_server_instant_test_request=dns_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsServerInstantTest", + '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, + ).data + + + @validate_call + def post_instant_dns_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[DnsServerInstantTest]: + """Create DNS server instant test + + Creates and runs a new DNS server instant test. + + :param dns_server_instant_test_request: (required) + :type dns_server_instant_test_request: DnsServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_dns_server_serialize( + dns_server_instant_test_request=dns_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsServerInstantTest", + '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, + ) + + + @validate_call + def post_instant_dns_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create DNS server instant test + + Creates and runs a new DNS server instant test. + + :param dns_server_instant_test_request: (required) + :type dns_server_instant_test_request: DnsServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_dns_server_serialize( + dns_server_instant_test_request=dns_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsServerInstantTest", + '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_instant_dns_server_serialize( + self, + dns_server_instant_test_request, + aid, + 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 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 dns_server_instant_test_request is not None: + _body_params = dns_server_instant_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/tests/dns-server/instant', + 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/instant_tests/instant_tests/api/dns_trace_api.py b/instant_tests/instant_tests/api/dns_trace_api.py new file mode 100644 index 00000000..f7c3fbf7 --- /dev/null +++ b/instant_tests/instant_tests/api/dns_trace_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest +from instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest +from instant_tests.models.expand import Expand + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class DNSTraceApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_dns_trace( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> DnsTraceInstantTest: + """Create DNS trace instant test + + Creates and runs a new DNS trace instant test. + + :param dns_trace_instant_test_request: (required) + :type dns_trace_instant_test_request: DnsTraceInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_dns_trace_serialize( + dns_trace_instant_test_request=dns_trace_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsTraceInstantTest", + '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, + ).data + + + @validate_call + def post_instant_dns_trace_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[DnsTraceInstantTest]: + """Create DNS trace instant test + + Creates and runs a new DNS trace instant test. + + :param dns_trace_instant_test_request: (required) + :type dns_trace_instant_test_request: DnsTraceInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_dns_trace_serialize( + dns_trace_instant_test_request=dns_trace_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsTraceInstantTest", + '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, + ) + + + @validate_call + def post_instant_dns_trace_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create DNS trace instant test + + Creates and runs a new DNS trace instant test. + + :param dns_trace_instant_test_request: (required) + :type dns_trace_instant_test_request: DnsTraceInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_dns_trace_serialize( + dns_trace_instant_test_request=dns_trace_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsTraceInstantTest", + '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_instant_dns_trace_serialize( + self, + dns_trace_instant_test_request, + aid, + 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 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 dns_trace_instant_test_request is not None: + _body_params = dns_trace_instant_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/tests/dns-trace/instant', + 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/instant_tests/instant_tests/api/ftp_server_api.py b/instant_tests/instant_tests/api/ftp_server_api.py new file mode 100644 index 00000000..575b1ec4 --- /dev/null +++ b/instant_tests/instant_tests/api/ftp_server_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.expand import Expand +from instant_tests.models.ftp_server_instant_test import FtpServerInstantTest +from instant_tests.models.server_instant_test_request import ServerInstantTestRequest + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class FTPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_ftp_server( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> FtpServerInstantTest: + """Create FTP server instant test + + Creates and runs a new FTP server instant test. + + :param server_instant_test_request: (required) + :type server_instant_test_request: ServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_ftp_server_serialize( + server_instant_test_request=server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FtpServerInstantTest", + '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, + ).data + + + @validate_call + def post_instant_ftp_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[FtpServerInstantTest]: + """Create FTP server instant test + + Creates and runs a new FTP server instant test. + + :param server_instant_test_request: (required) + :type server_instant_test_request: ServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_ftp_server_serialize( + server_instant_test_request=server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FtpServerInstantTest", + '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, + ) + + + @validate_call + def post_instant_ftp_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create FTP server instant test + + Creates and runs a new FTP server instant test. + + :param server_instant_test_request: (required) + :type server_instant_test_request: ServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_ftp_server_serialize( + server_instant_test_request=server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FtpServerInstantTest", + '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_instant_ftp_server_serialize( + self, + server_instant_test_request, + aid, + 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 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 server_instant_test_request is not None: + _body_params = server_instant_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/tests/ftp-server/instant', + 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/instant_tests_api/instant_tests_api/api/http_page_load_api.py b/instant_tests/instant_tests/api/http_page_load_api.py similarity index 92% rename from instant_tests_api/instant_tests_api/api/http_page_load_api.py rename to instant_tests/instant_tests/api/http_page_load_api.py index 8641088f..60ac31c5 100644 --- a/instant_tests_api/instant_tests_api/api/http_page_load_api.py +++ b/instant_tests/instant_tests/api/http_page_load_api.py @@ -3,39 +3,29 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.expand import Expand +from instant_tests.models.page_load_instant_test import PageLoadInstantTest +from instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.page_load_instant_test import PageLoadInstantTest -from instant_tests_api.models.page_load_instant_test_request import PageLoadInstantTestRequest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType class HTTPPageLoadApi: @@ -114,15 +104,13 @@ class HTTPPageLoadApi: _response_types_map: Dict[str, Optional[str]] = { '201': "PageLoadInstantTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -198,15 +186,13 @@ class HTTPPageLoadApi: _response_types_map: Dict[str, Optional[str]] = { '201': "PageLoadInstantTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -282,15 +268,13 @@ class HTTPPageLoadApi: _response_types_map: Dict[str, Optional[str]] = { '201': "PageLoadInstantTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -308,12 +292,11 @@ class HTTPPageLoadApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -321,7 +304,7 @@ class HTTPPageLoadApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/instant_tests/instant_tests/api/http_server_api.py b/instant_tests/instant_tests/api/http_server_api.py new file mode 100644 index 00000000..87d04cca --- /dev/null +++ b/instant_tests/instant_tests/api/http_server_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.expand import Expand +from instant_tests.models.http_server_instant_test import HttpServerInstantTest +from instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class HTTPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_http_server( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> HttpServerInstantTest: + """Create HTTP server instant test + + Creates and runs a new HTTP server instant test. + + :param http_server_instant_test_request: (required) + :type http_server_instant_test_request: HttpServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_http_server_serialize( + http_server_instant_test_request=http_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HttpServerInstantTest", + '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, + ).data + + + @validate_call + def post_instant_http_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[HttpServerInstantTest]: + """Create HTTP server instant test + + Creates and runs a new HTTP server instant test. + + :param http_server_instant_test_request: (required) + :type http_server_instant_test_request: HttpServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_http_server_serialize( + http_server_instant_test_request=http_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HttpServerInstantTest", + '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, + ) + + + @validate_call + def post_instant_http_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create HTTP server instant test + + Creates and runs a new HTTP server instant test. + + :param http_server_instant_test_request: (required) + :type http_server_instant_test_request: HttpServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_http_server_serialize( + http_server_instant_test_request=http_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HttpServerInstantTest", + '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_instant_http_server_serialize( + self, + http_server_instant_test_request, + aid, + 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 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 http_server_instant_test_request is not None: + _body_params = http_server_instant_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/tests/http-server/instant', + 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/instant_tests_api/instant_tests_api/api/run_api.py b/instant_tests/instant_tests/api/run_api.py similarity index 89% rename from instant_tests_api/instant_tests_api/api/run_api.py rename to instant_tests/instant_tests/api/run_api.py index 9c76a525..16000b2a 100644 --- a/instant_tests_api/instant_tests_api/api/run_api.py +++ b/instant_tests/instant_tests/api/run_api.py @@ -3,36 +3,26 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType class RunApi: @@ -106,7 +96,13 @@ class RunApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -177,7 +173,13 @@ class RunApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -248,7 +250,13 @@ class RunApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '200': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -265,19 +273,18 @@ class RunApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -296,7 +303,6 @@ class RunApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) diff --git a/instant_tests/instant_tests/api/sip_server_api.py b/instant_tests/instant_tests/api/sip_server_api.py new file mode 100644 index 00000000..23454a48 --- /dev/null +++ b/instant_tests/instant_tests/api/sip_server_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.expand import Expand +from instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest +from instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class SIPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_sip_server( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> SipServerInstantTestResponse: + """Create SIP server instant test + + Creates and runs a new SIP server instant test. + + :param sip_server_instant_test_request: (required) + :type sip_server_instant_test_request: SipServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_sip_server_serialize( + sip_server_instant_test_request=sip_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SipServerInstantTestResponse", + '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, + ).data + + + @validate_call + def post_instant_sip_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[SipServerInstantTestResponse]: + """Create SIP server instant test + + Creates and runs a new SIP server instant test. + + :param sip_server_instant_test_request: (required) + :type sip_server_instant_test_request: SipServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_sip_server_serialize( + sip_server_instant_test_request=sip_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SipServerInstantTestResponse", + '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, + ) + + + @validate_call + def post_instant_sip_server_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create SIP server instant test + + Creates and runs a new SIP server instant test. + + :param sip_server_instant_test_request: (required) + :type sip_server_instant_test_request: SipServerInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_sip_server_serialize( + sip_server_instant_test_request=sip_server_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SipServerInstantTestResponse", + '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_instant_sip_server_serialize( + self, + sip_server_instant_test_request, + aid, + 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 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 sip_server_instant_test_request is not None: + _body_params = sip_server_instant_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/tests/sip-server/instant', + 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/instant_tests/instant_tests/api/voice_api.py b/instant_tests/instant_tests/api/voice_api.py new file mode 100644 index 00000000..66b06109 --- /dev/null +++ b/instant_tests/instant_tests/api/voice_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.expand import Expand +from instant_tests.models.voice_instant_test import VoiceInstantTest +from instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class VoiceApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_voice( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> VoiceInstantTest: + """Create voice instant test + + Creates and runs a voice instant test. + + :param voice_instant_test_request: (required) + :type voice_instant_test_request: VoiceInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_voice_serialize( + voice_instant_test_request=voice_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VoiceInstantTest", + '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, + ).data + + + @validate_call + def post_instant_voice_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[VoiceInstantTest]: + """Create voice instant test + + Creates and runs a voice instant test. + + :param voice_instant_test_request: (required) + :type voice_instant_test_request: VoiceInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_voice_serialize( + voice_instant_test_request=voice_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VoiceInstantTest", + '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, + ) + + + @validate_call + def post_instant_voice_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create voice instant test + + Creates and runs a voice instant test. + + :param voice_instant_test_request: (required) + :type voice_instant_test_request: VoiceInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_voice_serialize( + voice_instant_test_request=voice_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VoiceInstantTest", + '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_instant_voice_serialize( + self, + voice_instant_test_request, + aid, + 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 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 voice_instant_test_request is not None: + _body_params = voice_instant_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/tests/voice/instant', + 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/instant_tests/instant_tests/api/web_transaction_api.py b/instant_tests/instant_tests/api/web_transaction_api.py new file mode 100644 index 00000000..e55aff26 --- /dev/null +++ b/instant_tests/instant_tests/api/web_transaction_api.py @@ -0,0 +1,369 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from instant_tests.models.expand import Expand +from instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest +from instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest + +from instant_tests.api_client import ApiClient, RequestSerialized +from instant_tests.api_response import ApiResponse +from instant_tests.rest import RESTResponseType + + +class WebTransactionApi: + """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() + self.api_client = api_client + + + @validate_call + def post_instant_web_transactions( + 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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, + ) -> WebTransactionInstantTest: + """Create web transactions instant test + + Creates and runs a new Web transactions instant test. + + :param web_transaction_instant_test_request: (required) + :type web_transaction_instant_test_request: WebTransactionInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_web_transactions_serialize( + web_transaction_instant_test_request=web_transaction_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebTransactionInstantTest", + '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, + ).data + + + @validate_call + def post_instant_web_transactions_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[WebTransactionInstantTest]: + """Create web transactions instant test + + Creates and runs a new Web transactions instant test. + + :param web_transaction_instant_test_request: (required) + :type web_transaction_instant_test_request: WebTransactionInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_web_transactions_serialize( + web_transaction_instant_test_request=web_transaction_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebTransactionInstantTest", + '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, + ) + + + @validate_call + def post_instant_web_transactions_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, + expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: + """Create web transactions instant test + + Creates and runs a new Web transactions instant test. + + :param web_transaction_instant_test_request: (required) + :type web_transaction_instant_test_request: WebTransactionInstantTestRequest + :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. + :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._post_instant_web_transactions_serialize( + web_transaction_instant_test_request=web_transaction_instant_test_request, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebTransactionInstantTest", + '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_instant_web_transactions_serialize( + self, + web_transaction_instant_test_request, + aid, + 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 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 web_transaction_instant_test_request is not None: + _body_params = web_transaction_instant_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/tests/web-transactions/instant', + 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/instant_tests/instant_tests/api_client.py b/instant_tests/instant_tests/api_client.py new file mode 100644 index 00000000..e693f33b --- /dev/null +++ b/instant_tests/instant_tests/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from instant_tests.configuration import Configuration +from instant_tests.api_response import ApiResponse, T as ApiResponseT +import instant_tests.models +from instant_tests import rest +from instant_tests.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(instant_tests.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/instant_tests/instant_tests/api_response.py b/instant_tests/instant_tests/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/instant_tests/instant_tests/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/instant_tests/instant_tests/configuration.py b/instant_tests/instant_tests/configuration.py new file mode 100644 index 00000000..b37eca79 --- /dev/null +++ b/instant_tests/instant_tests/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("instant_tests") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/instant_tests/instant_tests/exceptions.py b/instant_tests/instant_tests/exceptions.py new file mode 100644 index 00000000..131000da --- /dev/null +++ b/instant_tests/instant_tests/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/instant_tests/instant_tests/models/__init__.py b/instant_tests/instant_tests/models/__init__.py new file mode 100644 index 00000000..b91abdfa --- /dev/null +++ b/instant_tests/instant_tests/models/__init__.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from instant_tests.models.agent import Agent +from instant_tests.models.agent_base import AgentBase +from instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest +from instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest +from instant_tests.models.agent_to_agent_properties import AgentToAgentProperties +from instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest +from instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest +from instant_tests.models.agent_to_server_properties import AgentToServerProperties +from instant_tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.dns_sec_instant_test import DnsSecInstantTest +from instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest +from instant_tests.models.dns_sec_properties import DnsSecProperties +from instant_tests.models.dns_server_instant_test import DnsServerInstantTest +from instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest +from instant_tests.models.dns_server_properties import DnsServerProperties +from instant_tests.models.dns_servers_request import DnsServersRequest +from instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest +from instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest +from instant_tests.models.dns_trace_properties import DnsTraceProperties +from instant_tests.models.error import Error +from instant_tests.models.expand import Expand +from instant_tests.models.ftp_server_instant_test import FtpServerInstantTest +from instant_tests.models.ftp_server_properties import FtpServerProperties +from instant_tests.models.ftp_server_request_type import FtpServerRequestType +from instant_tests.models.http_server_instant_test import HttpServerInstantTest +from instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest +from instant_tests.models.http_server_properties import HttpServerProperties +from instant_tests.models.instant_test import InstantTest +from instant_tests.models.instant_test_request import InstantTestRequest +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.link import Link +from instant_tests.models.page_load_instant_test import PageLoadInstantTest +from instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest +from instant_tests.models.page_load_properties import PageLoadProperties +from instant_tests.models.server_instant_test_request import ServerInstantTestRequest +from instant_tests.models.simple_agent import SimpleAgent +from instant_tests.models.sip_server_instant_test import SipServerInstantTest +from instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest +from instant_tests.models.sip_server_instant_test_request1 import SipServerInstantTestRequest1 +from instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse +from instant_tests.models.sip_server_properties import SipServerProperties +from instant_tests.models.sip_test_protocol import SipTestProtocol +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_direction import TestDirection +from instant_tests.models.test_dns_server import TestDnsServer +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_sip_credentials import TestSipCredentials +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.test_type import TestType +from instant_tests.models.unauthorized_error import UnauthorizedError +from instant_tests.models.unexpanded_instant_test import UnexpandedInstantTest +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from instant_tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from instant_tests.models.validation_error import ValidationError +from instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from instant_tests.models.voice_instant_test import VoiceInstantTest +from instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest +from instant_tests.models.voice_properties import VoiceProperties +from instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest +from instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest +from instant_tests.models.web_transaction_properties import WebTransactionProperties diff --git a/instant_tests/instant_tests/models/agent.py b/instant_tests/instant_tests/models/agent.py new file mode 100644 index 00000000..58285689 --- /dev/null +++ b/instant_tests/instant_tests/models/agent.py @@ -0,0 +1,124 @@ +# 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.2 + 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 instant_tests.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/instant_tests/instant_tests/models/agent_base.py b/instant_tests/instant_tests/models/agent_base.py new file mode 100644 index 00000000..177f13ea --- /dev/null +++ b/instant_tests/instant_tests/models/agent_base.py @@ -0,0 +1,97 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/instant_tests/instant_tests/models/agent_to_agent_instant_test.py b/instant_tests/instant_tests/models/agent_to_agent_instant_test.py new file mode 100644 index 00000000..1bc057c9 --- /dev/null +++ b/instant_tests/instant_tests/models/agent_to_agent_instant_test.py @@ -0,0 +1,197 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from instant_tests.models.test_direction import TestDirection +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class AgentToAgentInstantTest(BaseModel): + """ + AgentToAgentInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + direction: Optional[TestDirection] = None + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + protocol: Optional[AgentToAgentTestProtocol] = None + target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") + throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") + throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") + throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToAgentInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "dscp", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 AgentToAgentInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "direction": obj.get("direction"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "mss": obj.get("mss"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "targetAgentId": obj.get("targetAgentId"), + "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, + "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, + "throughputRate": obj.get("throughputRate"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test_request.py b/instant_tests/instant_tests/models/agent_to_agent_instant_test_request.py similarity index 78% rename from instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test_request.py rename to instant_tests/instant_tests/models/agent_to_agent_instant_test_request.py index 581c355e..4e5ffaf7 100644 --- a/instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test_request.py +++ b/instant_tests/instant_tests/models/agent_to_agent_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,20 +18,17 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_direction import TestDirection -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_direction import TestDirection +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class AgentToAgentInstantTestRequest(BaseModel): """ @@ -50,12 +47,11 @@ class AgentToAgentInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") direction: Optional[TestDirection] = None dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") protocol: Optional[AgentToAgentTestProtocol] = None @@ -64,12 +60,14 @@ class AgentToAgentInstantTestRequest(BaseModel): throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -82,7 +80,7 @@ class AgentToAgentInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentToAgentInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -105,19 +103,21 @@ class AgentToAgentInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "dscp", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "dscp", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -133,7 +133,7 @@ class AgentToAgentInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentToAgentInstantTestRequest from a dict""" if obj is None: return None @@ -152,10 +152,9 @@ class AgentToAgentInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "direction": obj.get("direction"), "dscp": obj.get("dscp"), "dscpId": obj.get("dscpId"), @@ -168,7 +167,8 @@ class AgentToAgentInstantTestRequest(BaseModel): "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, "throughputRate": obj.get("throughputRate"), - "fixedPacketRate": obj.get("fixedPacketRate") + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/agent_to_agent_properties.py b/instant_tests/instant_tests/models/agent_to_agent_properties.py new file mode 100644 index 00000000..31957f1d --- /dev/null +++ b/instant_tests/instant_tests/models/agent_to_agent_properties.py @@ -0,0 +1,122 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from instant_tests.models.test_direction import TestDirection +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from typing import Optional, Set +from typing_extensions import Self + +class AgentToAgentProperties(BaseModel): + """ + AgentToAgentProperties + """ # noqa: E501 + direction: Optional[TestDirection] = None + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + protocol: Optional[AgentToAgentTestProtocol] = None + target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") + throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") + throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") + throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToAgentProperties 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([ + "dscp", + "type", + ]) + + _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 AgentToAgentProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "direction": obj.get("direction"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "mss": obj.get("mss"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "targetAgentId": obj.get("targetAgentId"), + "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, + "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, + "throughputRate": obj.get("throughputRate"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/agent_to_agent_test_protocol.py b/instant_tests/instant_tests/models/agent_to_agent_test_protocol.py new file mode 100644 index 00000000..048d5d6b --- /dev/null +++ b/instant_tests/instant_tests/models/agent_to_agent_test_protocol.py @@ -0,0 +1,37 @@ +# 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.2 + 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 AgentToAgentTestProtocol(str, Enum): + """ + AgentToAgentTestProtocol + """ + + """ + allowed enum values + """ + TCP = 'tcp' + UDP = 'udp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AgentToAgentTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/agent_to_server_instant_test.py b/instant_tests/instant_tests/models/agent_to_server_instant_test.py new file mode 100644 index 00000000..b87f3f15 --- /dev/null +++ b/instant_tests/instant_tests/models/agent_to_server_instant_test.py @@ -0,0 +1,202 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class AgentToServerInstantTest(BaseModel): + """ + AgentToServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") + mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + server: StrictStr = Field(description="Target name or IP address.") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") + network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "dscp", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 AgentToServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "continuousMode": obj.get("continuousMode"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "ipv6Policy": obj.get("ipv6Policy"), + "pingPayloadSize": obj.get("pingPayloadSize"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/agent_to_server_instant_test_request.py b/instant_tests/instant_tests/models/agent_to_server_instant_test_request.py similarity index 79% rename from instant_tests_api/instant_tests_api/models/agent_to_server_instant_test_request.py rename to instant_tests/instant_tests/models/agent_to_server_instant_test_request.py index f2b58b64..ab558674 100644 --- a/instant_tests_api/instant_tests_api/models/agent_to_server_instant_test_request.py +++ b/instant_tests/instant_tests/models/agent_to_server_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,21 +18,18 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class AgentToServerInstantTestRequest(BaseModel): """ @@ -51,12 +48,11 @@ class AgentToServerInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") @@ -67,12 +63,14 @@ class AgentToServerInstantTestRequest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -85,7 +83,7 @@ class AgentToServerInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentToServerInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -108,19 +106,21 @@ class AgentToServerInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "dscp", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "dscp", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -136,7 +136,7 @@ class AgentToServerInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentToServerInstantTestRequest from a dict""" if obj is None: return None @@ -155,10 +155,9 @@ class AgentToServerInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "continuousMode": obj.get("continuousMode"), "fixedPacketRate": obj.get("fixedPacketRate"), @@ -173,7 +172,8 @@ class AgentToServerInstantTestRequest(BaseModel): "dscpId": obj.get("dscpId"), "ipv6Policy": obj.get("ipv6Policy"), "pingPayloadSize": obj.get("pingPayloadSize"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/agent_to_server_properties.py b/instant_tests/instant_tests/models/agent_to_server_properties.py new file mode 100644 index 00000000..bbcbb21d --- /dev/null +++ b/instant_tests/instant_tests/models/agent_to_server_properties.py @@ -0,0 +1,127 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class AgentToServerProperties(BaseModel): + """ + AgentToServerProperties + """ # noqa: E501 + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") + mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + server: StrictStr = Field(description="Target name or IP address.") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") + network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToServerProperties 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([ + "dscp", + "type", + ]) + + _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 AgentToServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "continuousMode": obj.get("continuousMode"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "ipv6Policy": obj.get("ipv6Policy"), + "pingPayloadSize": obj.get("pingPayloadSize"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/cloud_enterprise_agent_type.py b/instant_tests/instant_tests/models/cloud_enterprise_agent_type.py new file mode 100644 index 00000000..c838ba4c --- /dev/null +++ b/instant_tests/instant_tests/models/cloud_enterprise_agent_type.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.2 + 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/instant_tests/instant_tests/models/dns_query_class.py b/instant_tests/instant_tests/models/dns_query_class.py new file mode 100644 index 00000000..4728ba41 --- /dev/null +++ b/instant_tests/instant_tests/models/dns_query_class.py @@ -0,0 +1,37 @@ +# 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.2 + 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 DnsQueryClass(str, Enum): + """ + Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. + """ + + """ + allowed enum values + """ + IN = 'in' + CH = 'ch' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DnsQueryClass from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/dns_sec_instant_test.py b/instant_tests/instant_tests/models/dns_sec_instant_test.py new file mode 100644 index 00000000..9499da1e --- /dev/null +++ b/instant_tests/instant_tests/models/dns_sec_instant_test.py @@ -0,0 +1,169 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from instant_tests.models.agent import Agent +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class DnsSecInstantTest(BaseModel): + """ + DnsSecInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsSecInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 DnsSecInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/dns_sec_instant_test_request.py b/instant_tests/instant_tests/models/dns_sec_instant_test_request.py similarity index 76% rename from instant_tests_api/instant_tests_api/models/dns_sec_instant_test_request.py rename to instant_tests/instant_tests/models/dns_sec_instant_test_request.py index 3d75b985..fb46b62b 100644 --- a/instant_tests_api/instant_tests_api/models/dns_sec_instant_test_request.py +++ b/instant_tests/instant_tests/models/dns_sec_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class DnsSecInstantTestRequest(BaseModel): """ @@ -46,15 +43,16 @@ class DnsSecInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "domain", "dnsQueryClass"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -67,7 +65,7 @@ class DnsSecInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsSecInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,18 +87,20 @@ class DnsSecInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -116,7 +116,7 @@ class DnsSecInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsSecInstantTestRequest from a dict""" if obj is None: return None @@ -135,12 +135,12 @@ class DnsSecInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/dns_sec_properties.py b/instant_tests/instant_tests/models/dns_sec_properties.py new file mode 100644 index 00000000..a4233701 --- /dev/null +++ b/instant_tests/instant_tests/models/dns_sec_properties.py @@ -0,0 +1,94 @@ +# 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.2 + 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 instant_tests.models.dns_query_class import DnsQueryClass +from typing import Optional, Set +from typing_extensions import Self + +class DnsSecProperties(BaseModel): + """ + DnsSecProperties + """ # noqa: E501 + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["domain", "dnsQueryClass", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsSecProperties 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([ + "type", + ]) + + _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 DnsSecProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/dns_server_instant_test.py b/instant_tests/instant_tests/models/dns_server_instant_test.py new file mode 100644 index 00000000..adf913c1 --- /dev/null +++ b/instant_tests/instant_tests/models/dns_server_instant_test.py @@ -0,0 +1,207 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.test_dns_server import TestDnsServer +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class DnsServerInstantTest(BaseModel): + """ + DnsServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + dns_servers: List[TestDnsServer] = Field(alias="dnsServers") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) + _items = [] + if self.dns_servers: + for _item in self.dns_servers: + if _item: + _items.append(_item.to_dict()) + _dict['dnsServers'] = _items + # 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 DnsServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "recursiveQueries": obj.get("recursiveQueries"), + "ipv6Policy": obj.get("ipv6Policy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/dns_server_instant_test_request.py b/instant_tests/instant_tests/models/dns_server_instant_test_request.py similarity index 77% rename from instant_tests_api/instant_tests_api/models/dns_server_instant_test_request.py rename to instant_tests/instant_tests/models/dns_server_instant_test_request.py index 858776c9..ebd00b22 100644 --- a/instant_tests_api/instant_tests_api/models/dns_server_instant_test_request.py +++ b/instant_tests/instant_tests/models/dns_server_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,22 +18,19 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class DnsServerInstantTestRequest(BaseModel): """ @@ -52,14 +49,13 @@ class DnsServerInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") dns_servers: List[StrictStr] = Field(description="A list of DNS server FQDN.", alias="dnsServers") dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") protocol: Optional[TestProtocol] = None @@ -67,12 +63,14 @@ class DnsServerInstantTestRequest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -85,7 +83,7 @@ class DnsServerInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsServerInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -107,18 +105,20 @@ class DnsServerInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -134,7 +134,7 @@ class DnsServerInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsServerInstantTestRequest from a dict""" if obj is None: return None @@ -153,10 +153,9 @@ class DnsServerInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "dnsServers": obj.get("dnsServers"), "dnsTransportProtocol": obj.get("dnsTransportProtocol"), @@ -170,7 +169,8 @@ class DnsServerInstantTestRequest(BaseModel): "recursiveQueries": obj.get("recursiveQueries"), "ipv6Policy": obj.get("ipv6Policy"), "fixedPacketRate": obj.get("fixedPacketRate"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/dns_server_properties.py b/instant_tests/instant_tests/models/dns_server_properties.py new file mode 100644 index 00000000..61ca0279 --- /dev/null +++ b/instant_tests/instant_tests/models/dns_server_properties.py @@ -0,0 +1,132 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.test_dns_server import TestDnsServer +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class DnsServerProperties(BaseModel): + """ + DnsServerProperties + """ # noqa: E501 + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + dns_servers: List[TestDnsServer] = Field(alias="dnsServers") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServerProperties 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([ + "type", + ]) + + _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 dns_servers (list) + _items = [] + if self.dns_servers: + for _item in self.dns_servers: + if _item: + _items.append(_item.to_dict()) + _dict['dnsServers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "recursiveQueries": obj.get("recursiveQueries"), + "ipv6Policy": obj.get("ipv6Policy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/dns_servers_request.py b/instant_tests/instant_tests/models/dns_servers_request.py new file mode 100644 index 00000000..cc39fbe9 --- /dev/null +++ b/instant_tests/instant_tests/models/dns_servers_request.py @@ -0,0 +1,87 @@ +# 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.2 + 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 DnsServersRequest(BaseModel): + """ + DnsServersRequest + """ # noqa: E501 + dns_servers: Optional[List[StrictStr]] = Field(default=None, description="A list of DNS server FQDN.", alias="dnsServers") + __properties: ClassVar[List[str]] = ["dnsServers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServersRequest 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 DnsServersRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dnsServers": obj.get("dnsServers") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/dns_trace_instant_test.py b/instant_tests/instant_tests/models/dns_trace_instant_test.py new file mode 100644 index 00000000..eb73428d --- /dev/null +++ b/instant_tests/instant_tests/models/dns_trace_instant_test.py @@ -0,0 +1,172 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from instant_tests.models.agent import Agent +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class DnsTraceInstantTest(BaseModel): + """ + DnsTraceInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsTraceInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 DnsTraceInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/dns_trace_instant_test_request.py b/instant_tests/instant_tests/models/dns_trace_instant_test_request.py similarity index 75% rename from instant_tests_api/instant_tests_api/models/dns_trace_instant_test_request.py rename to instant_tests/instant_tests/models/dns_trace_instant_test_request.py index 51e71f79..0a848eb8 100644 --- a/instant_tests_api/instant_tests_api/models/dns_trace_instant_test_request.py +++ b/instant_tests/instant_tests/models/dns_trace_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,17 +18,14 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class DnsTraceInstantTestRequest(BaseModel): """ @@ -47,16 +44,17 @@ class DnsTraceInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "dnsTransportProtocol", "domain", "dnsQueryClass"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -69,7 +67,7 @@ class DnsTraceInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsTraceInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -91,18 +89,20 @@ class DnsTraceInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -118,7 +118,7 @@ class DnsTraceInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsTraceInstantTestRequest from a dict""" if obj is None: return None @@ -137,13 +137,13 @@ class DnsTraceInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "dnsTransportProtocol": obj.get("dnsTransportProtocol"), "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/dns_trace_properties.py b/instant_tests/instant_tests/models/dns_trace_properties.py new file mode 100644 index 00000000..caf455d6 --- /dev/null +++ b/instant_tests/instant_tests/models/dns_trace_properties.py @@ -0,0 +1,97 @@ +# 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.2 + 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 instant_tests.models.dns_query_class import DnsQueryClass +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from typing import Optional, Set +from typing_extensions import Self + +class DnsTraceProperties(BaseModel): + """ + DnsTraceProperties + """ # noqa: E501 + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["dnsTransportProtocol", "domain", "dnsQueryClass", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsTraceProperties 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([ + "type", + ]) + + _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 DnsTraceProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/error.py b/instant_tests/instant_tests/models/error.py new file mode 100644 index 00000000..12e56527 --- /dev/null +++ b/instant_tests/instant_tests/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/instant_tests/instant_tests/models/expand.py b/instant_tests/instant_tests/models/expand.py new file mode 100644 index 00000000..0c7c4263 --- /dev/null +++ b/instant_tests/instant_tests/models/expand.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.2 + 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 + """ + AGENT = 'agent' + LABEL = 'label' + SHARED_MINUS_WITH_MINUS_ACCOUNT = 'shared-with-account' + + @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/instant_tests/instant_tests/models/ftp_server_instant_test.py b/instant_tests/instant_tests/models/ftp_server_instant_test.py new file mode 100644 index 00000000..9ac6c33c --- /dev/null +++ b/instant_tests/instant_tests/models/ftp_server_instant_test.py @@ -0,0 +1,206 @@ +# 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.2 + 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 typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.ftp_server_request_type import FtpServerRequestType +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class FtpServerInstantTest(BaseModel): + """ + FtpServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") + ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") + ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") + 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") + password: StrictStr = Field(description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + request_type: FtpServerRequestType = Field(alias="requestType") + url: StrictStr = Field(description="Target for the test.") + use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") + use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") + username: StrictStr = Field(description="Username for Basic/NTLM authentication.") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FtpServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 FtpServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "downloadLimit": obj.get("downloadLimit"), + "ftpTargetTime": obj.get("ftpTargetTime"), + "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "requestType": obj.get("requestType"), + "url": obj.get("url"), + "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, + "useExplicitFtps": obj.get("useExplicitFtps"), + "username": obj.get("username"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/ftp_server_properties.py b/instant_tests/instant_tests/models/ftp_server_properties.py new file mode 100644 index 00000000..75d109b3 --- /dev/null +++ b/instant_tests/instant_tests/models/ftp_server_properties.py @@ -0,0 +1,131 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.ftp_server_request_type import FtpServerRequestType +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class FtpServerProperties(BaseModel): + """ + FtpServerProperties + """ # noqa: E501 + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") + ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") + ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") + 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") + password: StrictStr = Field(description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + request_type: FtpServerRequestType = Field(alias="requestType") + url: StrictStr = Field(description="Target for the test.") + use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") + use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") + username: StrictStr = Field(description="Username for Basic/NTLM authentication.") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FtpServerProperties 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([ + "type", + ]) + + _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 FtpServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "downloadLimit": obj.get("downloadLimit"), + "ftpTargetTime": obj.get("ftpTargetTime"), + "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "requestType": obj.get("requestType"), + "url": obj.get("url"), + "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, + "useExplicitFtps": obj.get("useExplicitFtps"), + "username": obj.get("username"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/ftp_server_request_type.py b/instant_tests/instant_tests/models/ftp_server_request_type.py new file mode 100644 index 00000000..92bdb79a --- /dev/null +++ b/instant_tests/instant_tests/models/ftp_server_request_type.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.2 + 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 FtpServerRequestType(str, Enum): + """ + Set the type of activity for the test. + """ + + """ + allowed enum values + """ + DOWNLOAD = 'download' + UPLOAD = 'upload' + LIST = 'list' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FtpServerRequestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/http_server_instant_test.py b/instant_tests/instant_tests/models/http_server_instant_test.py new file mode 100644 index 00000000..409eb565 --- /dev/null +++ b/instant_tests/instant_tests/models/http_server_instant_test.py @@ -0,0 +1,241 @@ +# 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.2 + 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 typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class HttpServerInstantTest(BaseModel): + """ + HttpServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") + headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") + 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") + download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") + dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + 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") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + 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") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.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 HttpServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "headers": obj.get("headers"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "downloadLimit": obj.get("downloadLimit"), + "dnsOverride": obj.get("dnsOverride"), + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "postBody": obj.get("postBody"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "ipv6Policy": obj.get("ipv6Policy"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/http_server_instant_test_request.py b/instant_tests/instant_tests/models/http_server_instant_test_request.py similarity index 78% rename from instant_tests_api/instant_tests_api/models/http_server_instant_test_request.py rename to instant_tests/instant_tests/models/http_server_instant_test_request.py index d404e380..e46507ea 100644 --- a/instant_tests_api/instant_tests_api/models/http_server_instant_test_request.py +++ b/instant_tests/instant_tests/models/http_server_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,23 +18,20 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class HttpServerInstantTestRequest(BaseModel): """ @@ -53,7 +50,6 @@ class HttpServerInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") @@ -69,7 +65,7 @@ class HttpServerInstantTestRequest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") 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") @@ -82,15 +78,18 @@ class HttpServerInstantTestRequest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") 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") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "ipv6Policy", "followRedirects", "fixedPacketRate"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -103,7 +102,7 @@ class HttpServerInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of HttpServerInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -126,24 +125,29 @@ class HttpServerInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "ssl_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -151,13 +155,10 @@ class HttpServerInstantTestRequest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of HttpServerInstantTestRequest from a dict""" if obj is None: return None @@ -176,16 +177,15 @@ class HttpServerInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), "headers": obj.get("headers"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "downloadLimit": obj.get("downloadLimit"), "dnsOverride": obj.get("dnsOverride"), @@ -208,9 +208,11 @@ class HttpServerInstantTestRequest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "ipv6Policy": obj.get("ipv6Policy"), "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "fixedPacketRate": obj.get("fixedPacketRate") + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/http_server_properties.py b/instant_tests/instant_tests/models/http_server_properties.py new file mode 100644 index 00000000..6f1a5458 --- /dev/null +++ b/instant_tests/instant_tests/models/http_server_properties.py @@ -0,0 +1,166 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class HttpServerProperties(BaseModel): + """ + HttpServerProperties + """ # noqa: E501 + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") + headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") + 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") + download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") + dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + 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") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + 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") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpServerProperties 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([ + "ssl_version", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "headers": obj.get("headers"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "downloadLimit": obj.get("downloadLimit"), + "dnsOverride": obj.get("dnsOverride"), + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "postBody": obj.get("postBody"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "ipv6Policy": obj.get("ipv6Policy"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/instant_test.py b/instant_tests/instant_tests/models/instant_test.py new file mode 100644 index 00000000..c6fd8d02 --- /dev/null +++ b/instant_tests/instant_tests/models/instant_test.py @@ -0,0 +1,151 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_type import TestType +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class InstantTest(BaseModel): + """ + InstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstantTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "labels", + "shared_with_accounts", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/instant_test_request.py b/instant_tests/instant_tests/models/instant_test_request.py new file mode 100644 index 00000000..1305d316 --- /dev/null +++ b/instant_tests/instant_tests/models/instant_test_request.py @@ -0,0 +1,99 @@ +# 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.2 + 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 instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from typing import Optional, Set +from typing_extensions import Self + +class InstantTestRequest(BaseModel): + """ + InstantTestRequest + """ # noqa: E501 + 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") + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["labels", "sharedWithAccounts", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstantTestRequest 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 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 InstantTestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": obj.get("labels"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/instant_test_request_agents_inner.py b/instant_tests/instant_tests/models/instant_test_request_agents_inner.py new file mode 100644 index 00000000..ea0a5a84 --- /dev/null +++ b/instant_tests/instant_tests/models/instant_test_request_agents_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 InstantTestRequestAgentsInner(BaseModel): + """ + InstantTestRequestAgentsInner + """ # noqa: E501 + agent_id: Optional[StrictStr] = Field(default=None, description="Identifier for the agent (get `agentId` from `/agents` endpoint).", alias="agentId") + source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address from the agent's `ipAddresses` field (get `ipAddresses` from `/agents` endpoint). Used for interface selection.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstantTestRequestAgentsInner 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 InstantTestRequestAgentsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentId": obj.get("agentId"), + "sourceIpAddress": obj.get("sourceIpAddress") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/link.py b/instant_tests/instant_tests/models/link.py new file mode 100644 index 00000000..bc918190 --- /dev/null +++ b/instant_tests/instant_tests/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/instant_tests/instant_tests/models/page_load_instant_test.py b/instant_tests/instant_tests/models/page_load_instant_test.py new file mode 100644 index 00000000..79e6e733 --- /dev/null +++ b/instant_tests/instant_tests/models/page_load_instant_test.py @@ -0,0 +1,247 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class PageLoadInstantTest(BaseModel): + """ + PageLoadInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") + page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageLoadInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.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 PageLoadInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pageLoadTargetTime": obj.get("pageLoadTargetTime"), + "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/page_load_instant_test_request.py b/instant_tests/instant_tests/models/page_load_instant_test_request.py similarity index 77% rename from instant_tests_api/instant_tests_api/models/page_load_instant_test_request.py rename to instant_tests/instant_tests/models/page_load_instant_test_request.py index 73c850ae..177f3738 100644 --- a/instant_tests_api/instant_tests_api/models/page_load_instant_test_request.py +++ b/instant_tests/instant_tests/models/page_load_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,23 +18,20 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class PageLoadInstantTestRequest(BaseModel): """ @@ -53,12 +50,12 @@ class PageLoadInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") 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") 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") @@ -66,7 +63,7 @@ class PageLoadInstantTestRequest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") @@ -80,6 +77,7 @@ class PageLoadInstantTestRequest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") @@ -87,12 +85,14 @@ class PageLoadInstantTestRequest(BaseModel): browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -105,7 +105,7 @@ class PageLoadInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PageLoadInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -128,24 +128,29 @@ class PageLoadInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "ssl_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -153,13 +158,10 @@ class PageLoadInstantTestRequest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PageLoadInstantTestRequest from a dict""" if obj is None: return None @@ -178,15 +180,15 @@ class PageLoadInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "httpTargetTime": obj.get("httpTargetTime"), "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, @@ -208,13 +210,15 @@ class PageLoadInstantTestRequest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "blockDomains": obj.get("blockDomains"), "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, "browserLanguage": obj.get("browserLanguage"), "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate") + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/page_load_properties.py b/instant_tests/instant_tests/models/page_load_properties.py new file mode 100644 index 00000000..52294e67 --- /dev/null +++ b/instant_tests/instant_tests/models/page_load_properties.py @@ -0,0 +1,172 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class PageLoadProperties(BaseModel): + """ + PageLoadProperties + """ # noqa: E501 + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") + page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageLoadProperties 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([ + "ssl_version", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PageLoadProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pageLoadTargetTime": obj.get("pageLoadTargetTime"), + "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/server_instant_test_request.py b/instant_tests/instant_tests/models/server_instant_test_request.py similarity index 79% rename from instant_tests_api/instant_tests_api/models/server_instant_test_request.py rename to instant_tests/instant_tests/models/server_instant_test_request.py index 3b5af149..71f99862 100644 --- a/instant_tests_api/instant_tests_api/models/server_instant_test_request.py +++ b/instant_tests/instant_tests/models/server_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,21 +18,18 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.ftp_server_request_type import FtpServerRequestType -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.ftp_server_request_type import FtpServerRequestType +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class ServerInstantTestRequest(BaseModel): """ @@ -51,14 +48,13 @@ class ServerInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: StrictStr = Field(description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") @@ -70,12 +66,14 @@ class ServerInstantTestRequest(BaseModel): username: StrictStr = Field(description="Username for Basic/NTLM authentication.") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -88,7 +86,7 @@ class ServerInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ServerInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -110,18 +108,20 @@ class ServerInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -137,7 +137,7 @@ class ServerInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ServerInstantTestRequest from a dict""" if obj is None: return None @@ -156,10 +156,9 @@ class ServerInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "downloadLimit": obj.get("downloadLimit"), "ftpTargetTime": obj.get("ftpTargetTime"), @@ -177,7 +176,8 @@ class ServerInstantTestRequest(BaseModel): "useExplicitFtps": obj.get("useExplicitFtps"), "username": obj.get("username"), "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy") + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/simple_agent.py b/instant_tests/instant_tests/models/simple_agent.py new file mode 100644 index 00000000..724316ce --- /dev/null +++ b/instant_tests/instant_tests/models/simple_agent.py @@ -0,0 +1,121 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/instant_tests/instant_tests/models/sip_server_instant_test.py b/instant_tests/instant_tests/models/sip_server_instant_test.py new file mode 100644 index 00000000..3610b434 --- /dev/null +++ b/instant_tests/instant_tests/models/sip_server_instant_test.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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTest(BaseModel): + """ + SipServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 SipServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/sip_server_instant_test_request.py b/instant_tests/instant_tests/models/sip_server_instant_test_request.py new file mode 100644 index 00000000..b32d2701 --- /dev/null +++ b/instant_tests/instant_tests/models/sip_server_instant_test_request.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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_sip_credentials import TestSipCredentials +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTestRequest(BaseModel): + """ + SipServerInstantTestRequest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = 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") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "targetSipCredentials"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTestRequest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # override the default output from pydantic by calling `to_dict()` of target_sip_credentials + if self.target_sip_credentials: + _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SipServerInstantTestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": obj.get("labels"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/sip_server_instant_test_request1.py b/instant_tests/instant_tests/models/sip_server_instant_test_request1.py new file mode 100644 index 00000000..24cc67bf --- /dev/null +++ b/instant_tests/instant_tests/models/sip_server_instant_test_request1.py @@ -0,0 +1,196 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_sip_credentials import TestSipCredentials +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTestRequest1(BaseModel): + """ + SipServerInstantTestRequest1 + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "targetSipCredentials"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTestRequest1 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 + # override the default output from pydantic by calling `to_dict()` of target_sip_credentials + if self.target_sip_credentials: + _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SipServerInstantTestRequest1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/sip_server_instant_test_response.py b/instant_tests/instant_tests/models/sip_server_instant_test_response.py new file mode 100644 index 00000000..9c8163c1 --- /dev/null +++ b/instant_tests/instant_tests/models/sip_server_instant_test_response.py @@ -0,0 +1,203 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.sip_test_protocol import SipTestProtocol +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTestResponse(BaseModel): + """ + SipServerInstantTestResponse + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") + protocol: Optional[SipTestProtocol] = None + sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") + user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "authUser", "password", "port", "protocol", "sipRegistrar", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTestResponse 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 SipServerInstantTestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "authUser": obj.get("authUser"), + "password": obj.get("password"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "sipRegistrar": obj.get("sipRegistrar"), + "user": obj.get("user") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/sip_server_properties.py b/instant_tests/instant_tests/models/sip_server_properties.py new file mode 100644 index 00000000..85ab7eeb --- /dev/null +++ b/instant_tests/instant_tests/models/sip_server_properties.py @@ -0,0 +1,115 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.test_ipv6_policy import TestIpv6Policy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from typing import Optional, Set +from typing_extensions import Self + +class SipServerProperties(BaseModel): + """ + SipServerProperties + """ # noqa: E501 + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerProperties 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([ + "type", + ]) + + _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 SipServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/sip_test_protocol.py b/instant_tests/instant_tests/models/sip_test_protocol.py new file mode 100644 index 00000000..7c9bc19a --- /dev/null +++ b/instant_tests/instant_tests/models/sip_test_protocol.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.2 + 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 SipTestProtocol(str, Enum): + """ + Transport layer for SIP communication. + """ + + """ + allowed enum values + """ + TCP = 'tcp' + TLS = 'tls' + UDP = 'udp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SipTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_auth_type.py b/instant_tests/instant_tests/models/test_auth_type.py new file mode 100644 index 00000000..c974af84 --- /dev/null +++ b/instant_tests/instant_tests/models/test_auth_type.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestAuthType(str, Enum): + """ + HTTP authentication type. + """ + + """ + allowed enum values + """ + NONE = 'none' + BASIC = 'basic' + NTLM = 'ntlm' + KERBEROS = 'kerberos' + OAUTH = 'oauth' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestAuthType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_custom_headers.py b/instant_tests/instant_tests/models/test_custom_headers.py new file mode 100644 index 00000000..df129999 --- /dev/null +++ b/instant_tests/instant_tests/models/test_custom_headers.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestCustomHeaders(BaseModel): + """ + TestCustomHeaders + """ # noqa: E501 + root: Optional[Dict[str, StrictStr]] = Field(default=None, description="Use these HTTP headers for root server request.") + domains: Optional[Dict[str, Dict[str, StrictStr]]] = Field(default=None, description="Use these HTTP headers for the specified domains.") + all: Optional[Dict[str, StrictStr]] = Field(default=None, description="Use these HTTP headers for all domains.") + __properties: ClassVar[List[str]] = ["root", "domains", "all"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestCustomHeaders 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 TestCustomHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "root": obj.get("root"), + "domains": obj.get("domains"), + "all": obj.get("all") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/test_direction.py b/instant_tests/instant_tests/models/test_direction.py new file mode 100644 index 00000000..d635fdb3 --- /dev/null +++ b/instant_tests/instant_tests/models/test_direction.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.2 + 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 TestDirection(str, Enum): + """ + Direction of the test, which affects how results are shown. + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_dns_server.py b/instant_tests/instant_tests/models/test_dns_server.py new file mode 100644 index 00000000..e9c82177 --- /dev/null +++ b/instant_tests/instant_tests/models/test_dns_server.py @@ -0,0 +1,89 @@ +# 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.2 + 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 TestDnsServer(BaseModel): + """ + TestDnsServer + """ # noqa: E501 + server_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the DNS server.", alias="serverId") + server_name: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name (FQDN) of DNS server.", alias="serverName") + __properties: ClassVar[List[str]] = ["serverId", "serverName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestDnsServer 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 TestDnsServer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "serverId": obj.get("serverId"), + "serverName": obj.get("serverName") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/test_dns_transport_protocol.py b/instant_tests/instant_tests/models/test_dns_transport_protocol.py new file mode 100644 index 00000000..69a5cc0f --- /dev/null +++ b/instant_tests/instant_tests/models/test_dns_transport_protocol.py @@ -0,0 +1,37 @@ +# 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.2 + 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 TestDnsTransportProtocol(str, Enum): + """ + Transport protocol used for DNS requests. + """ + + """ + allowed enum values + """ + UDP = 'udp' + TCP = 'tcp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDnsTransportProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_dscp_id.py b/instant_tests/instant_tests/models/test_dscp_id.py new file mode 100644 index 00000000..50d75f63 --- /dev/null +++ b/instant_tests/instant_tests/models/test_dscp_id.py @@ -0,0 +1,57 @@ +# 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.2 + 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 TestDscpId(str, Enum): + """ + DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_8 = '8' + ENUM_16 = '16' + ENUM_24 = '24' + ENUM_32 = '32' + ENUM_40 = '40' + ENUM_48 = '48' + ENUM_56 = '56' + ENUM_10 = '10' + ENUM_12 = '12' + ENUM_14 = '14' + ENUM_18 = '18' + ENUM_20 = '20' + ENUM_22 = '22' + ENUM_26 = '26' + ENUM_28 = '28' + ENUM_30 = '30' + ENUM_34 = '34' + ENUM_36 = '36' + ENUM_38 = '38' + ENUM_46 = '46' + ENUM_44 = '44' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDscpId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_ipv6_policy.py b/instant_tests/instant_tests/models/test_ipv6_policy.py new file mode 100644 index 00000000..6820aee2 --- /dev/null +++ b/instant_tests/instant_tests/models/test_ipv6_policy.py @@ -0,0 +1,39 @@ +# 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.2 + 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 TestIpv6Policy(str, Enum): + """ + IP version policy. Overrides the IPv6 policy configured at the agent level. + """ + + """ + allowed enum values + """ + FORCE_MINUS_IPV4 = 'force-ipv4' + PREFER_MINUS_IPV6 = 'prefer-ipv6' + FORCE_MINUS_IPV6 = 'force-ipv6' + USE_MINUS_AGENT_MINUS_POLICY = 'use-agent-policy' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestIpv6Policy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_labels_inner.py b/instant_tests/instant_tests/models/test_labels_inner.py new file mode 100644 index 00000000..417f738e --- /dev/null +++ b/instant_tests/instant_tests/models/test_labels_inner.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestLabelsInner(BaseModel): + """ + TestLabelsInner + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") + name: Optional[StrictStr] = Field(default=None, description="Name of the label.") + is_builtin: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestLabelsInner 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 TestLabelsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "name": obj.get("name"), + "isBuiltin": obj.get("isBuiltin") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/test_page_loading_strategy.py b/instant_tests/instant_tests/models/test_page_loading_strategy.py new file mode 100644 index 00000000..23a785d3 --- /dev/null +++ b/instant_tests/instant_tests/models/test_page_loading_strategy.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.2 + 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 TestPageLoadingStrategy(str, Enum): + """ + * `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. + """ + + """ + allowed enum values + """ + NORMAL = 'normal' + EAGER = 'eager' + NONE = 'none' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestPageLoadingStrategy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_path_trace_mode.py b/instant_tests/instant_tests/models/test_path_trace_mode.py new file mode 100644 index 00000000..cfc8b7f5 --- /dev/null +++ b/instant_tests/instant_tests/models/test_path_trace_mode.py @@ -0,0 +1,37 @@ +# 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.2 + 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 TestPathTraceMode(str, Enum): + """ + Select `inSession` to perform the path trace within a TCP session. + """ + + """ + allowed enum values + """ + CLASSIC = 'classic' + IN_MINUS_SESSION = 'in-session' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestPathTraceMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_probe_mode.py b/instant_tests/instant_tests/models/test_probe_mode.py new file mode 100644 index 00000000..e7f979fa --- /dev/null +++ b/instant_tests/instant_tests/models/test_probe_mode.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.2 + 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 TestProbeMode(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to TCP. + """ + + """ + allowed enum values + """ + AUTO = 'auto' + SACK = 'sack' + SYN = 'syn' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProbeMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_protocol.py b/instant_tests/instant_tests/models/test_protocol.py new file mode 100644 index 00000000..3c2476d1 --- /dev/null +++ b/instant_tests/instant_tests/models/test_protocol.py @@ -0,0 +1,37 @@ +# 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.2 + 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 TestProtocol(str, Enum): + """ + Protocol used by dependent network tests (end-to-end, path trace, PMTUD). + """ + + """ + allowed enum values + """ + TCP = 'tcp' + ICMP = 'icmp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_shared_accounts_inner.py b/instant_tests/instant_tests/models/test_shared_accounts_inner.py new file mode 100644 index 00000000..199843de --- /dev/null +++ b/instant_tests/instant_tests/models/test_shared_accounts_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 TestSharedAccountsInner(BaseModel): + """ + TestSharedAccountsInner + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="Account group ID.") + name: Optional[StrictStr] = Field(default=None, description="Account group name.") + __properties: ClassVar[List[str]] = ["aid", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestSharedAccountsInner 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 TestSharedAccountsInner 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"), + "name": obj.get("name") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/test_sip_credentials.py b/instant_tests/instant_tests/models/test_sip_credentials.py new file mode 100644 index 00000000..a26e4d11 --- /dev/null +++ b/instant_tests/instant_tests/models/test_sip_credentials.py @@ -0,0 +1,99 @@ +# 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.2 + 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_extensions import Annotated +from instant_tests.models.sip_test_protocol import SipTestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class TestSipCredentials(BaseModel): + """ + TestSipCredentials + """ # noqa: E501 + auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") + protocol: Optional[SipTestProtocol] = None + sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") + user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") + __properties: ClassVar[List[str]] = ["authUser", "password", "port", "protocol", "sipRegistrar", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestSipCredentials 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 TestSipCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authUser": obj.get("authUser"), + "password": obj.get("password"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "sipRegistrar": obj.get("sipRegistrar"), + "user": obj.get("user") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/test_ssl_version_id.py b/instant_tests/instant_tests/models/test_ssl_version_id.py new file mode 100644 index 00000000..a91984b6 --- /dev/null +++ b/instant_tests/instant_tests/models/test_ssl_version_id.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestSslVersionId(str, Enum): + """ + SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestSslVersionId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/test_type.py b/instant_tests/instant_tests/models/test_type.py new file mode 100644 index 00000000..b4852d09 --- /dev/null +++ b/instant_tests/instant_tests/models/test_type.py @@ -0,0 +1,47 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TestType(str, Enum): + """ + This is a read only value, as test type is implicit in the test creation url. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + BGP = 'bgp' + HTTP_MINUS_SERVER = 'http-server' + PAGE_MINUS_LOAD = 'page-load' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + FTP_MINUS_SERVER = 'ftp-server' + DNS_MINUS_TRACE = 'dns-trace' + DNS_MINUS_SERVER = 'dns-server' + DNSSEC = 'dnssec' + SIP_MINUS_SERVER = 'sip-server' + VOICE = 'voice' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/instant_tests/instant_tests/models/unauthorized_error.py b/instant_tests/instant_tests/models/unauthorized_error.py new file mode 100644 index 00000000..f52888c4 --- /dev/null +++ b/instant_tests/instant_tests/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/instant_tests/instant_tests/models/unexpanded_instant_test.py b/instant_tests/instant_tests/models/unexpanded_instant_test.py new file mode 100644 index 00000000..0f616cae --- /dev/null +++ b/instant_tests/instant_tests/models/unexpanded_instant_test.py @@ -0,0 +1,127 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from instant_tests.models.test_type import TestType +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedInstantTest(BaseModel): + """ + UnexpandedInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/unexpanded_instant_test_links.py b/instant_tests/instant_tests/models/unexpanded_instant_test_links.py new file mode 100644 index 00000000..0ed4b136 --- /dev/null +++ b/instant_tests/instant_tests/models/unexpanded_instant_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 instant_tests.models.link import Link +from instant_tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedInstantTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information + """ # noqa: E501 + var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": UnexpandedInstantTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/unexpanded_instant_test_links_self.py b/instant_tests/instant_tests/models/unexpanded_instant_test_links_self.py new file mode 100644 index 00000000..25134a56 --- /dev/null +++ b/instant_tests/instant_tests/models/unexpanded_instant_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 UnexpandedInstantTestLinksSelf(BaseModel): + """ + UnexpandedInstantTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinksSelf 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 UnexpandedInstantTestLinksSelf 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/instant_tests/instant_tests/models/validation_error.py b/instant_tests/instant_tests/models/validation_error.py new file mode 100644 index 00000000..8ae91be8 --- /dev/null +++ b/instant_tests/instant_tests/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/validation_error_all_of_errors.py b/instant_tests/instant_tests/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..5edfc05c --- /dev/null +++ b/instant_tests/instant_tests/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/instant_tests/instant_tests/models/voice_instant_test.py b/instant_tests/instant_tests/models/voice_instant_test.py new file mode 100644 index 00000000..2e7335c7 --- /dev/null +++ b/instant_tests/instant_tests/models/voice_instant_test.py @@ -0,0 +1,188 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class VoiceInstantTest(BaseModel): + """ + VoiceInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "codec", + "dscp", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 VoiceInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/voice_instant_test_request.py b/instant_tests/instant_tests/models/voice_instant_test_request.py similarity index 78% rename from instant_tests_api/instant_tests_api/models/voice_instant_test_request.py rename to instant_tests/instant_tests/models/voice_instant_test_request.py index 76fde7cf..88a719ad 100644 --- a/instant_tests_api/instant_tests_api/models/voice_instant_test_request.py +++ b/instant_tests/instant_tests/models/voice_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,17 +18,14 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_dscp_id import TestDscpId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class VoiceInstantTestRequest(BaseModel): """ @@ -47,22 +44,23 @@ class VoiceInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") codec: Optional[StrictStr] = Field(default=None, description="Codec label") codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -75,7 +73,7 @@ class VoiceInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of VoiceInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -99,20 +97,22 @@ class VoiceInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "codec", + "dscp", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "codec", - "dscp", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -128,7 +128,7 @@ class VoiceInstantTestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of VoiceInstantTestRequest from a dict""" if obj is None: return None @@ -147,10 +147,9 @@ class VoiceInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "codec": obj.get("codec"), "codecId": obj.get("codecId"), "dscp": obj.get("dscp"), @@ -159,7 +158,8 @@ class VoiceInstantTestRequest(BaseModel): "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, "port": obj.get("port"), - "targetAgentId": obj.get("targetAgentId") + "targetAgentId": obj.get("targetAgentId"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/instant_tests/instant_tests/models/voice_properties.py b/instant_tests/instant_tests/models/voice_properties.py new file mode 100644 index 00000000..5490587f --- /dev/null +++ b/instant_tests/instant_tests/models/voice_properties.py @@ -0,0 +1,113 @@ +# 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.2 + 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_extensions import Annotated +from instant_tests.models.test_dscp_id import TestDscpId +from typing import Optional, Set +from typing_extensions import Self + +class VoiceProperties(BaseModel): + """ + VoiceProperties + """ # noqa: E501 + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceProperties 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([ + "codec", + "dscp", + "type", + ]) + + _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 VoiceProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests/instant_tests/models/web_transaction_instant_test.py b/instant_tests/instant_tests/models/web_transaction_instant_test.py new file mode 100644 index 00000000..9afbe38d --- /dev/null +++ b/instant_tests/instant_tests/models/web_transaction_instant_test.py @@ -0,0 +1,251 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.agent import Agent +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_labels_inner import TestLabelsInner +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class WebTransactionInstantTest(BaseModel): + """ + WebTransactionInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") + time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") + transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "credentials"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebTransactionInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.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 WebTransactionInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "targetTime": obj.get("targetTime"), + "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, + "transactionScript": obj.get("transactionScript"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "credentials": obj.get("credentials") + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/models/web_transaction_instant_test_request.py b/instant_tests/instant_tests/models/web_transaction_instant_test_request.py similarity index 78% rename from instant_tests_api/instant_tests_api/models/web_transaction_instant_test_request.py rename to instant_tests/instant_tests/models/web_transaction_instant_test_request.py index 8e078064..4ce48302 100644 --- a/instant_tests_api/instant_tests_api/models/web_transaction_instant_test_request.py +++ b/instant_tests/instant_tests/models/web_transaction_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,23 +18,20 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class WebTransactionInstantTestRequest(BaseModel): """ @@ -53,12 +50,10 @@ class WebTransactionInstantTestRequest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") 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") 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") @@ -68,14 +63,14 @@ class WebTransactionInstantTestRequest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") protocol: Optional[TestProtocol] = None ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds.", alias="targetTime") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") url: StrictStr = Field(description="Target for the test.") @@ -83,6 +78,7 @@ class WebTransactionInstantTestRequest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") @@ -90,12 +86,15 @@ class WebTransactionInstantTestRequest(BaseModel): browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "credentials", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate"] + agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") + credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "credentials"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -108,7 +107,7 @@ class WebTransactionInstantTestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionInstantTestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -131,24 +130,29 @@ class WebTransactionInstantTestRequest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "ssl_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -156,13 +160,10 @@ class WebTransactionInstantTestRequest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionInstantTestRequest from a dict""" if obj is None: return None @@ -181,16 +182,14 @@ class WebTransactionInstantTestRequest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), - "credentials": obj.get("credentials"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "httpTargetTime": obj.get("httpTargetTime"), @@ -214,13 +213,16 @@ class WebTransactionInstantTestRequest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "blockDomains": obj.get("blockDomains"), "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, "browserLanguage": obj.get("browserLanguage"), "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate") + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "credentials": obj.get("credentials") }) return _obj diff --git a/instant_tests/instant_tests/models/web_transaction_properties.py b/instant_tests/instant_tests/models/web_transaction_properties.py new file mode 100644 index 00000000..ab93ab85 --- /dev/null +++ b/instant_tests/instant_tests/models/web_transaction_properties.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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from instant_tests.models.test_auth_type import TestAuthType +from instant_tests.models.test_custom_headers import TestCustomHeaders +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from instant_tests.models.test_path_trace_mode import TestPathTraceMode +from instant_tests.models.test_probe_mode import TestProbeMode +from instant_tests.models.test_protocol import TestProtocol +from instant_tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class WebTransactionProperties(BaseModel): + """ + WebTransactionProperties + """ # noqa: E501 + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") + time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") + transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebTransactionProperties 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([ + "ssl_version", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebTransactionProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "targetTime": obj.get("targetTime"), + "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, + "transactionScript": obj.get("transactionScript"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/instant_tests_api/instant_tests_api/py.typed b/instant_tests/instant_tests/py.typed similarity index 100% rename from instant_tests_api/instant_tests_api/py.typed rename to instant_tests/instant_tests/py.typed diff --git a/instant_tests/instant_tests/rest.py b/instant_tests/instant_tests/rest.py new file mode 100644 index 00000000..240daf50 --- /dev/null +++ b/instant_tests/instant_tests/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from instant_tests.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/instant_tests/pyproject.toml b/instant_tests/pyproject.toml new file mode 100644 index 00000000..6e60de70 --- /dev/null +++ b/instant_tests/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "instant_tests" +version = "1.0.0" +description = "Instant Tests API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Instant Tests API"] +include = ["instant_tests/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "instant_tests", + #"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/instant_tests_api/requirements.txt b/instant_tests/requirements.txt similarity index 100% rename from instant_tests_api/requirements.txt rename to instant_tests/requirements.txt diff --git a/instant_tests_api/setup.cfg b/instant_tests/setup.cfg similarity index 100% rename from instant_tests_api/setup.cfg rename to instant_tests/setup.cfg diff --git a/instant_tests/setup.py b/instant_tests/setup.py new file mode 100644 index 00000000..7b8341e1 --- /dev/null +++ b/instant_tests/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "instant-tests" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Instant Tests API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/instant_tests", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Instant Tests API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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. + """, # noqa: E501 + package_data={"instant_tests": ["py.typed"]}, +) diff --git a/instant_tests/test-requirements.txt b/instant_tests/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/instant_tests/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/instant_tests_api/test/__init__.py b/instant_tests/test/__init__.py similarity index 100% rename from instant_tests_api/test/__init__.py rename to instant_tests/test/__init__.py diff --git a/instant_tests/test/test_agent.py b/instant_tests/test/test_agent.py new file mode 100644 index 00000000..d1a6ecda --- /dev/null +++ b/instant_tests/test/test_agent.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent import Agent + +class TestAgent(unittest.TestCase): + """Agent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Agent: + """Test Agent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Agent` + """ + model = Agent() + if include_optional: + return Agent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + agent_type = 'enterprise-cluster' + ) + else: + return Agent( + agent_type = 'enterprise-cluster', + ) + """ + + def testAgent(self): + """Test Agent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_base.py b/instant_tests/test/test_agent_base.py new file mode 100644 index 00000000..57af8df2 --- /dev/null +++ b/instant_tests/test/test_agent_base.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_base import AgentBase + +class TestAgentBase(unittest.TestCase): + """AgentBase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentBase: + """Test AgentBase + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentBase` + """ + model = AgentBase() + if include_optional: + return AgentBase( + ip_addresses = ["99.139.65.220","9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce"], + public_ip_addresses = ["192.168.1.78","f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c"], + network = 'AT&T Services, Inc. (AS 7018)' + ) + else: + return AgentBase( + ) + """ + + def testAgentBase(self): + """Test AgentBase""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_agent_instant_test.py b/instant_tests/test/test_agent_to_agent_instant_test.py new file mode 100644 index 00000000..ee656702 --- /dev/null +++ b/instant_tests/test/test_agent_to_agent_instant_test.py @@ -0,0 +1,88 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest + +class TestAgentToAgentInstantTest(unittest.TestCase): + """AgentToAgentInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToAgentInstantTest: + """Test AgentToAgentInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToAgentInstantTest` + """ + model = AgentToAgentInstantTest() + if include_optional: + return AgentToAgentInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-agent', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + direction = 'to-target', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + mss = 20, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + protocol = 'tcp', + target_agent_id = '2954', + throughput_measurements = True, + throughput_duration = 5000, + throughput_rate = 8, + fixed_packet_rate = 50, + agents = [ + null + ] + ) + else: + return AgentToAgentInstantTest( + target_agent_id = '2954', + ) + """ + + def testAgentToAgentInstantTest(self): + """Test AgentToAgentInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_agent_instant_test_request.py b/instant_tests/test/test_agent_to_agent_instant_test_request.py new file mode 100644 index 00000000..58cba7fd --- /dev/null +++ b/instant_tests/test/test_agent_to_agent_instant_test_request.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest + +class TestAgentToAgentInstantTestRequest(unittest.TestCase): + """AgentToAgentInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToAgentInstantTestRequest: + """Test AgentToAgentInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToAgentInstantTestRequest` + """ + model = AgentToAgentInstantTestRequest() + if include_optional: + return AgentToAgentInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-agent', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + direction = 'to-target', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + mss = 20, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + protocol = 'tcp', + target_agent_id = '2954', + throughput_measurements = True, + throughput_duration = 5000, + throughput_rate = 8, + fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return AgentToAgentInstantTestRequest( + target_agent_id = '2954', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testAgentToAgentInstantTestRequest(self): + """Test AgentToAgentInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_agent_properties.py b/instant_tests/test/test_agent_to_agent_properties.py new file mode 100644 index 00000000..11294f2b --- /dev/null +++ b/instant_tests/test/test_agent_to_agent_properties.py @@ -0,0 +1,65 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_agent_properties import AgentToAgentProperties + +class TestAgentToAgentProperties(unittest.TestCase): + """AgentToAgentProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToAgentProperties: + """Test AgentToAgentProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToAgentProperties` + """ + model = AgentToAgentProperties() + if include_optional: + return AgentToAgentProperties( + direction = 'to-target', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + mss = 20, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + protocol = 'tcp', + target_agent_id = '2954', + throughput_measurements = True, + throughput_duration = 5000, + throughput_rate = 8, + fixed_packet_rate = 50, + type = 'agent-to-agent' + ) + else: + return AgentToAgentProperties( + target_agent_id = '2954', + ) + """ + + def testAgentToAgentProperties(self): + """Test AgentToAgentProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_agent_test_protocol.py b/instant_tests/test/test_agent_to_agent_test_protocol.py new file mode 100644 index 00000000..be7e4d49 --- /dev/null +++ b/instant_tests/test/test_agent_to_agent_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol + +class TestAgentToAgentTestProtocol(unittest.TestCase): + """AgentToAgentTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAgentToAgentTestProtocol(self): + """Test AgentToAgentTestProtocol""" + # inst = AgentToAgentTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_server_instant_test.py b/instant_tests/test/test_agent_to_server_instant_test.py new file mode 100644 index 00000000..5c597985 --- /dev/null +++ b/instant_tests/test/test_agent_to_server_instant_test.py @@ -0,0 +1,90 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_server_instant_test import AgentToServerInstantTest + +class TestAgentToServerInstantTest(unittest.TestCase): + """AgentToServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToServerInstantTest: + """Test AgentToServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToServerInstantTest` + """ + model = AgentToServerInstantTest() + if include_optional: + return AgentToServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + bandwidth_measurements = True, + continuous_mode = False, + fixed_packet_rate = 25, + mtu_measurements = False, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + probe_mode = 'auto', + protocol = 'tcp', + server = 'www.thousandeyes.com', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + ipv6_policy = 'use-agent-policy', + ping_payload_size = 0, + network_measurements = True, + agents = [ + null + ] + ) + else: + return AgentToServerInstantTest( + server = 'www.thousandeyes.com', + ) + """ + + def testAgentToServerInstantTest(self): + """Test AgentToServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_server_instant_test_request.py b/instant_tests/test/test_agent_to_server_instant_test_request.py new file mode 100644 index 00000000..f7676c21 --- /dev/null +++ b/instant_tests/test/test_agent_to_server_instant_test_request.py @@ -0,0 +1,87 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest + +class TestAgentToServerInstantTestRequest(unittest.TestCase): + """AgentToServerInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToServerInstantTestRequest: + """Test AgentToServerInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToServerInstantTestRequest` + """ + model = AgentToServerInstantTestRequest() + if include_optional: + return AgentToServerInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + bandwidth_measurements = True, + continuous_mode = False, + fixed_packet_rate = 25, + mtu_measurements = False, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + probe_mode = 'auto', + protocol = 'tcp', + server = 'www.thousandeyes.com', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + ipv6_policy = 'use-agent-policy', + ping_payload_size = 0, + network_measurements = True, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return AgentToServerInstantTestRequest( + server = 'www.thousandeyes.com', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testAgentToServerInstantTestRequest(self): + """Test AgentToServerInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_agent_to_server_properties.py b/instant_tests/test/test_agent_to_server_properties.py new file mode 100644 index 00000000..659dcdba --- /dev/null +++ b/instant_tests/test/test_agent_to_server_properties.py @@ -0,0 +1,67 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.agent_to_server_properties import AgentToServerProperties + +class TestAgentToServerProperties(unittest.TestCase): + """AgentToServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToServerProperties: + """Test AgentToServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToServerProperties` + """ + model = AgentToServerProperties() + if include_optional: + return AgentToServerProperties( + bandwidth_measurements = True, + continuous_mode = False, + fixed_packet_rate = 25, + mtu_measurements = False, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + probe_mode = 'auto', + protocol = 'tcp', + server = 'www.thousandeyes.com', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + ipv6_policy = 'use-agent-policy', + ping_payload_size = 0, + network_measurements = True, + type = 'agent-to-server' + ) + else: + return AgentToServerProperties( + server = 'www.thousandeyes.com', + ) + """ + + def testAgentToServerProperties(self): + """Test AgentToServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_cloud_enterprise_agent_type.py b/instant_tests/test/test_cloud_enterprise_agent_type.py new file mode 100644 index 00000000..941be4f8 --- /dev/null +++ b/instant_tests/test/test_cloud_enterprise_agent_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType + +class TestCloudEnterpriseAgentType(unittest.TestCase): + """CloudEnterpriseAgentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCloudEnterpriseAgentType(self): + """Test CloudEnterpriseAgentType""" + # inst = CloudEnterpriseAgentType() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_query_class.py b/instant_tests/test/test_dns_query_class.py new file mode 100644 index 00000000..33d480d2 --- /dev/null +++ b/instant_tests/test/test_dns_query_class.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_query_class import DnsQueryClass + +class TestDnsQueryClass(unittest.TestCase): + """DnsQueryClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDnsQueryClass(self): + """Test DnsQueryClass""" + # inst = DnsQueryClass() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_sec_instant_test.py b/instant_tests/test/test_dns_sec_instant_test.py new file mode 100644 index 00000000..5bfe5565 --- /dev/null +++ b/instant_tests/test/test_dns_sec_instant_test.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_sec_instant_test import DnsSecInstantTest + +class TestDnsSecInstantTest(unittest.TestCase): + """DnsSecInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsSecInstantTest: + """Test DnsSecInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsSecInstantTest` + """ + model = DnsSecInstantTest() + if include_optional: + return DnsSecInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dnssec', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + agents = [ + null + ] + ) + else: + return DnsSecInstantTest( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsSecInstantTest(self): + """Test DnsSecInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_sec_instant_test_request.py b/instant_tests/test/test_dns_sec_instant_test_request.py new file mode 100644 index 00000000..4fa045c1 --- /dev/null +++ b/instant_tests/test/test_dns_sec_instant_test_request.py @@ -0,0 +1,74 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_sec_instant_test_request import DnsSecInstantTestRequest + +class TestDnsSecInstantTestRequest(unittest.TestCase): + """DnsSecInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsSecInstantTestRequest: + """Test DnsSecInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsSecInstantTestRequest` + """ + model = DnsSecInstantTestRequest() + if include_optional: + return DnsSecInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dnssec', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return DnsSecInstantTestRequest( + domain = 'www.thousandeyes.com', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testDnsSecInstantTestRequest(self): + """Test DnsSecInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_sec_properties.py b/instant_tests/test/test_dns_sec_properties.py new file mode 100644 index 00000000..d279b08a --- /dev/null +++ b/instant_tests/test/test_dns_sec_properties.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_sec_properties import DnsSecProperties + +class TestDnsSecProperties(unittest.TestCase): + """DnsSecProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsSecProperties: + """Test DnsSecProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsSecProperties` + """ + model = DnsSecProperties() + if include_optional: + return DnsSecProperties( + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + type = 'dnssec' + ) + else: + return DnsSecProperties( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsSecProperties(self): + """Test DnsSecProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_server_instant_test.py b/instant_tests/test/test_dns_server_instant_test.py new file mode 100644 index 00000000..c8547161 --- /dev/null +++ b/instant_tests/test/test_dns_server_instant_test.py @@ -0,0 +1,98 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_server_instant_test import DnsServerInstantTest + +class TestDnsServerInstantTest(unittest.TestCase): + """DnsServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServerInstantTest: + """Test DnsServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServerInstantTest` + """ + model = DnsServerInstantTest() + if include_optional: + return DnsServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + bandwidth_measurements = True, + dns_servers = [ + instant_tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + agents = [ + null + ] + ) + else: + return DnsServerInstantTest( + dns_servers = [ + instant_tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsServerInstantTest(self): + """Test DnsServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_server_instant_test_request.py b/instant_tests/test/test_dns_server_instant_test_request.py new file mode 100644 index 00000000..c7ac4a74 --- /dev/null +++ b/instant_tests/test/test_dns_server_instant_test_request.py @@ -0,0 +1,87 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_server_instant_test_request import DnsServerInstantTestRequest + +class TestDnsServerInstantTestRequest(unittest.TestCase): + """DnsServerInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServerInstantTestRequest: + """Test DnsServerInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServerInstantTestRequest` + """ + model = DnsServerInstantTestRequest() + if include_optional: + return DnsServerInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + bandwidth_measurements = True, + dns_servers = [dns-example.net, 8.8.8.8], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return DnsServerInstantTestRequest( + dns_servers = [dns-example.net, 8.8.8.8], + domain = 'www.thousandeyes.com', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testDnsServerInstantTestRequest(self): + """Test DnsServerInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_server_properties.py b/instant_tests/test/test_dns_server_properties.py new file mode 100644 index 00000000..aa32eae5 --- /dev/null +++ b/instant_tests/test/test_dns_server_properties.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_server_properties import DnsServerProperties + +class TestDnsServerProperties(unittest.TestCase): + """DnsServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServerProperties: + """Test DnsServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServerProperties` + """ + model = DnsServerProperties() + if include_optional: + return DnsServerProperties( + bandwidth_measurements = True, + dns_servers = [ + instant_tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + type = 'dns-server' + ) + else: + return DnsServerProperties( + dns_servers = [ + instant_tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsServerProperties(self): + """Test DnsServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_servers_request.py b/instant_tests/test/test_dns_servers_request.py new file mode 100644 index 00000000..f8900053 --- /dev/null +++ b/instant_tests/test/test_dns_servers_request.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_servers_request import DnsServersRequest + +class TestDnsServersRequest(unittest.TestCase): + """DnsServersRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServersRequest: + """Test DnsServersRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServersRequest` + """ + model = DnsServersRequest() + if include_optional: + return DnsServersRequest( + dns_servers = ["dns-example.net","8.8.8.8"] + ) + else: + return DnsServersRequest( + ) + """ + + def testDnsServersRequest(self): + """Test DnsServersRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_trace_instant_test.py b/instant_tests/test/test_dns_trace_instant_test.py new file mode 100644 index 00000000..8329b38a --- /dev/null +++ b/instant_tests/test/test_dns_trace_instant_test.py @@ -0,0 +1,78 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_trace_instant_test import DnsTraceInstantTest + +class TestDnsTraceInstantTest(unittest.TestCase): + """DnsTraceInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsTraceInstantTest: + """Test DnsTraceInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsTraceInstantTest` + """ + model = DnsTraceInstantTest() + if include_optional: + return DnsTraceInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-trace', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + agents = [ + null + ] + ) + else: + return DnsTraceInstantTest( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsTraceInstantTest(self): + """Test DnsTraceInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_trace_instant_test_request.py b/instant_tests/test/test_dns_trace_instant_test_request.py new file mode 100644 index 00000000..ce8c1115 --- /dev/null +++ b/instant_tests/test/test_dns_trace_instant_test_request.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest + +class TestDnsTraceInstantTestRequest(unittest.TestCase): + """DnsTraceInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsTraceInstantTestRequest: + """Test DnsTraceInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsTraceInstantTestRequest` + """ + model = DnsTraceInstantTestRequest() + if include_optional: + return DnsTraceInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-trace', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return DnsTraceInstantTestRequest( + domain = 'www.thousandeyes.com', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testDnsTraceInstantTestRequest(self): + """Test DnsTraceInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_dns_trace_properties.py b/instant_tests/test/test_dns_trace_properties.py new file mode 100644 index 00000000..3da9a785 --- /dev/null +++ b/instant_tests/test/test_dns_trace_properties.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.dns_trace_properties import DnsTraceProperties + +class TestDnsTraceProperties(unittest.TestCase): + """DnsTraceProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsTraceProperties: + """Test DnsTraceProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsTraceProperties` + """ + model = DnsTraceProperties() + if include_optional: + return DnsTraceProperties( + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + type = 'dns-trace' + ) + else: + return DnsTraceProperties( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsTraceProperties(self): + """Test DnsTraceProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_error.py b/instant_tests/test/test_error.py new file mode 100644 index 00000000..7c5514e0 --- /dev/null +++ b/instant_tests/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_expand.py b/instant_tests/test/test_expand.py new file mode 100644 index 00000000..c92ed31e --- /dev/null +++ b/instant_tests/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_ftp_server_instant_test.py b/instant_tests/test/test_ftp_server_instant_test.py new file mode 100644 index 00000000..36d47d26 --- /dev/null +++ b/instant_tests/test/test_ftp_server_instant_test.py @@ -0,0 +1,96 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.ftp_server_instant_test import FtpServerInstantTest + +class TestFtpServerInstantTest(unittest.TestCase): + """FtpServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FtpServerInstantTest: + """Test FtpServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FtpServerInstantTest` + """ + model = FtpServerInstantTest() + if include_optional: + return FtpServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'ftp-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + bandwidth_measurements = True, + download_limit = 1048576, + ftp_target_time = 1000, + ftp_time_limit = 10, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + request_type = 'download', + url = 'www.thousandeyes.com', + use_active_ftp = True, + use_explicit_ftps = False, + username = 'username', + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ] + ) + else: + return FtpServerInstantTest( + password = 'password', + request_type = 'download', + url = 'www.thousandeyes.com', + username = 'username', + ) + """ + + def testFtpServerInstantTest(self): + """Test FtpServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_ftp_server_properties.py b/instant_tests/test/test_ftp_server_properties.py new file mode 100644 index 00000000..633ce78b --- /dev/null +++ b/instant_tests/test/test_ftp_server_properties.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.ftp_server_properties import FtpServerProperties + +class TestFtpServerProperties(unittest.TestCase): + """FtpServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FtpServerProperties: + """Test FtpServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FtpServerProperties` + """ + model = FtpServerProperties() + if include_optional: + return FtpServerProperties( + bandwidth_measurements = True, + download_limit = 1048576, + ftp_target_time = 1000, + ftp_time_limit = 10, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + request_type = 'download', + url = 'www.thousandeyes.com', + use_active_ftp = True, + use_explicit_ftps = False, + username = 'username', + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + type = 'ftp-server' + ) + else: + return FtpServerProperties( + password = 'password', + request_type = 'download', + url = 'www.thousandeyes.com', + username = 'username', + ) + """ + + def testFtpServerProperties(self): + """Test FtpServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_ftp_server_request_type.py b/instant_tests/test/test_ftp_server_request_type.py new file mode 100644 index 00000000..fdbf8133 --- /dev/null +++ b/instant_tests/test/test_ftp_server_request_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.ftp_server_request_type import FtpServerRequestType + +class TestFtpServerRequestType(unittest.TestCase): + """FtpServerRequestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFtpServerRequestType(self): + """Test FtpServerRequestType""" + # inst = FtpServerRequestType() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_http_server_instant_test.py b/instant_tests/test/test_http_server_instant_test.py new file mode 100644 index 00000000..f7c0e842 --- /dev/null +++ b/instant_tests/test/test_http_server_instant_test.py @@ -0,0 +1,113 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.http_server_instant_test import HttpServerInstantTest + +class TestHttpServerInstantTest(unittest.TestCase): + """HttpServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpServerInstantTest: + """Test HttpServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpServerInstantTest` + """ + model = HttpServerInstantTest() + if include_optional: + return HttpServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'http-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + headers = [header1: value1, header2: value2], + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + download_limit = 2048, + dns_override = '8.8.8.8', + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + post_body = '{ "example" : "value"}', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + ipv6_policy = 'use-agent-policy', + follow_redirects = True, + fixed_packet_rate = 50, + agents = [ + null + ] + ) + else: + return HttpServerInstantTest( + url = 'www.thousandeyes.com', + ) + """ + + def testHttpServerInstantTest(self): + """Test HttpServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests_api/test/test_http_server_instant_test_request.py b/instant_tests/test/test_http_server_instant_test_request.py similarity index 77% rename from instant_tests_api/test/test_http_server_instant_test_request.py rename to instant_tests/test/test_http_server_instant_test_request.py index 8d83f3d9..92f4fdbd 100644 --- a/instant_tests_api/test/test_http_server_instant_test_request.py +++ b/instant_tests/test/test_http_server_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from instant_tests_api.models.http_server_instant_test_request import HttpServerInstantTestRequest +from instant_tests.models.http_server_instant_test_request import HttpServerInstantTestRequest class TestHttpServerInstantTestRequest(unittest.TestCase): """HttpServerInstantTestRequest unit test stubs""" @@ -46,14 +45,11 @@ class TestHttpServerInstantTestRequest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'http-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -64,7 +60,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL -----END CERTIFICATE----- ', content_regex = '(regex)+', - headers = ["header1: value1","header2: value2"], + headers = [header1: value1, header2: value2], custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, desired_status_code = '200', download_limit = 2048, @@ -75,7 +71,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', post_body = '{ "example" : "value"}', @@ -88,16 +84,20 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, ipv6_policy = 'use-agent-policy', follow_redirects = True, - fixed_packet_rate = 50 + fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] ) else: return HttpServerInstantTestRequest( + url = 'www.thousandeyes.com', agents = [ {"agentId":"125","sourceIpAddress":"1.1.1.1"} ], - url = 'www.thousandeyes.com', ) """ diff --git a/instant_tests/test/test_http_server_properties.py b/instant_tests/test/test_http_server_properties.py new file mode 100644 index 00000000..1b0c111f --- /dev/null +++ b/instant_tests/test/test_http_server_properties.py @@ -0,0 +1,90 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.http_server_properties import HttpServerProperties + +class TestHttpServerProperties(unittest.TestCase): + """HttpServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpServerProperties: + """Test HttpServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpServerProperties` + """ + model = HttpServerProperties() + if include_optional: + return HttpServerProperties( + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + headers = ["header1: value1","header2: value2"], + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + download_limit = 2048, + dns_override = '8.8.8.8', + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + post_body = '{ "example" : "value"}', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + ipv6_policy = 'use-agent-policy', + follow_redirects = True, + fixed_packet_rate = 50, + type = 'http-server' + ) + else: + return HttpServerProperties( + url = 'www.thousandeyes.com', + ) + """ + + def testHttpServerProperties(self): + """Test HttpServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_instant_test.py b/instant_tests/test/test_instant_test.py new file mode 100644 index 00000000..044c57cb --- /dev/null +++ b/instant_tests/test/test_instant_test.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.instant_test import InstantTest + +class TestInstantTest(unittest.TestCase): + """InstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstantTest: + """Test InstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstantTest` + """ + model = InstantTest() + if include_optional: + return InstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ] + ) + else: + return InstantTest( + ) + """ + + def testInstantTest(self): + """Test InstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_instant_test_request.py b/instant_tests/test/test_instant_test_request.py new file mode 100644 index 00000000..6ae31ce8 --- /dev/null +++ b/instant_tests/test/test_instant_test_request.py @@ -0,0 +1,58 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.instant_test_request import InstantTestRequest + +class TestInstantTestRequest(unittest.TestCase): + """InstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstantTestRequest: + """Test InstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstantTestRequest` + """ + model = InstantTestRequest() + if include_optional: + return InstantTestRequest( + labels = ["9842","1283"], + shared_with_accounts = ["1234","12345"], + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return InstantTestRequest( + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testInstantTestRequest(self): + """Test InstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_instant_test_request_agents_inner.py b/instant_tests/test/test_instant_test_request_agents_inner.py new file mode 100644 index 00000000..2fba63a3 --- /dev/null +++ b/instant_tests/test/test_instant_test_request_agents_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner + +class TestInstantTestRequestAgentsInner(unittest.TestCase): + """InstantTestRequestAgentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstantTestRequestAgentsInner: + """Test InstantTestRequestAgentsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstantTestRequestAgentsInner` + """ + model = InstantTestRequestAgentsInner() + if include_optional: + return InstantTestRequestAgentsInner( + agent_id = '', + source_ip_address = '' + ) + else: + return InstantTestRequestAgentsInner( + ) + """ + + def testInstantTestRequestAgentsInner(self): + """Test InstantTestRequestAgentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_link.py b/instant_tests/test/test_link.py new file mode 100644 index 00000000..30f28cd7 --- /dev/null +++ b/instant_tests/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_page_load_instant_test.py b/instant_tests/test/test_page_load_instant_test.py new file mode 100644 index 00000000..72b8eda2 --- /dev/null +++ b/instant_tests/test/test_page_load_instant_test.py @@ -0,0 +1,116 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.page_load_instant_test import PageLoadInstantTest + +class TestPageLoadInstantTest(unittest.TestCase): + """PageLoadInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PageLoadInstantTest: + """Test PageLoadInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PageLoadInstantTest` + """ + model = PageLoadInstantTest() + if include_optional: + return PageLoadInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'page-load', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + page_load_target_time = 10, + page_load_time_limit = 5, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + agents = [ + null + ] + ) + else: + return PageLoadInstantTest( + url = 'www.thousandeyes.com', + ) + """ + + def testPageLoadInstantTest(self): + """Test PageLoadInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests_api/test/test_page_load_instant_test_request.py b/instant_tests/test/test_page_load_instant_test_request.py similarity index 78% rename from instant_tests_api/test/test_page_load_instant_test_request.py rename to instant_tests/test/test_page_load_instant_test_request.py index 2ce49b8d..677e70aa 100644 --- a/instant_tests_api/test/test_page_load_instant_test_request.py +++ b/instant_tests/test/test_page_load_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from instant_tests_api.models.page_load_instant_test_request import PageLoadInstantTestRequest +from instant_tests.models.page_load_instant_test_request import PageLoadInstantTestRequest class TestPageLoadInstantTestRequest(unittest.TestCase): """PageLoadInstantTestRequest unit test stubs""" @@ -46,14 +45,11 @@ class TestPageLoadInstantTestRequest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'page-load', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -65,6 +61,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ', content_regex = '(regex)+', custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', follow_redirects = True, http_target_time = 100, http_time_limit = 5, @@ -72,7 +69,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, page_load_target_time = 10, page_load_time_limit = 5, password = 'password', @@ -86,20 +83,24 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, block_domains = 'domain.com/', disable_screenshot = True, allow_mic_and_camera = True, allow_geolocation = True, browser_language = 'en-US', page_loading_strategy = 'normal', - fixed_packet_rate = 50 + fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] ) else: return PageLoadInstantTestRequest( + url = 'www.thousandeyes.com', agents = [ {"agentId":"125","sourceIpAddress":"1.1.1.1"} ], - url = 'www.thousandeyes.com', ) """ diff --git a/instant_tests/test/test_page_load_properties.py b/instant_tests/test/test_page_load_properties.py new file mode 100644 index 00000000..d269ba35 --- /dev/null +++ b/instant_tests/test/test_page_load_properties.py @@ -0,0 +1,93 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.page_load_properties import PageLoadProperties + +class TestPageLoadProperties(unittest.TestCase): + """PageLoadProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PageLoadProperties: + """Test PageLoadProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PageLoadProperties` + """ + model = PageLoadProperties() + if include_optional: + return PageLoadProperties( + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + page_load_target_time = 10, + page_load_time_limit = 5, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + type = 'page-load' + ) + else: + return PageLoadProperties( + url = 'www.thousandeyes.com', + ) + """ + + def testPageLoadProperties(self): + """Test PageLoadProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_server_instant_test_request.py b/instant_tests/test/test_server_instant_test_request.py new file mode 100644 index 00000000..ac9f5416 --- /dev/null +++ b/instant_tests/test/test_server_instant_test_request.py @@ -0,0 +1,93 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.server_instant_test_request import ServerInstantTestRequest + +class TestServerInstantTestRequest(unittest.TestCase): + """ServerInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServerInstantTestRequest: + """Test ServerInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ServerInstantTestRequest` + """ + model = ServerInstantTestRequest() + if include_optional: + return ServerInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'ftp-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + bandwidth_measurements = True, + download_limit = 1048576, + ftp_target_time = 1000, + ftp_time_limit = 10, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + request_type = 'download', + url = 'www.thousandeyes.com', + use_active_ftp = True, + use_explicit_ftps = False, + username = 'username', + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return ServerInstantTestRequest( + password = 'password', + request_type = 'download', + url = 'www.thousandeyes.com', + username = 'username', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testServerInstantTestRequest(self): + """Test ServerInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_simple_agent.py b/instant_tests/test/test_simple_agent.py new file mode 100644 index 00000000..0a51c08c --- /dev/null +++ b/instant_tests/test/test_simple_agent.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.simple_agent import SimpleAgent + +class TestSimpleAgent(unittest.TestCase): + """SimpleAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleAgent: + """Test SimpleAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleAgent` + """ + model = SimpleAgent() + if include_optional: + return SimpleAgent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True + ) + else: + return SimpleAgent( + ) + """ + + def testSimpleAgent(self): + """Test SimpleAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_sip_server_instant_test.py b/instant_tests/test/test_sip_server_instant_test.py new file mode 100644 index 00000000..33984b7e --- /dev/null +++ b/instant_tests/test/test_sip_server_instant_test.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.sip_server_instant_test import SipServerInstantTest + +class TestSipServerInstantTest(unittest.TestCase): + """SipServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTest: + """Test SipServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTest` + """ + model = SipServerInstantTest() + if include_optional: + return SipServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ] + ) + else: + return SipServerInstantTest( + ) + """ + + def testSipServerInstantTest(self): + """Test SipServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_sip_server_instant_test_request.py b/instant_tests/test/test_sip_server_instant_test_request.py new file mode 100644 index 00000000..23455bb1 --- /dev/null +++ b/instant_tests/test/test_sip_server_instant_test_request.py @@ -0,0 +1,96 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.sip_server_instant_test_request import SipServerInstantTestRequest + +class TestSipServerInstantTestRequest(unittest.TestCase): + """SipServerInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTestRequest: + """Test SipServerInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTestRequest` + """ + model = SipServerInstantTestRequest() + if include_optional: + return SipServerInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + target_sip_credentials = instant_tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ) + ) + else: + return SipServerInstantTestRequest( + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + target_sip_credentials = instant_tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + ) + """ + + def testSipServerInstantTestRequest(self): + """Test SipServerInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_sip_server_instant_test_request1.py b/instant_tests/test/test_sip_server_instant_test_request1.py new file mode 100644 index 00000000..ab9ee696 --- /dev/null +++ b/instant_tests/test/test_sip_server_instant_test_request1.py @@ -0,0 +1,99 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.sip_server_instant_test_request1 import SipServerInstantTestRequest1 + +class TestSipServerInstantTestRequest1(unittest.TestCase): + """SipServerInstantTestRequest1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTestRequest1: + """Test SipServerInstantTestRequest1 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTestRequest1` + """ + model = SipServerInstantTestRequest1() + if include_optional: + return SipServerInstantTestRequest1( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ], + target_sip_credentials = instant_tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ) + ) + else: + return SipServerInstantTestRequest1( + target_sip_credentials = instant_tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + ) + """ + + def testSipServerInstantTestRequest1(self): + """Test SipServerInstantTestRequest1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_sip_server_instant_test_response.py b/instant_tests/test/test_sip_server_instant_test_response.py new file mode 100644 index 00000000..d3119ae4 --- /dev/null +++ b/instant_tests/test/test_sip_server_instant_test_response.py @@ -0,0 +1,92 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.sip_server_instant_test_response import SipServerInstantTestResponse + +class TestSipServerInstantTestResponse(unittest.TestCase): + """SipServerInstantTestResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTestResponse: + """Test SipServerInstantTestResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTestResponse` + """ + model = SipServerInstantTestResponse() + if include_optional: + return SipServerInstantTestResponse( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ], + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username' + ) + else: + return SipServerInstantTestResponse( + port = 1, + ) + """ + + def testSipServerInstantTestResponse(self): + """Test SipServerInstantTestResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_sip_server_properties.py b/instant_tests/test/test_sip_server_properties.py new file mode 100644 index 00000000..e8dae946 --- /dev/null +++ b/instant_tests/test/test_sip_server_properties.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.sip_server_properties import SipServerProperties + +class TestSipServerProperties(unittest.TestCase): + """SipServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerProperties: + """Test SipServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerProperties` + """ + model = SipServerProperties() + if include_optional: + return SipServerProperties( + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + type = 'sip-server' + ) + else: + return SipServerProperties( + ) + """ + + def testSipServerProperties(self): + """Test SipServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_sip_test_protocol.py b/instant_tests/test/test_sip_test_protocol.py new file mode 100644 index 00000000..7d07747b --- /dev/null +++ b/instant_tests/test/test_sip_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.sip_test_protocol import SipTestProtocol + +class TestSipTestProtocol(unittest.TestCase): + """SipTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSipTestProtocol(self): + """Test SipTestProtocol""" + # inst = SipTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_auth_type.py b/instant_tests/test/test_test_auth_type.py new file mode 100644 index 00000000..0bf1aa87 --- /dev/null +++ b/instant_tests/test/test_test_auth_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_auth_type import TestAuthType + +class TestTestAuthType(unittest.TestCase): + """TestAuthType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestAuthType(self): + """Test TestAuthType""" + # inst = TestAuthType() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_custom_headers.py b/instant_tests/test/test_test_custom_headers.py new file mode 100644 index 00000000..35f71eef --- /dev/null +++ b/instant_tests/test/test_test_custom_headers.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_custom_headers import TestCustomHeaders + +class TestTestCustomHeaders(unittest.TestCase): + """TestCustomHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestCustomHeaders: + """Test TestCustomHeaders + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestCustomHeaders` + """ + model = TestCustomHeaders() + if include_optional: + return TestCustomHeaders( + root = { + 'key' : '' + }, + domains = { + 'key' : { + 'key' : '' + } + }, + all = { + 'key' : '' + } + ) + else: + return TestCustomHeaders( + ) + """ + + def testTestCustomHeaders(self): + """Test TestCustomHeaders""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_direction.py b/instant_tests/test/test_test_direction.py new file mode 100644 index 00000000..72095082 --- /dev/null +++ b/instant_tests/test/test_test_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_direction import TestDirection + +class TestTestDirection(unittest.TestCase): + """TestDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDirection(self): + """Test TestDirection""" + # inst = TestDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_dns_server.py b/instant_tests/test/test_test_dns_server.py new file mode 100644 index 00000000..e093edbe --- /dev/null +++ b/instant_tests/test/test_test_dns_server.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_dns_server import TestDnsServer + +class TestTestDnsServer(unittest.TestCase): + """TestDnsServer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestDnsServer: + """Test TestDnsServer + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestDnsServer` + """ + model = TestDnsServer() + if include_optional: + return TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net' + ) + else: + return TestDnsServer( + ) + """ + + def testTestDnsServer(self): + """Test TestDnsServer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_dns_transport_protocol.py b/instant_tests/test/test_test_dns_transport_protocol.py new file mode 100644 index 00000000..dc89e06f --- /dev/null +++ b/instant_tests/test/test_test_dns_transport_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol + +class TestTestDnsTransportProtocol(unittest.TestCase): + """TestDnsTransportProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDnsTransportProtocol(self): + """Test TestDnsTransportProtocol""" + # inst = TestDnsTransportProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_dscp_id.py b/instant_tests/test/test_test_dscp_id.py new file mode 100644 index 00000000..3f1dbf3a --- /dev/null +++ b/instant_tests/test/test_test_dscp_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_dscp_id import TestDscpId + +class TestTestDscpId(unittest.TestCase): + """TestDscpId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDscpId(self): + """Test TestDscpId""" + # inst = TestDscpId() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_ipv6_policy.py b/instant_tests/test/test_test_ipv6_policy.py new file mode 100644 index 00000000..12ed6df6 --- /dev/null +++ b/instant_tests/test/test_test_ipv6_policy.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_ipv6_policy import TestIpv6Policy + +class TestTestIpv6Policy(unittest.TestCase): + """TestIpv6Policy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestIpv6Policy(self): + """Test TestIpv6Policy""" + # inst = TestIpv6Policy() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_labels_inner.py b/instant_tests/test/test_test_labels_inner.py new file mode 100644 index 00000000..d2fc1af0 --- /dev/null +++ b/instant_tests/test/test_test_labels_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_labels_inner import TestLabelsInner + +class TestTestLabelsInner(unittest.TestCase): + """TestLabelsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestLabelsInner: + """Test TestLabelsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestLabelsInner` + """ + model = TestLabelsInner() + if include_optional: + return TestLabelsInner( + label_id = '', + name = '', + is_builtin = True + ) + else: + return TestLabelsInner( + ) + """ + + def testTestLabelsInner(self): + """Test TestLabelsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_page_loading_strategy.py b/instant_tests/test/test_test_page_loading_strategy.py new file mode 100644 index 00000000..c8d07b04 --- /dev/null +++ b/instant_tests/test/test_test_page_loading_strategy.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_page_loading_strategy import TestPageLoadingStrategy + +class TestTestPageLoadingStrategy(unittest.TestCase): + """TestPageLoadingStrategy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestPageLoadingStrategy(self): + """Test TestPageLoadingStrategy""" + # inst = TestPageLoadingStrategy() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_path_trace_mode.py b/instant_tests/test/test_test_path_trace_mode.py new file mode 100644 index 00000000..939b5dff --- /dev/null +++ b/instant_tests/test/test_test_path_trace_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_path_trace_mode import TestPathTraceMode + +class TestTestPathTraceMode(unittest.TestCase): + """TestPathTraceMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestPathTraceMode(self): + """Test TestPathTraceMode""" + # inst = TestPathTraceMode() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_probe_mode.py b/instant_tests/test/test_test_probe_mode.py new file mode 100644 index 00000000..071c1998 --- /dev/null +++ b/instant_tests/test/test_test_probe_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_probe_mode import TestProbeMode + +class TestTestProbeMode(unittest.TestCase): + """TestProbeMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProbeMode(self): + """Test TestProbeMode""" + # inst = TestProbeMode() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_protocol.py b/instant_tests/test/test_test_protocol.py new file mode 100644 index 00000000..429fd9a0 --- /dev/null +++ b/instant_tests/test/test_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_protocol import TestProtocol + +class TestTestProtocol(unittest.TestCase): + """TestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProtocol(self): + """Test TestProtocol""" + # inst = TestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_shared_accounts_inner.py b/instant_tests/test/test_test_shared_accounts_inner.py new file mode 100644 index 00000000..c5bc1a94 --- /dev/null +++ b/instant_tests/test/test_test_shared_accounts_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_shared_accounts_inner import TestSharedAccountsInner + +class TestTestSharedAccountsInner(unittest.TestCase): + """TestSharedAccountsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestSharedAccountsInner: + """Test TestSharedAccountsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestSharedAccountsInner` + """ + model = TestSharedAccountsInner() + if include_optional: + return TestSharedAccountsInner( + aid = '1234', + name = 'Account name' + ) + else: + return TestSharedAccountsInner( + ) + """ + + def testTestSharedAccountsInner(self): + """Test TestSharedAccountsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_sip_credentials.py b/instant_tests/test/test_test_sip_credentials.py new file mode 100644 index 00000000..786d50e8 --- /dev/null +++ b/instant_tests/test/test_test_sip_credentials.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_sip_credentials import TestSipCredentials + +class TestTestSipCredentials(unittest.TestCase): + """TestSipCredentials unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestSipCredentials: + """Test TestSipCredentials + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestSipCredentials` + """ + model = TestSipCredentials() + if include_optional: + return TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username' + ) + else: + return TestSipCredentials( + port = 1, + ) + """ + + def testTestSipCredentials(self): + """Test TestSipCredentials""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_ssl_version_id.py b/instant_tests/test/test_test_ssl_version_id.py new file mode 100644 index 00000000..6d461769 --- /dev/null +++ b/instant_tests/test/test_test_ssl_version_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_ssl_version_id import TestSslVersionId + +class TestTestSslVersionId(unittest.TestCase): + """TestSslVersionId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestSslVersionId(self): + """Test TestSslVersionId""" + # inst = TestSslVersionId() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_test_type.py b/instant_tests/test/test_test_type.py new file mode 100644 index 00000000..d22896c2 --- /dev/null +++ b/instant_tests/test/test_test_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.test_type import TestType + +class TestTestType(unittest.TestCase): + """TestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestType(self): + """Test TestType""" + # inst = TestType() + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_unauthorized_error.py b/instant_tests/test/test_unauthorized_error.py new file mode 100644 index 00000000..acb3f4c1 --- /dev/null +++ b/instant_tests/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_unexpanded_instant_test.py b/instant_tests/test/test_unexpanded_instant_test.py new file mode 100644 index 00000000..b9bf32ce --- /dev/null +++ b/instant_tests/test/test_unexpanded_instant_test.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.unexpanded_instant_test import UnexpandedInstantTest + +class TestUnexpandedInstantTest(unittest.TestCase): + """UnexpandedInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTest: + """Test UnexpandedInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTest` + """ + model = UnexpandedInstantTest() + if include_optional: + return UnexpandedInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) + ) + else: + return UnexpandedInstantTest( + ) + """ + + def testUnexpandedInstantTest(self): + """Test UnexpandedInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_unexpanded_instant_test_links.py b/instant_tests/test/test_unexpanded_instant_test_links.py new file mode 100644 index 00000000..7811c112 --- /dev/null +++ b/instant_tests/test/test_unexpanded_instant_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks + +class TestUnexpandedInstantTestLinks(unittest.TestCase): + """UnexpandedInstantTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: + """Test UnexpandedInstantTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTestLinks` + """ + model = UnexpandedInstantTestLinks() + if include_optional: + return UnexpandedInstantTestLinks( + var_self = None, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}] + ) + else: + return UnexpandedInstantTestLinks( + ) + """ + + def testUnexpandedInstantTestLinks(self): + """Test UnexpandedInstantTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_unexpanded_instant_test_links_self.py b/instant_tests/test/test_unexpanded_instant_test_links_self.py new file mode 100644 index 00000000..729fd087 --- /dev/null +++ b/instant_tests/test/test_unexpanded_instant_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf + +class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): + """UnexpandedInstantTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: + """Test UnexpandedInstantTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` + """ + model = UnexpandedInstantTestLinksSelf() + if include_optional: + return UnexpandedInstantTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return UnexpandedInstantTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testUnexpandedInstantTestLinksSelf(self): + """Test UnexpandedInstantTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_validation_error.py b/instant_tests/test/test_validation_error.py new file mode 100644 index 00000000..2f897615 --- /dev/null +++ b/instant_tests/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + instant_tests.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_validation_error_all_of_errors.py b/instant_tests/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..05bbb7b4 --- /dev/null +++ b/instant_tests/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_voice_instant_test.py b/instant_tests/test/test_voice_instant_test.py new file mode 100644 index 00000000..3757c9ee --- /dev/null +++ b/instant_tests/test/test_voice_instant_test.py @@ -0,0 +1,84 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.voice_instant_test import VoiceInstantTest + +class TestVoiceInstantTest(unittest.TestCase): + """VoiceInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceInstantTest: + """Test VoiceInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceInstantTest` + """ + model = VoiceInstantTest() + if include_optional: + return VoiceInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'voice', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + agents = [ + null + ] + ) + else: + return VoiceInstantTest( + target_agent_id = '281474976710706', + ) + """ + + def testVoiceInstantTest(self): + """Test VoiceInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_voice_instant_test_request.py b/instant_tests/test/test_voice_instant_test_request.py new file mode 100644 index 00000000..c07dd94a --- /dev/null +++ b/instant_tests/test/test_voice_instant_test_request.py @@ -0,0 +1,81 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.voice_instant_test_request import VoiceInstantTestRequest + +class TestVoiceInstantTestRequest(unittest.TestCase): + """VoiceInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceInstantTestRequest: + """Test VoiceInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceInstantTestRequest` + """ + model = VoiceInstantTestRequest() + if include_optional: + return VoiceInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'voice', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] + ) + else: + return VoiceInstantTestRequest( + target_agent_id = '281474976710706', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + ) + """ + + def testVoiceInstantTestRequest(self): + """Test VoiceInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_voice_properties.py b/instant_tests/test/test_voice_properties.py new file mode 100644 index 00000000..ef8a0f44 --- /dev/null +++ b/instant_tests/test/test_voice_properties.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.voice_properties import VoiceProperties + +class TestVoiceProperties(unittest.TestCase): + """VoiceProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceProperties: + """Test VoiceProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceProperties` + """ + model = VoiceProperties() + if include_optional: + return VoiceProperties( + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + type = 'voice' + ) + else: + return VoiceProperties( + target_agent_id = '281474976710706', + ) + """ + + def testVoiceProperties(self): + """Test VoiceProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests/test/test_web_transaction_instant_test.py b/instant_tests/test/test_web_transaction_instant_test.py new file mode 100644 index 00000000..29e39810 --- /dev/null +++ b/instant_tests/test/test_web_transaction_instant_test.py @@ -0,0 +1,119 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.web_transaction_instant_test import WebTransactionInstantTest + +class TestWebTransactionInstantTest(unittest.TestCase): + """WebTransactionInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebTransactionInstantTest: + """Test WebTransactionInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebTransactionInstantTest` + """ + model = WebTransactionInstantTest() + if include_optional: + return WebTransactionInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'web-transactions', + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + instant_tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + target_time = 1, + time_limit = 5, + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + agents = [ + null + ], + credentials = ["3247","1051"] + ) + else: + return WebTransactionInstantTest( + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + ) + """ + + def testWebTransactionInstantTest(self): + """Test WebTransactionInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests_api/test/test_web_transaction_instant_test_request.py b/instant_tests/test/test_web_transaction_instant_test_request.py similarity index 79% rename from instant_tests_api/test/test_web_transaction_instant_test_request.py rename to instant_tests/test/test_web_transaction_instant_test_request.py index acbf1d4f..b05f5c58 100644 --- a/instant_tests_api/test/test_web_transaction_instant_test_request.py +++ b/instant_tests/test/test_web_transaction_instant_test_request.py @@ -3,9 +3,9 @@ """ Instant Tests API - ### Overview 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 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from instant_tests_api.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest +from instant_tests.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest class TestWebTransactionInstantTestRequest(unittest.TestCase): """WebTransactionInstantTestRequest unit test stubs""" @@ -46,14 +45,11 @@ class TestWebTransactionInstantTestRequest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'web-transactions', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = instant_tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -64,7 +60,6 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL -----END CERTIFICATE----- ', content_regex = '(regex)+', - credentials = [3247, 1051], custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, desired_status_code = '200', follow_redirects = True, @@ -74,7 +69,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', probe_mode = 'auto', @@ -89,21 +84,26 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, block_domains = 'domain.com/', disable_screenshot = True, allow_mic_and_camera = True, allow_geolocation = True, browser_language = 'en-US', page_loading_strategy = 'normal', - fixed_packet_rate = 50 - ) - else: - return WebTransactionInstantTestRequest( + fixed_packet_rate = 50, agents = [ {"agentId":"125","sourceIpAddress":"1.1.1.1"} ], + credentials = ["3247","1051"] + ) + else: + return WebTransactionInstantTestRequest( transaction_script = 'if (true) { return true; }', url = 'www.thousandeyes.com', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], ) """ diff --git a/instant_tests/test/test_web_transaction_properties.py b/instant_tests/test/test_web_transaction_properties.py new file mode 100644 index 00000000..fcd5ed5d --- /dev/null +++ b/instant_tests/test/test_web_transaction_properties.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from instant_tests.models.web_transaction_properties import WebTransactionProperties + +class TestWebTransactionProperties(unittest.TestCase): + """WebTransactionProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebTransactionProperties: + """Test WebTransactionProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebTransactionProperties` + """ + model = WebTransactionProperties() + if include_optional: + return WebTransactionProperties( + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + target_time = 1, + time_limit = 5, + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + type = 'web-transactions' + ) + else: + return WebTransactionProperties( + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + ) + """ + + def testWebTransactionProperties(self): + """Test WebTransactionProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/instant_tests_api/.github/workflows/python.yml b/instant_tests_api/.github/workflows/python.yml deleted file mode 100644 index c5de856c..00000000 --- a/instant_tests_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: instant_tests_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/instant_tests_api/.gitlab-ci.yml b/instant_tests_api/.gitlab-ci.yml deleted file mode 100644 index 735f324a..00000000 --- a/instant_tests_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=instant_tests_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/instant_tests_api/.openapi-generator/FILES b/instant_tests_api/.openapi-generator/FILES deleted file mode 100644 index ca92d8ef..00000000 --- a/instant_tests_api/.openapi-generator/FILES +++ /dev/null @@ -1,239 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/Agent.md -docs/AgentBase.md -docs/AgentToAgentApi.md -docs/AgentToAgentInstantTest.md -docs/AgentToAgentInstantTestRequest.md -docs/AgentToAgentTestProtocol.md -docs/AgentToServerApi.md -docs/AgentToServerInstantTest.md -docs/AgentToServerInstantTestRequest.md -docs/CloudEnterpriseAgentType.md -docs/DNSSecurityApi.md -docs/DNSServerApi.md -docs/DNSTraceApi.md -docs/DnsQueryClass.md -docs/DnsSecInstantTest.md -docs/DnsSecInstantTestRequest.md -docs/DnsServerInstantTest.md -docs/DnsServerInstantTestRequest.md -docs/DnsServersRequest.md -docs/DnsTraceInstantTest.md -docs/DnsTraceInstantTestRequest.md -docs/Error.md -docs/Expand.md -docs/FTPServerApi.md -docs/FtpServerInstantTest.md -docs/FtpServerRequestType.md -docs/HTTPPageLoadApi.md -docs/HTTPServerApi.md -docs/HttpServerInstantTest.md -docs/HttpServerInstantTestRequest.md -docs/InstantTest.md -docs/InstantTestRequest.md -docs/InstantTestRequestAgentsInner.md -docs/Link.md -docs/MapItem.md -docs/PageLoadInstantTest.md -docs/PageLoadInstantTestRequest.md -docs/RunApi.md -docs/SIPServerApi.md -docs/ServerInstantTestRequest.md -docs/SipServerInstantTest.md -docs/SipServerInstantTestRequest.md -docs/SipTestProtocol.md -docs/TestAuthType.md -docs/TestCustomHeaders.md -docs/TestCustomHeadersAll.md -docs/TestCustomHeadersRoot.md -docs/TestDirection.md -docs/TestDnsServer.md -docs/TestDnsTransportProtocol.md -docs/TestDscpId.md -docs/TestIpv6Policy.md -docs/TestLabelsInner.md -docs/TestPageLoadingStrategy.md -docs/TestPathTraceMode.md -docs/TestProbeMode.md -docs/TestProtocol.md -docs/TestSharedAccountsInner.md -docs/TestSipCredentials.md -docs/TestSslVersionId.md -docs/TestType.md -docs/UnauthorizedError.md -docs/UnexpandedInstantTest.md -docs/UnexpandedInstantTestLinks.md -docs/UnexpandedInstantTestLinksSelf.md -docs/UnexpandedInstantTestLinksTestResults.md -docs/VoiceApi.md -docs/VoiceInstantTest.md -docs/VoiceInstantTestRequest.md -docs/WebTransactionApi.md -docs/WebTransactionInstantTest.md -docs/WebTransactionInstantTestRequest.md -git_push.sh -instant_tests_api/__init__.py -instant_tests_api/api/__init__.py -instant_tests_api/api/agent_to_agent_api.py -instant_tests_api/api/agent_to_server_api.py -instant_tests_api/api/dns_security_api.py -instant_tests_api/api/dns_server_api.py -instant_tests_api/api/dns_trace_api.py -instant_tests_api/api/ftp_server_api.py -instant_tests_api/api/http_page_load_api.py -instant_tests_api/api/http_server_api.py -instant_tests_api/api/run_api.py -instant_tests_api/api/sip_server_api.py -instant_tests_api/api/voice_api.py -instant_tests_api/api/web_transaction_api.py -instant_tests_api/api_client.py -instant_tests_api/api_response.py -instant_tests_api/configuration.py -instant_tests_api/exceptions.py -instant_tests_api/models/__init__.py -instant_tests_api/models/agent.py -instant_tests_api/models/agent_base.py -instant_tests_api/models/agent_to_agent_instant_test.py -instant_tests_api/models/agent_to_agent_instant_test_request.py -instant_tests_api/models/agent_to_agent_test_protocol.py -instant_tests_api/models/agent_to_server_instant_test.py -instant_tests_api/models/agent_to_server_instant_test_request.py -instant_tests_api/models/cloud_enterprise_agent_type.py -instant_tests_api/models/dns_query_class.py -instant_tests_api/models/dns_sec_instant_test.py -instant_tests_api/models/dns_sec_instant_test_request.py -instant_tests_api/models/dns_server_instant_test.py -instant_tests_api/models/dns_server_instant_test_request.py -instant_tests_api/models/dns_servers_request.py -instant_tests_api/models/dns_trace_instant_test.py -instant_tests_api/models/dns_trace_instant_test_request.py -instant_tests_api/models/error.py -instant_tests_api/models/expand.py -instant_tests_api/models/ftp_server_instant_test.py -instant_tests_api/models/ftp_server_request_type.py -instant_tests_api/models/http_server_instant_test.py -instant_tests_api/models/http_server_instant_test_request.py -instant_tests_api/models/instant_test.py -instant_tests_api/models/instant_test_request.py -instant_tests_api/models/instant_test_request_agents_inner.py -instant_tests_api/models/link.py -instant_tests_api/models/map_item.py -instant_tests_api/models/page_load_instant_test.py -instant_tests_api/models/page_load_instant_test_request.py -instant_tests_api/models/server_instant_test_request.py -instant_tests_api/models/sip_server_instant_test.py -instant_tests_api/models/sip_server_instant_test_request.py -instant_tests_api/models/sip_test_protocol.py -instant_tests_api/models/test_auth_type.py -instant_tests_api/models/test_custom_headers.py -instant_tests_api/models/test_custom_headers_all.py -instant_tests_api/models/test_custom_headers_root.py -instant_tests_api/models/test_direction.py -instant_tests_api/models/test_dns_server.py -instant_tests_api/models/test_dns_transport_protocol.py -instant_tests_api/models/test_dscp_id.py -instant_tests_api/models/test_ipv6_policy.py -instant_tests_api/models/test_labels_inner.py -instant_tests_api/models/test_page_loading_strategy.py -instant_tests_api/models/test_path_trace_mode.py -instant_tests_api/models/test_probe_mode.py -instant_tests_api/models/test_protocol.py -instant_tests_api/models/test_shared_accounts_inner.py -instant_tests_api/models/test_sip_credentials.py -instant_tests_api/models/test_ssl_version_id.py -instant_tests_api/models/test_type.py -instant_tests_api/models/unauthorized_error.py -instant_tests_api/models/unexpanded_instant_test.py -instant_tests_api/models/unexpanded_instant_test_links.py -instant_tests_api/models/unexpanded_instant_test_links_self.py -instant_tests_api/models/unexpanded_instant_test_links_test_results.py -instant_tests_api/models/voice_instant_test.py -instant_tests_api/models/voice_instant_test_request.py -instant_tests_api/models/web_transaction_instant_test.py -instant_tests_api/models/web_transaction_instant_test_request.py -instant_tests_api/py.typed -instant_tests_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_agent.py -test/test_agent_base.py -test/test_agent_to_agent_api.py -test/test_agent_to_agent_instant_test.py -test/test_agent_to_agent_instant_test_request.py -test/test_agent_to_agent_test_protocol.py -test/test_agent_to_server_api.py -test/test_agent_to_server_instant_test.py -test/test_agent_to_server_instant_test_request.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_security_api.py -test/test_dns_server_api.py -test/test_dns_server_instant_test.py -test/test_dns_server_instant_test_request.py -test/test_dns_servers_request.py -test/test_dns_trace_api.py -test/test_dns_trace_instant_test.py -test/test_dns_trace_instant_test_request.py -test/test_error.py -test/test_expand.py -test/test_ftp_server_api.py -test/test_ftp_server_instant_test.py -test/test_ftp_server_request_type.py -test/test_http_page_load_api.py -test/test_http_server_api.py -test/test_http_server_instant_test.py -test/test_http_server_instant_test_request.py -test/test_instant_test.py -test/test_instant_test_request.py -test/test_instant_test_request_agents_inner.py -test/test_link.py -test/test_map_item.py -test/test_page_load_instant_test.py -test/test_page_load_instant_test_request.py -test/test_run_api.py -test/test_server_instant_test_request.py -test/test_sip_server_api.py -test/test_sip_server_instant_test.py -test/test_sip_server_instant_test_request.py -test/test_sip_test_protocol.py -test/test_test_auth_type.py -test/test_test_custom_headers.py -test/test_test_custom_headers_all.py -test/test_test_custom_headers_root.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_labels_inner.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_shared_accounts_inner.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_unexpanded_instant_test_links.py -test/test_unexpanded_instant_test_links_self.py -test/test_unexpanded_instant_test_links_test_results.py -test/test_voice_api.py -test/test_voice_instant_test.py -test/test_voice_instant_test_request.py -test/test_web_transaction_api.py -test/test_web_transaction_instant_test.py -test/test_web_transaction_instant_test_request.py -tox.ini diff --git a/instant_tests_api/.openapi-generator/VERSION b/instant_tests_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/instant_tests_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/instant_tests_api/.travis.yml b/instant_tests_api/.travis.yml deleted file mode 100644 index 41362426..00000000 --- a/instant_tests_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=instant_tests_api diff --git a/instant_tests_api/README.md b/instant_tests_api/README.md deleted file mode 100644 index 1197eff8..00000000 --- a/instant_tests_api/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# instant-tests-api - -### Overview -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. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import instant_tests_api -``` - -### 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 instant_tests_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import instant_tests_api -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.AgentToAgentApi(api_client) - agent_to_agent_instant_test_request = instant_tests_api.AgentToAgentInstantTestRequest() # AgentToAgentInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except ApiException as e: - print("Exception when calling AgentToAgentApi->post_instant_test_agent_to_agent: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*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 - - -## Documentation For Models - - - [Agent](docs/Agent.md) - - [AgentBase](docs/AgentBase.md) - - [AgentToAgentInstantTest](docs/AgentToAgentInstantTest.md) - - [AgentToAgentInstantTestRequest](docs/AgentToAgentInstantTestRequest.md) - - [AgentToAgentTestProtocol](docs/AgentToAgentTestProtocol.md) - - [AgentToServerInstantTest](docs/AgentToServerInstantTest.md) - - [AgentToServerInstantTestRequest](docs/AgentToServerInstantTestRequest.md) - - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) - - [DnsQueryClass](docs/DnsQueryClass.md) - - [DnsSecInstantTest](docs/DnsSecInstantTest.md) - - [DnsSecInstantTestRequest](docs/DnsSecInstantTestRequest.md) - - [DnsServerInstantTest](docs/DnsServerInstantTest.md) - - [DnsServerInstantTestRequest](docs/DnsServerInstantTestRequest.md) - - [DnsServersRequest](docs/DnsServersRequest.md) - - [DnsTraceInstantTest](docs/DnsTraceInstantTest.md) - - [DnsTraceInstantTestRequest](docs/DnsTraceInstantTestRequest.md) - - [Error](docs/Error.md) - - [Expand](docs/Expand.md) - - [FtpServerInstantTest](docs/FtpServerInstantTest.md) - - [FtpServerRequestType](docs/FtpServerRequestType.md) - - [HttpServerInstantTest](docs/HttpServerInstantTest.md) - - [HttpServerInstantTestRequest](docs/HttpServerInstantTestRequest.md) - - [InstantTest](docs/InstantTest.md) - - [InstantTestRequest](docs/InstantTestRequest.md) - - [InstantTestRequestAgentsInner](docs/InstantTestRequestAgentsInner.md) - - [Link](docs/Link.md) - - [MapItem](docs/MapItem.md) - - [PageLoadInstantTest](docs/PageLoadInstantTest.md) - - [PageLoadInstantTestRequest](docs/PageLoadInstantTestRequest.md) - - [ServerInstantTestRequest](docs/ServerInstantTestRequest.md) - - [SipServerInstantTest](docs/SipServerInstantTest.md) - - [SipServerInstantTestRequest](docs/SipServerInstantTestRequest.md) - - [SipTestProtocol](docs/SipTestProtocol.md) - - [TestAuthType](docs/TestAuthType.md) - - [TestCustomHeaders](docs/TestCustomHeaders.md) - - [TestCustomHeadersAll](docs/TestCustomHeadersAll.md) - - [TestCustomHeadersRoot](docs/TestCustomHeadersRoot.md) - - [TestDirection](docs/TestDirection.md) - - [TestDnsServer](docs/TestDnsServer.md) - - [TestDnsTransportProtocol](docs/TestDnsTransportProtocol.md) - - [TestDscpId](docs/TestDscpId.md) - - [TestIpv6Policy](docs/TestIpv6Policy.md) - - [TestLabelsInner](docs/TestLabelsInner.md) - - [TestPageLoadingStrategy](docs/TestPageLoadingStrategy.md) - - [TestPathTraceMode](docs/TestPathTraceMode.md) - - [TestProbeMode](docs/TestProbeMode.md) - - [TestProtocol](docs/TestProtocol.md) - - [TestSharedAccountsInner](docs/TestSharedAccountsInner.md) - - [TestSipCredentials](docs/TestSipCredentials.md) - - [TestSslVersionId](docs/TestSslVersionId.md) - - [TestType](docs/TestType.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) - - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) - - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) - - [UnexpandedInstantTestLinksTestResults](docs/UnexpandedInstantTestLinksTestResults.md) - - [VoiceInstantTest](docs/VoiceInstantTest.md) - - [VoiceInstantTestRequest](docs/VoiceInstantTestRequest.md) - - [WebTransactionInstantTest](docs/WebTransactionInstantTest.md) - - [WebTransactionInstantTestRequest](docs/WebTransactionInstantTestRequest.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/instant_tests_api/docs/Agent.md b/instant_tests_api/docs/Agent.md deleted file mode 100644 index fb043370..00000000 --- a/instant_tests_api/docs/Agent.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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 instant_tests_api.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_form_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/instant_tests_api/docs/AgentBase.md b/instant_tests_api/docs/AgentBase.md deleted file mode 100644 index 147a42cf..00000000 --- a/instant_tests_api/docs/AgentBase.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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 instant_tests_api.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_form_dict = agent_base.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/instant_tests_api/docs/AgentToAgentApi.md b/instant_tests_api/docs/AgentToAgentApi.md deleted file mode 100644 index e99852b0..00000000 --- a/instant_tests_api/docs/AgentToAgentApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.AgentToAgentApi - -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 - - -# **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 - -Creates and runs a new agent-to-agent instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest -from instant_tests_api.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest -from instant_tests_api.models.expand import Expand -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.AgentToAgentApi(api_client) - agent_to_agent_instant_test_request = instant_tests_api.AgentToAgentInstantTestRequest() # AgentToAgentInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToAgentApi->post_instant_test_agent_to_agent: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **agent_to_agent_instant_test_request** | [**AgentToAgentInstantTestRequest**](AgentToAgentInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**AgentToAgentInstantTest**](AgentToAgentInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/AgentToAgentInstantTest.md b/instant_tests_api/docs/AgentToAgentInstantTest.md deleted file mode 100644 index 4ce50c47..00000000 --- a/instant_tests_api/docs/AgentToAgentInstantTest.md +++ /dev/null @@ -1,54 +0,0 @@ -# AgentToAgentInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**mss** | **int** | Maximum segment size, in bytes. | [optional] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [optional] [default to 49153] -**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] -**target_agent_id** | **str** | `agentId` of the target agent for the test. | -**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] -**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] -**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from instant_tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentToAgentInstantTest from a JSON string -agent_to_agent_instant_test_instance = AgentToAgentInstantTest.from_json(json) -# print the JSON string representation of the object -print AgentToAgentInstantTest.to_json() - -# convert the object into a dict -agent_to_agent_instant_test_dict = agent_to_agent_instant_test_instance.to_dict() -# create an instance of AgentToAgentInstantTest from a dict -agent_to_agent_instant_test_form_dict = agent_to_agent_instant_test.from_dict(agent_to_agent_instant_test_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/instant_tests_api/docs/AgentToAgentTestProtocol.md b/instant_tests_api/docs/AgentToAgentTestProtocol.md deleted file mode 100644 index ee2d3a70..00000000 --- a/instant_tests_api/docs/AgentToAgentTestProtocol.md +++ /dev/null @@ -1,10 +0,0 @@ -# AgentToAgentTestProtocol - - -## 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/instant_tests_api/docs/AgentToServerApi.md b/instant_tests_api/docs/AgentToServerApi.md deleted file mode 100644 index f254224f..00000000 --- a/instant_tests_api/docs/AgentToServerApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.AgentToServerApi - -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 - - -# **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 - -Creates and runs a new agent-to-server instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest -from instant_tests_api.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest -from instant_tests_api.models.expand import Expand -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.AgentToServerApi(api_client) - agent_to_server_instant_test_request = instant_tests_api.AgentToServerInstantTestRequest() # AgentToServerInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToServerApi->post_instant_agent_to_server: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **agent_to_server_instant_test_request** | [**AgentToServerInstantTestRequest**](AgentToServerInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**AgentToServerInstantTest**](AgentToServerInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/AgentToServerInstantTest.md b/instant_tests_api/docs/AgentToServerInstantTest.md deleted file mode 100644 index 822d9050..00000000 --- a/instant_tests_api/docs/AgentToServerInstantTest.md +++ /dev/null @@ -1,56 +0,0 @@ -# AgentToServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] -**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] -**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [optional] [default to 49153] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**server** | **str** | Target name or IP address. | -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] -**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] - -## Example - -```python -from instant_tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentToServerInstantTest from a JSON string -agent_to_server_instant_test_instance = AgentToServerInstantTest.from_json(json) -# print the JSON string representation of the object -print AgentToServerInstantTest.to_json() - -# convert the object into a dict -agent_to_server_instant_test_dict = agent_to_server_instant_test_instance.to_dict() -# create an instance of AgentToServerInstantTest from a dict -agent_to_server_instant_test_form_dict = agent_to_server_instant_test.from_dict(agent_to_server_instant_test_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/instant_tests_api/docs/CloudEnterpriseAgentType.md b/instant_tests_api/docs/CloudEnterpriseAgentType.md deleted file mode 100644 index 951c803e..00000000 --- a/instant_tests_api/docs/CloudEnterpriseAgentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/instant_tests_api/docs/DNSServerApi.md b/instant_tests_api/docs/DNSServerApi.md deleted file mode 100644 index adcc3bd9..00000000 --- a/instant_tests_api/docs/DNSServerApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.DNSServerApi - -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 - - -# **post_instant_dns_server** -> DnsServerInstantTest post_instant_dns_server(dns_server_instant_test_request, aid=aid, expand=expand) - -Create DNS server instant test - -Creates and runs a new DNS server instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.dns_server_instant_test import DnsServerInstantTest -from instant_tests_api.models.dns_server_instant_test_request import DnsServerInstantTestRequest -from instant_tests_api.models.expand import Expand -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.DNSServerApi(api_client) - dns_server_instant_test_request = instant_tests_api.DnsServerInstantTestRequest() # DnsServerInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSServerApi->post_instant_dns_server: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dns_server_instant_test_request** | [**DnsServerInstantTestRequest**](DnsServerInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**DnsServerInstantTest**](DnsServerInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/DNSTraceApi.md b/instant_tests_api/docs/DNSTraceApi.md deleted file mode 100644 index 604e2b7a..00000000 --- a/instant_tests_api/docs/DNSTraceApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.DNSTraceApi - -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 - - -# **post_instant_dns_trace** -> DnsTraceInstantTest post_instant_dns_trace(dns_trace_instant_test_request, aid=aid, expand=expand) - -Create DNS trace instant test - -Creates and runs a new DNS trace instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.dns_trace_instant_test import DnsTraceInstantTest -from instant_tests_api.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest -from instant_tests_api.models.expand import Expand -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.DNSTraceApi(api_client) - dns_trace_instant_test_request = instant_tests_api.DnsTraceInstantTestRequest() # DnsTraceInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSTraceApi->post_instant_dns_trace: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dns_trace_instant_test_request** | [**DnsTraceInstantTestRequest**](DnsTraceInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**DnsTraceInstantTest**](DnsTraceInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/DnsQueryClass.md b/instant_tests_api/docs/DnsQueryClass.md deleted file mode 100644 index b4de0b88..00000000 --- a/instant_tests_api/docs/DnsQueryClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# DnsQueryClass - -Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. - -## 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/instant_tests_api/docs/DnsSecInstantTest.md b/instant_tests_api/docs/DnsSecInstantTest.md deleted file mode 100644 index 5eb5f625..00000000 --- a/instant_tests_api/docs/DnsSecInstantTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# DnsSecInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.dns_sec_instant_test import DnsSecInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsSecInstantTest from a JSON string -dns_sec_instant_test_instance = DnsSecInstantTest.from_json(json) -# print the JSON string representation of the object -print DnsSecInstantTest.to_json() - -# convert the object into a dict -dns_sec_instant_test_dict = dns_sec_instant_test_instance.to_dict() -# create an instance of DnsSecInstantTest from a dict -dns_sec_instant_test_form_dict = dns_sec_instant_test.from_dict(dns_sec_instant_test_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/instant_tests_api/docs/DnsServerInstantTest.md b/instant_tests_api/docs/DnsServerInstantTest.md deleted file mode 100644 index 46dd76f8..00000000 --- a/instant_tests_api/docs/DnsServerInstantTest.md +++ /dev/null @@ -1,55 +0,0 @@ -# DnsServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | -**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**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] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.dns_server_instant_test import DnsServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsServerInstantTest from a JSON string -dns_server_instant_test_instance = DnsServerInstantTest.from_json(json) -# print the JSON string representation of the object -print DnsServerInstantTest.to_json() - -# convert the object into a dict -dns_server_instant_test_dict = dns_server_instant_test_instance.to_dict() -# create an instance of DnsServerInstantTest from a dict -dns_server_instant_test_form_dict = dns_server_instant_test.from_dict(dns_server_instant_test_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/instant_tests_api/docs/DnsServersRequest.md b/instant_tests_api/docs/DnsServersRequest.md deleted file mode 100644 index 5f498d38..00000000 --- a/instant_tests_api/docs/DnsServersRequest.md +++ /dev/null @@ -1,28 +0,0 @@ -# DnsServersRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dns_servers** | **List[str]** | A list of DNS server FQDN. | [optional] - -## Example - -```python -from instant_tests_api.models.dns_servers_request import DnsServersRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsServersRequest from a JSON string -dns_servers_request_instance = DnsServersRequest.from_json(json) -# print the JSON string representation of the object -print DnsServersRequest.to_json() - -# convert the object into a dict -dns_servers_request_dict = dns_servers_request_instance.to_dict() -# create an instance of DnsServersRequest from a dict -dns_servers_request_form_dict = dns_servers_request.from_dict(dns_servers_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/instant_tests_api/docs/DnsTraceInstantTest.md b/instant_tests_api/docs/DnsTraceInstantTest.md deleted file mode 100644 index 89449ce3..00000000 --- a/instant_tests_api/docs/DnsTraceInstantTest.md +++ /dev/null @@ -1,44 +0,0 @@ -# DnsTraceInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.dns_trace_instant_test import DnsTraceInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsTraceInstantTest from a JSON string -dns_trace_instant_test_instance = DnsTraceInstantTest.from_json(json) -# print the JSON string representation of the object -print DnsTraceInstantTest.to_json() - -# convert the object into a dict -dns_trace_instant_test_dict = dns_trace_instant_test_instance.to_dict() -# create an instance of DnsTraceInstantTest from a dict -dns_trace_instant_test_form_dict = dns_trace_instant_test.from_dict(dns_trace_instant_test_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/instant_tests_api/docs/Error.md b/instant_tests_api/docs/Error.md deleted file mode 100644 index 275b872e..00000000 --- a/instant_tests_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 instant_tests_api.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_form_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/instant_tests_api/docs/Expand.md b/instant_tests_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/instant_tests_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/instant_tests_api/docs/FTPServerApi.md b/instant_tests_api/docs/FTPServerApi.md deleted file mode 100644 index abdf5896..00000000 --- a/instant_tests_api/docs/FTPServerApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.FTPServerApi - -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 - - -# **post_instant_ftp_server** -> FtpServerInstantTest post_instant_ftp_server(server_instant_test_request, aid=aid, expand=expand) - -Create FTP server instant test - -Creates and runs a new FTP server instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.ftp_server_instant_test import FtpServerInstantTest -from instant_tests_api.models.server_instant_test_request import ServerInstantTestRequest -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.FTPServerApi(api_client) - server_instant_test_request = instant_tests_api.ServerInstantTestRequest() # ServerInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling FTPServerApi->post_instant_ftp_server: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **server_instant_test_request** | [**ServerInstantTestRequest**](ServerInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**FtpServerInstantTest**](FtpServerInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/FtpServerInstantTest.md b/instant_tests_api/docs/FtpServerInstantTest.md deleted file mode 100644 index 4716a36f..00000000 --- a/instant_tests_api/docs/FtpServerInstantTest.md +++ /dev/null @@ -1,59 +0,0 @@ -# FtpServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] -**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] -**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] -**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] -**password** | **str** | Password for Basic/NTLM authentication. | -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | -**url** | **str** | Target for the test. | -**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] -**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.ftp_server_instant_test import FtpServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of FtpServerInstantTest from a JSON string -ftp_server_instant_test_instance = FtpServerInstantTest.from_json(json) -# print the JSON string representation of the object -print FtpServerInstantTest.to_json() - -# convert the object into a dict -ftp_server_instant_test_dict = ftp_server_instant_test_instance.to_dict() -# create an instance of FtpServerInstantTest from a dict -ftp_server_instant_test_form_dict = ftp_server_instant_test.from_dict(ftp_server_instant_test_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/instant_tests_api/docs/FtpServerRequestType.md b/instant_tests_api/docs/FtpServerRequestType.md deleted file mode 100644 index 1180b3a5..00000000 --- a/instant_tests_api/docs/FtpServerRequestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FtpServerRequestType - -Set the type of activity for the test. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/instant_tests_api/docs/HTTPServerApi.md b/instant_tests_api/docs/HTTPServerApi.md deleted file mode 100644 index aa82a6bd..00000000 --- a/instant_tests_api/docs/HTTPServerApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.HTTPServerApi - -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 - - -# **post_instant_http_server** -> HttpServerInstantTest post_instant_http_server(http_server_instant_test_request, aid=aid, expand=expand) - -Create HTTP server instant test - -Creates and runs a new HTTP server instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.http_server_instant_test import HttpServerInstantTest -from instant_tests_api.models.http_server_instant_test_request import HttpServerInstantTestRequest -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.HTTPServerApi(api_client) - http_server_instant_test_request = instant_tests_api.HttpServerInstantTestRequest() # HttpServerInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling HTTPServerApi->post_instant_http_server: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **http_server_instant_test_request** | [**HttpServerInstantTestRequest**](HttpServerInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**HttpServerInstantTest**](HttpServerInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/HttpServerInstantTest.md b/instant_tests_api/docs/HttpServerInstantTest.md deleted file mode 100644 index 3ee41462..00000000 --- a/instant_tests_api/docs/HttpServerInstantTest.md +++ /dev/null @@ -1,72 +0,0 @@ -# HttpServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**headers** | **List[str]** | HTTP request headers used. | [optional] -**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'] -**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] -**dns_override** | **str** | IP address to use for DNS override. | [optional] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**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] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from instant_tests_api.models.http_server_instant_test import HttpServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpServerInstantTest from a JSON string -http_server_instant_test_instance = HttpServerInstantTest.from_json(json) -# print the JSON string representation of the object -print HttpServerInstantTest.to_json() - -# convert the object into a dict -http_server_instant_test_dict = http_server_instant_test_instance.to_dict() -# create an instance of HttpServerInstantTest from a dict -http_server_instant_test_form_dict = http_server_instant_test.from_dict(http_server_instant_test_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/instant_tests_api/docs/InstantTest.md b/instant_tests_api/docs/InstantTest.md deleted file mode 100644 index 4a5544d8..00000000 --- a/instant_tests_api/docs/InstantTest.md +++ /dev/null @@ -1,40 +0,0 @@ -# InstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] - -## Example - -```python -from instant_tests_api.models.instant_test import InstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of InstantTest from a JSON string -instant_test_instance = InstantTest.from_json(json) -# print the JSON string representation of the object -print InstantTest.to_json() - -# convert the object into a dict -instant_test_dict = instant_test_instance.to_dict() -# create an instance of InstantTest from a dict -instant_test_form_dict = instant_test.from_dict(instant_test_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/instant_tests_api/docs/Link.md b/instant_tests_api/docs/Link.md deleted file mode 100644 index f51d6f48..00000000 --- a/instant_tests_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 instant_tests_api.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_form_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/instant_tests_api/docs/MapItem.md b/instant_tests_api/docs/MapItem.md deleted file mode 100644 index f93c6bf3..00000000 --- a/instant_tests_api/docs/MapItem.md +++ /dev/null @@ -1,29 +0,0 @@ -# MapItem - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from instant_tests_api.models.map_item import MapItem - -# TODO update the JSON string below -json = "{}" -# create an instance of MapItem from a JSON string -map_item_instance = MapItem.from_json(json) -# print the JSON string representation of the object -print MapItem.to_json() - -# convert the object into a dict -map_item_dict = map_item_instance.to_dict() -# create an instance of MapItem from a dict -map_item_form_dict = map_item.from_dict(map_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/instant_tests_api/docs/PageLoadInstantTest.md b/instant_tests_api/docs/PageLoadInstantTest.md deleted file mode 100644 index 4c4327c0..00000000 --- a/instant_tests_api/docs/PageLoadInstantTest.md +++ /dev/null @@ -1,74 +0,0 @@ -# PageLoadInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] -**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] -**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] -**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] -**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] -**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] -**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from instant_tests_api.models.page_load_instant_test import PageLoadInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of PageLoadInstantTest from a JSON string -page_load_instant_test_instance = PageLoadInstantTest.from_json(json) -# print the JSON string representation of the object -print PageLoadInstantTest.to_json() - -# convert the object into a dict -page_load_instant_test_dict = page_load_instant_test_instance.to_dict() -# create an instance of PageLoadInstantTest from a dict -page_load_instant_test_form_dict = page_load_instant_test.from_dict(page_load_instant_test_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/instant_tests_api/docs/SIPServerApi.md b/instant_tests_api/docs/SIPServerApi.md deleted file mode 100644 index 7334ec2f..00000000 --- a/instant_tests_api/docs/SIPServerApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.SIPServerApi - -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 - - -# **post_instant_sip_server** -> SipServerInstantTest post_instant_sip_server(sip_server_instant_test_request, aid=aid, expand=expand) - -Create SIP server instant test - -Creates and runs a new SIP server instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.sip_server_instant_test import SipServerInstantTest -from instant_tests_api.models.sip_server_instant_test_request import SipServerInstantTestRequest -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.SIPServerApi(api_client) - sip_server_instant_test_request = instant_tests_api.SipServerInstantTestRequest() # SipServerInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling SIPServerApi->post_instant_sip_server: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sip_server_instant_test_request** | [**SipServerInstantTestRequest**](SipServerInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**SipServerInstantTest**](SipServerInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/SipServerInstantTest.md b/instant_tests_api/docs/SipServerInstantTest.md deleted file mode 100644 index e181e0cf..00000000 --- a/instant_tests_api/docs/SipServerInstantTest.md +++ /dev/null @@ -1,57 +0,0 @@ -# SipServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_user** | **str** | Username for authentication with SIP server. | [optional] -**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] -**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [default to 49153] -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] -**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] -**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] -**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] -**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.sip_server_instant_test import SipServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of SipServerInstantTest from a JSON string -sip_server_instant_test_instance = SipServerInstantTest.from_json(json) -# print the JSON string representation of the object -print SipServerInstantTest.to_json() - -# convert the object into a dict -sip_server_instant_test_dict = sip_server_instant_test_instance.to_dict() -# create an instance of SipServerInstantTest from a dict -sip_server_instant_test_form_dict = sip_server_instant_test.from_dict(sip_server_instant_test_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/instant_tests_api/docs/SipServerInstantTestRequest.md b/instant_tests_api/docs/SipServerInstantTestRequest.md deleted file mode 100644 index e7926701..00000000 --- a/instant_tests_api/docs/SipServerInstantTestRequest.md +++ /dev/null @@ -1,57 +0,0 @@ -# SipServerInstantTestRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[InstantTestRequestAgentsInner]**](InstantTestRequestAgentsInner.md) | A list of objects with `agentId` (required) and `sourceIpAddress` (optional). | -**auth_user** | **str** | Username for authentication with SIP server. | [optional] -**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] -**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [default to 49153] -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] -**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] -**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] -**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] -**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.sip_server_instant_test_request import SipServerInstantTestRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of SipServerInstantTestRequest from a JSON string -sip_server_instant_test_request_instance = SipServerInstantTestRequest.from_json(json) -# print the JSON string representation of the object -print SipServerInstantTestRequest.to_json() - -# convert the object into a dict -sip_server_instant_test_request_dict = sip_server_instant_test_request_instance.to_dict() -# create an instance of SipServerInstantTestRequest from a dict -sip_server_instant_test_request_form_dict = sip_server_instant_test_request.from_dict(sip_server_instant_test_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/instant_tests_api/docs/SipTestProtocol.md b/instant_tests_api/docs/SipTestProtocol.md deleted file mode 100644 index 624902b4..00000000 --- a/instant_tests_api/docs/SipTestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# SipTestProtocol - -Transport layer for SIP communication. - -## 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/instant_tests_api/docs/TestAuthType.md b/instant_tests_api/docs/TestAuthType.md deleted file mode 100644 index cea7b651..00000000 --- a/instant_tests_api/docs/TestAuthType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestAuthType - -HTTP authentication type. - -## 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/instant_tests_api/docs/TestCustomHeaders.md b/instant_tests_api/docs/TestCustomHeaders.md deleted file mode 100644 index 04f1970a..00000000 --- a/instant_tests_api/docs/TestCustomHeaders.md +++ /dev/null @@ -1,30 +0,0 @@ -# TestCustomHeaders - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**root** | [**TestCustomHeadersRoot**](TestCustomHeadersRoot.md) | | [optional] -**domains** | [**Dict[str, MapItem]**](MapItem.md) | Use these HTTP headers for the specified domains. | [optional] -**all** | [**TestCustomHeadersAll**](TestCustomHeadersAll.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.test_custom_headers import TestCustomHeaders - -# TODO update the JSON string below -json = "{}" -# create an instance of TestCustomHeaders from a JSON string -test_custom_headers_instance = TestCustomHeaders.from_json(json) -# print the JSON string representation of the object -print TestCustomHeaders.to_json() - -# convert the object into a dict -test_custom_headers_dict = test_custom_headers_instance.to_dict() -# create an instance of TestCustomHeaders from a dict -test_custom_headers_form_dict = test_custom_headers.from_dict(test_custom_headers_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/instant_tests_api/docs/TestCustomHeadersAll.md b/instant_tests_api/docs/TestCustomHeadersAll.md deleted file mode 100644 index 4822d970..00000000 --- a/instant_tests_api/docs/TestCustomHeadersAll.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestCustomHeadersAll - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from instant_tests_api.models.test_custom_headers_all import TestCustomHeadersAll - -# TODO update the JSON string below -json = "{}" -# create an instance of TestCustomHeadersAll from a JSON string -test_custom_headers_all_instance = TestCustomHeadersAll.from_json(json) -# print the JSON string representation of the object -print TestCustomHeadersAll.to_json() - -# convert the object into a dict -test_custom_headers_all_dict = test_custom_headers_all_instance.to_dict() -# create an instance of TestCustomHeadersAll from a dict -test_custom_headers_all_form_dict = test_custom_headers_all.from_dict(test_custom_headers_all_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/instant_tests_api/docs/TestCustomHeadersRoot.md b/instant_tests_api/docs/TestCustomHeadersRoot.md deleted file mode 100644 index d420fa2e..00000000 --- a/instant_tests_api/docs/TestCustomHeadersRoot.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestCustomHeadersRoot - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from instant_tests_api.models.test_custom_headers_root import TestCustomHeadersRoot - -# TODO update the JSON string below -json = "{}" -# create an instance of TestCustomHeadersRoot from a JSON string -test_custom_headers_root_instance = TestCustomHeadersRoot.from_json(json) -# print the JSON string representation of the object -print TestCustomHeadersRoot.to_json() - -# convert the object into a dict -test_custom_headers_root_dict = test_custom_headers_root_instance.to_dict() -# create an instance of TestCustomHeadersRoot from a dict -test_custom_headers_root_form_dict = test_custom_headers_root.from_dict(test_custom_headers_root_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/instant_tests_api/docs/TestDirection.md b/instant_tests_api/docs/TestDirection.md deleted file mode 100644 index 59dab3fb..00000000 --- a/instant_tests_api/docs/TestDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDirection - -Direction of the test, which affects how results are shown. - -## 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/instant_tests_api/docs/TestDnsServer.md b/instant_tests_api/docs/TestDnsServer.md deleted file mode 100644 index b2d9e687..00000000 --- a/instant_tests_api/docs/TestDnsServer.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestDnsServer - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server_id** | **str** | Unique identifier of the DNS server. | [optional] -**server_name** | **str** | Fully qualified domain name (FQDN) of DNS server. | [optional] - -## Example - -```python -from instant_tests_api.models.test_dns_server import TestDnsServer - -# TODO update the JSON string below -json = "{}" -# create an instance of TestDnsServer from a JSON string -test_dns_server_instance = TestDnsServer.from_json(json) -# print the JSON string representation of the object -print TestDnsServer.to_json() - -# convert the object into a dict -test_dns_server_dict = test_dns_server_instance.to_dict() -# create an instance of TestDnsServer from a dict -test_dns_server_form_dict = test_dns_server.from_dict(test_dns_server_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/instant_tests_api/docs/TestDnsTransportProtocol.md b/instant_tests_api/docs/TestDnsTransportProtocol.md deleted file mode 100644 index 1bcfdbf3..00000000 --- a/instant_tests_api/docs/TestDnsTransportProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDnsTransportProtocol - -Transport protocol used for DNS requests. - -## 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/instant_tests_api/docs/TestDscpId.md b/instant_tests_api/docs/TestDscpId.md deleted file mode 100644 index aa714a34..00000000 --- a/instant_tests_api/docs/TestDscpId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDscpId - -DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) - -## 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/instant_tests_api/docs/TestIpv6Policy.md b/instant_tests_api/docs/TestIpv6Policy.md deleted file mode 100644 index 81e61009..00000000 --- a/instant_tests_api/docs/TestIpv6Policy.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestIpv6Policy - -IP version policy. Overrides the IPv6 policy configured at the agent level. - -## 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/instant_tests_api/docs/TestLabelsInner.md b/instant_tests_api/docs/TestLabelsInner.md deleted file mode 100644 index 63f90f1f..00000000 --- a/instant_tests_api/docs/TestLabelsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# TestLabelsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label_id** | **str** | Label ID. | [optional] -**name** | **str** | Name of the label. | [optional] -**is_built_in** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] - -## Example - -```python -from instant_tests_api.models.test_labels_inner import TestLabelsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of TestLabelsInner from a JSON string -test_labels_inner_instance = TestLabelsInner.from_json(json) -# print the JSON string representation of the object -print TestLabelsInner.to_json() - -# convert the object into a dict -test_labels_inner_dict = test_labels_inner_instance.to_dict() -# create an instance of TestLabelsInner from a dict -test_labels_inner_form_dict = test_labels_inner.from_dict(test_labels_inner_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/instant_tests_api/docs/TestPageLoadingStrategy.md b/instant_tests_api/docs/TestPageLoadingStrategy.md deleted file mode 100644 index d4f92f00..00000000 --- a/instant_tests_api/docs/TestPageLoadingStrategy.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestPageLoadingStrategy - -* `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. - -## 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/instant_tests_api/docs/TestPathTraceMode.md b/instant_tests_api/docs/TestPathTraceMode.md deleted file mode 100644 index f93da70d..00000000 --- a/instant_tests_api/docs/TestPathTraceMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestPathTraceMode - -Select `inSession` to perform the path trace within a TCP session. - -## 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/instant_tests_api/docs/TestProbeMode.md b/instant_tests_api/docs/TestProbeMode.md deleted file mode 100644 index 2e0ad614..00000000 --- a/instant_tests_api/docs/TestProbeMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProbeMode - -Probe mode used by network test, only valid when the protocol is set to TCP. - -## 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/instant_tests_api/docs/TestProtocol.md b/instant_tests_api/docs/TestProtocol.md deleted file mode 100644 index 32cac130..00000000 --- a/instant_tests_api/docs/TestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProtocol - -Protocol used by dependent network tests (end-to-end, path trace, PMTUD). - -## 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/instant_tests_api/docs/TestSharedAccountsInner.md b/instant_tests_api/docs/TestSharedAccountsInner.md deleted file mode 100644 index 66e01187..00000000 --- a/instant_tests_api/docs/TestSharedAccountsInner.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestSharedAccountsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**aid** | **str** | Account group ID. | [optional] -**name** | **str** | Account group name. | [optional] - -## Example - -```python -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of TestSharedAccountsInner from a JSON string -test_shared_accounts_inner_instance = TestSharedAccountsInner.from_json(json) -# print the JSON string representation of the object -print TestSharedAccountsInner.to_json() - -# convert the object into a dict -test_shared_accounts_inner_dict = test_shared_accounts_inner_instance.to_dict() -# create an instance of TestSharedAccountsInner from a dict -test_shared_accounts_inner_form_dict = test_shared_accounts_inner.from_dict(test_shared_accounts_inner_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/instant_tests_api/docs/TestSipCredentials.md b/instant_tests_api/docs/TestSipCredentials.md deleted file mode 100644 index 7c668103..00000000 --- a/instant_tests_api/docs/TestSipCredentials.md +++ /dev/null @@ -1,33 +0,0 @@ -# TestSipCredentials - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_user** | **str** | Username for authentication with SIP server. | [optional] -**password** | **str** | Password for authentication with SIP server. | [optional] -**port** | **int** | Port number for the chosen protocol. | -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] - -## Example - -```python -from instant_tests_api.models.test_sip_credentials import TestSipCredentials - -# TODO update the JSON string below -json = "{}" -# create an instance of TestSipCredentials from a JSON string -test_sip_credentials_instance = TestSipCredentials.from_json(json) -# print the JSON string representation of the object -print TestSipCredentials.to_json() - -# convert the object into a dict -test_sip_credentials_dict = test_sip_credentials_instance.to_dict() -# create an instance of TestSipCredentials from a dict -test_sip_credentials_form_dict = test_sip_credentials.from_dict(test_sip_credentials_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/instant_tests_api/docs/TestSslVersionId.md b/instant_tests_api/docs/TestSslVersionId.md deleted file mode 100644 index fb9ac0f8..00000000 --- a/instant_tests_api/docs/TestSslVersionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestSslVersionId - -SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - -## 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/instant_tests_api/docs/TestType.md b/instant_tests_api/docs/TestType.md deleted file mode 100644 index ae5d924e..00000000 --- a/instant_tests_api/docs/TestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestType - -This is a read only value, as test type is implicit in the test creation url. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/instant_tests_api/docs/UnauthorizedError.md b/instant_tests_api/docs/UnauthorizedError.md deleted file mode 100644 index cf19fdd4..00000000 --- a/instant_tests_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from instant_tests_api.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_form_dict = unauthorized_error.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/instant_tests_api/docs/UnexpandedInstantTest.md b/instant_tests_api/docs/UnexpandedInstantTest.md deleted file mode 100644 index 93e4aa0c..00000000 --- a/instant_tests_api/docs/UnexpandedInstantTest.md +++ /dev/null @@ -1,38 +0,0 @@ -# UnexpandedInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.unexpanded_instant_test import UnexpandedInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTest from a JSON string -unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTest.to_json() - -# convert the object into a dict -unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() -# create an instance of UnexpandedInstantTest from a dict -unexpanded_instant_test_form_dict = unexpanded_instant_test.from_dict(unexpanded_instant_test_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/instant_tests_api/docs/UnexpandedInstantTestLinks.md b/instant_tests_api/docs/UnexpandedInstantTestLinks.md deleted file mode 100644 index f43f21a9..00000000 --- a/instant_tests_api/docs/UnexpandedInstantTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedInstantTestLinks - -A list of links that can be accessed to get more information - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] -**test_results** | [**UnexpandedInstantTestLinksTestResults**](UnexpandedInstantTestLinksTestResults.md) | | [optional] - -## Example - -```python -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinks from a JSON string -unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinks.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() -# create an instance of UnexpandedInstantTestLinks from a dict -unexpanded_instant_test_links_form_dict = unexpanded_instant_test_links.from_dict(unexpanded_instant_test_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/instant_tests_api/docs/UnexpandedInstantTestLinksSelf.md b/instant_tests_api/docs/UnexpandedInstantTestLinksSelf.md deleted file mode 100644 index c398736b..00000000 --- a/instant_tests_api/docs/UnexpandedInstantTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksSelf - - -## 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 instant_tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksSelf from a JSON string -unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksSelf.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksSelf from a dict -unexpanded_instant_test_links_self_form_dict = unexpanded_instant_test_links_self.from_dict(unexpanded_instant_test_links_self_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/instant_tests_api/docs/UnexpandedInstantTestLinksTestResults.md b/instant_tests_api/docs/UnexpandedInstantTestLinksTestResults.md deleted file mode 100644 index 7239f776..00000000 --- a/instant_tests_api/docs/UnexpandedInstantTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksTestResults - - -## 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 instant_tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksTestResults from a JSON string -unexpanded_instant_test_links_test_results_instance = UnexpandedInstantTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksTestResults.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_test_results_dict = unexpanded_instant_test_links_test_results_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksTestResults from a dict -unexpanded_instant_test_links_test_results_form_dict = unexpanded_instant_test_links_test_results.from_dict(unexpanded_instant_test_links_test_results_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/instant_tests_api/docs/VoiceApi.md b/instant_tests_api/docs/VoiceApi.md deleted file mode 100644 index fe2f9140..00000000 --- a/instant_tests_api/docs/VoiceApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.VoiceApi - -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 - - -# **post_instant_voice** -> VoiceInstantTest post_instant_voice(voice_instant_test_request, aid=aid, expand=expand) - -Create voice instant test - -Creates and runs a voice instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.voice_instant_test import VoiceInstantTest -from instant_tests_api.models.voice_instant_test_request import VoiceInstantTestRequest -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.VoiceApi(api_client) - voice_instant_test_request = instant_tests_api.VoiceInstantTestRequest() # VoiceInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling VoiceApi->post_instant_voice: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **voice_instant_test_request** | [**VoiceInstantTestRequest**](VoiceInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**VoiceInstantTest**](VoiceInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/VoiceInstantTest.md b/instant_tests_api/docs/VoiceInstantTest.md deleted file mode 100644 index b9958bee..00000000 --- a/instant_tests_api/docs/VoiceInstantTest.md +++ /dev/null @@ -1,50 +0,0 @@ -# VoiceInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**codec** | **str** | Codec label | [optional] [readonly] -**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] -**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**port** | **int** | Port number for the chosen protocol. | [optional] -**target_agent_id** | **str** | Agent ID of the target agent for the test. | - -## Example - -```python -from instant_tests_api.models.voice_instant_test import VoiceInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of VoiceInstantTest from a JSON string -voice_instant_test_instance = VoiceInstantTest.from_json(json) -# print the JSON string representation of the object -print VoiceInstantTest.to_json() - -# convert the object into a dict -voice_instant_test_dict = voice_instant_test_instance.to_dict() -# create an instance of VoiceInstantTest from a dict -voice_instant_test_form_dict = voice_instant_test.from_dict(voice_instant_test_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/instant_tests_api/docs/WebTransactionApi.md b/instant_tests_api/docs/WebTransactionApi.md deleted file mode 100644 index 129372ce..00000000 --- a/instant_tests_api/docs/WebTransactionApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# instant_tests_api.WebTransactionApi - -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 - - -# **post_instant_web_transactions** -> WebTransactionInstantTest post_instant_web_transactions(web_transaction_instant_test_request, aid=aid, expand=expand) - -Create web transactions instant test - -Creates and runs a new Web transactions instant test. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import instant_tests_api -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.web_transaction_instant_test import WebTransactionInstantTest -from instant_tests_api.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest -from instant_tests_api.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 = instant_tests_api.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 = instant_tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with instant_tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instant_tests_api.WebTransactionApi(api_client) - web_transaction_instant_test_request = instant_tests_api.WebTransactionInstantTestRequest() # WebTransactionInstantTestRequest | - aid = '2067' # 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 = [instant_tests_api.Expand()] # List[Expand] | (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionApi->post_instant_web_transactions: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **web_transaction_instant_test_request** | [**WebTransactionInstantTestRequest**](WebTransactionInstantTestRequest.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] - **expand** | [**List[Expand]**](Expand.md)| (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. | [optional] - -### Return type - -[**WebTransactionInstantTest**](WebTransactionInstantTest.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 | - | -**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) - diff --git a/instant_tests_api/docs/WebTransactionInstantTest.md b/instant_tests_api/docs/WebTransactionInstantTest.md deleted file mode 100644 index 06ab1af7..00000000 --- a/instant_tests_api/docs/WebTransactionInstantTest.md +++ /dev/null @@ -1,77 +0,0 @@ -# WebTransactionInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] -**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'] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. | [optional] -**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] -**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] -**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] -**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] -**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] -**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] -**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from instant_tests_api.models.web_transaction_instant_test import WebTransactionInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of WebTransactionInstantTest from a JSON string -web_transaction_instant_test_instance = WebTransactionInstantTest.from_json(json) -# print the JSON string representation of the object -print WebTransactionInstantTest.to_json() - -# convert the object into a dict -web_transaction_instant_test_dict = web_transaction_instant_test_instance.to_dict() -# create an instance of WebTransactionInstantTest from a dict -web_transaction_instant_test_form_dict = web_transaction_instant_test.from_dict(web_transaction_instant_test_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/instant_tests_api/git_push.sh b/instant_tests_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/instant_tests_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/instant_tests_api/instant_tests_api/__init__.py b/instant_tests_api/instant_tests_api/__init__.py deleted file mode 100644 index 628a754a..00000000 --- a/instant_tests_api/instant_tests_api/__init__.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Instant Tests API - - ### Overview 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.0 - 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 instant_tests_api.api.agent_to_agent_api import AgentToAgentApi -from instant_tests_api.api.agent_to_server_api import AgentToServerApi -from instant_tests_api.api.dns_security_api import DNSSecurityApi -from instant_tests_api.api.dns_server_api import DNSServerApi -from instant_tests_api.api.dns_trace_api import DNSTraceApi -from instant_tests_api.api.ftp_server_api import FTPServerApi -from instant_tests_api.api.http_page_load_api import HTTPPageLoadApi -from instant_tests_api.api.http_server_api import HTTPServerApi -from instant_tests_api.api.run_api import RunApi -from instant_tests_api.api.sip_server_api import SIPServerApi -from instant_tests_api.api.voice_api import VoiceApi -from instant_tests_api.api.web_transaction_api import WebTransactionApi - -# import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.api_client import ApiClient -from instant_tests_api.configuration import Configuration -from instant_tests_api.exceptions import OpenApiException -from instant_tests_api.exceptions import ApiTypeError -from instant_tests_api.exceptions import ApiValueError -from instant_tests_api.exceptions import ApiKeyError -from instant_tests_api.exceptions import ApiAttributeError -from instant_tests_api.exceptions import ApiException - -# import models into sdk package -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.agent_base import AgentBase -from instant_tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest -from instant_tests_api.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest -from instant_tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from instant_tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest -from instant_tests_api.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest -from instant_tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.dns_sec_instant_test import DnsSecInstantTest -from instant_tests_api.models.dns_sec_instant_test_request import DnsSecInstantTestRequest -from instant_tests_api.models.dns_server_instant_test import DnsServerInstantTest -from instant_tests_api.models.dns_server_instant_test_request import DnsServerInstantTestRequest -from instant_tests_api.models.dns_servers_request import DnsServersRequest -from instant_tests_api.models.dns_trace_instant_test import DnsTraceInstantTest -from instant_tests_api.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest -from instant_tests_api.models.error import Error -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.ftp_server_instant_test import FtpServerInstantTest -from instant_tests_api.models.ftp_server_request_type import FtpServerRequestType -from instant_tests_api.models.http_server_instant_test import HttpServerInstantTest -from instant_tests_api.models.http_server_instant_test_request import HttpServerInstantTestRequest -from instant_tests_api.models.instant_test import InstantTest -from instant_tests_api.models.instant_test_request import InstantTestRequest -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.link import Link -from instant_tests_api.models.map_item import MapItem -from instant_tests_api.models.page_load_instant_test import PageLoadInstantTest -from instant_tests_api.models.page_load_instant_test_request import PageLoadInstantTestRequest -from instant_tests_api.models.server_instant_test_request import ServerInstantTestRequest -from instant_tests_api.models.sip_server_instant_test import SipServerInstantTest -from instant_tests_api.models.sip_server_instant_test_request import SipServerInstantTestRequest -from instant_tests_api.models.sip_test_protocol import SipTestProtocol -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_custom_headers_all import TestCustomHeadersAll -from instant_tests_api.models.test_custom_headers_root import TestCustomHeadersRoot -from instant_tests_api.models.test_direction import TestDirection -from instant_tests_api.models.test_dns_server import TestDnsServer -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_sip_credentials import TestSipCredentials -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.test_type import TestType -from instant_tests_api.models.unauthorized_error import UnauthorizedError -from instant_tests_api.models.unexpanded_instant_test import UnexpandedInstantTest -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from instant_tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from instant_tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from instant_tests_api.models.voice_instant_test import VoiceInstantTest -from instant_tests_api.models.voice_instant_test_request import VoiceInstantTestRequest -from instant_tests_api.models.web_transaction_instant_test import WebTransactionInstantTest -from instant_tests_api.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest diff --git a/instant_tests_api/instant_tests_api/api/__init__.py b/instant_tests_api/instant_tests_api/api/__init__.py deleted file mode 100644 index 8ebd7d65..00000000 --- a/instant_tests_api/instant_tests_api/api/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# flake8: noqa - -# import apis into api package -from instant_tests_api.api.agent_to_agent_api import AgentToAgentApi -from instant_tests_api.api.agent_to_server_api import AgentToServerApi -from instant_tests_api.api.dns_security_api import DNSSecurityApi -from instant_tests_api.api.dns_server_api import DNSServerApi -from instant_tests_api.api.dns_trace_api import DNSTraceApi -from instant_tests_api.api.ftp_server_api import FTPServerApi -from instant_tests_api.api.http_page_load_api import HTTPPageLoadApi -from instant_tests_api.api.http_server_api import HTTPServerApi -from instant_tests_api.api.run_api import RunApi -from instant_tests_api.api.sip_server_api import SIPServerApi -from instant_tests_api.api.voice_api import VoiceApi -from instant_tests_api.api.web_transaction_api import WebTransactionApi - diff --git a/instant_tests_api/instant_tests_api/api/agent_to_agent_api.py b/instant_tests_api/instant_tests_api/api/agent_to_agent_api.py deleted file mode 100644 index 6a0bd0c6..00000000 --- a/instant_tests_api/instant_tests_api/api/agent_to_agent_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest -from instant_tests_api.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest -from instant_tests_api.models.expand import Expand - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class AgentToAgentApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_test_agent_to_agent( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> AgentToAgentInstantTest: - """Create agent-to-agent instant test - - Creates and runs a new agent-to-agent instant test. - - :param agent_to_agent_instant_test_request: (required) - :type agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_test_agent_to_agent_serialize( - agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToAgentInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_test_agent_to_agent_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[AgentToAgentInstantTest]: - """Create agent-to-agent instant test - - Creates and runs a new agent-to-agent instant test. - - :param agent_to_agent_instant_test_request: (required) - :type agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_test_agent_to_agent_serialize( - agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToAgentInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_test_agent_to_agent_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create agent-to-agent instant test - - Creates and runs a new agent-to-agent instant test. - - :param agent_to_agent_instant_test_request: (required) - :type agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_test_agent_to_agent_serialize( - agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToAgentInstantTest", - '400': "Error", - '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_instant_test_agent_to_agent_serialize( - self, - agent_to_agent_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 agent_to_agent_instant_test_request is not None: - _body_params = agent_to_agent_instant_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/tests/agent-to-agent/instant', - 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/instant_tests_api/instant_tests_api/api/agent_to_server_api.py b/instant_tests_api/instant_tests_api/api/agent_to_server_api.py deleted file mode 100644 index 5a98cf7a..00000000 --- a/instant_tests_api/instant_tests_api/api/agent_to_server_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest -from instant_tests_api.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest -from instant_tests_api.models.expand import Expand - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class AgentToServerApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_agent_to_server( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> AgentToServerInstantTest: - """Create agent-to-server instant test - - Creates and runs a new agent-to-server instant test. - - :param agent_to_server_instant_test_request: (required) - :type agent_to_server_instant_test_request: AgentToServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_agent_to_server_serialize( - agent_to_server_instant_test_request=agent_to_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToServerInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_agent_to_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[AgentToServerInstantTest]: - """Create agent-to-server instant test - - Creates and runs a new agent-to-server instant test. - - :param agent_to_server_instant_test_request: (required) - :type agent_to_server_instant_test_request: AgentToServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_agent_to_server_serialize( - agent_to_server_instant_test_request=agent_to_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToServerInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_agent_to_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create agent-to-server instant test - - Creates and runs a new agent-to-server instant test. - - :param agent_to_server_instant_test_request: (required) - :type agent_to_server_instant_test_request: AgentToServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_agent_to_server_serialize( - agent_to_server_instant_test_request=agent_to_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToServerInstantTest", - '400': "Error", - '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_instant_agent_to_server_serialize( - self, - agent_to_server_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 agent_to_server_instant_test_request is not None: - _body_params = agent_to_server_instant_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/tests/agent-to-server/instant', - 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/instant_tests_api/instant_tests_api/api/dns_server_api.py b/instant_tests_api/instant_tests_api/api/dns_server_api.py deleted file mode 100644 index 4ebde311..00000000 --- a/instant_tests_api/instant_tests_api/api/dns_server_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.dns_server_instant_test import DnsServerInstantTest -from instant_tests_api.models.dns_server_instant_test_request import DnsServerInstantTestRequest -from instant_tests_api.models.expand import Expand - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class DNSServerApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_dns_server( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> DnsServerInstantTest: - """Create DNS server instant test - - Creates and runs a new DNS server instant test. - - :param dns_server_instant_test_request: (required) - :type dns_server_instant_test_request: DnsServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_dns_server_serialize( - dns_server_instant_test_request=dns_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsServerInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_dns_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[DnsServerInstantTest]: - """Create DNS server instant test - - Creates and runs a new DNS server instant test. - - :param dns_server_instant_test_request: (required) - :type dns_server_instant_test_request: DnsServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_dns_server_serialize( - dns_server_instant_test_request=dns_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsServerInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_dns_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create DNS server instant test - - Creates and runs a new DNS server instant test. - - :param dns_server_instant_test_request: (required) - :type dns_server_instant_test_request: DnsServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_dns_server_serialize( - dns_server_instant_test_request=dns_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsServerInstantTest", - '400': "Error", - '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_instant_dns_server_serialize( - self, - dns_server_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 dns_server_instant_test_request is not None: - _body_params = dns_server_instant_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/tests/dns-server/instant', - 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/instant_tests_api/instant_tests_api/api/dns_trace_api.py b/instant_tests_api/instant_tests_api/api/dns_trace_api.py deleted file mode 100644 index bfe06f68..00000000 --- a/instant_tests_api/instant_tests_api/api/dns_trace_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.dns_trace_instant_test import DnsTraceInstantTest -from instant_tests_api.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest -from instant_tests_api.models.expand import Expand - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class DNSTraceApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_dns_trace( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> DnsTraceInstantTest: - """Create DNS trace instant test - - Creates and runs a new DNS trace instant test. - - :param dns_trace_instant_test_request: (required) - :type dns_trace_instant_test_request: DnsTraceInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_dns_trace_serialize( - dns_trace_instant_test_request=dns_trace_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsTraceInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_dns_trace_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[DnsTraceInstantTest]: - """Create DNS trace instant test - - Creates and runs a new DNS trace instant test. - - :param dns_trace_instant_test_request: (required) - :type dns_trace_instant_test_request: DnsTraceInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_dns_trace_serialize( - dns_trace_instant_test_request=dns_trace_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsTraceInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_dns_trace_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create DNS trace instant test - - Creates and runs a new DNS trace instant test. - - :param dns_trace_instant_test_request: (required) - :type dns_trace_instant_test_request: DnsTraceInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_dns_trace_serialize( - dns_trace_instant_test_request=dns_trace_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsTraceInstantTest", - '400': "Error", - '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_instant_dns_trace_serialize( - self, - dns_trace_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 dns_trace_instant_test_request is not None: - _body_params = dns_trace_instant_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/tests/dns-trace/instant', - 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/instant_tests_api/instant_tests_api/api/ftp_server_api.py b/instant_tests_api/instant_tests_api/api/ftp_server_api.py deleted file mode 100644 index f07eae29..00000000 --- a/instant_tests_api/instant_tests_api/api/ftp_server_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.ftp_server_instant_test import FtpServerInstantTest -from instant_tests_api.models.server_instant_test_request import ServerInstantTestRequest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class FTPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_ftp_server( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> FtpServerInstantTest: - """Create FTP server instant test - - Creates and runs a new FTP server instant test. - - :param server_instant_test_request: (required) - :type server_instant_test_request: ServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_ftp_server_serialize( - server_instant_test_request=server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FtpServerInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_ftp_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[FtpServerInstantTest]: - """Create FTP server instant test - - Creates and runs a new FTP server instant test. - - :param server_instant_test_request: (required) - :type server_instant_test_request: ServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_ftp_server_serialize( - server_instant_test_request=server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FtpServerInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_ftp_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create FTP server instant test - - Creates and runs a new FTP server instant test. - - :param server_instant_test_request: (required) - :type server_instant_test_request: ServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_ftp_server_serialize( - server_instant_test_request=server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FtpServerInstantTest", - '400': "Error", - '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_instant_ftp_server_serialize( - self, - server_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 server_instant_test_request is not None: - _body_params = server_instant_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/tests/ftp-server/instant', - 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/instant_tests_api/instant_tests_api/api/http_server_api.py b/instant_tests_api/instant_tests_api/api/http_server_api.py deleted file mode 100644 index 0a1a386b..00000000 --- a/instant_tests_api/instant_tests_api/api/http_server_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.http_server_instant_test import HttpServerInstantTest -from instant_tests_api.models.http_server_instant_test_request import HttpServerInstantTestRequest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class HTTPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_http_server( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> HttpServerInstantTest: - """Create HTTP server instant test - - Creates and runs a new HTTP server instant test. - - :param http_server_instant_test_request: (required) - :type http_server_instant_test_request: HttpServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_http_server_serialize( - http_server_instant_test_request=http_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "HttpServerInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_http_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[HttpServerInstantTest]: - """Create HTTP server instant test - - Creates and runs a new HTTP server instant test. - - :param http_server_instant_test_request: (required) - :type http_server_instant_test_request: HttpServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_http_server_serialize( - http_server_instant_test_request=http_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "HttpServerInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_http_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create HTTP server instant test - - Creates and runs a new HTTP server instant test. - - :param http_server_instant_test_request: (required) - :type http_server_instant_test_request: HttpServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_http_server_serialize( - http_server_instant_test_request=http_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "HttpServerInstantTest", - '400': "Error", - '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_instant_http_server_serialize( - self, - http_server_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 http_server_instant_test_request is not None: - _body_params = http_server_instant_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/tests/http-server/instant', - 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/instant_tests_api/instant_tests_api/api/sip_server_api.py b/instant_tests_api/instant_tests_api/api/sip_server_api.py deleted file mode 100644 index f49b7888..00000000 --- a/instant_tests_api/instant_tests_api/api/sip_server_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.sip_server_instant_test import SipServerInstantTest -from instant_tests_api.models.sip_server_instant_test_request import SipServerInstantTestRequest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class SIPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_sip_server( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> SipServerInstantTest: - """Create SIP server instant test - - Creates and runs a new SIP server instant test. - - :param sip_server_instant_test_request: (required) - :type sip_server_instant_test_request: SipServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_sip_server_serialize( - sip_server_instant_test_request=sip_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SipServerInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_sip_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[SipServerInstantTest]: - """Create SIP server instant test - - Creates and runs a new SIP server instant test. - - :param sip_server_instant_test_request: (required) - :type sip_server_instant_test_request: SipServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_sip_server_serialize( - sip_server_instant_test_request=sip_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SipServerInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_sip_server_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create SIP server instant test - - Creates and runs a new SIP server instant test. - - :param sip_server_instant_test_request: (required) - :type sip_server_instant_test_request: SipServerInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_sip_server_serialize( - sip_server_instant_test_request=sip_server_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SipServerInstantTest", - '400': "Error", - '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_instant_sip_server_serialize( - self, - sip_server_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 sip_server_instant_test_request is not None: - _body_params = sip_server_instant_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/tests/sip-server/instant', - 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/instant_tests_api/instant_tests_api/api/voice_api.py b/instant_tests_api/instant_tests_api/api/voice_api.py deleted file mode 100644 index b4060d86..00000000 --- a/instant_tests_api/instant_tests_api/api/voice_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.voice_instant_test import VoiceInstantTest -from instant_tests_api.models.voice_instant_test_request import VoiceInstantTestRequest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class VoiceApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_voice( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> VoiceInstantTest: - """Create voice instant test - - Creates and runs a voice instant test. - - :param voice_instant_test_request: (required) - :type voice_instant_test_request: VoiceInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_voice_serialize( - voice_instant_test_request=voice_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "VoiceInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_voice_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[VoiceInstantTest]: - """Create voice instant test - - Creates and runs a voice instant test. - - :param voice_instant_test_request: (required) - :type voice_instant_test_request: VoiceInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_voice_serialize( - voice_instant_test_request=voice_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "VoiceInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_voice_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create voice instant test - - Creates and runs a voice instant test. - - :param voice_instant_test_request: (required) - :type voice_instant_test_request: VoiceInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_voice_serialize( - voice_instant_test_request=voice_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "VoiceInstantTest", - '400': "Error", - '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_instant_voice_serialize( - self, - voice_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 voice_instant_test_request is not None: - _body_params = voice_instant_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/tests/voice/instant', - 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/instant_tests_api/instant_tests_api/api/web_transaction_api.py b/instant_tests_api/instant_tests_api/api/web_transaction_api.py deleted file mode 100644 index db409ce4..00000000 --- a/instant_tests_api/instant_tests_api/api/web_transaction_api.py +++ /dev/null @@ -1,386 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.web_transaction_instant_test import WebTransactionInstantTest -from instant_tests_api.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest - -from instant_tests_api.api_client import ApiClient -from instant_tests_api.api_response import ApiResponse -from instant_tests_api.rest import RESTResponseType - - -class WebTransactionApi: - """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() - self.api_client = api_client - - - @validate_call - def post_instant_web_transactions( - 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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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, - ) -> WebTransactionInstantTest: - """Create web transactions instant test - - Creates and runs a new Web transactions instant test. - - :param web_transaction_instant_test_request: (required) - :type web_transaction_instant_test_request: WebTransactionInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_web_transactions_serialize( - web_transaction_instant_test_request=web_transaction_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WebTransactionInstantTest", - '400': "Error", - '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, - ).data - - - @validate_call - def post_instant_web_transactions_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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[WebTransactionInstantTest]: - """Create web transactions instant test - - Creates and runs a new Web transactions instant test. - - :param web_transaction_instant_test_request: (required) - :type web_transaction_instant_test_request: WebTransactionInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_web_transactions_serialize( - web_transaction_instant_test_request=web_transaction_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WebTransactionInstantTest", - '400': "Error", - '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, - ) - - - @validate_call - def post_instant_web_transactions_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, - expand: Annotated[Optional[List[Expand]], Field(description="(Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=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: - """Create web transactions instant test - - Creates and runs a new Web transactions instant test. - - :param web_transaction_instant_test_request: (required) - :type web_transaction_instant_test_request: WebTransactionInstantTestRequest - :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: (Optional) Indicates if the test sub-resources should be expanded. Defaults to no expansion. To expand the `agents` sub-resource, use the query `?expand=agent`. - :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._post_instant_web_transactions_serialize( - web_transaction_instant_test_request=web_transaction_instant_test_request, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WebTransactionInstantTest", - '400': "Error", - '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_instant_web_transactions_serialize( - self, - web_transaction_instant_test_request, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 web_transaction_instant_test_request is not None: - _body_params = web_transaction_instant_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/tests/web-transactions/instant', - 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/instant_tests_api/instant_tests_api/api_client.py b/instant_tests_api/instant_tests_api/api_client.py deleted file mode 100644 index 4a8d09e9..00000000 --- a/instant_tests_api/instant_tests_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from instant_tests_api.configuration import Configuration -from instant_tests_api.api_response import ApiResponse -import instant_tests_api.models -from instant_tests_api import rest -from instant_tests_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(instant_tests_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/instant_tests_api/instant_tests_api/api_response.py b/instant_tests_api/instant_tests_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/instant_tests_api/instant_tests_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/instant_tests_api/instant_tests_api/configuration.py b/instant_tests_api/instant_tests_api/configuration.py deleted file mode 100644 index 6465abed..00000000 --- a/instant_tests_api/instant_tests_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("instant_tests_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/instant_tests_api/instant_tests_api/exceptions.py b/instant_tests_api/instant_tests_api/exceptions.py deleted file mode 100644 index b49918fa..00000000 --- a/instant_tests_api/instant_tests_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/instant_tests_api/instant_tests_api/models/__init__.py b/instant_tests_api/instant_tests_api/models/__init__.py deleted file mode 100644 index 72b21e0c..00000000 --- a/instant_tests_api/instant_tests_api/models/__init__.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.agent_base import AgentBase -from instant_tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest -from instant_tests_api.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest -from instant_tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from instant_tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest -from instant_tests_api.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest -from instant_tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.dns_sec_instant_test import DnsSecInstantTest -from instant_tests_api.models.dns_sec_instant_test_request import DnsSecInstantTestRequest -from instant_tests_api.models.dns_server_instant_test import DnsServerInstantTest -from instant_tests_api.models.dns_server_instant_test_request import DnsServerInstantTestRequest -from instant_tests_api.models.dns_servers_request import DnsServersRequest -from instant_tests_api.models.dns_trace_instant_test import DnsTraceInstantTest -from instant_tests_api.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest -from instant_tests_api.models.error import Error -from instant_tests_api.models.expand import Expand -from instant_tests_api.models.ftp_server_instant_test import FtpServerInstantTest -from instant_tests_api.models.ftp_server_request_type import FtpServerRequestType -from instant_tests_api.models.http_server_instant_test import HttpServerInstantTest -from instant_tests_api.models.http_server_instant_test_request import HttpServerInstantTestRequest -from instant_tests_api.models.instant_test import InstantTest -from instant_tests_api.models.instant_test_request import InstantTestRequest -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.link import Link -from instant_tests_api.models.map_item import MapItem -from instant_tests_api.models.page_load_instant_test import PageLoadInstantTest -from instant_tests_api.models.page_load_instant_test_request import PageLoadInstantTestRequest -from instant_tests_api.models.server_instant_test_request import ServerInstantTestRequest -from instant_tests_api.models.sip_server_instant_test import SipServerInstantTest -from instant_tests_api.models.sip_server_instant_test_request import SipServerInstantTestRequest -from instant_tests_api.models.sip_test_protocol import SipTestProtocol -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_custom_headers_all import TestCustomHeadersAll -from instant_tests_api.models.test_custom_headers_root import TestCustomHeadersRoot -from instant_tests_api.models.test_direction import TestDirection -from instant_tests_api.models.test_dns_server import TestDnsServer -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_sip_credentials import TestSipCredentials -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.test_type import TestType -from instant_tests_api.models.unauthorized_error import UnauthorizedError -from instant_tests_api.models.unexpanded_instant_test import UnexpandedInstantTest -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from instant_tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from instant_tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from instant_tests_api.models.voice_instant_test import VoiceInstantTest -from instant_tests_api.models.voice_instant_test_request import VoiceInstantTestRequest -from instant_tests_api.models.web_transaction_instant_test import WebTransactionInstantTest -from instant_tests_api.models.web_transaction_instant_test_request import WebTransactionInstantTestRequest diff --git a/instant_tests_api/instant_tests_api/models/agent.py b/instant_tests_api/instant_tests_api/models/agent.py deleted file mode 100644 index df721d19..00000000 --- a/instant_tests_api/instant_tests_api/models/agent.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -try: - from typing import Self -except ImportError: - 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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", "agentType", "location", "countryId", "enabled", "verifySslCertificates"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/agent_base.py b/instant_tests_api/instant_tests_api/models/agent_base.py deleted file mode 100644 index 0dc01f42..00000000 --- a/instant_tests_api/instant_tests_api/models/agent_base.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test.py b/instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test.py deleted file mode 100644 index bac133dd..00000000 --- a/instant_tests_api/instant_tests_api/models/agent_to_agent_instant_test.py +++ /dev/null @@ -1,197 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from instant_tests_api.models.test_direction import TestDirection -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentToAgentInstantTest(BaseModel): - """ - AgentToAgentInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - direction: Optional[TestDirection] = None - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") - protocol: Optional[AgentToAgentTestProtocol] = None - target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") - throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") - throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") - throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToAgentInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of AgentToAgentInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "direction": obj.get("direction"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "mss": obj.get("mss"), - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "targetAgentId": obj.get("targetAgentId"), - "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, - "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, - "throughputRate": obj.get("throughputRate"), - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/agent_to_agent_test_protocol.py b/instant_tests_api/instant_tests_api/models/agent_to_agent_test_protocol.py deleted file mode 100644 index 3a7f1133..00000000 --- a/instant_tests_api/instant_tests_api/models/agent_to_agent_test_protocol.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentToAgentTestProtocol(str, Enum): - """ - AgentToAgentTestProtocol - """ - - """ - allowed enum values - """ - TCP = 'tcp' - UDP = 'udp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToAgentTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/agent_to_server_instant_test.py b/instant_tests_api/instant_tests_api/models/agent_to_server_instant_test.py deleted file mode 100644 index 6495a9b2..00000000 --- a/instant_tests_api/instant_tests_api/models/agent_to_server_instant_test.py +++ /dev/null @@ -1,202 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentToServerInstantTest(BaseModel): - """ - AgentToServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") - mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - server: StrictStr = Field(description="Target name or IP address.") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") - network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of AgentToServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "continuousMode": obj.get("continuousMode"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "ipv6Policy": obj.get("ipv6Policy"), - "pingPayloadSize": obj.get("pingPayloadSize"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/cloud_enterprise_agent_type.py b/instant_tests_api/instant_tests_api/models/cloud_enterprise_agent_type.py deleted file mode 100644 index 457946fa..00000000 --- a/instant_tests_api/instant_tests_api/models/cloud_enterprise_agent_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/instant_tests_api/instant_tests_api/models/dns_query_class.py b/instant_tests_api/instant_tests_api/models/dns_query_class.py deleted file mode 100644 index 6170e256..00000000 --- a/instant_tests_api/instant_tests_api/models/dns_query_class.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DnsQueryClass(str, Enum): - """ - Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. - """ - - """ - allowed enum values - """ - IN = 'in' - CH = 'ch' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsQueryClass from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/dns_sec_instant_test.py b/instant_tests_api/instant_tests_api/models/dns_sec_instant_test.py deleted file mode 100644 index 8da853e4..00000000 --- a/instant_tests_api/instant_tests_api/models/dns_sec_instant_test.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsSecInstantTest(BaseModel): - """ - DnsSecInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "domain", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsSecInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of DnsSecInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/dns_server_instant_test.py b/instant_tests_api/instant_tests_api/models/dns_server_instant_test.py deleted file mode 100644 index 33db62a8..00000000 --- a/instant_tests_api/instant_tests_api/models/dns_server_instant_test.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.test_dns_server import TestDnsServer -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsServerInstantTest(BaseModel): - """ - DnsServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - dns_servers: List[TestDnsServer] = Field(alias="dnsServers") - dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) - _items = [] - if self.dns_servers: - for _item in self.dns_servers: - if _item: - _items.append(_item.to_dict()) - _dict['dnsServers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DnsServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj.get("dnsServers")] if obj.get("dnsServers") is not None else None, - "dnsTransportProtocol": obj.get("dnsTransportProtocol"), - "domain": obj.get("domain"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "recursiveQueries": obj.get("recursiveQueries"), - "ipv6Policy": obj.get("ipv6Policy"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/dns_servers_request.py b/instant_tests_api/instant_tests_api/models/dns_servers_request.py deleted file mode 100644 index bd06329b..00000000 --- a/instant_tests_api/instant_tests_api/models/dns_servers_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsServersRequest(BaseModel): - """ - DnsServersRequest - """ # noqa: E501 - dns_servers: Optional[List[StrictStr]] = Field(default=None, description="A list of DNS server FQDN.", alias="dnsServers") - __properties: ClassVar[List[str]] = ["dnsServers"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsServersRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DnsServersRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dnsServers": obj.get("dnsServers") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/dns_trace_instant_test.py b/instant_tests_api/instant_tests_api/models/dns_trace_instant_test.py deleted file mode 100644 index c9030449..00000000 --- a/instant_tests_api/instant_tests_api/models/dns_trace_instant_test.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.dns_query_class import DnsQueryClass -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsTraceInstantTest(BaseModel): - """ - DnsTraceInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "dnsTransportProtocol", "domain", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsTraceInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of DnsTraceInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "dnsTransportProtocol": obj.get("dnsTransportProtocol"), - "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/error.py b/instant_tests_api/instant_tests_api/models/error.py deleted file mode 100644 index 5883f8ca..00000000 --- a/instant_tests_api/instant_tests_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/instant_tests_api/instant_tests_api/models/expand.py b/instant_tests_api/instant_tests_api/models/expand.py deleted file mode 100644 index 282a6baf..00000000 --- a/instant_tests_api/instant_tests_api/models/expand.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - AGENT = 'agent' - LABEL = 'label' - SHARED_MINUS_WITH_MINUS_ACCOUNT = 'shared-with-account' - - @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/instant_tests_api/instant_tests_api/models/ftp_server_instant_test.py b/instant_tests_api/instant_tests_api/models/ftp_server_instant_test.py deleted file mode 100644 index efd8af95..00000000 --- a/instant_tests_api/instant_tests_api/models/ftp_server_instant_test.py +++ /dev/null @@ -1,206 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.ftp_server_request_type import FtpServerRequestType -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class FtpServerInstantTest(BaseModel): - """ - FtpServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") - ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") - ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: StrictStr = Field(description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - request_type: FtpServerRequestType = Field(alias="requestType") - url: StrictStr = Field(description="Target for the test.") - use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") - use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") - username: StrictStr = Field(description="Username for Basic/NTLM authentication.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FtpServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of FtpServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "downloadLimit": obj.get("downloadLimit"), - "ftpTargetTime": obj.get("ftpTargetTime"), - "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "requestType": obj.get("requestType"), - "url": obj.get("url"), - "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, - "useExplicitFtps": obj.get("useExplicitFtps"), - "username": obj.get("username"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/ftp_server_request_type.py b/instant_tests_api/instant_tests_api/models/ftp_server_request_type.py deleted file mode 100644 index 5f0a0e28..00000000 --- a/instant_tests_api/instant_tests_api/models/ftp_server_request_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class FtpServerRequestType(str, Enum): - """ - Set the type of activity for the test. - """ - - """ - allowed enum values - """ - DOWNLOAD = 'download' - UPLOAD = 'upload' - LIST = 'list' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FtpServerRequestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/http_server_instant_test.py b/instant_tests_api/instant_tests_api/models/http_server_instant_test.py deleted file mode 100644 index 752ade27..00000000 --- a/instant_tests_api/instant_tests_api/models/http_server_instant_test.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpServerInstantTest(BaseModel): - """ - HttpServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") - headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") - 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") - download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") - dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - 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") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - 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") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "ipv6Policy", "followRedirects", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "headers": obj.get("headers"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', - "downloadLimit": obj.get("downloadLimit"), - "dnsOverride": obj.get("dnsOverride"), - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "postBody": obj.get("postBody"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "ipv6Policy": obj.get("ipv6Policy"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/instant_test.py b/instant_tests_api/instant_tests_api/models/instant_test.py deleted file mode 100644 index 5a1d16a8..00000000 --- a/instant_tests_api/instant_tests_api/models/instant_test.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_type import TestType -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class InstantTest(BaseModel): - """ - InstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "labels", - "shared_with_accounts", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of InstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/instant_test_request.py b/instant_tests_api/instant_tests_api/models/instant_test_request.py deleted file mode 100644 index daf26aa8..00000000 --- a/instant_tests_api/instant_tests_api/models/instant_test_request.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class InstantTestRequest(BaseModel): - """ - InstantTestRequest - """ # noqa: E501 - 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") - agents: Optional[List[InstantTestRequestAgentsInner]] = Field(default=None, description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") - __properties: ClassVar[List[str]] = ["labels", "sharedWithAccounts", "agents"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InstantTestRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of InstantTestRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labels": obj.get("labels"), - "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/instant_test_request_agents_inner.py b/instant_tests_api/instant_tests_api/models/instant_test_request_agents_inner.py deleted file mode 100644 index 693b8ae6..00000000 --- a/instant_tests_api/instant_tests_api/models/instant_test_request_agents_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class InstantTestRequestAgentsInner(BaseModel): - """ - InstantTestRequestAgentsInner - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Identifier for the agent (get `agentId` from `/agents` endpoint).", alias="agentId") - source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address from the agent's `ipAddresses` field (get `ipAddresses` from `/agents` endpoint). Used for interface selection.", alias="sourceIpAddress") - __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InstantTestRequestAgentsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of InstantTestRequestAgentsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agentId": obj.get("agentId"), - "sourceIpAddress": obj.get("sourceIpAddress") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/link.py b/instant_tests_api/instant_tests_api/models/link.py deleted file mode 100644 index 256be11d..00000000 --- a/instant_tests_api/instant_tests_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/instant_tests_api/instant_tests_api/models/map_item.py b/instant_tests_api/instant_tests_api/models/map_item.py deleted file mode 100644 index fa1ffd17..00000000 --- a/instant_tests_api/instant_tests_api/models/map_item.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class MapItem(BaseModel): - """ - MapItem - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of MapItem 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of MapItem from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/page_load_instant_test.py b/instant_tests_api/instant_tests_api/models/page_load_instant_test.py deleted file mode 100644 index 7cef263a..00000000 --- a/instant_tests_api/instant_tests_api/models/page_load_instant_test.py +++ /dev/null @@ -1,243 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PageLoadInstantTest(BaseModel): - """ - PageLoadInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") - page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") - disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") - allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") - allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") - browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") - page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PageLoadInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PageLoadInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pageLoadTargetTime": obj.get("pageLoadTargetTime"), - "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "blockDomains": obj.get("blockDomains"), - "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, - "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, - "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, - "browserLanguage": obj.get("browserLanguage"), - "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/sip_server_instant_test.py b/instant_tests_api/instant_tests_api/models/sip_server_instant_test.py deleted file mode 100644 index 0a0a0818..00000000 --- a/instant_tests_api/instant_tests_api/models/sip_server_instant_test.py +++ /dev/null @@ -1,204 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.sip_test_protocol import SipTestProtocol -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_sip_credentials import TestSipCredentials -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SipServerInstantTest(BaseModel): - """ - SipServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - 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") - options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") - protocol: Optional[SipTestProtocol] = None - register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") - sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") - target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authUser", "mtuMeasurements", "networkMeasurements", "optionsRegex", "password", "pathTraceMode", "port", "protocol", "registerEnabled", "sipRegistrar", "sipTargetTime", "sipTimeLimit", "targetSipCredentials", "user", "fixedPacketRate", "ipv6Policy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of target_sip_credentials - if self.target_sip_credentials: - _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of SipServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authUser": obj.get("authUser"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "optionsRegex": obj.get("optionsRegex"), - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, - "sipRegistrar": obj.get("sipRegistrar"), - "sipTargetTime": obj.get("sipTargetTime"), - "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, - "targetSipCredentials": TestSipCredentials.from_dict(obj.get("targetSipCredentials")) if obj.get("targetSipCredentials") is not None else None, - "user": obj.get("user"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/sip_server_instant_test_request.py b/instant_tests_api/instant_tests_api/models/sip_server_instant_test_request.py deleted file mode 100644 index b38b0f1f..00000000 --- a/instant_tests_api/instant_tests_api/models/sip_server_instant_test_request.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner -from instant_tests_api.models.sip_test_protocol import SipTestProtocol -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_sip_credentials import TestSipCredentials -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SipServerInstantTestRequest(BaseModel): - """ - SipServerInstantTestRequest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = 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") - agents: List[InstantTestRequestAgentsInner] = Field(description="A list of objects with `agentId` (required) and `sourceIpAddress` (optional).") - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - 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") - options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") - protocol: Optional[SipTestProtocol] = None - register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") - sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") - target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authUser", "mtuMeasurements", "networkMeasurements", "optionsRegex", "password", "pathTraceMode", "port", "protocol", "registerEnabled", "sipRegistrar", "sipTargetTime", "sipTimeLimit", "targetSipCredentials", "user", "fixedPacketRate", "ipv6Policy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipServerInstantTestRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, - exclude_none=True, - ) - # 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 - # override the default output from pydantic by calling `to_dict()` of target_sip_credentials - if self.target_sip_credentials: - _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of SipServerInstantTestRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": obj.get("labels"), - "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [InstantTestRequestAgentsInner.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authUser": obj.get("authUser"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "optionsRegex": obj.get("optionsRegex"), - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, - "sipRegistrar": obj.get("sipRegistrar"), - "sipTargetTime": obj.get("sipTargetTime"), - "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, - "targetSipCredentials": TestSipCredentials.from_dict(obj.get("targetSipCredentials")) if obj.get("targetSipCredentials") is not None else None, - "user": obj.get("user"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/sip_test_protocol.py b/instant_tests_api/instant_tests_api/models/sip_test_protocol.py deleted file mode 100644 index 7a1e6577..00000000 --- a/instant_tests_api/instant_tests_api/models/sip_test_protocol.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class SipTestProtocol(str, Enum): - """ - Transport layer for SIP communication. - """ - - """ - allowed enum values - """ - TCP = 'tcp' - TLS = 'tls' - UDP = 'udp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_auth_type.py b/instant_tests_api/instant_tests_api/models/test_auth_type.py deleted file mode 100644 index 36eea66d..00000000 --- a/instant_tests_api/instant_tests_api/models/test_auth_type.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestAuthType(str, Enum): - """ - HTTP authentication type. - """ - - """ - allowed enum values - """ - NONE = 'none' - BASIC = 'basic' - NTLM = 'ntlm' - KERBEROS = 'kerberos' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestAuthType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_custom_headers.py b/instant_tests_api/instant_tests_api/models/test_custom_headers.py deleted file mode 100644 index 59e4aa23..00000000 --- a/instant_tests_api/instant_tests_api/models/test_custom_headers.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from instant_tests_api.models.map_item import MapItem -from instant_tests_api.models.test_custom_headers_all import TestCustomHeadersAll -from instant_tests_api.models.test_custom_headers_root import TestCustomHeadersRoot -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestCustomHeaders(BaseModel): - """ - TestCustomHeaders - """ # noqa: E501 - root: Optional[TestCustomHeadersRoot] = None - domains: Optional[Dict[str, MapItem]] = Field(default=None, description="Use these HTTP headers for the specified domains.") - all: Optional[TestCustomHeadersAll] = None - __properties: ClassVar[List[str]] = ["root", "domains", "all"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestCustomHeaders 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of root - if self.root: - _dict['root'] = self.root.to_dict() - # override the default output from pydantic by calling `to_dict()` of each value in domains (dict) - _field_dict = {} - if self.domains: - for _key in self.domains: - if self.domains[_key]: - _field_dict[_key] = self.domains[_key].to_dict() - _dict['domains'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of all - if self.all: - _dict['all'] = self.all.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestCustomHeaders from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "root": TestCustomHeadersRoot.from_dict(obj.get("root")) if obj.get("root") is not None else None, - "domains": dict( - (_k, MapItem.from_dict(_v)) - for _k, _v in obj.get("domains").items() - ) - if obj.get("domains") is not None - else None, - "all": TestCustomHeadersAll.from_dict(obj.get("all")) if obj.get("all") is not None else None - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_custom_headers_all.py b/instant_tests_api/instant_tests_api/models/test_custom_headers_all.py deleted file mode 100644 index 07477fdf..00000000 --- a/instant_tests_api/instant_tests_api/models/test_custom_headers_all.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestCustomHeadersAll(BaseModel): - """ - TestCustomHeadersAll - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestCustomHeadersAll 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestCustomHeadersAll from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_custom_headers_root.py b/instant_tests_api/instant_tests_api/models/test_custom_headers_root.py deleted file mode 100644 index 226d1163..00000000 --- a/instant_tests_api/instant_tests_api/models/test_custom_headers_root.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestCustomHeadersRoot(BaseModel): - """ - TestCustomHeadersRoot - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestCustomHeadersRoot 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestCustomHeadersRoot from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_direction.py b/instant_tests_api/instant_tests_api/models/test_direction.py deleted file mode 100644 index ff2290f8..00000000 --- a/instant_tests_api/instant_tests_api/models/test_direction.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDirection(str, Enum): - """ - Direction of the test, which affects how results are shown. - """ - - """ - allowed enum values - """ - TO_MINUS_TARGET = 'to-target' - FROM_MINUS_TARGET = 'from-target' - BIDIRECTIONAL = 'bidirectional' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDirection from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_dns_server.py b/instant_tests_api/instant_tests_api/models/test_dns_server.py deleted file mode 100644 index 96407446..00000000 --- a/instant_tests_api/instant_tests_api/models/test_dns_server.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestDnsServer(BaseModel): - """ - TestDnsServer - """ # noqa: E501 - server_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the DNS server.", alias="serverId") - server_name: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name (FQDN) of DNS server.", alias="serverName") - __properties: ClassVar[List[str]] = ["serverId", "serverName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDnsServer 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestDnsServer from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "serverId": obj.get("serverId"), - "serverName": obj.get("serverName") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_dns_transport_protocol.py b/instant_tests_api/instant_tests_api/models/test_dns_transport_protocol.py deleted file mode 100644 index 834545cd..00000000 --- a/instant_tests_api/instant_tests_api/models/test_dns_transport_protocol.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDnsTransportProtocol(str, Enum): - """ - Transport protocol used for DNS requests. - """ - - """ - allowed enum values - """ - UDP = 'udp' - TCP = 'tcp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDnsTransportProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_dscp_id.py b/instant_tests_api/instant_tests_api/models/test_dscp_id.py deleted file mode 100644 index a1036077..00000000 --- a/instant_tests_api/instant_tests_api/models/test_dscp_id.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDscpId(str, Enum): - """ - DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_8 = '8' - ENUM_16 = '16' - ENUM_24 = '24' - ENUM_32 = '32' - ENUM_40 = '40' - ENUM_48 = '48' - ENUM_56 = '56' - ENUM_10 = '10' - ENUM_12 = '12' - ENUM_14 = '14' - ENUM_18 = '18' - ENUM_20 = '20' - ENUM_22 = '22' - ENUM_26 = '26' - ENUM_28 = '28' - ENUM_30 = '30' - ENUM_34 = '34' - ENUM_36 = '36' - ENUM_38 = '38' - ENUM_46 = '46' - ENUM_44 = '44' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDscpId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_ipv6_policy.py b/instant_tests_api/instant_tests_api/models/test_ipv6_policy.py deleted file mode 100644 index 3689c185..00000000 --- a/instant_tests_api/instant_tests_api/models/test_ipv6_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestIpv6Policy(str, Enum): - """ - IP version policy. Overrides the IPv6 policy configured at the agent level. - """ - - """ - allowed enum values - """ - FORCE_MINUS_IPV4 = 'force-ipv4' - PREFER_MINUS_IPV6 = 'prefer-ipv6' - FORCE_MINUS_IPV6 = 'force-ipv6' - USE_MINUS_AGENT_MINUS_POLICY = 'use-agent-policy' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestIpv6Policy from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_labels_inner.py b/instant_tests_api/instant_tests_api/models/test_labels_inner.py deleted file mode 100644 index f69b1f70..00000000 --- a/instant_tests_api/instant_tests_api/models/test_labels_inner.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestLabelsInner(BaseModel): - """ - TestLabelsInner - """ # noqa: E501 - label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") - name: Optional[StrictStr] = Field(default=None, description="Name of the label.") - is_built_in: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltIn") - __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltIn"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestLabelsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestLabelsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labelId": obj.get("labelId"), - "name": obj.get("name"), - "isBuiltIn": obj.get("isBuiltIn") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_page_loading_strategy.py b/instant_tests_api/instant_tests_api/models/test_page_loading_strategy.py deleted file mode 100644 index a0dbf671..00000000 --- a/instant_tests_api/instant_tests_api/models/test_page_loading_strategy.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestPageLoadingStrategy(str, Enum): - """ - * `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. - """ - - """ - allowed enum values - """ - NORMAL = 'normal' - EAGER = 'eager' - NONE = 'none' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestPageLoadingStrategy from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_path_trace_mode.py b/instant_tests_api/instant_tests_api/models/test_path_trace_mode.py deleted file mode 100644 index 847c9c37..00000000 --- a/instant_tests_api/instant_tests_api/models/test_path_trace_mode.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestPathTraceMode(str, Enum): - """ - Select `inSession` to perform the path trace within a TCP session. - """ - - """ - allowed enum values - """ - CLASSIC = 'classic' - IN_MINUS_SESSION = 'in-session' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestPathTraceMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_probe_mode.py b/instant_tests_api/instant_tests_api/models/test_probe_mode.py deleted file mode 100644 index 8b471630..00000000 --- a/instant_tests_api/instant_tests_api/models/test_probe_mode.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProbeMode(str, Enum): - """ - Probe mode used by network test, only valid when the protocol is set to TCP. - """ - - """ - allowed enum values - """ - AUTO = 'auto' - SACK = 'sack' - SYN = 'syn' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProbeMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_protocol.py b/instant_tests_api/instant_tests_api/models/test_protocol.py deleted file mode 100644 index 4397d25b..00000000 --- a/instant_tests_api/instant_tests_api/models/test_protocol.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProtocol(str, Enum): - """ - Protocol used by dependent network tests (end-to-end, path trace, PMTUD). - """ - - """ - allowed enum values - """ - TCP = 'tcp' - ICMP = 'icmp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_shared_accounts_inner.py b/instant_tests_api/instant_tests_api/models/test_shared_accounts_inner.py deleted file mode 100644 index 7a613e14..00000000 --- a/instant_tests_api/instant_tests_api/models/test_shared_accounts_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestSharedAccountsInner(BaseModel): - """ - TestSharedAccountsInner - """ # noqa: E501 - aid: Optional[StrictStr] = Field(default=None, description="Account group ID.") - name: Optional[StrictStr] = Field(default=None, description="Account group name.") - __properties: ClassVar[List[str]] = ["aid", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSharedAccountsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestSharedAccountsInner 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"), - "name": obj.get("name") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_sip_credentials.py b/instant_tests_api/instant_tests_api/models/test_sip_credentials.py deleted file mode 100644 index 10123a79..00000000 --- a/instant_tests_api/instant_tests_api/models/test_sip_credentials.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.sip_test_protocol import SipTestProtocol -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestSipCredentials(BaseModel): - """ - TestSipCredentials - """ # noqa: E501 - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - password: Optional[StrictStr] = Field(default=None, description="Password for authentication with SIP server.") - port: Annotated[int, Field(le=65535, strict=True, ge=1024)] = Field(description="Port number for the chosen protocol.") - protocol: Optional[SipTestProtocol] = None - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - __properties: ClassVar[List[str]] = ["authUser", "password", "port", "protocol", "sipRegistrar", "user"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSipCredentials 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestSipCredentials from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authUser": obj.get("authUser"), - "password": obj.get("password"), - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "sipRegistrar": obj.get("sipRegistrar"), - "user": obj.get("user") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py b/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py deleted file mode 100644 index 6f9c575b..00000000 --- a/instant_tests_api/instant_tests_api/models/test_ssl_version_id.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestSslVersionId(str, Enum): - """ - SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_3 = '3' - ENUM_4 = '4' - ENUM_5 = '5' - ENUM_6 = '6' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSslVersionId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/test_type.py b/instant_tests_api/instant_tests_api/models/test_type.py deleted file mode 100644 index 340fb364..00000000 --- a/instant_tests_api/instant_tests_api/models/test_type.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestType(str, Enum): - """ - This is a read only value, as test type is implicit in the test creation url. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - BGP = 'bgp' - HTTP_MINUS_SERVER = 'http-server' - PAGE_MINUS_LOAD = 'page-load' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - FTP_MINUS_SERVER = 'ftp-server' - DNS_MINUS_TRACE = 'dns-trace' - DNS_MINUS_SERVER = 'dns-server' - DNSSEC = 'dnssec' - SIP_MINUS_SERVER = 'sip-server' - VOICE = 'voice' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/instant_tests_api/instant_tests_api/models/unauthorized_error.py b/instant_tests_api/instant_tests_api/models/unauthorized_error.py deleted file mode 100644 index cbe2c0ea..00000000 --- a/instant_tests_api/instant_tests_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/instant_tests_api/instant_tests_api/models/unexpanded_instant_test.py b/instant_tests_api/instant_tests_api/models/unexpanded_instant_test.py deleted file mode 100644 index 2117c466..00000000 --- a/instant_tests_api/instant_tests_api/models/unexpanded_instant_test.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from instant_tests_api.models.test_type import TestType -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTest(BaseModel): - """ - UnexpandedInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UnexpandedInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links.py b/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links.py deleted file mode 100644 index e1913e9e..00000000 --- a/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from instant_tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from instant_tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information - """ # noqa: E501 - var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[UnexpandedInstantTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": UnexpandedInstantTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": UnexpandedInstantTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_self.py b/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_self.py deleted file mode 100644 index e74279a1..00000000 --- a/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinksSelf(BaseModel): - """ - UnexpandedInstantTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_test_results.py b/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_test_results.py deleted file mode 100644 index df1b1081..00000000 --- a/instant_tests_api/instant_tests_api/models/unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from instant_tests_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -UNEXPANDEDINSTANTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class UnexpandedInstantTestLinksTestResults(BaseModel): - """ - UnexpandedInstantTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = UnexpandedInstantTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/instant_tests_api/instant_tests_api/models/voice_instant_test.py b/instant_tests_api/instant_tests_api/models/voice_instant_test.py deleted file mode 100644 index bd5b441b..00000000 --- a/instant_tests_api/instant_tests_api/models/voice_instant_test.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.test_dscp_id import TestDscpId -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class VoiceInstantTest(BaseModel): - """ - VoiceInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - codec: Optional[StrictStr] = Field(default=None, description="Codec label") - codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") - jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") - target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VoiceInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "codec", - "dscp", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of VoiceInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "codec": obj.get("codec"), - "codecId": obj.get("codecId"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "duration": obj.get("duration") if obj.get("duration") is not None else 5, - "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "port": obj.get("port"), - "targetAgentId": obj.get("targetAgentId") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/models/web_transaction_instant_test.py b/instant_tests_api/instant_tests_api/models/web_transaction_instant_test.py deleted file mode 100644 index 5839381a..00000000 --- a/instant_tests_api/instant_tests_api/models/web_transaction_instant_test.py +++ /dev/null @@ -1,249 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from instant_tests_api.models.agent import Agent -from instant_tests_api.models.test_auth_type import TestAuthType -from instant_tests_api.models.test_custom_headers import TestCustomHeaders -from instant_tests_api.models.test_labels_inner import TestLabelsInner -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode -from instant_tests_api.models.test_probe_mode import TestProbeMode -from instant_tests_api.models.test_protocol import TestProtocol -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class WebTransactionInstantTest(BaseModel): - """ - WebTransactionInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - 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") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds.", alias="targetTime") - time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") - transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") - disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") - allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") - allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") - browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") - page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "credentials", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WebTransactionInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of WebTransactionInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "credentials": obj.get("credentials"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "targetTime": obj.get("targetTime"), - "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, - "transactionScript": obj.get("transactionScript"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "blockDomains": obj.get("blockDomains"), - "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, - "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, - "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, - "browserLanguage": obj.get("browserLanguage"), - "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/instant_tests_api/instant_tests_api/rest.py b/instant_tests_api/instant_tests_api/rest.py deleted file mode 100644 index cfbf6daf..00000000 --- a/instant_tests_api/instant_tests_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from instant_tests_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/instant_tests_api/pyproject.toml b/instant_tests_api/pyproject.toml deleted file mode 100644 index 05d9544a..00000000 --- a/instant_tests_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "instant_tests_api" -version = "1.0.0" -description = "Instant Tests API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Instant Tests API"] -include = ["instant_tests_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/instant_tests_api/setup.py b/instant_tests_api/setup.py deleted file mode 100644 index dd59dc3a..00000000 --- a/instant_tests_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "instant-tests-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Instant Tests API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Instant Tests API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ### Overview 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. - """, # noqa: E501 - package_data={"instant_tests_api": ["py.typed"]}, -) diff --git a/instant_tests_api/test-requirements.txt b/instant_tests_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/instant_tests_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/instant_tests_api/test/test_agent.py b/instant_tests_api/test/test_agent.py deleted file mode 100644 index 37cf1ca5..00000000 --- a/instant_tests_api/test/test_agent.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent import Agent - -class TestAgent(unittest.TestCase): - """Agent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Agent: - """Test Agent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Agent` - """ - model = Agent() - if include_optional: - return Agent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True - ) - else: - return Agent( - ) - """ - - def testAgent(self): - """Test Agent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_base.py b/instant_tests_api/test/test_agent_base.py deleted file mode 100644 index 5cd307a6..00000000 --- a/instant_tests_api/test/test_agent_base.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_base import AgentBase - -class TestAgentBase(unittest.TestCase): - """AgentBase unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentBase: - """Test AgentBase - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentBase` - """ - model = AgentBase() - if include_optional: - return AgentBase( - ip_addresses = ["99.139.65.220","99.139.65.221"], - public_ip_addresses = ["192.168.1.78","192.168.1.79"], - network = 'AT&T Services, Inc. (AS 7018)' - ) - else: - return AgentBase( - ) - """ - - def testAgentBase(self): - """Test AgentBase""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_agent_api.py b/instant_tests_api/test/test_agent_to_agent_api.py deleted file mode 100644 index 684d2d24..00000000 --- a/instant_tests_api/test/test_agent_to_agent_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_test_agent_to_agent(self) -> None: - """Test case for post_instant_test_agent_to_agent - - Create agent-to-agent instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_agent_instant_test.py b/instant_tests_api/test/test_agent_to_agent_instant_test.py deleted file mode 100644 index 53dbefee..00000000 --- a/instant_tests_api/test/test_agent_to_agent_instant_test.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest - -class TestAgentToAgentInstantTest(unittest.TestCase): - """AgentToAgentInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentToAgentInstantTest: - """Test AgentToAgentInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentToAgentInstantTest` - """ - model = AgentToAgentInstantTest() - if include_optional: - return AgentToAgentInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-agent', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - direction = 'to-target', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - mss = 20, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - target_agent_id = '2954', - throughput_measurements = True, - throughput_duration = 5000, - throughput_rate = 8, - fixed_packet_rate = 50 - ) - else: - return AgentToAgentInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - target_agent_id = '2954', - ) - """ - - def testAgentToAgentInstantTest(self): - """Test AgentToAgentInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_agent_instant_test_request.py b/instant_tests_api/test/test_agent_to_agent_instant_test_request.py deleted file mode 100644 index 22dc2a31..00000000 --- a/instant_tests_api/test/test_agent_to_agent_instant_test_request.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_to_agent_instant_test_request import AgentToAgentInstantTestRequest - -class TestAgentToAgentInstantTestRequest(unittest.TestCase): - """AgentToAgentInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentToAgentInstantTestRequest: - """Test AgentToAgentInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentToAgentInstantTestRequest` - """ - model = AgentToAgentInstantTestRequest() - if include_optional: - return AgentToAgentInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-agent', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - direction = 'to-target', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - mss = 20, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - target_agent_id = '2954', - throughput_measurements = True, - throughput_duration = 5000, - throughput_rate = 8, - fixed_packet_rate = 50 - ) - else: - return AgentToAgentInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - target_agent_id = '2954', - ) - """ - - def testAgentToAgentInstantTestRequest(self): - """Test AgentToAgentInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_agent_test_protocol.py b/instant_tests_api/test/test_agent_to_agent_test_protocol.py deleted file mode 100644 index 344681d7..00000000 --- a/instant_tests_api/test/test_agent_to_agent_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol - -class TestAgentToAgentTestProtocol(unittest.TestCase): - """AgentToAgentTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentToAgentTestProtocol(self): - """Test AgentToAgentTestProtocol""" - # inst = AgentToAgentTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_server_api.py b/instant_tests_api/test/test_agent_to_server_api.py deleted file mode 100644 index c93338d9..00000000 --- a/instant_tests_api/test/test_agent_to_server_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_agent_to_server(self) -> None: - """Test case for post_instant_agent_to_server - - Create agent-to-server instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_server_instant_test.py b/instant_tests_api/test/test_agent_to_server_instant_test.py deleted file mode 100644 index 070ae5fa..00000000 --- a/instant_tests_api/test/test_agent_to_server_instant_test.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest - -class TestAgentToServerInstantTest(unittest.TestCase): - """AgentToServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentToServerInstantTest: - """Test AgentToServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentToServerInstantTest` - """ - model = AgentToServerInstantTest() - if include_optional: - return AgentToServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - continuous_mode = False, - fixed_packet_rate = 25, - mtu_measurements = False, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - probe_mode = 'auto', - protocol = 'tcp', - server = 'www.thousandeyes.com', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - ipv6_policy = 'use-agent-policy', - ping_payload_size = 0, - network_measurements = True - ) - else: - return AgentToServerInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - server = 'www.thousandeyes.com', - ) - """ - - def testAgentToServerInstantTest(self): - """Test AgentToServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_agent_to_server_instant_test_request.py b/instant_tests_api/test/test_agent_to_server_instant_test_request.py deleted file mode 100644 index ffd86c9e..00000000 --- a/instant_tests_api/test/test_agent_to_server_instant_test_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.agent_to_server_instant_test_request import AgentToServerInstantTestRequest - -class TestAgentToServerInstantTestRequest(unittest.TestCase): - """AgentToServerInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentToServerInstantTestRequest: - """Test AgentToServerInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentToServerInstantTestRequest` - """ - model = AgentToServerInstantTestRequest() - if include_optional: - return AgentToServerInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - bandwidth_measurements = True, - continuous_mode = False, - fixed_packet_rate = 25, - mtu_measurements = False, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - probe_mode = 'auto', - protocol = 'tcp', - server = 'www.thousandeyes.com', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - ipv6_policy = 'use-agent-policy', - ping_payload_size = 0, - network_measurements = True - ) - else: - return AgentToServerInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - server = 'www.thousandeyes.com', - ) - """ - - def testAgentToServerInstantTestRequest(self): - """Test AgentToServerInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_cloud_enterprise_agent_type.py b/instant_tests_api/test/test_cloud_enterprise_agent_type.py deleted file mode 100644 index afef8395..00000000 --- a/instant_tests_api/test/test_cloud_enterprise_agent_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType - -class TestCloudEnterpriseAgentType(unittest.TestCase): - """CloudEnterpriseAgentType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCloudEnterpriseAgentType(self): - """Test CloudEnterpriseAgentType""" - # inst = CloudEnterpriseAgentType() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_query_class.py b/instant_tests_api/test/test_dns_query_class.py deleted file mode 100644 index 707ea774..00000000 --- a/instant_tests_api/test/test_dns_query_class.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_query_class import DnsQueryClass - -class TestDnsQueryClass(unittest.TestCase): - """DnsQueryClass unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDnsQueryClass(self): - """Test DnsQueryClass""" - # inst = DnsQueryClass() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_sec_instant_test.py b/instant_tests_api/test/test_dns_sec_instant_test.py deleted file mode 100644 index c61226b3..00000000 --- a/instant_tests_api/test/test_dns_sec_instant_test.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_sec_instant_test import DnsSecInstantTest - -class TestDnsSecInstantTest(unittest.TestCase): - """DnsSecInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsSecInstantTest: - """Test DnsSecInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsSecInstantTest` - """ - model = DnsSecInstantTest() - if include_optional: - return DnsSecInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dnssec', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return DnsSecInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsSecInstantTest(self): - """Test DnsSecInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_sec_instant_test_request.py b/instant_tests_api/test/test_dns_sec_instant_test_request.py deleted file mode 100644 index 5242a084..00000000 --- a/instant_tests_api/test/test_dns_sec_instant_test_request.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_sec_instant_test_request import DnsSecInstantTestRequest - -class TestDnsSecInstantTestRequest(unittest.TestCase): - """DnsSecInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsSecInstantTestRequest: - """Test DnsSecInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsSecInstantTestRequest` - """ - model = DnsSecInstantTestRequest() - if include_optional: - return DnsSecInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dnssec', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return DnsSecInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsSecInstantTestRequest(self): - """Test DnsSecInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_security_api.py b/instant_tests_api/test/test_dns_security_api.py deleted file mode 100644 index 6b74a759..00000000 --- a/instant_tests_api/test/test_dns_security_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_dns_sec(self) -> None: - """Test case for post_instant_dns_sec - - Create DNS security instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_server_api.py b/instant_tests_api/test/test_dns_server_api.py deleted file mode 100644 index 955d79a0..00000000 --- a/instant_tests_api/test/test_dns_server_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_dns_server(self) -> None: - """Test case for post_instant_dns_server - - Create DNS server instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_server_instant_test.py b/instant_tests_api/test/test_dns_server_instant_test.py deleted file mode 100644 index 87685997..00000000 --- a/instant_tests_api/test/test_dns_server_instant_test.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_server_instant_test import DnsServerInstantTest - -class TestDnsServerInstantTest(unittest.TestCase): - """DnsServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsServerInstantTest: - """Test DnsServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsServerInstantTest` - """ - model = DnsServerInstantTest() - if include_optional: - return DnsServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - dns_servers = [ - instant_tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - recursive_queries = True, - ipv6_policy = 'use-agent-policy', - fixed_packet_rate = 50, - dns_query_class = 'in' - ) - else: - return DnsServerInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - dns_servers = [ - instant_tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsServerInstantTest(self): - """Test DnsServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_server_instant_test_request.py b/instant_tests_api/test/test_dns_server_instant_test_request.py deleted file mode 100644 index 0dda14c8..00000000 --- a/instant_tests_api/test/test_dns_server_instant_test_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_server_instant_test_request import DnsServerInstantTestRequest - -class TestDnsServerInstantTestRequest(unittest.TestCase): - """DnsServerInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsServerInstantTestRequest: - """Test DnsServerInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsServerInstantTestRequest` - """ - model = DnsServerInstantTestRequest() - if include_optional: - return DnsServerInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - bandwidth_measurements = True, - dns_servers = [dns-example.net, 8.8.8.8], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - recursive_queries = True, - ipv6_policy = 'use-agent-policy', - fixed_packet_rate = 50, - dns_query_class = 'in' - ) - else: - return DnsServerInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - dns_servers = [dns-example.net, 8.8.8.8], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsServerInstantTestRequest(self): - """Test DnsServerInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_servers_request.py b/instant_tests_api/test/test_dns_servers_request.py deleted file mode 100644 index 8b6047bc..00000000 --- a/instant_tests_api/test/test_dns_servers_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_servers_request import DnsServersRequest - -class TestDnsServersRequest(unittest.TestCase): - """DnsServersRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsServersRequest: - """Test DnsServersRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsServersRequest` - """ - model = DnsServersRequest() - if include_optional: - return DnsServersRequest( - dns_servers = ["dns-example.net","8.8.8.8"] - ) - else: - return DnsServersRequest( - ) - """ - - def testDnsServersRequest(self): - """Test DnsServersRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_trace_api.py b/instant_tests_api/test/test_dns_trace_api.py deleted file mode 100644 index 67626b64..00000000 --- a/instant_tests_api/test/test_dns_trace_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_dns_trace(self) -> None: - """Test case for post_instant_dns_trace - - Create DNS trace instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_trace_instant_test.py b/instant_tests_api/test/test_dns_trace_instant_test.py deleted file mode 100644 index 656e1b44..00000000 --- a/instant_tests_api/test/test_dns_trace_instant_test.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_trace_instant_test import DnsTraceInstantTest - -class TestDnsTraceInstantTest(unittest.TestCase): - """DnsTraceInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsTraceInstantTest: - """Test DnsTraceInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsTraceInstantTest` - """ - model = DnsTraceInstantTest() - if include_optional: - return DnsTraceInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-trace', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return DnsTraceInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsTraceInstantTest(self): - """Test DnsTraceInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_dns_trace_instant_test_request.py b/instant_tests_api/test/test_dns_trace_instant_test_request.py deleted file mode 100644 index f1643c02..00000000 --- a/instant_tests_api/test/test_dns_trace_instant_test_request.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.dns_trace_instant_test_request import DnsTraceInstantTestRequest - -class TestDnsTraceInstantTestRequest(unittest.TestCase): - """DnsTraceInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsTraceInstantTestRequest: - """Test DnsTraceInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsTraceInstantTestRequest` - """ - model = DnsTraceInstantTestRequest() - if include_optional: - return DnsTraceInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-trace', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return DnsTraceInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsTraceInstantTestRequest(self): - """Test DnsTraceInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_error.py b/instant_tests_api/test/test_error.py deleted file mode 100644 index e8f41d6a..00000000 --- a/instant_tests_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_expand.py b/instant_tests_api/test/test_expand.py deleted file mode 100644 index c870630f..00000000 --- a/instant_tests_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_ftp_server_api.py b/instant_tests_api/test/test_ftp_server_api.py deleted file mode 100644 index 9d9b8b16..00000000 --- a/instant_tests_api/test/test_ftp_server_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_ftp_server(self) -> None: - """Test case for post_instant_ftp_server - - Create FTP server instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_ftp_server_instant_test.py b/instant_tests_api/test/test_ftp_server_instant_test.py deleted file mode 100644 index de36cc19..00000000 --- a/instant_tests_api/test/test_ftp_server_instant_test.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.ftp_server_instant_test import FtpServerInstantTest - -class TestFtpServerInstantTest(unittest.TestCase): - """FtpServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FtpServerInstantTest: - """Test FtpServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FtpServerInstantTest` - """ - model = FtpServerInstantTest() - if include_optional: - return FtpServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'ftp-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - download_limit = 1048576, - ftp_target_time = 1000, - ftp_time_limit = 10, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - request_type = 'download', - url = 'www.thousandeyes.com', - use_active_ftp = True, - use_explicit_ftps = False, - username = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy' - ) - else: - return FtpServerInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - password = 'password', - request_type = 'download', - url = 'www.thousandeyes.com', - username = 'username', - ) - """ - - def testFtpServerInstantTest(self): - """Test FtpServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_ftp_server_request_type.py b/instant_tests_api/test/test_ftp_server_request_type.py deleted file mode 100644 index a96e5017..00000000 --- a/instant_tests_api/test/test_ftp_server_request_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.ftp_server_request_type import FtpServerRequestType - -class TestFtpServerRequestType(unittest.TestCase): - """FtpServerRequestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFtpServerRequestType(self): - """Test FtpServerRequestType""" - # inst = FtpServerRequestType() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_http_page_load_api.py b/instant_tests_api/test/test_http_page_load_api.py deleted file mode 100644 index 033a6235..00000000 --- a/instant_tests_api/test/test_http_page_load_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_http_page_load(self) -> None: - """Test case for post_instant_http_page_load - - Create HTTP page load instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_http_server_api.py b/instant_tests_api/test/test_http_server_api.py deleted file mode 100644 index 226f1615..00000000 --- a/instant_tests_api/test/test_http_server_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_http_server(self) -> None: - """Test case for post_instant_http_server - - Create HTTP server instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_http_server_instant_test.py b/instant_tests_api/test/test_http_server_instant_test.py deleted file mode 100644 index fd49707c..00000000 --- a/instant_tests_api/test/test_http_server_instant_test.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.http_server_instant_test import HttpServerInstantTest - -class TestHttpServerInstantTest(unittest.TestCase): - """HttpServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpServerInstantTest: - """Test HttpServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpServerInstantTest` - """ - model = HttpServerInstantTest() - if include_optional: - return HttpServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'http-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - headers = ["header1: value1","header2: value2"], - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - desired_status_code = '200', - download_limit = 2048, - dns_override = '8.8.8.8', - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - post_body = '{ "example" : "value"}', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - ipv6_policy = 'use-agent-policy', - follow_redirects = True, - fixed_packet_rate = 50 - ) - else: - return HttpServerInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - url = 'www.thousandeyes.com', - ) - """ - - def testHttpServerInstantTest(self): - """Test HttpServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_instant_test.py b/instant_tests_api/test/test_instant_test.py deleted file mode 100644 index 900cdf60..00000000 --- a/instant_tests_api/test/test_instant_test.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.instant_test import InstantTest - -class TestInstantTest(unittest.TestCase): - """InstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InstantTest: - """Test InstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InstantTest` - """ - model = InstantTest() - if include_optional: - return InstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ] - ) - else: - return InstantTest( - ) - """ - - def testInstantTest(self): - """Test InstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_instant_test_request.py b/instant_tests_api/test/test_instant_test_request.py deleted file mode 100644 index 5616505b..00000000 --- a/instant_tests_api/test/test_instant_test_request.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.instant_test_request import InstantTestRequest - -class TestInstantTestRequest(unittest.TestCase): - """InstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InstantTestRequest: - """Test InstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InstantTestRequest` - """ - model = InstantTestRequest() - if include_optional: - return InstantTestRequest( - labels = ["9842","1283"], - shared_with_accounts = ["2087","100"], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ] - ) - else: - return InstantTestRequest( - ) - """ - - def testInstantTestRequest(self): - """Test InstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_instant_test_request_agents_inner.py b/instant_tests_api/test/test_instant_test_request_agents_inner.py deleted file mode 100644 index 711df800..00000000 --- a/instant_tests_api/test/test_instant_test_request_agents_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.instant_test_request_agents_inner import InstantTestRequestAgentsInner - -class TestInstantTestRequestAgentsInner(unittest.TestCase): - """InstantTestRequestAgentsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InstantTestRequestAgentsInner: - """Test InstantTestRequestAgentsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InstantTestRequestAgentsInner` - """ - model = InstantTestRequestAgentsInner() - if include_optional: - return InstantTestRequestAgentsInner( - agent_id = '', - source_ip_address = '' - ) - else: - return InstantTestRequestAgentsInner( - ) - """ - - def testInstantTestRequestAgentsInner(self): - """Test InstantTestRequestAgentsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_link.py b/instant_tests_api/test/test_link.py deleted file mode 100644 index 2717901b..00000000 --- a/instant_tests_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_map_item.py b/instant_tests_api/test/test_map_item.py deleted file mode 100644 index f7cba5b3..00000000 --- a/instant_tests_api/test/test_map_item.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.map_item import MapItem - -class TestMapItem(unittest.TestCase): - """MapItem unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MapItem: - """Test MapItem - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MapItem` - """ - model = MapItem() - if include_optional: - return MapItem( - key = '', - value = '' - ) - else: - return MapItem( - ) - """ - - def testMapItem(self): - """Test MapItem""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_page_load_instant_test.py b/instant_tests_api/test/test_page_load_instant_test.py deleted file mode 100644 index 34739cdd..00000000 --- a/instant_tests_api/test/test_page_load_instant_test.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.page_load_instant_test import PageLoadInstantTest - -class TestPageLoadInstantTest(unittest.TestCase): - """PageLoadInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PageLoadInstantTest: - """Test PageLoadInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PageLoadInstantTest` - """ - model = PageLoadInstantTest() - if include_optional: - return PageLoadInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'page-load', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - follow_redirects = True, - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - page_load_target_time = 10, - page_load_time_limit = 5, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - block_domains = 'domain.com/', - disable_screenshot = True, - allow_mic_and_camera = True, - allow_geolocation = True, - browser_language = 'en-US', - page_loading_strategy = 'normal', - fixed_packet_rate = 50 - ) - else: - return PageLoadInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - url = 'www.thousandeyes.com', - ) - """ - - def testPageLoadInstantTest(self): - """Test PageLoadInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_run_api.py b/instant_tests_api/test/test_run_api.py deleted file mode 100644 index 511059b3..00000000 --- a/instant_tests_api/test/test_run_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_run(self) -> None: - """Test case for post_instant_run - - Run instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_server_instant_test_request.py b/instant_tests_api/test/test_server_instant_test_request.py deleted file mode 100644 index ff53d56a..00000000 --- a/instant_tests_api/test/test_server_instant_test_request.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.server_instant_test_request import ServerInstantTestRequest - -class TestServerInstantTestRequest(unittest.TestCase): - """ServerInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ServerInstantTestRequest: - """Test ServerInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ServerInstantTestRequest` - """ - model = ServerInstantTestRequest() - if include_optional: - return ServerInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'ftp-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - bandwidth_measurements = True, - download_limit = 1048576, - ftp_target_time = 1000, - ftp_time_limit = 10, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - request_type = 'download', - url = 'www.thousandeyes.com', - use_active_ftp = True, - use_explicit_ftps = False, - username = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy' - ) - else: - return ServerInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - password = 'password', - request_type = 'download', - url = 'www.thousandeyes.com', - username = 'username', - ) - """ - - def testServerInstantTestRequest(self): - """Test ServerInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_sip_server_api.py b/instant_tests_api/test/test_sip_server_api.py deleted file mode 100644 index 02dd2bca..00000000 --- a/instant_tests_api/test/test_sip_server_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_sip_server(self) -> None: - """Test case for post_instant_sip_server - - Create SIP server instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_sip_server_instant_test.py b/instant_tests_api/test/test_sip_server_instant_test.py deleted file mode 100644 index 9b30df38..00000000 --- a/instant_tests_api/test/test_sip_server_instant_test.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.sip_server_instant_test import SipServerInstantTest - -class TestSipServerInstantTest(unittest.TestCase): - """SipServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SipServerInstantTest: - """Test SipServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SipServerInstantTest` - """ - model = SipServerInstantTest() - if include_optional: - return SipServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'sip-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - auth_user = 'username', - mtu_measurements = False, - network_measurements = True, - options_regex = '["a-z"]', - password = 'password', - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - register_enabled = True, - sip_registrar = 'voice.thousandeyes.com', - sip_target_time = 100, - sip_time_limit = 5, - target_sip_credentials = instant_tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - user = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy' - ) - else: - return SipServerInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - port = 1, - target_sip_credentials = instant_tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - ) - """ - - def testSipServerInstantTest(self): - """Test SipServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_sip_server_instant_test_request.py b/instant_tests_api/test/test_sip_server_instant_test_request.py deleted file mode 100644 index 5e4b9d84..00000000 --- a/instant_tests_api/test/test_sip_server_instant_test_request.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.sip_server_instant_test_request import SipServerInstantTestRequest - -class TestSipServerInstantTestRequest(unittest.TestCase): - """SipServerInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SipServerInstantTestRequest: - """Test SipServerInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SipServerInstantTestRequest` - """ - model = SipServerInstantTestRequest() - if include_optional: - return SipServerInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'sip-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - auth_user = 'username', - mtu_measurements = False, - network_measurements = True, - options_regex = '["a-z"]', - password = 'password', - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - register_enabled = True, - sip_registrar = 'voice.thousandeyes.com', - sip_target_time = 100, - sip_time_limit = 5, - target_sip_credentials = instant_tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - user = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy' - ) - else: - return SipServerInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - port = 1, - target_sip_credentials = instant_tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - ) - """ - - def testSipServerInstantTestRequest(self): - """Test SipServerInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_sip_test_protocol.py b/instant_tests_api/test/test_sip_test_protocol.py deleted file mode 100644 index 08667a52..00000000 --- a/instant_tests_api/test/test_sip_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.sip_test_protocol import SipTestProtocol - -class TestSipTestProtocol(unittest.TestCase): - """SipTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSipTestProtocol(self): - """Test SipTestProtocol""" - # inst = SipTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_auth_type.py b/instant_tests_api/test/test_test_auth_type.py deleted file mode 100644 index e3f4f43b..00000000 --- a/instant_tests_api/test/test_test_auth_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_auth_type import TestAuthType - -class TestTestAuthType(unittest.TestCase): - """TestAuthType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestAuthType(self): - """Test TestAuthType""" - # inst = TestAuthType() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_custom_headers.py b/instant_tests_api/test/test_test_custom_headers.py deleted file mode 100644 index e25caa3f..00000000 --- a/instant_tests_api/test/test_test_custom_headers.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_custom_headers import TestCustomHeaders - -class TestTestCustomHeaders(unittest.TestCase): - """TestCustomHeaders unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestCustomHeaders: - """Test TestCustomHeaders - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestCustomHeaders` - """ - model = TestCustomHeaders() - if include_optional: - return TestCustomHeaders( - root = None, - domains = { - 'key' : instant_tests_api.models.map_item.MapItem( - key = '', - value = '', ) - }, - all = None - ) - else: - return TestCustomHeaders( - ) - """ - - def testTestCustomHeaders(self): - """Test TestCustomHeaders""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_custom_headers_all.py b/instant_tests_api/test/test_test_custom_headers_all.py deleted file mode 100644 index da62d9dd..00000000 --- a/instant_tests_api/test/test_test_custom_headers_all.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_custom_headers_all import TestCustomHeadersAll - -class TestTestCustomHeadersAll(unittest.TestCase): - """TestCustomHeadersAll unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestCustomHeadersAll: - """Test TestCustomHeadersAll - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestCustomHeadersAll` - """ - model = TestCustomHeadersAll() - if include_optional: - return TestCustomHeadersAll( - key = '', - value = '' - ) - else: - return TestCustomHeadersAll( - ) - """ - - def testTestCustomHeadersAll(self): - """Test TestCustomHeadersAll""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_custom_headers_root.py b/instant_tests_api/test/test_test_custom_headers_root.py deleted file mode 100644 index 65220209..00000000 --- a/instant_tests_api/test/test_test_custom_headers_root.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_custom_headers_root import TestCustomHeadersRoot - -class TestTestCustomHeadersRoot(unittest.TestCase): - """TestCustomHeadersRoot unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestCustomHeadersRoot: - """Test TestCustomHeadersRoot - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestCustomHeadersRoot` - """ - model = TestCustomHeadersRoot() - if include_optional: - return TestCustomHeadersRoot( - key = '', - value = '' - ) - else: - return TestCustomHeadersRoot( - ) - """ - - def testTestCustomHeadersRoot(self): - """Test TestCustomHeadersRoot""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_direction.py b/instant_tests_api/test/test_test_direction.py deleted file mode 100644 index 1459bff4..00000000 --- a/instant_tests_api/test/test_test_direction.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_direction import TestDirection - -class TestTestDirection(unittest.TestCase): - """TestDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDirection(self): - """Test TestDirection""" - # inst = TestDirection() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_dns_server.py b/instant_tests_api/test/test_test_dns_server.py deleted file mode 100644 index 2e72770c..00000000 --- a/instant_tests_api/test/test_test_dns_server.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_dns_server import TestDnsServer - -class TestTestDnsServer(unittest.TestCase): - """TestDnsServer unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestDnsServer: - """Test TestDnsServer - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestDnsServer` - """ - model = TestDnsServer() - if include_optional: - return TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net' - ) - else: - return TestDnsServer( - ) - """ - - def testTestDnsServer(self): - """Test TestDnsServer""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_dns_transport_protocol.py b/instant_tests_api/test/test_test_dns_transport_protocol.py deleted file mode 100644 index 27b8ef24..00000000 --- a/instant_tests_api/test/test_test_dns_transport_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol - -class TestTestDnsTransportProtocol(unittest.TestCase): - """TestDnsTransportProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDnsTransportProtocol(self): - """Test TestDnsTransportProtocol""" - # inst = TestDnsTransportProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_dscp_id.py b/instant_tests_api/test/test_test_dscp_id.py deleted file mode 100644 index d62c7634..00000000 --- a/instant_tests_api/test/test_test_dscp_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_dscp_id import TestDscpId - -class TestTestDscpId(unittest.TestCase): - """TestDscpId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDscpId(self): - """Test TestDscpId""" - # inst = TestDscpId() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_ipv6_policy.py b/instant_tests_api/test/test_test_ipv6_policy.py deleted file mode 100644 index b698dd26..00000000 --- a/instant_tests_api/test/test_test_ipv6_policy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_ipv6_policy import TestIpv6Policy - -class TestTestIpv6Policy(unittest.TestCase): - """TestIpv6Policy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestIpv6Policy(self): - """Test TestIpv6Policy""" - # inst = TestIpv6Policy() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_labels_inner.py b/instant_tests_api/test/test_test_labels_inner.py deleted file mode 100644 index 6fc1c7d2..00000000 --- a/instant_tests_api/test/test_test_labels_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_labels_inner import TestLabelsInner - -class TestTestLabelsInner(unittest.TestCase): - """TestLabelsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestLabelsInner: - """Test TestLabelsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestLabelsInner` - """ - model = TestLabelsInner() - if include_optional: - return TestLabelsInner( - label_id = '', - name = '', - is_built_in = True - ) - else: - return TestLabelsInner( - ) - """ - - def testTestLabelsInner(self): - """Test TestLabelsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_page_loading_strategy.py b/instant_tests_api/test/test_test_page_loading_strategy.py deleted file mode 100644 index ce2ff58b..00000000 --- a/instant_tests_api/test/test_test_page_loading_strategy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy - -class TestTestPageLoadingStrategy(unittest.TestCase): - """TestPageLoadingStrategy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestPageLoadingStrategy(self): - """Test TestPageLoadingStrategy""" - # inst = TestPageLoadingStrategy() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_path_trace_mode.py b/instant_tests_api/test/test_test_path_trace_mode.py deleted file mode 100644 index 51c8b9d8..00000000 --- a/instant_tests_api/test/test_test_path_trace_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_path_trace_mode import TestPathTraceMode - -class TestTestPathTraceMode(unittest.TestCase): - """TestPathTraceMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestPathTraceMode(self): - """Test TestPathTraceMode""" - # inst = TestPathTraceMode() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_probe_mode.py b/instant_tests_api/test/test_test_probe_mode.py deleted file mode 100644 index 80adda20..00000000 --- a/instant_tests_api/test/test_test_probe_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_probe_mode import TestProbeMode - -class TestTestProbeMode(unittest.TestCase): - """TestProbeMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProbeMode(self): - """Test TestProbeMode""" - # inst = TestProbeMode() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_protocol.py b/instant_tests_api/test/test_test_protocol.py deleted file mode 100644 index 8322c1f0..00000000 --- a/instant_tests_api/test/test_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_protocol import TestProtocol - -class TestTestProtocol(unittest.TestCase): - """TestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProtocol(self): - """Test TestProtocol""" - # inst = TestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_shared_accounts_inner.py b/instant_tests_api/test/test_test_shared_accounts_inner.py deleted file mode 100644 index 0c1af1e6..00000000 --- a/instant_tests_api/test/test_test_shared_accounts_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner - -class TestTestSharedAccountsInner(unittest.TestCase): - """TestSharedAccountsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestSharedAccountsInner: - """Test TestSharedAccountsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestSharedAccountsInner` - """ - model = TestSharedAccountsInner() - if include_optional: - return TestSharedAccountsInner( - aid = '105', - name = 'Account name' - ) - else: - return TestSharedAccountsInner( - ) - """ - - def testTestSharedAccountsInner(self): - """Test TestSharedAccountsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_sip_credentials.py b/instant_tests_api/test/test_test_sip_credentials.py deleted file mode 100644 index 03c36a6b..00000000 --- a/instant_tests_api/test/test_test_sip_credentials.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_sip_credentials import TestSipCredentials - -class TestTestSipCredentials(unittest.TestCase): - """TestSipCredentials unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestSipCredentials: - """Test TestSipCredentials - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestSipCredentials` - """ - model = TestSipCredentials() - if include_optional: - return TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username' - ) - else: - return TestSipCredentials( - port = 1024, - ) - """ - - def testTestSipCredentials(self): - """Test TestSipCredentials""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_ssl_version_id.py b/instant_tests_api/test/test_test_ssl_version_id.py deleted file mode 100644 index 6d750381..00000000 --- a/instant_tests_api/test/test_test_ssl_version_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_ssl_version_id import TestSslVersionId - -class TestTestSslVersionId(unittest.TestCase): - """TestSslVersionId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestSslVersionId(self): - """Test TestSslVersionId""" - # inst = TestSslVersionId() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_test_type.py b/instant_tests_api/test/test_test_type.py deleted file mode 100644 index 27146304..00000000 --- a/instant_tests_api/test/test_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.test_type import TestType - -class TestTestType(unittest.TestCase): - """TestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestType(self): - """Test TestType""" - # inst = TestType() - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_unauthorized_error.py b/instant_tests_api/test/test_unauthorized_error.py deleted file mode 100644 index a305efae..00000000 --- a/instant_tests_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_unexpanded_instant_test.py b/instant_tests_api/test/test_unexpanded_instant_test.py deleted file mode 100644 index a8c2e130..00000000 --- a/instant_tests_api/test/test_unexpanded_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.unexpanded_instant_test import UnexpandedInstantTest - -class TestUnexpandedInstantTest(unittest.TestCase): - """UnexpandedInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTest: - """Test UnexpandedInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTest` - """ - model = UnexpandedInstantTest() - if include_optional: - return UnexpandedInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return UnexpandedInstantTest( - ) - """ - - def testUnexpandedInstantTest(self): - """Test UnexpandedInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_unexpanded_instant_test_links.py b/instant_tests_api/test/test_unexpanded_instant_test_links.py deleted file mode 100644 index 7d0cb298..00000000 --- a/instant_tests_api/test/test_unexpanded_instant_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -class TestUnexpandedInstantTestLinks(unittest.TestCase): - """UnexpandedInstantTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: - """Test UnexpandedInstantTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinks` - """ - model = UnexpandedInstantTestLinks() - if include_optional: - return UnexpandedInstantTestLinks( - var_self = None, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}] - ) - else: - return UnexpandedInstantTestLinks( - ) - """ - - def testUnexpandedInstantTestLinks(self): - """Test UnexpandedInstantTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_unexpanded_instant_test_links_self.py b/instant_tests_api/test/test_unexpanded_instant_test_links_self.py deleted file mode 100644 index 92765ee8..00000000 --- a/instant_tests_api/test/test_unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): - """UnexpandedInstantTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: - """Test UnexpandedInstantTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` - """ - model = UnexpandedInstantTestLinksSelf() - if include_optional: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksSelf(self): - """Test UnexpandedInstantTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_unexpanded_instant_test_links_test_results.py b/instant_tests_api/test/test_unexpanded_instant_test_links_test_results.py deleted file mode 100644 index c75b50a9..00000000 --- a/instant_tests_api/test/test_unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -class TestUnexpandedInstantTestLinksTestResults(unittest.TestCase): - """UnexpandedInstantTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksTestResults: - """Test UnexpandedInstantTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksTestResults` - """ - model = UnexpandedInstantTestLinksTestResults() - if include_optional: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksTestResults(self): - """Test UnexpandedInstantTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_voice_api.py b/instant_tests_api/test/test_voice_api.py deleted file mode 100644 index 5d4219ff..00000000 --- a/instant_tests_api/test/test_voice_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_voice(self) -> None: - """Test case for post_instant_voice - - Create voice instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_voice_instant_test.py b/instant_tests_api/test/test_voice_instant_test.py deleted file mode 100644 index 94476f77..00000000 --- a/instant_tests_api/test/test_voice_instant_test.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.voice_instant_test import VoiceInstantTest - -class TestVoiceInstantTest(unittest.TestCase): - """VoiceInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VoiceInstantTest: - """Test VoiceInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VoiceInstantTest` - """ - model = VoiceInstantTest() - if include_optional: - return VoiceInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'voice', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - codec = 'G.711 @ 64 Kbps', - codec_id = '0', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - duration = 5, - jitter_buffer = 0, - num_path_traces = 3, - port = 1024, - target_agent_id = '281474976710706' - ) - else: - return VoiceInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - target_agent_id = '281474976710706', - ) - """ - - def testVoiceInstantTest(self): - """Test VoiceInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_voice_instant_test_request.py b/instant_tests_api/test/test_voice_instant_test_request.py deleted file mode 100644 index 52e42697..00000000 --- a/instant_tests_api/test/test_voice_instant_test_request.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.voice_instant_test_request import VoiceInstantTestRequest - -class TestVoiceInstantTestRequest(unittest.TestCase): - """VoiceInstantTestRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VoiceInstantTestRequest: - """Test VoiceInstantTestRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VoiceInstantTestRequest` - """ - model = VoiceInstantTestRequest() - if include_optional: - return VoiceInstantTestRequest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'voice', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - codec = 'G.711 @ 64 Kbps', - codec_id = '0', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - duration = 5, - jitter_buffer = 0, - num_path_traces = 3, - port = 1024, - target_agent_id = '281474976710706' - ) - else: - return VoiceInstantTestRequest( - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - target_agent_id = '281474976710706', - ) - """ - - def testVoiceInstantTestRequest(self): - """Test VoiceInstantTestRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_web_transaction_api.py b/instant_tests_api/test/test_web_transaction_api.py deleted file mode 100644 index d50005f7..00000000 --- a/instant_tests_api/test/test_web_transaction_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from instant_tests_api.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_post_instant_web_transactions(self) -> None: - """Test case for post_instant_web_transactions - - Create web transactions instant test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/test/test_web_transaction_instant_test.py b/instant_tests_api/test/test_web_transaction_instant_test.py deleted file mode 100644 index fe87049d..00000000 --- a/instant_tests_api/test/test_web_transaction_instant_test.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Instant Tests API - - ### Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from instant_tests_api.models.web_transaction_instant_test import WebTransactionInstantTest - -class TestWebTransactionInstantTest(unittest.TestCase): - """WebTransactionInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WebTransactionInstantTest: - """Test WebTransactionInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WebTransactionInstantTest` - """ - model = WebTransactionInstantTest() - if include_optional: - return WebTransactionInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'web-transactions', - links = instant_tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - instant_tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - instant_tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - credentials = ["3247","1051"], - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - desired_status_code = '200', - follow_redirects = True, - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - target_time = 1, - time_limit = 5, - transaction_script = 'if (true) { return true; }', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - block_domains = 'domain.com/', - disable_screenshot = True, - allow_mic_and_camera = True, - allow_geolocation = True, - browser_language = 'en-US', - page_loading_strategy = 'normal', - fixed_packet_rate = 50 - ) - else: - return WebTransactionInstantTest( - agents = [ - instant_tests_api.models.agent.Agent() - ], - transaction_script = 'if (true) { return true; }', - url = 'www.thousandeyes.com', - ) - """ - - def testWebTransactionInstantTest(self): - """Test WebTransactionInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/instant_tests_api/tox.ini b/instant_tests_api/tox.ini deleted file mode 100644 index 3e5809f2..00000000 --- a/instant_tests_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=instant_tests_api diff --git a/internet_insights_api/.gitignore b/internet_insights/.gitignore similarity index 100% rename from internet_insights_api/.gitignore rename to internet_insights/.gitignore diff --git a/internet_insights_api/.openapi-generator-ignore b/internet_insights/.openapi-generator-ignore similarity index 100% rename from internet_insights_api/.openapi-generator-ignore rename to internet_insights/.openapi-generator-ignore diff --git a/internet_insights/.openapi-generator/FILES b/internet_insights/.openapi-generator/FILES new file mode 100644 index 00000000..35a473b3 --- /dev/null +++ b/internet_insights/.openapi-generator/FILES @@ -0,0 +1,109 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/ApiAffectedAgent.md +docs/ApiAffectedTest.md +docs/ApiApplicationOutageAffectedLocation.md +docs/ApiApplicationOutageAffectedServer.md +docs/ApiApplicationOutageDetails.md +docs/ApiApplicationOutageResponse.md +docs/ApiAsn.md +docs/ApiCatalogProvider.md +docs/ApiCatalogProviderDetails.md +docs/ApiCatalogProviderDetailsLocationsInner.md +docs/ApiCatalogProviderDetailsResponse.md +docs/ApiCatalogProviderFilter.md +docs/ApiCatalogProviderResponse.md +docs/ApiCatalogProviderResponseAllOfProvidersInner.md +docs/ApiNetworkOutageAffectedLocation.md +docs/ApiNetworkOutageDetails.md +docs/ApiNetworkOutageResponse.md +docs/ApiOutage.md +docs/ApiOutageFilter.md +docs/ApiOutagesResponse.md +docs/ApiOutagesResponseAllOfOutagesInner.md +docs/CatalogProvidersApi.md +docs/Error.md +docs/Link.md +docs/OutageScope.md +docs/OutagesAPIPublicApi.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +internet_insights/__init__.py +internet_insights/api/__init__.py +internet_insights/api/catalog_providers_api.py +internet_insights/api/outages_api_public_api.py +internet_insights/api_client.py +internet_insights/api_response.py +internet_insights/configuration.py +internet_insights/exceptions.py +internet_insights/models/__init__.py +internet_insights/models/api_affected_agent.py +internet_insights/models/api_affected_test.py +internet_insights/models/api_application_outage_affected_location.py +internet_insights/models/api_application_outage_affected_server.py +internet_insights/models/api_application_outage_details.py +internet_insights/models/api_application_outage_response.py +internet_insights/models/api_asn.py +internet_insights/models/api_catalog_provider.py +internet_insights/models/api_catalog_provider_details.py +internet_insights/models/api_catalog_provider_details_locations_inner.py +internet_insights/models/api_catalog_provider_details_response.py +internet_insights/models/api_catalog_provider_filter.py +internet_insights/models/api_catalog_provider_response.py +internet_insights/models/api_catalog_provider_response_all_of_providers_inner.py +internet_insights/models/api_network_outage_affected_location.py +internet_insights/models/api_network_outage_details.py +internet_insights/models/api_network_outage_response.py +internet_insights/models/api_outage.py +internet_insights/models/api_outage_filter.py +internet_insights/models/api_outages_response.py +internet_insights/models/api_outages_response_all_of_outages_inner.py +internet_insights/models/error.py +internet_insights/models/link.py +internet_insights/models/outage_scope.py +internet_insights/models/self_links.py +internet_insights/models/self_links_links.py +internet_insights/models/unauthorized_error.py +internet_insights/models/validation_error.py +internet_insights/models/validation_error_all_of_errors.py +internet_insights/py.typed +internet_insights/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +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_application_outage_response.py +test/test_api_asn.py +test/test_api_catalog_provider.py +test/test_api_catalog_provider_details.py +test/test_api_catalog_provider_details_locations_inner.py +test/test_api_catalog_provider_details_response.py +test/test_api_catalog_provider_filter.py +test/test_api_catalog_provider_response.py +test/test_api_catalog_provider_response_all_of_providers_inner.py +test/test_api_network_outage_affected_location.py +test/test_api_network_outage_details.py +test/test_api_network_outage_response.py +test/test_api_outage.py +test/test_api_outage_filter.py +test/test_api_outages_response.py +test/test_api_outages_response_all_of_outages_inner.py +test/test_error.py +test/test_link.py +test/test_outage_scope.py +test/test_self_links.py +test/test_self_links_links.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/internet_insights/.openapi-generator/VERSION b/internet_insights/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/internet_insights/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/internet_insights/README.md b/internet_insights/README.md new file mode 100644 index 00000000..a9c79eb9 --- /dev/null +++ b/internet_insights/README.md @@ -0,0 +1,162 @@ +# internet-insights +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. + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import internet_insights +``` + +### 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 internet_insights +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import internet_insights +from 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 = internet_insights.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 = internet_insights.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with internet_insights.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = internet_insights.CatalogProvidersApi(api_client) + api_catalog_provider_filter = internet_insights.ApiCatalogProviderFilter() # ApiCatalogProviderFilter | + 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 catalog providers + api_response = api_instance.catalog_provider_list(api_catalog_provider_filter, aid=aid) + print("The response of CatalogProvidersApi->catalog_provider_list:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling CatalogProvidersApi->catalog_provider_list: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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* | [**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 + + +## Documentation For Models + + - [ApiAffectedAgent](docs/ApiAffectedAgent.md) + - [ApiAffectedTest](docs/ApiAffectedTest.md) + - [ApiApplicationOutageAffectedLocation](docs/ApiApplicationOutageAffectedLocation.md) + - [ApiApplicationOutageAffectedServer](docs/ApiApplicationOutageAffectedServer.md) + - [ApiApplicationOutageDetails](docs/ApiApplicationOutageDetails.md) + - [ApiApplicationOutageResponse](docs/ApiApplicationOutageResponse.md) + - [ApiAsn](docs/ApiAsn.md) + - [ApiCatalogProvider](docs/ApiCatalogProvider.md) + - [ApiCatalogProviderDetails](docs/ApiCatalogProviderDetails.md) + - [ApiCatalogProviderDetailsLocationsInner](docs/ApiCatalogProviderDetailsLocationsInner.md) + - [ApiCatalogProviderDetailsResponse](docs/ApiCatalogProviderDetailsResponse.md) + - [ApiCatalogProviderFilter](docs/ApiCatalogProviderFilter.md) + - [ApiCatalogProviderResponse](docs/ApiCatalogProviderResponse.md) + - [ApiCatalogProviderResponseAllOfProvidersInner](docs/ApiCatalogProviderResponseAllOfProvidersInner.md) + - [ApiNetworkOutageAffectedLocation](docs/ApiNetworkOutageAffectedLocation.md) + - [ApiNetworkOutageDetails](docs/ApiNetworkOutageDetails.md) + - [ApiNetworkOutageResponse](docs/ApiNetworkOutageResponse.md) + - [ApiOutage](docs/ApiOutage.md) + - [ApiOutageFilter](docs/ApiOutageFilter.md) + - [ApiOutagesResponse](docs/ApiOutagesResponse.md) + - [ApiOutagesResponseAllOfOutagesInner](docs/ApiOutagesResponseAllOfOutagesInner.md) + - [Error](docs/Error.md) + - [Link](docs/Link.md) + - [OutageScope](docs/OutageScope.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/internet_insights_api/docs/ApiAffectedAgent.md b/internet_insights/docs/ApiAffectedAgent.md similarity index 79% rename from internet_insights_api/docs/ApiAffectedAgent.md rename to internet_insights/docs/ApiAffectedAgent.md index 8dfd45f6..77528cfa 100644 --- a/internet_insights_api/docs/ApiAffectedAgent.md +++ b/internet_insights/docs/ApiAffectedAgent.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_agent import ApiAffectedAgent # TODO update the JSON string below json = "{}" # create an instance of ApiAffectedAgent from a JSON string api_affected_agent_instance = ApiAffectedAgent.from_json(json) # print the JSON string representation of the object -print ApiAffectedAgent.to_json() +print(ApiAffectedAgent.to_json()) # convert the object into a dict api_affected_agent_dict = api_affected_agent_instance.to_dict() # create an instance of ApiAffectedAgent from a dict -api_affected_agent_form_dict = api_affected_agent.from_dict(api_affected_agent_dict) +api_affected_agent_from_dict = ApiAffectedAgent.from_dict(api_affected_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/internet_insights_api/docs/ApiAffectedTest.md b/internet_insights/docs/ApiAffectedTest.md similarity index 80% rename from internet_insights_api/docs/ApiAffectedTest.md rename to internet_insights/docs/ApiAffectedTest.md index a3c4de2b..22930778 100644 --- a/internet_insights_api/docs/ApiAffectedTest.md +++ b/internet_insights/docs/ApiAffectedTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_affected_test import ApiAffectedTest # TODO update the JSON string below json = "{}" # create an instance of ApiAffectedTest from a JSON string api_affected_test_instance = ApiAffectedTest.from_json(json) # print the JSON string representation of the object -print ApiAffectedTest.to_json() +print(ApiAffectedTest.to_json()) # convert the object into a dict api_affected_test_dict = api_affected_test_instance.to_dict() # create an instance of ApiAffectedTest from a dict -api_affected_test_form_dict = api_affected_test.from_dict(api_affected_test_dict) +api_affected_test_from_dict = ApiAffectedTest.from_dict(api_affected_test_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/internet_insights_api/docs/ApiApplicationOutageAffectedLocation.md b/internet_insights/docs/ApiApplicationOutageAffectedLocation.md similarity index 76% rename from internet_insights_api/docs/ApiApplicationOutageAffectedLocation.md rename to internet_insights/docs/ApiApplicationOutageAffectedLocation.md index 90b5969f..e6efd2f4 100644 --- a/internet_insights_api/docs/ApiApplicationOutageAffectedLocation.md +++ b/internet_insights/docs/ApiApplicationOutageAffectedLocation.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location** | **str** | The affected location. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation +from internet_insights.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation # TODO update the JSON string below json = "{}" # create an instance of ApiApplicationOutageAffectedLocation from a JSON string api_application_outage_affected_location_instance = ApiApplicationOutageAffectedLocation.from_json(json) # print the JSON string representation of the object -print ApiApplicationOutageAffectedLocation.to_json() +print(ApiApplicationOutageAffectedLocation.to_json()) # convert the object into a dict api_application_outage_affected_location_dict = api_application_outage_affected_location_instance.to_dict() # create an instance of ApiApplicationOutageAffectedLocation from a dict -api_application_outage_affected_location_form_dict = api_application_outage_affected_location.from_dict(api_application_outage_affected_location_dict) +api_application_outage_affected_location_from_dict = ApiApplicationOutageAffectedLocation.from_dict(api_application_outage_affected_location_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/internet_insights/docs/ApiApplicationOutageAffectedServer.md b/internet_insights/docs/ApiApplicationOutageAffectedServer.md new file mode 100644 index 00000000..74ebcd4a --- /dev/null +++ b/internet_insights/docs/ApiApplicationOutageAffectedServer.md @@ -0,0 +1,30 @@ +# ApiApplicationOutageAffectedServer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | [optional] +**prefix** | **str** | | [optional] + +## Example + +```python +from internet_insights.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiApplicationOutageAffectedServer from a JSON string +api_application_outage_affected_server_instance = ApiApplicationOutageAffectedServer.from_json(json) +# print the JSON string representation of the object +print(ApiApplicationOutageAffectedServer.to_json()) + +# convert the object into a dict +api_application_outage_affected_server_dict = api_application_outage_affected_server_instance.to_dict() +# create an instance of ApiApplicationOutageAffectedServer from a dict +api_application_outage_affected_server_from_dict = ApiApplicationOutageAffectedServer.from_dict(api_application_outage_affected_server_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/internet_insights_api/docs/ApiApplicationOutageDetails.md b/internet_insights/docs/ApiApplicationOutageDetails.md similarity index 88% rename from internet_insights_api/docs/ApiApplicationOutageDetails.md rename to internet_insights/docs/ApiApplicationOutageDetails.md index 89df0580..9c6404a3 100644 --- a/internet_insights_api/docs/ApiApplicationOutageDetails.md +++ b/internet_insights/docs/ApiApplicationOutageDetails.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of the outage. | [optional] @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_application_outage_details import ApiApplicationOutageDetails +from internet_insights.models.api_application_outage_details import ApiApplicationOutageDetails # TODO update the JSON string below json = "{}" # create an instance of ApiApplicationOutageDetails from a JSON string api_application_outage_details_instance = ApiApplicationOutageDetails.from_json(json) # print the JSON string representation of the object -print ApiApplicationOutageDetails.to_json() +print(ApiApplicationOutageDetails.to_json()) # convert the object into a dict api_application_outage_details_dict = api_application_outage_details_instance.to_dict() # create an instance of ApiApplicationOutageDetails from a dict -api_application_outage_details_form_dict = api_application_outage_details.from_dict(api_application_outage_details_dict) +api_application_outage_details_from_dict = ApiApplicationOutageDetails.from_dict(api_application_outage_details_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/internet_insights_api/docs/ApiApplicationOutageResponse.md b/internet_insights/docs/ApiApplicationOutageResponse.md similarity index 88% rename from internet_insights_api/docs/ApiApplicationOutageResponse.md rename to internet_insights/docs/ApiApplicationOutageResponse.md index ec2e9966..8c3c7966 100644 --- a/internet_insights_api/docs/ApiApplicationOutageResponse.md +++ b/internet_insights/docs/ApiApplicationOutageResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of the outage. | [optional] @@ -23,19 +24,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_application_outage_response import ApiApplicationOutageResponse +from internet_insights.models.api_application_outage_response import ApiApplicationOutageResponse # TODO update the JSON string below json = "{}" # create an instance of ApiApplicationOutageResponse from a JSON string api_application_outage_response_instance = ApiApplicationOutageResponse.from_json(json) # print the JSON string representation of the object -print ApiApplicationOutageResponse.to_json() +print(ApiApplicationOutageResponse.to_json()) # convert the object into a dict api_application_outage_response_dict = api_application_outage_response_instance.to_dict() # create an instance of ApiApplicationOutageResponse from a dict -api_application_outage_response_form_dict = api_application_outage_response.from_dict(api_application_outage_response_dict) +api_application_outage_response_from_dict = ApiApplicationOutageResponse.from_dict(api_application_outage_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internet_insights_api/docs/ApiAsn.md b/internet_insights/docs/ApiAsn.md similarity index 85% rename from internet_insights_api/docs/ApiAsn.md rename to internet_insights/docs/ApiAsn.md index 8a8f50fb..d439bba2 100644 --- a/internet_insights_api/docs/ApiAsn.md +++ b/internet_insights/docs/ApiAsn.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | ASN (Autonomous Systems Number) | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_asn import ApiAsn +from internet_insights.models.api_asn import ApiAsn # TODO update the JSON string below json = "{}" # create an instance of ApiAsn from a JSON string api_asn_instance = ApiAsn.from_json(json) # print the JSON string representation of the object -print ApiAsn.to_json() +print(ApiAsn.to_json()) # convert the object into a dict api_asn_dict = api_asn_instance.to_dict() # create an instance of ApiAsn from a dict -api_asn_form_dict = api_asn.from_dict(api_asn_dict) +api_asn_from_dict = ApiAsn.from_dict(api_asn_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/internet_insights_api/docs/ApiCatalogProvider.md b/internet_insights/docs/ApiCatalogProvider.md similarity index 88% rename from internet_insights_api/docs/ApiCatalogProvider.md rename to internet_insights/docs/ApiCatalogProvider.md index 7671c2c3..236e66f9 100644 --- a/internet_insights_api/docs/ApiCatalogProvider.md +++ b/internet_insights/docs/ApiCatalogProvider.md @@ -3,6 +3,7 @@ Catalog provider ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The catalog provider ID. | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider import ApiCatalogProvider +from internet_insights.models.api_catalog_provider import ApiCatalogProvider # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProvider from a JSON string api_catalog_provider_instance = ApiCatalogProvider.from_json(json) # print the JSON string representation of the object -print ApiCatalogProvider.to_json() +print(ApiCatalogProvider.to_json()) # convert the object into a dict api_catalog_provider_dict = api_catalog_provider_instance.to_dict() # create an instance of ApiCatalogProvider from a dict -api_catalog_provider_form_dict = api_catalog_provider.from_dict(api_catalog_provider_dict) +api_catalog_provider_from_dict = ApiCatalogProvider.from_dict(api_catalog_provider_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/internet_insights_api/docs/ApiCatalogProviderDetails.md b/internet_insights/docs/ApiCatalogProviderDetails.md similarity index 84% rename from internet_insights_api/docs/ApiCatalogProviderDetails.md rename to internet_insights/docs/ApiCatalogProviderDetails.md index 6d84563d..4a98c618 100644 --- a/internet_insights_api/docs/ApiCatalogProviderDetails.md +++ b/internet_insights/docs/ApiCatalogProviderDetails.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The catalog provider ID. | [optional] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider_details import ApiCatalogProviderDetails +from internet_insights.models.api_catalog_provider_details import ApiCatalogProviderDetails # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProviderDetails from a JSON string api_catalog_provider_details_instance = ApiCatalogProviderDetails.from_json(json) # print the JSON string representation of the object -print ApiCatalogProviderDetails.to_json() +print(ApiCatalogProviderDetails.to_json()) # convert the object into a dict api_catalog_provider_details_dict = api_catalog_provider_details_instance.to_dict() # create an instance of ApiCatalogProviderDetails from a dict -api_catalog_provider_details_form_dict = api_catalog_provider_details.from_dict(api_catalog_provider_details_dict) +api_catalog_provider_details_from_dict = ApiCatalogProviderDetails.from_dict(api_catalog_provider_details_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/internet_insights_api/docs/ApiCatalogProviderDetailsLocationsInner.md b/internet_insights/docs/ApiCatalogProviderDetailsLocationsInner.md similarity index 75% rename from internet_insights_api/docs/ApiCatalogProviderDetailsLocationsInner.md rename to internet_insights/docs/ApiCatalogProviderDetailsLocationsInner.md index 35dc0793..2a6d26d1 100644 --- a/internet_insights_api/docs/ApiCatalogProviderDetailsLocationsInner.md +++ b/internet_insights/docs/ApiCatalogProviderDetailsLocationsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location** | **str** | The location covered by the Provider. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner +from internet_insights.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProviderDetailsLocationsInner from a JSON string api_catalog_provider_details_locations_inner_instance = ApiCatalogProviderDetailsLocationsInner.from_json(json) # print the JSON string representation of the object -print ApiCatalogProviderDetailsLocationsInner.to_json() +print(ApiCatalogProviderDetailsLocationsInner.to_json()) # convert the object into a dict api_catalog_provider_details_locations_inner_dict = api_catalog_provider_details_locations_inner_instance.to_dict() # create an instance of ApiCatalogProviderDetailsLocationsInner from a dict -api_catalog_provider_details_locations_inner_form_dict = api_catalog_provider_details_locations_inner.from_dict(api_catalog_provider_details_locations_inner_dict) +api_catalog_provider_details_locations_inner_from_dict = ApiCatalogProviderDetailsLocationsInner.from_dict(api_catalog_provider_details_locations_inner_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/internet_insights_api/docs/ApiCatalogProviderDetailsResponse.md b/internet_insights/docs/ApiCatalogProviderDetailsResponse.md similarity index 83% rename from internet_insights_api/docs/ApiCatalogProviderDetailsResponse.md rename to internet_insights/docs/ApiCatalogProviderDetailsResponse.md index eeae8e4b..19290c20 100644 --- a/internet_insights_api/docs/ApiCatalogProviderDetailsResponse.md +++ b/internet_insights/docs/ApiCatalogProviderDetailsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The catalog provider ID. | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse +from internet_insights.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProviderDetailsResponse from a JSON string api_catalog_provider_details_response_instance = ApiCatalogProviderDetailsResponse.from_json(json) # print the JSON string representation of the object -print ApiCatalogProviderDetailsResponse.to_json() +print(ApiCatalogProviderDetailsResponse.to_json()) # convert the object into a dict api_catalog_provider_details_response_dict = api_catalog_provider_details_response_instance.to_dict() # create an instance of ApiCatalogProviderDetailsResponse from a dict -api_catalog_provider_details_response_form_dict = api_catalog_provider_details_response.from_dict(api_catalog_provider_details_response_dict) +api_catalog_provider_details_response_from_dict = ApiCatalogProviderDetailsResponse.from_dict(api_catalog_provider_details_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internet_insights_api/docs/ApiCatalogProviderFilter.md b/internet_insights/docs/ApiCatalogProviderFilter.md similarity index 86% rename from internet_insights_api/docs/ApiCatalogProviderFilter.md rename to internet_insights/docs/ApiCatalogProviderFilter.md index 8a786bf1..3986db21 100644 --- a/internet_insights_api/docs/ApiCatalogProviderFilter.md +++ b/internet_insights/docs/ApiCatalogProviderFilter.md @@ -3,6 +3,7 @@ Advanced filter query used to filter the response. The provider name, location, asn can be partial names. Can filter on: - Provider name - Provider type - Region - Location - ASN - included ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **provider_name** | **str** | The name of the catalog provider. | [optional] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider_filter import ApiCatalogProviderFilter +from internet_insights.models.api_catalog_provider_filter import ApiCatalogProviderFilter # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProviderFilter from a JSON string api_catalog_provider_filter_instance = ApiCatalogProviderFilter.from_json(json) # print the JSON string representation of the object -print ApiCatalogProviderFilter.to_json() +print(ApiCatalogProviderFilter.to_json()) # convert the object into a dict api_catalog_provider_filter_dict = api_catalog_provider_filter_instance.to_dict() # create an instance of ApiCatalogProviderFilter from a dict -api_catalog_provider_filter_form_dict = api_catalog_provider_filter.from_dict(api_catalog_provider_filter_dict) +api_catalog_provider_filter_from_dict = ApiCatalogProviderFilter.from_dict(api_catalog_provider_filter_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/internet_insights_api/docs/ApiCatalogProviderResponse.md b/internet_insights/docs/ApiCatalogProviderResponse.md similarity index 79% rename from internet_insights_api/docs/ApiCatalogProviderResponse.md rename to internet_insights/docs/ApiCatalogProviderResponse.md index e6054cef..8594d616 100644 --- a/internet_insights_api/docs/ApiCatalogProviderResponse.md +++ b/internet_insights/docs/ApiCatalogProviderResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider_response import ApiCatalogProviderResponse +from internet_insights.models.api_catalog_provider_response import ApiCatalogProviderResponse # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProviderResponse from a JSON string api_catalog_provider_response_instance = ApiCatalogProviderResponse.from_json(json) # print the JSON string representation of the object -print ApiCatalogProviderResponse.to_json() +print(ApiCatalogProviderResponse.to_json()) # convert the object into a dict api_catalog_provider_response_dict = api_catalog_provider_response_instance.to_dict() # create an instance of ApiCatalogProviderResponse from a dict -api_catalog_provider_response_form_dict = api_catalog_provider_response.from_dict(api_catalog_provider_response_dict) +api_catalog_provider_response_from_dict = ApiCatalogProviderResponse.from_dict(api_catalog_provider_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internet_insights_api/docs/ApiCatalogProviderResponseAllOfProvidersInner.md b/internet_insights/docs/ApiCatalogProviderResponseAllOfProvidersInner.md similarity index 82% rename from internet_insights_api/docs/ApiCatalogProviderResponseAllOfProvidersInner.md rename to internet_insights/docs/ApiCatalogProviderResponseAllOfProvidersInner.md index 2ae008b3..d4a44ab5 100644 --- a/internet_insights_api/docs/ApiCatalogProviderResponseAllOfProvidersInner.md +++ b/internet_insights/docs/ApiCatalogProviderResponseAllOfProvidersInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The catalog provider ID. | [optional] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner +from internet_insights.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner # TODO update the JSON string below json = "{}" # create an instance of ApiCatalogProviderResponseAllOfProvidersInner from a JSON string api_catalog_provider_response_all_of_providers_inner_instance = ApiCatalogProviderResponseAllOfProvidersInner.from_json(json) # print the JSON string representation of the object -print ApiCatalogProviderResponseAllOfProvidersInner.to_json() +print(ApiCatalogProviderResponseAllOfProvidersInner.to_json()) # convert the object into a dict api_catalog_provider_response_all_of_providers_inner_dict = api_catalog_provider_response_all_of_providers_inner_instance.to_dict() # create an instance of ApiCatalogProviderResponseAllOfProvidersInner from a dict -api_catalog_provider_response_all_of_providers_inner_form_dict = api_catalog_provider_response_all_of_providers_inner.from_dict(api_catalog_provider_response_all_of_providers_inner_dict) +api_catalog_provider_response_all_of_providers_inner_from_dict = ApiCatalogProviderResponseAllOfProvidersInner.from_dict(api_catalog_provider_response_all_of_providers_inner_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/internet_insights_api/docs/ApiNetworkOutageAffectedLocation.md b/internet_insights/docs/ApiNetworkOutageAffectedLocation.md similarity index 76% rename from internet_insights_api/docs/ApiNetworkOutageAffectedLocation.md rename to internet_insights/docs/ApiNetworkOutageAffectedLocation.md index 56c89898..b66dfa5e 100644 --- a/internet_insights_api/docs/ApiNetworkOutageAffectedLocation.md +++ b/internet_insights/docs/ApiNetworkOutageAffectedLocation.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **location** | **str** | The affected location. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation +from internet_insights.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation # TODO update the JSON string below json = "{}" # create an instance of ApiNetworkOutageAffectedLocation from a JSON string api_network_outage_affected_location_instance = ApiNetworkOutageAffectedLocation.from_json(json) # print the JSON string representation of the object -print ApiNetworkOutageAffectedLocation.to_json() +print(ApiNetworkOutageAffectedLocation.to_json()) # convert the object into a dict api_network_outage_affected_location_dict = api_network_outage_affected_location_instance.to_dict() # create an instance of ApiNetworkOutageAffectedLocation from a dict -api_network_outage_affected_location_form_dict = api_network_outage_affected_location.from_dict(api_network_outage_affected_location_dict) +api_network_outage_affected_location_from_dict = ApiNetworkOutageAffectedLocation.from_dict(api_network_outage_affected_location_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/internet_insights_api/docs/ApiNetworkOutageDetails.md b/internet_insights/docs/ApiNetworkOutageDetails.md similarity index 88% rename from internet_insights_api/docs/ApiNetworkOutageDetails.md rename to internet_insights/docs/ApiNetworkOutageDetails.md index f668b173..5b79c6ad 100644 --- a/internet_insights_api/docs/ApiNetworkOutageDetails.md +++ b/internet_insights/docs/ApiNetworkOutageDetails.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of the outage. | [optional] @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_network_outage_details import ApiNetworkOutageDetails +from internet_insights.models.api_network_outage_details import ApiNetworkOutageDetails # TODO update the JSON string below json = "{}" # create an instance of ApiNetworkOutageDetails from a JSON string api_network_outage_details_instance = ApiNetworkOutageDetails.from_json(json) # print the JSON string representation of the object -print ApiNetworkOutageDetails.to_json() +print(ApiNetworkOutageDetails.to_json()) # convert the object into a dict api_network_outage_details_dict = api_network_outage_details_instance.to_dict() # create an instance of ApiNetworkOutageDetails from a dict -api_network_outage_details_form_dict = api_network_outage_details.from_dict(api_network_outage_details_dict) +api_network_outage_details_from_dict = ApiNetworkOutageDetails.from_dict(api_network_outage_details_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/internet_insights_api/docs/ApiNetworkOutageResponse.md b/internet_insights/docs/ApiNetworkOutageResponse.md similarity index 89% rename from internet_insights_api/docs/ApiNetworkOutageResponse.md rename to internet_insights/docs/ApiNetworkOutageResponse.md index 1604fe15..fbafbe9d 100644 --- a/internet_insights_api/docs/ApiNetworkOutageResponse.md +++ b/internet_insights/docs/ApiNetworkOutageResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of the outage. | [optional] @@ -23,19 +24,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_network_outage_response import ApiNetworkOutageResponse +from internet_insights.models.api_network_outage_response import ApiNetworkOutageResponse # TODO update the JSON string below json = "{}" # create an instance of ApiNetworkOutageResponse from a JSON string api_network_outage_response_instance = ApiNetworkOutageResponse.from_json(json) # print the JSON string representation of the object -print ApiNetworkOutageResponse.to_json() +print(ApiNetworkOutageResponse.to_json()) # convert the object into a dict api_network_outage_response_dict = api_network_outage_response_instance.to_dict() # create an instance of ApiNetworkOutageResponse from a dict -api_network_outage_response_form_dict = api_network_outage_response.from_dict(api_network_outage_response_dict) +api_network_outage_response_from_dict = ApiNetworkOutageResponse.from_dict(api_network_outage_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internet_insights_api/docs/ApiOutage.md b/internet_insights/docs/ApiOutage.md similarity index 84% rename from internet_insights_api/docs/ApiOutage.md rename to internet_insights/docs/ApiOutage.md index 32afff4f..44d0446c 100644 --- a/internet_insights_api/docs/ApiOutage.md +++ b/internet_insights/docs/ApiOutage.md @@ -3,6 +3,7 @@ List of outages. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of the outage. | [optional] @@ -17,24 +18,26 @@ Name | Type | Description | Notes **duration** | **int** | Duration of the outage (seconds) | [optional] **affected_tests_count** | **int** | The number of affected tests | [optional] **affected_servers_count** | **int** | The number of affected servers | [optional] -**affected_locations_count** | **int** | The number of affected locations | [optional] +**affected_locations_count** | **int** | The number of affected locations. | [optional] +**affected_interfaces_count** | **int** | The number of affected interfaces. | [optional] +**asn** | **int** | ASN number. | [optional] ## Example ```python -from internet_insights_api.models.api_outage import ApiOutage +from internet_insights.models.api_outage import ApiOutage # TODO update the JSON string below json = "{}" # create an instance of ApiOutage from a JSON string api_outage_instance = ApiOutage.from_json(json) # print the JSON string representation of the object -print ApiOutage.to_json() +print(ApiOutage.to_json()) # convert the object into a dict api_outage_dict = api_outage_instance.to_dict() # create an instance of ApiOutage from a dict -api_outage_form_dict = api_outage.from_dict(api_outage_dict) +api_outage_from_dict = ApiOutage.from_dict(api_outage_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/internet_insights_api/docs/ApiOutageFilter.md b/internet_insights/docs/ApiOutageFilter.md similarity index 89% rename from internet_insights_api/docs/ApiOutageFilter.md rename to internet_insights/docs/ApiOutageFilter.md index 6d21de22..368fd7fa 100644 --- a/internet_insights_api/docs/ApiOutageFilter.md +++ b/internet_insights/docs/ApiOutageFilter.md @@ -3,6 +3,7 @@ Advanced filter query used to filter the response. Can filter on: - outageScope (all, affected tests (e.g. my tests only)). - providerName - interfaceNetwork - applicationName - startDate, endDate - window ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_date** | **str** | Start of the time range. Must be paired with `endDate`. | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_outage_filter import ApiOutageFilter +from internet_insights.models.api_outage_filter import ApiOutageFilter # TODO update the JSON string below json = "{}" # create an instance of ApiOutageFilter from a JSON string api_outage_filter_instance = ApiOutageFilter.from_json(json) # print the JSON string representation of the object -print ApiOutageFilter.to_json() +print(ApiOutageFilter.to_json()) # convert the object into a dict api_outage_filter_dict = api_outage_filter_instance.to_dict() # create an instance of ApiOutageFilter from a dict -api_outage_filter_form_dict = api_outage_filter.from_dict(api_outage_filter_dict) +api_outage_filter_from_dict = ApiOutageFilter.from_dict(api_outage_filter_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/internet_insights_api/docs/ApiOutagesResponse.md b/internet_insights/docs/ApiOutagesResponse.md similarity index 81% rename from internet_insights_api/docs/ApiOutagesResponse.md rename to internet_insights/docs/ApiOutagesResponse.md index ae68b3e2..061793c8 100644 --- a/internet_insights_api/docs/ApiOutagesResponse.md +++ b/internet_insights/docs/ApiOutagesResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from internet_insights_api.models.api_outages_response import ApiOutagesResponse +from internet_insights.models.api_outages_response import ApiOutagesResponse # TODO update the JSON string below json = "{}" # create an instance of ApiOutagesResponse from a JSON string api_outages_response_instance = ApiOutagesResponse.from_json(json) # print the JSON string representation of the object -print ApiOutagesResponse.to_json() +print(ApiOutagesResponse.to_json()) # convert the object into a dict api_outages_response_dict = api_outages_response_instance.to_dict() # create an instance of ApiOutagesResponse from a dict -api_outages_response_form_dict = api_outages_response.from_dict(api_outages_response_dict) +api_outages_response_from_dict = ApiOutagesResponse.from_dict(api_outages_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internet_insights_api/docs/ApiOutagesResponseAllOfOutagesInner.md b/internet_insights/docs/ApiOutagesResponseAllOfOutagesInner.md similarity index 79% rename from internet_insights_api/docs/ApiOutagesResponseAllOfOutagesInner.md rename to internet_insights/docs/ApiOutagesResponseAllOfOutagesInner.md index 30e27e20..36c4eed9 100644 --- a/internet_insights_api/docs/ApiOutagesResponseAllOfOutagesInner.md +++ b/internet_insights/docs/ApiOutagesResponseAllOfOutagesInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The ID of the outage. | [optional] @@ -16,25 +17,27 @@ Name | Type | Description | Notes **duration** | **int** | Duration of the outage (seconds) | [optional] **affected_tests_count** | **int** | The number of affected tests | [optional] **affected_servers_count** | **int** | The number of affected servers | [optional] -**affected_locations_count** | **int** | The number of affected locations | [optional] +**affected_locations_count** | **int** | The number of affected locations. | [optional] +**affected_interfaces_count** | **int** | The number of affected interfaces. | [optional] +**asn** | **int** | ASN number. | [optional] **links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] ## Example ```python -from internet_insights_api.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner +from internet_insights.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner # TODO update the JSON string below json = "{}" # create an instance of ApiOutagesResponseAllOfOutagesInner from a JSON string api_outages_response_all_of_outages_inner_instance = ApiOutagesResponseAllOfOutagesInner.from_json(json) # print the JSON string representation of the object -print ApiOutagesResponseAllOfOutagesInner.to_json() +print(ApiOutagesResponseAllOfOutagesInner.to_json()) # convert the object into a dict api_outages_response_all_of_outages_inner_dict = api_outages_response_all_of_outages_inner_instance.to_dict() # create an instance of ApiOutagesResponseAllOfOutagesInner from a dict -api_outages_response_all_of_outages_inner_form_dict = api_outages_response_all_of_outages_inner.from_dict(api_outages_response_all_of_outages_inner_dict) +api_outages_response_all_of_outages_inner_from_dict = ApiOutagesResponseAllOfOutagesInner.from_dict(api_outages_response_all_of_outages_inner_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/internet_insights_api/docs/CatalogProvidersApi.md b/internet_insights/docs/CatalogProvidersApi.md similarity index 83% rename from internet_insights_api/docs/CatalogProvidersApi.md rename to internet_insights/docs/CatalogProvidersApi.md index 233ec12e..4f4d6224 100644 --- a/internet_insights_api/docs/CatalogProvidersApi.md +++ b/internet_insights/docs/CatalogProvidersApi.md @@ -1,4 +1,4 @@ -# internet_insights_api.CatalogProvidersApi +# internet_insights.CatalogProvidersApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,18 +18,17 @@ Returns a list of catalog providers using the specified filters. Returns high-le ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import internet_insights_api -from internet_insights_api.models.api_catalog_provider_filter import ApiCatalogProviderFilter -from internet_insights_api.models.api_catalog_provider_response import ApiCatalogProviderResponse -from internet_insights_api.rest import ApiException +import internet_insights +from internet_insights.models.api_catalog_provider_filter import ApiCatalogProviderFilter +from internet_insights.models.api_catalog_provider_response import ApiCatalogProviderResponse +from 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 = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,16 +38,16 @@ configuration = internet_insights_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with internet_insights_api.ApiClient(configuration) as api_client: +with internet_insights.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = internet_insights_api.CatalogProvidersApi(api_client) - api_catalog_provider_filter = internet_insights_api.ApiCatalogProviderFilter() # ApiCatalogProviderFilter | - aid = '2067' # 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) + api_instance = internet_insights.CatalogProvidersApi(api_client) + api_catalog_provider_filter = internet_insights.ApiCatalogProviderFilter() # ApiCatalogProviderFilter | + 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 catalog providers @@ -63,6 +62,7 @@ with internet_insights_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **api_catalog_provider_filter** | [**ApiCatalogProviderFilter**](ApiCatalogProviderFilter.md)| | @@ -82,6 +82,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -106,17 +107,16 @@ Returns the details of a catalog provider. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import internet_insights_api -from internet_insights_api.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse -from internet_insights_api.rest import ApiException +import internet_insights +from internet_insights.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse +from 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 = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = internet_insights_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with internet_insights_api.ApiClient(configuration) as api_client: +with internet_insights.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = internet_insights_api.CatalogProvidersApi(api_client) + api_instance = internet_insights.CatalogProvidersApi(api_client) provider_id = '85602a0a-54a7-4e97-946e-67492ef1fa26' # str | - aid = '2067' # 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) + 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 a catalog provider @@ -150,6 +150,7 @@ with internet_insights_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **provider_id** | **str**| | @@ -169,6 +170,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/internet_insights/docs/Error.md b/internet_insights/docs/Error.md new file mode 100644 index 00000000..af9003ca --- /dev/null +++ b/internet_insights/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 internet_insights.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/internet_insights/docs/Link.md b/internet_insights/docs/Link.md new file mode 100644 index 00000000..43793b81 --- /dev/null +++ b/internet_insights/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 internet_insights.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/internet_insights_api/docs/OutageScope.md b/internet_insights/docs/OutageScope.md similarity index 99% rename from internet_insights_api/docs/OutageScope.md rename to internet_insights/docs/OutageScope.md index c399afc0..ec33ba98 100644 --- a/internet_insights_api/docs/OutageScope.md +++ b/internet_insights/docs/OutageScope.md @@ -3,6 +3,7 @@ Scope of the outage ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/internet_insights_api/docs/OutagesAPIPublicApi.md b/internet_insights/docs/OutagesAPIPublicApi.md similarity index 87% rename from internet_insights_api/docs/OutagesAPIPublicApi.md rename to internet_insights/docs/OutagesAPIPublicApi.md index 0bfb4c6e..653d651e 100644 --- a/internet_insights_api/docs/OutagesAPIPublicApi.md +++ b/internet_insights/docs/OutagesAPIPublicApi.md @@ -1,4 +1,4 @@ -# internet_insights_api.OutagesAPIPublicApi +# internet_insights.OutagesAPIPublicApi All URIs are relative to *https://api.thousandeyes.com* @@ -19,17 +19,16 @@ Returns the details of an application outage. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import internet_insights_api -from internet_insights_api.models.api_application_outage_response import ApiApplicationOutageResponse -from internet_insights_api.rest import ApiException +import internet_insights +from internet_insights.models.api_application_outage_response import ApiApplicationOutageResponse +from 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 = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,16 +38,16 @@ configuration = internet_insights_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with internet_insights_api.ApiClient(configuration) as api_client: +with internet_insights.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = internet_insights_api.OutagesAPIPublicApi(api_client) + api_instance = internet_insights.OutagesAPIPublicApi(api_client) outage_id = 'F73E24F17E4996923196826A208BB572508A8EB13BEE14B0' # str | - aid = '2067' # 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) + 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 @@ -63,6 +62,7 @@ with internet_insights_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outage_id** | **str**| | @@ -82,6 +82,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -106,18 +107,17 @@ Returns a list of network and application outages using a filter object. Advance ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import internet_insights_api -from internet_insights_api.models.api_outage_filter import ApiOutageFilter -from internet_insights_api.models.api_outages_response import ApiOutagesResponse -from internet_insights_api.rest import ApiException +import internet_insights +from internet_insights.models.api_outage_filter import ApiOutageFilter +from internet_insights.models.api_outages_response import ApiOutagesResponse +from 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 = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( host = "https://api.thousandeyes.com" ) @@ -127,16 +127,16 @@ configuration = internet_insights_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with internet_insights_api.ApiClient(configuration) as api_client: +with internet_insights.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = internet_insights_api.OutagesAPIPublicApi(api_client) - api_outage_filter = internet_insights_api.ApiOutageFilter() # ApiOutageFilter | - aid = '2067' # 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) + api_instance = internet_insights.OutagesAPIPublicApi(api_client) + api_outage_filter = internet_insights.ApiOutageFilter() # ApiOutageFilter | + 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 network and application outages @@ -151,6 +151,7 @@ with internet_insights_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **api_outage_filter** | [**ApiOutageFilter**](ApiOutageFilter.md)| | @@ -170,6 +171,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -194,17 +196,16 @@ Returns the details of a network outage. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import internet_insights_api -from internet_insights_api.models.api_network_outage_response import ApiNetworkOutageResponse -from internet_insights_api.rest import ApiException +import internet_insights +from internet_insights.models.api_network_outage_response import ApiNetworkOutageResponse +from 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 = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( host = "https://api.thousandeyes.com" ) @@ -214,16 +215,16 @@ configuration = internet_insights_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = internet_insights_api.Configuration( +configuration = internet_insights.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with internet_insights_api.ApiClient(configuration) as api_client: +with internet_insights.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = internet_insights_api.OutagesAPIPublicApi(api_client) + api_instance = internet_insights.OutagesAPIPublicApi(api_client) outage_id = '694D8656960F34F76489BCE5E9BCD58EC53027462740D75F' # str | - aid = '2067' # 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) + 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 network outage @@ -238,6 +239,7 @@ with internet_insights_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **outage_id** | **str**| | @@ -257,6 +259,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/internet_insights/docs/SelfLinks.md b/internet_insights/docs/SelfLinks.md new file mode 100644 index 00000000..6fde5d92 --- /dev/null +++ b/internet_insights/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from internet_insights.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/internet_insights/docs/SelfLinksLinks.md b/internet_insights/docs/SelfLinksLinks.md new file mode 100644 index 00000000..48397406 --- /dev/null +++ b/internet_insights/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from internet_insights.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/internet_insights/docs/UnauthorizedError.md b/internet_insights/docs/UnauthorizedError.md new file mode 100644 index 00000000..671e3c06 --- /dev/null +++ b/internet_insights/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from internet_insights.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/internet_insights/docs/ValidationError.md b/internet_insights/docs/ValidationError.md new file mode 100644 index 00000000..783a4a8a --- /dev/null +++ b/internet_insights/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from internet_insights.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/internet_insights/docs/ValidationErrorAllOfErrors.md b/internet_insights/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..18c98007 --- /dev/null +++ b/internet_insights/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from internet_insights.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/internet_insights/internet_insights/__init__.py b/internet_insights/internet_insights/__init__.py new file mode 100644 index 00000000..5d4f2ae0 --- /dev/null +++ b/internet_insights/internet_insights/__init__.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 internet_insights.api.catalog_providers_api import CatalogProvidersApi +from internet_insights.api.outages_api_public_api import OutagesAPIPublicApi + +# import ApiClient +from internet_insights.api_response import ApiResponse +from internet_insights.api_client import ApiClient +from internet_insights.configuration import Configuration +from internet_insights.exceptions import OpenApiException +from internet_insights.exceptions import ApiTypeError +from internet_insights.exceptions import ApiValueError +from internet_insights.exceptions import ApiKeyError +from internet_insights.exceptions import ApiAttributeError +from internet_insights.exceptions import ApiException + +# import models into sdk package +from internet_insights.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation +from internet_insights.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer +from internet_insights.models.api_application_outage_details import ApiApplicationOutageDetails +from internet_insights.models.api_application_outage_response import ApiApplicationOutageResponse +from internet_insights.models.api_asn import ApiAsn +from internet_insights.models.api_catalog_provider import ApiCatalogProvider +from internet_insights.models.api_catalog_provider_details import ApiCatalogProviderDetails +from internet_insights.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner +from internet_insights.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse +from internet_insights.models.api_catalog_provider_filter import ApiCatalogProviderFilter +from internet_insights.models.api_catalog_provider_response import ApiCatalogProviderResponse +from internet_insights.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner +from internet_insights.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation +from internet_insights.models.api_network_outage_details import ApiNetworkOutageDetails +from internet_insights.models.api_network_outage_response import ApiNetworkOutageResponse +from internet_insights.models.api_outage import ApiOutage +from internet_insights.models.api_outage_filter import ApiOutageFilter +from internet_insights.models.api_outages_response import ApiOutagesResponse +from internet_insights.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner +from internet_insights.models.error import Error +from internet_insights.models.link import Link +from internet_insights.models.outage_scope import OutageScope +from internet_insights.models.self_links import SelfLinks +from internet_insights.models.self_links_links import SelfLinksLinks +from internet_insights.models.unauthorized_error import UnauthorizedError +from internet_insights.models.validation_error import ValidationError +from internet_insights.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/internet_insights/internet_insights/api/__init__.py b/internet_insights/internet_insights/api/__init__.py new file mode 100644 index 00000000..f35c3d9a --- /dev/null +++ b/internet_insights/internet_insights/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from internet_insights.api.catalog_providers_api import CatalogProvidersApi +from internet_insights.api.outages_api_public_api import OutagesAPIPublicApi + diff --git a/internet_insights_api/internet_insights_api/api/catalog_providers_api.py b/internet_insights/internet_insights/api/catalog_providers_api.py similarity index 92% rename from internet_insights_api/internet_insights_api/api/catalog_providers_api.py rename to internet_insights/internet_insights/api/catalog_providers_api.py index 9cf05300..8698957a 100644 --- a/internet_insights_api/internet_insights_api/api/catalog_providers_api.py +++ b/internet_insights/internet_insights/api/catalog_providers_api.py @@ -3,39 +3,29 @@ """ Internet Insights API - # Overview 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. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from internet_insights.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse +from internet_insights.models.api_catalog_provider_filter import ApiCatalogProviderFilter +from internet_insights.models.api_catalog_provider_response import ApiCatalogProviderResponse -from internet_insights_api.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse -from internet_insights_api.models.api_catalog_provider_filter import ApiCatalogProviderFilter -from internet_insights_api.models.api_catalog_provider_response import ApiCatalogProviderResponse - -from internet_insights_api.api_client import ApiClient -from internet_insights_api.api_response import ApiResponse -from internet_insights_api.rest import RESTResponseType +from internet_insights.api_client import ApiClient, RequestSerialized +from internet_insights.api_response import ApiResponse +from internet_insights.rest import RESTResponseType class CatalogProvidersApi: @@ -110,15 +100,13 @@ class CatalogProvidersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiCatalogProviderResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -190,15 +178,13 @@ class CatalogProvidersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiCatalogProviderResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -270,15 +256,13 @@ class CatalogProvidersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiCatalogProviderResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -295,19 +279,18 @@ class CatalogProvidersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -427,15 +410,13 @@ class CatalogProvidersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiCatalogProviderDetailsResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -507,15 +488,13 @@ class CatalogProvidersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiCatalogProviderDetailsResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -587,15 +566,13 @@ class CatalogProvidersApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiCatalogProviderDetailsResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -612,19 +589,18 @@ class CatalogProvidersApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/internet_insights_api/internet_insights_api/api/outages_api_public_api.py b/internet_insights/internet_insights/api/outages_api_public_api.py similarity index 95% rename from internet_insights_api/internet_insights_api/api/outages_api_public_api.py rename to internet_insights/internet_insights/api/outages_api_public_api.py index 2f2b8520..967d4d5d 100644 --- a/internet_insights_api/internet_insights_api/api/outages_api_public_api.py +++ b/internet_insights/internet_insights/api/outages_api_public_api.py @@ -3,40 +3,30 @@ """ Internet Insights API - # Overview 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. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from internet_insights.models.api_application_outage_response import ApiApplicationOutageResponse +from internet_insights.models.api_network_outage_response import ApiNetworkOutageResponse +from internet_insights.models.api_outage_filter import ApiOutageFilter +from internet_insights.models.api_outages_response import ApiOutagesResponse -from internet_insights_api.models.api_application_outage_response import ApiApplicationOutageResponse -from internet_insights_api.models.api_network_outage_response import ApiNetworkOutageResponse -from internet_insights_api.models.api_outage_filter import ApiOutageFilter -from internet_insights_api.models.api_outages_response import ApiOutagesResponse - -from internet_insights_api.api_client import ApiClient -from internet_insights_api.api_response import ApiResponse -from internet_insights_api.rest import RESTResponseType +from internet_insights.api_client import ApiClient, RequestSerialized +from internet_insights.api_response import ApiResponse +from internet_insights.rest import RESTResponseType class OutagesAPIPublicApi: @@ -111,15 +101,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiApplicationOutageResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -191,15 +179,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiApplicationOutageResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -271,15 +257,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiApplicationOutageResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -296,19 +280,18 @@ class OutagesAPIPublicApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -415,15 +398,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiOutagesResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -495,15 +476,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiOutagesResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -575,15 +554,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiOutagesResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -600,19 +577,18 @@ class OutagesAPIPublicApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -732,15 +708,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiNetworkOutageResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -812,15 +786,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiNetworkOutageResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -892,15 +864,13 @@ class OutagesAPIPublicApi: _response_types_map: Dict[str, Optional[str]] = { '200': "ApiNetworkOutageResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -917,19 +887,18 @@ class OutagesAPIPublicApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/internet_insights/internet_insights/api_client.py b/internet_insights/internet_insights/api_client.py new file mode 100644 index 00000000..d8c8be31 --- /dev/null +++ b/internet_insights/internet_insights/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from internet_insights.configuration import Configuration +from internet_insights.api_response import ApiResponse, T as ApiResponseT +import internet_insights.models +from internet_insights import rest +from internet_insights.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(internet_insights.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/internet_insights/internet_insights/api_response.py b/internet_insights/internet_insights/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/internet_insights/internet_insights/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/internet_insights/internet_insights/configuration.py b/internet_insights/internet_insights/configuration.py new file mode 100644 index 00000000..ded3354c --- /dev/null +++ b/internet_insights/internet_insights/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("internet_insights") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/internet_insights/internet_insights/exceptions.py b/internet_insights/internet_insights/exceptions.py new file mode 100644 index 00000000..de998f39 --- /dev/null +++ b/internet_insights/internet_insights/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/internet_insights/internet_insights/models/__init__.py b/internet_insights/internet_insights/models/__init__.py new file mode 100644 index 00000000..23efa62e --- /dev/null +++ b/internet_insights/internet_insights/models/__init__.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from internet_insights.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation +from internet_insights.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer +from internet_insights.models.api_application_outage_details import ApiApplicationOutageDetails +from internet_insights.models.api_application_outage_response import ApiApplicationOutageResponse +from internet_insights.models.api_asn import ApiAsn +from internet_insights.models.api_catalog_provider import ApiCatalogProvider +from internet_insights.models.api_catalog_provider_details import ApiCatalogProviderDetails +from internet_insights.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner +from internet_insights.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse +from internet_insights.models.api_catalog_provider_filter import ApiCatalogProviderFilter +from internet_insights.models.api_catalog_provider_response import ApiCatalogProviderResponse +from internet_insights.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner +from internet_insights.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation +from internet_insights.models.api_network_outage_details import ApiNetworkOutageDetails +from internet_insights.models.api_network_outage_response import ApiNetworkOutageResponse +from internet_insights.models.api_outage import ApiOutage +from internet_insights.models.api_outage_filter import ApiOutageFilter +from internet_insights.models.api_outages_response import ApiOutagesResponse +from internet_insights.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner +from internet_insights.models.error import Error +from internet_insights.models.link import Link +from internet_insights.models.outage_scope import OutageScope +from internet_insights.models.self_links import SelfLinks +from internet_insights.models.self_links_links import SelfLinksLinks +from internet_insights.models.unauthorized_error import UnauthorizedError +from internet_insights.models.validation_error import ValidationError +from internet_insights.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/internet_insights/internet_insights/models/api_affected_agent.py b/internet_insights/internet_insights/models/api_affected_agent.py new file mode 100644 index 00000000..1ae6b5e6 --- /dev/null +++ b/internet_insights/internet_insights/models/api_affected_agent.py @@ -0,0 +1,89 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiAffectedAgent(BaseModel): + """ + ApiAffectedAgent + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAffectedAgent 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 ApiAffectedAgent 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"), + "name": obj.get("name") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_affected_test.py b/internet_insights/internet_insights/models/api_affected_test.py new file mode 100644 index 00000000..7e044674 --- /dev/null +++ b/internet_insights/internet_insights/models/api_affected_test.py @@ -0,0 +1,89 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiAffectedTest(BaseModel): + """ + ApiAffectedTest + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAffectedTest 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 ApiAffectedTest 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"), + "name": obj.get("name") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_application_outage_affected_location.py b/internet_insights/internet_insights/models/api_application_outage_affected_location.py new file mode 100644 index 00000000..419955df --- /dev/null +++ b/internet_insights/internet_insights/models/api_application_outage_affected_location.py @@ -0,0 +1,97 @@ +# 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.2 + 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 internet_insights.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer +from typing import Optional, Set +from typing_extensions import Self + +class ApiApplicationOutageAffectedLocation(BaseModel): + """ + ApiApplicationOutageAffectedLocation + """ # noqa: E501 + location: Optional[StrictStr] = Field(default=None, description="The affected location.") + affected_servers: Optional[List[ApiApplicationOutageAffectedServer]] = Field(default=None, description="The number of affected servers in this location.", alias="affectedServers") + __properties: ClassVar[List[str]] = ["location", "affectedServers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiApplicationOutageAffectedLocation 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 affected_servers (list) + _items = [] + if self.affected_servers: + for _item in self.affected_servers: + if _item: + _items.append(_item.to_dict()) + _dict['affectedServers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiApplicationOutageAffectedLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "location": obj.get("location"), + "affectedServers": [ApiApplicationOutageAffectedServer.from_dict(_item) for _item in obj["affectedServers"]] if obj.get("affectedServers") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_application_outage_affected_server.py b/internet_insights/internet_insights/models/api_application_outage_affected_server.py new file mode 100644 index 00000000..eab4b03b --- /dev/null +++ b/internet_insights/internet_insights/models/api_application_outage_affected_server.py @@ -0,0 +1,89 @@ +# 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.2 + 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 ApiApplicationOutageAffectedServer(BaseModel): + """ + ApiApplicationOutageAffectedServer + """ # noqa: E501 + domain: Optional[StrictStr] = None + prefix: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["domain", "prefix"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiApplicationOutageAffectedServer 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 ApiApplicationOutageAffectedServer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "prefix": obj.get("prefix") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_application_outage_details.py b/internet_insights/internet_insights/models/api_application_outage_details.py new file mode 100644 index 00000000..bc8eae7f --- /dev/null +++ b/internet_insights/internet_insights/models/api_application_outage_details.py @@ -0,0 +1,137 @@ +# 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.2 + 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 internet_insights.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation +from typing import Optional, Set +from typing_extensions import Self + +class ApiApplicationOutageDetails(BaseModel): + """ + ApiApplicationOutageDetails + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") + application_name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.", alias="applicationName") + start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") + start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") + end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") + end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") + duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") + affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") + affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") + affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") + errors: Optional[List[StrictStr]] = Field(default=None, description="List of errors.") + affected_locations: Optional[List[ApiApplicationOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "applicationName", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "errors", "affectedLocations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiApplicationOutageDetails 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 affected_tests (list) + _items = [] + if self.affected_tests: + for _item in self.affected_tests: + if _item: + _items.append(_item.to_dict()) + _dict['affectedTests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) + _items = [] + if self.affected_agents: + for _item in self.affected_agents: + if _item: + _items.append(_item.to_dict()) + _dict['affectedAgents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) + _items = [] + if self.affected_locations: + for _item in self.affected_locations: + if _item: + _items.append(_item.to_dict()) + _dict['affectedLocations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiApplicationOutageDetails 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "applicationName": obj.get("applicationName"), + "startDate": obj.get("startDate"), + "startRoundId": obj.get("startRoundId"), + "endDate": obj.get("endDate"), + "endRoundId": obj.get("endRoundId"), + "duration": obj.get("duration"), + "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj["affectedTests"]] if obj.get("affectedTests") is not None else None, + "affectedDomains": obj.get("affectedDomains"), + "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj["affectedAgents"]] if obj.get("affectedAgents") is not None else None, + "errors": obj.get("errors"), + "affectedLocations": [ApiApplicationOutageAffectedLocation.from_dict(_item) for _item in obj["affectedLocations"]] if obj.get("affectedLocations") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_application_outage_response.py b/internet_insights/internet_insights/models/api_application_outage_response.py new file mode 100644 index 00000000..467d5700 --- /dev/null +++ b/internet_insights/internet_insights/models/api_application_outage_response.py @@ -0,0 +1,143 @@ +# 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.2 + 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 internet_insights.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation +from internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiApplicationOutageResponse(BaseModel): + """ + ApiApplicationOutageResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") + application_name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.", alias="applicationName") + start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") + start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") + end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") + end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") + duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") + affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") + affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") + affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") + errors: Optional[List[StrictStr]] = Field(default=None, description="List of errors.") + affected_locations: Optional[List[ApiApplicationOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "applicationName", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "errors", "affectedLocations", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiApplicationOutageResponse 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 affected_tests (list) + _items = [] + if self.affected_tests: + for _item in self.affected_tests: + if _item: + _items.append(_item.to_dict()) + _dict['affectedTests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) + _items = [] + if self.affected_agents: + for _item in self.affected_agents: + if _item: + _items.append(_item.to_dict()) + _dict['affectedAgents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) + _items = [] + if self.affected_locations: + for _item in self.affected_locations: + if _item: + _items.append(_item.to_dict()) + _dict['affectedLocations'] = _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 ApiApplicationOutageResponse 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "applicationName": obj.get("applicationName"), + "startDate": obj.get("startDate"), + "startRoundId": obj.get("startRoundId"), + "endDate": obj.get("endDate"), + "endRoundId": obj.get("endRoundId"), + "duration": obj.get("duration"), + "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj["affectedTests"]] if obj.get("affectedTests") is not None else None, + "affectedDomains": obj.get("affectedDomains"), + "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj["affectedAgents"]] if obj.get("affectedAgents") is not None else None, + "errors": obj.get("errors"), + "affectedLocations": [ApiApplicationOutageAffectedLocation.from_dict(_item) for _item in obj["affectedLocations"]] if obj.get("affectedLocations") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_asn.py b/internet_insights/internet_insights/models/api_asn.py new file mode 100644 index 00000000..cfab485b --- /dev/null +++ b/internet_insights/internet_insights/models/api_asn.py @@ -0,0 +1,89 @@ +# 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.2 + 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 ApiAsn(BaseModel): + """ + ApiAsn + """ # noqa: E501 + id: Optional[StrictInt] = Field(default=None, description="ASN (Autonomous Systems Number)") + name: Optional[StrictStr] = Field(default=None, description="ASN (Autonomous Systems Number) name") + __properties: ClassVar[List[str]] = ["id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiAsn 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 ApiAsn 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"), + "name": obj.get("name") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider.py b/internet_insights/internet_insights/models/api_catalog_provider.py new file mode 100644 index 00000000..3ff37c05 --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider.py @@ -0,0 +1,105 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiCatalogProvider(BaseModel): + """ + Catalog provider + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") + region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") + data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") + asns_count: Optional[StrictInt] = Field(default=None, description="The number of ASN's covered by the provider.", alias="asnsCount") + countries_count: Optional[StrictInt] = Field(default=None, description="The number of countries covered by the provider.", alias="countriesCount") + locations_count: Optional[StrictInt] = Field(default=None, description="The number of locations covered by the provider.", alias="locationsCount") + interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of interfaces covered by the provider.", alias="interfacesCount") + included: Optional[StrictBool] = Field(default=None, description="Indicates whether the catalog provider is included in the licensed packages.") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asnsCount", "countriesCount", "locationsCount", "interfacesCount", "included"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProvider 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 ApiCatalogProvider 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "region": obj.get("region"), + "dataType": obj.get("dataType"), + "asnsCount": obj.get("asnsCount"), + "countriesCount": obj.get("countriesCount"), + "locationsCount": obj.get("locationsCount"), + "interfacesCount": obj.get("interfacesCount"), + "included": obj.get("included") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider_details.py b/internet_insights/internet_insights/models/api_catalog_provider_details.py new file mode 100644 index 00000000..6fe402e9 --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider_details.py @@ -0,0 +1,115 @@ +# 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.2 + 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 internet_insights.models.api_asn import ApiAsn +from internet_insights.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner +from typing import Optional, Set +from typing_extensions import Self + +class ApiCatalogProviderDetails(BaseModel): + """ + ApiCatalogProviderDetails + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") + region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") + data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") + asns: Optional[List[ApiAsn]] = Field(default=None, description="List of ASN's covered by the Provider.") + locations: Optional[List[ApiCatalogProviderDetailsLocationsInner]] = Field(default=None, description="List of locations covered by the Provider.") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asns", "locations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProviderDetails 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 asns (list) + _items = [] + if self.asns: + for _item in self.asns: + if _item: + _items.append(_item.to_dict()) + _dict['asns'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in locations (list) + _items = [] + if self.locations: + for _item in self.locations: + if _item: + _items.append(_item.to_dict()) + _dict['locations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiCatalogProviderDetails 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "region": obj.get("region"), + "dataType": obj.get("dataType"), + "asns": [ApiAsn.from_dict(_item) for _item in obj["asns"]] if obj.get("asns") is not None else None, + "locations": [ApiCatalogProviderDetailsLocationsInner.from_dict(_item) for _item in obj["locations"]] if obj.get("locations") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider_details_locations_inner.py b/internet_insights/internet_insights/models/api_catalog_provider_details_locations_inner.py new file mode 100644 index 00000000..0e17f2c5 --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider_details_locations_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 ApiCatalogProviderDetailsLocationsInner(BaseModel): + """ + ApiCatalogProviderDetailsLocationsInner + """ # noqa: E501 + location: Optional[StrictStr] = Field(default=None, description="The location covered by the Provider.") + interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of interfaces covered by the Provider at this location.", alias="interfacesCount") + __properties: ClassVar[List[str]] = ["location", "interfacesCount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProviderDetailsLocationsInner 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 ApiCatalogProviderDetailsLocationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "location": obj.get("location"), + "interfacesCount": obj.get("interfacesCount") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider_details_response.py b/internet_insights/internet_insights/models/api_catalog_provider_details_response.py new file mode 100644 index 00000000..221e0d09 --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider_details_response.py @@ -0,0 +1,121 @@ +# 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.2 + 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 internet_insights.models.api_asn import ApiAsn +from internet_insights.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner +from internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiCatalogProviderDetailsResponse(BaseModel): + """ + ApiCatalogProviderDetailsResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") + region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") + data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") + asns: Optional[List[ApiAsn]] = Field(default=None, description="List of ASN's covered by the Provider.") + locations: Optional[List[ApiCatalogProviderDetailsLocationsInner]] = Field(default=None, description="List of locations covered by the Provider.") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asns", "locations", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProviderDetailsResponse 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 asns (list) + _items = [] + if self.asns: + for _item in self.asns: + if _item: + _items.append(_item.to_dict()) + _dict['asns'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in locations (list) + _items = [] + if self.locations: + for _item in self.locations: + if _item: + _items.append(_item.to_dict()) + _dict['locations'] = _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 ApiCatalogProviderDetailsResponse 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "region": obj.get("region"), + "dataType": obj.get("dataType"), + "asns": [ApiAsn.from_dict(_item) for _item in obj["asns"]] if obj.get("asns") is not None else None, + "locations": [ApiCatalogProviderDetailsLocationsInner.from_dict(_item) for _item in obj["locations"]] if obj.get("locations") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider_filter.py b/internet_insights/internet_insights/models/api_catalog_provider_filter.py new file mode 100644 index 00000000..c6984755 --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider_filter.py @@ -0,0 +1,97 @@ +# 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.2 + 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 ApiCatalogProviderFilter(BaseModel): + """ + Advanced filter query used to filter the response. The provider name, location, asn can be partial names. Can filter on: - Provider name - Provider type - Region - Location - ASN - included + """ # noqa: E501 + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") + region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") + location: Optional[StrictStr] = Field(default=None, description="Location of the catalog provider.") + asn: Optional[StrictStr] = Field(default=None, description="Name of the ASN (Autonomous Systems Number) covered by providers.") + included: Optional[StrictBool] = Field(default=None, description="Indicates whether the catalog provider is included in the licensed packages. true returns providers covered by licensed packages, false returns providers not covered by licensed packages.") + __properties: ClassVar[List[str]] = ["providerName", "providerType", "region", "location", "asn", "included"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProviderFilter 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 ApiCatalogProviderFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "region": obj.get("region"), + "location": obj.get("location"), + "asn": obj.get("asn"), + "included": obj.get("included") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider_response.py b/internet_insights/internet_insights/models/api_catalog_provider_response.py new file mode 100644 index 00000000..841d633b --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 internet_insights.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner +from internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiCatalogProviderResponse(BaseModel): + """ + ApiCatalogProviderResponse + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + providers: Optional[List[ApiCatalogProviderResponseAllOfProvidersInner]] = Field(default=None, description="List of catalog providers.") + __properties: ClassVar[List[str]] = ["_links", "providers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProviderResponse 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 links + if self.links: + _dict['_links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in providers (list) + _items = [] + if self.providers: + for _item in self.providers: + if _item: + _items.append(_item.to_dict()) + _dict['providers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiCatalogProviderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "providers": [ApiCatalogProviderResponseAllOfProvidersInner.from_dict(_item) for _item in obj["providers"]] if obj.get("providers") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_catalog_provider_response_all_of_providers_inner.py b/internet_insights/internet_insights/models/api_catalog_provider_response_all_of_providers_inner.py new file mode 100644 index 00000000..b9a11723 --- /dev/null +++ b/internet_insights/internet_insights/models/api_catalog_provider_response_all_of_providers_inner.py @@ -0,0 +1,111 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiCatalogProviderResponseAllOfProvidersInner(BaseModel): + """ + ApiCatalogProviderResponseAllOfProvidersInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") + region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") + data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") + asns_count: Optional[StrictInt] = Field(default=None, description="The number of ASN's covered by the provider.", alias="asnsCount") + countries_count: Optional[StrictInt] = Field(default=None, description="The number of countries covered by the provider.", alias="countriesCount") + locations_count: Optional[StrictInt] = Field(default=None, description="The number of locations covered by the provider.", alias="locationsCount") + interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of interfaces covered by the provider.", alias="interfacesCount") + included: Optional[StrictBool] = Field(default=None, description="Indicates whether the catalog provider is included in the licensed packages.") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asnsCount", "countriesCount", "locationsCount", "interfacesCount", "included", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiCatalogProviderResponseAllOfProvidersInner 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 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 ApiCatalogProviderResponseAllOfProvidersInner 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "region": obj.get("region"), + "dataType": obj.get("dataType"), + "asnsCount": obj.get("asnsCount"), + "countriesCount": obj.get("countriesCount"), + "locationsCount": obj.get("locationsCount"), + "interfacesCount": obj.get("interfacesCount"), + "included": obj.get("included"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_network_outage_affected_location.py b/internet_insights/internet_insights/models/api_network_outage_affected_location.py new file mode 100644 index 00000000..0f69a48a --- /dev/null +++ b/internet_insights/internet_insights/models/api_network_outage_affected_location.py @@ -0,0 +1,89 @@ +# 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.2 + 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 ApiNetworkOutageAffectedLocation(BaseModel): + """ + ApiNetworkOutageAffectedLocation + """ # noqa: E501 + location: Optional[StrictStr] = Field(default=None, description="The affected location.") + affected_interfaces: Optional[List[StrictStr]] = Field(default=None, description="The affected interfaces in this location.", alias="affectedInterfaces") + __properties: ClassVar[List[str]] = ["location", "affectedInterfaces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNetworkOutageAffectedLocation 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 ApiNetworkOutageAffectedLocation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "location": obj.get("location"), + "affectedInterfaces": obj.get("affectedInterfaces") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_network_outage_details.py b/internet_insights/internet_insights/models/api_network_outage_details.py new file mode 100644 index 00000000..37c1b027 --- /dev/null +++ b/internet_insights/internet_insights/models/api_network_outage_details.py @@ -0,0 +1,137 @@ +# 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.2 + 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 internet_insights.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation +from typing import Optional, Set +from typing_extensions import Self + +class ApiNetworkOutageDetails(BaseModel): + """ + ApiNetworkOutageDetails + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") + network_name: Optional[StrictStr] = Field(default=None, description="The affected network.", alias="networkName") + asn: Optional[StrictInt] = Field(default=None, description="ASN number") + start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") + start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") + end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") + end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") + duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") + affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") + affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") + affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") + affected_locations: Optional[List[ApiNetworkOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "networkName", "asn", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "affectedLocations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNetworkOutageDetails 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 affected_tests (list) + _items = [] + if self.affected_tests: + for _item in self.affected_tests: + if _item: + _items.append(_item.to_dict()) + _dict['affectedTests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) + _items = [] + if self.affected_agents: + for _item in self.affected_agents: + if _item: + _items.append(_item.to_dict()) + _dict['affectedAgents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) + _items = [] + if self.affected_locations: + for _item in self.affected_locations: + if _item: + _items.append(_item.to_dict()) + _dict['affectedLocations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiNetworkOutageDetails 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "networkName": obj.get("networkName"), + "asn": obj.get("asn"), + "startDate": obj.get("startDate"), + "startRoundId": obj.get("startRoundId"), + "endDate": obj.get("endDate"), + "endRoundId": obj.get("endRoundId"), + "duration": obj.get("duration"), + "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj["affectedTests"]] if obj.get("affectedTests") is not None else None, + "affectedDomains": obj.get("affectedDomains"), + "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj["affectedAgents"]] if obj.get("affectedAgents") is not None else None, + "affectedLocations": [ApiNetworkOutageAffectedLocation.from_dict(_item) for _item in obj["affectedLocations"]] if obj.get("affectedLocations") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_network_outage_response.py b/internet_insights/internet_insights/models/api_network_outage_response.py new file mode 100644 index 00000000..2e3070d8 --- /dev/null +++ b/internet_insights/internet_insights/models/api_network_outage_response.py @@ -0,0 +1,143 @@ +# 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.2 + 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 internet_insights.models.api_affected_agent import ApiAffectedAgent +from internet_insights.models.api_affected_test import ApiAffectedTest +from internet_insights.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation +from internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiNetworkOutageResponse(BaseModel): + """ + ApiNetworkOutageResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") + network_name: Optional[StrictStr] = Field(default=None, description="The affected network.", alias="networkName") + asn: Optional[StrictInt] = Field(default=None, description="ASN number") + start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") + start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") + end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") + end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") + duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") + affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") + affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") + affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") + affected_locations: Optional[List[ApiNetworkOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "networkName", "asn", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "affectedLocations", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiNetworkOutageResponse 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 affected_tests (list) + _items = [] + if self.affected_tests: + for _item in self.affected_tests: + if _item: + _items.append(_item.to_dict()) + _dict['affectedTests'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) + _items = [] + if self.affected_agents: + for _item in self.affected_agents: + if _item: + _items.append(_item.to_dict()) + _dict['affectedAgents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) + _items = [] + if self.affected_locations: + for _item in self.affected_locations: + if _item: + _items.append(_item.to_dict()) + _dict['affectedLocations'] = _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 ApiNetworkOutageResponse 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"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "networkName": obj.get("networkName"), + "asn": obj.get("asn"), + "startDate": obj.get("startDate"), + "startRoundId": obj.get("startRoundId"), + "endDate": obj.get("endDate"), + "endRoundId": obj.get("endRoundId"), + "duration": obj.get("duration"), + "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj["affectedTests"]] if obj.get("affectedTests") is not None else None, + "affectedDomains": obj.get("affectedDomains"), + "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj["affectedAgents"]] if obj.get("affectedAgents") is not None else None, + "affectedLocations": [ApiNetworkOutageAffectedLocation.from_dict(_item) for _item in obj["affectedLocations"]] if obj.get("affectedLocations") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_outage.py b/internet_insights/internet_insights/models/api_outage.py new file mode 100644 index 00000000..f705c10f --- /dev/null +++ b/internet_insights/internet_insights/models/api_outage.py @@ -0,0 +1,115 @@ +# 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.2 + 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 ApiOutage(BaseModel): + """ + List of outages. + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") + type: Optional[StrictStr] = Field(default=None, description="The type of outage e.g. app.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") + name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.") + start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") + start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") + end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") + end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") + duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage (seconds)") + affected_tests_count: Optional[StrictInt] = Field(default=None, description="The number of affected tests", alias="affectedTestsCount") + affected_servers_count: Optional[StrictInt] = Field(default=None, description="The number of affected servers", alias="affectedServersCount") + affected_locations_count: Optional[StrictInt] = Field(default=None, description="The number of affected locations.", alias="affectedLocationsCount") + affected_interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of affected interfaces.", alias="affectedInterfacesCount") + asn: Optional[StrictInt] = Field(default=None, description="ASN number.") + __properties: ClassVar[List[str]] = ["id", "type", "providerName", "providerType", "name", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTestsCount", "affectedServersCount", "affectedLocationsCount", "affectedInterfacesCount", "asn"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiOutage 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 ApiOutage 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"), + "type": obj.get("type"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "name": obj.get("name"), + "startDate": obj.get("startDate"), + "startRoundId": obj.get("startRoundId"), + "endDate": obj.get("endDate"), + "endRoundId": obj.get("endRoundId"), + "duration": obj.get("duration"), + "affectedTestsCount": obj.get("affectedTestsCount"), + "affectedServersCount": obj.get("affectedServersCount"), + "affectedLocationsCount": obj.get("affectedLocationsCount"), + "affectedInterfacesCount": obj.get("affectedInterfacesCount"), + "asn": obj.get("asn") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_outage_filter.py b/internet_insights/internet_insights/models/api_outage_filter.py new file mode 100644 index 00000000..33a86757 --- /dev/null +++ b/internet_insights/internet_insights/models/api_outage_filter.py @@ -0,0 +1,100 @@ +# 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.2 + 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 internet_insights.models.outage_scope import OutageScope +from typing import Optional, Set +from typing_extensions import Self + +class ApiOutageFilter(BaseModel): + """ + Advanced filter query used to filter the response. Can filter on: - outageScope (all, affected tests (e.g. my tests only)). - providerName - interfaceNetwork - applicationName - startDate, endDate - window + """ # noqa: E501 + start_date: Optional[StrictStr] = Field(default=None, description="Start of the time range. Must be paired with `endDate`.", alias="startDate") + end_date: Optional[StrictStr] = Field(default=None, description="End of the time range. Must be paired with `startDate`.", alias="endDate") + window: Optional[StrictStr] = Field(default=None, description="Specify a time period in the past for which to retrieve data. Alternative to specifying `startDate` and `endDate`.") + outage_scope: Optional[OutageScope] = Field(default=None, alias="outageScope") + provider_name: Optional[List[StrictStr]] = Field(default=None, description="The name used to identify the provider.", alias="providerName") + application_name: Optional[List[StrictStr]] = Field(default=None, description="The name to identify the application.", alias="applicationName") + interface_network: Optional[List[StrictStr]] = Field(default=None, description="The name of the ASN (Interface Network).", alias="interfaceNetwork") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "window", "outageScope", "providerName", "applicationName", "interfaceNetwork"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiOutageFilter 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 ApiOutageFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "window": obj.get("window"), + "outageScope": obj.get("outageScope"), + "providerName": obj.get("providerName"), + "applicationName": obj.get("applicationName"), + "interfaceNetwork": obj.get("interfaceNetwork") + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_outages_response.py b/internet_insights/internet_insights/models/api_outages_response.py new file mode 100644 index 00000000..8545c125 --- /dev/null +++ b/internet_insights/internet_insights/models/api_outages_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 internet_insights.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner +from internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiOutagesResponse(BaseModel): + """ + ApiOutagesResponse + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + outages: Optional[List[ApiOutagesResponseAllOfOutagesInner]] = Field(default=None, description="List of application outages.") + __properties: ClassVar[List[str]] = ["_links", "outages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiOutagesResponse 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 links + if self.links: + _dict['_links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in outages (list) + _items = [] + if self.outages: + for _item in self.outages: + if _item: + _items.append(_item.to_dict()) + _dict['outages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApiOutagesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "outages": [ApiOutagesResponseAllOfOutagesInner.from_dict(_item) for _item in obj["outages"]] if obj.get("outages") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/api_outages_response_all_of_outages_inner.py b/internet_insights/internet_insights/models/api_outages_response_all_of_outages_inner.py new file mode 100644 index 00000000..8a5b43c2 --- /dev/null +++ b/internet_insights/internet_insights/models/api_outages_response_all_of_outages_inner.py @@ -0,0 +1,121 @@ +# 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.2 + 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 internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class ApiOutagesResponseAllOfOutagesInner(BaseModel): + """ + ApiOutagesResponseAllOfOutagesInner + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") + type: Optional[StrictStr] = Field(default=None, description="The type of outage e.g. app.") + provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") + provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") + name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.") + start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") + start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") + end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") + end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") + duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage (seconds)") + affected_tests_count: Optional[StrictInt] = Field(default=None, description="The number of affected tests", alias="affectedTestsCount") + affected_servers_count: Optional[StrictInt] = Field(default=None, description="The number of affected servers", alias="affectedServersCount") + affected_locations_count: Optional[StrictInt] = Field(default=None, description="The number of affected locations.", alias="affectedLocationsCount") + affected_interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of affected interfaces.", alias="affectedInterfacesCount") + asn: Optional[StrictInt] = Field(default=None, description="ASN number.") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "type", "providerName", "providerType", "name", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTestsCount", "affectedServersCount", "affectedLocationsCount", "affectedInterfacesCount", "asn", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiOutagesResponseAllOfOutagesInner 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 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 ApiOutagesResponseAllOfOutagesInner 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"), + "type": obj.get("type"), + "providerName": obj.get("providerName"), + "providerType": obj.get("providerType"), + "name": obj.get("name"), + "startDate": obj.get("startDate"), + "startRoundId": obj.get("startRoundId"), + "endDate": obj.get("endDate"), + "endRoundId": obj.get("endRoundId"), + "duration": obj.get("duration"), + "affectedTestsCount": obj.get("affectedTestsCount"), + "affectedServersCount": obj.get("affectedServersCount"), + "affectedLocationsCount": obj.get("affectedLocationsCount"), + "affectedInterfacesCount": obj.get("affectedInterfacesCount"), + "asn": obj.get("asn"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/error.py b/internet_insights/internet_insights/models/error.py new file mode 100644 index 00000000..05184098 --- /dev/null +++ b/internet_insights/internet_insights/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/internet_insights/internet_insights/models/link.py b/internet_insights/internet_insights/models/link.py new file mode 100644 index 00000000..ce01efbb --- /dev/null +++ b/internet_insights/internet_insights/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/internet_insights/internet_insights/models/outage_scope.py b/internet_insights/internet_insights/models/outage_scope.py new file mode 100644 index 00000000..ffececa3 --- /dev/null +++ b/internet_insights/internet_insights/models/outage_scope.py @@ -0,0 +1,37 @@ +# 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.2 + 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 OutageScope(str, Enum): + """ + Scope of the outage + """ + + """ + allowed enum values + """ + ALL = 'all' + WITH_MINUS_AFFECTED_MINUS_TEST = 'with-affected-test' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OutageScope from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/internet_insights/internet_insights/models/self_links.py b/internet_insights/internet_insights/models/self_links.py new file mode 100644 index 00000000..face88ed --- /dev/null +++ b/internet_insights/internet_insights/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 internet_insights.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/self_links_links.py b/internet_insights/internet_insights/models/self_links_links.py new file mode 100644 index 00000000..246ed2d3 --- /dev/null +++ b/internet_insights/internet_insights/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 internet_insights.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/internet_insights/internet_insights/models/unauthorized_error.py b/internet_insights/internet_insights/models/unauthorized_error.py new file mode 100644 index 00000000..940e6008 --- /dev/null +++ b/internet_insights/internet_insights/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/internet_insights/internet_insights/models/validation_error.py b/internet_insights/internet_insights/models/validation_error.py new file mode 100644 index 00000000..480f0c80 --- /dev/null +++ b/internet_insights/internet_insights/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 internet_insights.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/internet_insights/internet_insights/models/validation_error_all_of_errors.py b/internet_insights/internet_insights/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..71eacaea --- /dev/null +++ b/internet_insights/internet_insights/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/internet_insights_api/internet_insights_api/py.typed b/internet_insights/internet_insights/py.typed similarity index 100% rename from internet_insights_api/internet_insights_api/py.typed rename to internet_insights/internet_insights/py.typed diff --git a/internet_insights/internet_insights/rest.py b/internet_insights/internet_insights/rest.py new file mode 100644 index 00000000..7fc761e5 --- /dev/null +++ b/internet_insights/internet_insights/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from internet_insights.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/internet_insights/pyproject.toml b/internet_insights/pyproject.toml new file mode 100644 index 00000000..af3e3469 --- /dev/null +++ b/internet_insights/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "internet_insights" +version = "1.0.0" +description = "Internet Insights API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Internet Insights API"] +include = ["internet_insights/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "internet_insights", + #"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/internet_insights_api/requirements.txt b/internet_insights/requirements.txt similarity index 100% rename from internet_insights_api/requirements.txt rename to internet_insights/requirements.txt diff --git a/internet_insights_api/setup.cfg b/internet_insights/setup.cfg similarity index 100% rename from internet_insights_api/setup.cfg rename to internet_insights/setup.cfg diff --git a/internet_insights/setup.py b/internet_insights/setup.py new file mode 100644 index 00000000..b91fb375 --- /dev/null +++ b/internet_insights/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "internet-insights" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Internet Insights API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/internet_insights", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Internet Insights API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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. + """, # noqa: E501 + package_data={"internet_insights": ["py.typed"]}, +) diff --git a/internet_insights/test-requirements.txt b/internet_insights/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/internet_insights/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/internet_insights_api/test/__init__.py b/internet_insights/test/__init__.py similarity index 100% rename from internet_insights_api/test/__init__.py rename to internet_insights/test/__init__.py diff --git a/internet_insights/test/test_api_affected_agent.py b/internet_insights/test/test_api_affected_agent.py new file mode 100644 index 00000000..0ec04dca --- /dev/null +++ b/internet_insights/test/test_api_affected_agent.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_affected_agent import ApiAffectedAgent + +class TestApiAffectedAgent(unittest.TestCase): + """ApiAffectedAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiAffectedAgent: + """Test ApiAffectedAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiAffectedAgent` + """ + model = ApiAffectedAgent() + if include_optional: + return ApiAffectedAgent( + id = 11, + name = 'London, England' + ) + else: + return ApiAffectedAgent( + ) + """ + + def testApiAffectedAgent(self): + """Test ApiAffectedAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_affected_test.py b/internet_insights/test/test_api_affected_test.py new file mode 100644 index 00000000..02dadd76 --- /dev/null +++ b/internet_insights/test/test_api_affected_test.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_affected_test import ApiAffectedTest + +class TestApiAffectedTest(unittest.TestCase): + """ApiAffectedTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiAffectedTest: + """Test ApiAffectedTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiAffectedTest` + """ + model = ApiAffectedTest() + if include_optional: + return ApiAffectedTest( + id = 5, + name = 'amazon-test2' + ) + else: + return ApiAffectedTest( + ) + """ + + def testApiAffectedTest(self): + """Test ApiAffectedTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_application_outage_affected_location.py b/internet_insights/test/test_api_application_outage_affected_location.py new file mode 100644 index 00000000..641e6762 --- /dev/null +++ b/internet_insights/test/test_api_application_outage_affected_location.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation + +class TestApiApplicationOutageAffectedLocation(unittest.TestCase): + """ApiApplicationOutageAffectedLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiApplicationOutageAffectedLocation: + """Test ApiApplicationOutageAffectedLocation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiApplicationOutageAffectedLocation` + """ + model = ApiApplicationOutageAffectedLocation() + if include_optional: + return ApiApplicationOutageAffectedLocation( + location = 'Chicago, Illinois, US', + affected_servers = [ + internet_insights.models.api_application_outage_affected_server.ApiApplicationOutageAffectedServer( + domain = 'amazon.com', + prefix = '123.176.185.0/23', ) + ] + ) + else: + return ApiApplicationOutageAffectedLocation( + ) + """ + + def testApiApplicationOutageAffectedLocation(self): + """Test ApiApplicationOutageAffectedLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_application_outage_affected_server.py b/internet_insights/test/test_api_application_outage_affected_server.py new file mode 100644 index 00000000..cd636132 --- /dev/null +++ b/internet_insights/test/test_api_application_outage_affected_server.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer + +class TestApiApplicationOutageAffectedServer(unittest.TestCase): + """ApiApplicationOutageAffectedServer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiApplicationOutageAffectedServer: + """Test ApiApplicationOutageAffectedServer + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiApplicationOutageAffectedServer` + """ + model = ApiApplicationOutageAffectedServer() + if include_optional: + return ApiApplicationOutageAffectedServer( + domain = 'amazon.com', + prefix = '123.176.185.0/23' + ) + else: + return ApiApplicationOutageAffectedServer( + ) + """ + + def testApiApplicationOutageAffectedServer(self): + """Test ApiApplicationOutageAffectedServer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_application_outage_details.py b/internet_insights/test/test_api_application_outage_details.py new file mode 100644 index 00000000..6452595b --- /dev/null +++ b/internet_insights/test/test_api_application_outage_details.py @@ -0,0 +1,84 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_application_outage_details import ApiApplicationOutageDetails + +class TestApiApplicationOutageDetails(unittest.TestCase): + """ApiApplicationOutageDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiApplicationOutageDetails: + """Test ApiApplicationOutageDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiApplicationOutageDetails` + """ + model = ApiApplicationOutageDetails() + if include_optional: + return ApiApplicationOutageDetails( + id = '0CC4C4209887126DE42E92252FB43962CBB3193147F318EA', + provider_name = 'Amazon Web Services', + provider_type = 'SAAS', + application_name = 'Amazon Web Services', + start_date = '2023-01-27T20:50:51.256Z', + start_round_id = 1674852600, + end_date = '2023-01-27T20:53:51.256Z', + end_round_id = 1674852600, + duration = 180, + affected_tests = [ + internet_insights.models.api_affected_test.ApiAffectedTest( + id = 5, + name = 'amazon-test2', ) + ], + affected_domains = [ + 'amazon.com' + ], + affected_agents = [ + internet_insights.models.api_affected_agent.ApiAffectedAgent( + id = 11, + name = 'London, England', ) + ], + errors = [ + 'HTTP_SERVER_TIMEOUT' + ], + affected_locations = [ + internet_insights.models.api_application_outage_affected_location.ApiApplicationOutageAffectedLocation( + location = 'Chicago, Illinois, US', + affected_servers = [ + internet_insights.models.api_application_outage_affected_server.ApiApplicationOutageAffectedServer( + domain = 'amazon.com', + prefix = '123.176.185.0/23', ) + ], ) + ] + ) + else: + return ApiApplicationOutageDetails( + ) + """ + + def testApiApplicationOutageDetails(self): + """Test ApiApplicationOutageDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_application_outage_response.py b/internet_insights/test/test_api_application_outage_response.py new file mode 100644 index 00000000..66751b1a --- /dev/null +++ b/internet_insights/test/test_api_application_outage_response.py @@ -0,0 +1,94 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_application_outage_response import ApiApplicationOutageResponse + +class TestApiApplicationOutageResponse(unittest.TestCase): + """ApiApplicationOutageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiApplicationOutageResponse: + """Test ApiApplicationOutageResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiApplicationOutageResponse` + """ + model = ApiApplicationOutageResponse() + if include_optional: + return ApiApplicationOutageResponse( + id = '0CC4C4209887126DE42E92252FB43962CBB3193147F318EA', + provider_name = 'Amazon Web Services', + provider_type = 'SAAS', + application_name = 'Amazon Web Services', + start_date = '2023-01-27T20:50:51.256Z', + start_round_id = 1674852600, + end_date = '2023-01-27T20:53:51.256Z', + end_round_id = 1674852600, + duration = 180, + affected_tests = [ + internet_insights.models.api_affected_test.ApiAffectedTest( + id = 5, + name = 'amazon-test2', ) + ], + affected_domains = [ + 'amazon.com' + ], + affected_agents = [ + internet_insights.models.api_affected_agent.ApiAffectedAgent( + id = 11, + name = 'London, England', ) + ], + errors = [ + 'HTTP_SERVER_TIMEOUT' + ], + affected_locations = [ + internet_insights.models.api_application_outage_affected_location.ApiApplicationOutageAffectedLocation( + location = 'Chicago, Illinois, US', + affected_servers = [ + internet_insights.models.api_application_outage_affected_server.ApiApplicationOutageAffectedServer( + domain = 'amazon.com', + prefix = '123.176.185.0/23', ) + ], ) + ], + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return ApiApplicationOutageResponse( + ) + """ + + def testApiApplicationOutageResponse(self): + """Test ApiApplicationOutageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_asn.py b/internet_insights/test/test_api_asn.py new file mode 100644 index 00000000..ff8a21b2 --- /dev/null +++ b/internet_insights/test/test_api_asn.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_asn import ApiAsn + +class TestApiAsn(unittest.TestCase): + """ApiAsn unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiAsn: + """Test ApiAsn + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiAsn` + """ + model = ApiAsn() + if include_optional: + return ApiAsn( + id = 1, + name = 'LVLT-1 - Level 3 Communications, Inc.' + ) + else: + return ApiAsn( + ) + """ + + def testApiAsn(self): + """Test ApiAsn""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider.py b/internet_insights/test/test_api_catalog_provider.py new file mode 100644 index 00000000..70a21ac6 --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider import ApiCatalogProvider + +class TestApiCatalogProvider(unittest.TestCase): + """ApiCatalogProvider unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProvider: + """Test ApiCatalogProvider + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProvider` + """ + model = ApiCatalogProvider() + if include_optional: + return ApiCatalogProvider( + id = '85602a0a-54a7-4e97-946e-67492ef1fa26', + provider_name = 'Amazon Web Services', + provider_type = 'IAAS', + region = 'North America', + data_type = 'Application', + asns_count = 10, + countries_count = 2, + locations_count = 50, + interfaces_count = 15, + included = True + ) + else: + return ApiCatalogProvider( + ) + """ + + def testApiCatalogProvider(self): + """Test ApiCatalogProvider""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider_details.py b/internet_insights/test/test_api_catalog_provider_details.py new file mode 100644 index 00000000..45fb3397 --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider_details.py @@ -0,0 +1,65 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider_details import ApiCatalogProviderDetails + +class TestApiCatalogProviderDetails(unittest.TestCase): + """ApiCatalogProviderDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProviderDetails: + """Test ApiCatalogProviderDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProviderDetails` + """ + model = ApiCatalogProviderDetails() + if include_optional: + return ApiCatalogProviderDetails( + id = '85602a0a-54a7-4e97-946e-67492ef1fa26', + provider_name = 'Amazon Web Services', + provider_type = 'IAAS', + region = 'North America', + data_type = 'Application', + asns = [ + internet_insights.models.api_asn.ApiAsn( + id = 1, + name = 'LVLT-1 - Level 3 Communications, Inc.', ) + ], + locations = [ + internet_insights.models.api_catalog_provider_details_locations_inner.ApiCatalogProviderDetails_locations_inner( + location = 'San Jose, US', + interfaces_count = 5, ) + ] + ) + else: + return ApiCatalogProviderDetails( + ) + """ + + def testApiCatalogProviderDetails(self): + """Test ApiCatalogProviderDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider_details_locations_inner.py b/internet_insights/test/test_api_catalog_provider_details_locations_inner.py new file mode 100644 index 00000000..e2786235 --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider_details_locations_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner + +class TestApiCatalogProviderDetailsLocationsInner(unittest.TestCase): + """ApiCatalogProviderDetailsLocationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProviderDetailsLocationsInner: + """Test ApiCatalogProviderDetailsLocationsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProviderDetailsLocationsInner` + """ + model = ApiCatalogProviderDetailsLocationsInner() + if include_optional: + return ApiCatalogProviderDetailsLocationsInner( + location = 'San Jose, US', + interfaces_count = 5 + ) + else: + return ApiCatalogProviderDetailsLocationsInner( + ) + """ + + def testApiCatalogProviderDetailsLocationsInner(self): + """Test ApiCatalogProviderDetailsLocationsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider_details_response.py b/internet_insights/test/test_api_catalog_provider_details_response.py new file mode 100644 index 00000000..e43676ae --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider_details_response.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse + +class TestApiCatalogProviderDetailsResponse(unittest.TestCase): + """ApiCatalogProviderDetailsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProviderDetailsResponse: + """Test ApiCatalogProviderDetailsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProviderDetailsResponse` + """ + model = ApiCatalogProviderDetailsResponse() + if include_optional: + return ApiCatalogProviderDetailsResponse( + id = '85602a0a-54a7-4e97-946e-67492ef1fa26', + provider_name = 'Amazon Web Services', + provider_type = 'IAAS', + region = 'North America', + data_type = 'Application', + asns = [ + internet_insights.models.api_asn.ApiAsn( + id = 1, + name = 'LVLT-1 - Level 3 Communications, Inc.', ) + ], + locations = [ + internet_insights.models.api_catalog_provider_details_locations_inner.ApiCatalogProviderDetails_locations_inner( + location = 'San Jose, US', + interfaces_count = 5, ) + ], + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return ApiCatalogProviderDetailsResponse( + ) + """ + + def testApiCatalogProviderDetailsResponse(self): + """Test ApiCatalogProviderDetailsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider_filter.py b/internet_insights/test/test_api_catalog_provider_filter.py new file mode 100644 index 00000000..b294947b --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider_filter.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider_filter import ApiCatalogProviderFilter + +class TestApiCatalogProviderFilter(unittest.TestCase): + """ApiCatalogProviderFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProviderFilter: + """Test ApiCatalogProviderFilter + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProviderFilter` + """ + model = ApiCatalogProviderFilter() + if include_optional: + return ApiCatalogProviderFilter( + provider_name = 'Amazon Web Services', + provider_type = 'IAAS', + region = 'North America', + location = 'San Jose, US', + asn = 'Amazon.com, Inc.', + included = True + ) + else: + return ApiCatalogProviderFilter( + ) + """ + + def testApiCatalogProviderFilter(self): + """Test ApiCatalogProviderFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider_response.py b/internet_insights/test/test_api_catalog_provider_response.py new file mode 100644 index 00000000..516023cf --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider_response import ApiCatalogProviderResponse + +class TestApiCatalogProviderResponse(unittest.TestCase): + """ApiCatalogProviderResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProviderResponse: + """Test ApiCatalogProviderResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProviderResponse` + """ + model = ApiCatalogProviderResponse() + if include_optional: + return ApiCatalogProviderResponse( + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + providers = [ + null + ] + ) + else: + return ApiCatalogProviderResponse( + ) + """ + + def testApiCatalogProviderResponse(self): + """Test ApiCatalogProviderResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_catalog_provider_response_all_of_providers_inner.py b/internet_insights/test/test_api_catalog_provider_response_all_of_providers_inner.py new file mode 100644 index 00000000..82de5e43 --- /dev/null +++ b/internet_insights/test/test_api_catalog_provider_response_all_of_providers_inner.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner + +class TestApiCatalogProviderResponseAllOfProvidersInner(unittest.TestCase): + """ApiCatalogProviderResponseAllOfProvidersInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiCatalogProviderResponseAllOfProvidersInner: + """Test ApiCatalogProviderResponseAllOfProvidersInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiCatalogProviderResponseAllOfProvidersInner` + """ + model = ApiCatalogProviderResponseAllOfProvidersInner() + if include_optional: + return ApiCatalogProviderResponseAllOfProvidersInner( + id = '85602a0a-54a7-4e97-946e-67492ef1fa26', + provider_name = 'Amazon Web Services', + provider_type = 'IAAS', + region = 'North America', + data_type = 'Application', + asns_count = 10, + countries_count = 2, + locations_count = 50, + interfaces_count = 15, + included = True, + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return ApiCatalogProviderResponseAllOfProvidersInner( + ) + """ + + def testApiCatalogProviderResponseAllOfProvidersInner(self): + """Test ApiCatalogProviderResponseAllOfProvidersInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_network_outage_affected_location.py b/internet_insights/test/test_api_network_outage_affected_location.py new file mode 100644 index 00000000..2c44f9ec --- /dev/null +++ b/internet_insights/test/test_api_network_outage_affected_location.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation + +class TestApiNetworkOutageAffectedLocation(unittest.TestCase): + """ApiNetworkOutageAffectedLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiNetworkOutageAffectedLocation: + """Test ApiNetworkOutageAffectedLocation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiNetworkOutageAffectedLocation` + """ + model = ApiNetworkOutageAffectedLocation() + if include_optional: + return ApiNetworkOutageAffectedLocation( + location = 'Chicago, Illinois, US', + affected_interfaces = [ + '50.51.52.53' + ] + ) + else: + return ApiNetworkOutageAffectedLocation( + ) + """ + + def testApiNetworkOutageAffectedLocation(self): + """Test ApiNetworkOutageAffectedLocation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_network_outage_details.py b/internet_insights/test/test_api_network_outage_details.py new file mode 100644 index 00000000..8d56fef1 --- /dev/null +++ b/internet_insights/test/test_api_network_outage_details.py @@ -0,0 +1,80 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_network_outage_details import ApiNetworkOutageDetails + +class TestApiNetworkOutageDetails(unittest.TestCase): + """ApiNetworkOutageDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiNetworkOutageDetails: + """Test ApiNetworkOutageDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiNetworkOutageDetails` + """ + model = ApiNetworkOutageDetails() + if include_optional: + return ApiNetworkOutageDetails( + id = '8EF2760862C705783A2F8BCBAAABB44F28DBC670DBA3B610', + provider_name = 'Rackspace', + provider_type = 'IAAS', + network_name = 'Rackspace Hosting', + asn = 19994, + start_date = '2023-01-27T20:50:51.256Z', + start_round_id = 1674852600, + end_date = '2023-01-27T20:53:51.256Z', + end_round_id = 1674852600, + duration = 180, + affected_tests = [ + internet_insights.models.api_affected_test.ApiAffectedTest( + id = 5, + name = 'amazon-test2', ) + ], + affected_domains = [ + 'periodic-failure.com' + ], + affected_agents = [ + internet_insights.models.api_affected_agent.ApiAffectedAgent( + id = 11, + name = 'London, England', ) + ], + affected_locations = [ + internet_insights.models.api_network_outage_affected_location.ApiNetworkOutageAffectedLocation( + location = 'Chicago, Illinois, US', + affected_interfaces = [ + '50.51.52.53' + ], ) + ] + ) + else: + return ApiNetworkOutageDetails( + ) + """ + + def testApiNetworkOutageDetails(self): + """Test ApiNetworkOutageDetails""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_network_outage_response.py b/internet_insights/test/test_api_network_outage_response.py new file mode 100644 index 00000000..fd9453ce --- /dev/null +++ b/internet_insights/test/test_api_network_outage_response.py @@ -0,0 +1,90 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_network_outage_response import ApiNetworkOutageResponse + +class TestApiNetworkOutageResponse(unittest.TestCase): + """ApiNetworkOutageResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiNetworkOutageResponse: + """Test ApiNetworkOutageResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiNetworkOutageResponse` + """ + model = ApiNetworkOutageResponse() + if include_optional: + return ApiNetworkOutageResponse( + id = '8EF2760862C705783A2F8BCBAAABB44F28DBC670DBA3B610', + provider_name = 'Rackspace', + provider_type = 'IAAS', + network_name = 'Rackspace Hosting', + asn = 19994, + start_date = '2023-01-27T20:50:51.256Z', + start_round_id = 1674852600, + end_date = '2023-01-27T20:53:51.256Z', + end_round_id = 1674852600, + duration = 180, + affected_tests = [ + internet_insights.models.api_affected_test.ApiAffectedTest( + id = 5, + name = 'amazon-test2', ) + ], + affected_domains = [ + 'periodic-failure.com' + ], + affected_agents = [ + internet_insights.models.api_affected_agent.ApiAffectedAgent( + id = 11, + name = 'London, England', ) + ], + affected_locations = [ + internet_insights.models.api_network_outage_affected_location.ApiNetworkOutageAffectedLocation( + location = 'Chicago, Illinois, US', + affected_interfaces = [ + '50.51.52.53' + ], ) + ], + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return ApiNetworkOutageResponse( + ) + """ + + def testApiNetworkOutageResponse(self): + """Test ApiNetworkOutageResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_outage.py b/internet_insights/test/test_api_outage.py new file mode 100644 index 00000000..e28147fa --- /dev/null +++ b/internet_insights/test/test_api_outage.py @@ -0,0 +1,65 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_outage import ApiOutage + +class TestApiOutage(unittest.TestCase): + """ApiOutage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiOutage: + """Test ApiOutage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiOutage` + """ + model = ApiOutage() + if include_optional: + return ApiOutage( + id = 'xxxxxxxxxxxxxxxxxx1', + type = 'app', + provider_name = 'Google', + provider_type = 'SAAS', + name = 'Google', + start_date = '2022-03-01T23:31:11Z', + start_round_id = 1646177400, + end_date = '2022-03-01T23:31:11Z', + end_round_id = 1646177700, + duration = 214, + affected_tests_count = 1, + affected_servers_count = 2, + affected_locations_count = 1, + affected_interfaces_count = 1, + asn = 19994 + ) + else: + return ApiOutage( + ) + """ + + def testApiOutage(self): + """Test ApiOutage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_outage_filter.py b/internet_insights/test/test_api_outage_filter.py new file mode 100644 index 00000000..606e1fa7 --- /dev/null +++ b/internet_insights/test/test_api_outage_filter.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_outage_filter import ApiOutageFilter + +class TestApiOutageFilter(unittest.TestCase): + """ApiOutageFilter unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiOutageFilter: + """Test ApiOutageFilter + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiOutageFilter` + """ + model = ApiOutageFilter() + if include_optional: + return ApiOutageFilter( + start_date = '2022-03-01T01:30:00Z', + end_date = '2022-03-01T23:30:15Z', + window = '1d', + outage_scope = 'all', + provider_name = ["Telia","Amazon"], + application_name = ["slack","facebook"], + interface_network = [ + '' + ] + ) + else: + return ApiOutageFilter( + ) + """ + + def testApiOutageFilter(self): + """Test ApiOutageFilter""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_outages_response.py b/internet_insights/test/test_api_outages_response.py new file mode 100644 index 00000000..e4a3da7f --- /dev/null +++ b/internet_insights/test/test_api_outages_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_outages_response import ApiOutagesResponse + +class TestApiOutagesResponse(unittest.TestCase): + """ApiOutagesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiOutagesResponse: + """Test ApiOutagesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiOutagesResponse` + """ + model = ApiOutagesResponse() + if include_optional: + return ApiOutagesResponse( + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ), + outages = [ + null + ] + ) + else: + return ApiOutagesResponse( + ) + """ + + def testApiOutagesResponse(self): + """Test ApiOutagesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_api_outages_response_all_of_outages_inner.py b/internet_insights/test/test_api_outages_response_all_of_outages_inner.py new file mode 100644 index 00000000..551c953a --- /dev/null +++ b/internet_insights/test/test_api_outages_response_all_of_outages_inner.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner + +class TestApiOutagesResponseAllOfOutagesInner(unittest.TestCase): + """ApiOutagesResponseAllOfOutagesInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiOutagesResponseAllOfOutagesInner: + """Test ApiOutagesResponseAllOfOutagesInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiOutagesResponseAllOfOutagesInner` + """ + model = ApiOutagesResponseAllOfOutagesInner() + if include_optional: + return ApiOutagesResponseAllOfOutagesInner( + id = 'xxxxxxxxxxxxxxxxxx1', + type = 'app', + provider_name = 'Google', + provider_type = 'SAAS', + name = 'Google', + start_date = '2022-03-01T23:31:11Z', + start_round_id = 1646177400, + end_date = '2022-03-01T23:31:11Z', + end_round_id = 1646177700, + duration = 214, + affected_tests_count = 1, + affected_servers_count = 2, + affected_locations_count = 1, + affected_interfaces_count = 1, + asn = 19994, + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return ApiOutagesResponseAllOfOutagesInner( + ) + """ + + def testApiOutagesResponseAllOfOutagesInner(self): + """Test ApiOutagesResponseAllOfOutagesInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_error.py b/internet_insights/test/test_error.py new file mode 100644 index 00000000..b072f22c --- /dev/null +++ b/internet_insights/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_link.py b/internet_insights/test/test_link.py new file mode 100644 index 00000000..34b9ac42 --- /dev/null +++ b/internet_insights/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_outage_scope.py b/internet_insights/test/test_outage_scope.py new file mode 100644 index 00000000..e44881e6 --- /dev/null +++ b/internet_insights/test/test_outage_scope.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.outage_scope import OutageScope + +class TestOutageScope(unittest.TestCase): + """OutageScope unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOutageScope(self): + """Test OutageScope""" + # inst = OutageScope() + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_self_links.py b/internet_insights/test/test_self_links.py new file mode 100644 index 00000000..fd1c6409 --- /dev/null +++ b/internet_insights/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = internet_insights.models.self_links__links.SelfLinks__links( + self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_self_links_links.py b/internet_insights/test/test_self_links_links.py new file mode 100644 index 00000000..978c6a7d --- /dev/null +++ b/internet_insights/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = internet_insights.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_unauthorized_error.py b/internet_insights/test/test_unauthorized_error.py new file mode 100644 index 00000000..073c10b2 --- /dev/null +++ b/internet_insights/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_validation_error.py b/internet_insights/test/test_validation_error.py new file mode 100644 index 00000000..4e27f552 --- /dev/null +++ b/internet_insights/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + internet_insights.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights/test/test_validation_error_all_of_errors.py b/internet_insights/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..d01df95d --- /dev/null +++ b/internet_insights/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from internet_insights.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/internet_insights_api/.github/workflows/python.yml b/internet_insights_api/.github/workflows/python.yml deleted file mode 100644 index e9128bab..00000000 --- a/internet_insights_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: internet_insights_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/internet_insights_api/.gitlab-ci.yml b/internet_insights_api/.gitlab-ci.yml deleted file mode 100644 index 0f11e5d9..00000000 --- a/internet_insights_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=internet_insights_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/internet_insights_api/.openapi-generator/FILES b/internet_insights_api/.openapi-generator/FILES deleted file mode 100644 index a9d251f6..00000000 --- a/internet_insights_api/.openapi-generator/FILES +++ /dev/null @@ -1,110 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/ApiAffectedAgent.md -docs/ApiAffectedTest.md -docs/ApiApplicationOutageAffectedLocation.md -docs/ApiApplicationOutageAffectedServer.md -docs/ApiApplicationOutageDetails.md -docs/ApiApplicationOutageResponse.md -docs/ApiAsn.md -docs/ApiCatalogProvider.md -docs/ApiCatalogProviderDetails.md -docs/ApiCatalogProviderDetailsLocationsInner.md -docs/ApiCatalogProviderDetailsResponse.md -docs/ApiCatalogProviderFilter.md -docs/ApiCatalogProviderResponse.md -docs/ApiCatalogProviderResponseAllOfProvidersInner.md -docs/ApiNetworkOutageAffectedLocation.md -docs/ApiNetworkOutageDetails.md -docs/ApiNetworkOutageResponse.md -docs/ApiOutage.md -docs/ApiOutageFilter.md -docs/ApiOutagesResponse.md -docs/ApiOutagesResponseAllOfOutagesInner.md -docs/CatalogProvidersApi.md -docs/Error.md -docs/Link.md -docs/OutageScope.md -docs/OutagesAPIPublicApi.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/UnauthorizedError.md -git_push.sh -internet_insights_api/__init__.py -internet_insights_api/api/__init__.py -internet_insights_api/api/catalog_providers_api.py -internet_insights_api/api/outages_api_public_api.py -internet_insights_api/api_client.py -internet_insights_api/api_response.py -internet_insights_api/configuration.py -internet_insights_api/exceptions.py -internet_insights_api/models/__init__.py -internet_insights_api/models/api_affected_agent.py -internet_insights_api/models/api_affected_test.py -internet_insights_api/models/api_application_outage_affected_location.py -internet_insights_api/models/api_application_outage_affected_server.py -internet_insights_api/models/api_application_outage_details.py -internet_insights_api/models/api_application_outage_response.py -internet_insights_api/models/api_asn.py -internet_insights_api/models/api_catalog_provider.py -internet_insights_api/models/api_catalog_provider_details.py -internet_insights_api/models/api_catalog_provider_details_locations_inner.py -internet_insights_api/models/api_catalog_provider_details_response.py -internet_insights_api/models/api_catalog_provider_filter.py -internet_insights_api/models/api_catalog_provider_response.py -internet_insights_api/models/api_catalog_provider_response_all_of_providers_inner.py -internet_insights_api/models/api_network_outage_affected_location.py -internet_insights_api/models/api_network_outage_details.py -internet_insights_api/models/api_network_outage_response.py -internet_insights_api/models/api_outage.py -internet_insights_api/models/api_outage_filter.py -internet_insights_api/models/api_outages_response.py -internet_insights_api/models/api_outages_response_all_of_outages_inner.py -internet_insights_api/models/error.py -internet_insights_api/models/link.py -internet_insights_api/models/outage_scope.py -internet_insights_api/models/self_links.py -internet_insights_api/models/self_links_links.py -internet_insights_api/models/unauthorized_error.py -internet_insights_api/py.typed -internet_insights_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -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_application_outage_response.py -test/test_api_asn.py -test/test_api_catalog_provider.py -test/test_api_catalog_provider_details.py -test/test_api_catalog_provider_details_locations_inner.py -test/test_api_catalog_provider_details_response.py -test/test_api_catalog_provider_filter.py -test/test_api_catalog_provider_response.py -test/test_api_catalog_provider_response_all_of_providers_inner.py -test/test_api_network_outage_affected_location.py -test/test_api_network_outage_details.py -test/test_api_network_outage_response.py -test/test_api_outage.py -test/test_api_outage_filter.py -test/test_api_outages_response.py -test/test_api_outages_response_all_of_outages_inner.py -test/test_catalog_providers_api.py -test/test_error.py -test/test_link.py -test/test_outage_scope.py -test/test_outages_api_public_api.py -test/test_self_links.py -test/test_self_links_links.py -test/test_unauthorized_error.py -tox.ini diff --git a/internet_insights_api/.openapi-generator/VERSION b/internet_insights_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/internet_insights_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/internet_insights_api/.travis.yml b/internet_insights_api/.travis.yml deleted file mode 100644 index d5a4acdb..00000000 --- a/internet_insights_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=internet_insights_api diff --git a/internet_insights_api/README.md b/internet_insights_api/README.md deleted file mode 100644 index 6ade8f7a..00000000 --- a/internet_insights_api/README.md +++ /dev/null @@ -1,160 +0,0 @@ -# internet-insights-api -# Overview -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. - - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import internet_insights_api -``` - -### 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 internet_insights_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import internet_insights_api -from internet_insights_api.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 = internet_insights_api.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 = internet_insights_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with internet_insights_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = internet_insights_api.CatalogProvidersApi(api_client) - api_catalog_provider_filter = internet_insights_api.ApiCatalogProviderFilter() # ApiCatalogProviderFilter | - aid = '2067' # 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 catalog providers - api_response = api_instance.catalog_provider_list(api_catalog_provider_filter, aid=aid) - print("The response of CatalogProvidersApi->catalog_provider_list:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling CatalogProvidersApi->catalog_provider_list: %s\n" % e) - -``` - -## Documentation for API Endpoints - -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* | [**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 - - -## Documentation For Models - - - [ApiAffectedAgent](docs/ApiAffectedAgent.md) - - [ApiAffectedTest](docs/ApiAffectedTest.md) - - [ApiApplicationOutageAffectedLocation](docs/ApiApplicationOutageAffectedLocation.md) - - [ApiApplicationOutageAffectedServer](docs/ApiApplicationOutageAffectedServer.md) - - [ApiApplicationOutageDetails](docs/ApiApplicationOutageDetails.md) - - [ApiApplicationOutageResponse](docs/ApiApplicationOutageResponse.md) - - [ApiAsn](docs/ApiAsn.md) - - [ApiCatalogProvider](docs/ApiCatalogProvider.md) - - [ApiCatalogProviderDetails](docs/ApiCatalogProviderDetails.md) - - [ApiCatalogProviderDetailsLocationsInner](docs/ApiCatalogProviderDetailsLocationsInner.md) - - [ApiCatalogProviderDetailsResponse](docs/ApiCatalogProviderDetailsResponse.md) - - [ApiCatalogProviderFilter](docs/ApiCatalogProviderFilter.md) - - [ApiCatalogProviderResponse](docs/ApiCatalogProviderResponse.md) - - [ApiCatalogProviderResponseAllOfProvidersInner](docs/ApiCatalogProviderResponseAllOfProvidersInner.md) - - [ApiNetworkOutageAffectedLocation](docs/ApiNetworkOutageAffectedLocation.md) - - [ApiNetworkOutageDetails](docs/ApiNetworkOutageDetails.md) - - [ApiNetworkOutageResponse](docs/ApiNetworkOutageResponse.md) - - [ApiOutage](docs/ApiOutage.md) - - [ApiOutageFilter](docs/ApiOutageFilter.md) - - [ApiOutagesResponse](docs/ApiOutagesResponse.md) - - [ApiOutagesResponseAllOfOutagesInner](docs/ApiOutagesResponseAllOfOutagesInner.md) - - [Error](docs/Error.md) - - [Link](docs/Link.md) - - [OutageScope](docs/OutageScope.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/internet_insights_api/docs/ApiApplicationOutageAffectedServer.md b/internet_insights_api/docs/ApiApplicationOutageAffectedServer.md deleted file mode 100644 index d062980d..00000000 --- a/internet_insights_api/docs/ApiApplicationOutageAffectedServer.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiApplicationOutageAffectedServer - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**domain** | **str** | | [optional] -**prefix** | **str** | | [optional] - -## Example - -```python -from internet_insights_api.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiApplicationOutageAffectedServer from a JSON string -api_application_outage_affected_server_instance = ApiApplicationOutageAffectedServer.from_json(json) -# print the JSON string representation of the object -print ApiApplicationOutageAffectedServer.to_json() - -# convert the object into a dict -api_application_outage_affected_server_dict = api_application_outage_affected_server_instance.to_dict() -# create an instance of ApiApplicationOutageAffectedServer from a dict -api_application_outage_affected_server_form_dict = api_application_outage_affected_server.from_dict(api_application_outage_affected_server_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/internet_insights_api/docs/Error.md b/internet_insights_api/docs/Error.md deleted file mode 100644 index 5e08f59c..00000000 --- a/internet_insights_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 internet_insights_api.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_form_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/internet_insights_api/docs/Link.md b/internet_insights_api/docs/Link.md deleted file mode 100644 index 01597e66..00000000 --- a/internet_insights_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 internet_insights_api.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_form_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/internet_insights_api/docs/SelfLinks.md b/internet_insights_api/docs/SelfLinks.md deleted file mode 100644 index 0852ec83..00000000 --- a/internet_insights_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from internet_insights_api.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_form_dict = self_links.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/internet_insights_api/docs/SelfLinksLinks.md b/internet_insights_api/docs/SelfLinksLinks.md deleted file mode 100644 index 49548039..00000000 --- a/internet_insights_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from internet_insights_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/internet_insights_api/docs/UnauthorizedError.md b/internet_insights_api/docs/UnauthorizedError.md deleted file mode 100644 index 65e8400b..00000000 --- a/internet_insights_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from internet_insights_api.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_form_dict = unauthorized_error.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/internet_insights_api/git_push.sh b/internet_insights_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/internet_insights_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/internet_insights_api/internet_insights_api/__init__.py b/internet_insights_api/internet_insights_api/__init__.py deleted file mode 100644 index 8dcb9dba..00000000 --- a/internet_insights_api/internet_insights_api/__init__.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Internet Insights API - - # Overview 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.0 - 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 internet_insights_api.api.catalog_providers_api import CatalogProvidersApi -from internet_insights_api.api.outages_api_public_api import OutagesAPIPublicApi - -# import ApiClient -from internet_insights_api.api_response import ApiResponse -from internet_insights_api.api_client import ApiClient -from internet_insights_api.configuration import Configuration -from internet_insights_api.exceptions import OpenApiException -from internet_insights_api.exceptions import ApiTypeError -from internet_insights_api.exceptions import ApiValueError -from internet_insights_api.exceptions import ApiKeyError -from internet_insights_api.exceptions import ApiAttributeError -from internet_insights_api.exceptions import ApiException - -# import models into sdk package -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent -from internet_insights_api.models.api_affected_test import ApiAffectedTest -from internet_insights_api.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation -from internet_insights_api.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer -from internet_insights_api.models.api_application_outage_details import ApiApplicationOutageDetails -from internet_insights_api.models.api_application_outage_response import ApiApplicationOutageResponse -from internet_insights_api.models.api_asn import ApiAsn -from internet_insights_api.models.api_catalog_provider import ApiCatalogProvider -from internet_insights_api.models.api_catalog_provider_details import ApiCatalogProviderDetails -from internet_insights_api.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner -from internet_insights_api.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse -from internet_insights_api.models.api_catalog_provider_filter import ApiCatalogProviderFilter -from internet_insights_api.models.api_catalog_provider_response import ApiCatalogProviderResponse -from internet_insights_api.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner -from internet_insights_api.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation -from internet_insights_api.models.api_network_outage_details import ApiNetworkOutageDetails -from internet_insights_api.models.api_network_outage_response import ApiNetworkOutageResponse -from internet_insights_api.models.api_outage import ApiOutage -from internet_insights_api.models.api_outage_filter import ApiOutageFilter -from internet_insights_api.models.api_outages_response import ApiOutagesResponse -from internet_insights_api.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner -from internet_insights_api.models.error import Error -from internet_insights_api.models.link import Link -from internet_insights_api.models.outage_scope import OutageScope -from internet_insights_api.models.self_links import SelfLinks -from internet_insights_api.models.self_links_links import SelfLinksLinks -from internet_insights_api.models.unauthorized_error import UnauthorizedError diff --git a/internet_insights_api/internet_insights_api/api/__init__.py b/internet_insights_api/internet_insights_api/api/__init__.py deleted file mode 100644 index 3c471366..00000000 --- a/internet_insights_api/internet_insights_api/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# flake8: noqa - -# import apis into api package -from internet_insights_api.api.catalog_providers_api import CatalogProvidersApi -from internet_insights_api.api.outages_api_public_api import OutagesAPIPublicApi - diff --git a/internet_insights_api/internet_insights_api/api_client.py b/internet_insights_api/internet_insights_api/api_client.py deleted file mode 100644 index cf7eda4d..00000000 --- a/internet_insights_api/internet_insights_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from internet_insights_api.configuration import Configuration -from internet_insights_api.api_response import ApiResponse -import internet_insights_api.models -from internet_insights_api import rest -from internet_insights_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(internet_insights_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/internet_insights_api/internet_insights_api/api_response.py b/internet_insights_api/internet_insights_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/internet_insights_api/internet_insights_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/internet_insights_api/internet_insights_api/configuration.py b/internet_insights_api/internet_insights_api/configuration.py deleted file mode 100644 index b9b43946..00000000 --- a/internet_insights_api/internet_insights_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("internet_insights_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/internet_insights_api/internet_insights_api/exceptions.py b/internet_insights_api/internet_insights_api/exceptions.py deleted file mode 100644 index 0de39c3d..00000000 --- a/internet_insights_api/internet_insights_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/internet_insights_api/internet_insights_api/models/__init__.py b/internet_insights_api/internet_insights_api/models/__init__.py deleted file mode 100644 index 5f0f4591..00000000 --- a/internet_insights_api/internet_insights_api/models/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent -from internet_insights_api.models.api_affected_test import ApiAffectedTest -from internet_insights_api.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation -from internet_insights_api.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer -from internet_insights_api.models.api_application_outage_details import ApiApplicationOutageDetails -from internet_insights_api.models.api_application_outage_response import ApiApplicationOutageResponse -from internet_insights_api.models.api_asn import ApiAsn -from internet_insights_api.models.api_catalog_provider import ApiCatalogProvider -from internet_insights_api.models.api_catalog_provider_details import ApiCatalogProviderDetails -from internet_insights_api.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner -from internet_insights_api.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse -from internet_insights_api.models.api_catalog_provider_filter import ApiCatalogProviderFilter -from internet_insights_api.models.api_catalog_provider_response import ApiCatalogProviderResponse -from internet_insights_api.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner -from internet_insights_api.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation -from internet_insights_api.models.api_network_outage_details import ApiNetworkOutageDetails -from internet_insights_api.models.api_network_outage_response import ApiNetworkOutageResponse -from internet_insights_api.models.api_outage import ApiOutage -from internet_insights_api.models.api_outage_filter import ApiOutageFilter -from internet_insights_api.models.api_outages_response import ApiOutagesResponse -from internet_insights_api.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner -from internet_insights_api.models.error import Error -from internet_insights_api.models.link import Link -from internet_insights_api.models.outage_scope import OutageScope -from internet_insights_api.models.self_links import SelfLinks -from internet_insights_api.models.self_links_links import SelfLinksLinks -from internet_insights_api.models.unauthorized_error import UnauthorizedError diff --git a/internet_insights_api/internet_insights_api/models/api_affected_agent.py b/internet_insights_api/internet_insights_api/models/api_affected_agent.py deleted file mode 100644 index 1d0d0040..00000000 --- a/internet_insights_api/internet_insights_api/models/api_affected_agent.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiAffectedAgent(BaseModel): - """ - ApiAffectedAgent - """ # noqa: E501 - id: Optional[StrictInt] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAffectedAgent 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiAffectedAgent 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"), - "name": obj.get("name") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_affected_test.py b/internet_insights_api/internet_insights_api/models/api_affected_test.py deleted file mode 100644 index 27db2cf5..00000000 --- a/internet_insights_api/internet_insights_api/models/api_affected_test.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiAffectedTest(BaseModel): - """ - ApiAffectedTest - """ # noqa: E501 - id: Optional[StrictInt] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAffectedTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiAffectedTest 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"), - "name": obj.get("name") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_application_outage_affected_location.py b/internet_insights_api/internet_insights_api/models/api_application_outage_affected_location.py deleted file mode 100644 index 7b9e398b..00000000 --- a/internet_insights_api/internet_insights_api/models/api_application_outage_affected_location.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from internet_insights_api.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiApplicationOutageAffectedLocation(BaseModel): - """ - ApiApplicationOutageAffectedLocation - """ # noqa: E501 - location: Optional[StrictStr] = Field(default=None, description="The affected location.") - affected_servers: Optional[List[ApiApplicationOutageAffectedServer]] = Field(default=None, description="The number of affected servers in this location.", alias="affectedServers") - __properties: ClassVar[List[str]] = ["location", "affectedServers"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiApplicationOutageAffectedLocation 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in affected_servers (list) - _items = [] - if self.affected_servers: - for _item in self.affected_servers: - if _item: - _items.append(_item.to_dict()) - _dict['affectedServers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiApplicationOutageAffectedLocation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "location": obj.get("location"), - "affectedServers": [ApiApplicationOutageAffectedServer.from_dict(_item) for _item in obj.get("affectedServers")] if obj.get("affectedServers") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_application_outage_affected_server.py b/internet_insights_api/internet_insights_api/models/api_application_outage_affected_server.py deleted file mode 100644 index 131fa7ec..00000000 --- a/internet_insights_api/internet_insights_api/models/api_application_outage_affected_server.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiApplicationOutageAffectedServer(BaseModel): - """ - ApiApplicationOutageAffectedServer - """ # noqa: E501 - domain: Optional[StrictStr] = None - prefix: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["domain", "prefix"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiApplicationOutageAffectedServer 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiApplicationOutageAffectedServer from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "domain": obj.get("domain"), - "prefix": obj.get("prefix") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_application_outage_details.py b/internet_insights_api/internet_insights_api/models/api_application_outage_details.py deleted file mode 100644 index c19c4c15..00000000 --- a/internet_insights_api/internet_insights_api/models/api_application_outage_details.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent -from internet_insights_api.models.api_affected_test import ApiAffectedTest -from internet_insights_api.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiApplicationOutageDetails(BaseModel): - """ - ApiApplicationOutageDetails - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") - application_name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.", alias="applicationName") - start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") - start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") - end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") - end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") - duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") - affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") - affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") - affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") - errors: Optional[List[StrictStr]] = Field(default=None, description="List of errors.") - affected_locations: Optional[List[ApiApplicationOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "applicationName", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "errors", "affectedLocations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiApplicationOutageDetails 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in affected_tests (list) - _items = [] - if self.affected_tests: - for _item in self.affected_tests: - if _item: - _items.append(_item.to_dict()) - _dict['affectedTests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) - _items = [] - if self.affected_agents: - for _item in self.affected_agents: - if _item: - _items.append(_item.to_dict()) - _dict['affectedAgents'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) - _items = [] - if self.affected_locations: - for _item in self.affected_locations: - if _item: - _items.append(_item.to_dict()) - _dict['affectedLocations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiApplicationOutageDetails 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "applicationName": obj.get("applicationName"), - "startDate": obj.get("startDate"), - "startRoundId": obj.get("startRoundId"), - "endDate": obj.get("endDate"), - "endRoundId": obj.get("endRoundId"), - "duration": obj.get("duration"), - "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj.get("affectedTests")] if obj.get("affectedTests") is not None else None, - "affectedDomains": obj.get("affectedDomains"), - "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj.get("affectedAgents")] if obj.get("affectedAgents") is not None else None, - "errors": obj.get("errors"), - "affectedLocations": [ApiApplicationOutageAffectedLocation.from_dict(_item) for _item in obj.get("affectedLocations")] if obj.get("affectedLocations") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_application_outage_response.py b/internet_insights_api/internet_insights_api/models/api_application_outage_response.py deleted file mode 100644 index e7ff7743..00000000 --- a/internet_insights_api/internet_insights_api/models/api_application_outage_response.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent -from internet_insights_api.models.api_affected_test import ApiAffectedTest -from internet_insights_api.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiApplicationOutageResponse(BaseModel): - """ - ApiApplicationOutageResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") - application_name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.", alias="applicationName") - start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") - start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") - end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") - end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") - duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") - affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") - affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") - affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") - errors: Optional[List[StrictStr]] = Field(default=None, description="List of errors.") - affected_locations: Optional[List[ApiApplicationOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "applicationName", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "errors", "affectedLocations", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiApplicationOutageResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in affected_tests (list) - _items = [] - if self.affected_tests: - for _item in self.affected_tests: - if _item: - _items.append(_item.to_dict()) - _dict['affectedTests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) - _items = [] - if self.affected_agents: - for _item in self.affected_agents: - if _item: - _items.append(_item.to_dict()) - _dict['affectedAgents'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) - _items = [] - if self.affected_locations: - for _item in self.affected_locations: - if _item: - _items.append(_item.to_dict()) - _dict['affectedLocations'] = _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: Dict) -> Self: - """Create an instance of ApiApplicationOutageResponse 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "applicationName": obj.get("applicationName"), - "startDate": obj.get("startDate"), - "startRoundId": obj.get("startRoundId"), - "endDate": obj.get("endDate"), - "endRoundId": obj.get("endRoundId"), - "duration": obj.get("duration"), - "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj.get("affectedTests")] if obj.get("affectedTests") is not None else None, - "affectedDomains": obj.get("affectedDomains"), - "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj.get("affectedAgents")] if obj.get("affectedAgents") is not None else None, - "errors": obj.get("errors"), - "affectedLocations": [ApiApplicationOutageAffectedLocation.from_dict(_item) for _item in obj.get("affectedLocations")] if obj.get("affectedLocations") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_asn.py b/internet_insights_api/internet_insights_api/models/api_asn.py deleted file mode 100644 index 5de8ec6d..00000000 --- a/internet_insights_api/internet_insights_api/models/api_asn.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiAsn(BaseModel): - """ - ApiAsn - """ # noqa: E501 - id: Optional[StrictInt] = Field(default=None, description="ASN (Autonomous Systems Number)") - name: Optional[StrictStr] = Field(default=None, description="ASN (Autonomous Systems Number) name") - __properties: ClassVar[List[str]] = ["id", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiAsn 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiAsn 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"), - "name": obj.get("name") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider.py deleted file mode 100644 index 6d3e76f2..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProvider(BaseModel): - """ - Catalog provider - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") - region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") - data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") - asns_count: Optional[StrictInt] = Field(default=None, description="The number of ASN's covered by the provider.", alias="asnsCount") - countries_count: Optional[StrictInt] = Field(default=None, description="The number of countries covered by the provider.", alias="countriesCount") - locations_count: Optional[StrictInt] = Field(default=None, description="The number of locations covered by the provider.", alias="locationsCount") - interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of interfaces covered by the provider.", alias="interfacesCount") - included: Optional[StrictBool] = Field(default=None, description="Indicates whether the catalog provider is included in the licensed packages.") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asnsCount", "countriesCount", "locationsCount", "interfacesCount", "included"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProvider 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiCatalogProvider 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "region": obj.get("region"), - "dataType": obj.get("dataType"), - "asnsCount": obj.get("asnsCount"), - "countriesCount": obj.get("countriesCount"), - "locationsCount": obj.get("locationsCount"), - "interfacesCount": obj.get("interfacesCount"), - "included": obj.get("included") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider_details.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider_details.py deleted file mode 100644 index 6153e47e..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider_details.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from internet_insights_api.models.api_asn import ApiAsn -from internet_insights_api.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProviderDetails(BaseModel): - """ - ApiCatalogProviderDetails - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") - region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") - data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") - asns: Optional[List[ApiAsn]] = Field(default=None, description="List of ASN's covered by the Provider.") - locations: Optional[List[ApiCatalogProviderDetailsLocationsInner]] = Field(default=None, description="List of locations covered by the Provider.") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asns", "locations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProviderDetails 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in asns (list) - _items = [] - if self.asns: - for _item in self.asns: - if _item: - _items.append(_item.to_dict()) - _dict['asns'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in locations (list) - _items = [] - if self.locations: - for _item in self.locations: - if _item: - _items.append(_item.to_dict()) - _dict['locations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiCatalogProviderDetails 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "region": obj.get("region"), - "dataType": obj.get("dataType"), - "asns": [ApiAsn.from_dict(_item) for _item in obj.get("asns")] if obj.get("asns") is not None else None, - "locations": [ApiCatalogProviderDetailsLocationsInner.from_dict(_item) for _item in obj.get("locations")] if obj.get("locations") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider_details_locations_inner.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider_details_locations_inner.py deleted file mode 100644 index 9a209a1e..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider_details_locations_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProviderDetailsLocationsInner(BaseModel): - """ - ApiCatalogProviderDetailsLocationsInner - """ # noqa: E501 - location: Optional[StrictStr] = Field(default=None, description="The location covered by the Provider.") - interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of interfaces covered by the Provider at this location.", alias="interfacesCount") - __properties: ClassVar[List[str]] = ["location", "interfacesCount"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProviderDetailsLocationsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiCatalogProviderDetailsLocationsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "location": obj.get("location"), - "interfacesCount": obj.get("interfacesCount") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider_details_response.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider_details_response.py deleted file mode 100644 index 1595aff1..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider_details_response.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from internet_insights_api.models.api_asn import ApiAsn -from internet_insights_api.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProviderDetailsResponse(BaseModel): - """ - ApiCatalogProviderDetailsResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") - region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") - data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") - asns: Optional[List[ApiAsn]] = Field(default=None, description="List of ASN's covered by the Provider.") - locations: Optional[List[ApiCatalogProviderDetailsLocationsInner]] = Field(default=None, description="List of locations covered by the Provider.") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asns", "locations", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProviderDetailsResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in asns (list) - _items = [] - if self.asns: - for _item in self.asns: - if _item: - _items.append(_item.to_dict()) - _dict['asns'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in locations (list) - _items = [] - if self.locations: - for _item in self.locations: - if _item: - _items.append(_item.to_dict()) - _dict['locations'] = _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: Dict) -> Self: - """Create an instance of ApiCatalogProviderDetailsResponse 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "region": obj.get("region"), - "dataType": obj.get("dataType"), - "asns": [ApiAsn.from_dict(_item) for _item in obj.get("asns")] if obj.get("asns") is not None else None, - "locations": [ApiCatalogProviderDetailsLocationsInner.from_dict(_item) for _item in obj.get("locations")] if obj.get("locations") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider_filter.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider_filter.py deleted file mode 100644 index 27a0de69..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider_filter.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProviderFilter(BaseModel): - """ - Advanced filter query used to filter the response. The provider name, location, asn can be partial names. Can filter on: - Provider name - Provider type - Region - Location - ASN - included - """ # noqa: E501 - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") - region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") - location: Optional[StrictStr] = Field(default=None, description="Location of the catalog provider.") - asn: Optional[StrictStr] = Field(default=None, description="Name of the ASN (Autonomous Systems Number) covered by providers.") - included: Optional[StrictBool] = Field(default=None, description="Indicates whether the catalog provider is included in the licensed packages. true returns providers covered by licensed packages, false returns providers not covered by licensed packages.") - __properties: ClassVar[List[str]] = ["providerName", "providerType", "region", "location", "asn", "included"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProviderFilter 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiCatalogProviderFilter from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "region": obj.get("region"), - "location": obj.get("location"), - "asn": obj.get("asn"), - "included": obj.get("included") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider_response.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider_response.py deleted file mode 100644 index 72a578da..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from internet_insights_api.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProviderResponse(BaseModel): - """ - ApiCatalogProviderResponse - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - providers: Optional[List[ApiCatalogProviderResponseAllOfProvidersInner]] = Field(default=None, description="List of catalog providers.") - __properties: ClassVar[List[str]] = ["_links", "providers"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProviderResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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 providers (list) - _items = [] - if self.providers: - for _item in self.providers: - if _item: - _items.append(_item.to_dict()) - _dict['providers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiCatalogProviderResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "providers": [ApiCatalogProviderResponseAllOfProvidersInner.from_dict(_item) for _item in obj.get("providers")] if obj.get("providers") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_catalog_provider_response_all_of_providers_inner.py b/internet_insights_api/internet_insights_api/models/api_catalog_provider_response_all_of_providers_inner.py deleted file mode 100644 index 1001b858..00000000 --- a/internet_insights_api/internet_insights_api/models/api_catalog_provider_response_all_of_providers_inner.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiCatalogProviderResponseAllOfProvidersInner(BaseModel): - """ - ApiCatalogProviderResponseAllOfProvidersInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The catalog provider ID.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the catalog provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of catalog provider.", alias="providerType") - region: Optional[StrictStr] = Field(default=None, description="The catalog provider region.") - data_type: Optional[StrictStr] = Field(default=None, description="The type of data produced by the provider.", alias="dataType") - asns_count: Optional[StrictInt] = Field(default=None, description="The number of ASN's covered by the provider.", alias="asnsCount") - countries_count: Optional[StrictInt] = Field(default=None, description="The number of countries covered by the provider.", alias="countriesCount") - locations_count: Optional[StrictInt] = Field(default=None, description="The number of locations covered by the provider.", alias="locationsCount") - interfaces_count: Optional[StrictInt] = Field(default=None, description="The number of interfaces covered by the provider.", alias="interfacesCount") - included: Optional[StrictBool] = Field(default=None, description="Indicates whether the catalog provider is included in the licensed packages.") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "region", "dataType", "asnsCount", "countriesCount", "locationsCount", "interfacesCount", "included", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiCatalogProviderResponseAllOfProvidersInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of ApiCatalogProviderResponseAllOfProvidersInner 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "region": obj.get("region"), - "dataType": obj.get("dataType"), - "asnsCount": obj.get("asnsCount"), - "countriesCount": obj.get("countriesCount"), - "locationsCount": obj.get("locationsCount"), - "interfacesCount": obj.get("interfacesCount"), - "included": obj.get("included"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_network_outage_affected_location.py b/internet_insights_api/internet_insights_api/models/api_network_outage_affected_location.py deleted file mode 100644 index cb6f398a..00000000 --- a/internet_insights_api/internet_insights_api/models/api_network_outage_affected_location.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiNetworkOutageAffectedLocation(BaseModel): - """ - ApiNetworkOutageAffectedLocation - """ # noqa: E501 - location: Optional[StrictStr] = Field(default=None, description="The affected location.") - affected_interfaces: Optional[List[StrictStr]] = Field(default=None, description="The affected interfaces in this location.", alias="affectedInterfaces") - __properties: ClassVar[List[str]] = ["location", "affectedInterfaces"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiNetworkOutageAffectedLocation 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiNetworkOutageAffectedLocation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "location": obj.get("location"), - "affectedInterfaces": obj.get("affectedInterfaces") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_network_outage_details.py b/internet_insights_api/internet_insights_api/models/api_network_outage_details.py deleted file mode 100644 index 5fd00c85..00000000 --- a/internet_insights_api/internet_insights_api/models/api_network_outage_details.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent -from internet_insights_api.models.api_affected_test import ApiAffectedTest -from internet_insights_api.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiNetworkOutageDetails(BaseModel): - """ - ApiNetworkOutageDetails - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") - network_name: Optional[StrictStr] = Field(default=None, description="The affected network.", alias="networkName") - asn: Optional[StrictInt] = Field(default=None, description="ASN number") - start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") - start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") - end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") - end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") - duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") - affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") - affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") - affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") - affected_locations: Optional[List[ApiNetworkOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "networkName", "asn", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "affectedLocations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiNetworkOutageDetails 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in affected_tests (list) - _items = [] - if self.affected_tests: - for _item in self.affected_tests: - if _item: - _items.append(_item.to_dict()) - _dict['affectedTests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) - _items = [] - if self.affected_agents: - for _item in self.affected_agents: - if _item: - _items.append(_item.to_dict()) - _dict['affectedAgents'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) - _items = [] - if self.affected_locations: - for _item in self.affected_locations: - if _item: - _items.append(_item.to_dict()) - _dict['affectedLocations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiNetworkOutageDetails 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "networkName": obj.get("networkName"), - "asn": obj.get("asn"), - "startDate": obj.get("startDate"), - "startRoundId": obj.get("startRoundId"), - "endDate": obj.get("endDate"), - "endRoundId": obj.get("endRoundId"), - "duration": obj.get("duration"), - "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj.get("affectedTests")] if obj.get("affectedTests") is not None else None, - "affectedDomains": obj.get("affectedDomains"), - "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj.get("affectedAgents")] if obj.get("affectedAgents") is not None else None, - "affectedLocations": [ApiNetworkOutageAffectedLocation.from_dict(_item) for _item in obj.get("affectedLocations")] if obj.get("affectedLocations") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_network_outage_response.py b/internet_insights_api/internet_insights_api/models/api_network_outage_response.py deleted file mode 100644 index dd9fbfa6..00000000 --- a/internet_insights_api/internet_insights_api/models/api_network_outage_response.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent -from internet_insights_api.models.api_affected_test import ApiAffectedTest -from internet_insights_api.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiNetworkOutageResponse(BaseModel): - """ - ApiNetworkOutageResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") - network_name: Optional[StrictStr] = Field(default=None, description="The affected network.", alias="networkName") - asn: Optional[StrictInt] = Field(default=None, description="ASN number") - start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") - start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") - end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") - end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") - duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage in seconds.") - affected_tests: Optional[List[ApiAffectedTest]] = Field(default=None, description="List of affected tests.", alias="affectedTests") - affected_domains: Optional[List[StrictStr]] = Field(default=None, description="List of affected domains.", alias="affectedDomains") - affected_agents: Optional[List[ApiAffectedAgent]] = Field(default=None, description="List of affected agents.", alias="affectedAgents") - affected_locations: Optional[List[ApiNetworkOutageAffectedLocation]] = Field(default=None, description="List of affected locations.", alias="affectedLocations") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "providerName", "providerType", "networkName", "asn", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTests", "affectedDomains", "affectedAgents", "affectedLocations", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiNetworkOutageResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in affected_tests (list) - _items = [] - if self.affected_tests: - for _item in self.affected_tests: - if _item: - _items.append(_item.to_dict()) - _dict['affectedTests'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_agents (list) - _items = [] - if self.affected_agents: - for _item in self.affected_agents: - if _item: - _items.append(_item.to_dict()) - _dict['affectedAgents'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in affected_locations (list) - _items = [] - if self.affected_locations: - for _item in self.affected_locations: - if _item: - _items.append(_item.to_dict()) - _dict['affectedLocations'] = _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: Dict) -> Self: - """Create an instance of ApiNetworkOutageResponse 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"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "networkName": obj.get("networkName"), - "asn": obj.get("asn"), - "startDate": obj.get("startDate"), - "startRoundId": obj.get("startRoundId"), - "endDate": obj.get("endDate"), - "endRoundId": obj.get("endRoundId"), - "duration": obj.get("duration"), - "affectedTests": [ApiAffectedTest.from_dict(_item) for _item in obj.get("affectedTests")] if obj.get("affectedTests") is not None else None, - "affectedDomains": obj.get("affectedDomains"), - "affectedAgents": [ApiAffectedAgent.from_dict(_item) for _item in obj.get("affectedAgents")] if obj.get("affectedAgents") is not None else None, - "affectedLocations": [ApiNetworkOutageAffectedLocation.from_dict(_item) for _item in obj.get("affectedLocations")] if obj.get("affectedLocations") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_outage.py b/internet_insights_api/internet_insights_api/models/api_outage.py deleted file mode 100644 index 929c70e5..00000000 --- a/internet_insights_api/internet_insights_api/models/api_outage.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiOutage(BaseModel): - """ - List of outages. - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") - type: Optional[StrictStr] = Field(default=None, description="The type of outage e.g. app.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") - name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.") - start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") - start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") - end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") - end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") - duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage (seconds)") - affected_tests_count: Optional[StrictInt] = Field(default=None, description="The number of affected tests", alias="affectedTestsCount") - affected_servers_count: Optional[StrictInt] = Field(default=None, description="The number of affected servers", alias="affectedServersCount") - affected_locations_count: Optional[StrictInt] = Field(default=None, description="The number of affected locations", alias="affectedLocationsCount") - __properties: ClassVar[List[str]] = ["id", "type", "providerName", "providerType", "name", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTestsCount", "affectedServersCount", "affectedLocationsCount"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiOutage 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiOutage 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"), - "type": obj.get("type"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "name": obj.get("name"), - "startDate": obj.get("startDate"), - "startRoundId": obj.get("startRoundId"), - "endDate": obj.get("endDate"), - "endRoundId": obj.get("endRoundId"), - "duration": obj.get("duration"), - "affectedTestsCount": obj.get("affectedTestsCount"), - "affectedServersCount": obj.get("affectedServersCount"), - "affectedLocationsCount": obj.get("affectedLocationsCount") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_outage_filter.py b/internet_insights_api/internet_insights_api/models/api_outage_filter.py deleted file mode 100644 index e9d95ea7..00000000 --- a/internet_insights_api/internet_insights_api/models/api_outage_filter.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from internet_insights_api.models.outage_scope import OutageScope -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiOutageFilter(BaseModel): - """ - Advanced filter query used to filter the response. Can filter on: - outageScope (all, affected tests (e.g. my tests only)). - providerName - interfaceNetwork - applicationName - startDate, endDate - window - """ # noqa: E501 - start_date: Optional[StrictStr] = Field(default=None, description="Start of the time range. Must be paired with `endDate`.", alias="startDate") - end_date: Optional[StrictStr] = Field(default=None, description="End of the time range. Must be paired with `startDate`.", alias="endDate") - window: Optional[StrictStr] = Field(default=None, description="Specify a time period in the past for which to retrieve data. Alternative to specifying `startDate` and `endDate`.") - outage_scope: Optional[OutageScope] = Field(default=None, alias="outageScope") - provider_name: Optional[List[StrictStr]] = Field(default=None, description="The name used to identify the provider.", alias="providerName") - application_name: Optional[List[StrictStr]] = Field(default=None, description="The name to identify the application.", alias="applicationName") - interface_network: Optional[List[StrictStr]] = Field(default=None, description="The name of the ASN (Interface Network).", alias="interfaceNetwork") - __properties: ClassVar[List[str]] = ["startDate", "endDate", "window", "outageScope", "providerName", "applicationName", "interfaceNetwork"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiOutageFilter 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiOutageFilter from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "window": obj.get("window"), - "outageScope": obj.get("outageScope"), - "providerName": obj.get("providerName"), - "applicationName": obj.get("applicationName"), - "interfaceNetwork": obj.get("interfaceNetwork") - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_outages_response.py b/internet_insights_api/internet_insights_api/models/api_outages_response.py deleted file mode 100644 index a1634b1d..00000000 --- a/internet_insights_api/internet_insights_api/models/api_outages_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from internet_insights_api.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiOutagesResponse(BaseModel): - """ - ApiOutagesResponse - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - outages: Optional[List[ApiOutagesResponseAllOfOutagesInner]] = Field(default=None, description="List of application outages.") - __properties: ClassVar[List[str]] = ["_links", "outages"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiOutagesResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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 outages (list) - _items = [] - if self.outages: - for _item in self.outages: - if _item: - _items.append(_item.to_dict()) - _dict['outages'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiOutagesResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "outages": [ApiOutagesResponseAllOfOutagesInner.from_dict(_item) for _item in obj.get("outages")] if obj.get("outages") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/api_outages_response_all_of_outages_inner.py b/internet_insights_api/internet_insights_api/models/api_outages_response_all_of_outages_inner.py deleted file mode 100644 index c8f32465..00000000 --- a/internet_insights_api/internet_insights_api/models/api_outages_response_all_of_outages_inner.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiOutagesResponseAllOfOutagesInner(BaseModel): - """ - ApiOutagesResponseAllOfOutagesInner - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the outage.") - type: Optional[StrictStr] = Field(default=None, description="The type of outage e.g. app.") - provider_name: Optional[StrictStr] = Field(default=None, description="The name of the affected provider.", alias="providerName") - provider_type: Optional[StrictStr] = Field(default=None, description="The type of the affected provider.", alias="providerType") - name: Optional[StrictStr] = Field(default=None, description="The name of the affected application.") - start_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage started.", alias="startDate") - start_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage started.", alias="startRoundId") - end_date: Optional[StrictStr] = Field(default=None, description="Date and time when the outage ended.", alias="endDate") - end_round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) when the outage ended.", alias="endRoundId") - duration: Optional[StrictInt] = Field(default=None, description="Duration of the outage (seconds)") - affected_tests_count: Optional[StrictInt] = Field(default=None, description="The number of affected tests", alias="affectedTestsCount") - affected_servers_count: Optional[StrictInt] = Field(default=None, description="The number of affected servers", alias="affectedServersCount") - affected_locations_count: Optional[StrictInt] = Field(default=None, description="The number of affected locations", alias="affectedLocationsCount") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "type", "providerName", "providerType", "name", "startDate", "startRoundId", "endDate", "endRoundId", "duration", "affectedTestsCount", "affectedServersCount", "affectedLocationsCount", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiOutagesResponseAllOfOutagesInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of ApiOutagesResponseAllOfOutagesInner 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"), - "type": obj.get("type"), - "providerName": obj.get("providerName"), - "providerType": obj.get("providerType"), - "name": obj.get("name"), - "startDate": obj.get("startDate"), - "startRoundId": obj.get("startRoundId"), - "endDate": obj.get("endDate"), - "endRoundId": obj.get("endRoundId"), - "duration": obj.get("duration"), - "affectedTestsCount": obj.get("affectedTestsCount"), - "affectedServersCount": obj.get("affectedServersCount"), - "affectedLocationsCount": obj.get("affectedLocationsCount"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/error.py b/internet_insights_api/internet_insights_api/models/error.py deleted file mode 100644 index d1c8c977..00000000 --- a/internet_insights_api/internet_insights_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/internet_insights_api/internet_insights_api/models/link.py b/internet_insights_api/internet_insights_api/models/link.py deleted file mode 100644 index aebc7a80..00000000 --- a/internet_insights_api/internet_insights_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/internet_insights_api/internet_insights_api/models/outage_scope.py b/internet_insights_api/internet_insights_api/models/outage_scope.py deleted file mode 100644 index cc2a8a40..00000000 --- a/internet_insights_api/internet_insights_api/models/outage_scope.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class OutageScope(str, Enum): - """ - Scope of the outage - """ - - """ - allowed enum values - """ - ALL = 'all' - WITH_MINUS_AFFECTED_MINUS_TEST = 'with-affected-test' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OutageScope from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/internet_insights_api/internet_insights_api/models/self_links.py b/internet_insights_api/internet_insights_api/models/self_links.py deleted file mode 100644 index 615cdbf0..00000000 --- a/internet_insights_api/internet_insights_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from internet_insights_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/self_links_links.py b/internet_insights_api/internet_insights_api/models/self_links_links.py deleted file mode 100644 index 58c9aac2..00000000 --- a/internet_insights_api/internet_insights_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from internet_insights_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/internet_insights_api/internet_insights_api/models/unauthorized_error.py b/internet_insights_api/internet_insights_api/models/unauthorized_error.py deleted file mode 100644 index df3fd773..00000000 --- a/internet_insights_api/internet_insights_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/internet_insights_api/internet_insights_api/rest.py b/internet_insights_api/internet_insights_api/rest.py deleted file mode 100644 index e8eeec13..00000000 --- a/internet_insights_api/internet_insights_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from internet_insights_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/internet_insights_api/pyproject.toml b/internet_insights_api/pyproject.toml deleted file mode 100644 index 2aae9efc..00000000 --- a/internet_insights_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "internet_insights_api" -version = "1.0.0" -description = "Internet Insights API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Internet Insights API"] -include = ["internet_insights_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/internet_insights_api/setup.py b/internet_insights_api/setup.py deleted file mode 100644 index 589ebe67..00000000 --- a/internet_insights_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "internet-insights-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Internet Insights API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Internet Insights API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - # Overview 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. - """, # noqa: E501 - package_data={"internet_insights_api": ["py.typed"]}, -) diff --git a/internet_insights_api/test-requirements.txt b/internet_insights_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/internet_insights_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/internet_insights_api/test/test_api_affected_agent.py b/internet_insights_api/test/test_api_affected_agent.py deleted file mode 100644 index 5a08e420..00000000 --- a/internet_insights_api/test/test_api_affected_agent.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_affected_agent import ApiAffectedAgent - -class TestApiAffectedAgent(unittest.TestCase): - """ApiAffectedAgent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiAffectedAgent: - """Test ApiAffectedAgent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiAffectedAgent` - """ - model = ApiAffectedAgent() - if include_optional: - return ApiAffectedAgent( - id = 11, - name = 'London, England' - ) - else: - return ApiAffectedAgent( - ) - """ - - def testApiAffectedAgent(self): - """Test ApiAffectedAgent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_affected_test.py b/internet_insights_api/test/test_api_affected_test.py deleted file mode 100644 index a0553d45..00000000 --- a/internet_insights_api/test/test_api_affected_test.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_affected_test import ApiAffectedTest - -class TestApiAffectedTest(unittest.TestCase): - """ApiAffectedTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiAffectedTest: - """Test ApiAffectedTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiAffectedTest` - """ - model = ApiAffectedTest() - if include_optional: - return ApiAffectedTest( - id = 5, - name = 'amazon-test2' - ) - else: - return ApiAffectedTest( - ) - """ - - def testApiAffectedTest(self): - """Test ApiAffectedTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_application_outage_affected_location.py b/internet_insights_api/test/test_api_application_outage_affected_location.py deleted file mode 100644 index 607aecf3..00000000 --- a/internet_insights_api/test/test_api_application_outage_affected_location.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_application_outage_affected_location import ApiApplicationOutageAffectedLocation - -class TestApiApplicationOutageAffectedLocation(unittest.TestCase): - """ApiApplicationOutageAffectedLocation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiApplicationOutageAffectedLocation: - """Test ApiApplicationOutageAffectedLocation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiApplicationOutageAffectedLocation` - """ - model = ApiApplicationOutageAffectedLocation() - if include_optional: - return ApiApplicationOutageAffectedLocation( - location = 'Chicago, Illinois, US', - affected_servers = [ - internet_insights_api.models.api_application_outage_affected_server.ApiApplicationOutageAffectedServer( - domain = 'amazon.com', - prefix = '123.176.185.0/23', ) - ] - ) - else: - return ApiApplicationOutageAffectedLocation( - ) - """ - - def testApiApplicationOutageAffectedLocation(self): - """Test ApiApplicationOutageAffectedLocation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_application_outage_affected_server.py b/internet_insights_api/test/test_api_application_outage_affected_server.py deleted file mode 100644 index 57b0556e..00000000 --- a/internet_insights_api/test/test_api_application_outage_affected_server.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_application_outage_affected_server import ApiApplicationOutageAffectedServer - -class TestApiApplicationOutageAffectedServer(unittest.TestCase): - """ApiApplicationOutageAffectedServer unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiApplicationOutageAffectedServer: - """Test ApiApplicationOutageAffectedServer - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiApplicationOutageAffectedServer` - """ - model = ApiApplicationOutageAffectedServer() - if include_optional: - return ApiApplicationOutageAffectedServer( - domain = 'amazon.com', - prefix = '123.176.185.0/23' - ) - else: - return ApiApplicationOutageAffectedServer( - ) - """ - - def testApiApplicationOutageAffectedServer(self): - """Test ApiApplicationOutageAffectedServer""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_application_outage_details.py b/internet_insights_api/test/test_api_application_outage_details.py deleted file mode 100644 index 4c0df50a..00000000 --- a/internet_insights_api/test/test_api_application_outage_details.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_application_outage_details import ApiApplicationOutageDetails - -class TestApiApplicationOutageDetails(unittest.TestCase): - """ApiApplicationOutageDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiApplicationOutageDetails: - """Test ApiApplicationOutageDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiApplicationOutageDetails` - """ - model = ApiApplicationOutageDetails() - if include_optional: - return ApiApplicationOutageDetails( - id = '0CC4C4209887126DE42E92252FB43962CBB3193147F318EA', - provider_name = 'Amazon Web Services', - provider_type = 'SAAS', - application_name = 'Amazon Web Services', - start_date = '2023-01-27T20:50:51.256Z', - start_round_id = 1674852600, - end_date = '2023-01-27T20:53:51.256Z', - end_round_id = 1674852600, - duration = 180, - affected_tests = [ - internet_insights_api.models.api_affected_test.ApiAffectedTest( - id = 5, - name = 'amazon-test2', ) - ], - affected_domains = [ - 'amazon.com' - ], - affected_agents = [ - internet_insights_api.models.api_affected_agent.ApiAffectedAgent( - id = 11, - name = 'London, England', ) - ], - errors = [ - 'HTTP_SERVER_TIMEOUT' - ], - affected_locations = [ - internet_insights_api.models.api_application_outage_affected_location.ApiApplicationOutageAffectedLocation( - location = 'Chicago, Illinois, US', - affected_servers = [ - internet_insights_api.models.api_application_outage_affected_server.ApiApplicationOutageAffectedServer( - domain = 'amazon.com', - prefix = '123.176.185.0/23', ) - ], ) - ] - ) - else: - return ApiApplicationOutageDetails( - ) - """ - - def testApiApplicationOutageDetails(self): - """Test ApiApplicationOutageDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_application_outage_response.py b/internet_insights_api/test/test_api_application_outage_response.py deleted file mode 100644 index 49bb2175..00000000 --- a/internet_insights_api/test/test_api_application_outage_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_application_outage_response import ApiApplicationOutageResponse - -class TestApiApplicationOutageResponse(unittest.TestCase): - """ApiApplicationOutageResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiApplicationOutageResponse: - """Test ApiApplicationOutageResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiApplicationOutageResponse` - """ - model = ApiApplicationOutageResponse() - if include_optional: - return ApiApplicationOutageResponse( - id = '0CC4C4209887126DE42E92252FB43962CBB3193147F318EA', - provider_name = 'Amazon Web Services', - provider_type = 'SAAS', - application_name = 'Amazon Web Services', - start_date = '2023-01-27T20:50:51.256Z', - start_round_id = 1674852600, - end_date = '2023-01-27T20:53:51.256Z', - end_round_id = 1674852600, - duration = 180, - affected_tests = [ - internet_insights_api.models.api_affected_test.ApiAffectedTest( - id = 5, - name = 'amazon-test2', ) - ], - affected_domains = [ - 'amazon.com' - ], - affected_agents = [ - internet_insights_api.models.api_affected_agent.ApiAffectedAgent( - id = 11, - name = 'London, England', ) - ], - errors = [ - 'HTTP_SERVER_TIMEOUT' - ], - affected_locations = [ - internet_insights_api.models.api_application_outage_affected_location.ApiApplicationOutageAffectedLocation( - location = 'Chicago, Illinois, US', - affected_servers = [ - internet_insights_api.models.api_application_outage_affected_server.ApiApplicationOutageAffectedServer( - domain = 'amazon.com', - prefix = '123.176.185.0/23', ) - ], ) - ], - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return ApiApplicationOutageResponse( - ) - """ - - def testApiApplicationOutageResponse(self): - """Test ApiApplicationOutageResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_asn.py b/internet_insights_api/test/test_api_asn.py deleted file mode 100644 index ab7ebf8c..00000000 --- a/internet_insights_api/test/test_api_asn.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_asn import ApiAsn - -class TestApiAsn(unittest.TestCase): - """ApiAsn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiAsn: - """Test ApiAsn - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiAsn` - """ - model = ApiAsn() - if include_optional: - return ApiAsn( - id = 1, - name = 'LVLT-1 - Level 3 Communications, Inc.' - ) - else: - return ApiAsn( - ) - """ - - def testApiAsn(self): - """Test ApiAsn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider.py b/internet_insights_api/test/test_api_catalog_provider.py deleted file mode 100644 index 66e3f7fa..00000000 --- a/internet_insights_api/test/test_api_catalog_provider.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider import ApiCatalogProvider - -class TestApiCatalogProvider(unittest.TestCase): - """ApiCatalogProvider unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProvider: - """Test ApiCatalogProvider - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProvider` - """ - model = ApiCatalogProvider() - if include_optional: - return ApiCatalogProvider( - id = '85602a0a-54a7-4e97-946e-67492ef1fa26', - provider_name = 'Amazon Web Services', - provider_type = 'IAAS', - region = 'North America', - data_type = 'Application', - asns_count = 10, - countries_count = 2, - locations_count = 50, - interfaces_count = 15, - included = True - ) - else: - return ApiCatalogProvider( - ) - """ - - def testApiCatalogProvider(self): - """Test ApiCatalogProvider""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider_details.py b/internet_insights_api/test/test_api_catalog_provider_details.py deleted file mode 100644 index 415a7873..00000000 --- a/internet_insights_api/test/test_api_catalog_provider_details.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider_details import ApiCatalogProviderDetails - -class TestApiCatalogProviderDetails(unittest.TestCase): - """ApiCatalogProviderDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProviderDetails: - """Test ApiCatalogProviderDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProviderDetails` - """ - model = ApiCatalogProviderDetails() - if include_optional: - return ApiCatalogProviderDetails( - id = '85602a0a-54a7-4e97-946e-67492ef1fa26', - provider_name = 'Amazon Web Services', - provider_type = 'IAAS', - region = 'North America', - data_type = 'Application', - asns = [ - internet_insights_api.models.api_asn.ApiAsn( - id = 1, - name = 'LVLT-1 - Level 3 Communications, Inc.', ) - ], - locations = [ - internet_insights_api.models.api_catalog_provider_details_locations_inner.ApiCatalogProviderDetails_locations_inner( - location = 'San Jose, US', - interfaces_count = 5, ) - ] - ) - else: - return ApiCatalogProviderDetails( - ) - """ - - def testApiCatalogProviderDetails(self): - """Test ApiCatalogProviderDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider_details_locations_inner.py b/internet_insights_api/test/test_api_catalog_provider_details_locations_inner.py deleted file mode 100644 index a81154c6..00000000 --- a/internet_insights_api/test/test_api_catalog_provider_details_locations_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider_details_locations_inner import ApiCatalogProviderDetailsLocationsInner - -class TestApiCatalogProviderDetailsLocationsInner(unittest.TestCase): - """ApiCatalogProviderDetailsLocationsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProviderDetailsLocationsInner: - """Test ApiCatalogProviderDetailsLocationsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProviderDetailsLocationsInner` - """ - model = ApiCatalogProviderDetailsLocationsInner() - if include_optional: - return ApiCatalogProviderDetailsLocationsInner( - location = 'San Jose, US', - interfaces_count = 5 - ) - else: - return ApiCatalogProviderDetailsLocationsInner( - ) - """ - - def testApiCatalogProviderDetailsLocationsInner(self): - """Test ApiCatalogProviderDetailsLocationsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider_details_response.py b/internet_insights_api/test/test_api_catalog_provider_details_response.py deleted file mode 100644 index 22421b26..00000000 --- a/internet_insights_api/test/test_api_catalog_provider_details_response.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider_details_response import ApiCatalogProviderDetailsResponse - -class TestApiCatalogProviderDetailsResponse(unittest.TestCase): - """ApiCatalogProviderDetailsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProviderDetailsResponse: - """Test ApiCatalogProviderDetailsResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProviderDetailsResponse` - """ - model = ApiCatalogProviderDetailsResponse() - if include_optional: - return ApiCatalogProviderDetailsResponse( - id = '85602a0a-54a7-4e97-946e-67492ef1fa26', - provider_name = 'Amazon Web Services', - provider_type = 'IAAS', - region = 'North America', - data_type = 'Application', - asns = [ - internet_insights_api.models.api_asn.ApiAsn( - id = 1, - name = 'LVLT-1 - Level 3 Communications, Inc.', ) - ], - locations = [ - internet_insights_api.models.api_catalog_provider_details_locations_inner.ApiCatalogProviderDetails_locations_inner( - location = 'San Jose, US', - interfaces_count = 5, ) - ], - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return ApiCatalogProviderDetailsResponse( - ) - """ - - def testApiCatalogProviderDetailsResponse(self): - """Test ApiCatalogProviderDetailsResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider_filter.py b/internet_insights_api/test/test_api_catalog_provider_filter.py deleted file mode 100644 index 5d6960cb..00000000 --- a/internet_insights_api/test/test_api_catalog_provider_filter.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider_filter import ApiCatalogProviderFilter - -class TestApiCatalogProviderFilter(unittest.TestCase): - """ApiCatalogProviderFilter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProviderFilter: - """Test ApiCatalogProviderFilter - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProviderFilter` - """ - model = ApiCatalogProviderFilter() - if include_optional: - return ApiCatalogProviderFilter( - provider_name = 'Amazon Web Services', - provider_type = 'IAAS', - region = 'North America', - location = 'San Jose, US', - asn = 'Amazon.com, Inc.', - included = True - ) - else: - return ApiCatalogProviderFilter( - ) - """ - - def testApiCatalogProviderFilter(self): - """Test ApiCatalogProviderFilter""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider_response.py b/internet_insights_api/test/test_api_catalog_provider_response.py deleted file mode 100644 index e10fa59f..00000000 --- a/internet_insights_api/test/test_api_catalog_provider_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider_response import ApiCatalogProviderResponse - -class TestApiCatalogProviderResponse(unittest.TestCase): - """ApiCatalogProviderResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProviderResponse: - """Test ApiCatalogProviderResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProviderResponse` - """ - model = ApiCatalogProviderResponse() - if include_optional: - return ApiCatalogProviderResponse( - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - providers = [ - null - ] - ) - else: - return ApiCatalogProviderResponse( - ) - """ - - def testApiCatalogProviderResponse(self): - """Test ApiCatalogProviderResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_catalog_provider_response_all_of_providers_inner.py b/internet_insights_api/test/test_api_catalog_provider_response_all_of_providers_inner.py deleted file mode 100644 index 1279f5da..00000000 --- a/internet_insights_api/test/test_api_catalog_provider_response_all_of_providers_inner.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_catalog_provider_response_all_of_providers_inner import ApiCatalogProviderResponseAllOfProvidersInner - -class TestApiCatalogProviderResponseAllOfProvidersInner(unittest.TestCase): - """ApiCatalogProviderResponseAllOfProvidersInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiCatalogProviderResponseAllOfProvidersInner: - """Test ApiCatalogProviderResponseAllOfProvidersInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiCatalogProviderResponseAllOfProvidersInner` - """ - model = ApiCatalogProviderResponseAllOfProvidersInner() - if include_optional: - return ApiCatalogProviderResponseAllOfProvidersInner( - id = '85602a0a-54a7-4e97-946e-67492ef1fa26', - provider_name = 'Amazon Web Services', - provider_type = 'IAAS', - region = 'North America', - data_type = 'Application', - asns_count = 10, - countries_count = 2, - locations_count = 50, - interfaces_count = 15, - included = True, - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return ApiCatalogProviderResponseAllOfProvidersInner( - ) - """ - - def testApiCatalogProviderResponseAllOfProvidersInner(self): - """Test ApiCatalogProviderResponseAllOfProvidersInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_network_outage_affected_location.py b/internet_insights_api/test/test_api_network_outage_affected_location.py deleted file mode 100644 index 4426e8cc..00000000 --- a/internet_insights_api/test/test_api_network_outage_affected_location.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_network_outage_affected_location import ApiNetworkOutageAffectedLocation - -class TestApiNetworkOutageAffectedLocation(unittest.TestCase): - """ApiNetworkOutageAffectedLocation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiNetworkOutageAffectedLocation: - """Test ApiNetworkOutageAffectedLocation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiNetworkOutageAffectedLocation` - """ - model = ApiNetworkOutageAffectedLocation() - if include_optional: - return ApiNetworkOutageAffectedLocation( - location = 'Chicago, Illinois, US', - affected_interfaces = [ - '50.51.52.53' - ] - ) - else: - return ApiNetworkOutageAffectedLocation( - ) - """ - - def testApiNetworkOutageAffectedLocation(self): - """Test ApiNetworkOutageAffectedLocation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_network_outage_details.py b/internet_insights_api/test/test_api_network_outage_details.py deleted file mode 100644 index 45bc517e..00000000 --- a/internet_insights_api/test/test_api_network_outage_details.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_network_outage_details import ApiNetworkOutageDetails - -class TestApiNetworkOutageDetails(unittest.TestCase): - """ApiNetworkOutageDetails unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiNetworkOutageDetails: - """Test ApiNetworkOutageDetails - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiNetworkOutageDetails` - """ - model = ApiNetworkOutageDetails() - if include_optional: - return ApiNetworkOutageDetails( - id = '8EF2760862C705783A2F8BCBAAABB44F28DBC670DBA3B610', - provider_name = 'Rackspace', - provider_type = 'IAAS', - network_name = 'Rackspace Hosting', - asn = 19994, - start_date = '2023-01-27T20:50:51.256Z', - start_round_id = 1674852600, - end_date = '2023-01-27T20:53:51.256Z', - end_round_id = 1674852600, - duration = 180, - affected_tests = [ - internet_insights_api.models.api_affected_test.ApiAffectedTest( - id = 5, - name = 'amazon-test2', ) - ], - affected_domains = [ - 'periodic-failure.com' - ], - affected_agents = [ - internet_insights_api.models.api_affected_agent.ApiAffectedAgent( - id = 11, - name = 'London, England', ) - ], - affected_locations = [ - internet_insights_api.models.api_network_outage_affected_location.ApiNetworkOutageAffectedLocation( - location = 'Chicago, Illinois, US', - affected_interfaces = [ - '50.51.52.53' - ], ) - ] - ) - else: - return ApiNetworkOutageDetails( - ) - """ - - def testApiNetworkOutageDetails(self): - """Test ApiNetworkOutageDetails""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_network_outage_response.py b/internet_insights_api/test/test_api_network_outage_response.py deleted file mode 100644 index 940aed09..00000000 --- a/internet_insights_api/test/test_api_network_outage_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_network_outage_response import ApiNetworkOutageResponse - -class TestApiNetworkOutageResponse(unittest.TestCase): - """ApiNetworkOutageResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiNetworkOutageResponse: - """Test ApiNetworkOutageResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiNetworkOutageResponse` - """ - model = ApiNetworkOutageResponse() - if include_optional: - return ApiNetworkOutageResponse( - id = '8EF2760862C705783A2F8BCBAAABB44F28DBC670DBA3B610', - provider_name = 'Rackspace', - provider_type = 'IAAS', - network_name = 'Rackspace Hosting', - asn = 19994, - start_date = '2023-01-27T20:50:51.256Z', - start_round_id = 1674852600, - end_date = '2023-01-27T20:53:51.256Z', - end_round_id = 1674852600, - duration = 180, - affected_tests = [ - internet_insights_api.models.api_affected_test.ApiAffectedTest( - id = 5, - name = 'amazon-test2', ) - ], - affected_domains = [ - 'periodic-failure.com' - ], - affected_agents = [ - internet_insights_api.models.api_affected_agent.ApiAffectedAgent( - id = 11, - name = 'London, England', ) - ], - affected_locations = [ - internet_insights_api.models.api_network_outage_affected_location.ApiNetworkOutageAffectedLocation( - location = 'Chicago, Illinois, US', - affected_interfaces = [ - '50.51.52.53' - ], ) - ], - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return ApiNetworkOutageResponse( - ) - """ - - def testApiNetworkOutageResponse(self): - """Test ApiNetworkOutageResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_outage.py b/internet_insights_api/test/test_api_outage.py deleted file mode 100644 index 5ee3adb3..00000000 --- a/internet_insights_api/test/test_api_outage.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_outage import ApiOutage - -class TestApiOutage(unittest.TestCase): - """ApiOutage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiOutage: - """Test ApiOutage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiOutage` - """ - model = ApiOutage() - if include_optional: - return ApiOutage( - id = 'xxxxxxxxxxxxxxxxxx1', - type = 'app', - provider_name = 'Google', - provider_type = 'SAAS', - name = 'Google', - start_date = '2022-03-01T23:31:11Z', - start_round_id = 1646177400, - end_date = '2022-03-01T23:31:11Z', - end_round_id = 1646177700, - duration = 214, - affected_tests_count = 1, - affected_servers_count = 2, - affected_locations_count = 1 - ) - else: - return ApiOutage( - ) - """ - - def testApiOutage(self): - """Test ApiOutage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_outage_filter.py b/internet_insights_api/test/test_api_outage_filter.py deleted file mode 100644 index 15624546..00000000 --- a/internet_insights_api/test/test_api_outage_filter.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_outage_filter import ApiOutageFilter - -class TestApiOutageFilter(unittest.TestCase): - """ApiOutageFilter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiOutageFilter: - """Test ApiOutageFilter - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiOutageFilter` - """ - model = ApiOutageFilter() - if include_optional: - return ApiOutageFilter( - start_date = '2022-03-01T01:30:00Z', - end_date = '2022-03-01T23:30:15Z', - window = '1d', - outage_scope = 'all', - provider_name = ["Telia","Amazon"], - application_name = ["slack","facebook"], - interface_network = [ - '' - ] - ) - else: - return ApiOutageFilter( - ) - """ - - def testApiOutageFilter(self): - """Test ApiOutageFilter""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_outages_response.py b/internet_insights_api/test/test_api_outages_response.py deleted file mode 100644 index eb5c05e0..00000000 --- a/internet_insights_api/test/test_api_outages_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_outages_response import ApiOutagesResponse - -class TestApiOutagesResponse(unittest.TestCase): - """ApiOutagesResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiOutagesResponse: - """Test ApiOutagesResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiOutagesResponse` - """ - model = ApiOutagesResponse() - if include_optional: - return ApiOutagesResponse( - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - outages = [ - null - ] - ) - else: - return ApiOutagesResponse( - ) - """ - - def testApiOutagesResponse(self): - """Test ApiOutagesResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_api_outages_response_all_of_outages_inner.py b/internet_insights_api/test/test_api_outages_response_all_of_outages_inner.py deleted file mode 100644 index 1091eb50..00000000 --- a/internet_insights_api/test/test_api_outages_response_all_of_outages_inner.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.api_outages_response_all_of_outages_inner import ApiOutagesResponseAllOfOutagesInner - -class TestApiOutagesResponseAllOfOutagesInner(unittest.TestCase): - """ApiOutagesResponseAllOfOutagesInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiOutagesResponseAllOfOutagesInner: - """Test ApiOutagesResponseAllOfOutagesInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiOutagesResponseAllOfOutagesInner` - """ - model = ApiOutagesResponseAllOfOutagesInner() - if include_optional: - return ApiOutagesResponseAllOfOutagesInner( - id = 'xxxxxxxxxxxxxxxxxx1', - type = 'app', - provider_name = 'Google', - provider_type = 'SAAS', - name = 'Google', - start_date = '2022-03-01T23:31:11Z', - start_round_id = 1646177400, - end_date = '2022-03-01T23:31:11Z', - end_round_id = 1646177700, - duration = 214, - affected_tests_count = 1, - affected_servers_count = 2, - affected_locations_count = 1, - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return ApiOutagesResponseAllOfOutagesInner( - ) - """ - - def testApiOutagesResponseAllOfOutagesInner(self): - """Test ApiOutagesResponseAllOfOutagesInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_catalog_providers_api.py b/internet_insights_api/test/test_catalog_providers_api.py deleted file mode 100644 index e5ab8ed7..00000000 --- a/internet_insights_api/test/test_catalog_providers_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from internet_insights_api.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_catalog_provider_list(self) -> None: - """Test case for catalog_provider_list - - List catalog providers - """ - pass - - def test_get_catalog_provider(self) -> None: - """Test case for get_catalog_provider - - Retrieve a catalog provider - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_error.py b/internet_insights_api/test/test_error.py deleted file mode 100644 index baa0a45d..00000000 --- a/internet_insights_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_link.py b/internet_insights_api/test/test_link.py deleted file mode 100644 index ebaece3b..00000000 --- a/internet_insights_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_outage_scope.py b/internet_insights_api/test/test_outage_scope.py deleted file mode 100644 index 91086a45..00000000 --- a/internet_insights_api/test/test_outage_scope.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.outage_scope import OutageScope - -class TestOutageScope(unittest.TestCase): - """OutageScope unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOutageScope(self): - """Test OutageScope""" - # inst = OutageScope() - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_outages_api_public_api.py b/internet_insights_api/test/test_outages_api_public_api.py deleted file mode 100644 index 83767ec0..00000000 --- a/internet_insights_api/test/test_outages_api_public_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from internet_insights_api.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_get_outages_app(self) -> None: - """Test case for get_outages_app - - Retrieve application outage - """ - pass - - def test_get_outages_filter(self) -> None: - """Test case for get_outages_filter - - List network and application outages - """ - pass - - def test_get_outages_net(self) -> None: - """Test case for get_outages_net - - Retrieve network outage - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_self_links.py b/internet_insights_api/test/test_self_links.py deleted file mode 100644 index badbe6a2..00000000 --- a/internet_insights_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = internet_insights_api.models.self_links__links.SelfLinks__links( - self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_self_links_links.py b/internet_insights_api/test/test_self_links_links.py deleted file mode 100644 index 07d4ee40..00000000 --- a/internet_insights_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = internet_insights_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/test/test_unauthorized_error.py b/internet_insights_api/test/test_unauthorized_error.py deleted file mode 100644 index 1bff4ead..00000000 --- a/internet_insights_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Internet Insights API - - # Overview 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.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from internet_insights_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/internet_insights_api/tox.ini b/internet_insights_api/tox.ini deleted file mode 100644 index 0c0e34c8..00000000 --- a/internet_insights_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=internet_insights_api diff --git a/labels_api/.gitignore b/labels/.gitignore similarity index 100% rename from labels_api/.gitignore rename to labels/.gitignore diff --git a/labels_api/.openapi-generator-ignore b/labels/.openapi-generator-ignore similarity index 100% rename from labels_api/.openapi-generator-ignore rename to labels/.openapi-generator-ignore diff --git a/labels/.openapi-generator/FILES b/labels/.openapi-generator/FILES new file mode 100644 index 00000000..5e3ceefd --- /dev/null +++ b/labels/.openapi-generator/FILES @@ -0,0 +1,70 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AgentApi.md +docs/AllLabelsApi.md +docs/CreateAgentLabel201Response.md +docs/DashboardApi.md +docs/EndpointTestApi.md +docs/Error.md +docs/GetLabels200Response.md +docs/Label.md +docs/LabelDetail.md +docs/LabelRequest.md +docs/LabelType.md +docs/Labels.md +docs/Link.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/TestApi.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +labels/__init__.py +labels/api/__init__.py +labels/api/agent_api.py +labels/api/all_labels_api.py +labels/api/dashboard_api.py +labels/api/endpoint_test_api.py +labels/api/test_api.py +labels/api_client.py +labels/api_response.py +labels/configuration.py +labels/exceptions.py +labels/models/__init__.py +labels/models/create_agent_label201_response.py +labels/models/error.py +labels/models/get_labels200_response.py +labels/models/label.py +labels/models/label_detail.py +labels/models/label_request.py +labels/models/label_type.py +labels/models/labels.py +labels/models/link.py +labels/models/self_links.py +labels/models/self_links_links.py +labels/models/unauthorized_error.py +labels/models/validation_error.py +labels/models/validation_error_all_of_errors.py +labels/py.typed +labels/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_create_agent_label201_response.py +test/test_error.py +test/test_get_labels200_response.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_self_links_links.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/labels/.openapi-generator/VERSION b/labels/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/labels/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/labels/README.md b/labels/README.md new file mode 100644 index 00000000..624bb1f4 --- /dev/null +++ b/labels/README.md @@ -0,0 +1,155 @@ +# labels +### Overview +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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import labels +``` + +### 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 labels +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import labels +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.AgentApi(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 = labels.LabelRequest() # LabelRequest | Label resource (optional) + + try: + # Create a Label of type `agent` + api_response = api_instance.create_agent_label(aid=aid, label_request=label_request) + print("The response of AgentApi->create_agent_label:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AgentApi->create_agent_label: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AgentApi* | [**create_agent_label**](docs/AgentApi.md#create_agent_label) | **POST** /v7/labels/agent | Create a Label of type `agent` +*AgentApi* | [**delete_agent_label**](docs/AgentApi.md#delete_agent_label) | **DELETE** /v7/labels/agent/{labelId} | Delete a Label object of type `agent` +*AgentApi* | [**get_agent_label**](docs/AgentApi.md#get_agent_label) | **GET** /v7/labels/agent/{labelId} | Get a Label object of type `agent` +*AgentApi* | [**get_agent_labels**](docs/AgentApi.md#get_agent_labels) | **GET** /v7/labels/agent | Get list of Labels of type `agent` +*AgentApi* | [**update_agent_label**](docs/AgentApi.md#update_agent_label) | **PUT** /v7/labels/agent/{labelId} | Update a Label object of type `agent` +*AllLabelsApi* | [**get_labels**](docs/AllLabelsApi.md#get_labels) | **GET** /v7/labels | Get list of Labels +*DashboardApi* | [**create_dashboard_label**](docs/DashboardApi.md#create_dashboard_label) | **POST** /v7/labels/dashboard | Create a Label of type `dashboard` +*DashboardApi* | [**delete_dashboard_label**](docs/DashboardApi.md#delete_dashboard_label) | **DELETE** /v7/labels/dashboard/{labelId} | Delete a Label object of type `dashboard` +*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* | [**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` +*EndpointTestApi* | [**update_endpoint_test_label**](docs/EndpointTestApi.md#update_endpoint_test_label) | **PUT** /v7/labels/endpoint-test/{labelId} | Update a Label object of type `endpoint-test` +*TestApi* | [**create_test_label**](docs/TestApi.md#create_test_label) | **POST** /v7/labels/test | Create a Label of type `test` +*TestApi* | [**delete_test_label**](docs/TestApi.md#delete_test_label) | **DELETE** /v7/labels/test/{labelId} | Delete a Label object of type `test` +*TestApi* | [**get_test_label**](docs/TestApi.md#get_test_label) | **GET** /v7/labels/test/{labelId} | Get a Label object of type `test` +*TestApi* | [**get_test_labels**](docs/TestApi.md#get_test_labels) | **GET** /v7/labels/test | Get list of Labels of type `test` +*TestApi* | [**update_test_label**](docs/TestApi.md#update_test_label) | **PUT** /v7/labels/test/{labelId} | Update a Label object of type `test` + + +## Documentation For Models + + - [CreateAgentLabel201Response](docs/CreateAgentLabel201Response.md) + - [Error](docs/Error.md) + - [GetLabels200Response](docs/GetLabels200Response.md) + - [Label](docs/Label.md) + - [LabelDetail](docs/LabelDetail.md) + - [LabelRequest](docs/LabelRequest.md) + - [LabelType](docs/LabelType.md) + - [Labels](docs/Labels.md) + - [Link](docs/Link.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/labels/docs/AgentApi.md b/labels/docs/AgentApi.md new file mode 100644 index 00000000..c9e0ef99 --- /dev/null +++ b/labels/docs/AgentApi.md @@ -0,0 +1,436 @@ +# labels.AgentApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_agent_label**](AgentApi.md#create_agent_label) | **POST** /v7/labels/agent | Create a Label of type `agent` +[**delete_agent_label**](AgentApi.md#delete_agent_label) | **DELETE** /v7/labels/agent/{labelId} | Delete a Label object of type `agent` +[**get_agent_label**](AgentApi.md#get_agent_label) | **GET** /v7/labels/agent/{labelId} | Get a Label object of type `agent` +[**get_agent_labels**](AgentApi.md#get_agent_labels) | **GET** /v7/labels/agent | Get list of Labels of type `agent` +[**update_agent_label**](AgentApi.md#update_agent_label) | **PUT** /v7/labels/agent/{labelId} | Update a Label object of type `agent` + + +# **create_agent_label** +> CreateAgentLabel201Response create_agent_label(aid=aid, label_request=label_request) + +Create a Label of type `agent` + +Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. You must have sufficient permissions to create a new label. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.AgentApi(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 = labels.LabelRequest() # LabelRequest | Label resource (optional) + + try: + # Create a Label of type `agent` + api_response = api_instance.create_agent_label(aid=aid, label_request=label_request) + print("The response of AgentApi->create_agent_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->create_agent_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 resource | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | +**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_agent_label** +> delete_agent_label(label_id, aid=aid) + +Delete a Label object of type `agent` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.AgentApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `agent` + api_instance.delete_agent_label(label_id, aid=aid) + except Exception as e: + print("Exception when calling AgentApi->delete_agent_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 | - | + +[[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_label** +> CreateAgentLabel201Response get_agent_label(label_id, aid=aid) + +Get a Label object of type `agent` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.AgentApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `agent` + api_response = api_instance.get_agent_label(label_id, aid=aid) + print("The response of AgentApi->get_agent_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_agent_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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_agent_labels** +> GetLabels200Response get_agent_labels(aid=aid) + +Get list of Labels of type `agent` + +Returns a list of all Agent labels (formerly called groups) configured in ThousandEyes. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.get_labels200_response import GetLabels200Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.AgentApi(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: + # Get list of Labels of type `agent` + api_response = api_instance.get_agent_labels(aid=aid) + print("The response of AgentApi->get_agent_labels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_agent_labels: %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 + +[**GetLabels200Response**](GetLabels200Response.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) + +# **update_agent_label** +> CreateAgentLabel201Response update_agent_label(label_id, aid=aid, label_request=label_request) + +Update a Label object of type `agent` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.AgentApi(api_client) + label_id = '961' # str | ID of the label to get + 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 = labels.LabelRequest() # LabelRequest | (optional) + + try: + # Update a Label object of type `agent` + api_response = api_instance.update_agent_label(label_id, aid=aid, label_request=label_request) + print("The response of AgentApi->update_agent_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->update_agent_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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)| | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | + +[[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/labels_api/docs/AllLabelsApi.md b/labels/docs/AllLabelsApi.md similarity index 87% rename from labels_api/docs/AllLabelsApi.md rename to labels/docs/AllLabelsApi.md index 7f63302f..75f67805 100644 --- a/labels_api/docs/AllLabelsApi.md +++ b/labels/docs/AllLabelsApi.md @@ -1,4 +1,4 @@ -# labels_api.AllLabelsApi +# labels.AllLabelsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns a list of all labels (formerly called groups) configured in ThousandEyes ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import labels_api -from labels_api.models.get_labels200_response import GetLabels200Response -from labels_api.rest import ApiException +import labels +from labels.models.get_labels200_response import GetLabels200Response +from 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 = labels_api.Configuration( +configuration = labels.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,15 +36,15 @@ configuration = labels_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = labels_api.Configuration( +configuration = labels.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: +with labels.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = labels_api.AllLabelsApi(api_client) - aid = '2067' # 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) + api_instance = labels.AllLabelsApi(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: # Get list of Labels @@ -60,6 +59,7 @@ with labels_api.ApiClient(configuration) as api_client: ### 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] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/labels_api/docs/CreateAgentLabel201Response.md b/labels/docs/CreateAgentLabel201Response.md similarity index 85% rename from labels_api/docs/CreateAgentLabel201Response.md rename to labels/docs/CreateAgentLabel201Response.md index 43103125..e9d1c13b 100644 --- a/labels_api/docs/CreateAgentLabel201Response.md +++ b/labels/docs/CreateAgentLabel201Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label_id** | **str** | Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.create_agent_label201_response import CreateAgentLabel201Response # TODO update the JSON string below json = "{}" # create an instance of CreateAgentLabel201Response from a JSON string create_agent_label201_response_instance = CreateAgentLabel201Response.from_json(json) # print the JSON string representation of the object -print CreateAgentLabel201Response.to_json() +print(CreateAgentLabel201Response.to_json()) # convert the object into a dict create_agent_label201_response_dict = create_agent_label201_response_instance.to_dict() # create an instance of CreateAgentLabel201Response from a dict -create_agent_label201_response_form_dict = create_agent_label201_response.from_dict(create_agent_label201_response_dict) +create_agent_label201_response_from_dict = CreateAgentLabel201Response.from_dict(create_agent_label201_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/labels/docs/DashboardApi.md b/labels/docs/DashboardApi.md new file mode 100644 index 00000000..adf1041b --- /dev/null +++ b/labels/docs/DashboardApi.md @@ -0,0 +1,436 @@ +# labels.DashboardApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_dashboard_label**](DashboardApi.md#create_dashboard_label) | **POST** /v7/labels/dashboard | Create a Label of type `dashboard` +[**delete_dashboard_label**](DashboardApi.md#delete_dashboard_label) | **DELETE** /v7/labels/dashboard/{labelId} | Delete a Label object of type `dashboard` +[**get_dashboard_label**](DashboardApi.md#get_dashboard_label) | **GET** /v7/labels/dashboard/{labelId} | Get a Label object of type `dashboard` +[**get_dashboard_labels**](DashboardApi.md#get_dashboard_labels) | **GET** /v7/labels/dashboard | Get list of Labels of type `dashboard` +[**update_dashboard_label**](DashboardApi.md#update_dashboard_label) | **PUT** /v7/labels/dashboard/{labelId} | Update a Label object of type `dashboard` + + +# **create_dashboard_label** +> CreateAgentLabel201Response create_dashboard_label(aid=aid, label_request=label_request) + +Create a Label of type `dashboard` + +Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning agents or tests, the user needs permission to modify the objects being added. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.DashboardApi(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 = labels.LabelRequest() # LabelRequest | Label resource (optional) + + try: + # Create a Label of type `dashboard` + api_response = api_instance.create_dashboard_label(aid=aid, label_request=label_request) + print("The response of DashboardApi->create_dashboard_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardApi->create_dashboard_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 resource | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | +**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_label** +> delete_dashboard_label(label_id, aid=aid) + +Delete a Label object of type `dashboard` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.DashboardApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `dashboard` + api_instance.delete_dashboard_label(label_id, aid=aid) + except Exception as e: + print("Exception when calling DashboardApi->delete_dashboard_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 | - | + +[[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_label** +> CreateAgentLabel201Response get_dashboard_label(label_id, aid=aid) + +Get a Label object of type `dashboard` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.DashboardApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `dashboard` + api_response = api_instance.get_dashboard_label(label_id, aid=aid) + print("The response of DashboardApi->get_dashboard_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardApi->get_dashboard_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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_labels** +> GetLabels200Response get_dashboard_labels(aid=aid) + +Get list of Labels of type `dashboard` + +Returns a list of all Dashboard labels (formerly called groups) configured in ThousandEyes. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.get_labels200_response import GetLabels200Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.DashboardApi(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: + # Get list of Labels of type `dashboard` + api_response = api_instance.get_dashboard_labels(aid=aid) + print("The response of DashboardApi->get_dashboard_labels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardApi->get_dashboard_labels: %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 + +[**GetLabels200Response**](GetLabels200Response.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) + +# **update_dashboard_label** +> CreateAgentLabel201Response update_dashboard_label(label_id, aid=aid, label_request=label_request) + +Update a Label object of type `dashboard` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.DashboardApi(api_client) + label_id = '961' # str | ID of the label to get + 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 = labels.LabelRequest() # LabelRequest | (optional) + + try: + # Update a Label object of type `dashboard` + api_response = api_instance.update_dashboard_label(label_id, aid=aid, label_request=label_request) + print("The response of DashboardApi->update_dashboard_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardApi->update_dashboard_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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)| | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | + +[[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/labels/docs/EndpointTestApi.md b/labels/docs/EndpointTestApi.md new file mode 100644 index 00000000..7903c733 --- /dev/null +++ b/labels/docs/EndpointTestApi.md @@ -0,0 +1,436 @@ +# labels.EndpointTestApi + +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` +[**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** +> CreateAgentLabel201Response create_endpoint_tests_label(aid=aid, label_request=label_request) + +Create a Label of type `endpoint-test` + +Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning agents or tests, the user needs permission to modify the objects being added. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.EndpointTestApi(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 = labels.LabelRequest() # LabelRequest | Label resource (optional) + + 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") + pprint(api_response) + except Exception as e: + print("Exception when calling EndpointTestApi->create_endpoint_tests_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 resource | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | +**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_endpoint_test_label** +> delete_endpoint_test_label(label_id, aid=aid) + +Delete a Label object of type `endpoint-test` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.EndpointTestApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `endpoint-test` + api_instance.delete_endpoint_test_label(label_id, aid=aid) + except Exception as e: + print("Exception when calling EndpointTestApi->delete_endpoint_test_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 | - | + +[[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_test_label** +> CreateAgentLabel201Response get_endpoint_test_label(label_id, aid=aid) + +Get a Label object of type `endpoint-test` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.EndpointTestApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `endpoint-test` + api_response = api_instance.get_endpoint_test_label(label_id, aid=aid) + print("The response of EndpointTestApi->get_endpoint_test_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EndpointTestApi->get_endpoint_test_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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_endpoint_test_labels** +> GetLabels200Response get_endpoint_test_labels(aid=aid) + +Get list of Labels of type `endpoint-test` + +Returns a list of all Endpoint Test labels (formerly called groups) configured in ThousandEyes. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.get_labels200_response import GetLabels200Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.EndpointTestApi(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: + # Get list of Labels of type `endpoint-test` + api_response = api_instance.get_endpoint_test_labels(aid=aid) + print("The response of EndpointTestApi->get_endpoint_test_labels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EndpointTestApi->get_endpoint_test_labels: %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 + +[**GetLabels200Response**](GetLabels200Response.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) + +# **update_endpoint_test_label** +> CreateAgentLabel201Response update_endpoint_test_label(label_id, aid=aid, label_request=label_request) + +Update a Label object of type `endpoint-test` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.EndpointTestApi(api_client) + label_id = '961' # str | ID of the label to get + 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 = labels.LabelRequest() # LabelRequest | (optional) + + try: + # Update a Label object of type `endpoint-test` + api_response = api_instance.update_endpoint_test_label(label_id, aid=aid, label_request=label_request) + print("The response of EndpointTestApi->update_endpoint_test_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EndpointTestApi->update_endpoint_test_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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)| | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | + +[[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/labels/docs/Error.md b/labels/docs/Error.md new file mode 100644 index 00000000..fe24a8a2 --- /dev/null +++ b/labels/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 labels.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/labels_api/docs/GetLabels200Response.md b/labels/docs/GetLabels200Response.md similarity index 80% rename from labels_api/docs/GetLabels200Response.md rename to labels/docs/GetLabels200Response.md index 6517f95c..d7857ea6 100644 --- a/labels_api/docs/GetLabels200Response.md +++ b/labels/docs/GetLabels200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **labels** | [**List[Label]**](Label.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.get_labels200_response import GetLabels200Response +from labels.models.get_labels200_response import GetLabels200Response # TODO update the JSON string below json = "{}" # create an instance of GetLabels200Response from a JSON string get_labels200_response_instance = GetLabels200Response.from_json(json) # print the JSON string representation of the object -print GetLabels200Response.to_json() +print(GetLabels200Response.to_json()) # convert the object into a dict get_labels200_response_dict = get_labels200_response_instance.to_dict() # create an instance of GetLabels200Response from a dict -get_labels200_response_form_dict = get_labels200_response.from_dict(get_labels200_response_dict) +get_labels200_response_from_dict = GetLabels200Response.from_dict(get_labels200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/labels/docs/Label.md b/labels/docs/Label.md new file mode 100644 index 00000000..50128f9e --- /dev/null +++ b/labels/docs/Label.md @@ -0,0 +1,32 @@ +# Label + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. | [optional] +**is_built_in** | **bool** | `true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. | [optional] +**name** | **str** | The name of the new label - this must be unique. | [optional] +**type** | [**LabelType**](LabelType.md) | | [optional] + +## Example + +```python +from labels.models.label import Label + +# TODO update the JSON string below +json = "{}" +# create an instance of Label from a JSON string +label_instance = Label.from_json(json) +# print the JSON string representation of the object +print(Label.to_json()) + +# convert the object into a dict +label_dict = label_instance.to_dict() +# create an instance of Label from a dict +label_from_dict = Label.from_dict(label_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/labels_api/docs/LabelDetail.md b/labels/docs/LabelDetail.md similarity index 89% rename from labels_api/docs/LabelDetail.md rename to labels/docs/LabelDetail.md index eb99f0ca..cd7cada6 100644 --- a/labels_api/docs/LabelDetail.md +++ b/labels/docs/LabelDetail.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label_id** | **str** | Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. | [optional] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.label_detail import LabelDetail +from labels.models.label_detail import LabelDetail # TODO update the JSON string below json = "{}" # create an instance of LabelDetail from a JSON string label_detail_instance = LabelDetail.from_json(json) # print the JSON string representation of the object -print LabelDetail.to_json() +print(LabelDetail.to_json()) # convert the object into a dict label_detail_dict = label_detail_instance.to_dict() # create an instance of LabelDetail from a dict -label_detail_form_dict = label_detail.from_dict(label_detail_dict) +label_detail_from_dict = LabelDetail.from_dict(label_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/labels_api/docs/LabelRequest.md b/labels/docs/LabelRequest.md similarity index 85% rename from labels_api/docs/LabelRequest.md rename to labels/docs/LabelRequest.md index d12f151c..1592f709 100644 --- a/labels_api/docs/LabelRequest.md +++ b/labels/docs/LabelRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The name of the new label - this must be unique. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from labels_api.models.label_request import LabelRequest +from labels.models.label_request import LabelRequest # TODO update the JSON string below json = "{}" # create an instance of LabelRequest from a JSON string label_request_instance = LabelRequest.from_json(json) # print the JSON string representation of the object -print LabelRequest.to_json() +print(LabelRequest.to_json()) # convert the object into a dict label_request_dict = label_request_instance.to_dict() # create an instance of LabelRequest from a dict -label_request_form_dict = label_request.from_dict(label_request_dict) +label_request_from_dict = LabelRequest.from_dict(label_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/labels_api/docs/LabelType.md b/labels/docs/LabelType.md similarity index 99% rename from labels_api/docs/LabelType.md rename to labels/docs/LabelType.md index a4da61dc..c6a16c07 100644 --- a/labels_api/docs/LabelType.md +++ b/labels/docs/LabelType.md @@ -3,6 +3,7 @@ Either `test`, `agent`, `endpoint-test`, `endpoint-agent` or `dashboard`, indicates the type of label. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/labels/docs/Labels.md b/labels/docs/Labels.md new file mode 100644 index 00000000..f97f869c --- /dev/null +++ b/labels/docs/Labels.md @@ -0,0 +1,29 @@ +# Labels + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | [**List[Label]**](Label.md) | | [optional] + +## Example + +```python +from labels.models.labels import Labels + +# TODO update the JSON string below +json = "{}" +# create an instance of Labels from a JSON string +labels_instance = Labels.from_json(json) +# print the JSON string representation of the object +print(Labels.to_json()) + +# convert the object into a dict +labels_dict = labels_instance.to_dict() +# create an instance of Labels from a dict +labels_from_dict = Labels.from_dict(labels_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/labels/docs/Link.md b/labels/docs/Link.md new file mode 100644 index 00000000..7bdda66d --- /dev/null +++ b/labels/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 labels.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/labels/docs/SelfLinks.md b/labels/docs/SelfLinks.md new file mode 100644 index 00000000..62034dbd --- /dev/null +++ b/labels/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from labels.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/labels/docs/SelfLinksLinks.md b/labels/docs/SelfLinksLinks.md new file mode 100644 index 00000000..89f45c5f --- /dev/null +++ b/labels/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from labels.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/labels/docs/TestApi.md b/labels/docs/TestApi.md new file mode 100644 index 00000000..bb5ea24a --- /dev/null +++ b/labels/docs/TestApi.md @@ -0,0 +1,436 @@ +# labels.TestApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_test_label**](TestApi.md#create_test_label) | **POST** /v7/labels/test | Create a Label of type `test` +[**delete_test_label**](TestApi.md#delete_test_label) | **DELETE** /v7/labels/test/{labelId} | Delete a Label object of type `test` +[**get_test_label**](TestApi.md#get_test_label) | **GET** /v7/labels/test/{labelId} | Get a Label object of type `test` +[**get_test_labels**](TestApi.md#get_test_labels) | **GET** /v7/labels/test | Get list of Labels of type `test` +[**update_test_label**](TestApi.md#update_test_label) | **PUT** /v7/labels/test/{labelId} | Update a Label object of type `test` + + +# **create_test_label** +> CreateAgentLabel201Response create_test_label(aid=aid, label_request=label_request) + +Create a Label of type `test` + +Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.TestApi(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 = labels.LabelRequest() # LabelRequest | Label resource (optional) + + try: + # Create a Label of type `test` + api_response = api_instance.create_test_label(aid=aid, label_request=label_request) + print("The response of TestApi->create_test_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TestApi->create_test_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 resource | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | +**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_test_label** +> delete_test_label(label_id, aid=aid) + +Delete a Label object of type `test` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.TestApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `test` + api_instance.delete_test_label(label_id, aid=aid) + except Exception as e: + print("Exception when calling TestApi->delete_test_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 | - | + +[[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_label** +> CreateAgentLabel201Response get_test_label(label_id, aid=aid) + +Get a Label object of type `test` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.TestApi(api_client) + label_id = '961' # str | ID of the label to get + 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 a Label object of type `test` + api_response = api_instance.get_test_label(label_id, aid=aid) + print("The response of TestApi->get_test_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TestApi->get_test_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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 + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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_test_labels** +> GetLabels200Response get_test_labels(aid=aid) + +Get list of Labels of type `test` + +Returns a list of all Test labels (formerly called groups) configured in ThousandEyes. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.get_labels200_response import GetLabels200Response +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.TestApi(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: + # Get list of Labels of type `test` + api_response = api_instance.get_test_labels(aid=aid) + print("The response of TestApi->get_test_labels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TestApi->get_test_labels: %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 + +[**GetLabels200Response**](GetLabels200Response.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) + +# **update_test_label** +> CreateAgentLabel201Response update_test_label(label_id, aid=aid, label_request=label_request) + +Update a Label object of type `test` + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import labels +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.label_request import LabelRequest +from 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 = labels.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 = labels.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = labels.TestApi(api_client) + label_id = '961' # str | ID of the label to get + 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 = labels.LabelRequest() # LabelRequest | (optional) + + try: + # Update a Label object of type `test` + api_response = api_instance.update_test_label(label_id, aid=aid, label_request=label_request) + print("The response of TestApi->update_test_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TestApi->update_test_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_id** | **str**| ID of the label to get | + **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)| | [optional] + +### Return type + +[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | + +[[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/labels/docs/UnauthorizedError.md b/labels/docs/UnauthorizedError.md new file mode 100644 index 00000000..840bbdb6 --- /dev/null +++ b/labels/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from labels.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/labels/docs/ValidationError.md b/labels/docs/ValidationError.md new file mode 100644 index 00000000..d2d620e3 --- /dev/null +++ b/labels/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from labels.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/labels/docs/ValidationErrorAllOfErrors.md b/labels/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..efac8c92 --- /dev/null +++ b/labels/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/labels/labels/__init__.py b/labels/labels/__init__.py new file mode 100644 index 00000000..a9c28edb --- /dev/null +++ b/labels/labels/__init__.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 labels.api.agent_api import AgentApi +from labels.api.all_labels_api import AllLabelsApi +from labels.api.dashboard_api import DashboardApi +from labels.api.endpoint_test_api import EndpointTestApi +from labels.api.test_api import TestApi + +# import ApiClient +from labels.api_response import ApiResponse +from labels.api_client import ApiClient +from labels.configuration import Configuration +from labels.exceptions import OpenApiException +from labels.exceptions import ApiTypeError +from labels.exceptions import ApiValueError +from labels.exceptions import ApiKeyError +from labels.exceptions import ApiAttributeError +from labels.exceptions import ApiException + +# import models into sdk package +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.error import Error +from labels.models.get_labels200_response import GetLabels200Response +from labels.models.label import Label +from labels.models.label_detail import LabelDetail +from labels.models.label_request import LabelRequest +from labels.models.label_type import LabelType +from labels.models.labels import Labels +from labels.models.link import Link +from labels.models.self_links import SelfLinks +from labels.models.self_links_links import SelfLinksLinks +from labels.models.unauthorized_error import UnauthorizedError +from labels.models.validation_error import ValidationError +from labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/labels/labels/api/__init__.py b/labels/labels/api/__init__.py new file mode 100644 index 00000000..8ae91925 --- /dev/null +++ b/labels/labels/api/__init__.py @@ -0,0 +1,9 @@ +# flake8: noqa + +# import apis into api package +from labels.api.agent_api import AgentApi +from labels.api.all_labels_api import AllLabelsApi +from labels.api.dashboard_api import DashboardApi +from labels.api.endpoint_test_api import EndpointTestApi +from labels.api.test_api import TestApi + diff --git a/labels_api/labels_api/api/agent_api.py b/labels/labels/api/agent_api.py similarity index 77% rename from labels_api/labels_api/api/agent_api.py rename to labels/labels/api/agent_api.py index 5e2df234..2083cffa 100644 --- a/labels_api/labels_api/api/agent_api.py +++ b/labels/labels/api/agent_api.py @@ -5,36 +5,27 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.get_labels200_response import GetLabels200Response +from labels.models.label_request import LabelRequest -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest - -from labels_api.api_client import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.rest import RESTResponseType +from labels.api_client import ApiClient, RequestSerialized +from labels.api_response import ApiResponse +from labels.rest import RESTResponseType class AgentApi: @@ -70,7 +61,7 @@ class AgentApi: ) -> CreateAgentLabel201Response: """Create a Label of type `agent` - Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. + Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. You must have sufficient permissions to create a new label. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. :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 @@ -109,13 +100,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -148,7 +138,7 @@ class AgentApi: ) -> ApiResponse[CreateAgentLabel201Response]: """Create a Label of type `agent` - Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. + Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. You must have sufficient permissions to create a new label. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. :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 @@ -187,13 +177,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -226,7 +215,7 @@ class AgentApi: ) -> RESTResponseType: """Create a Label of type `agent` - Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. + Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. You must have sufficient permissions to create a new label. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. :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 @@ -265,13 +254,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -288,19 +276,18 @@ class AgentApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -418,7 +405,13 @@ class AgentApi: ) _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, @@ -488,7 +481,13 @@ class AgentApi: ) _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, @@ -558,7 +557,13 @@ class AgentApi: ) _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, @@ -575,19 +580,18 @@ class AgentApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -606,7 +610,6 @@ class AgentApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -693,13 +696,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -770,13 +772,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -847,13 +848,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -870,19 +870,18 @@ class AgentApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -930,6 +929,285 @@ class AgentApi: + @validate_call + def get_agent_labels( + 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, + ) -> GetLabels200Response: + """Get list of Labels of type `agent` + + Returns a list of all Agent labels (formerly called groups) configured in ThousandEyes. + + :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_agent_labels_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': "GetLabels200Response", + '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, + ).data + + + @validate_call + def get_agent_labels_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[GetLabels200Response]: + """Get list of Labels of type `agent` + + Returns a list of all Agent labels (formerly called groups) configured in ThousandEyes. + + :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_agent_labels_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': "GetLabels200Response", + '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, + ) + + + @validate_call + def get_agent_labels_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: + """Get list of Labels of type `agent` + + Returns a list of all Agent labels (formerly called groups) configured in ThousandEyes. + + :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_agent_labels_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': "GetLabels200Response", + '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_agent_labels_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/labels/agent', + 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_agent_label( self, @@ -992,13 +1270,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1073,13 +1350,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1154,13 +1430,12 @@ class AgentApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1178,19 +1453,18 @@ class AgentApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/labels_api/labels_api/api/all_labels_api.py b/labels/labels/api/all_labels_api.py similarity index 94% rename from labels_api/labels_api/api/all_labels_api.py rename to labels/labels/api/all_labels_api.py index 4f2edd8d..857e4f08 100644 --- a/labels_api/labels_api/api/all_labels_api.py +++ b/labels/labels/api/all_labels_api.py @@ -5,35 +5,25 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from labels.models.get_labels200_response import GetLabels200Response -from labels_api.models.get_labels200_response import GetLabels200Response - -from labels_api.api_client import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.rest import RESTResponseType +from labels.api_client import ApiClient, RequestSerialized +from labels.api_response import ApiResponse +from labels.rest import RESTResponseType class AllLabelsApi: @@ -104,13 +94,12 @@ class AllLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetLabels200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -178,13 +167,12 @@ class AllLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetLabels200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -252,13 +240,12 @@ class AllLabelsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetLabels200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -274,19 +261,18 @@ class AllLabelsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/labels_api/labels_api/api/dashboard_api.py b/labels/labels/api/dashboard_api.py similarity index 78% rename from labels_api/labels_api/api/dashboard_api.py rename to labels/labels/api/dashboard_api.py index 6fcc3919..39b89279 100644 --- a/labels_api/labels_api/api/dashboard_api.py +++ b/labels/labels/api/dashboard_api.py @@ -5,36 +5,27 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.get_labels200_response import GetLabels200Response +from labels.models.label_request import LabelRequest -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest - -from labels_api.api_client import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.rest import RESTResponseType +from labels.api_client import ApiClient, RequestSerialized +from labels.api_response import ApiResponse +from labels.rest import RESTResponseType class DashboardApi: @@ -109,13 +100,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,13 +177,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -265,13 +254,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -288,19 +276,18 @@ class DashboardApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -418,7 +405,13 @@ class DashboardApi: ) _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, @@ -488,7 +481,13 @@ class DashboardApi: ) _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, @@ -558,7 +557,13 @@ class DashboardApi: ) _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, @@ -575,19 +580,18 @@ class DashboardApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -606,7 +610,6 @@ class DashboardApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -693,13 +696,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -770,13 +772,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -847,13 +848,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -870,19 +870,18 @@ class DashboardApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -930,6 +929,285 @@ class DashboardApi: + @validate_call + def get_dashboard_labels( + 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, + ) -> GetLabels200Response: + """Get list of Labels of type `dashboard` + + Returns a list of all Dashboard labels (formerly called groups) configured in ThousandEyes. + + :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_labels_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': "GetLabels200Response", + '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, + ).data + + + @validate_call + def get_dashboard_labels_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[GetLabels200Response]: + """Get list of Labels of type `dashboard` + + Returns a list of all Dashboard labels (formerly called groups) configured in ThousandEyes. + + :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_labels_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': "GetLabels200Response", + '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, + ) + + + @validate_call + def get_dashboard_labels_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: + """Get list of Labels of type `dashboard` + + Returns a list of all Dashboard labels (formerly called groups) configured in ThousandEyes. + + :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_labels_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': "GetLabels200Response", + '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_labels_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/labels/dashboard', + 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_label( self, @@ -992,13 +1270,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1073,13 +1350,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1154,13 +1430,12 @@ class DashboardApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1178,19 +1453,18 @@ class DashboardApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/labels_api/labels_api/api/endpoint_test_api.py b/labels/labels/api/endpoint_test_api.py similarity index 78% rename from labels_api/labels_api/api/endpoint_test_api.py rename to labels/labels/api/endpoint_test_api.py index f0453df9..51def747 100644 --- a/labels_api/labels_api/api/endpoint_test_api.py +++ b/labels/labels/api/endpoint_test_api.py @@ -5,36 +5,27 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.get_labels200_response import GetLabels200Response +from labels.models.label_request import LabelRequest -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest - -from labels_api.api_client import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.rest import RESTResponseType +from labels.api_client import ApiClient, RequestSerialized +from labels.api_response import ApiResponse +from labels.rest import RESTResponseType class EndpointTestApi: @@ -109,13 +100,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,13 +177,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -265,13 +254,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -288,19 +276,18 @@ class EndpointTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -418,7 +405,13 @@ class EndpointTestApi: ) _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, @@ -488,7 +481,13 @@ class EndpointTestApi: ) _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, @@ -558,7 +557,13 @@ class EndpointTestApi: ) _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, @@ -575,19 +580,18 @@ class EndpointTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -606,7 +610,6 @@ class EndpointTestApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -693,13 +696,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -770,13 +772,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -847,13 +848,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -870,19 +870,18 @@ class EndpointTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -930,6 +929,285 @@ class EndpointTestApi: + @validate_call + def get_endpoint_test_labels( + 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, + ) -> GetLabels200Response: + """Get list of Labels of type `endpoint-test` + + Returns a list of all Endpoint Test labels (formerly called groups) configured in ThousandEyes. + + :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_test_labels_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': "GetLabels200Response", + '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, + ).data + + + @validate_call + def get_endpoint_test_labels_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[GetLabels200Response]: + """Get list of Labels of type `endpoint-test` + + Returns a list of all Endpoint Test labels (formerly called groups) configured in ThousandEyes. + + :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_test_labels_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': "GetLabels200Response", + '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, + ) + + + @validate_call + def get_endpoint_test_labels_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: + """Get list of Labels of type `endpoint-test` + + Returns a list of all Endpoint Test labels (formerly called groups) configured in ThousandEyes. + + :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_test_labels_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': "GetLabels200Response", + '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_endpoint_test_labels_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/labels/endpoint-test', + 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_test_label( self, @@ -992,13 +1270,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1073,13 +1350,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1154,13 +1430,12 @@ class EndpointTestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1178,19 +1453,18 @@ class EndpointTestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/labels_api/labels_api/api/test_api.py b/labels/labels/api/test_api.py similarity index 78% rename from labels_api/labels_api/api/test_api.py rename to labels/labels/api/test_api.py index eefc2cc1..3894533b 100644 --- a/labels_api/labels_api/api/test_api.py +++ b/labels/labels/api/test_api.py @@ -5,36 +5,27 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.get_labels200_response import GetLabels200Response +from labels.models.label_request import LabelRequest -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest - -from labels_api.api_client import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.rest import RESTResponseType +from labels.api_client import ApiClient, RequestSerialized +from labels.api_response import ApiResponse +from labels.rest import RESTResponseType class TestApi: @@ -109,13 +100,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,13 +177,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -265,13 +254,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '201': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -288,19 +276,18 @@ class TestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -418,7 +405,13 @@ class TestApi: ) _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, @@ -488,7 +481,13 @@ class TestApi: ) _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, @@ -558,7 +557,13 @@ class TestApi: ) _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, @@ -575,19 +580,18 @@ class TestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -606,7 +610,6 @@ class TestApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -693,13 +696,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -770,13 +772,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -847,13 +848,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -870,19 +870,18 @@ class TestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -930,6 +929,285 @@ class TestApi: + @validate_call + def get_test_labels( + 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, + ) -> GetLabels200Response: + """Get list of Labels of type `test` + + Returns a list of all Test labels (formerly called groups) configured in ThousandEyes. + + :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_labels_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': "GetLabels200Response", + '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, + ).data + + + @validate_call + def get_test_labels_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[GetLabels200Response]: + """Get list of Labels of type `test` + + Returns a list of all Test labels (formerly called groups) configured in ThousandEyes. + + :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_labels_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': "GetLabels200Response", + '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, + ) + + + @validate_call + def get_test_labels_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: + """Get list of Labels of type `test` + + Returns a list of all Test labels (formerly called groups) configured in ThousandEyes. + + :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_labels_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': "GetLabels200Response", + '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_test_labels_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/labels/test', + 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_test_label( self, @@ -992,13 +1270,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1073,13 +1350,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1154,13 +1430,12 @@ class TestApi: _response_types_map: Dict[str, Optional[str]] = { '200': "CreateAgentLabel201Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1178,19 +1453,18 @@ class TestApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/labels/labels/api_client.py b/labels/labels/api_client.py new file mode 100644 index 00000000..2f4c4fe8 --- /dev/null +++ b/labels/labels/api_client.py @@ -0,0 +1,770 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from labels.configuration import Configuration +from labels.api_response import ApiResponse, T as ApiResponseT +import labels.models +from labels import rest +from labels.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(labels.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/labels/labels/api_response.py b/labels/labels/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/labels/labels/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/labels/labels/configuration.py b/labels/labels/configuration.py new file mode 100644 index 00000000..2c1b6379 --- /dev/null +++ b/labels/labels/configuration.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("labels") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/labels/labels/exceptions.py b/labels/labels/exceptions.py new file mode 100644 index 00000000..c7b7ee4f --- /dev/null +++ b/labels/labels/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/labels/labels/models/__init__.py b/labels/labels/models/__init__.py new file mode 100644 index 00000000..e3c146cf --- /dev/null +++ b/labels/labels/models/__init__.py @@ -0,0 +1,30 @@ +# coding: utf-8 + +# flake8: noqa +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from labels.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.error import Error +from labels.models.get_labels200_response import GetLabels200Response +from labels.models.label import Label +from labels.models.label_detail import LabelDetail +from labels.models.label_request import LabelRequest +from labels.models.label_type import LabelType +from labels.models.labels import Labels +from labels.models.link import Link +from labels.models.self_links import SelfLinks +from labels.models.self_links_links import SelfLinksLinks +from labels.models.unauthorized_error import UnauthorizedError +from labels.models.validation_error import ValidationError +from labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/labels_api/labels_api/models/create_agent_label201_response.py b/labels/labels/models/create_agent_label201_response.py similarity index 80% rename from labels_api/labels_api/models/create_agent_label201_response.py rename to labels/labels/models/create_agent_label201_response.py index f1c9eed2..56b1ec83 100644 --- a/labels_api/labels_api/models/create_agent_label201_response.py +++ b/labels/labels/models/create_agent_label201_response.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,16 +17,12 @@ 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 pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from labels_api.models.label_type import LabelType -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from labels.models.label_type import LabelType +from labels.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self class CreateAgentLabel201Response(BaseModel): """ @@ -40,10 +36,11 @@ class CreateAgentLabel201Response(BaseModel): links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["labelId", "isBuiltIn", "name", "type", "ids", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ class CreateAgentLabel201Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateAgentLabel201Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ class CreateAgentLabel201Response(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -82,7 +81,7 @@ class CreateAgentLabel201Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateAgentLabel201Response from a dict""" if obj is None: return None @@ -96,7 +95,7 @@ class CreateAgentLabel201Response(BaseModel): "name": obj.get("name"), "type": obj.get("type"), "ids": obj.get("ids"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/labels/labels/models/error.py b/labels/labels/models/error.py new file mode 100644 index 00000000..4ddb0a14 --- /dev/null +++ b/labels/labels/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/labels/labels/models/get_labels200_response.py b/labels/labels/models/get_labels200_response.py new file mode 100644 index 00000000..d8d4b98f --- /dev/null +++ b/labels/labels/models/get_labels200_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 labels.models.label import Label +from labels.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetLabels200Response(BaseModel): + """ + GetLabels200Response + """ # noqa: E501 + labels: Optional[List[Label]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["labels", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetLabels200Response 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _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 GetLabels200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": [Label.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/labels/labels/models/label.py b/labels/labels/models/label.py new file mode 100644 index 00000000..2f28c2a8 --- /dev/null +++ b/labels/labels/models/label.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 labels.models.label_type import LabelType +from typing import Optional, Set +from typing_extensions import Self + +class Label(BaseModel): + """ + Label + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. ", alias="labelId") + is_built_in: Optional[StrictBool] = Field(default=None, description="`true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. ", alias="isBuiltIn") + name: Optional[StrictStr] = Field(default=None, description="The name of the new label - this must be unique.") + type: Optional[LabelType] = None + __properties: ClassVar[List[str]] = ["labelId", "isBuiltIn", "name", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Label 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 Label from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "isBuiltIn": obj.get("isBuiltIn"), + "name": obj.get("name"), + "type": obj.get("type") + }) + return _obj + + diff --git a/labels_api/labels_api/models/label_detail.py b/labels/labels/models/label_detail.py similarity index 82% rename from labels_api/labels_api/models/label_detail.py rename to labels/labels/models/label_detail.py index 671d80c9..e4c97c58 100644 --- a/labels_api/labels_api/models/label_detail.py +++ b/labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ 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 pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from labels_api.models.label_type import LabelType -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from labels.models.label_type import LabelType +from typing import Optional, Set +from typing_extensions import Self class LabelDetail(BaseModel): """ @@ -38,10 +34,11 @@ class LabelDetail(BaseModel): ids: Optional[List[StrictStr]] = Field(default=None, description="Array of agent/test/dashboard IDs the label is assigned to, depending on the type of label.") __properties: ClassVar[List[str]] = ["labelId", "isBuiltIn", "name", "type", "ids"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ class LabelDetail(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LabelDetail from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,16 +65,18 @@ class LabelDetail(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LabelDetail from a dict""" if obj is None: return None diff --git a/labels_api/labels_api/models/label_request.py b/labels/labels/models/label_request.py similarity index 80% rename from labels_api/labels_api/models/label_request.py rename to labels/labels/models/label_request.py index 90ce721d..67280851 100644 --- a/labels_api/labels_api/models/label_request.py +++ b/labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class LabelRequest(BaseModel): """ @@ -34,10 +30,11 @@ class LabelRequest(BaseModel): ids: Optional[List[StrictStr]] = Field(default=None, description="Array of agent/test/dashboard ids the label should be assigned to, depending on the type of label") __properties: ClassVar[List[str]] = ["name", "ids"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class LabelRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LabelRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class LabelRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LabelRequest from a dict""" if obj is None: return None diff --git a/labels_api/labels_api/models/label_type.py b/labels/labels/models/label_type.py similarity index 82% rename from labels_api/labels_api/models/label_type.py rename to labels/labels/models/label_type.py index ed64c37f..5684553c 100644 --- a/labels_api/labels_api/models/label_type.py +++ b/labels/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class LabelType(str, Enum): diff --git a/labels/labels/models/labels.py b/labels/labels/models/labels.py new file mode 100644 index 00000000..88a0d404 --- /dev/null +++ b/labels/labels/models/labels.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from labels.models.label import Label +from typing import Optional, Set +from typing_extensions import Self + +class Labels(BaseModel): + """ + Labels + """ # noqa: E501 + labels: Optional[List[Label]] = None + __properties: ClassVar[List[str]] = ["labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Labels 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Labels from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": [Label.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None + }) + return _obj + + diff --git a/labels/labels/models/link.py b/labels/labels/models/link.py new file mode 100644 index 00000000..781a6f71 --- /dev/null +++ b/labels/labels/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/labels/labels/models/self_links.py b/labels/labels/models/self_links.py new file mode 100644 index 00000000..a7dbecf7 --- /dev/null +++ b/labels/labels/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 labels.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/labels/labels/models/self_links_links.py b/labels/labels/models/self_links_links.py new file mode 100644 index 00000000..2504e543 --- /dev/null +++ b/labels/labels/models/self_links_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 labels.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/labels/labels/models/unauthorized_error.py b/labels/labels/models/unauthorized_error.py new file mode 100644 index 00000000..753a537a --- /dev/null +++ b/labels/labels/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/labels/labels/models/validation_error.py b/labels/labels/models/validation_error.py new file mode 100644 index 00000000..a7c9e579 --- /dev/null +++ b/labels/labels/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/labels/labels/models/validation_error_all_of_errors.py b/labels/labels/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..a4d281f0 --- /dev/null +++ b/labels/labels/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/labels_api/labels_api/py.typed b/labels/labels/py.typed similarity index 100% rename from labels_api/labels_api/py.typed rename to labels/labels/py.typed diff --git a/labels/labels/rest.py b/labels/labels/rest.py new file mode 100644 index 00000000..44fe0094 --- /dev/null +++ b/labels/labels/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from labels.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/labels/pyproject.toml b/labels/pyproject.toml new file mode 100644 index 00000000..cf0ba437 --- /dev/null +++ b/labels/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "labels" +version = "1.0.0" +description = "Labels API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Labels API"] +include = ["labels/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "labels", + #"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/labels_api/requirements.txt b/labels/requirements.txt similarity index 100% rename from labels_api/requirements.txt rename to labels/requirements.txt diff --git a/labels_api/setup.cfg b/labels/setup.cfg similarity index 100% rename from labels_api/setup.cfg rename to labels/setup.cfg diff --git a/labels/setup.py b/labels/setup.py new file mode 100644 index 00000000..8c777556 --- /dev/null +++ b/labels/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "labels" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Labels API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/labels", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Labels API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + ### Overview This is API for the Labels API (formerly called groups). + """, # noqa: E501 + package_data={"labels": ["py.typed"]}, +) diff --git a/labels/test-requirements.txt b/labels/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/labels/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/labels_api/test/__init__.py b/labels/test/__init__.py similarity index 100% rename from labels_api/test/__init__.py rename to labels/test/__init__.py diff --git a/labels_api/test/test_create_agent_label201_response.py b/labels/test/test_create_agent_label201_response.py similarity index 87% rename from labels_api/test/test_create_agent_label201_response.py rename to labels/test/test_create_agent_label201_response.py index 19ff263b..48509819 100644 --- a/labels_api/test/test_create_agent_label201_response.py +++ b/labels/test/test_create_agent_label201_response.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response +from labels.models.create_agent_label201_response import CreateAgentLabel201Response class TestCreateAgentLabel201Response(unittest.TestCase): """CreateAgentLabel201Response unit test stubs""" @@ -41,8 +40,8 @@ class TestCreateAgentLabel201Response(unittest.TestCase): name = 'Label XYZ', type = 'endpoint-test', ids = [231286, 6317a3ca0d2bfc6ab882d6ce, 6317a3ca0d2bfc6ab882d6ca], - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( + links = labels.models.self_links__links.SelfLinks__links( + self = labels.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/labels/test/test_error.py b/labels/test/test_error.py new file mode 100644 index 00000000..c81955b0 --- /dev/null +++ b/labels/test/test_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels_api/test/test_get_labels200_response.py b/labels/test/test_get_labels200_response.py similarity index 85% rename from labels_api/test/test_get_labels200_response.py rename to labels/test/test_get_labels200_response.py index a546a6ab..8c49c97f 100644 --- a/labels_api/test/test_get_labels200_response.py +++ b/labels/test/test_get_labels200_response.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.get_labels200_response import GetLabels200Response +from labels.models.get_labels200_response import GetLabels200Response class TestGetLabels200Response(unittest.TestCase): """GetLabels200Response unit test stubs""" @@ -37,14 +36,14 @@ class TestGetLabels200Response(unittest.TestCase): if include_optional: return GetLabels200Response( labels = [ - labels_api.models.label.Label( + labels.models.label.Label( label_id = '961123', is_built_in = True, name = 'Label XYZ', type = 'endpoint-test', ) ], - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( + links = labels.models.self_links__links.SelfLinks__links( + self = labels.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/labels/test/test_label.py b/labels/test/test_label.py new file mode 100644 index 00000000..064c9b58 --- /dev/null +++ b/labels/test/test_label.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.label import Label + +class TestLabel(unittest.TestCase): + """Label unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Label: + """Test Label + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Label` + """ + model = Label() + if include_optional: + return Label( + label_id = '961123', + is_built_in = True, + name = 'Label XYZ', + type = 'endpoint-test' + ) + else: + return Label( + ) + """ + + def testLabel(self): + """Test Label""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels_api/test/test_label_detail.py b/labels/test/test_label_detail.py similarity index 92% rename from labels_api/test/test_label_detail.py rename to labels/test/test_label_detail.py index adbe27f2..2a34dcd1 100644 --- a/labels_api/test/test_label_detail.py +++ b/labels/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.label_detail import LabelDetail +from labels.models.label_detail import LabelDetail class TestLabelDetail(unittest.TestCase): """LabelDetail unit test stubs""" diff --git a/labels_api/test/test_label_request.py b/labels/test/test_label_request.py similarity index 91% rename from labels_api/test/test_label_request.py rename to labels/test/test_label_request.py index 254b2171..1bc3ddd4 100644 --- a/labels_api/test/test_label_request.py +++ b/labels/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.label_request import LabelRequest +from labels.models.label_request import LabelRequest class TestLabelRequest(unittest.TestCase): """LabelRequest unit test stubs""" diff --git a/labels_api/test/test_label_type.py b/labels/test/test_label_type.py similarity index 82% rename from labels_api/test/test_label_type.py rename to labels/test/test_label_type.py index ae35df07..c8c8d116 100644 --- a/labels_api/test/test_label_type.py +++ b/labels/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from labels_api.models.label_type import LabelType +from labels.models.label_type import LabelType class TestLabelType(unittest.TestCase): """LabelType unit test stubs""" diff --git a/labels/test/test_labels.py b/labels/test/test_labels.py new file mode 100644 index 00000000..1317329c --- /dev/null +++ b/labels/test/test_labels.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.labels import Labels + +class TestLabels(unittest.TestCase): + """Labels unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Labels: + """Test Labels + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Labels` + """ + model = Labels() + if include_optional: + return Labels( + labels = [ + labels.models.label.Label( + label_id = '961123', + is_built_in = True, + name = 'Label XYZ', + type = 'endpoint-test', ) + ] + ) + else: + return Labels( + ) + """ + + def testLabels(self): + """Test Labels""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels/test/test_link.py b/labels/test/test_link.py new file mode 100644 index 00000000..77790952 --- /dev/null +++ b/labels/test/test_link.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels/test/test_self_links.py b/labels/test/test_self_links.py new file mode 100644 index 00000000..2f5469f2 --- /dev/null +++ b/labels/test/test_self_links.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = labels.models.self_links__links.SelfLinks__links( + self = labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels/test/test_self_links_links.py b/labels/test/test_self_links_links.py new file mode 100644 index 00000000..5dd4e94c --- /dev/null +++ b/labels/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = labels.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels/test/test_unauthorized_error.py b/labels/test/test_unauthorized_error.py new file mode 100644 index 00000000..87df1919 --- /dev/null +++ b/labels/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels/test/test_validation_error.py b/labels/test/test_validation_error.py new file mode 100644 index 00000000..8d9bba58 --- /dev/null +++ b/labels/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + labels.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels/test/test_validation_error_all_of_errors.py b/labels/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..3f1af530 --- /dev/null +++ b/labels/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from labels.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/labels_api/.github/workflows/python.yml b/labels_api/.github/workflows/python.yml deleted file mode 100644 index 20120cac..00000000 --- a/labels_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: labels_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/labels_api/.gitlab-ci.yml b/labels_api/.gitlab-ci.yml deleted file mode 100644 index bd6c155d..00000000 --- a/labels_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=labels_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/labels_api/.openapi-generator/FILES b/labels_api/.openapi-generator/FILES deleted file mode 100644 index c6f78686..00000000 --- a/labels_api/.openapi-generator/FILES +++ /dev/null @@ -1,74 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AgentApi.md -docs/AllLabelsApi.md -docs/CreateAgentLabel201Response.md -docs/DashboardApi.md -docs/EndpointTestApi.md -docs/Error.md -docs/GetLabels200Response.md -docs/Label.md -docs/LabelDetail.md -docs/LabelRequest.md -docs/LabelType.md -docs/Labels.md -docs/Link.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/TestApi.md -docs/UnauthorizedError.md -git_push.sh -labels_api/__init__.py -labels_api/api/__init__.py -labels_api/api/agent_api.py -labels_api/api/all_labels_api.py -labels_api/api/dashboard_api.py -labels_api/api/endpoint_test_api.py -labels_api/api/test_api.py -labels_api/api_client.py -labels_api/api_response.py -labels_api/configuration.py -labels_api/exceptions.py -labels_api/models/__init__.py -labels_api/models/create_agent_label201_response.py -labels_api/models/error.py -labels_api/models/get_labels200_response.py -labels_api/models/label.py -labels_api/models/label_detail.py -labels_api/models/label_request.py -labels_api/models/label_type.py -labels_api/models/labels.py -labels_api/models/link.py -labels_api/models/self_links.py -labels_api/models/self_links_links.py -labels_api/models/unauthorized_error.py -labels_api/py.typed -labels_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_agent_api.py -test/test_all_labels_api.py -test/test_create_agent_label201_response.py -test/test_dashboard_api.py -test/test_endpoint_test_api.py -test/test_error.py -test/test_get_labels200_response.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_self_links_links.py -test/test_test_api.py -test/test_unauthorized_error.py -tox.ini diff --git a/labels_api/.openapi-generator/VERSION b/labels_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/labels_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/labels_api/.travis.yml b/labels_api/.travis.yml deleted file mode 100644 index d7ebb0c5..00000000 --- a/labels_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=labels_api diff --git a/labels_api/README.md b/labels_api/README.md deleted file mode 100644 index 98d47baf..00000000 --- a/labels_api/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# labels-api -### Overview -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.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import labels_api -``` - -### 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 labels_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.AgentApi(api_client) - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | Label resource (optional) - - try: - # Create a Label of type `agent` - api_response = api_instance.create_agent_label(aid=aid, label_request=label_request) - print("The response of AgentApi->create_agent_label:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling AgentApi->create_agent_label: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AgentApi* | [**create_agent_label**](docs/AgentApi.md#create_agent_label) | **POST** /v7/labels/agent | Create a Label of type `agent` -*AgentApi* | [**delete_agent_label**](docs/AgentApi.md#delete_agent_label) | **DELETE** /v7/labels/agent/{labelId} | Delete a Label object of type `agent` -*AgentApi* | [**get_agent_label**](docs/AgentApi.md#get_agent_label) | **GET** /v7/labels/agent/{labelId} | Get a Label object of type `agent` -*AgentApi* | [**update_agent_label**](docs/AgentApi.md#update_agent_label) | **PUT** /v7/labels/agent/{labelId} | Update a Label object of type `agent` -*AllLabelsApi* | [**get_labels**](docs/AllLabelsApi.md#get_labels) | **GET** /v7/labels | Get list of Labels -*DashboardApi* | [**create_dashboard_label**](docs/DashboardApi.md#create_dashboard_label) | **POST** /v7/labels/dashboard | Create a Label of type `dashboard` -*DashboardApi* | [**delete_dashboard_label**](docs/DashboardApi.md#delete_dashboard_label) | **DELETE** /v7/labels/dashboard/{labelId} | Delete a Label object of type `dashboard` -*DashboardApi* | [**get_dashboard_label**](docs/DashboardApi.md#get_dashboard_label) | **GET** /v7/labels/dashboard/{labelId} | Get a Label object 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* | [**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* | [**update_endpoint_test_label**](docs/EndpointTestApi.md#update_endpoint_test_label) | **PUT** /v7/labels/endpoint-test/{labelId} | Update a Label object of type `endpoint-test` -*TestApi* | [**create_test_label**](docs/TestApi.md#create_test_label) | **POST** /v7/labels/test | Create a Label of type `test` -*TestApi* | [**delete_test_label**](docs/TestApi.md#delete_test_label) | **DELETE** /v7/labels/test/{labelId} | Delete a Label object of type `test` -*TestApi* | [**get_test_label**](docs/TestApi.md#get_test_label) | **GET** /v7/labels/test/{labelId} | Get a Label object of type `test` -*TestApi* | [**update_test_label**](docs/TestApi.md#update_test_label) | **PUT** /v7/labels/test/{labelId} | Update a Label object of type `test` - - -## Documentation For Models - - - [CreateAgentLabel201Response](docs/CreateAgentLabel201Response.md) - - [Error](docs/Error.md) - - [GetLabels200Response](docs/GetLabels200Response.md) - - [Label](docs/Label.md) - - [LabelDetail](docs/LabelDetail.md) - - [LabelRequest](docs/LabelRequest.md) - - [LabelType](docs/LabelType.md) - - [Labels](docs/Labels.md) - - [Link](docs/Link.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/labels_api/docs/AgentApi.md b/labels_api/docs/AgentApi.md deleted file mode 100644 index 1f7186eb..00000000 --- a/labels_api/docs/AgentApi.md +++ /dev/null @@ -1,347 +0,0 @@ -# labels_api.AgentApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_agent_label**](AgentApi.md#create_agent_label) | **POST** /v7/labels/agent | Create a Label of type `agent` -[**delete_agent_label**](AgentApi.md#delete_agent_label) | **DELETE** /v7/labels/agent/{labelId} | Delete a Label object of type `agent` -[**get_agent_label**](AgentApi.md#get_agent_label) | **GET** /v7/labels/agent/{labelId} | Get a Label object of type `agent` -[**update_agent_label**](AgentApi.md#update_agent_label) | **PUT** /v7/labels/agent/{labelId} | Update a Label object of type `agent` - - -# **create_agent_label** -> CreateAgentLabel201Response create_agent_label(aid=aid, label_request=label_request) - -Create a Label of type `agent` - -Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.AgentApi(api_client) - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | Label resource (optional) - - try: - # Create a Label of type `agent` - api_response = api_instance.create_agent_label(aid=aid, label_request=label_request) - print("The response of AgentApi->create_agent_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentApi->create_agent_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 resource | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | -**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_agent_label** -> delete_agent_label(label_id, aid=aid) - -Delete a Label object of type `agent` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.AgentApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `agent` - api_instance.delete_agent_label(label_id, aid=aid) - except Exception as e: - print("Exception when calling AgentApi->delete_agent_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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_agent_label** -> CreateAgentLabel201Response get_agent_label(label_id, aid=aid) - -Get a Label object of type `agent` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.AgentApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `agent` - api_response = api_instance.get_agent_label(label_id, aid=aid) - print("The response of AgentApi->get_agent_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentApi->get_agent_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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 - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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) - -# **update_agent_label** -> CreateAgentLabel201Response update_agent_label(label_id, aid=aid, label_request=label_request) - -Update a Label object of type `agent` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.AgentApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | (optional) - - try: - # Update a Label object of type `agent` - api_response = api_instance.update_agent_label(label_id, aid=aid, label_request=label_request) - print("The response of AgentApi->update_agent_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentApi->update_agent_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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)| | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | - -[[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/labels_api/docs/DashboardApi.md b/labels_api/docs/DashboardApi.md deleted file mode 100644 index 24420f5d..00000000 --- a/labels_api/docs/DashboardApi.md +++ /dev/null @@ -1,347 +0,0 @@ -# labels_api.DashboardApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_dashboard_label**](DashboardApi.md#create_dashboard_label) | **POST** /v7/labels/dashboard | Create a Label of type `dashboard` -[**delete_dashboard_label**](DashboardApi.md#delete_dashboard_label) | **DELETE** /v7/labels/dashboard/{labelId} | Delete a Label object of type `dashboard` -[**get_dashboard_label**](DashboardApi.md#get_dashboard_label) | **GET** /v7/labels/dashboard/{labelId} | Get a Label object of type `dashboard` -[**update_dashboard_label**](DashboardApi.md#update_dashboard_label) | **PUT** /v7/labels/dashboard/{labelId} | Update a Label object of type `dashboard` - - -# **create_dashboard_label** -> CreateAgentLabel201Response create_dashboard_label(aid=aid, label_request=label_request) - -Create a Label of type `dashboard` - -Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning agents or tests, the user needs permission to modify the objects being added. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.DashboardApi(api_client) - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | Label resource (optional) - - try: - # Create a Label of type `dashboard` - api_response = api_instance.create_dashboard_label(aid=aid, label_request=label_request) - print("The response of DashboardApi->create_dashboard_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DashboardApi->create_dashboard_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 resource | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | -**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_label** -> delete_dashboard_label(label_id, aid=aid) - -Delete a Label object of type `dashboard` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.DashboardApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `dashboard` - api_instance.delete_dashboard_label(label_id, aid=aid) - except Exception as e: - print("Exception when calling DashboardApi->delete_dashboard_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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_dashboard_label** -> CreateAgentLabel201Response get_dashboard_label(label_id, aid=aid) - -Get a Label object of type `dashboard` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.DashboardApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `dashboard` - api_response = api_instance.get_dashboard_label(label_id, aid=aid) - print("The response of DashboardApi->get_dashboard_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DashboardApi->get_dashboard_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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 - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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) - -# **update_dashboard_label** -> CreateAgentLabel201Response update_dashboard_label(label_id, aid=aid, label_request=label_request) - -Update a Label object of type `dashboard` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.DashboardApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | (optional) - - try: - # Update a Label object of type `dashboard` - api_response = api_instance.update_dashboard_label(label_id, aid=aid, label_request=label_request) - print("The response of DashboardApi->update_dashboard_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DashboardApi->update_dashboard_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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)| | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | - -[[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/labels_api/docs/EndpointTestApi.md b/labels_api/docs/EndpointTestApi.md deleted file mode 100644 index 18a4bdca..00000000 --- a/labels_api/docs/EndpointTestApi.md +++ /dev/null @@ -1,347 +0,0 @@ -# labels_api.EndpointTestApi - -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` -[**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` -[**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** -> CreateAgentLabel201Response create_endpoint_tests_label(aid=aid, label_request=label_request) - -Create a Label of type `endpoint-test` - -Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning agents or tests, the user needs permission to modify the objects being added. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.EndpointTestApi(api_client) - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | Label resource (optional) - - 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") - pprint(api_response) - except Exception as e: - print("Exception when calling EndpointTestApi->create_endpoint_tests_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 resource | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | -**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_endpoint_test_label** -> delete_endpoint_test_label(label_id, aid=aid) - -Delete a Label object of type `endpoint-test` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.EndpointTestApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `endpoint-test` - api_instance.delete_endpoint_test_label(label_id, aid=aid) - except Exception as e: - print("Exception when calling EndpointTestApi->delete_endpoint_test_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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_endpoint_test_label** -> CreateAgentLabel201Response get_endpoint_test_label(label_id, aid=aid) - -Get a Label object of type `endpoint-test` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.EndpointTestApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `endpoint-test` - api_response = api_instance.get_endpoint_test_label(label_id, aid=aid) - print("The response of EndpointTestApi->get_endpoint_test_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EndpointTestApi->get_endpoint_test_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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 - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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) - -# **update_endpoint_test_label** -> CreateAgentLabel201Response update_endpoint_test_label(label_id, aid=aid, label_request=label_request) - -Update a Label object of type `endpoint-test` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.EndpointTestApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | (optional) - - try: - # Update a Label object of type `endpoint-test` - api_response = api_instance.update_endpoint_test_label(label_id, aid=aid, label_request=label_request) - print("The response of EndpointTestApi->update_endpoint_test_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EndpointTestApi->update_endpoint_test_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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)| | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | - -[[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/labels_api/docs/Error.md b/labels_api/docs/Error.md deleted file mode 100644 index 64391133..00000000 --- a/labels_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 labels_api.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_form_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/labels_api/docs/Label.md b/labels_api/docs/Label.md deleted file mode 100644 index 841a1132..00000000 --- a/labels_api/docs/Label.md +++ /dev/null @@ -1,31 +0,0 @@ -# Label - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label_id** | **str** | Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. | [optional] -**is_built_in** | **bool** | `true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. | [optional] -**name** | **str** | The name of the new label - this must be unique. | [optional] -**type** | [**LabelType**](LabelType.md) | | [optional] - -## Example - -```python -from labels_api.models.label import Label - -# TODO update the JSON string below -json = "{}" -# create an instance of Label from a JSON string -label_instance = Label.from_json(json) -# print the JSON string representation of the object -print Label.to_json() - -# convert the object into a dict -label_dict = label_instance.to_dict() -# create an instance of Label from a dict -label_form_dict = label.from_dict(label_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/labels_api/docs/Labels.md b/labels_api/docs/Labels.md deleted file mode 100644 index 3c353ec4..00000000 --- a/labels_api/docs/Labels.md +++ /dev/null @@ -1,28 +0,0 @@ -# Labels - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**labels** | [**List[Label]**](Label.md) | | [optional] - -## Example - -```python -from labels_api.models.labels import Labels - -# TODO update the JSON string below -json = "{}" -# create an instance of Labels from a JSON string -labels_instance = Labels.from_json(json) -# print the JSON string representation of the object -print Labels.to_json() - -# convert the object into a dict -labels_dict = labels_instance.to_dict() -# create an instance of Labels from a dict -labels_form_dict = labels.from_dict(labels_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/labels_api/docs/Link.md b/labels_api/docs/Link.md deleted file mode 100644 index ab89c4f1..00000000 --- a/labels_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 labels_api.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_form_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/labels_api/docs/SelfLinks.md b/labels_api/docs/SelfLinks.md deleted file mode 100644 index bccde48b..00000000 --- a/labels_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from labels_api.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_form_dict = self_links.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/labels_api/docs/SelfLinksLinks.md b/labels_api/docs/SelfLinksLinks.md deleted file mode 100644 index 99a51f81..00000000 --- a/labels_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from labels_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/labels_api/docs/TestApi.md b/labels_api/docs/TestApi.md deleted file mode 100644 index b9f4c230..00000000 --- a/labels_api/docs/TestApi.md +++ /dev/null @@ -1,347 +0,0 @@ -# labels_api.TestApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_test_label**](TestApi.md#create_test_label) | **POST** /v7/labels/test | Create a Label of type `test` -[**delete_test_label**](TestApi.md#delete_test_label) | **DELETE** /v7/labels/test/{labelId} | Delete a Label object of type `test` -[**get_test_label**](TestApi.md#get_test_label) | **GET** /v7/labels/test/{labelId} | Get a Label object of type `test` -[**update_test_label**](TestApi.md#update_test_label) | **PUT** /v7/labels/test/{labelId} | Update a Label object of type `test` - - -# **create_test_label** -> CreateAgentLabel201Response create_test_label(aid=aid, label_request=label_request) - -Create a Label of type `test` - -Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.TestApi(api_client) - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | Label resource (optional) - - try: - # Create a Label of type `test` - api_response = api_instance.create_test_label(aid=aid, label_request=label_request) - print("The response of TestApi->create_test_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestApi->create_test_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 resource | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | -**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_test_label** -> delete_test_label(label_id, aid=aid) - -Delete a Label object of type `test` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.TestApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `test` - api_instance.delete_test_label(label_id, aid=aid) - except Exception as e: - print("Exception when calling TestApi->delete_test_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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_test_label** -> CreateAgentLabel201Response get_test_label(label_id, aid=aid) - -Get a Label object of type `test` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.TestApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 a Label object of type `test` - api_response = api_instance.get_test_label(label_id, aid=aid) - print("The response of TestApi->get_test_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestApi->get_test_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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 - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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) - -# **update_test_label** -> CreateAgentLabel201Response update_test_label(label_id, aid=aid, label_request=label_request) - -Update a Label object of type `test` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import labels_api -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.label_request import LabelRequest -from labels_api.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 = labels_api.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 = labels_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with labels_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = labels_api.TestApi(api_client) - label_id = '961' # str | ID of the label to get - aid = '2067' # 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 = labels_api.LabelRequest() # LabelRequest | (optional) - - try: - # Update a Label object of type `test` - api_response = api_instance.update_test_label(label_id, aid=aid, label_request=label_request) - print("The response of TestApi->update_test_label:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestApi->update_test_label: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **label_id** | **str**| ID of the label to get | - **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)| | [optional] - -### Return type - -[**CreateAgentLabel201Response**](CreateAgentLabel201Response.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 | - | - -[[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/labels_api/docs/UnauthorizedError.md b/labels_api/docs/UnauthorizedError.md deleted file mode 100644 index 77e1e6d9..00000000 --- a/labels_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from labels_api.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_form_dict = unauthorized_error.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/labels_api/git_push.sh b/labels_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/labels_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/labels_api/labels_api/__init__.py b/labels_api/labels_api/__init__.py deleted file mode 100644 index 5fe4802e..00000000 --- a/labels_api/labels_api/__init__.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 labels_api.api.agent_api import AgentApi -from labels_api.api.all_labels_api import AllLabelsApi -from labels_api.api.dashboard_api import DashboardApi -from labels_api.api.endpoint_test_api import EndpointTestApi -from labels_api.api.test_api import TestApi - -# import ApiClient -from labels_api.api_response import ApiResponse -from labels_api.api_client import ApiClient -from labels_api.configuration import Configuration -from labels_api.exceptions import OpenApiException -from labels_api.exceptions import ApiTypeError -from labels_api.exceptions import ApiValueError -from labels_api.exceptions import ApiKeyError -from labels_api.exceptions import ApiAttributeError -from labels_api.exceptions import ApiException - -# import models into sdk package -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.error import Error -from labels_api.models.get_labels200_response import GetLabels200Response -from labels_api.models.label import Label -from labels_api.models.label_detail import LabelDetail -from labels_api.models.label_request import LabelRequest -from labels_api.models.label_type import LabelType -from labels_api.models.labels import Labels -from labels_api.models.link import Link -from labels_api.models.self_links import SelfLinks -from labels_api.models.self_links_links import SelfLinksLinks -from labels_api.models.unauthorized_error import UnauthorizedError diff --git a/labels_api/labels_api/api/__init__.py b/labels_api/labels_api/api/__init__.py deleted file mode 100644 index d3cef85e..00000000 --- a/labels_api/labels_api/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# flake8: noqa - -# import apis into api package -from labels_api.api.agent_api import AgentApi -from labels_api.api.all_labels_api import AllLabelsApi -from labels_api.api.dashboard_api import DashboardApi -from labels_api.api.endpoint_test_api import EndpointTestApi -from labels_api.api.test_api import TestApi - diff --git a/labels_api/labels_api/api_client.py b/labels_api/labels_api/api_client.py deleted file mode 100644 index 0c94676f..00000000 --- a/labels_api/labels_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from labels_api.configuration import Configuration -from labels_api.api_response import ApiResponse -import labels_api.models -from labels_api import rest -from labels_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(labels_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/labels_api/labels_api/api_response.py b/labels_api/labels_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/labels_api/labels_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/labels_api/labels_api/configuration.py b/labels_api/labels_api/configuration.py deleted file mode 100644 index 0633e0e3..00000000 --- a/labels_api/labels_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("labels_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/labels_api/labels_api/exceptions.py b/labels_api/labels_api/exceptions.py deleted file mode 100644 index f6c65eda..00000000 --- a/labels_api/labels_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/labels_api/labels_api/models/__init__.py b/labels_api/labels_api/models/__init__.py deleted file mode 100644 index 961afece..00000000 --- a/labels_api/labels_api/models/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from labels_api.models.create_agent_label201_response import CreateAgentLabel201Response -from labels_api.models.error import Error -from labels_api.models.get_labels200_response import GetLabels200Response -from labels_api.models.label import Label -from labels_api.models.label_detail import LabelDetail -from labels_api.models.label_request import LabelRequest -from labels_api.models.label_type import LabelType -from labels_api.models.labels import Labels -from labels_api.models.link import Link -from labels_api.models.self_links import SelfLinks -from labels_api.models.self_links_links import SelfLinksLinks -from labels_api.models.unauthorized_error import UnauthorizedError diff --git a/labels_api/labels_api/models/error.py b/labels_api/labels_api/models/error.py deleted file mode 100644 index b352829b..00000000 --- a/labels_api/labels_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/labels_api/labels_api/models/get_labels200_response.py b/labels_api/labels_api/models/get_labels200_response.py deleted file mode 100644 index 66b9d1ee..00000000 --- a/labels_api/labels_api/models/get_labels200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.label import Label -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetLabels200Response(BaseModel): - """ - GetLabels200Response - """ # noqa: E501 - labels: Optional[List[Label]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["labels", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetLabels200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _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: Dict) -> Self: - """Create an instance of GetLabels200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labels": [Label.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/labels_api/labels_api/models/label.py b/labels_api/labels_api/models/label.py deleted file mode 100644 index bb3cd7b2..00000000 --- a/labels_api/labels_api/models/label.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from labels_api.models.label_type import LabelType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Label(BaseModel): - """ - Label - """ # noqa: E501 - label_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. ", alias="labelId") - is_built_in: Optional[StrictBool] = Field(default=None, description="`true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. ", alias="isBuiltIn") - name: Optional[StrictStr] = Field(default=None, description="The name of the new label - this must be unique.") - type: Optional[LabelType] = None - __properties: ClassVar[List[str]] = ["labelId", "isBuiltIn", "name", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Label 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Label from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labelId": obj.get("labelId"), - "isBuiltIn": obj.get("isBuiltIn"), - "name": obj.get("name"), - "type": obj.get("type") - }) - return _obj - - diff --git a/labels_api/labels_api/models/labels.py b/labels_api/labels_api/models/labels.py deleted file mode 100644 index 9c3ce818..00000000 --- a/labels_api/labels_api/models/labels.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from labels_api.models.label import Label -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Labels(BaseModel): - """ - Labels - """ # noqa: E501 - labels: Optional[List[Label]] = None - __properties: ClassVar[List[str]] = ["labels"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Labels 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Labels from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labels": [Label.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None - }) - return _obj - - diff --git a/labels_api/labels_api/models/link.py b/labels_api/labels_api/models/link.py deleted file mode 100644 index ac459527..00000000 --- a/labels_api/labels_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/labels_api/labels_api/models/self_links.py b/labels_api/labels_api/models/self_links.py deleted file mode 100644 index 12ade171..00000000 --- a/labels_api/labels_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/labels_api/labels_api/models/self_links_links.py b/labels_api/labels_api/models/self_links_links.py deleted file mode 100644 index f9a09cd6..00000000 --- a/labels_api/labels_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from labels_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/labels_api/labels_api/models/unauthorized_error.py b/labels_api/labels_api/models/unauthorized_error.py deleted file mode 100644 index 8a746b4d..00000000 --- a/labels_api/labels_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/labels_api/labels_api/rest.py b/labels_api/labels_api/rest.py deleted file mode 100644 index f76bc0cf..00000000 --- a/labels_api/labels_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from labels_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/labels_api/pyproject.toml b/labels_api/pyproject.toml deleted file mode 100644 index 89bb3207..00000000 --- a/labels_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "labels_api" -version = "1.0.0" -description = "Labels API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Labels API"] -include = ["labels_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/labels_api/setup.py b/labels_api/setup.py deleted file mode 100644 index 1a4465c9..00000000 --- a/labels_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "labels-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Labels API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Labels API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ### Overview This is API for the Labels API (formerly called groups). - """, # noqa: E501 - package_data={"labels_api": ["py.typed"]}, -) diff --git a/labels_api/test-requirements.txt b/labels_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/labels_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/labels_api/test/test_agent_api.py b/labels_api/test/test_agent_api.py deleted file mode 100644 index e7ee04e7..00000000 --- a/labels_api/test/test_agent_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from labels_api.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(self) -> None: - """Test case for create_agent_label - - Create a Label of type `agent` - """ - pass - - def test_delete_agent_label(self) -> None: - """Test case for delete_agent_label - - Delete a Label object of type `agent` - """ - pass - - def test_get_agent_label(self) -> None: - """Test case for get_agent_label - - Get a Label object of type `agent` - """ - pass - - def test_update_agent_label(self) -> None: - """Test case for update_agent_label - - Update a Label object of type `agent` - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_all_labels_api.py b/labels_api/test/test_all_labels_api.py deleted file mode 100644 index a684556c..00000000 --- a/labels_api/test/test_all_labels_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from labels_api.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(self) -> None: - """Test case for get_labels - - Get list of Labels - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_dashboard_api.py b/labels_api/test/test_dashboard_api.py deleted file mode 100644 index 4be521f8..00000000 --- a/labels_api/test/test_dashboard_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from labels_api.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(self) -> None: - """Test case for create_dashboard_label - - Create a Label of type `dashboard` - """ - pass - - def test_delete_dashboard_label(self) -> None: - """Test case for delete_dashboard_label - - Delete a Label object of type `dashboard` - """ - pass - - def test_get_dashboard_label(self) -> None: - """Test case for get_dashboard_label - - Get a Label object of type `dashboard` - """ - pass - - def test_update_dashboard_label(self) -> None: - """Test case for update_dashboard_label - - Update a Label object of type `dashboard` - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_endpoint_test_api.py b/labels_api/test/test_endpoint_test_api.py deleted file mode 100644 index 03de0939..00000000 --- a/labels_api/test/test_endpoint_test_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from labels_api.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_tests_label(self) -> None: - """Test case for create_endpoint_tests_label - - Create a Label of type `endpoint-test` - """ - pass - - def test_delete_endpoint_test_label(self) -> None: - """Test case for delete_endpoint_test_label - - Delete a Label object of type `endpoint-test` - """ - pass - - def test_get_endpoint_test_label(self) -> None: - """Test case for get_endpoint_test_label - - Get a Label object of type `endpoint-test` - """ - pass - - def test_update_endpoint_test_label(self) -> None: - """Test case for update_endpoint_test_label - - Update a Label object of type `endpoint-test` - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_error.py b/labels_api/test/test_error.py deleted file mode 100644 index d6483f97..00000000 --- a/labels_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_label.py b/labels_api/test/test_label.py deleted file mode 100644 index d3e50a8a..00000000 --- a/labels_api/test/test_label.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.label import Label - -class TestLabel(unittest.TestCase): - """Label unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Label: - """Test Label - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Label` - """ - model = Label() - if include_optional: - return Label( - label_id = '961123', - is_built_in = True, - name = 'Label XYZ', - type = 'endpoint-test' - ) - else: - return Label( - ) - """ - - def testLabel(self): - """Test Label""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_labels.py b/labels_api/test/test_labels.py deleted file mode 100644 index 501f802d..00000000 --- a/labels_api/test/test_labels.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.labels import Labels - -class TestLabels(unittest.TestCase): - """Labels unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Labels: - """Test Labels - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Labels` - """ - model = Labels() - if include_optional: - return Labels( - labels = [ - labels_api.models.label.Label( - label_id = '961123', - is_built_in = True, - name = 'Label XYZ', - type = 'endpoint-test', ) - ] - ) - else: - return Labels( - ) - """ - - def testLabels(self): - """Test Labels""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_link.py b/labels_api/test/test_link.py deleted file mode 100644 index 8740a9c9..00000000 --- a/labels_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_self_links.py b/labels_api/test/test_self_links.py deleted file mode 100644 index dce212ce..00000000 --- a/labels_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = labels_api.models.self_links__links.SelfLinks__links( - self = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_self_links_links.py b/labels_api/test/test_self_links_links.py deleted file mode 100644 index 9eb03130..00000000 --- a/labels_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = labels_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_test_api.py b/labels_api/test/test_test_api.py deleted file mode 100644 index ea11dae3..00000000 --- a/labels_api/test/test_test_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from labels_api.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(self) -> None: - """Test case for create_test_label - - Create a Label of type `test` - """ - pass - - def test_delete_test_label(self) -> None: - """Test case for delete_test_label - - Delete a Label object of type `test` - """ - pass - - def test_get_test_label(self) -> None: - """Test case for get_test_label - - Get a Label object of type `test` - """ - pass - - def test_update_test_label(self) -> None: - """Test case for update_test_label - - Update a Label object of type `test` - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/test/test_unauthorized_error.py b/labels_api/test/test_unauthorized_error.py deleted file mode 100644 index a1bae7e0..00000000 --- a/labels_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Labels API - - ### Overview This is API for the Labels API (formerly called groups). - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from labels_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/labels_api/tox.ini b/labels_api/tox.ini deleted file mode 100644 index 61ac7d6b..00000000 --- a/labels_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=labels_api diff --git a/monitors_api/.gitignore b/monitors/.gitignore similarity index 100% rename from monitors_api/.gitignore rename to monitors/.gitignore diff --git a/monitors_api/.openapi-generator-ignore b/monitors/.openapi-generator-ignore similarity index 100% rename from monitors_api/.openapi-generator-ignore rename to monitors/.openapi-generator-ignore diff --git a/monitors/.openapi-generator/FILES b/monitors/.openapi-generator/FILES new file mode 100644 index 00000000..c5cc5feb --- /dev/null +++ b/monitors/.openapi-generator/FILES @@ -0,0 +1,47 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/Error.md +docs/GetBGPMonitors200Response.md +docs/Link.md +docs/ListBGPMonitorsApi.md +docs/Monitor.md +docs/MonitorType.md +docs/Monitors.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/UnauthorizedError.md +monitors/__init__.py +monitors/api/__init__.py +monitors/api/list_bgp_monitors_api.py +monitors/api_client.py +monitors/api_response.py +monitors/configuration.py +monitors/exceptions.py +monitors/models/__init__.py +monitors/models/error.py +monitors/models/get_bgp_monitors200_response.py +monitors/models/link.py +monitors/models/monitor.py +monitors/models/monitor_type.py +monitors/models/monitors.py +monitors/models/self_links.py +monitors/models/self_links_links.py +monitors/models/unauthorized_error.py +monitors/py.typed +monitors/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_error.py +test/test_get_bgp_monitors200_response.py +test/test_link.py +test/test_monitor.py +test/test_monitor_type.py +test/test_monitors.py +test/test_self_links.py +test/test_self_links_links.py +test/test_unauthorized_error.py diff --git a/monitors/.openapi-generator/VERSION b/monitors/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/monitors/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/monitors/README.md b/monitors/README.md new file mode 100644 index 00000000..9324beb6 --- /dev/null +++ b/monitors/README.md @@ -0,0 +1,134 @@ +# 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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import 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 monitors +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import monitors +from 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 = monitors.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 = monitors.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with monitors.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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) + - [GetBGPMonitors200Response](docs/GetBGPMonitors200Response.md) + - [Link](docs/Link.md) + - [Monitor](docs/Monitor.md) + - [MonitorType](docs/MonitorType.md) + - [Monitors](docs/Monitors.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/monitors/docs/Error.md b/monitors/docs/Error.md new file mode 100644 index 00000000..368b8d6b --- /dev/null +++ b/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 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/monitors_api/docs/GetBGPMonitors200Response.md b/monitors/docs/GetBGPMonitors200Response.md similarity index 78% rename from monitors_api/docs/GetBGPMonitors200Response.md rename to monitors/docs/GetBGPMonitors200Response.md index 4ef0ddac..e313a6cf 100644 --- a/monitors_api/docs/GetBGPMonitors200Response.md +++ b/monitors/docs/GetBGPMonitors200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **monitors** | [**List[Monitor]**](Monitor.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from monitors_api.models.get_bgp_monitors200_response import GetBGPMonitors200Response +from monitors.models.get_bgp_monitors200_response import GetBGPMonitors200Response # TODO update the JSON string below json = "{}" # create an instance of GetBGPMonitors200Response from a JSON string get_bgp_monitors200_response_instance = GetBGPMonitors200Response.from_json(json) # print the JSON string representation of the object -print GetBGPMonitors200Response.to_json() +print(GetBGPMonitors200Response.to_json()) # convert the object into a dict get_bgp_monitors200_response_dict = get_bgp_monitors200_response_instance.to_dict() # create an instance of GetBGPMonitors200Response from a dict -get_bgp_monitors200_response_form_dict = get_bgp_monitors200_response.from_dict(get_bgp_monitors200_response_dict) +get_bgp_monitors200_response_from_dict = GetBGPMonitors200Response.from_dict(get_bgp_monitors200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/monitors/docs/Link.md b/monitors/docs/Link.md new file mode 100644 index 00000000..0ad52050 --- /dev/null +++ b/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 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/monitors_api/docs/ListBGPMonitorsApi.md b/monitors/docs/ListBGPMonitorsApi.md similarity index 86% rename from monitors_api/docs/ListBGPMonitorsApi.md rename to monitors/docs/ListBGPMonitorsApi.md index f9ff1c36..f4721e7e 100644 --- a/monitors_api/docs/ListBGPMonitorsApi.md +++ b/monitors/docs/ListBGPMonitorsApi.md @@ -1,4 +1,4 @@ -# monitors_api.ListBGPMonitorsApi +# monitors.ListBGPMonitorsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Retrieves a list of BGP monitors available to your account in ThousandEyes, incl ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import monitors_api -from monitors_api.models.get_bgp_monitors200_response import GetBGPMonitors200Response -from monitors_api.rest import ApiException +import monitors +from monitors.models.get_bgp_monitors200_response import GetBGPMonitors200Response +from 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 = monitors_api.Configuration( +configuration = monitors.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,15 +36,15 @@ configuration = monitors_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = monitors_api.Configuration( +configuration = monitors.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with monitors_api.ApiClient(configuration) as api_client: +with monitors.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = monitors_api.ListBGPMonitorsApi(api_client) - aid = '2067' # 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) + api_instance = 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 @@ -60,6 +59,7 @@ with monitors_api.ApiClient(configuration) as api_client: ### 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] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/monitors/docs/Monitor.md b/monitors/docs/Monitor.md new file mode 100644 index 00000000..1e909b12 --- /dev/null +++ b/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 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/monitors/docs/MonitorType.md b/monitors/docs/MonitorType.md new file mode 100644 index 00000000..5f7d589b --- /dev/null +++ b/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/monitors_api/docs/Monitors.md b/monitors/docs/Monitors.md similarity index 84% rename from monitors_api/docs/Monitors.md rename to monitors/docs/Monitors.md index 895a0a03..246d8d66 100644 --- a/monitors_api/docs/Monitors.md +++ b/monitors/docs/Monitors.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **monitors** | [**List[Monitor]**](Monitor.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from monitors_api.models.monitors import Monitors +from 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() +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_form_dict = monitors.from_dict(monitors_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/monitors/docs/SelfLinks.md b/monitors/docs/SelfLinks.md new file mode 100644 index 00000000..c3e3e28e --- /dev/null +++ b/monitors/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from 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/monitors/docs/SelfLinksLinks.md b/monitors/docs/SelfLinksLinks.md new file mode 100644 index 00000000..5aaf5c14 --- /dev/null +++ b/monitors/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from monitors.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/monitors/docs/UnauthorizedError.md b/monitors/docs/UnauthorizedError.md new file mode 100644 index 00000000..656b2746 --- /dev/null +++ b/monitors/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from 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/monitors/monitors/__init__.py b/monitors/monitors/__init__.py new file mode 100644 index 00000000..85ddd662 --- /dev/null +++ b/monitors/monitors/__init__.py @@ -0,0 +1,42 @@ +# 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.2 + 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 monitors.api.list_bgp_monitors_api import ListBGPMonitorsApi + +# import ApiClient +from monitors.api_response import ApiResponse +from monitors.api_client import ApiClient +from monitors.configuration import Configuration +from monitors.exceptions import OpenApiException +from monitors.exceptions import ApiTypeError +from monitors.exceptions import ApiValueError +from monitors.exceptions import ApiKeyError +from monitors.exceptions import ApiAttributeError +from monitors.exceptions import ApiException + +# import models into sdk package +from monitors.models.error import Error +from monitors.models.get_bgp_monitors200_response import GetBGPMonitors200Response +from monitors.models.link import Link +from monitors.models.monitor import Monitor +from monitors.models.monitor_type import MonitorType +from monitors.models.monitors import Monitors +from monitors.models.self_links import SelfLinks +from monitors.models.self_links_links import SelfLinksLinks +from monitors.models.unauthorized_error import UnauthorizedError diff --git a/monitors/monitors/api/__init__.py b/monitors/monitors/api/__init__.py new file mode 100644 index 00000000..d64a99aa --- /dev/null +++ b/monitors/monitors/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from monitors.api.list_bgp_monitors_api import ListBGPMonitorsApi + diff --git a/monitors_api/monitors_api/api/list_bgp_monitors_api.py b/monitors/monitors/api/list_bgp_monitors_api.py similarity index 89% rename from monitors_api/monitors_api/api/list_bgp_monitors_api.py rename to monitors/monitors/api/list_bgp_monitors_api.py index bb2417b0..fe0d6fc8 100644 --- a/monitors_api/monitors_api/api/list_bgp_monitors_api.py +++ b/monitors/monitors/api/list_bgp_monitors_api.py @@ -1,39 +1,29 @@ # coding: utf-8 """ - BGP Monitors + BGP Monitors API - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from monitors.models.get_bgp_monitors200_response import GetBGPMonitors200Response -from monitors_api.models.get_bgp_monitors200_response import GetBGPMonitors200Response - -from monitors_api.api_client import ApiClient -from monitors_api.api_response import ApiResponse -from monitors_api.rest import RESTResponseType +from monitors.api_client import ApiClient, RequestSerialized +from monitors.api_response import ApiResponse +from monitors.rest import RESTResponseType class ListBGPMonitorsApi: @@ -108,8 +98,7 @@ class ListBGPMonitorsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -181,8 +170,7 @@ class ListBGPMonitorsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -254,8 +242,7 @@ class ListBGPMonitorsApi: '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -271,19 +258,18 @@ class ListBGPMonitorsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/monitors/monitors/api_client.py b/monitors/monitors/api_client.py new file mode 100644 index 00000000..423bfe4b --- /dev/null +++ b/monitors/monitors/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from monitors.configuration import Configuration +from monitors.api_response import ApiResponse, T as ApiResponseT +import monitors.models +from monitors import rest +from monitors.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(monitors.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/monitors/monitors/api_response.py b/monitors/monitors/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/monitors/monitors/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/monitors/monitors/configuration.py b/monitors/monitors/configuration.py new file mode 100644 index 00000000..78a9c84b --- /dev/null +++ b/monitors/monitors/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("monitors") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/monitors/monitors/exceptions.py b/monitors/monitors/exceptions.py new file mode 100644 index 00000000..863266af --- /dev/null +++ b/monitors/monitors/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/monitors/monitors/models/__init__.py b/monitors/monitors/models/__init__.py new file mode 100644 index 00000000..bc312a70 --- /dev/null +++ b/monitors/monitors/models/__init__.py @@ -0,0 +1,25 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from monitors.models.error import Error +from monitors.models.get_bgp_monitors200_response import GetBGPMonitors200Response +from monitors.models.link import Link +from monitors.models.monitor import Monitor +from monitors.models.monitor_type import MonitorType +from monitors.models.monitors import Monitors +from monitors.models.self_links import SelfLinks +from monitors.models.self_links_links import SelfLinksLinks +from monitors.models.unauthorized_error import UnauthorizedError diff --git a/monitors/monitors/models/error.py b/monitors/monitors/models/error.py new file mode 100644 index 00000000..37345a86 --- /dev/null +++ b/monitors/monitors/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/monitors/monitors/models/get_bgp_monitors200_response.py b/monitors/monitors/models/get_bgp_monitors200_response.py new file mode 100644 index 00000000..88eb765b --- /dev/null +++ b/monitors/monitors/models/get_bgp_monitors200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 monitors.models.monitor import Monitor +from monitors.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetBGPMonitors200Response(BaseModel): + """ + GetBGPMonitors200Response + """ # noqa: E501 + monitors: Optional[List[Monitor]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["monitors", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetBGPMonitors200Response 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 GetBGPMonitors200Response 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": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/monitors/monitors/models/link.py b/monitors/monitors/models/link.py new file mode 100644 index 00000000..931dcab5 --- /dev/null +++ b/monitors/monitors/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/monitors/monitors/models/monitor.py b/monitors/monitors/models/monitor.py new file mode 100644 index 00000000..a6ba2b20 --- /dev/null +++ b/monitors/monitors/models/monitor.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.2 + 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 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/monitors/monitors/models/monitor_type.py b/monitors/monitors/models/monitor_type.py new file mode 100644 index 00000000..2d5844ac --- /dev/null +++ b/monitors/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.2 + 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/monitors/monitors/models/monitors.py b/monitors/monitors/models/monitors.py new file mode 100644 index 00000000..c6c54206 --- /dev/null +++ b/monitors/monitors/models/monitors.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from monitors.models.monitor import Monitor +from typing import Optional, Set +from typing_extensions import Self + +class Monitors(BaseModel): + """ + Monitors + """ # noqa: E501 + monitors: Optional[List[Monitor]] = None + __properties: ClassVar[List[str]] = ["monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 + 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 + }) + return _obj + + diff --git a/monitors/monitors/models/self_links.py b/monitors/monitors/models/self_links.py new file mode 100644 index 00000000..4de4a0b6 --- /dev/null +++ b/monitors/monitors/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 monitors.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/monitors/monitors/models/self_links_links.py b/monitors/monitors/models/self_links_links.py new file mode 100644 index 00000000..b482274c --- /dev/null +++ b/monitors/monitors/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 monitors.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/monitors/monitors/models/unauthorized_error.py b/monitors/monitors/models/unauthorized_error.py new file mode 100644 index 00000000..a7189a47 --- /dev/null +++ b/monitors/monitors/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/monitors_api/monitors_api/py.typed b/monitors/monitors/py.typed similarity index 100% rename from monitors_api/monitors_api/py.typed rename to monitors/monitors/py.typed diff --git a/monitors/monitors/rest.py b/monitors/monitors/rest.py new file mode 100644 index 00000000..15282b2c --- /dev/null +++ b/monitors/monitors/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from monitors.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/monitors/pyproject.toml b/monitors/pyproject.toml new file mode 100644 index 00000000..c580578d --- /dev/null +++ b/monitors/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "monitors" +version = "1.0.0" +description = "BGP Monitors API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "BGP Monitors API"] +include = ["monitors/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "monitors", + #"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/monitors_api/requirements.txt b/monitors/requirements.txt similarity index 100% rename from monitors_api/requirements.txt rename to monitors/requirements.txt diff --git a/monitors_api/setup.cfg b/monitors/setup.cfg similarity index 100% rename from monitors_api/setup.cfg rename to monitors/setup.cfg diff --git a/monitors/setup.py b/monitors/setup.py new file mode 100644 index 00000000..4abdf50c --- /dev/null +++ b/monitors/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "monitors" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="BGP Monitors API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/monitors", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "BGP Monitors API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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). + """, # noqa: E501 + package_data={"monitors": ["py.typed"]}, +) diff --git a/monitors/test-requirements.txt b/monitors/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/monitors/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/monitors_api/test/__init__.py b/monitors/test/__init__.py similarity index 100% rename from monitors_api/test/__init__.py rename to monitors/test/__init__.py diff --git a/monitors/test/test_error.py b/monitors/test/test_error.py new file mode 100644 index 00000000..6abca8f5 --- /dev/null +++ b/monitors/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_get_bgp_monitors200_response.py b/monitors/test/test_get_bgp_monitors200_response.py new file mode 100644 index 00000000..b2813883 --- /dev/null +++ b/monitors/test/test_get_bgp_monitors200_response.py @@ -0,0 +1,69 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.get_bgp_monitors200_response import GetBGPMonitors200Response + +class TestGetBGPMonitors200Response(unittest.TestCase): + """GetBGPMonitors200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetBGPMonitors200Response: + """Test GetBGPMonitors200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetBGPMonitors200Response` + """ + model = GetBGPMonitors200Response() + if include_optional: + return GetBGPMonitors200Response( + monitors = [ + monitors.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ], + links = monitors.models.self_links__links.SelfLinks__links( + self = monitors.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetBGPMonitors200Response( + ) + """ + + def testGetBGPMonitors200Response(self): + """Test GetBGPMonitors200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_link.py b/monitors/test/test_link.py new file mode 100644 index 00000000..594921a4 --- /dev/null +++ b/monitors/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_monitor.py b/monitors/test/test_monitor.py new file mode 100644 index 00000000..d26c2831 --- /dev/null +++ b/monitors/test/test_monitor.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.monitor import Monitor + +class TestMonitor(unittest.TestCase): + """Monitor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Monitor: + """Test Monitor + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Monitor` + """ + model = Monitor() + if include_optional: + return Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA' + ) + else: + return Monitor( + ) + """ + + def testMonitor(self): + """Test Monitor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_monitor_type.py b/monitors/test/test_monitor_type.py new file mode 100644 index 00000000..a187f237 --- /dev/null +++ b/monitors/test/test_monitor_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.monitor_type import MonitorType + +class TestMonitorType(unittest.TestCase): + """MonitorType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonitorType(self): + """Test MonitorType""" + # inst = MonitorType() + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_monitors.py b/monitors/test/test_monitors.py new file mode 100644 index 00000000..b3f23302 --- /dev/null +++ b/monitors/test/test_monitors.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.monitors import Monitors + +class TestMonitors(unittest.TestCase): + """Monitors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Monitors: + """Test Monitors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Monitors` + """ + model = Monitors() + if include_optional: + return Monitors( + monitors = [ + monitors.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return Monitors( + ) + """ + + def testMonitors(self): + """Test Monitors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_self_links.py b/monitors/test/test_self_links.py new file mode 100644 index 00000000..042490d3 --- /dev/null +++ b/monitors/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = monitors.models.self_links__links.SelfLinks__links( + self = monitors.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_self_links_links.py b/monitors/test/test_self_links_links.py new file mode 100644 index 00000000..6770e5a7 --- /dev/null +++ b/monitors/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = monitors.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors/test/test_unauthorized_error.py b/monitors/test/test_unauthorized_error.py new file mode 100644 index 00000000..ad7bb146 --- /dev/null +++ b/monitors/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from monitors.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/monitors_api/.github/workflows/python.yml b/monitors_api/.github/workflows/python.yml deleted file mode 100644 index 3bd32c89..00000000 --- a/monitors_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: monitors_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/monitors_api/.gitlab-ci.yml b/monitors_api/.gitlab-ci.yml deleted file mode 100644 index c9801ce8..00000000 --- a/monitors_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=monitors_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/monitors_api/.openapi-generator/FILES b/monitors_api/.openapi-generator/FILES deleted file mode 100644 index d791d973..00000000 --- a/monitors_api/.openapi-generator/FILES +++ /dev/null @@ -1,53 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/Error.md -docs/GetBGPMonitors200Response.md -docs/Link.md -docs/ListBGPMonitorsApi.md -docs/Monitor.md -docs/MonitorType.md -docs/Monitors.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/UnauthorizedError.md -git_push.sh -monitors_api/__init__.py -monitors_api/api/__init__.py -monitors_api/api/list_bgp_monitors_api.py -monitors_api/api_client.py -monitors_api/api_response.py -monitors_api/configuration.py -monitors_api/exceptions.py -monitors_api/models/__init__.py -monitors_api/models/error.py -monitors_api/models/get_bgp_monitors200_response.py -monitors_api/models/link.py -monitors_api/models/monitor.py -monitors_api/models/monitor_type.py -monitors_api/models/monitors.py -monitors_api/models/self_links.py -monitors_api/models/self_links_links.py -monitors_api/models/unauthorized_error.py -monitors_api/py.typed -monitors_api/rest.py -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_error.py -test/test_get_bgp_monitors200_response.py -test/test_link.py -test/test_list_bgp_monitors_api.py -test/test_monitor.py -test/test_monitor_type.py -test/test_monitors.py -test/test_self_links.py -test/test_self_links_links.py -test/test_unauthorized_error.py -tox.ini diff --git a/monitors_api/.openapi-generator/VERSION b/monitors_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/monitors_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/monitors_api/.travis.yml b/monitors_api/.travis.yml deleted file mode 100644 index d4a06ca4..00000000 --- a/monitors_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=monitors_api diff --git a/monitors_api/README.md b/monitors_api/README.md deleted file mode 100644 index b2f68709..00000000 --- a/monitors_api/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# monitors-api - -## Overview -Retrieve information about BGP monitors available for ThousandEyes account. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import monitors_api -``` - -### 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 monitors_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import monitors_api -from monitors_api.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 = monitors_api.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 = monitors_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with monitors_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = monitors_api.ListBGPMonitorsApi(api_client) - aid = '2067' # 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) - - [GetBGPMonitors200Response](docs/GetBGPMonitors200Response.md) - - [Link](docs/Link.md) - - [Monitor](docs/Monitor.md) - - [MonitorType](docs/MonitorType.md) - - [Monitors](docs/Monitors.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/monitors_api/docs/Error.md b/monitors_api/docs/Error.md deleted file mode 100644 index c6c3d209..00000000 --- a/monitors_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 monitors_api.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_form_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/monitors_api/docs/Link.md b/monitors_api/docs/Link.md deleted file mode 100644 index ac400d0e..00000000 --- a/monitors_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 monitors_api.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_form_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/monitors_api/docs/Monitor.md b/monitors_api/docs/Monitor.md deleted file mode 100644 index 2c45b07c..00000000 --- a/monitors_api/docs/Monitor.md +++ /dev/null @@ -1,33 +0,0 @@ -# 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 monitors_api.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_form_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/monitors_api/docs/MonitorType.md b/monitors_api/docs/MonitorType.md deleted file mode 100644 index 30c9de8b..00000000 --- a/monitors_api/docs/MonitorType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/monitors_api/docs/SelfLinks.md b/monitors_api/docs/SelfLinks.md deleted file mode 100644 index 026e4447..00000000 --- a/monitors_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from monitors_api.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_form_dict = self_links.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/monitors_api/docs/SelfLinksLinks.md b/monitors_api/docs/SelfLinksLinks.md deleted file mode 100644 index df23ca1a..00000000 --- a/monitors_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from monitors_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/monitors_api/docs/UnauthorizedError.md b/monitors_api/docs/UnauthorizedError.md deleted file mode 100644 index 29ae35b3..00000000 --- a/monitors_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from monitors_api.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_form_dict = unauthorized_error.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/monitors_api/git_push.sh b/monitors_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/monitors_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/monitors_api/monitors_api/__init__.py b/monitors_api/monitors_api/__init__.py deleted file mode 100644 index 7129c2bf..00000000 --- a/monitors_api/monitors_api/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 monitors_api.api.list_bgp_monitors_api import ListBGPMonitorsApi - -# import ApiClient -from monitors_api.api_response import ApiResponse -from monitors_api.api_client import ApiClient -from monitors_api.configuration import Configuration -from monitors_api.exceptions import OpenApiException -from monitors_api.exceptions import ApiTypeError -from monitors_api.exceptions import ApiValueError -from monitors_api.exceptions import ApiKeyError -from monitors_api.exceptions import ApiAttributeError -from monitors_api.exceptions import ApiException - -# import models into sdk package -from monitors_api.models.error import Error -from monitors_api.models.get_bgp_monitors200_response import GetBGPMonitors200Response -from monitors_api.models.link import Link -from monitors_api.models.monitor import Monitor -from monitors_api.models.monitor_type import MonitorType -from monitors_api.models.monitors import Monitors -from monitors_api.models.self_links import SelfLinks -from monitors_api.models.self_links_links import SelfLinksLinks -from monitors_api.models.unauthorized_error import UnauthorizedError diff --git a/monitors_api/monitors_api/api/__init__.py b/monitors_api/monitors_api/api/__init__.py deleted file mode 100644 index ba4af859..00000000 --- a/monitors_api/monitors_api/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from monitors_api.api.list_bgp_monitors_api import ListBGPMonitorsApi - diff --git a/monitors_api/monitors_api/api_client.py b/monitors_api/monitors_api/api_client.py deleted file mode 100644 index a75ffb65..00000000 --- a/monitors_api/monitors_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from monitors_api.configuration import Configuration -from monitors_api.api_response import ApiResponse -import monitors_api.models -from monitors_api import rest -from monitors_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(monitors_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/monitors_api/monitors_api/api_response.py b/monitors_api/monitors_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/monitors_api/monitors_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/monitors_api/monitors_api/configuration.py b/monitors_api/monitors_api/configuration.py deleted file mode 100644 index cf6c1052..00000000 --- a/monitors_api/monitors_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("monitors_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/monitors_api/monitors_api/exceptions.py b/monitors_api/monitors_api/exceptions.py deleted file mode 100644 index e4125d60..00000000 --- a/monitors_api/monitors_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/monitors_api/monitors_api/models/__init__.py b/monitors_api/monitors_api/models/__init__.py deleted file mode 100644 index d71ec834..00000000 --- a/monitors_api/monitors_api/models/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from monitors_api.models.error import Error -from monitors_api.models.get_bgp_monitors200_response import GetBGPMonitors200Response -from monitors_api.models.link import Link -from monitors_api.models.monitor import Monitor -from monitors_api.models.monitor_type import MonitorType -from monitors_api.models.monitors import Monitors -from monitors_api.models.self_links import SelfLinks -from monitors_api.models.self_links_links import SelfLinksLinks -from monitors_api.models.unauthorized_error import UnauthorizedError diff --git a/monitors_api/monitors_api/models/error.py b/monitors_api/monitors_api/models/error.py deleted file mode 100644 index 7fcb05fd..00000000 --- a/monitors_api/monitors_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/monitors_api/monitors_api/models/get_bgp_monitors200_response.py b/monitors_api/monitors_api/models/get_bgp_monitors200_response.py deleted file mode 100644 index 20f2c6b8..00000000 --- a/monitors_api/monitors_api/models/get_bgp_monitors200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from monitors_api.models.monitor import Monitor -from monitors_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetBGPMonitors200Response(BaseModel): - """ - GetBGPMonitors200Response - """ # noqa: E501 - monitors: Optional[List[Monitor]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["monitors", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetBGPMonitors200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of GetBGPMonitors200Response 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.get("monitors")] if obj.get("monitors") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/monitors_api/monitors_api/models/link.py b/monitors_api/monitors_api/models/link.py deleted file mode 100644 index e3baadd6..00000000 --- a/monitors_api/monitors_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/monitors_api/monitors_api/models/monitor.py b/monitors_api/monitors_api/models/monitor.py deleted file mode 100644 index a010e78a..00000000 --- a/monitors_api/monitors_api/models/monitor.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from monitors_api.models.monitor_type import MonitorType -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "country_id", - "monitor_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/monitors_api/monitors_api/models/monitor_type.py b/monitors_api/monitors_api/models/monitor_type.py deleted file mode 100644 index d400c908..00000000 --- a/monitors_api/monitors_api/models/monitor_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/monitors_api/monitors_api/models/monitors.py b/monitors_api/monitors_api/models/monitors.py deleted file mode 100644 index 1ea5a785..00000000 --- a/monitors_api/monitors_api/models/monitors.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from monitors_api.models.monitor import Monitor -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Monitors(BaseModel): - """ - Monitors - """ # noqa: E501 - monitors: Optional[List[Monitor]] = None - __properties: ClassVar[List[str]] = ["monitors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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.get("monitors")] if obj.get("monitors") is not None else None - }) - return _obj - - diff --git a/monitors_api/monitors_api/models/self_links.py b/monitors_api/monitors_api/models/self_links.py deleted file mode 100644 index 7963138b..00000000 --- a/monitors_api/monitors_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from monitors_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/monitors_api/monitors_api/models/self_links_links.py b/monitors_api/monitors_api/models/self_links_links.py deleted file mode 100644 index 1747503d..00000000 --- a/monitors_api/monitors_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from monitors_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/monitors_api/monitors_api/models/unauthorized_error.py b/monitors_api/monitors_api/models/unauthorized_error.py deleted file mode 100644 index 93a7c567..00000000 --- a/monitors_api/monitors_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/monitors_api/monitors_api/rest.py b/monitors_api/monitors_api/rest.py deleted file mode 100644 index 8edb8c48..00000000 --- a/monitors_api/monitors_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from monitors_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/monitors_api/pyproject.toml b/monitors_api/pyproject.toml deleted file mode 100644 index 11849271..00000000 --- a/monitors_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "monitors_api" -version = "1.0.0" -description = "BGP Monitors" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "BGP Monitors"] -include = ["monitors_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/monitors_api/setup.py b/monitors_api/setup.py deleted file mode 100644 index a69b3016..00000000 --- a/monitors_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "monitors-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="BGP Monitors", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "BGP Monitors"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - """, # noqa: E501 - package_data={"monitors_api": ["py.typed"]}, -) diff --git a/monitors_api/test-requirements.txt b/monitors_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/monitors_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/monitors_api/test/test_error.py b/monitors_api/test/test_error.py deleted file mode 100644 index 26ebcf70..00000000 --- a/monitors_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_get_bgp_monitors200_response.py b/monitors_api/test/test_get_bgp_monitors200_response.py deleted file mode 100644 index 46b82092..00000000 --- a/monitors_api/test/test_get_bgp_monitors200_response.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.get_bgp_monitors200_response import GetBGPMonitors200Response - -class TestGetBGPMonitors200Response(unittest.TestCase): - """GetBGPMonitors200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetBGPMonitors200Response: - """Test GetBGPMonitors200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetBGPMonitors200Response` - """ - model = GetBGPMonitors200Response() - if include_optional: - return GetBGPMonitors200Response( - monitors = [ - monitors_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ], - links = monitors_api.models.self_links__links.SelfLinks__links( - self = monitors_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetBGPMonitors200Response( - ) - """ - - def testGetBGPMonitors200Response(self): - """Test GetBGPMonitors200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_link.py b/monitors_api/test/test_link.py deleted file mode 100644 index 57be58e5..00000000 --- a/monitors_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_list_bgp_monitors_api.py b/monitors_api/test/test_list_bgp_monitors_api.py deleted file mode 100644 index d64407cb..00000000 --- a/monitors_api/test/test_list_bgp_monitors_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from monitors_api.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(self) -> None: - """Test case for get_bgp_monitors - - List BGP monitors - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_monitor.py b/monitors_api/test/test_monitor.py deleted file mode 100644 index 0fc9c4bf..00000000 --- a/monitors_api/test/test_monitor.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.monitor import Monitor - -class TestMonitor(unittest.TestCase): - """Monitor unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Monitor: - """Test Monitor - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Monitor` - """ - model = Monitor() - if include_optional: - return Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA' - ) - else: - return Monitor( - ) - """ - - def testMonitor(self): - """Test Monitor""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_monitor_type.py b/monitors_api/test/test_monitor_type.py deleted file mode 100644 index 321e513c..00000000 --- a/monitors_api/test/test_monitor_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.monitor_type import MonitorType - -class TestMonitorType(unittest.TestCase): - """MonitorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMonitorType(self): - """Test MonitorType""" - # inst = MonitorType() - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_monitors.py b/monitors_api/test/test_monitors.py deleted file mode 100644 index 140d7767..00000000 --- a/monitors_api/test/test_monitors.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.monitors import Monitors - -class TestMonitors(unittest.TestCase): - """Monitors unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Monitors: - """Test Monitors - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Monitors` - """ - model = Monitors() - if include_optional: - return Monitors( - monitors = [ - monitors_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ] - ) - else: - return Monitors( - ) - """ - - def testMonitors(self): - """Test Monitors""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_self_links.py b/monitors_api/test/test_self_links.py deleted file mode 100644 index fc919fdb..00000000 --- a/monitors_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = monitors_api.models.self_links__links.SelfLinks__links( - self = monitors_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_self_links_links.py b/monitors_api/test/test_self_links_links.py deleted file mode 100644 index dea9f770..00000000 --- a/monitors_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = monitors_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/test/test_unauthorized_error.py b/monitors_api/test/test_unauthorized_error.py deleted file mode 100644 index d4741840..00000000 --- a/monitors_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - BGP Monitors - - ## Overview Retrieve information about BGP monitors available for ThousandEyes account. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from monitors_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/monitors_api/tox.ini b/monitors_api/tox.ini deleted file mode 100644 index 0c7e9c9b..00000000 --- a/monitors_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=monitors_api diff --git a/snapshots_api/.gitignore b/oauth2/.gitignore similarity index 100% rename from snapshots_api/.gitignore rename to oauth2/.gitignore diff --git a/snapshots_api/.openapi-generator-ignore b/oauth2/.openapi-generator-ignore similarity index 100% rename from snapshots_api/.openapi-generator-ignore rename to oauth2/.openapi-generator-ignore diff --git a/oauth2/.openapi-generator/FILES b/oauth2/.openapi-generator/FILES new file mode 100644 index 00000000..5bee673b --- /dev/null +++ b/oauth2/.openapi-generator/FILES @@ -0,0 +1,35 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AccessToken.md +docs/DefaultApi.md +docs/Error.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +oauth2/__init__.py +oauth2/api/__init__.py +oauth2/api/default_api.py +oauth2/api_client.py +oauth2/api_response.py +oauth2/configuration.py +oauth2/exceptions.py +oauth2/models/__init__.py +oauth2/models/access_token.py +oauth2/models/error.py +oauth2/models/unauthorized_error.py +oauth2/models/validation_error.py +oauth2/models/validation_error_all_of_errors.py +oauth2/py.typed +oauth2/rest.py +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_access_token.py +test/test_error.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/oauth2/.openapi-generator/VERSION b/oauth2/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/oauth2/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/oauth2/README.md b/oauth2/README.md new file mode 100644 index 00000000..09e87634 --- /dev/null +++ b/oauth2/README.md @@ -0,0 +1,134 @@ +# oauth2 +This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: + + ` + curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' + ` + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import oauth2 +``` + +### 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 oauth2 +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import oauth2 +from oauth2.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 = oauth2.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. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + + +# Enter a context with an instance of the API client +with oauth2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = oauth2.DefaultApi(api_client) + x_tenant_id = 'x_tenant_id_example' # str | Tenant ID, only applicable if using the WanInsights Tenant flow (optional) + client_id = 'client_id_example' # str | The Application ID. (optional) + client_secret = 'client_secret_example' # str | The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported. (optional) + grant_type = 'grant_type_example' # str | Must be set to `client_credentials`. (optional) + scope = 'scope_example' # str | Requested scope values for the new access token. (optional) + thousandeyes_bearer_token = 'thousandeyes_bearer_token_example' # str | The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user. (optional) + + try: + # Create and return access token. + api_response = api_instance.v7_oauth2_token_post(x_tenant_id=x_tenant_id, client_id=client_id, client_secret=client_secret, grant_type=grant_type, scope=scope, thousandeyes_bearer_token=thousandeyes_bearer_token) + print("The response of DefaultApi->v7_oauth2_token_post:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling DefaultApi->v7_oauth2_token_post: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**v7_oauth2_token_post**](docs/DefaultApi.md#v7_oauth2_token_post) | **POST** /v7/oauth2/token | Create and return access token. + + +## Documentation For Models + + - [AccessToken](docs/AccessToken.md) + - [Error](docs/Error.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### application + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - **read**: allows reading resources + + +## Author + + + + diff --git a/oauth2/docs/AccessToken.md b/oauth2/docs/AccessToken.md new file mode 100644 index 00000000..1b80a54d --- /dev/null +++ b/oauth2/docs/AccessToken.md @@ -0,0 +1,32 @@ +# AccessToken + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token_type** | **str** | | [optional] +**expires_in** | **int** | | [optional] +**access_token** | **str** | | [optional] +**scope** | **str** | | [optional] + +## Example + +```python +from oauth2.models.access_token import AccessToken + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessToken from a JSON string +access_token_instance = AccessToken.from_json(json) +# print the JSON string representation of the object +print(AccessToken.to_json()) + +# convert the object into a dict +access_token_dict = access_token_instance.to_dict() +# create an instance of AccessToken from a dict +access_token_from_dict = AccessToken.from_dict(access_token_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/oauth2/docs/DefaultApi.md b/oauth2/docs/DefaultApi.md new file mode 100644 index 00000000..0da68770 --- /dev/null +++ b/oauth2/docs/DefaultApi.md @@ -0,0 +1,97 @@ +# oauth2.DefaultApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v7_oauth2_token_post**](DefaultApi.md#v7_oauth2_token_post) | **POST** /v7/oauth2/token | Create and return access token. + + +# **v7_oauth2_token_post** +> AccessToken v7_oauth2_token_post(x_tenant_id=x_tenant_id, client_id=client_id, client_secret=client_secret, grant_type=grant_type, scope=scope, thousandeyes_bearer_token=thousandeyes_bearer_token) + +Create and return access token. + +This endpoint uses the client credentials passed alongside the request to create a new access token and return it to the client. + +### Example + +* OAuth Authentication (application): + +```python +import oauth2 +from oauth2.models.access_token import AccessToken +from oauth2.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 = oauth2.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. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with oauth2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = oauth2.DefaultApi(api_client) + x_tenant_id = 'x_tenant_id_example' # str | Tenant ID, only applicable if using the WanInsights Tenant flow (optional) + client_id = 'client_id_example' # str | The Application ID. (optional) + client_secret = 'client_secret_example' # str | The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported. (optional) + grant_type = 'grant_type_example' # str | Must be set to `client_credentials`. (optional) + scope = 'scope_example' # str | Requested scope values for the new access token. (optional) + thousandeyes_bearer_token = 'thousandeyes_bearer_token_example' # str | The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user. (optional) + + try: + # Create and return access token. + api_response = api_instance.v7_oauth2_token_post(x_tenant_id=x_tenant_id, client_id=client_id, client_secret=client_secret, grant_type=grant_type, scope=scope, thousandeyes_bearer_token=thousandeyes_bearer_token) + print("The response of DefaultApi->v7_oauth2_token_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DefaultApi->v7_oauth2_token_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_tenant_id** | **str**| Tenant ID, only applicable if using the WanInsights Tenant flow | [optional] + **client_id** | **str**| The Application ID. | [optional] + **client_secret** | **str**| The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported. | [optional] + **grant_type** | **str**| Must be set to `client_credentials`. | [optional] + **scope** | **str**| Requested scope values for the new access token. | [optional] + **thousandeyes_bearer_token** | **str**| The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user. | [optional] + +### Return type + +[**AccessToken**](AccessToken.md) + +### Authorization + +[application](../README.md#application) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**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/oauth2/docs/Error.md b/oauth2/docs/Error.md new file mode 100644 index 00000000..0d338e48 --- /dev/null +++ b/oauth2/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 oauth2.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/oauth2/docs/UnauthorizedError.md b/oauth2/docs/UnauthorizedError.md new file mode 100644 index 00000000..3c72e5c5 --- /dev/null +++ b/oauth2/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from oauth2.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/oauth2/docs/ValidationError.md b/oauth2/docs/ValidationError.md new file mode 100644 index 00000000..410827dc --- /dev/null +++ b/oauth2/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from oauth2.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/oauth2/docs/ValidationErrorAllOfErrors.md b/oauth2/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..749c7dfe --- /dev/null +++ b/oauth2/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from oauth2.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/oauth2/oauth2/__init__.py b/oauth2/oauth2/__init__.py new file mode 100644 index 00000000..c33c0314 --- /dev/null +++ b/oauth2/oauth2/__init__.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +# flake8: noqa + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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 oauth2.api.default_api import DefaultApi + +# import ApiClient +from oauth2.api_response import ApiResponse +from oauth2.api_client import ApiClient +from oauth2.configuration import Configuration +from oauth2.exceptions import OpenApiException +from oauth2.exceptions import ApiTypeError +from oauth2.exceptions import ApiValueError +from oauth2.exceptions import ApiKeyError +from oauth2.exceptions import ApiAttributeError +from oauth2.exceptions import ApiException + +# import models into sdk package +from oauth2.models.access_token import AccessToken +from oauth2.models.error import Error +from oauth2.models.unauthorized_error import UnauthorizedError +from oauth2.models.validation_error import ValidationError +from oauth2.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/oauth2/oauth2/api/__init__.py b/oauth2/oauth2/api/__init__.py new file mode 100644 index 00000000..477c2f2d --- /dev/null +++ b/oauth2/oauth2/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from oauth2.api.default_api import DefaultApi + diff --git a/oauth2/oauth2/api/default_api.py b/oauth2/oauth2/api/default_api.py new file mode 100644 index 00000000..c4f36912 --- /dev/null +++ b/oauth2/oauth2/api/default_api.py @@ -0,0 +1,395 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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 + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from oauth2.models.access_token import AccessToken + +from oauth2.api_client import ApiClient, RequestSerialized +from oauth2.api_response import ApiResponse +from oauth2.rest import RESTResponseType + + +class DefaultApi: + """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() + self.api_client = api_client + + + @validate_call + def v7_oauth2_token_post( + self, + x_tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID, only applicable if using the WanInsights Tenant flow")] = None, + client_id: Annotated[Optional[StrictStr], Field(description="The Application ID.")] = None, + client_secret: Annotated[Optional[StrictStr], Field(description="The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported.")] = None, + grant_type: Annotated[Optional[StrictStr], Field(description="Must be set to `client_credentials`.")] = None, + scope: Annotated[Optional[StrictStr], Field(description="Requested scope values for the new access token.")] = None, + thousandeyes_bearer_token: Annotated[Optional[StrictStr], Field(description="The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user.")] = 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, + ) -> AccessToken: + """Create and return access token. + + This endpoint uses the client credentials passed alongside the request to create a new access token and return it to the client. + + :param x_tenant_id: Tenant ID, only applicable if using the WanInsights Tenant flow + :type x_tenant_id: str + :param client_id: The Application ID. + :type client_id: str + :param client_secret: The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported. + :type client_secret: str + :param grant_type: Must be set to `client_credentials`. + :type grant_type: str + :param scope: Requested scope values for the new access token. + :type scope: str + :param thousandeyes_bearer_token: The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user. + :type thousandeyes_bearer_token: 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._v7_oauth2_token_post_serialize( + x_tenant_id=x_tenant_id, + client_id=client_id, + client_secret=client_secret, + grant_type=grant_type, + scope=scope, + thousandeyes_bearer_token=thousandeyes_bearer_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccessToken", + '400': "ValidationError", + '401': "UnauthorizedError", + '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, + ).data + + + @validate_call + def v7_oauth2_token_post_with_http_info( + self, + x_tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID, only applicable if using the WanInsights Tenant flow")] = None, + client_id: Annotated[Optional[StrictStr], Field(description="The Application ID.")] = None, + client_secret: Annotated[Optional[StrictStr], Field(description="The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported.")] = None, + grant_type: Annotated[Optional[StrictStr], Field(description="Must be set to `client_credentials`.")] = None, + scope: Annotated[Optional[StrictStr], Field(description="Requested scope values for the new access token.")] = None, + thousandeyes_bearer_token: Annotated[Optional[StrictStr], Field(description="The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user.")] = 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[AccessToken]: + """Create and return access token. + + This endpoint uses the client credentials passed alongside the request to create a new access token and return it to the client. + + :param x_tenant_id: Tenant ID, only applicable if using the WanInsights Tenant flow + :type x_tenant_id: str + :param client_id: The Application ID. + :type client_id: str + :param client_secret: The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported. + :type client_secret: str + :param grant_type: Must be set to `client_credentials`. + :type grant_type: str + :param scope: Requested scope values for the new access token. + :type scope: str + :param thousandeyes_bearer_token: The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user. + :type thousandeyes_bearer_token: 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._v7_oauth2_token_post_serialize( + x_tenant_id=x_tenant_id, + client_id=client_id, + client_secret=client_secret, + grant_type=grant_type, + scope=scope, + thousandeyes_bearer_token=thousandeyes_bearer_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccessToken", + '400': "ValidationError", + '401': "UnauthorizedError", + '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, + ) + + + @validate_call + def v7_oauth2_token_post_without_preload_content( + self, + x_tenant_id: Annotated[Optional[StrictStr], Field(description="Tenant ID, only applicable if using the WanInsights Tenant flow")] = None, + client_id: Annotated[Optional[StrictStr], Field(description="The Application ID.")] = None, + client_secret: Annotated[Optional[StrictStr], Field(description="The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported.")] = None, + grant_type: Annotated[Optional[StrictStr], Field(description="Must be set to `client_credentials`.")] = None, + scope: Annotated[Optional[StrictStr], Field(description="Requested scope values for the new access token.")] = None, + thousandeyes_bearer_token: Annotated[Optional[StrictStr], Field(description="The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user.")] = 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 and return access token. + + This endpoint uses the client credentials passed alongside the request to create a new access token and return it to the client. + + :param x_tenant_id: Tenant ID, only applicable if using the WanInsights Tenant flow + :type x_tenant_id: str + :param client_id: The Application ID. + :type client_id: str + :param client_secret: The application secret that was generated for you during the app registration. The Basic auth pattern of instead providing credentials in the Authorization header, per RFC 6749 is also supported. + :type client_secret: str + :param grant_type: Must be set to `client_credentials`. + :type grant_type: str + :param scope: Requested scope values for the new access token. + :type scope: str + :param thousandeyes_bearer_token: The user's bearer token, only applicable for special cases where the client wants to make requests on behalf of a user. + :type thousandeyes_bearer_token: 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._v7_oauth2_token_post_serialize( + x_tenant_id=x_tenant_id, + client_id=client_id, + client_secret=client_secret, + grant_type=grant_type, + scope=scope, + thousandeyes_bearer_token=thousandeyes_bearer_token, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccessToken", + '400': "ValidationError", + '401': "UnauthorizedError", + '429': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v7_oauth2_token_post_serialize( + self, + x_tenant_id, + client_id, + client_secret, + grant_type, + scope, + thousandeyes_bearer_token, + _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 + # process the header parameters + if x_tenant_id is not None: + _header_params['x-tenant-id'] = x_tenant_id + # process the form parameters + if client_id is not None: + _form_params.append(('client_id', client_id)) + if client_secret is not None: + _form_params.append(('client_secret', client_secret)) + if grant_type is not None: + _form_params.append(('grant_type', grant_type)) + if scope is not None: + _form_params.append(('scope', scope)) + if thousandeyes_bearer_token is not None: + _form_params.append(('thousandeyes_bearer_token', thousandeyes_bearer_token)) + # process the body parameter + + + # 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/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'application' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/oauth2/token', + 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/oauth2/oauth2/api_client.py b/oauth2/oauth2/api_client.py new file mode 100644 index 00000000..24295bc5 --- /dev/null +++ b/oauth2/oauth2/api_client.py @@ -0,0 +1,770 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from oauth2.configuration import Configuration +from oauth2.api_response import ApiResponse, T as ApiResponseT +import oauth2.models +from oauth2 import rest +from oauth2.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(oauth2.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/oauth2/oauth2/api_response.py b/oauth2/oauth2/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/oauth2/oauth2/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/oauth2/oauth2/configuration.py b/oauth2/oauth2/configuration.py new file mode 100644 index 00000000..f055e0b5 --- /dev/null +++ b/oauth2/oauth2/configuration.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("oauth2") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['application'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/oauth2/oauth2/exceptions.py b/oauth2/oauth2/exceptions.py new file mode 100644 index 00000000..b82b54d8 --- /dev/null +++ b/oauth2/oauth2/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/oauth2/oauth2/models/__init__.py b/oauth2/oauth2/models/__init__.py new file mode 100644 index 00000000..0c1a28a5 --- /dev/null +++ b/oauth2/oauth2/models/__init__.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +# flake8: noqa +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from oauth2.models.access_token import AccessToken +from oauth2.models.error import Error +from oauth2.models.unauthorized_error import UnauthorizedError +from oauth2.models.validation_error import ValidationError +from oauth2.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/oauth2/oauth2/models/access_token.py b/oauth2/oauth2/models/access_token.py new file mode 100644 index 00000000..4e2b00a9 --- /dev/null +++ b/oauth2/oauth2/models/access_token.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AccessToken(BaseModel): + """ + AccessToken + """ # noqa: E501 + token_type: Optional[StrictStr] = None + expires_in: Optional[StrictInt] = None + access_token: Optional[StrictStr] = None + scope: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["token_type", "expires_in", "access_token", "scope"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccessToken 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 AccessToken from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "token_type": obj.get("token_type"), + "expires_in": obj.get("expires_in"), + "access_token": obj.get("access_token"), + "scope": obj.get("scope") + }) + return _obj + + diff --git a/oauth2/oauth2/models/error.py b/oauth2/oauth2/models/error.py new file mode 100644 index 00000000..dc78ba63 --- /dev/null +++ b/oauth2/oauth2/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/oauth2/oauth2/models/unauthorized_error.py b/oauth2/oauth2/models/unauthorized_error.py new file mode 100644 index 00000000..17ab642c --- /dev/null +++ b/oauth2/oauth2/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/oauth2/oauth2/models/validation_error.py b/oauth2/oauth2/models/validation_error.py new file mode 100644 index 00000000..500c349f --- /dev/null +++ b/oauth2/oauth2/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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 oauth2.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/oauth2/oauth2/models/validation_error_all_of_errors.py b/oauth2/oauth2/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..507e63ec --- /dev/null +++ b/oauth2/oauth2/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/snapshots_api/snapshots_api/py.typed b/oauth2/oauth2/py.typed similarity index 100% rename from snapshots_api/snapshots_api/py.typed rename to oauth2/oauth2/py.typed diff --git a/oauth2/oauth2/rest.py b/oauth2/oauth2/rest.py new file mode 100644 index 00000000..0c9c7ba1 --- /dev/null +++ b/oauth2/oauth2/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from oauth2.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/oauth2/pyproject.toml b/oauth2/pyproject.toml new file mode 100644 index 00000000..90c011dc --- /dev/null +++ b/oauth2/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "oauth2" +version = "1.0.0" +description = "OAuth2 API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "OAuth2 API"] +include = ["oauth2/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "oauth2", + #"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/snapshots_api/requirements.txt b/oauth2/requirements.txt similarity index 100% rename from snapshots_api/requirements.txt rename to oauth2/requirements.txt diff --git a/snapshots_api/setup.cfg b/oauth2/setup.cfg similarity index 100% rename from snapshots_api/setup.cfg rename to oauth2/setup.cfg diff --git a/oauth2/setup.py b/oauth2/setup.py new file mode 100644 index 00000000..8a28cc76 --- /dev/null +++ b/oauth2/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "oauth2" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="OAuth2 API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/oauth2", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "OAuth2 API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + """, # noqa: E501 + package_data={"oauth2": ["py.typed"]}, +) diff --git a/oauth2/test-requirements.txt b/oauth2/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/oauth2/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/snapshots_api/test/__init__.py b/oauth2/test/__init__.py similarity index 100% rename from snapshots_api/test/__init__.py rename to oauth2/test/__init__.py diff --git a/oauth2/test/test_access_token.py b/oauth2/test/test_access_token.py new file mode 100644 index 00000000..e213069f --- /dev/null +++ b/oauth2/test/test_access_token.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from oauth2.models.access_token import AccessToken + +class TestAccessToken(unittest.TestCase): + """AccessToken unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessToken: + """Test AccessToken + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccessToken` + """ + model = AccessToken() + if include_optional: + return AccessToken( + token_type = '', + expires_in = 56, + access_token = '', + scope = '' + ) + else: + return AccessToken( + ) + """ + + def testAccessToken(self): + """Test AccessToken""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/oauth2/test/test_error.py b/oauth2/test/test_error.py new file mode 100644 index 00000000..cb9b63ed --- /dev/null +++ b/oauth2/test/test_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from oauth2.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/oauth2/test/test_unauthorized_error.py b/oauth2/test/test_unauthorized_error.py new file mode 100644 index 00000000..12a943b0 --- /dev/null +++ b/oauth2/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from oauth2.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/oauth2/test/test_validation_error.py b/oauth2/test/test_validation_error.py new file mode 100644 index 00000000..b4f51a56 --- /dev/null +++ b/oauth2/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from oauth2.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + oauth2.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/oauth2/test/test_validation_error_all_of_errors.py b/oauth2/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..5bec90b8 --- /dev/null +++ b/oauth2/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + OAuth2 API + + This endpoint allows clients to trade their client credentials for an Access Token that can be used on subsequent calls to our API. Example of usage: ` curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" -d 'client_id=someId&scope=someScope&client_secret=someSecret&grant_type=client_credentials' 'https://api.thousandeyes.com/v7/oauth2/token' ` + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from oauth2.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming_api/.gitignore b/snapshots/.gitignore similarity index 100% rename from streaming_api/.gitignore rename to snapshots/.gitignore diff --git a/streaming_api/.openapi-generator-ignore b/snapshots/.openapi-generator-ignore similarity index 100% rename from streaming_api/.openapi-generator-ignore rename to snapshots/.openapi-generator-ignore diff --git a/snapshots/.openapi-generator/FILES b/snapshots/.openapi-generator/FILES new file mode 100644 index 00000000..db7e3787 --- /dev/null +++ b/snapshots/.openapi-generator/FILES @@ -0,0 +1,71 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AppAndSelfLinks.md +docs/AppAndSelfLinksLinks.md +docs/CreateTestSnapshotApi.md +docs/Error.md +docs/Link.md +docs/SnapshotLinks.md +docs/SnapshotRequest.md +docs/SnapshotResponse.md +docs/SnapshotResponseAllOfTest.md +docs/TestInterval.md +docs/TestType.md +docs/UnauthorizedError.md +docs/UnexpandedInstantTest.md +docs/UnexpandedInstantTestLinks.md +docs/UnexpandedInstantTestLinksSelf.md +docs/UnexpandedTest.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +snapshots/__init__.py +snapshots/api/__init__.py +snapshots/api/create_test_snapshot_api.py +snapshots/api_client.py +snapshots/api_response.py +snapshots/configuration.py +snapshots/exceptions.py +snapshots/models/__init__.py +snapshots/models/app_and_self_links.py +snapshots/models/app_and_self_links_links.py +snapshots/models/error.py +snapshots/models/link.py +snapshots/models/snapshot_links.py +snapshots/models/snapshot_request.py +snapshots/models/snapshot_response.py +snapshots/models/snapshot_response_all_of_test.py +snapshots/models/test_interval.py +snapshots/models/test_type.py +snapshots/models/unauthorized_error.py +snapshots/models/unexpanded_instant_test.py +snapshots/models/unexpanded_instant_test_links.py +snapshots/models/unexpanded_instant_test_links_self.py +snapshots/models/unexpanded_test.py +snapshots/models/validation_error.py +snapshots/models/validation_error_all_of_errors.py +snapshots/py.typed +snapshots/rest.py +test-requirements.txt +test/__init__.py +test/test_app_and_self_links.py +test/test_app_and_self_links_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_response_all_of_test.py +test/test_test_interval.py +test/test_test_type.py +test/test_unauthorized_error.py +test/test_unexpanded_instant_test.py +test/test_unexpanded_instant_test_links.py +test/test_unexpanded_instant_test_links_self.py +test/test_unexpanded_test.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/snapshots/.openapi-generator/VERSION b/snapshots/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/snapshots/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/snapshots/README.md b/snapshots/README.md new file mode 100644 index 00000000..a8bc75ff --- /dev/null +++ b/snapshots/README.md @@ -0,0 +1,138 @@ +# snapshots +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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import snapshots +``` + +### 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 snapshots +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import snapshots +from snapshots.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 = snapshots.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 = snapshots.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with snapshots.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = snapshots.CreateTestSnapshotApi(api_client) + test_id = '281474976710706' # str | Test ID. + snapshot_request = snapshots.SnapshotRequest() # SnapshotRequest | + 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 test snapshot + api_response = api_instance.create_test_snapshot(test_id, snapshot_request, aid=aid) + print("The response of CreateTestSnapshotApi->create_test_snapshot:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling CreateTestSnapshotApi->create_test_snapshot: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateTestSnapshotApi* | [**create_test_snapshot**](docs/CreateTestSnapshotApi.md#create_test_snapshot) | **POST** /v7/tests/{testId}/snapshot | Create test snapshot + + +## Documentation For Models + + - [AppAndSelfLinks](docs/AppAndSelfLinks.md) + - [AppAndSelfLinksLinks](docs/AppAndSelfLinksLinks.md) + - [Error](docs/Error.md) + - [Link](docs/Link.md) + - [SnapshotLinks](docs/SnapshotLinks.md) + - [SnapshotRequest](docs/SnapshotRequest.md) + - [SnapshotResponse](docs/SnapshotResponse.md) + - [SnapshotResponseAllOfTest](docs/SnapshotResponseAllOfTest.md) + - [TestInterval](docs/TestInterval.md) + - [TestType](docs/TestType.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) + - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) + - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) + - [UnexpandedTest](docs/UnexpandedTest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/snapshots/docs/AppAndSelfLinks.md b/snapshots/docs/AppAndSelfLinks.md new file mode 100644 index 00000000..7d1e7729 --- /dev/null +++ b/snapshots/docs/AppAndSelfLinks.md @@ -0,0 +1,29 @@ +# AppAndSelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**AppAndSelfLinksLinks**](AppAndSelfLinksLinks.md) | | [optional] + +## Example + +```python +from snapshots.models.app_and_self_links import AppAndSelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AppAndSelfLinks from a JSON string +app_and_self_links_instance = AppAndSelfLinks.from_json(json) +# print the JSON string representation of the object +print(AppAndSelfLinks.to_json()) + +# convert the object into a dict +app_and_self_links_dict = app_and_self_links_instance.to_dict() +# create an instance of AppAndSelfLinks from a dict +app_and_self_links_from_dict = AppAndSelfLinks.from_dict(app_and_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/snapshots/docs/AppAndSelfLinksLinks.md b/snapshots/docs/AppAndSelfLinksLinks.md new file mode 100644 index 00000000..c6cbe791 --- /dev/null +++ b/snapshots/docs/AppAndSelfLinksLinks.md @@ -0,0 +1,31 @@ +# AppAndSelfLinksLinks + +A links object containing the ThousandEyes App link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_link** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from snapshots.models.app_and_self_links_links import AppAndSelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AppAndSelfLinksLinks from a JSON string +app_and_self_links_links_instance = AppAndSelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(AppAndSelfLinksLinks.to_json()) + +# convert the object into a dict +app_and_self_links_links_dict = app_and_self_links_links_instance.to_dict() +# create an instance of AppAndSelfLinksLinks from a dict +app_and_self_links_links_from_dict = AppAndSelfLinksLinks.from_dict(app_and_self_links_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/snapshots_api/docs/CreateTestSnapshotApi.md b/snapshots/docs/CreateTestSnapshotApi.md similarity index 86% rename from snapshots_api/docs/CreateTestSnapshotApi.md rename to snapshots/docs/CreateTestSnapshotApi.md index 54b18c12..77278e8d 100644 --- a/snapshots_api/docs/CreateTestSnapshotApi.md +++ b/snapshots/docs/CreateTestSnapshotApi.md @@ -1,4 +1,4 @@ -# snapshots_api.CreateTestSnapshotApi +# snapshots.CreateTestSnapshotApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,18 +17,17 @@ This endpoint creates a test snapshot based on the properties provided in the PO ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import snapshots_api -from snapshots_api.models.snapshot_request import SnapshotRequest -from snapshots_api.models.snapshot_response import SnapshotResponse -from snapshots_api.rest import ApiException +import snapshots +from snapshots.models.snapshot_request import SnapshotRequest +from snapshots.models.snapshot_response import SnapshotResponse +from snapshots.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 = snapshots_api.Configuration( +configuration = snapshots.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,17 +37,17 @@ configuration = snapshots_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = snapshots_api.Configuration( +configuration = snapshots.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with snapshots_api.ApiClient(configuration) as api_client: +with snapshots.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = snapshots_api.CreateTestSnapshotApi(api_client) + api_instance = snapshots.CreateTestSnapshotApi(api_client) test_id = '281474976710706' # str | Test ID. - snapshot_request = snapshots_api.SnapshotRequest() # SnapshotRequest | - aid = '2067' # 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) + snapshot_request = snapshots.SnapshotRequest() # SnapshotRequest | + 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 test snapshot @@ -63,6 +62,7 @@ with snapshots_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID. | @@ -83,6 +83,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | - | diff --git a/snapshots/docs/Error.md b/snapshots/docs/Error.md new file mode 100644 index 00000000..d314a9bb --- /dev/null +++ b/snapshots/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 snapshots.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/snapshots/docs/Link.md b/snapshots/docs/Link.md new file mode 100644 index 00000000..6ad4d910 --- /dev/null +++ b/snapshots/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 snapshots.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/snapshots_api/docs/SnapshotLinks.md b/snapshots/docs/SnapshotLinks.md similarity index 81% rename from snapshots_api/docs/SnapshotLinks.md rename to snapshots/docs/SnapshotLinks.md index 9f986169..b743026d 100644 --- a/snapshots_api/docs/SnapshotLinks.md +++ b/snapshots/docs/SnapshotLinks.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **object** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from snapshots_api.models.snapshot_links import SnapshotLinks +from snapshots.models.snapshot_links import SnapshotLinks # TODO update the JSON string below json = "{}" # create an instance of SnapshotLinks from a JSON string snapshot_links_instance = SnapshotLinks.from_json(json) # print the JSON string representation of the object -print SnapshotLinks.to_json() +print(SnapshotLinks.to_json()) # convert the object into a dict snapshot_links_dict = snapshot_links_instance.to_dict() # create an instance of SnapshotLinks from a dict -snapshot_links_form_dict = snapshot_links.from_dict(snapshot_links_dict) +snapshot_links_from_dict = SnapshotLinks.from_dict(snapshot_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/snapshots_api/docs/SnapshotRequest.md b/snapshots/docs/SnapshotRequest.md similarity index 86% rename from snapshots_api/docs/SnapshotRequest.md rename to snapshots/docs/SnapshotRequest.md index a81fc2fd..9636639c 100644 --- a/snapshots_api/docs/SnapshotRequest.md +++ b/snapshots/docs/SnapshotRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **display_name** | **str** | Snapshot title. | @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from snapshots_api.models.snapshot_request import SnapshotRequest +from snapshots.models.snapshot_request import SnapshotRequest # TODO update the JSON string below json = "{}" # create an instance of SnapshotRequest from a JSON string snapshot_request_instance = SnapshotRequest.from_json(json) # print the JSON string representation of the object -print SnapshotRequest.to_json() +print(SnapshotRequest.to_json()) # convert the object into a dict snapshot_request_dict = snapshot_request_instance.to_dict() # create an instance of SnapshotRequest from a dict -snapshot_request_form_dict = snapshot_request.from_dict(snapshot_request_dict) +snapshot_request_from_dict = SnapshotRequest.from_dict(snapshot_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/snapshots_api/docs/SnapshotResponse.md b/snapshots/docs/SnapshotResponse.md similarity index 90% rename from snapshots_api/docs/SnapshotResponse.md rename to snapshots/docs/SnapshotResponse.md index 4936fcc4..073b843a 100644 --- a/snapshots_api/docs/SnapshotResponse.md +++ b/snapshots/docs/SnapshotResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **object** | | [optional] @@ -20,19 +21,19 @@ Name | Type | Description | Notes ## Example ```python -from snapshots_api.models.snapshot_response import SnapshotResponse +from snapshots.models.snapshot_response import SnapshotResponse # TODO update the JSON string below json = "{}" # create an instance of SnapshotResponse from a JSON string snapshot_response_instance = SnapshotResponse.from_json(json) # print the JSON string representation of the object -print SnapshotResponse.to_json() +print(SnapshotResponse.to_json()) # convert the object into a dict snapshot_response_dict = snapshot_response_instance.to_dict() # create an instance of SnapshotResponse from a dict -snapshot_response_form_dict = snapshot_response.from_dict(snapshot_response_dict) +snapshot_response_from_dict = SnapshotResponse.from_dict(snapshot_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/snapshots_api/docs/SnapshotResponseAllOfTest.md b/snapshots/docs/SnapshotResponseAllOfTest.md similarity index 89% rename from snapshots_api/docs/SnapshotResponseAllOfTest.md rename to snapshots/docs/SnapshotResponseAllOfTest.md index 1f75e3ac..0ae6b0bc 100644 --- a/snapshots_api/docs/SnapshotResponseAllOfTest.md +++ b/snapshots/docs/SnapshotResponseAllOfTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | [optional] @@ -22,19 +23,19 @@ Name | Type | Description | Notes ## Example ```python -from snapshots_api.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest +from snapshots.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest # TODO update the JSON string below json = "{}" # create an instance of SnapshotResponseAllOfTest from a JSON string snapshot_response_all_of_test_instance = SnapshotResponseAllOfTest.from_json(json) # print the JSON string representation of the object -print SnapshotResponseAllOfTest.to_json() +print(SnapshotResponseAllOfTest.to_json()) # convert the object into a dict snapshot_response_all_of_test_dict = snapshot_response_all_of_test_instance.to_dict() # create an instance of SnapshotResponseAllOfTest from a dict -snapshot_response_all_of_test_form_dict = snapshot_response_all_of_test.from_dict(snapshot_response_all_of_test_dict) +snapshot_response_all_of_test_from_dict = SnapshotResponseAllOfTest.from_dict(snapshot_response_all_of_test_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/snapshots/docs/TestInterval.md b/snapshots/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/snapshots/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/snapshots/docs/TestType.md b/snapshots/docs/TestType.md new file mode 100644 index 00000000..8093a739 --- /dev/null +++ b/snapshots/docs/TestType.md @@ -0,0 +1,12 @@ +# TestType + +This is a read only value, as test type is implicit in the test creation url. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/snapshots/docs/UnauthorizedError.md b/snapshots/docs/UnauthorizedError.md new file mode 100644 index 00000000..8ce404aa --- /dev/null +++ b/snapshots/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from snapshots.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/snapshots/docs/UnexpandedInstantTest.md b/snapshots/docs/UnexpandedInstantTest.md new file mode 100644 index 00000000..8faadaae --- /dev/null +++ b/snapshots/docs/UnexpandedInstantTest.md @@ -0,0 +1,39 @@ +# UnexpandedInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] + +## Example + +```python +from snapshots.models.unexpanded_instant_test import UnexpandedInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTest from a JSON string +unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTest.to_json()) + +# convert the object into a dict +unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() +# create an instance of UnexpandedInstantTest from a dict +unexpanded_instant_test_from_dict = UnexpandedInstantTest.from_dict(unexpanded_instant_test_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/snapshots/docs/UnexpandedInstantTestLinks.md b/snapshots/docs/UnexpandedInstantTestLinks.md new file mode 100644 index 00000000..4c6b357f --- /dev/null +++ b/snapshots/docs/UnexpandedInstantTestLinks.md @@ -0,0 +1,31 @@ +# UnexpandedInstantTestLinks + +A list of links that can be accessed to get more information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from snapshots.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTestLinks from a JSON string +unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTestLinks.to_json()) + +# convert the object into a dict +unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() +# create an instance of UnexpandedInstantTestLinks from a dict +unexpanded_instant_test_links_from_dict = UnexpandedInstantTestLinks.from_dict(unexpanded_instant_test_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/snapshots/docs/UnexpandedInstantTestLinksSelf.md b/snapshots/docs/UnexpandedInstantTestLinksSelf.md new file mode 100644 index 00000000..390b3057 --- /dev/null +++ b/snapshots/docs/UnexpandedInstantTestLinksSelf.md @@ -0,0 +1,36 @@ +# UnexpandedInstantTestLinksSelf + + +## 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 snapshots.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTestLinksSelf from a JSON string +unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTestLinksSelf.to_json()) + +# convert the object into a dict +unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() +# create an instance of UnexpandedInstantTestLinksSelf from a dict +unexpanded_instant_test_links_self_from_dict = UnexpandedInstantTestLinksSelf.from_dict(unexpanded_instant_test_links_self_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/snapshots/docs/UnexpandedTest.md b/snapshots/docs/UnexpandedTest.md new file mode 100644 index 00000000..7880e6c0 --- /dev/null +++ b/snapshots/docs/UnexpandedTest.md @@ -0,0 +1,31 @@ +# UnexpandedTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] + +## Example + +```python +from snapshots.models.unexpanded_test import UnexpandedTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedTest from a JSON string +unexpanded_test_instance = UnexpandedTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedTest.to_json()) + +# convert the object into a dict +unexpanded_test_dict = unexpanded_test_instance.to_dict() +# create an instance of UnexpandedTest from a dict +unexpanded_test_from_dict = UnexpandedTest.from_dict(unexpanded_test_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/snapshots/docs/ValidationError.md b/snapshots/docs/ValidationError.md new file mode 100644 index 00000000..8b8c3d7c --- /dev/null +++ b/snapshots/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from snapshots.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/snapshots/docs/ValidationErrorAllOfErrors.md b/snapshots/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..1a143121 --- /dev/null +++ b/snapshots/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from snapshots.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/snapshots/pyproject.toml b/snapshots/pyproject.toml new file mode 100644 index 00000000..cc808938 --- /dev/null +++ b/snapshots/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "snapshots" +version = "1.0.0" +description = "Test Snapshots API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Test Snapshots API"] +include = ["snapshots/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "snapshots", + #"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/streaming_api/requirements.txt b/snapshots/requirements.txt similarity index 100% rename from streaming_api/requirements.txt rename to snapshots/requirements.txt diff --git a/streaming_api/setup.cfg b/snapshots/setup.cfg similarity index 100% rename from streaming_api/setup.cfg rename to snapshots/setup.cfg diff --git a/snapshots/setup.py b/snapshots/setup.py new file mode 100644 index 00000000..4126852f --- /dev/null +++ b/snapshots/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "snapshots" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Test Snapshots API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/snapshots", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Test Snapshots API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + Creates a new test snapshot in ThousandEyes. + """, # noqa: E501 + package_data={"snapshots": ["py.typed"]}, +) diff --git a/snapshots/snapshots/__init__.py b/snapshots/snapshots/__init__.py new file mode 100644 index 00000000..625535a5 --- /dev/null +++ b/snapshots/snapshots/__init__.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 snapshots.api.create_test_snapshot_api import CreateTestSnapshotApi + +# import ApiClient +from snapshots.api_response import ApiResponse +from snapshots.api_client import ApiClient +from snapshots.configuration import Configuration +from snapshots.exceptions import OpenApiException +from snapshots.exceptions import ApiTypeError +from snapshots.exceptions import ApiValueError +from snapshots.exceptions import ApiKeyError +from snapshots.exceptions import ApiAttributeError +from snapshots.exceptions import ApiException + +# import models into sdk package +from snapshots.models.app_and_self_links import AppAndSelfLinks +from snapshots.models.app_and_self_links_links import AppAndSelfLinksLinks +from snapshots.models.error import Error +from snapshots.models.link import Link +from snapshots.models.snapshot_links import SnapshotLinks +from snapshots.models.snapshot_request import SnapshotRequest +from snapshots.models.snapshot_response import SnapshotResponse +from snapshots.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest +from snapshots.models.test_interval import TestInterval +from snapshots.models.test_type import TestType +from snapshots.models.unauthorized_error import UnauthorizedError +from snapshots.models.unexpanded_instant_test import UnexpandedInstantTest +from snapshots.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from snapshots.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from snapshots.models.unexpanded_test import UnexpandedTest +from snapshots.models.validation_error import ValidationError +from snapshots.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/snapshots/snapshots/api/__init__.py b/snapshots/snapshots/api/__init__.py new file mode 100644 index 00000000..0605a16b --- /dev/null +++ b/snapshots/snapshots/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from snapshots.api.create_test_snapshot_api import CreateTestSnapshotApi + diff --git a/snapshots_api/snapshots_api/api/create_test_snapshot_api.py b/snapshots/snapshots/api/create_test_snapshot_api.py similarity index 95% rename from snapshots_api/snapshots_api/api/create_test_snapshot_api.py rename to snapshots/snapshots/api/create_test_snapshot_api.py index c507df2d..c4ad1cb5 100644 --- a/snapshots_api/snapshots_api/api/create_test_snapshot_api.py +++ b/snapshots/snapshots/api/create_test_snapshot_api.py @@ -3,38 +3,28 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from snapshots.models.snapshot_request import SnapshotRequest +from snapshots.models.snapshot_response import SnapshotResponse -from snapshots_api.models.snapshot_request import SnapshotRequest -from snapshots_api.models.snapshot_response import SnapshotResponse - -from snapshots_api.api_client import ApiClient -from snapshots_api.api_response import ApiResponse -from snapshots_api.rest import RESTResponseType +from snapshots.api_client import ApiClient, RequestSerialized +from snapshots.api_response import ApiResponse +from snapshots.rest import RESTResponseType class CreateTestSnapshotApi: @@ -113,15 +103,13 @@ class CreateTestSnapshotApi: _response_types_map: Dict[str, Optional[str]] = { '201': "SnapshotResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -197,15 +185,13 @@ class CreateTestSnapshotApi: _response_types_map: Dict[str, Optional[str]] = { '201': "SnapshotResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -281,15 +267,13 @@ class CreateTestSnapshotApi: _response_types_map: Dict[str, Optional[str]] = { '201': "SnapshotResponse", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -307,19 +291,18 @@ class CreateTestSnapshotApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/snapshots/snapshots/api_client.py b/snapshots/snapshots/api_client.py new file mode 100644 index 00000000..c186213f --- /dev/null +++ b/snapshots/snapshots/api_client.py @@ -0,0 +1,770 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from snapshots.configuration import Configuration +from snapshots.api_response import ApiResponse, T as ApiResponseT +import snapshots.models +from snapshots import rest +from snapshots.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(snapshots.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/snapshots/snapshots/api_response.py b/snapshots/snapshots/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/snapshots/snapshots/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/snapshots/snapshots/configuration.py b/snapshots/snapshots/configuration.py new file mode 100644 index 00000000..7e14b07c --- /dev/null +++ b/snapshots/snapshots/configuration.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("snapshots") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/snapshots/snapshots/exceptions.py b/snapshots/snapshots/exceptions.py new file mode 100644 index 00000000..0aae62db --- /dev/null +++ b/snapshots/snapshots/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/snapshots/snapshots/models/__init__.py b/snapshots/snapshots/models/__init__.py new file mode 100644 index 00000000..c3b35ef6 --- /dev/null +++ b/snapshots/snapshots/models/__init__.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +# flake8: noqa +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from snapshots.models.app_and_self_links import AppAndSelfLinks +from snapshots.models.app_and_self_links_links import AppAndSelfLinksLinks +from snapshots.models.error import Error +from snapshots.models.link import Link +from snapshots.models.snapshot_links import SnapshotLinks +from snapshots.models.snapshot_request import SnapshotRequest +from snapshots.models.snapshot_response import SnapshotResponse +from snapshots.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest +from snapshots.models.test_interval import TestInterval +from snapshots.models.test_type import TestType +from snapshots.models.unauthorized_error import UnauthorizedError +from snapshots.models.unexpanded_instant_test import UnexpandedInstantTest +from snapshots.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from snapshots.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from snapshots.models.unexpanded_test import UnexpandedTest +from snapshots.models.validation_error import ValidationError +from snapshots.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/snapshots/snapshots/models/app_and_self_links.py b/snapshots/snapshots/models/app_and_self_links.py new file mode 100644 index 00000000..cba356bf --- /dev/null +++ b/snapshots/snapshots/models/app_and_self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 snapshots.models.app_and_self_links_links import AppAndSelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class AppAndSelfLinks(BaseModel): + """ + AppAndSelfLinks + """ # noqa: E501 + links: Optional[AppAndSelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppAndSelfLinks 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 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 AppAndSelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": AppAndSelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/snapshots/snapshots/models/app_and_self_links_links.py b/snapshots/snapshots/models/app_and_self_links_links.py new file mode 100644 index 00000000..1ed3e33f --- /dev/null +++ b/snapshots/snapshots/models/app_and_self_links_links.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 snapshots.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class AppAndSelfLinksLinks(BaseModel): + """ + A links object containing the ThousandEyes App link + """ # noqa: E501 + app_link: Optional[Link] = Field(default=None, alias="appLink") + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["appLink", "self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppAndSelfLinksLinks 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 app_link + if self.app_link: + _dict['appLink'] = self.app_link.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 AppAndSelfLinksLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appLink": Link.from_dict(obj["appLink"]) if obj.get("appLink") 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/snapshots/snapshots/models/error.py b/snapshots/snapshots/models/error.py new file mode 100644 index 00000000..30ca532c --- /dev/null +++ b/snapshots/snapshots/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/snapshots/snapshots/models/link.py b/snapshots/snapshots/models/link.py new file mode 100644 index 00000000..06890908 --- /dev/null +++ b/snapshots/snapshots/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/snapshots_api/snapshots_api/models/snapshot_links.py b/snapshots/snapshots/models/snapshot_links.py similarity index 78% rename from snapshots_api/snapshots_api/models/snapshot_links.py rename to snapshots/snapshots/models/snapshot_links.py index b7458747..e867c5c4 100644 --- a/snapshots_api/snapshots_api/models/snapshot_links.py +++ b/snapshots/snapshots/models/snapshot_links.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SnapshotLinks(BaseModel): """ @@ -33,10 +29,11 @@ class SnapshotLinks(BaseModel): links: Optional[Any] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +46,7 @@ class SnapshotLinks(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SnapshotLinks from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +60,12 @@ class SnapshotLinks(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if links (nullable) is None @@ -77,7 +76,7 @@ class SnapshotLinks(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SnapshotLinks from a dict""" if obj is None: return None diff --git a/snapshots_api/snapshots_api/models/snapshot_request.py b/snapshots/snapshots/models/snapshot_request.py similarity index 81% rename from snapshots_api/snapshots_api/models/snapshot_request.py rename to snapshots/snapshots/models/snapshot_request.py index c1c50ed3..98a4b2a3 100644 --- a/snapshots_api/snapshots_api/models/snapshot_request.py +++ b/snapshots/snapshots/models/snapshot_request.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,13 +18,10 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SnapshotRequest(BaseModel): """ @@ -36,10 +33,11 @@ class SnapshotRequest(BaseModel): is_public: Optional[StrictBool] = Field(default=None, description="Set to `true` for saved events and `false` for share links. Its default value is `false`.", alias="isPublic") __properties: ClassVar[List[str]] = ["displayName", "startDate", "endDate", "isPublic"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +50,7 @@ class SnapshotRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SnapshotRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,16 +64,18 @@ class SnapshotRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SnapshotRequest from a dict""" if obj is None: return None diff --git a/snapshots_api/snapshots_api/models/snapshot_response.py b/snapshots/snapshots/models/snapshot_response.py similarity index 80% rename from snapshots_api/snapshots_api/models/snapshot_response.py rename to snapshots/snapshots/models/snapshot_response.py index 8e236db8..f849d36a 100644 --- a/snapshots_api/snapshots_api/models/snapshot_response.py +++ b/snapshots/snapshots/models/snapshot_response.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,20 +18,17 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from snapshots_api.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from snapshots.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest +from typing import Optional, Set +from typing_extensions import Self class SnapshotResponse(BaseModel): """ SnapshotResponse """ # noqa: E501 - links: Optional[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") id: Optional[StrictStr] = Field(default=None, description="Snapshot ID.") start_round_id: Optional[StrictInt] = Field(default=None, description="The start time of the test snapshot, represented in epoch time format (in seconds).", alias="startRoundId") end_round_id: Optional[StrictInt] = Field(default=None, description="The end time of the test snapshot, represented in epoch time format (in seconds).", alias="endRoundId") @@ -45,10 +42,11 @@ class SnapshotResponse(BaseModel): test: Optional[SnapshotResponseAllOfTest] = None __properties: ClassVar[List[str]] = ["_links", "id", "startRoundId", "endRoundId", "roundId", "shareDate", "sourceTestId", "testId", "uid", "displayName", "extraParams", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +59,7 @@ class SnapshotResponse(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SnapshotResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,13 +76,15 @@ class SnapshotResponse(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "start_round_id", + "end_round_id", + "round_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "start_round_id", - "end_round_id", - "round_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of test @@ -93,7 +93,7 @@ class SnapshotResponse(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SnapshotResponse from a dict""" if obj is None: return None @@ -113,7 +113,7 @@ class SnapshotResponse(BaseModel): "uid": obj.get("uid"), "displayName": obj.get("displayName"), "extraParams": obj.get("extraParams"), - "test": SnapshotResponseAllOfTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "test": SnapshotResponseAllOfTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/snapshots_api/snapshots_api/models/snapshot_response_all_of_test.py b/snapshots/snapshots/models/snapshot_response_all_of_test.py similarity index 81% rename from snapshots_api/snapshots_api/models/snapshot_response_all_of_test.py rename to snapshots/snapshots/models/snapshot_response_all_of_test.py index 0bbcc7e1..60bfbeab 100644 --- a/snapshots_api/snapshots_api/models/snapshot_response_all_of_test.py +++ b/snapshots/snapshots/models/snapshot_response_all_of_test.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from snapshots_api.models.test_interval import TestInterval -from snapshots_api.models.test_type import TestType -from snapshots_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from snapshots.models.test_interval import TestInterval +from snapshots.models.test_type import TestType +from snapshots.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class SnapshotResponseAllOfTest(BaseModel): """ @@ -49,10 +46,11 @@ class SnapshotResponseAllOfTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -65,7 +63,7 @@ class SnapshotResponseAllOfTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SnapshotResponseAllOfTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,17 +84,19 @@ class SnapshotResponseAllOfTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -105,7 +105,7 @@ class SnapshotResponseAllOfTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SnapshotResponseAllOfTest from a dict""" if obj is None: return None @@ -127,7 +127,7 @@ class SnapshotResponseAllOfTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/snapshots/snapshots/models/test_interval.py b/snapshots/snapshots/models/test_interval.py new file mode 100644 index 00000000..45b63a48 --- /dev/null +++ b/snapshots/snapshots/models/test_interval.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/snapshots/snapshots/models/test_type.py b/snapshots/snapshots/models/test_type.py new file mode 100644 index 00000000..decd023c --- /dev/null +++ b/snapshots/snapshots/models/test_type.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TestType(str, Enum): + """ + This is a read only value, as test type is implicit in the test creation url. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + BGP = 'bgp' + HTTP_MINUS_SERVER = 'http-server' + PAGE_MINUS_LOAD = 'page-load' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + FTP_MINUS_SERVER = 'ftp-server' + DNS_MINUS_TRACE = 'dns-trace' + DNS_MINUS_SERVER = 'dns-server' + DNSSEC = 'dnssec' + SIP_MINUS_SERVER = 'sip-server' + VOICE = 'voice' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/snapshots/snapshots/models/unauthorized_error.py b/snapshots/snapshots/models/unauthorized_error.py new file mode 100644 index 00000000..282f1289 --- /dev/null +++ b/snapshots/snapshots/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/snapshots/snapshots/models/unexpanded_instant_test.py b/snapshots/snapshots/models/unexpanded_instant_test.py new file mode 100644 index 00000000..ade2dd34 --- /dev/null +++ b/snapshots/snapshots/models/unexpanded_instant_test.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from snapshots.models.test_type import TestType +from snapshots.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedInstantTest(BaseModel): + """ + UnexpandedInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/snapshots/snapshots/models/unexpanded_instant_test_links.py b/snapshots/snapshots/models/unexpanded_instant_test_links.py new file mode 100644 index 00000000..01c77a9b --- /dev/null +++ b/snapshots/snapshots/models/unexpanded_instant_test_links.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 snapshots.models.link import Link +from snapshots.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedInstantTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information + """ # noqa: E501 + var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": UnexpandedInstantTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/snapshots/snapshots/models/unexpanded_instant_test_links_self.py b/snapshots/snapshots/models/unexpanded_instant_test_links_self.py new file mode 100644 index 00000000..d58d3131 --- /dev/null +++ b/snapshots/snapshots/models/unexpanded_instant_test_links_self.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 UnexpandedInstantTestLinksSelf(BaseModel): + """ + UnexpandedInstantTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinksSelf 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 UnexpandedInstantTestLinksSelf 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/snapshots/snapshots/models/unexpanded_test.py b/snapshots/snapshots/models/unexpanded_test.py new file mode 100644 index 00000000..91542410 --- /dev/null +++ b/snapshots/snapshots/models/unexpanded_test.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from snapshots.models.test_interval import TestInterval +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedTest(BaseModel): + """ + UnexpandedTest + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedTest 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 UnexpandedTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True + }) + return _obj + + diff --git a/snapshots/snapshots/models/validation_error.py b/snapshots/snapshots/models/validation_error.py new file mode 100644 index 00000000..cb303d3b --- /dev/null +++ b/snapshots/snapshots/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 snapshots.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/snapshots/snapshots/models/validation_error_all_of_errors.py b/snapshots/snapshots/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..971be783 --- /dev/null +++ b/snapshots/snapshots/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/streaming_api/streaming_api/py.typed b/snapshots/snapshots/py.typed similarity index 100% rename from streaming_api/streaming_api/py.typed rename to snapshots/snapshots/py.typed diff --git a/snapshots/snapshots/rest.py b/snapshots/snapshots/rest.py new file mode 100644 index 00000000..d895bf8f --- /dev/null +++ b/snapshots/snapshots/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from snapshots.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/snapshots/test-requirements.txt b/snapshots/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/snapshots/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/streaming_api/test/__init__.py b/snapshots/test/__init__.py similarity index 100% rename from streaming_api/test/__init__.py rename to snapshots/test/__init__.py diff --git a/snapshots/test/test_app_and_self_links.py b/snapshots/test/test_app_and_self_links.py new file mode 100644 index 00000000..d6a49468 --- /dev/null +++ b/snapshots/test/test_app_and_self_links.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.app_and_self_links import AppAndSelfLinks + +class TestAppAndSelfLinks(unittest.TestCase): + """AppAndSelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppAndSelfLinks: + """Test AppAndSelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppAndSelfLinks` + """ + model = AppAndSelfLinks() + if include_optional: + return AppAndSelfLinks( + links = snapshots.models.app_and_self_links__links.AppAndSelfLinks__links( + app_link = snapshots.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = snapshots.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return AppAndSelfLinks( + ) + """ + + def testAppAndSelfLinks(self): + """Test AppAndSelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_app_and_self_links_links.py b/snapshots/test/test_app_and_self_links_links.py new file mode 100644 index 00000000..9a5c9cb5 --- /dev/null +++ b/snapshots/test/test_app_and_self_links_links.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.app_and_self_links_links import AppAndSelfLinksLinks + +class TestAppAndSelfLinksLinks(unittest.TestCase): + """AppAndSelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppAndSelfLinksLinks: + """Test AppAndSelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppAndSelfLinksLinks` + """ + model = AppAndSelfLinksLinks() + if include_optional: + return AppAndSelfLinksLinks( + app_link = snapshots.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = snapshots.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return AppAndSelfLinksLinks( + ) + """ + + def testAppAndSelfLinksLinks(self): + """Test AppAndSelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_error.py b/snapshots/test/test_error.py new file mode 100644 index 00000000..1ebf545f --- /dev/null +++ b/snapshots/test/test_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_link.py b/snapshots/test/test_link.py new file mode 100644 index 00000000..d87ae1d5 --- /dev/null +++ b/snapshots/test/test_link.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots_api/test/test_snapshot_links.py b/snapshots/test/test_snapshot_links.py similarity index 88% rename from snapshots_api/test/test_snapshot_links.py rename to snapshots/test/test_snapshot_links.py index f38e644e..8f0caad7 100644 --- a/snapshots_api/test/test_snapshot_links.py +++ b/snapshots/test/test_snapshot_links.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from snapshots_api.models.snapshot_links import SnapshotLinks +from snapshots.models.snapshot_links import SnapshotLinks class TestSnapshotLinks(unittest.TestCase): """SnapshotLinks unit test stubs""" diff --git a/snapshots_api/test/test_snapshot_request.py b/snapshots/test/test_snapshot_request.py similarity index 89% rename from snapshots_api/test/test_snapshot_request.py rename to snapshots/test/test_snapshot_request.py index c6d40b2a..e2d99a24 100644 --- a/snapshots_api/test/test_snapshot_request.py +++ b/snapshots/test/test_snapshot_request.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from snapshots_api.models.snapshot_request import SnapshotRequest +from snapshots.models.snapshot_request import SnapshotRequest class TestSnapshotRequest(unittest.TestCase): """SnapshotRequest unit test stubs""" diff --git a/snapshots_api/test/test_snapshot_response.py b/snapshots/test/test_snapshot_response.py similarity index 91% rename from snapshots_api/test/test_snapshot_response.py rename to snapshots/test/test_snapshot_response.py index ed069ae5..e92af088 100644 --- a/snapshots_api/test/test_snapshot_response.py +++ b/snapshots/test/test_snapshot_response.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from snapshots_api.models.snapshot_response import SnapshotResponse +from snapshots.models.snapshot_response import SnapshotResponse class TestSnapshotResponse(unittest.TestCase): """SnapshotResponse unit test stubs""" diff --git a/snapshots_api/test/test_snapshot_response_all_of_test.py b/snapshots/test/test_snapshot_response_all_of_test.py similarity index 83% rename from snapshots_api/test/test_snapshot_response_all_of_test.py rename to snapshots/test/test_snapshot_response_all_of_test.py index 1c0920d9..cd5372d6 100644 --- a/snapshots_api/test/test_snapshot_response_all_of_test.py +++ b/snapshots/test/test_snapshot_response_all_of_test.py @@ -3,9 +3,9 @@ """ Test Snapshots API - Creates a new test snapshot in ThousandEyes + Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from snapshots_api.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest +from snapshots.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest class TestSnapshotResponseAllOfTest(unittest.TestCase): """SnapshotResponseAllOfTest unit test stubs""" @@ -49,9 +48,9 @@ class TestSnapshotResponseAllOfTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'agent-to-server', - links = snapshots_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = snapshots.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) ) else: return SnapshotResponseAllOfTest( diff --git a/snapshots/test/test_test_interval.py b/snapshots/test/test_test_interval.py new file mode 100644 index 00000000..f4bcee97 --- /dev/null +++ b/snapshots/test/test_test_interval.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_test_type.py b/snapshots/test/test_test_type.py new file mode 100644 index 00000000..553c1db4 --- /dev/null +++ b/snapshots/test/test_test_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.test_type import TestType + +class TestTestType(unittest.TestCase): + """TestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestType(self): + """Test TestType""" + # inst = TestType() + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_unauthorized_error.py b/snapshots/test/test_unauthorized_error.py new file mode 100644 index 00000000..2f983163 --- /dev/null +++ b/snapshots/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_unexpanded_instant_test.py b/snapshots/test/test_unexpanded_instant_test.py new file mode 100644 index 00000000..f6777152 --- /dev/null +++ b/snapshots/test/test_unexpanded_instant_test.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.unexpanded_instant_test import UnexpandedInstantTest + +class TestUnexpandedInstantTest(unittest.TestCase): + """UnexpandedInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTest: + """Test UnexpandedInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTest` + """ + model = UnexpandedInstantTest() + if include_optional: + return UnexpandedInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = snapshots.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) + ) + else: + return UnexpandedInstantTest( + ) + """ + + def testUnexpandedInstantTest(self): + """Test UnexpandedInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_unexpanded_instant_test_links.py b/snapshots/test/test_unexpanded_instant_test_links.py new file mode 100644 index 00000000..f07fc2a1 --- /dev/null +++ b/snapshots/test/test_unexpanded_instant_test_links.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks + +class TestUnexpandedInstantTestLinks(unittest.TestCase): + """UnexpandedInstantTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: + """Test UnexpandedInstantTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTestLinks` + """ + model = UnexpandedInstantTestLinks() + if include_optional: + return UnexpandedInstantTestLinks( + var_self = None, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}] + ) + else: + return UnexpandedInstantTestLinks( + ) + """ + + def testUnexpandedInstantTestLinks(self): + """Test UnexpandedInstantTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_unexpanded_instant_test_links_self.py b/snapshots/test/test_unexpanded_instant_test_links_self.py new file mode 100644 index 00000000..f1ae26a1 --- /dev/null +++ b/snapshots/test/test_unexpanded_instant_test_links_self.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf + +class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): + """UnexpandedInstantTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: + """Test UnexpandedInstantTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` + """ + model = UnexpandedInstantTestLinksSelf() + if include_optional: + return UnexpandedInstantTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return UnexpandedInstantTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testUnexpandedInstantTestLinksSelf(self): + """Test UnexpandedInstantTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_unexpanded_test.py b/snapshots/test/test_unexpanded_test.py new file mode 100644 index 00000000..b2e7c1aa --- /dev/null +++ b/snapshots/test/test_unexpanded_test.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.unexpanded_test import UnexpandedTest + +class TestUnexpandedTest(unittest.TestCase): + """UnexpandedTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedTest: + """Test UnexpandedTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedTest` + """ + model = UnexpandedTest() + if include_optional: + return UnexpandedTest( + interval = 120, + alerts_enabled = True, + enabled = True + ) + else: + return UnexpandedTest( + ) + """ + + def testUnexpandedTest(self): + """Test UnexpandedTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_validation_error.py b/snapshots/test/test_validation_error.py new file mode 100644 index 00000000..1cb37ed5 --- /dev/null +++ b/snapshots/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + snapshots.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots/test/test_validation_error_all_of_errors.py b/snapshots/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..05fda859 --- /dev/null +++ b/snapshots/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from snapshots.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/snapshots_api/.github/workflows/python.yml b/snapshots_api/.github/workflows/python.yml deleted file mode 100644 index 9c2426b9..00000000 --- a/snapshots_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: snapshots_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/snapshots_api/.gitlab-ci.yml b/snapshots_api/.gitlab-ci.yml deleted file mode 100644 index ed7b05ff..00000000 --- a/snapshots_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=snapshots_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/snapshots_api/.openapi-generator/FILES b/snapshots_api/.openapi-generator/FILES deleted file mode 100644 index 584ba5c2..00000000 --- a/snapshots_api/.openapi-generator/FILES +++ /dev/null @@ -1,80 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AppLinks.md -docs/AppLinksLinks.md -docs/CreateTestSnapshotApi.md -docs/Error.md -docs/Link.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SnapshotLinks.md -docs/SnapshotRequest.md -docs/SnapshotResponse.md -docs/SnapshotResponseAllOfTest.md -docs/TestInterval.md -docs/TestType.md -docs/UnauthorizedError.md -docs/UnexpandedInstantTest.md -docs/UnexpandedInstantTestLinks.md -docs/UnexpandedInstantTestLinksSelf.md -docs/UnexpandedInstantTestLinksTestResults.md -docs/UnexpandedTest.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -snapshots_api/__init__.py -snapshots_api/api/__init__.py -snapshots_api/api/create_test_snapshot_api.py -snapshots_api/api_client.py -snapshots_api/api_response.py -snapshots_api/configuration.py -snapshots_api/exceptions.py -snapshots_api/models/__init__.py -snapshots_api/models/app_links.py -snapshots_api/models/app_links_links.py -snapshots_api/models/error.py -snapshots_api/models/link.py -snapshots_api/models/self_links.py -snapshots_api/models/self_links_links.py -snapshots_api/models/snapshot_links.py -snapshots_api/models/snapshot_request.py -snapshots_api/models/snapshot_response.py -snapshots_api/models/snapshot_response_all_of_test.py -snapshots_api/models/test_interval.py -snapshots_api/models/test_type.py -snapshots_api/models/unauthorized_error.py -snapshots_api/models/unexpanded_instant_test.py -snapshots_api/models/unexpanded_instant_test_links.py -snapshots_api/models/unexpanded_instant_test_links_self.py -snapshots_api/models/unexpanded_instant_test_links_test_results.py -snapshots_api/models/unexpanded_test.py -snapshots_api/py.typed -snapshots_api/rest.py -test-requirements.txt -test/__init__.py -test/test_app_links.py -test/test_app_links_links.py -test/test_create_test_snapshot_api.py -test/test_error.py -test/test_link.py -test/test_self_links.py -test/test_self_links_links.py -test/test_snapshot_links.py -test/test_snapshot_request.py -test/test_snapshot_response.py -test/test_snapshot_response_all_of_test.py -test/test_test_interval.py -test/test_test_type.py -test/test_unauthorized_error.py -test/test_unexpanded_instant_test.py -test/test_unexpanded_instant_test_links.py -test/test_unexpanded_instant_test_links_self.py -test/test_unexpanded_instant_test_links_test_results.py -test/test_unexpanded_test.py -tox.ini diff --git a/snapshots_api/.openapi-generator/VERSION b/snapshots_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/snapshots_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/snapshots_api/.travis.yml b/snapshots_api/.travis.yml deleted file mode 100644 index f2c4068f..00000000 --- a/snapshots_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=snapshots_api diff --git a/snapshots_api/README.md b/snapshots_api/README.md deleted file mode 100644 index a9e34a85..00000000 --- a/snapshots_api/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# snapshots-api -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.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import snapshots_api -``` - -### 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 snapshots_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import snapshots_api -from snapshots_api.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 = snapshots_api.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 = snapshots_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with snapshots_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = snapshots_api.CreateTestSnapshotApi(api_client) - test_id = '281474976710706' # str | Test ID. - snapshot_request = snapshots_api.SnapshotRequest() # SnapshotRequest | - aid = '2067' # 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 test snapshot - api_response = api_instance.create_test_snapshot(test_id, snapshot_request, aid=aid) - print("The response of CreateTestSnapshotApi->create_test_snapshot:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling CreateTestSnapshotApi->create_test_snapshot: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateTestSnapshotApi* | [**create_test_snapshot**](docs/CreateTestSnapshotApi.md#create_test_snapshot) | **POST** /v7/tests/{testId}/snapshot | Create test snapshot - - -## Documentation For Models - - - [AppLinks](docs/AppLinks.md) - - [AppLinksLinks](docs/AppLinksLinks.md) - - [Error](docs/Error.md) - - [Link](docs/Link.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SnapshotLinks](docs/SnapshotLinks.md) - - [SnapshotRequest](docs/SnapshotRequest.md) - - [SnapshotResponse](docs/SnapshotResponse.md) - - [SnapshotResponseAllOfTest](docs/SnapshotResponseAllOfTest.md) - - [TestInterval](docs/TestInterval.md) - - [TestType](docs/TestType.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) - - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) - - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) - - [UnexpandedInstantTestLinksTestResults](docs/UnexpandedInstantTestLinksTestResults.md) - - [UnexpandedTest](docs/UnexpandedTest.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/snapshots_api/docs/AppLinks.md b/snapshots_api/docs/AppLinks.md deleted file mode 100644 index 852cd0ed..00000000 --- a/snapshots_api/docs/AppLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# AppLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**AppLinksLinks**](AppLinksLinks.md) | | [optional] - -## Example - -```python -from snapshots_api.models.app_links import AppLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of AppLinks from a JSON string -app_links_instance = AppLinks.from_json(json) -# print the JSON string representation of the object -print AppLinks.to_json() - -# convert the object into a dict -app_links_dict = app_links_instance.to_dict() -# create an instance of AppLinks from a dict -app_links_form_dict = app_links.from_dict(app_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/snapshots_api/docs/AppLinksLinks.md b/snapshots_api/docs/AppLinksLinks.md deleted file mode 100644 index 6ec1adf0..00000000 --- a/snapshots_api/docs/AppLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# AppLinksLinks - -A links object containing the ThousandEyes App link - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_link** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from snapshots_api.models.app_links_links import AppLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of AppLinksLinks from a JSON string -app_links_links_instance = AppLinksLinks.from_json(json) -# print the JSON string representation of the object -print AppLinksLinks.to_json() - -# convert the object into a dict -app_links_links_dict = app_links_links_instance.to_dict() -# create an instance of AppLinksLinks from a dict -app_links_links_form_dict = app_links_links.from_dict(app_links_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/snapshots_api/docs/Error.md b/snapshots_api/docs/Error.md deleted file mode 100644 index a7e1b622..00000000 --- a/snapshots_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 snapshots_api.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_form_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/snapshots_api/docs/Link.md b/snapshots_api/docs/Link.md deleted file mode 100644 index 63efbc61..00000000 --- a/snapshots_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 snapshots_api.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_form_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/snapshots_api/docs/SelfLinks.md b/snapshots_api/docs/SelfLinks.md deleted file mode 100644 index d0de20c5..00000000 --- a/snapshots_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from snapshots_api.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_form_dict = self_links.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/snapshots_api/docs/SelfLinksLinks.md b/snapshots_api/docs/SelfLinksLinks.md deleted file mode 100644 index d06e9041..00000000 --- a/snapshots_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from snapshots_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/snapshots_api/docs/TestInterval.md b/snapshots_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/snapshots_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/snapshots_api/docs/TestType.md b/snapshots_api/docs/TestType.md deleted file mode 100644 index ae5d924e..00000000 --- a/snapshots_api/docs/TestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestType - -This is a read only value, as test type is implicit in the test creation url. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/snapshots_api/docs/UnauthorizedError.md b/snapshots_api/docs/UnauthorizedError.md deleted file mode 100644 index 06c5d70e..00000000 --- a/snapshots_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from snapshots_api.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_form_dict = unauthorized_error.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/snapshots_api/docs/UnexpandedInstantTest.md b/snapshots_api/docs/UnexpandedInstantTest.md deleted file mode 100644 index 73bffb5e..00000000 --- a/snapshots_api/docs/UnexpandedInstantTest.md +++ /dev/null @@ -1,38 +0,0 @@ -# UnexpandedInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from snapshots_api.models.unexpanded_instant_test import UnexpandedInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTest from a JSON string -unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTest.to_json() - -# convert the object into a dict -unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() -# create an instance of UnexpandedInstantTest from a dict -unexpanded_instant_test_form_dict = unexpanded_instant_test.from_dict(unexpanded_instant_test_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/snapshots_api/docs/UnexpandedInstantTestLinks.md b/snapshots_api/docs/UnexpandedInstantTestLinks.md deleted file mode 100644 index 3f143a9e..00000000 --- a/snapshots_api/docs/UnexpandedInstantTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedInstantTestLinks - -A list of links that can be accessed to get more information - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] -**test_results** | [**UnexpandedInstantTestLinksTestResults**](UnexpandedInstantTestLinksTestResults.md) | | [optional] - -## Example - -```python -from snapshots_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinks from a JSON string -unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinks.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() -# create an instance of UnexpandedInstantTestLinks from a dict -unexpanded_instant_test_links_form_dict = unexpanded_instant_test_links.from_dict(unexpanded_instant_test_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/snapshots_api/docs/UnexpandedInstantTestLinksSelf.md b/snapshots_api/docs/UnexpandedInstantTestLinksSelf.md deleted file mode 100644 index b8feeb83..00000000 --- a/snapshots_api/docs/UnexpandedInstantTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksSelf - - -## 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 snapshots_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksSelf from a JSON string -unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksSelf.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksSelf from a dict -unexpanded_instant_test_links_self_form_dict = unexpanded_instant_test_links_self.from_dict(unexpanded_instant_test_links_self_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/snapshots_api/docs/UnexpandedInstantTestLinksTestResults.md b/snapshots_api/docs/UnexpandedInstantTestLinksTestResults.md deleted file mode 100644 index ea9ef068..00000000 --- a/snapshots_api/docs/UnexpandedInstantTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksTestResults - - -## 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 snapshots_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksTestResults from a JSON string -unexpanded_instant_test_links_test_results_instance = UnexpandedInstantTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksTestResults.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_test_results_dict = unexpanded_instant_test_links_test_results_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksTestResults from a dict -unexpanded_instant_test_links_test_results_form_dict = unexpanded_instant_test_links_test_results.from_dict(unexpanded_instant_test_links_test_results_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/snapshots_api/docs/UnexpandedTest.md b/snapshots_api/docs/UnexpandedTest.md deleted file mode 100644 index 3382fe77..00000000 --- a/snapshots_api/docs/UnexpandedTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] - -## Example - -```python -from snapshots_api.models.unexpanded_test import UnexpandedTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedTest from a JSON string -unexpanded_test_instance = UnexpandedTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedTest.to_json() - -# convert the object into a dict -unexpanded_test_dict = unexpanded_test_instance.to_dict() -# create an instance of UnexpandedTest from a dict -unexpanded_test_form_dict = unexpanded_test.from_dict(unexpanded_test_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/snapshots_api/git_push.sh b/snapshots_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/snapshots_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/snapshots_api/pyproject.toml b/snapshots_api/pyproject.toml deleted file mode 100644 index ea16197a..00000000 --- a/snapshots_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "snapshots_api" -version = "1.0.0" -description = "Test Snapshots API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Test Snapshots API"] -include = ["snapshots_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/snapshots_api/setup.py b/snapshots_api/setup.py deleted file mode 100644 index d821361c..00000000 --- a/snapshots_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "snapshots-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Test Snapshots API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Test Snapshots API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Creates a new test snapshot in ThousandEyes - """, # noqa: E501 - package_data={"snapshots_api": ["py.typed"]}, -) diff --git a/snapshots_api/snapshots_api/__init__.py b/snapshots_api/snapshots_api/__init__.py deleted file mode 100644 index c357f22d..00000000 --- a/snapshots_api/snapshots_api/__init__.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 snapshots_api.api.create_test_snapshot_api import CreateTestSnapshotApi - -# import ApiClient -from snapshots_api.api_response import ApiResponse -from snapshots_api.api_client import ApiClient -from snapshots_api.configuration import Configuration -from snapshots_api.exceptions import OpenApiException -from snapshots_api.exceptions import ApiTypeError -from snapshots_api.exceptions import ApiValueError -from snapshots_api.exceptions import ApiKeyError -from snapshots_api.exceptions import ApiAttributeError -from snapshots_api.exceptions import ApiException - -# import models into sdk package -from snapshots_api.models.app_links import AppLinks -from snapshots_api.models.app_links_links import AppLinksLinks -from snapshots_api.models.error import Error -from snapshots_api.models.link import Link -from snapshots_api.models.self_links import SelfLinks -from snapshots_api.models.self_links_links import SelfLinksLinks -from snapshots_api.models.snapshot_links import SnapshotLinks -from snapshots_api.models.snapshot_request import SnapshotRequest -from snapshots_api.models.snapshot_response import SnapshotResponse -from snapshots_api.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest -from snapshots_api.models.test_interval import TestInterval -from snapshots_api.models.test_type import TestType -from snapshots_api.models.unauthorized_error import UnauthorizedError -from snapshots_api.models.unexpanded_instant_test import UnexpandedInstantTest -from snapshots_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from snapshots_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from snapshots_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from snapshots_api.models.unexpanded_test import UnexpandedTest diff --git a/snapshots_api/snapshots_api/api/__init__.py b/snapshots_api/snapshots_api/api/__init__.py deleted file mode 100644 index f21f668a..00000000 --- a/snapshots_api/snapshots_api/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from snapshots_api.api.create_test_snapshot_api import CreateTestSnapshotApi - diff --git a/snapshots_api/snapshots_api/api_client.py b/snapshots_api/snapshots_api/api_client.py deleted file mode 100644 index b954f189..00000000 --- a/snapshots_api/snapshots_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from snapshots_api.configuration import Configuration -from snapshots_api.api_response import ApiResponse -import snapshots_api.models -from snapshots_api import rest -from snapshots_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(snapshots_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/snapshots_api/snapshots_api/api_response.py b/snapshots_api/snapshots_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/snapshots_api/snapshots_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/snapshots_api/snapshots_api/configuration.py b/snapshots_api/snapshots_api/configuration.py deleted file mode 100644 index 743f6d27..00000000 --- a/snapshots_api/snapshots_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("snapshots_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/snapshots_api/snapshots_api/exceptions.py b/snapshots_api/snapshots_api/exceptions.py deleted file mode 100644 index 5c02bf6f..00000000 --- a/snapshots_api/snapshots_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/snapshots_api/snapshots_api/models/__init__.py b/snapshots_api/snapshots_api/models/__init__.py deleted file mode 100644 index 04c1e0a6..00000000 --- a/snapshots_api/snapshots_api/models/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from snapshots_api.models.app_links import AppLinks -from snapshots_api.models.app_links_links import AppLinksLinks -from snapshots_api.models.error import Error -from snapshots_api.models.link import Link -from snapshots_api.models.self_links import SelfLinks -from snapshots_api.models.self_links_links import SelfLinksLinks -from snapshots_api.models.snapshot_links import SnapshotLinks -from snapshots_api.models.snapshot_request import SnapshotRequest -from snapshots_api.models.snapshot_response import SnapshotResponse -from snapshots_api.models.snapshot_response_all_of_test import SnapshotResponseAllOfTest -from snapshots_api.models.test_interval import TestInterval -from snapshots_api.models.test_type import TestType -from snapshots_api.models.unauthorized_error import UnauthorizedError -from snapshots_api.models.unexpanded_instant_test import UnexpandedInstantTest -from snapshots_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from snapshots_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from snapshots_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from snapshots_api.models.unexpanded_test import UnexpandedTest diff --git a/snapshots_api/snapshots_api/models/app_links.py b/snapshots_api/snapshots_api/models/app_links.py deleted file mode 100644 index d82845f8..00000000 --- a/snapshots_api/snapshots_api/models/app_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from snapshots_api.models.app_links_links import AppLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AppLinks(BaseModel): - """ - AppLinks - """ # noqa: E501 - links: Optional[AppLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of AppLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": AppLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/models/app_links_links.py b/snapshots_api/snapshots_api/models/app_links_links.py deleted file mode 100644 index e2c47439..00000000 --- a/snapshots_api/snapshots_api/models/app_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from snapshots_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AppLinksLinks(BaseModel): - """ - A links object containing the ThousandEyes App link - """ # noqa: E501 - app_link: Optional[Link] = Field(default=None, alias="appLink") - __properties: ClassVar[List[str]] = ["appLink"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app_link - if self.app_link: - _dict['appLink'] = self.app_link.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AppLinksLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appLink": Link.from_dict(obj.get("appLink")) if obj.get("appLink") is not None else None - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/models/error.py b/snapshots_api/snapshots_api/models/error.py deleted file mode 100644 index ac48f134..00000000 --- a/snapshots_api/snapshots_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/snapshots_api/snapshots_api/models/link.py b/snapshots_api/snapshots_api/models/link.py deleted file mode 100644 index d729116e..00000000 --- a/snapshots_api/snapshots_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/snapshots_api/snapshots_api/models/self_links.py b/snapshots_api/snapshots_api/models/self_links.py deleted file mode 100644 index 32ab0e23..00000000 --- a/snapshots_api/snapshots_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from snapshots_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/models/self_links_links.py b/snapshots_api/snapshots_api/models/self_links_links.py deleted file mode 100644 index e077841e..00000000 --- a/snapshots_api/snapshots_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from snapshots_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/models/test_interval.py b/snapshots_api/snapshots_api/models/test_interval.py deleted file mode 100644 index 41c553e6..00000000 --- a/snapshots_api/snapshots_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/snapshots_api/snapshots_api/models/test_type.py b/snapshots_api/snapshots_api/models/test_type.py deleted file mode 100644 index fc784994..00000000 --- a/snapshots_api/snapshots_api/models/test_type.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestType(str, Enum): - """ - This is a read only value, as test type is implicit in the test creation url. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - BGP = 'bgp' - HTTP_MINUS_SERVER = 'http-server' - PAGE_MINUS_LOAD = 'page-load' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - FTP_MINUS_SERVER = 'ftp-server' - DNS_MINUS_TRACE = 'dns-trace' - DNS_MINUS_SERVER = 'dns-server' - DNSSEC = 'dnssec' - SIP_MINUS_SERVER = 'sip-server' - VOICE = 'voice' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/snapshots_api/snapshots_api/models/unauthorized_error.py b/snapshots_api/snapshots_api/models/unauthorized_error.py deleted file mode 100644 index c64e02f0..00000000 --- a/snapshots_api/snapshots_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/snapshots_api/snapshots_api/models/unexpanded_instant_test.py b/snapshots_api/snapshots_api/models/unexpanded_instant_test.py deleted file mode 100644 index c63b4f3c..00000000 --- a/snapshots_api/snapshots_api/models/unexpanded_instant_test.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from snapshots_api.models.test_type import TestType -from snapshots_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTest(BaseModel): - """ - UnexpandedInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UnexpandedInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/models/unexpanded_instant_test_links.py b/snapshots_api/snapshots_api/models/unexpanded_instant_test_links.py deleted file mode 100644 index 6f8889d0..00000000 --- a/snapshots_api/snapshots_api/models/unexpanded_instant_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from snapshots_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from snapshots_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information - """ # noqa: E501 - var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[UnexpandedInstantTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": UnexpandedInstantTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": UnexpandedInstantTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/models/unexpanded_instant_test_links_self.py b/snapshots_api/snapshots_api/models/unexpanded_instant_test_links_self.py deleted file mode 100644 index d4e440b8..00000000 --- a/snapshots_api/snapshots_api/models/unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinksSelf(BaseModel): - """ - UnexpandedInstantTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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/snapshots_api/snapshots_api/models/unexpanded_instant_test_links_test_results.py b/snapshots_api/snapshots_api/models/unexpanded_instant_test_links_test_results.py deleted file mode 100644 index 72b063e0..00000000 --- a/snapshots_api/snapshots_api/models/unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from snapshots_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -UNEXPANDEDINSTANTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class UnexpandedInstantTestLinksTestResults(BaseModel): - """ - UnexpandedInstantTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = UnexpandedInstantTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/snapshots_api/snapshots_api/models/unexpanded_test.py b/snapshots_api/snapshots_api/models/unexpanded_test.py deleted file mode 100644 index 0d4042a5..00000000 --- a/snapshots_api/snapshots_api/models/unexpanded_test.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from snapshots_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedTest(BaseModel): - """ - UnexpandedTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True - }) - return _obj - - diff --git a/snapshots_api/snapshots_api/rest.py b/snapshots_api/snapshots_api/rest.py deleted file mode 100644 index 87b5039f..00000000 --- a/snapshots_api/snapshots_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from snapshots_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/snapshots_api/test-requirements.txt b/snapshots_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/snapshots_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/snapshots_api/test/test_app_links.py b/snapshots_api/test/test_app_links.py deleted file mode 100644 index 4a5ae0ca..00000000 --- a/snapshots_api/test/test_app_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.app_links import AppLinks - -class TestAppLinks(unittest.TestCase): - """AppLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AppLinks: - """Test AppLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AppLinks` - """ - model = AppLinks() - if include_optional: - return AppLinks( - links = snapshots_api.models.app_links__links.AppLinks__links( - app_link = snapshots_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return AppLinks( - ) - """ - - def testAppLinks(self): - """Test AppLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_app_links_links.py b/snapshots_api/test/test_app_links_links.py deleted file mode 100644 index 468d5b9d..00000000 --- a/snapshots_api/test/test_app_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.app_links_links import AppLinksLinks - -class TestAppLinksLinks(unittest.TestCase): - """AppLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AppLinksLinks: - """Test AppLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AppLinksLinks` - """ - model = AppLinksLinks() - if include_optional: - return AppLinksLinks( - app_link = snapshots_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return AppLinksLinks( - ) - """ - - def testAppLinksLinks(self): - """Test AppLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_create_test_snapshot_api.py b/snapshots_api/test/test_create_test_snapshot_api.py deleted file mode 100644 index 4000593b..00000000 --- a/snapshots_api/test/test_create_test_snapshot_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from snapshots_api.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(self) -> None: - """Test case for create_test_snapshot - - Create test snapshot - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_error.py b/snapshots_api/test/test_error.py deleted file mode 100644 index 0364ada0..00000000 --- a/snapshots_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_link.py b/snapshots_api/test/test_link.py deleted file mode 100644 index 7abc3acf..00000000 --- a/snapshots_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_self_links.py b/snapshots_api/test/test_self_links.py deleted file mode 100644 index 82673010..00000000 --- a/snapshots_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = snapshots_api.models.self_links__links.SelfLinks__links( - self = snapshots_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_self_links_links.py b/snapshots_api/test/test_self_links_links.py deleted file mode 100644 index eb9d5fc6..00000000 --- a/snapshots_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = snapshots_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_test_interval.py b/snapshots_api/test/test_test_interval.py deleted file mode 100644 index 87140c15..00000000 --- a/snapshots_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_test_type.py b/snapshots_api/test/test_test_type.py deleted file mode 100644 index 16b026e2..00000000 --- a/snapshots_api/test/test_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.test_type import TestType - -class TestTestType(unittest.TestCase): - """TestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestType(self): - """Test TestType""" - # inst = TestType() - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_unauthorized_error.py b/snapshots_api/test/test_unauthorized_error.py deleted file mode 100644 index e9055bb4..00000000 --- a/snapshots_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_unexpanded_instant_test.py b/snapshots_api/test/test_unexpanded_instant_test.py deleted file mode 100644 index 0f8f66df..00000000 --- a/snapshots_api/test/test_unexpanded_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.unexpanded_instant_test import UnexpandedInstantTest - -class TestUnexpandedInstantTest(unittest.TestCase): - """UnexpandedInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTest: - """Test UnexpandedInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTest` - """ - model = UnexpandedInstantTest() - if include_optional: - return UnexpandedInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = snapshots_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return UnexpandedInstantTest( - ) - """ - - def testUnexpandedInstantTest(self): - """Test UnexpandedInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_unexpanded_instant_test_links.py b/snapshots_api/test/test_unexpanded_instant_test_links.py deleted file mode 100644 index e181529c..00000000 --- a/snapshots_api/test/test_unexpanded_instant_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -class TestUnexpandedInstantTestLinks(unittest.TestCase): - """UnexpandedInstantTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: - """Test UnexpandedInstantTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinks` - """ - model = UnexpandedInstantTestLinks() - if include_optional: - return UnexpandedInstantTestLinks( - var_self = None, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}] - ) - else: - return UnexpandedInstantTestLinks( - ) - """ - - def testUnexpandedInstantTestLinks(self): - """Test UnexpandedInstantTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_unexpanded_instant_test_links_self.py b/snapshots_api/test/test_unexpanded_instant_test_links_self.py deleted file mode 100644 index 74099845..00000000 --- a/snapshots_api/test/test_unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): - """UnexpandedInstantTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: - """Test UnexpandedInstantTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` - """ - model = UnexpandedInstantTestLinksSelf() - if include_optional: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksSelf(self): - """Test UnexpandedInstantTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_unexpanded_instant_test_links_test_results.py b/snapshots_api/test/test_unexpanded_instant_test_links_test_results.py deleted file mode 100644 index 9f5dfc67..00000000 --- a/snapshots_api/test/test_unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -class TestUnexpandedInstantTestLinksTestResults(unittest.TestCase): - """UnexpandedInstantTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksTestResults: - """Test UnexpandedInstantTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksTestResults` - """ - model = UnexpandedInstantTestLinksTestResults() - if include_optional: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksTestResults(self): - """Test UnexpandedInstantTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/test/test_unexpanded_test.py b/snapshots_api/test/test_unexpanded_test.py deleted file mode 100644 index afbb9591..00000000 --- a/snapshots_api/test/test_unexpanded_test.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Test Snapshots API - - Creates a new test snapshot in ThousandEyes - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from snapshots_api.models.unexpanded_test import UnexpandedTest - -class TestUnexpandedTest(unittest.TestCase): - """UnexpandedTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedTest: - """Test UnexpandedTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedTest` - """ - model = UnexpandedTest() - if include_optional: - return UnexpandedTest( - interval = 120, - alerts_enabled = True, - enabled = True - ) - else: - return UnexpandedTest( - ) - """ - - def testUnexpandedTest(self): - """Test UnexpandedTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/snapshots_api/tox.ini b/snapshots_api/tox.ini deleted file mode 100644 index 255d4160..00000000 --- a/snapshots_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=snapshots_api diff --git a/test_results_api/.gitignore b/streaming/.gitignore similarity index 100% rename from test_results_api/.gitignore rename to streaming/.gitignore diff --git a/test_results_api/.openapi-generator-ignore b/streaming/.openapi-generator-ignore similarity index 100% rename from test_results_api/.openapi-generator-ignore rename to streaming/.openapi-generator-ignore diff --git a/streaming/.openapi-generator/FILES b/streaming/.openapi-generator/FILES new file mode 100644 index 00000000..7f9e1b84 --- /dev/null +++ b/streaming/.openapi-generator/FILES @@ -0,0 +1,71 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/ApiError.md +docs/ApiErrorIntegrationLimits.md +docs/AuditOperation.md +docs/AuditOperationWithUpdate.md +docs/BadRequestError.md +docs/CreateStreamResponse.md +docs/EndpointType.md +docs/GetStreamResponse.md +docs/PutStream.md +docs/PutStreamTagMatchInner.md +docs/Stream.md +docs/StreamResponse.md +docs/StreamResponseLinks.md +docs/StreamResponseLinksSelf.md +docs/StreamType.md +docs/StreamingApi.md +docs/TagMatchObjectType.md +docs/UnauthorizedError.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +streaming/__init__.py +streaming/api/__init__.py +streaming/api/streaming_api.py +streaming/api_client.py +streaming/api_response.py +streaming/configuration.py +streaming/exceptions.py +streaming/models/__init__.py +streaming/models/api_error.py +streaming/models/api_error_integration_limits.py +streaming/models/audit_operation.py +streaming/models/audit_operation_with_update.py +streaming/models/bad_request_error.py +streaming/models/create_stream_response.py +streaming/models/endpoint_type.py +streaming/models/get_stream_response.py +streaming/models/put_stream.py +streaming/models/put_stream_tag_match_inner.py +streaming/models/stream.py +streaming/models/stream_response.py +streaming/models/stream_response_links.py +streaming/models/stream_response_links_self.py +streaming/models/stream_type.py +streaming/models/tag_match_object_type.py +streaming/models/unauthorized_error.py +streaming/py.typed +streaming/rest.py +test-requirements.txt +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_put_stream_tag_match_inner.py +test/test_stream.py +test/test_stream_response.py +test/test_stream_response_links.py +test/test_stream_response_links_self.py +test/test_stream_type.py +test/test_tag_match_object_type.py +test/test_unauthorized_error.py diff --git a/streaming/.openapi-generator/VERSION b/streaming/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/streaming/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/streaming/README.md b/streaming/README.md new file mode 100644 index 00000000..16285470 --- /dev/null +++ b/streaming/README.md @@ -0,0 +1,153 @@ +# streaming +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). + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import streaming +``` + +### 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 streaming +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import streaming +from streaming.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 = streaming.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 = streaming.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with streaming.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = streaming.StreamingApi(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) + stream = streaming.Stream() # Stream | Stream to configure (optional) + + try: + # Create data stream + api_response = api_instance.create_stream(aid=aid, stream=stream) + print("The response of StreamingApi->create_stream:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling StreamingApi->create_stream: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*StreamingApi* | [**create_stream**](docs/StreamingApi.md#create_stream) | **POST** /v7/stream | Create data stream +*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 + + +## Documentation For Models + + - [ApiError](docs/ApiError.md) + - [ApiErrorIntegrationLimits](docs/ApiErrorIntegrationLimits.md) + - [AuditOperation](docs/AuditOperation.md) + - [AuditOperationWithUpdate](docs/AuditOperationWithUpdate.md) + - [BadRequestError](docs/BadRequestError.md) + - [CreateStreamResponse](docs/CreateStreamResponse.md) + - [EndpointType](docs/EndpointType.md) + - [GetStreamResponse](docs/GetStreamResponse.md) + - [PutStream](docs/PutStream.md) + - [PutStreamTagMatchInner](docs/PutStreamTagMatchInner.md) + - [Stream](docs/Stream.md) + - [StreamResponse](docs/StreamResponse.md) + - [StreamResponseLinks](docs/StreamResponseLinks.md) + - [StreamResponseLinksSelf](docs/StreamResponseLinksSelf.md) + - [StreamType](docs/StreamType.md) + - [TagMatchObjectType](docs/TagMatchObjectType.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/streaming/docs/ApiError.md b/streaming/docs/ApiError.md new file mode 100644 index 00000000..59a3b8e2 --- /dev/null +++ b/streaming/docs/ApiError.md @@ -0,0 +1,32 @@ +# ApiError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | | [optional] +**status** | **int** | | [optional] +**errors** | **str** | | [optional] +**path** | **str** | | [optional] + +## Example + +```python +from streaming.models.api_error import ApiError + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiError from a JSON string +api_error_instance = ApiError.from_json(json) +# print the JSON string representation of the object +print(ApiError.to_json()) + +# convert the object into a dict +api_error_dict = api_error_instance.to_dict() +# create an instance of ApiError from a dict +api_error_from_dict = ApiError.from_dict(api_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/streaming_api/docs/ApiErrorIntegrationLimits.md b/streaming/docs/ApiErrorIntegrationLimits.md similarity index 79% rename from streaming_api/docs/ApiErrorIntegrationLimits.md rename to streaming/docs/ApiErrorIntegrationLimits.md index 103f9efb..d47bdb84 100644 --- a/streaming_api/docs/ApiErrorIntegrationLimits.md +++ b/streaming/docs/ApiErrorIntegrationLimits.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timestamp** | **int** | | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.api_error_integration_limits import ApiErrorIntegrationLimits +from streaming.models.api_error_integration_limits import ApiErrorIntegrationLimits # TODO update the JSON string below json = "{}" # create an instance of ApiErrorIntegrationLimits from a JSON string api_error_integration_limits_instance = ApiErrorIntegrationLimits.from_json(json) # print the JSON string representation of the object -print ApiErrorIntegrationLimits.to_json() +print(ApiErrorIntegrationLimits.to_json()) # convert the object into a dict api_error_integration_limits_dict = api_error_integration_limits_instance.to_dict() # create an instance of ApiErrorIntegrationLimits from a dict -api_error_integration_limits_form_dict = api_error_integration_limits.from_dict(api_error_integration_limits_dict) +api_error_integration_limits_from_dict = ApiErrorIntegrationLimits.from_dict(api_error_integration_limits_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/streaming_api/docs/AuditOperation.md b/streaming/docs/AuditOperation.md similarity index 83% rename from streaming_api/docs/AuditOperation.md rename to streaming/docs/AuditOperation.md index 32e8d694..ab9d92d7 100644 --- a/streaming_api/docs/AuditOperation.md +++ b/streaming/docs/AuditOperation.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **int** | ID of the user who created the integration | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.audit_operation import AuditOperation +from streaming.models.audit_operation import AuditOperation # TODO update the JSON string below json = "{}" # create an instance of AuditOperation from a JSON string audit_operation_instance = AuditOperation.from_json(json) # print the JSON string representation of the object -print AuditOperation.to_json() +print(AuditOperation.to_json()) # convert the object into a dict audit_operation_dict = audit_operation_instance.to_dict() # create an instance of AuditOperation from a dict -audit_operation_form_dict = audit_operation.from_dict(audit_operation_dict) +audit_operation_from_dict = AuditOperation.from_dict(audit_operation_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/streaming_api/docs/AuditOperationWithUpdate.md b/streaming/docs/AuditOperationWithUpdate.md similarity index 82% rename from streaming_api/docs/AuditOperationWithUpdate.md rename to streaming/docs/AuditOperationWithUpdate.md index 22d59929..9f25e0b4 100644 --- a/streaming_api/docs/AuditOperationWithUpdate.md +++ b/streaming/docs/AuditOperationWithUpdate.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **int** | ID of the user who created the integration | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.audit_operation_with_update import AuditOperationWithUpdate +from streaming.models.audit_operation_with_update import AuditOperationWithUpdate # TODO update the JSON string below json = "{}" # create an instance of AuditOperationWithUpdate from a JSON string audit_operation_with_update_instance = AuditOperationWithUpdate.from_json(json) # print the JSON string representation of the object -print AuditOperationWithUpdate.to_json() +print(AuditOperationWithUpdate.to_json()) # convert the object into a dict audit_operation_with_update_dict = audit_operation_with_update_instance.to_dict() # create an instance of AuditOperationWithUpdate from a dict -audit_operation_with_update_form_dict = audit_operation_with_update.from_dict(audit_operation_with_update_dict) +audit_operation_with_update_from_dict = AuditOperationWithUpdate.from_dict(audit_operation_with_update_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/streaming/docs/BadRequestError.md b/streaming/docs/BadRequestError.md new file mode 100644 index 00000000..7134d881 --- /dev/null +++ b/streaming/docs/BadRequestError.md @@ -0,0 +1,32 @@ +# BadRequestError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | | [optional] +**http_status** | **str** | | [optional] +**errors** | **List[str]** | | [optional] +**path** | **str** | | [optional] + +## Example + +```python +from streaming.models.bad_request_error import BadRequestError + +# TODO update the JSON string below +json = "{}" +# create an instance of BadRequestError from a JSON string +bad_request_error_instance = BadRequestError.from_json(json) +# print the JSON string representation of the object +print(BadRequestError.to_json()) + +# convert the object into a dict +bad_request_error_dict = bad_request_error_instance.to_dict() +# create an instance of BadRequestError from a dict +bad_request_error_from_dict = BadRequestError.from_dict(bad_request_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/streaming_api/docs/CreateStreamResponse.md b/streaming/docs/CreateStreamResponse.md similarity index 91% rename from streaming_api/docs/CreateStreamResponse.md rename to streaming/docs/CreateStreamResponse.md index 89f3bb09..87ab23f2 100644 --- a/streaming_api/docs/CreateStreamResponse.md +++ b/streaming/docs/CreateStreamResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The data stream ID | [optional] [readonly] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.create_stream_response import CreateStreamResponse +from streaming.models.create_stream_response import CreateStreamResponse # TODO update the JSON string below json = "{}" # create an instance of CreateStreamResponse from a JSON string create_stream_response_instance = CreateStreamResponse.from_json(json) # print the JSON string representation of the object -print CreateStreamResponse.to_json() +print(CreateStreamResponse.to_json()) # convert the object into a dict create_stream_response_dict = create_stream_response_instance.to_dict() # create an instance of CreateStreamResponse from a dict -create_stream_response_form_dict = create_stream_response.from_dict(create_stream_response_dict) +create_stream_response_from_dict = CreateStreamResponse.from_dict(create_stream_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/streaming_api/docs/EndpointType.md b/streaming/docs/EndpointType.md similarity index 99% rename from streaming_api/docs/EndpointType.md rename to streaming/docs/EndpointType.md index 339112bd..d7bf2b47 100644 --- a/streaming_api/docs/EndpointType.md +++ b/streaming/docs/EndpointType.md @@ -3,6 +3,7 @@ The type of connection used to send data to the endpoint. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/streaming_api/docs/GetStreamResponse.md b/streaming/docs/GetStreamResponse.md similarity index 92% rename from streaming_api/docs/GetStreamResponse.md rename to streaming/docs/GetStreamResponse.md index 7469d0c8..22a9ed44 100644 --- a/streaming_api/docs/GetStreamResponse.md +++ b/streaming/docs/GetStreamResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The data stream ID | [optional] [readonly] @@ -17,19 +18,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.get_stream_response import GetStreamResponse +from streaming.models.get_stream_response import GetStreamResponse # TODO update the JSON string below json = "{}" # create an instance of GetStreamResponse from a JSON string get_stream_response_instance = GetStreamResponse.from_json(json) # print the JSON string representation of the object -print GetStreamResponse.to_json() +print(GetStreamResponse.to_json()) # convert the object into a dict get_stream_response_dict = get_stream_response_instance.to_dict() # create an instance of GetStreamResponse from a dict -get_stream_response_form_dict = get_stream_response.from_dict(get_stream_response_dict) +get_stream_response_from_dict = GetStreamResponse.from_dict(get_stream_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/streaming_api/docs/PutStream.md b/streaming/docs/PutStream.md similarity index 88% rename from streaming_api/docs/PutStream.md rename to streaming/docs/PutStream.md index 05870dd6..428ca42d 100644 --- a/streaming_api/docs/PutStream.md +++ b/streaming/docs/PutStream.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **custom_headers** | **Dict[str, str]** | Custom headers | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.put_stream import PutStream +from streaming.models.put_stream import PutStream # TODO update the JSON string below json = "{}" # create an instance of PutStream from a JSON string put_stream_instance = PutStream.from_json(json) # print the JSON string representation of the object -print PutStream.to_json() +print(PutStream.to_json()) # convert the object into a dict put_stream_dict = put_stream_instance.to_dict() # create an instance of PutStream from a dict -put_stream_form_dict = put_stream.from_dict(put_stream_dict) +put_stream_from_dict = PutStream.from_dict(put_stream_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/streaming_api/docs/PutStreamTagMatchInner.md b/streaming/docs/PutStreamTagMatchInner.md similarity index 80% rename from streaming_api/docs/PutStreamTagMatchInner.md rename to streaming/docs/PutStreamTagMatchInner.md index 2a38aa11..7befd5ce 100644 --- a/streaming_api/docs/PutStreamTagMatchInner.md +++ b/streaming/docs/PutStreamTagMatchInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object_type** | [**TagMatchObjectType**](TagMatchObjectType.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner # TODO update the JSON string below json = "{}" # create an instance of PutStreamTagMatchInner from a JSON string put_stream_tag_match_inner_instance = PutStreamTagMatchInner.from_json(json) # print the JSON string representation of the object -print PutStreamTagMatchInner.to_json() +print(PutStreamTagMatchInner.to_json()) # convert the object into a dict put_stream_tag_match_inner_dict = put_stream_tag_match_inner_instance.to_dict() # create an instance of PutStreamTagMatchInner from a dict -put_stream_tag_match_inner_form_dict = put_stream_tag_match_inner.from_dict(put_stream_tag_match_inner_dict) +put_stream_tag_match_inner_from_dict = PutStreamTagMatchInner.from_dict(put_stream_tag_match_inner_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/streaming_api/docs/Stream.md b/streaming/docs/Stream.md similarity index 94% rename from streaming_api/docs/Stream.md rename to streaming/docs/Stream.md index 77a1fe90..ca22e5cc 100644 --- a/streaming_api/docs/Stream.md +++ b/streaming/docs/Stream.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **custom_headers** | **Dict[str, str]** | Custom headers | [optional] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.stream import Stream +from streaming.models.stream import Stream # TODO update the JSON string below json = "{}" # create an instance of Stream from a JSON string stream_instance = Stream.from_json(json) # print the JSON string representation of the object -print Stream.to_json() +print(Stream.to_json()) # convert the object into a dict stream_dict = stream_instance.to_dict() # create an instance of Stream from a dict -stream_form_dict = stream.from_dict(stream_dict) +stream_from_dict = Stream.from_dict(stream_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/streaming_api/docs/StreamResponse.md b/streaming/docs/StreamResponse.md similarity index 84% rename from streaming_api/docs/StreamResponse.md rename to streaming/docs/StreamResponse.md index 80219a45..aac3106f 100644 --- a/streaming_api/docs/StreamResponse.md +++ b/streaming/docs/StreamResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The data stream ID | [optional] [readonly] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.stream_response import StreamResponse +from streaming.models.stream_response import StreamResponse # TODO update the JSON string below json = "{}" # create an instance of StreamResponse from a JSON string stream_response_instance = StreamResponse.from_json(json) # print the JSON string representation of the object -print StreamResponse.to_json() +print(StreamResponse.to_json()) # convert the object into a dict stream_response_dict = stream_response_instance.to_dict() # create an instance of StreamResponse from a dict -stream_response_form_dict = stream_response.from_dict(stream_response_dict) +stream_response_from_dict = StreamResponse.from_dict(stream_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/streaming_api/docs/StreamResponseLinks.md b/streaming/docs/StreamResponseLinks.md similarity index 79% rename from streaming_api/docs/StreamResponseLinks.md rename to streaming/docs/StreamResponseLinks.md index d21f1b76..69964750 100644 --- a/streaming_api/docs/StreamResponseLinks.md +++ b/streaming/docs/StreamResponseLinks.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_self** | [**StreamResponseLinksSelf**](StreamResponseLinksSelf.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.stream_response_links import StreamResponseLinks +from streaming.models.stream_response_links import StreamResponseLinks # TODO update the JSON string below json = "{}" # create an instance of StreamResponseLinks from a JSON string stream_response_links_instance = StreamResponseLinks.from_json(json) # print the JSON string representation of the object -print StreamResponseLinks.to_json() +print(StreamResponseLinks.to_json()) # convert the object into a dict stream_response_links_dict = stream_response_links_instance.to_dict() # create an instance of StreamResponseLinks from a dict -stream_response_links_form_dict = stream_response_links.from_dict(stream_response_links_dict) +stream_response_links_from_dict = StreamResponseLinks.from_dict(stream_response_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/streaming_api/docs/StreamResponseLinksSelf.md b/streaming/docs/StreamResponseLinksSelf.md similarity index 77% rename from streaming_api/docs/StreamResponseLinksSelf.md rename to streaming/docs/StreamResponseLinksSelf.md index eb79e9aa..ed8a734d 100644 --- a/streaming_api/docs/StreamResponseLinksSelf.md +++ b/streaming/docs/StreamResponseLinksSelf.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **href** | **str** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from streaming_api.models.stream_response_links_self import StreamResponseLinksSelf +from streaming.models.stream_response_links_self import StreamResponseLinksSelf # TODO update the JSON string below json = "{}" # create an instance of StreamResponseLinksSelf from a JSON string stream_response_links_self_instance = StreamResponseLinksSelf.from_json(json) # print the JSON string representation of the object -print StreamResponseLinksSelf.to_json() +print(StreamResponseLinksSelf.to_json()) # convert the object into a dict stream_response_links_self_dict = stream_response_links_self_instance.to_dict() # create an instance of StreamResponseLinksSelf from a dict -stream_response_links_self_form_dict = stream_response_links_self.from_dict(stream_response_links_self_dict) +stream_response_links_self_from_dict = StreamResponseLinksSelf.from_dict(stream_response_links_self_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/streaming_api/docs/StreamType.md b/streaming/docs/StreamType.md similarity index 99% rename from streaming_api/docs/StreamType.md rename to streaming/docs/StreamType.md index 60572484..a77a8606 100644 --- a/streaming_api/docs/StreamType.md +++ b/streaming/docs/StreamType.md @@ -3,6 +3,7 @@ The type of data stream to configure. Currently, only `opentelemetry` is supported. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/streaming_api/docs/StreamingApi.md b/streaming/docs/StreamingApi.md similarity index 82% rename from streaming_api/docs/StreamingApi.md rename to streaming/docs/StreamingApi.md index 450d9c34..ff4cf245 100644 --- a/streaming_api/docs/StreamingApi.md +++ b/streaming/docs/StreamingApi.md @@ -1,4 +1,4 @@ -# streaming_api.StreamingApi +# streaming.StreamingApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,18 +21,17 @@ Creates a new data stream. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import streaming_api -from streaming_api.models.create_stream_response import CreateStreamResponse -from streaming_api.models.stream import Stream -from streaming_api.rest import ApiException +import streaming +from streaming.models.create_stream_response import CreateStreamResponse +from streaming.models.stream import Stream +from streaming.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 = streaming_api.Configuration( +configuration = streaming.Configuration( host = "https://api.thousandeyes.com" ) @@ -42,16 +41,16 @@ configuration = streaming_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = streaming_api.Configuration( +configuration = streaming.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with streaming_api.ApiClient(configuration) as api_client: +with streaming.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = streaming_api.StreamingApi(api_client) - aid = '2067' # 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) - stream = streaming_api.Stream() # Stream | Stream to configure (optional) + api_instance = streaming.StreamingApi(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) + stream = streaming.Stream() # Stream | Stream to configure (optional) try: # Create data stream @@ -66,6 +65,7 @@ with streaming_api.ApiClient(configuration) as api_client: ### 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] @@ -82,9 +82,10 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/json, application/problem+json + - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | item created | - | @@ -106,16 +107,15 @@ Deletes a configured data stream using its ID. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import streaming_api -from streaming_api.rest import ApiException +import streaming +from streaming.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 = streaming_api.Configuration( +configuration = streaming.Configuration( host = "https://api.thousandeyes.com" ) @@ -125,16 +125,16 @@ configuration = streaming_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = streaming_api.Configuration( +configuration = streaming.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with streaming_api.ApiClient(configuration) as api_client: +with streaming.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = streaming_api.StreamingApi(api_client) + api_instance = streaming.StreamingApi(api_client) id = 'id_example' # str | ID of stream to query - aid = '2067' # 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) + 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 a data stream @@ -147,6 +147,7 @@ with streaming_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| ID of stream to query | @@ -163,9 +164,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -187,18 +189,17 @@ Retrieves a configured data stream using its ID. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import streaming_api -from streaming_api.models.get_stream_response import GetStreamResponse -from streaming_api.models.stream_type import StreamType -from streaming_api.rest import ApiException +import streaming +from streaming.models.get_stream_response import GetStreamResponse +from streaming.models.stream_type import StreamType +from streaming.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 = streaming_api.Configuration( +configuration = streaming.Configuration( host = "https://api.thousandeyes.com" ) @@ -208,17 +209,17 @@ configuration = streaming_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = streaming_api.Configuration( +configuration = streaming.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with streaming_api.ApiClient(configuration) as api_client: +with streaming.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = streaming_api.StreamingApi(api_client) + api_instance = streaming.StreamingApi(api_client) id = 'id_example' # str | ID of stream to query - aid = '2067' # 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) - type = streaming_api.StreamType() # StreamType | Optional filter on type of Stream; should match one of Stream `type` enum (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) + type = streaming.StreamType() # StreamType | Optional filter on type of Stream; should match one of Stream `type` enum (optional) try: # Retrieve data stream @@ -233,6 +234,7 @@ with streaming_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| ID of stream to query | @@ -250,9 +252,10 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json, application/json + - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -274,18 +277,17 @@ Retrieves a list of configured data streams. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import streaming_api -from streaming_api.models.get_stream_response import GetStreamResponse -from streaming_api.models.stream_type import StreamType -from streaming_api.rest import ApiException +import streaming +from streaming.models.get_stream_response import GetStreamResponse +from streaming.models.stream_type import StreamType +from streaming.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 = streaming_api.Configuration( +configuration = streaming.Configuration( host = "https://api.thousandeyes.com" ) @@ -295,16 +297,16 @@ configuration = streaming_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = streaming_api.Configuration( +configuration = streaming.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with streaming_api.ApiClient(configuration) as api_client: +with streaming.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = streaming_api.StreamingApi(api_client) - aid = '2067' # 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) - type = streaming_api.StreamType() # StreamType | Optional filter on type of Stream; should match one of Stream `type` enum (optional) + api_instance = streaming.StreamingApi(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) + type = streaming.StreamType() # StreamType | Optional filter on type of Stream; should match one of Stream `type` enum (optional) try: # List data streams @@ -319,6 +321,7 @@ with streaming_api.ApiClient(configuration) as api_client: ### 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] @@ -335,9 +338,10 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/json, application/problem+json + - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -360,18 +364,17 @@ Updates a configured data stream using its ID. The fields are overwritten, not a ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import streaming_api -from streaming_api.models.get_stream_response import GetStreamResponse -from streaming_api.models.put_stream import PutStream -from streaming_api.rest import ApiException +import streaming +from streaming.models.get_stream_response import GetStreamResponse +from streaming.models.put_stream import PutStream +from streaming.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 = streaming_api.Configuration( +configuration = streaming.Configuration( host = "https://api.thousandeyes.com" ) @@ -381,17 +384,17 @@ configuration = streaming_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = streaming_api.Configuration( +configuration = streaming.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with streaming_api.ApiClient(configuration) as api_client: +with streaming.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = streaming_api.StreamingApi(api_client) + api_instance = streaming.StreamingApi(api_client) id = 'id_example' # str | ID of stream to query - aid = '2067' # 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) - put_stream = streaming_api.PutStream() # PutStream | (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) + put_stream = streaming.PutStream() # PutStream | (optional) try: # Update data stream @@ -406,6 +409,7 @@ with streaming_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| ID of stream to query | @@ -423,9 +427,10 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/json, application/problem+json + - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Stream updated | - | diff --git a/streaming_api/docs/TagMatchObjectType.md b/streaming/docs/TagMatchObjectType.md similarity index 99% rename from streaming_api/docs/TagMatchObjectType.md rename to streaming/docs/TagMatchObjectType.md index 0d9ed32f..62eb324e 100644 --- a/streaming_api/docs/TagMatchObjectType.md +++ b/streaming/docs/TagMatchObjectType.md @@ -3,6 +3,7 @@ The object type of tag ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/streaming/docs/UnauthorizedError.md b/streaming/docs/UnauthorizedError.md new file mode 100644 index 00000000..4897f138 --- /dev/null +++ b/streaming/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from streaming.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/streaming/pyproject.toml b/streaming/pyproject.toml new file mode 100644 index 00000000..0b7cc265 --- /dev/null +++ b/streaming/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "streaming" +version = "1.0.0" +description = "ThousandEyes for OpenTelemetry API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "ThousandEyes for OpenTelemetry API"] +include = ["streaming/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "streaming", + #"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/test_results_api/requirements.txt b/streaming/requirements.txt similarity index 100% rename from test_results_api/requirements.txt rename to streaming/requirements.txt diff --git a/test_results_api/setup.cfg b/streaming/setup.cfg similarity index 100% rename from test_results_api/setup.cfg rename to streaming/setup.cfg diff --git a/streaming/setup.py b/streaming/setup.py new file mode 100644 index 00000000..b11b8acb --- /dev/null +++ b/streaming/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "streaming" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="ThousandEyes for OpenTelemetry API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/streaming", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "ThousandEyes for OpenTelemetry API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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). + """, # noqa: E501 + package_data={"streaming": ["py.typed"]}, +) diff --git a/streaming/streaming/__init__.py b/streaming/streaming/__init__.py new file mode 100644 index 00000000..0b13742e --- /dev/null +++ b/streaming/streaming/__init__.py @@ -0,0 +1,50 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 streaming.api.streaming_api import StreamingApi + +# import ApiClient +from streaming.api_response import ApiResponse +from streaming.api_client import ApiClient +from streaming.configuration import Configuration +from streaming.exceptions import OpenApiException +from streaming.exceptions import ApiTypeError +from streaming.exceptions import ApiValueError +from streaming.exceptions import ApiKeyError +from streaming.exceptions import ApiAttributeError +from streaming.exceptions import ApiException + +# import models into sdk package +from streaming.models.api_error import ApiError +from streaming.models.api_error_integration_limits import ApiErrorIntegrationLimits +from streaming.models.audit_operation import AuditOperation +from streaming.models.audit_operation_with_update import AuditOperationWithUpdate +from streaming.models.bad_request_error import BadRequestError +from streaming.models.create_stream_response import CreateStreamResponse +from streaming.models.endpoint_type import EndpointType +from streaming.models.get_stream_response import GetStreamResponse +from streaming.models.put_stream import PutStream +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from streaming.models.stream import Stream +from streaming.models.stream_response import StreamResponse +from streaming.models.stream_response_links import StreamResponseLinks +from streaming.models.stream_response_links_self import StreamResponseLinksSelf +from streaming.models.stream_type import StreamType +from streaming.models.tag_match_object_type import TagMatchObjectType +from streaming.models.unauthorized_error import UnauthorizedError diff --git a/streaming/streaming/api/__init__.py b/streaming/streaming/api/__init__.py new file mode 100644 index 00000000..ec495174 --- /dev/null +++ b/streaming/streaming/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from streaming.api.streaming_api import StreamingApi + diff --git a/streaming_api/streaming_api/api/streaming_api.py b/streaming/streaming/api/streaming_api.py similarity index 95% rename from streaming_api/streaming_api/api/streaming_api.py rename to streaming/streaming/api/streaming_api.py index 8d0b36c6..fb0d6c33 100644 --- a/streaming_api/streaming_api/api/streaming_api.py +++ b/streaming/streaming/api/streaming_api.py @@ -1,43 +1,33 @@ # coding: utf-8 """ - ThousandEyes for OpenTelemetry + ThousandEyes for OpenTelemetry API - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from streaming.models.create_stream_response import CreateStreamResponse +from streaming.models.get_stream_response import GetStreamResponse +from streaming.models.put_stream import PutStream +from streaming.models.stream import Stream +from streaming.models.stream_type import StreamType -from streaming_api.models.create_stream_response import CreateStreamResponse -from streaming_api.models.get_stream_response import GetStreamResponse -from streaming_api.models.put_stream import PutStream -from streaming_api.models.stream import Stream -from streaming_api.models.stream_type import StreamType - -from streaming_api.api_client import ApiClient -from streaming_api.api_response import ApiResponse -from streaming_api.rest import RESTResponseType +from streaming.api_client import ApiClient, RequestSerialized +from streaming.api_response import ApiResponse +from streaming.rest import RESTResponseType class StreamingApi: @@ -116,8 +106,7 @@ class StreamingApi: '401': "UnauthorizedError", '409': None, '412': "ApiErrorIntegrationLimits", - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -193,8 +182,7 @@ class StreamingApi: '401': "UnauthorizedError", '409': None, '412': "ApiErrorIntegrationLimits", - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -270,8 +258,7 @@ class StreamingApi: '401': "UnauthorizedError", '409': None, '412': "ApiErrorIntegrationLimits", - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -288,19 +275,18 @@ class StreamingApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -320,7 +306,6 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', - 'application/json', 'application/problem+json' ] ) @@ -420,7 +405,12 @@ class StreamingApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': None, + '404': None, + '429': None, + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -491,7 +481,12 @@ class StreamingApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': None, + '404': None, + '429': None, + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -562,7 +557,12 @@ class StreamingApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': None, + '404': None, + '429': None, + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -579,19 +579,18 @@ class StreamingApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -610,7 +609,6 @@ class StreamingApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -706,8 +704,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -787,8 +784,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -868,8 +864,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -887,19 +882,18 @@ class StreamingApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -923,8 +917,7 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', - 'application/problem+json', - 'application/json' + 'application/problem+json' ] ) @@ -1016,8 +1009,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -1094,8 +1086,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -1172,8 +1163,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -1190,19 +1180,18 @@ class StreamingApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1224,7 +1213,6 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', - 'application/json', 'application/problem+json' ] ) @@ -1322,8 +1310,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -1405,8 +1392,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -1488,8 +1474,7 @@ class StreamingApi: '403': None, '404': None, '429': None, - '500': "ApiError" - + '500': "ApiError", } response_data = self.api_client.call_api( *_param, @@ -1507,19 +1492,18 @@ class StreamingApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1541,7 +1525,6 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', - 'application/json', 'application/problem+json' ] ) diff --git a/streaming/streaming/api_client.py b/streaming/streaming/api_client.py new file mode 100644 index 00000000..d6a814d5 --- /dev/null +++ b/streaming/streaming/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from streaming.configuration import Configuration +from streaming.api_response import ApiResponse, T as ApiResponseT +import streaming.models +from streaming import rest +from streaming.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(streaming.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/streaming/streaming/api_response.py b/streaming/streaming/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/streaming/streaming/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/streaming/streaming/configuration.py b/streaming/streaming/configuration.py new file mode 100644 index 00000000..bd112528 --- /dev/null +++ b/streaming/streaming/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("streaming") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/streaming/streaming/exceptions.py b/streaming/streaming/exceptions.py new file mode 100644 index 00000000..9f9e9803 --- /dev/null +++ b/streaming/streaming/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/streaming/streaming/models/__init__.py b/streaming/streaming/models/__init__.py new file mode 100644 index 00000000..141896bf --- /dev/null +++ b/streaming/streaming/models/__init__.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from streaming.models.api_error import ApiError +from streaming.models.api_error_integration_limits import ApiErrorIntegrationLimits +from streaming.models.audit_operation import AuditOperation +from streaming.models.audit_operation_with_update import AuditOperationWithUpdate +from streaming.models.bad_request_error import BadRequestError +from streaming.models.create_stream_response import CreateStreamResponse +from streaming.models.endpoint_type import EndpointType +from streaming.models.get_stream_response import GetStreamResponse +from streaming.models.put_stream import PutStream +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from streaming.models.stream import Stream +from streaming.models.stream_response import StreamResponse +from streaming.models.stream_response_links import StreamResponseLinks +from streaming.models.stream_response_links_self import StreamResponseLinksSelf +from streaming.models.stream_type import StreamType +from streaming.models.tag_match_object_type import TagMatchObjectType +from streaming.models.unauthorized_error import UnauthorizedError diff --git a/streaming/streaming/models/api_error.py b/streaming/streaming/models/api_error.py new file mode 100644 index 00000000..d2d224cd --- /dev/null +++ b/streaming/streaming/models/api_error.py @@ -0,0 +1,93 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiError(BaseModel): + """ + ApiError + """ # noqa: E501 + timestamp: Optional[StrictInt] = None + status: Optional[StrictInt] = None + errors: Optional[StrictStr] = None + path: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["timestamp", "status", "errors", "path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiError 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 ApiError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "status": obj.get("status"), + "errors": obj.get("errors"), + "path": obj.get("path") + }) + return _obj + + diff --git a/streaming/streaming/models/api_error_integration_limits.py b/streaming/streaming/models/api_error_integration_limits.py new file mode 100644 index 00000000..d2ac4933 --- /dev/null +++ b/streaming/streaming/models/api_error_integration_limits.py @@ -0,0 +1,93 @@ +# 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.2 + 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 ApiErrorIntegrationLimits(BaseModel): + """ + ApiErrorIntegrationLimits + """ # noqa: E501 + timestamp: Optional[StrictInt] = None + http_status: Optional[StrictStr] = Field(default=None, alias="httpStatus") + errors: Optional[List[StrictStr]] = None + path: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["timestamp", "httpStatus", "errors", "path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiErrorIntegrationLimits 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 ApiErrorIntegrationLimits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "httpStatus": obj.get("httpStatus"), + "errors": obj.get("errors"), + "path": obj.get("path") + }) + return _obj + + diff --git a/streaming/streaming/models/audit_operation.py b/streaming/streaming/models/audit_operation.py new file mode 100644 index 00000000..51f1e16c --- /dev/null +++ b/streaming/streaming/models/audit_operation.py @@ -0,0 +1,89 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuditOperation(BaseModel): + """ + AuditOperation + """ # noqa: E501 + created_by: Optional[StrictInt] = Field(default=None, description="ID of the user who created the integration", alias="createdBy") + created_date: Optional[StrictInt] = Field(default=None, description="Creation date of the integration", alias="createdDate") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuditOperation 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 AuditOperation from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate") + }) + return _obj + + diff --git a/streaming/streaming/models/audit_operation_with_update.py b/streaming/streaming/models/audit_operation_with_update.py new file mode 100644 index 00000000..f56fb78e --- /dev/null +++ b/streaming/streaming/models/audit_operation_with_update.py @@ -0,0 +1,103 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuditOperationWithUpdate(BaseModel): + """ + AuditOperationWithUpdate + """ # noqa: E501 + created_by: Optional[StrictInt] = Field(default=None, description="ID of the user who created the integration", alias="createdBy") + created_date: Optional[StrictInt] = Field(default=None, description="Creation date of the integration", alias="createdDate") + updated_by: Optional[StrictInt] = Field(default=None, description="ID of the user who last updated the integration", alias="updatedBy") + updated_date: Optional[StrictInt] = Field(default=None, description="Date of the last update to the integration", alias="updatedDate") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "updatedBy", "updatedDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuditOperationWithUpdate 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, + ) + # set to None if updated_by (nullable) is None + # and model_fields_set contains the field + if self.updated_by is None and "updated_by" in self.model_fields_set: + _dict['updatedBy'] = None + + # set to None if updated_date (nullable) is None + # and model_fields_set contains the field + if self.updated_date is None and "updated_date" in self.model_fields_set: + _dict['updatedDate'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuditOperationWithUpdate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "updatedBy": obj.get("updatedBy"), + "updatedDate": obj.get("updatedDate") + }) + return _obj + + diff --git a/streaming/streaming/models/bad_request_error.py b/streaming/streaming/models/bad_request_error.py new file mode 100644 index 00000000..1733f0b3 --- /dev/null +++ b/streaming/streaming/models/bad_request_error.py @@ -0,0 +1,93 @@ +# 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.2 + 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 BadRequestError(BaseModel): + """ + BadRequestError + """ # noqa: E501 + timestamp: Optional[StrictInt] = None + http_status: Optional[StrictStr] = Field(default=None, alias="httpStatus") + errors: Optional[List[StrictStr]] = None + path: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["timestamp", "httpStatus", "errors", "path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BadRequestError 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 BadRequestError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "httpStatus": obj.get("httpStatus"), + "errors": obj.get("errors"), + "path": obj.get("path") + }) + return _obj + + diff --git a/streaming/streaming/models/create_stream_response.py b/streaming/streaming/models/create_stream_response.py new file mode 100644 index 00000000..5b6c8623 --- /dev/null +++ b/streaming/streaming/models/create_stream_response.py @@ -0,0 +1,123 @@ +# 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.2 + 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 streaming.models.audit_operation import AuditOperation +from streaming.models.endpoint_type import EndpointType +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from streaming.models.stream_response_links import StreamResponseLinks +from streaming.models.stream_type import StreamType +from typing import Optional, Set +from typing_extensions import Self + +class CreateStreamResponse(BaseModel): + """ + CreateStreamResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The data stream ID") + enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") + links: Optional[StreamResponseLinks] = Field(default=None, alias="_links") + 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") + custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") + tag_match: Optional[List[PutStreamTagMatchInner]] = 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") + audit_operation: Optional[AuditOperation] = Field(default=None, alias="auditOperation") + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "auditOperation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateStreamResponse 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([ + "id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 tag_match (list) + _items = [] + if self.tag_match: + for _item in self.tag_match: + if _item: + _items.append(_item.to_dict()) + _dict['tagMatch'] = _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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateStreamResponse 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"), + "enabled": obj.get("enabled"), + "_links": StreamResponseLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "endpointType": obj.get("endpointType"), + "streamEndpointUrl": obj.get("streamEndpointUrl"), + "customHeaders": obj.get("customHeaders"), + "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") 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/streaming/streaming/models/endpoint_type.py b/streaming/streaming/models/endpoint_type.py new file mode 100644 index 00000000..fd0836f3 --- /dev/null +++ b/streaming/streaming/models/endpoint_type.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.2 + 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 EndpointType(str, Enum): + """ + The type of connection used to send data to the endpoint. + """ + + """ + allowed enum values + """ + GRPC = 'grpc' + HTTP = 'http' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EndpointType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/streaming/streaming/models/get_stream_response.py b/streaming/streaming/models/get_stream_response.py new file mode 100644 index 00000000..668cba7a --- /dev/null +++ b/streaming/streaming/models/get_stream_response.py @@ -0,0 +1,123 @@ +# 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.2 + 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 streaming.models.audit_operation_with_update import AuditOperationWithUpdate +from streaming.models.endpoint_type import EndpointType +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from streaming.models.stream_response_links import StreamResponseLinks +from streaming.models.stream_type import StreamType +from typing import Optional, Set +from typing_extensions import Self + +class GetStreamResponse(BaseModel): + """ + GetStreamResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The data stream ID") + enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") + links: Optional[StreamResponseLinks] = Field(default=None, alias="_links") + 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") + custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") + tag_match: Optional[List[PutStreamTagMatchInner]] = 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") + audit_operation: Optional[AuditOperationWithUpdate] = Field(default=None, alias="auditOperation") + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "auditOperation"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetStreamResponse 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([ + "id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 tag_match (list) + _items = [] + if self.tag_match: + for _item in self.tag_match: + if _item: + _items.append(_item.to_dict()) + _dict['tagMatch'] = _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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetStreamResponse 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"), + "enabled": obj.get("enabled"), + "_links": StreamResponseLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "type": obj.get("type"), + "endpointType": obj.get("endpointType"), + "streamEndpointUrl": obj.get("streamEndpointUrl"), + "customHeaders": obj.get("customHeaders"), + "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") 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/streaming/streaming/models/put_stream.py b/streaming/streaming/models/put_stream.py new file mode 100644 index 00000000..aa563f43 --- /dev/null +++ b/streaming/streaming/models/put_stream.py @@ -0,0 +1,99 @@ +# 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.2 + 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 streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from typing import Optional, Set +from typing_extensions import Self + +class PutStream(BaseModel): + """ + PutStream + """ # noqa: E501 + custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") + tag_match: Optional[List[PutStreamTagMatchInner]] = 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") + enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") + __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PutStream 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 tag_match (list) + _items = [] + if self.tag_match: + for _item in self.tag_match: + if _item: + _items.append(_item.to_dict()) + _dict['tagMatch'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PutStream from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customHeaders": obj.get("customHeaders"), + "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, + "enabled": obj.get("enabled") + }) + return _obj + + diff --git a/streaming/streaming/models/put_stream_tag_match_inner.py b/streaming/streaming/models/put_stream_tag_match_inner.py new file mode 100644 index 00000000..15ee247c --- /dev/null +++ b/streaming/streaming/models/put_stream_tag_match_inner.py @@ -0,0 +1,92 @@ +# 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.2 + 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 streaming.models.tag_match_object_type import TagMatchObjectType +from typing import Optional, Set +from typing_extensions import Self + +class PutStreamTagMatchInner(BaseModel): + """ + PutStreamTagMatchInner + """ # noqa: E501 + object_type: Optional[TagMatchObjectType] = Field(default=None, alias="objectType") + key: Optional[StrictStr] = Field(default=None, description="The name of the tag key to match") + value: Optional[StrictStr] = Field(default=None, description="The value of the tag to match") + __properties: ClassVar[List[str]] = ["objectType", "key", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PutStreamTagMatchInner 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 PutStreamTagMatchInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "objectType": obj.get("objectType"), + "key": obj.get("key"), + "value": obj.get("value") + }) + return _obj + + diff --git a/streaming/streaming/models/stream.py b/streaming/streaming/models/stream.py new file mode 100644 index 00000000..4e7ff69a --- /dev/null +++ b/streaming/streaming/models/stream.py @@ -0,0 +1,107 @@ +# 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.2 + 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 streaming.models.endpoint_type import EndpointType +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner +from streaming.models.stream_type import StreamType +from typing import Optional, Set +from typing_extensions import Self + +class Stream(BaseModel): + """ + Stream + """ # noqa: E501 + custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") + tag_match: Optional[List[PutStreamTagMatchInner]] = 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") + 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"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Stream 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 tag_match (list) + _items = [] + if self.tag_match: + for _item in self.tag_match: + if _item: + _items.append(_item.to_dict()) + _dict['tagMatch'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Stream from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customHeaders": obj.get("customHeaders"), + "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, + "enabled": obj.get("enabled"), + "type": obj.get("type"), + "endpointType": obj.get("endpointType"), + "streamEndpointUrl": obj.get("streamEndpointUrl") + }) + return _obj + + diff --git a/streaming/streaming/models/stream_response.py b/streaming/streaming/models/stream_response.py new file mode 100644 index 00000000..f09182cb --- /dev/null +++ b/streaming/streaming/models/stream_response.py @@ -0,0 +1,99 @@ +# 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.2 + 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 streaming.models.stream_response_links import StreamResponseLinks +from typing import Optional, Set +from typing_extensions import Self + +class StreamResponse(BaseModel): + """ + StreamResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The data stream ID") + enabled: Optional[StrictBool] = Field(default=None, description="Flag to indicate if the stream integration is currently enabled.") + links: Optional[StreamResponseLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["id", "enabled", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StreamResponse 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([ + "id", + "enabled", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 StreamResponse 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"), + "enabled": obj.get("enabled"), + "_links": StreamResponseLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/streaming/streaming/models/stream_response_links.py b/streaming/streaming/models/stream_response_links.py new file mode 100644 index 00000000..b76e8e55 --- /dev/null +++ b/streaming/streaming/models/stream_response_links.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.2 + 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 streaming.models.stream_response_links_self import StreamResponseLinksSelf +from typing import Optional, Set +from typing_extensions import Self + +class StreamResponseLinks(BaseModel): + """ + StreamResponseLinks + """ # noqa: E501 + var_self: Optional[StreamResponseLinksSelf] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["self"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StreamResponseLinks 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 StreamResponseLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": StreamResponseLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/streaming/streaming/models/stream_response_links_self.py b/streaming/streaming/models/stream_response_links_self.py new file mode 100644 index 00000000..bedd8ac7 --- /dev/null +++ b/streaming/streaming/models/stream_response_links_self.py @@ -0,0 +1,87 @@ +# 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.2 + 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 StreamResponseLinksSelf(BaseModel): + """ + StreamResponseLinksSelf + """ # noqa: E501 + href: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["href"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StreamResponseLinksSelf 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 StreamResponseLinksSelf 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") + }) + return _obj + + diff --git a/streaming/streaming/models/stream_type.py b/streaming/streaming/models/stream_type.py new file mode 100644 index 00000000..504e4c01 --- /dev/null +++ b/streaming/streaming/models/stream_type.py @@ -0,0 +1,36 @@ +# 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.2 + 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 StreamType(str, Enum): + """ + The type of data stream to configure. Currently, only `opentelemetry` is supported. + """ + + """ + allowed enum values + """ + OPENTELEMETRY = 'opentelemetry' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of StreamType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/streaming/streaming/models/tag_match_object_type.py b/streaming/streaming/models/tag_match_object_type.py new file mode 100644 index 00000000..44432ec7 --- /dev/null +++ b/streaming/streaming/models/tag_match_object_type.py @@ -0,0 +1,36 @@ +# 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.2 + 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 TagMatchObjectType(str, Enum): + """ + The object type of tag + """ + + """ + allowed enum values + """ + TEST = 'test' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TagMatchObjectType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/streaming/streaming/models/unauthorized_error.py b/streaming/streaming/models/unauthorized_error.py new file mode 100644 index 00000000..559390c8 --- /dev/null +++ b/streaming/streaming/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/test_results_api/test_results_api/py.typed b/streaming/streaming/py.typed similarity index 100% rename from test_results_api/test_results_api/py.typed rename to streaming/streaming/py.typed diff --git a/streaming/streaming/rest.py b/streaming/streaming/rest.py new file mode 100644 index 00000000..6ccd12f5 --- /dev/null +++ b/streaming/streaming/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from streaming.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/streaming/test-requirements.txt b/streaming/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/streaming/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/test_results_api/test/__init__.py b/streaming/test/__init__.py similarity index 100% rename from test_results_api/test/__init__.py rename to streaming/test/__init__.py diff --git a/streaming/test/test_api_error.py b/streaming/test/test_api_error.py new file mode 100644 index 00000000..46e518ff --- /dev/null +++ b/streaming/test/test_api_error.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.api_error import ApiError + +class TestApiError(unittest.TestCase): + """ApiError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiError: + """Test ApiError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiError` + """ + model = ApiError() + if include_optional: + return ApiError( + timestamp = 1679677853573, + status = 500, + errors = 'Internal Server Error', + path = 'https://api.thousandeyes.com/v7/stream' + ) + else: + return ApiError( + ) + """ + + def testApiError(self): + """Test ApiError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_api_error_integration_limits.py b/streaming/test/test_api_error_integration_limits.py new file mode 100644 index 00000000..9497064f --- /dev/null +++ b/streaming/test/test_api_error_integration_limits.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.api_error_integration_limits import ApiErrorIntegrationLimits + +class TestApiErrorIntegrationLimits(unittest.TestCase): + """ApiErrorIntegrationLimits unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiErrorIntegrationLimits: + """Test ApiErrorIntegrationLimits + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiErrorIntegrationLimits` + """ + model = ApiErrorIntegrationLimits() + if include_optional: + return ApiErrorIntegrationLimits( + timestamp = 1679677853573, + http_status = 'PRECONDITION_FAILED', + errors = [ + 'User cannot create more than 5 integrations' + ], + path = 'https://api.thousandeyes.com/v7/stream' + ) + else: + return ApiErrorIntegrationLimits( + ) + """ + + def testApiErrorIntegrationLimits(self): + """Test ApiErrorIntegrationLimits""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_audit_operation.py b/streaming/test/test_audit_operation.py new file mode 100644 index 00000000..f99d76ae --- /dev/null +++ b/streaming/test/test_audit_operation.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.audit_operation import AuditOperation + +class TestAuditOperation(unittest.TestCase): + """AuditOperation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuditOperation: + """Test AuditOperation + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuditOperation` + """ + model = AuditOperation() + if include_optional: + return AuditOperation( + created_by = 3962, + created_date = 1679677853573 + ) + else: + return AuditOperation( + ) + """ + + def testAuditOperation(self): + """Test AuditOperation""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_audit_operation_with_update.py b/streaming/test/test_audit_operation_with_update.py new file mode 100644 index 00000000..558e33ff --- /dev/null +++ b/streaming/test/test_audit_operation_with_update.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.audit_operation_with_update import AuditOperationWithUpdate + +class TestAuditOperationWithUpdate(unittest.TestCase): + """AuditOperationWithUpdate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuditOperationWithUpdate: + """Test AuditOperationWithUpdate + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuditOperationWithUpdate` + """ + model = AuditOperationWithUpdate() + if include_optional: + return AuditOperationWithUpdate( + created_by = 3962, + created_date = 1679677853573, + updated_by = 3962, + updated_date = 1679677853573 + ) + else: + return AuditOperationWithUpdate( + ) + """ + + def testAuditOperationWithUpdate(self): + """Test AuditOperationWithUpdate""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_bad_request_error.py b/streaming/test/test_bad_request_error.py new file mode 100644 index 00000000..8f52ee1f --- /dev/null +++ b/streaming/test/test_bad_request_error.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.bad_request_error import BadRequestError + +class TestBadRequestError(unittest.TestCase): + """BadRequestError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BadRequestError: + """Test BadRequestError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BadRequestError` + """ + model = BadRequestError() + if include_optional: + return BadRequestError( + timestamp = 1679677853573, + http_status = 'BAD_REQUEST', + errors = [ + 'JSON parse error: invalid type' + ], + path = 'https://api.thousandeyes.com/v7/stream' + ) + else: + return BadRequestError( + ) + """ + + def testBadRequestError(self): + """Test BadRequestError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_create_stream_response.py b/streaming/test/test_create_stream_response.py new file mode 100644 index 00000000..c6ae3618 --- /dev/null +++ b/streaming/test/test_create_stream_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.create_stream_response import CreateStreamResponse + +class TestCreateStreamResponse(unittest.TestCase): + """CreateStreamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateStreamResponse: + """Test CreateStreamResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateStreamResponse` + """ + model = CreateStreamResponse() + if include_optional: + return CreateStreamResponse( + id = '342ieu09', + enabled = False, + links = streaming.models.stream_response__links.StreamResponse__links( + self = streaming.models.stream_response__links_self.StreamResponse__links_self( + href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ), ), + type = 'opentelemetry', + endpoint_type = 'grpc', + stream_endpoint_url = 'https://api.thousandeyes.otel-collector', + custom_headers = {Authorization=*****, Content-Type=*****}, + tag_match = [{objectType=test, key=keyA, value=valueA}, {objectType=test, key=keyB, value=valueB}], + audit_operation = streaming.models.audit_operation.AuditOperation( + created_by = 3962, + created_date = 1679677853573, ) + ) + else: + return CreateStreamResponse( + ) + """ + + def testCreateStreamResponse(self): + """Test CreateStreamResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_endpoint_type.py b/streaming/test/test_endpoint_type.py new file mode 100644 index 00000000..81a0ff7a --- /dev/null +++ b/streaming/test/test_endpoint_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.endpoint_type import EndpointType + +class TestEndpointType(unittest.TestCase): + """EndpointType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEndpointType(self): + """Test EndpointType""" + # inst = EndpointType() + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_get_stream_response.py b/streaming/test/test_get_stream_response.py new file mode 100644 index 00000000..dd055ba6 --- /dev/null +++ b/streaming/test/test_get_stream_response.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.get_stream_response import GetStreamResponse + +class TestGetStreamResponse(unittest.TestCase): + """GetStreamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetStreamResponse: + """Test GetStreamResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetStreamResponse` + """ + model = GetStreamResponse() + if include_optional: + return GetStreamResponse( + id = '342ieu09', + enabled = False, + links = streaming.models.stream_response__links.StreamResponse__links( + self = streaming.models.stream_response__links_self.StreamResponse__links_self( + href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ), ), + type = 'opentelemetry', + endpoint_type = 'grpc', + stream_endpoint_url = 'https://api.thousandeyes.otel-collector', + custom_headers = {Authorization=*****, Content-Type=*****}, + tag_match = [{objectType=test, key=keyA, value=valueA}, {objectType=test, key=keyB, value=valueB}], + audit_operation = None + ) + else: + return GetStreamResponse( + ) + """ + + def testGetStreamResponse(self): + """Test GetStreamResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_put_stream.py b/streaming/test/test_put_stream.py new file mode 100644 index 00000000..fef68dc9 --- /dev/null +++ b/streaming/test/test_put_stream.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.put_stream import PutStream + +class TestPutStream(unittest.TestCase): + """PutStream unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PutStream: + """Test PutStream + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PutStream` + """ + model = PutStream() + if include_optional: + return PutStream( + custom_headers = {"Authorization":"*****","Content-Type":"*****"}, + tag_match = [{"objectType":"test","key":"keyA","value":"valueA"},{"objectType":"test","key":"keyB","value":"valueB"}], + enabled = False + ) + else: + return PutStream( + ) + """ + + def testPutStream(self): + """Test PutStream""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_put_stream_tag_match_inner.py b/streaming/test/test_put_stream_tag_match_inner.py new file mode 100644 index 00000000..72ebb8fc --- /dev/null +++ b/streaming/test/test_put_stream_tag_match_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.put_stream_tag_match_inner import PutStreamTagMatchInner + +class TestPutStreamTagMatchInner(unittest.TestCase): + """PutStreamTagMatchInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PutStreamTagMatchInner: + """Test PutStreamTagMatchInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PutStreamTagMatchInner` + """ + model = PutStreamTagMatchInner() + if include_optional: + return PutStreamTagMatchInner( + object_type = 'test', + key = 'keyA', + value = 'valueA' + ) + else: + return PutStreamTagMatchInner( + ) + """ + + def testPutStreamTagMatchInner(self): + """Test PutStreamTagMatchInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_stream.py b/streaming/test/test_stream.py new file mode 100644 index 00000000..7fa34bd8 --- /dev/null +++ b/streaming/test/test_stream.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.stream import Stream + +class TestStream(unittest.TestCase): + """Stream unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Stream: + """Test Stream + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Stream` + """ + model = Stream() + if include_optional: + return Stream( + custom_headers = {Authorization=*****, Content-Type=*****}, + tag_match = [{objectType=test, key=keyA, value=valueA}, {objectType=test, key=keyB, value=valueB}], + enabled = False, + type = 'opentelemetry', + endpoint_type = 'grpc', + stream_endpoint_url = 'https://api.thousandeyes.otel-collector' + ) + else: + return Stream( + ) + """ + + def testStream(self): + """Test Stream""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_stream_response.py b/streaming/test/test_stream_response.py new file mode 100644 index 00000000..7713bd0b --- /dev/null +++ b/streaming/test/test_stream_response.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.stream_response import StreamResponse + +class TestStreamResponse(unittest.TestCase): + """StreamResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StreamResponse: + """Test StreamResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StreamResponse` + """ + model = StreamResponse() + if include_optional: + return StreamResponse( + id = '342ieu09', + enabled = False, + links = streaming.models.stream_response__links.StreamResponse__links( + self = streaming.models.stream_response__links_self.StreamResponse__links_self( + href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ), ) + ) + else: + return StreamResponse( + ) + """ + + def testStreamResponse(self): + """Test StreamResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_stream_response_links.py b/streaming/test/test_stream_response_links.py new file mode 100644 index 00000000..5350799a --- /dev/null +++ b/streaming/test/test_stream_response_links.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.stream_response_links import StreamResponseLinks + +class TestStreamResponseLinks(unittest.TestCase): + """StreamResponseLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StreamResponseLinks: + """Test StreamResponseLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StreamResponseLinks` + """ + model = StreamResponseLinks() + if include_optional: + return StreamResponseLinks( + var_self = streaming.models.stream_response__links_self.StreamResponse__links_self( + href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ) + ) + else: + return StreamResponseLinks( + ) + """ + + def testStreamResponseLinks(self): + """Test StreamResponseLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_stream_response_links_self.py b/streaming/test/test_stream_response_links_self.py new file mode 100644 index 00000000..c17c53e3 --- /dev/null +++ b/streaming/test/test_stream_response_links_self.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.stream_response_links_self import StreamResponseLinksSelf + +class TestStreamResponseLinksSelf(unittest.TestCase): + """StreamResponseLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StreamResponseLinksSelf: + """Test StreamResponseLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StreamResponseLinksSelf` + """ + model = StreamResponseLinksSelf() + if include_optional: + return StreamResponseLinksSelf( + href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799' + ) + else: + return StreamResponseLinksSelf( + ) + """ + + def testStreamResponseLinksSelf(self): + """Test StreamResponseLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_stream_type.py b/streaming/test/test_stream_type.py new file mode 100644 index 00000000..3cff200c --- /dev/null +++ b/streaming/test/test_stream_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.stream_type import StreamType + +class TestStreamType(unittest.TestCase): + """StreamType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStreamType(self): + """Test StreamType""" + # inst = StreamType() + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_tag_match_object_type.py b/streaming/test/test_tag_match_object_type.py new file mode 100644 index 00000000..46b65a19 --- /dev/null +++ b/streaming/test/test_tag_match_object_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.tag_match_object_type import TagMatchObjectType + +class TestTagMatchObjectType(unittest.TestCase): + """TagMatchObjectType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTagMatchObjectType(self): + """Test TagMatchObjectType""" + # inst = TagMatchObjectType() + +if __name__ == '__main__': + unittest.main() diff --git a/streaming/test/test_unauthorized_error.py b/streaming/test/test_unauthorized_error.py new file mode 100644 index 00000000..9e0861ae --- /dev/null +++ b/streaming/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from streaming.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/streaming_api/.github/workflows/python.yml b/streaming_api/.github/workflows/python.yml deleted file mode 100644 index 0362e529..00000000 --- a/streaming_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: streaming_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/streaming_api/.gitlab-ci.yml b/streaming_api/.gitlab-ci.yml deleted file mode 100644 index 59089144..00000000 --- a/streaming_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=streaming_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/streaming_api/.openapi-generator/FILES b/streaming_api/.openapi-generator/FILES deleted file mode 100644 index 98e25e93..00000000 --- a/streaming_api/.openapi-generator/FILES +++ /dev/null @@ -1,77 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/ApiError.md -docs/ApiErrorIntegrationLimits.md -docs/AuditOperation.md -docs/AuditOperationWithUpdate.md -docs/BadRequestError.md -docs/CreateStreamResponse.md -docs/EndpointType.md -docs/GetStreamResponse.md -docs/PutStream.md -docs/PutStreamTagMatchInner.md -docs/Stream.md -docs/StreamResponse.md -docs/StreamResponseLinks.md -docs/StreamResponseLinksSelf.md -docs/StreamType.md -docs/StreamingApi.md -docs/TagMatchObjectType.md -docs/UnauthorizedError.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -streaming_api/__init__.py -streaming_api/api/__init__.py -streaming_api/api/streaming_api.py -streaming_api/api_client.py -streaming_api/api_response.py -streaming_api/configuration.py -streaming_api/exceptions.py -streaming_api/models/__init__.py -streaming_api/models/api_error.py -streaming_api/models/api_error_integration_limits.py -streaming_api/models/audit_operation.py -streaming_api/models/audit_operation_with_update.py -streaming_api/models/bad_request_error.py -streaming_api/models/create_stream_response.py -streaming_api/models/endpoint_type.py -streaming_api/models/get_stream_response.py -streaming_api/models/put_stream.py -streaming_api/models/put_stream_tag_match_inner.py -streaming_api/models/stream.py -streaming_api/models/stream_response.py -streaming_api/models/stream_response_links.py -streaming_api/models/stream_response_links_self.py -streaming_api/models/stream_type.py -streaming_api/models/tag_match_object_type.py -streaming_api/models/unauthorized_error.py -streaming_api/py.typed -streaming_api/rest.py -test-requirements.txt -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_put_stream_tag_match_inner.py -test/test_stream.py -test/test_stream_response.py -test/test_stream_response_links.py -test/test_stream_response_links_self.py -test/test_stream_type.py -test/test_streaming_api.py -test/test_tag_match_object_type.py -test/test_unauthorized_error.py -tox.ini diff --git a/streaming_api/.openapi-generator/VERSION b/streaming_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/streaming_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/streaming_api/.travis.yml b/streaming_api/.travis.yml deleted file mode 100644 index 55318d2a..00000000 --- a/streaming_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=streaming_api diff --git a/streaming_api/README.md b/streaming_api/README.md deleted file mode 100644 index 5e84c9db..00000000 --- a/streaming_api/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# streaming-api - -Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import streaming_api -``` - -### 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 streaming_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import streaming_api -from streaming_api.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 = streaming_api.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 = streaming_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with streaming_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = streaming_api.StreamingApi(api_client) - aid = '2067' # 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) - stream = streaming_api.Stream() # Stream | Stream to configure (optional) - - try: - # Create data stream - api_response = api_instance.create_stream(aid=aid, stream=stream) - print("The response of StreamingApi->create_stream:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling StreamingApi->create_stream: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*StreamingApi* | [**create_stream**](docs/StreamingApi.md#create_stream) | **POST** /v7/stream | Create data stream -*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 - - -## Documentation For Models - - - [ApiError](docs/ApiError.md) - - [ApiErrorIntegrationLimits](docs/ApiErrorIntegrationLimits.md) - - [AuditOperation](docs/AuditOperation.md) - - [AuditOperationWithUpdate](docs/AuditOperationWithUpdate.md) - - [BadRequestError](docs/BadRequestError.md) - - [CreateStreamResponse](docs/CreateStreamResponse.md) - - [EndpointType](docs/EndpointType.md) - - [GetStreamResponse](docs/GetStreamResponse.md) - - [PutStream](docs/PutStream.md) - - [PutStreamTagMatchInner](docs/PutStreamTagMatchInner.md) - - [Stream](docs/Stream.md) - - [StreamResponse](docs/StreamResponse.md) - - [StreamResponseLinks](docs/StreamResponseLinks.md) - - [StreamResponseLinksSelf](docs/StreamResponseLinksSelf.md) - - [StreamType](docs/StreamType.md) - - [TagMatchObjectType](docs/TagMatchObjectType.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/streaming_api/docs/ApiError.md b/streaming_api/docs/ApiError.md deleted file mode 100644 index d033866d..00000000 --- a/streaming_api/docs/ApiError.md +++ /dev/null @@ -1,31 +0,0 @@ -# ApiError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **int** | | [optional] -**status** | **int** | | [optional] -**errors** | **str** | | [optional] -**path** | **str** | | [optional] - -## Example - -```python -from streaming_api.models.api_error import ApiError - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiError from a JSON string -api_error_instance = ApiError.from_json(json) -# print the JSON string representation of the object -print ApiError.to_json() - -# convert the object into a dict -api_error_dict = api_error_instance.to_dict() -# create an instance of ApiError from a dict -api_error_form_dict = api_error.from_dict(api_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/streaming_api/docs/BadRequestError.md b/streaming_api/docs/BadRequestError.md deleted file mode 100644 index 4d38dc75..00000000 --- a/streaming_api/docs/BadRequestError.md +++ /dev/null @@ -1,31 +0,0 @@ -# BadRequestError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **int** | | [optional] -**http_status** | **str** | | [optional] -**errors** | **List[str]** | | [optional] -**path** | **str** | | [optional] - -## Example - -```python -from streaming_api.models.bad_request_error import BadRequestError - -# TODO update the JSON string below -json = "{}" -# create an instance of BadRequestError from a JSON string -bad_request_error_instance = BadRequestError.from_json(json) -# print the JSON string representation of the object -print BadRequestError.to_json() - -# convert the object into a dict -bad_request_error_dict = bad_request_error_instance.to_dict() -# create an instance of BadRequestError from a dict -bad_request_error_form_dict = bad_request_error.from_dict(bad_request_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/streaming_api/docs/UnauthorizedError.md b/streaming_api/docs/UnauthorizedError.md deleted file mode 100644 index c9a5d6f2..00000000 --- a/streaming_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from streaming_api.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_form_dict = unauthorized_error.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/streaming_api/git_push.sh b/streaming_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/streaming_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/streaming_api/pyproject.toml b/streaming_api/pyproject.toml deleted file mode 100644 index 695aec14..00000000 --- a/streaming_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "streaming_api" -version = "1.0.0" -description = "ThousandEyes for OpenTelemetry" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "ThousandEyes for OpenTelemetry"] -include = ["streaming_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/streaming_api/setup.py b/streaming_api/setup.py deleted file mode 100644 index 9e767347..00000000 --- a/streaming_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "streaming-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="ThousandEyes for OpenTelemetry", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes for OpenTelemetry"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - """, # noqa: E501 - package_data={"streaming_api": ["py.typed"]}, -) diff --git a/streaming_api/streaming_api/__init__.py b/streaming_api/streaming_api/__init__.py deleted file mode 100644 index 48ec3a87..00000000 --- a/streaming_api/streaming_api/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 streaming_api.api.streaming_api import StreamingApi - -# import ApiClient -from streaming_api.api_response import ApiResponse -from streaming_api.api_client import ApiClient -from streaming_api.configuration import Configuration -from streaming_api.exceptions import OpenApiException -from streaming_api.exceptions import ApiTypeError -from streaming_api.exceptions import ApiValueError -from streaming_api.exceptions import ApiKeyError -from streaming_api.exceptions import ApiAttributeError -from streaming_api.exceptions import ApiException - -# import models into sdk package -from streaming_api.models.api_error import ApiError -from streaming_api.models.api_error_integration_limits import ApiErrorIntegrationLimits -from streaming_api.models.audit_operation import AuditOperation -from streaming_api.models.audit_operation_with_update import AuditOperationWithUpdate -from streaming_api.models.bad_request_error import BadRequestError -from streaming_api.models.create_stream_response import CreateStreamResponse -from streaming_api.models.endpoint_type import EndpointType -from streaming_api.models.get_stream_response import GetStreamResponse -from streaming_api.models.put_stream import PutStream -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner -from streaming_api.models.stream import Stream -from streaming_api.models.stream_response import StreamResponse -from streaming_api.models.stream_response_links import StreamResponseLinks -from streaming_api.models.stream_response_links_self import StreamResponseLinksSelf -from streaming_api.models.stream_type import StreamType -from streaming_api.models.tag_match_object_type import TagMatchObjectType -from streaming_api.models.unauthorized_error import UnauthorizedError diff --git a/streaming_api/streaming_api/api/__init__.py b/streaming_api/streaming_api/api/__init__.py deleted file mode 100644 index b1e18630..00000000 --- a/streaming_api/streaming_api/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from streaming_api.api.streaming_api import StreamingApi - diff --git a/streaming_api/streaming_api/api_client.py b/streaming_api/streaming_api/api_client.py deleted file mode 100644 index a8e128a3..00000000 --- a/streaming_api/streaming_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from streaming_api.configuration import Configuration -from streaming_api.api_response import ApiResponse -import streaming_api.models -from streaming_api import rest -from streaming_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(streaming_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/streaming_api/streaming_api/api_response.py b/streaming_api/streaming_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/streaming_api/streaming_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/streaming_api/streaming_api/configuration.py b/streaming_api/streaming_api/configuration.py deleted file mode 100644 index 899f330c..00000000 --- a/streaming_api/streaming_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("streaming_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/streaming_api/streaming_api/exceptions.py b/streaming_api/streaming_api/exceptions.py deleted file mode 100644 index ca37dd17..00000000 --- a/streaming_api/streaming_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/streaming_api/streaming_api/models/__init__.py b/streaming_api/streaming_api/models/__init__.py deleted file mode 100644 index 04234b8f..00000000 --- a/streaming_api/streaming_api/models/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from streaming_api.models.api_error import ApiError -from streaming_api.models.api_error_integration_limits import ApiErrorIntegrationLimits -from streaming_api.models.audit_operation import AuditOperation -from streaming_api.models.audit_operation_with_update import AuditOperationWithUpdate -from streaming_api.models.bad_request_error import BadRequestError -from streaming_api.models.create_stream_response import CreateStreamResponse -from streaming_api.models.endpoint_type import EndpointType -from streaming_api.models.get_stream_response import GetStreamResponse -from streaming_api.models.put_stream import PutStream -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner -from streaming_api.models.stream import Stream -from streaming_api.models.stream_response import StreamResponse -from streaming_api.models.stream_response_links import StreamResponseLinks -from streaming_api.models.stream_response_links_self import StreamResponseLinksSelf -from streaming_api.models.stream_type import StreamType -from streaming_api.models.tag_match_object_type import TagMatchObjectType -from streaming_api.models.unauthorized_error import UnauthorizedError diff --git a/streaming_api/streaming_api/models/api_error.py b/streaming_api/streaming_api/models/api_error.py deleted file mode 100644 index 7aced5f7..00000000 --- a/streaming_api/streaming_api/models/api_error.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiError(BaseModel): - """ - ApiError - """ # noqa: E501 - timestamp: Optional[StrictInt] = None - status: Optional[StrictInt] = None - errors: Optional[StrictStr] = None - path: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["timestamp", "status", "errors", "path"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiError 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "timestamp": obj.get("timestamp"), - "status": obj.get("status"), - "errors": obj.get("errors"), - "path": obj.get("path") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/api_error_integration_limits.py b/streaming_api/streaming_api/models/api_error_integration_limits.py deleted file mode 100644 index 3b480461..00000000 --- a/streaming_api/streaming_api/models/api_error_integration_limits.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiErrorIntegrationLimits(BaseModel): - """ - ApiErrorIntegrationLimits - """ # noqa: E501 - timestamp: Optional[StrictInt] = None - http_status: Optional[StrictStr] = Field(default=None, alias="httpStatus") - errors: Optional[List[StrictStr]] = None - path: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["timestamp", "httpStatus", "errors", "path"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiErrorIntegrationLimits 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiErrorIntegrationLimits from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "timestamp": obj.get("timestamp"), - "httpStatus": obj.get("httpStatus"), - "errors": obj.get("errors"), - "path": obj.get("path") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/audit_operation.py b/streaming_api/streaming_api/models/audit_operation.py deleted file mode 100644 index fe13f41b..00000000 --- a/streaming_api/streaming_api/models/audit_operation.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AuditOperation(BaseModel): - """ - AuditOperation - """ # noqa: E501 - created_by: Optional[StrictInt] = Field(default=None, description="ID of the user who created the integration", alias="createdBy") - created_date: Optional[StrictInt] = Field(default=None, description="Creation date of the integration", alias="createdDate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AuditOperation 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AuditOperation from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/audit_operation_with_update.py b/streaming_api/streaming_api/models/audit_operation_with_update.py deleted file mode 100644 index c4c04114..00000000 --- a/streaming_api/streaming_api/models/audit_operation_with_update.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AuditOperationWithUpdate(BaseModel): - """ - AuditOperationWithUpdate - """ # noqa: E501 - created_by: Optional[StrictInt] = Field(default=None, description="ID of the user who created the integration", alias="createdBy") - created_date: Optional[StrictInt] = Field(default=None, description="Creation date of the integration", alias="createdDate") - updated_by: Optional[StrictInt] = Field(default=None, description="ID of the user who last updated the integration", alias="updatedBy") - updated_date: Optional[StrictInt] = Field(default=None, description="Date of the last update to the integration", alias="updatedDate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "updatedBy", "updatedDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AuditOperationWithUpdate 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if updated_by (nullable) is None - # and model_fields_set contains the field - if self.updated_by is None and "updated_by" in self.model_fields_set: - _dict['updatedBy'] = None - - # set to None if updated_date (nullable) is None - # and model_fields_set contains the field - if self.updated_date is None and "updated_date" in self.model_fields_set: - _dict['updatedDate'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AuditOperationWithUpdate from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "updatedBy": obj.get("updatedBy"), - "updatedDate": obj.get("updatedDate") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/bad_request_error.py b/streaming_api/streaming_api/models/bad_request_error.py deleted file mode 100644 index cb3ac7c0..00000000 --- a/streaming_api/streaming_api/models/bad_request_error.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BadRequestError(BaseModel): - """ - BadRequestError - """ # noqa: E501 - timestamp: Optional[StrictInt] = None - http_status: Optional[StrictStr] = Field(default=None, alias="httpStatus") - errors: Optional[List[StrictStr]] = None - path: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["timestamp", "httpStatus", "errors", "path"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BadRequestError 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of BadRequestError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "timestamp": obj.get("timestamp"), - "httpStatus": obj.get("httpStatus"), - "errors": obj.get("errors"), - "path": obj.get("path") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/create_stream_response.py b/streaming_api/streaming_api/models/create_stream_response.py deleted file mode 100644 index 91a3887f..00000000 --- a/streaming_api/streaming_api/models/create_stream_response.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from streaming_api.models.audit_operation import AuditOperation -from streaming_api.models.endpoint_type import EndpointType -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner -from streaming_api.models.stream_response_links import StreamResponseLinks -from streaming_api.models.stream_type import StreamType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateStreamResponse(BaseModel): - """ - CreateStreamResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The data stream ID") - enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") - links: Optional[StreamResponseLinks] = Field(default=None, alias="_links") - 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") - custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") - tag_match: Optional[List[PutStreamTagMatchInner]] = 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") - audit_operation: Optional[AuditOperation] = Field(default=None, alias="auditOperation") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "auditOperation"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateStreamResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - }, - exclude_none=True, - ) - # 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 tag_match (list) - _items = [] - if self.tag_match: - for _item in self.tag_match: - if _item: - _items.append(_item.to_dict()) - _dict['tagMatch'] = _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() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CreateStreamResponse 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"), - "enabled": obj.get("enabled"), - "_links": StreamResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "type": obj.get("type"), - "endpointType": obj.get("endpointType"), - "streamEndpointUrl": obj.get("streamEndpointUrl"), - "customHeaders": obj.get("customHeaders"), - "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj.get("tagMatch")] if obj.get("tagMatch") is not None else None, - "auditOperation": AuditOperation.from_dict(obj.get("auditOperation")) if obj.get("auditOperation") is not None else None - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/endpoint_type.py b/streaming_api/streaming_api/models/endpoint_type.py deleted file mode 100644 index 9fbb402b..00000000 --- a/streaming_api/streaming_api/models/endpoint_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class EndpointType(str, Enum): - """ - The type of connection used to send data to the endpoint. - """ - - """ - allowed enum values - """ - GRPC = 'grpc' - HTTP = 'http' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/streaming_api/streaming_api/models/get_stream_response.py b/streaming_api/streaming_api/models/get_stream_response.py deleted file mode 100644 index 4d22d0a6..00000000 --- a/streaming_api/streaming_api/models/get_stream_response.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from streaming_api.models.audit_operation_with_update import AuditOperationWithUpdate -from streaming_api.models.endpoint_type import EndpointType -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner -from streaming_api.models.stream_response_links import StreamResponseLinks -from streaming_api.models.stream_type import StreamType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetStreamResponse(BaseModel): - """ - GetStreamResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The data stream ID") - enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") - links: Optional[StreamResponseLinks] = Field(default=None, alias="_links") - 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") - custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") - tag_match: Optional[List[PutStreamTagMatchInner]] = 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") - audit_operation: Optional[AuditOperationWithUpdate] = Field(default=None, alias="auditOperation") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "auditOperation"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetStreamResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - }, - exclude_none=True, - ) - # 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 tag_match (list) - _items = [] - if self.tag_match: - for _item in self.tag_match: - if _item: - _items.append(_item.to_dict()) - _dict['tagMatch'] = _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() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetStreamResponse 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"), - "enabled": obj.get("enabled"), - "_links": StreamResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "type": obj.get("type"), - "endpointType": obj.get("endpointType"), - "streamEndpointUrl": obj.get("streamEndpointUrl"), - "customHeaders": obj.get("customHeaders"), - "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj.get("tagMatch")] if obj.get("tagMatch") is not None else None, - "auditOperation": AuditOperationWithUpdate.from_dict(obj.get("auditOperation")) if obj.get("auditOperation") is not None else None - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/put_stream.py b/streaming_api/streaming_api/models/put_stream.py deleted file mode 100644 index 6b13ff43..00000000 --- a/streaming_api/streaming_api/models/put_stream.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PutStream(BaseModel): - """ - PutStream - """ # noqa: E501 - custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") - tag_match: Optional[List[PutStreamTagMatchInner]] = 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") - enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") - __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "enabled"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PutStream 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tag_match (list) - _items = [] - if self.tag_match: - for _item in self.tag_match: - if _item: - _items.append(_item.to_dict()) - _dict['tagMatch'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PutStream from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customHeaders": obj.get("customHeaders"), - "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj.get("tagMatch")] if obj.get("tagMatch") is not None else None, - "enabled": obj.get("enabled") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/put_stream_tag_match_inner.py b/streaming_api/streaming_api/models/put_stream_tag_match_inner.py deleted file mode 100644 index cc693d60..00000000 --- a/streaming_api/streaming_api/models/put_stream_tag_match_inner.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from streaming_api.models.tag_match_object_type import TagMatchObjectType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PutStreamTagMatchInner(BaseModel): - """ - PutStreamTagMatchInner - """ # noqa: E501 - object_type: Optional[TagMatchObjectType] = Field(default=None, alias="objectType") - key: Optional[StrictStr] = Field(default=None, description="The name of the tag key to match") - value: Optional[StrictStr] = Field(default=None, description="The value of the tag to match") - __properties: ClassVar[List[str]] = ["objectType", "key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PutStreamTagMatchInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PutStreamTagMatchInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "objectType": obj.get("objectType"), - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/stream.py b/streaming_api/streaming_api/models/stream.py deleted file mode 100644 index 9cafedc5..00000000 --- a/streaming_api/streaming_api/models/stream.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from streaming_api.models.endpoint_type import EndpointType -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner -from streaming_api.models.stream_type import StreamType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Stream(BaseModel): - """ - Stream - """ # noqa: E501 - custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers", alias="customHeaders") - tag_match: Optional[List[PutStreamTagMatchInner]] = 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") - 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"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Stream 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tag_match (list) - _items = [] - if self.tag_match: - for _item in self.tag_match: - if _item: - _items.append(_item.to_dict()) - _dict['tagMatch'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Stream from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "customHeaders": obj.get("customHeaders"), - "tagMatch": [PutStreamTagMatchInner.from_dict(_item) for _item in obj.get("tagMatch")] if obj.get("tagMatch") is not None else None, - "enabled": obj.get("enabled"), - "type": obj.get("type"), - "endpointType": obj.get("endpointType"), - "streamEndpointUrl": obj.get("streamEndpointUrl") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/stream_response.py b/streaming_api/streaming_api/models/stream_response.py deleted file mode 100644 index 1f2256ce..00000000 --- a/streaming_api/streaming_api/models/stream_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from streaming_api.models.stream_response_links import StreamResponseLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class StreamResponse(BaseModel): - """ - StreamResponse - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The data stream ID") - enabled: Optional[StrictBool] = Field(default=None, description="Flag to indicate if the stream integration is currently enabled.") - links: Optional[StreamResponseLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of StreamResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "id", - "enabled", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of StreamResponse 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"), - "enabled": obj.get("enabled"), - "_links": StreamResponseLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/stream_response_links.py b/streaming_api/streaming_api/models/stream_response_links.py deleted file mode 100644 index c5a6991e..00000000 --- a/streaming_api/streaming_api/models/stream_response_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from streaming_api.models.stream_response_links_self import StreamResponseLinksSelf -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class StreamResponseLinks(BaseModel): - """ - StreamResponseLinks - """ # noqa: E501 - var_self: Optional[StreamResponseLinksSelf] = Field(default=None, alias="self") - __properties: ClassVar[List[str]] = ["self"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of StreamResponseLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of StreamResponseLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": StreamResponseLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/stream_response_links_self.py b/streaming_api/streaming_api/models/stream_response_links_self.py deleted file mode 100644 index d23ca613..00000000 --- a/streaming_api/streaming_api/models/stream_response_links_self.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class StreamResponseLinksSelf(BaseModel): - """ - StreamResponseLinksSelf - """ # noqa: E501 - href: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["href"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of StreamResponseLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of StreamResponseLinksSelf 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") - }) - return _obj - - diff --git a/streaming_api/streaming_api/models/stream_type.py b/streaming_api/streaming_api/models/stream_type.py deleted file mode 100644 index 86baa968..00000000 --- a/streaming_api/streaming_api/models/stream_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class StreamType(str, Enum): - """ - The type of data stream to configure. Currently, only `opentelemetry` is supported. - """ - - """ - allowed enum values - """ - OPENTELEMETRY = 'opentelemetry' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of StreamType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/streaming_api/streaming_api/models/tag_match_object_type.py b/streaming_api/streaming_api/models/tag_match_object_type.py deleted file mode 100644 index a7706f59..00000000 --- a/streaming_api/streaming_api/models/tag_match_object_type.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TagMatchObjectType(str, Enum): - """ - The object type of tag - """ - - """ - allowed enum values - """ - TEST = 'test' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TagMatchObjectType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/streaming_api/streaming_api/models/unauthorized_error.py b/streaming_api/streaming_api/models/unauthorized_error.py deleted file mode 100644 index 9c743909..00000000 --- a/streaming_api/streaming_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/streaming_api/streaming_api/rest.py b/streaming_api/streaming_api/rest.py deleted file mode 100644 index d3964315..00000000 --- a/streaming_api/streaming_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from streaming_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/streaming_api/test-requirements.txt b/streaming_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/streaming_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/streaming_api/test/test_api_error.py b/streaming_api/test/test_api_error.py deleted file mode 100644 index c9b83ff3..00000000 --- a/streaming_api/test/test_api_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.api_error import ApiError - -class TestApiError(unittest.TestCase): - """ApiError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiError: - """Test ApiError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiError` - """ - model = ApiError() - if include_optional: - return ApiError( - timestamp = 1679677853573, - status = 500, - errors = 'Internal Server Error', - path = 'https://api.thousandeyes.com/v7/stream' - ) - else: - return ApiError( - ) - """ - - def testApiError(self): - """Test ApiError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_api_error_integration_limits.py b/streaming_api/test/test_api_error_integration_limits.py deleted file mode 100644 index 817c0eec..00000000 --- a/streaming_api/test/test_api_error_integration_limits.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.api_error_integration_limits import ApiErrorIntegrationLimits - -class TestApiErrorIntegrationLimits(unittest.TestCase): - """ApiErrorIntegrationLimits unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiErrorIntegrationLimits: - """Test ApiErrorIntegrationLimits - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiErrorIntegrationLimits` - """ - model = ApiErrorIntegrationLimits() - if include_optional: - return ApiErrorIntegrationLimits( - timestamp = 1679677853573, - http_status = 'PRECONDITION_FAILED', - errors = [ - 'User cannot create more than 5 integrations' - ], - path = 'https://api.thousandeyes.com/v7/stream' - ) - else: - return ApiErrorIntegrationLimits( - ) - """ - - def testApiErrorIntegrationLimits(self): - """Test ApiErrorIntegrationLimits""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_audit_operation.py b/streaming_api/test/test_audit_operation.py deleted file mode 100644 index ec0c73ae..00000000 --- a/streaming_api/test/test_audit_operation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.audit_operation import AuditOperation - -class TestAuditOperation(unittest.TestCase): - """AuditOperation unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuditOperation: - """Test AuditOperation - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AuditOperation` - """ - model = AuditOperation() - if include_optional: - return AuditOperation( - created_by = 3962, - created_date = 1679677853573 - ) - else: - return AuditOperation( - ) - """ - - def testAuditOperation(self): - """Test AuditOperation""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_audit_operation_with_update.py b/streaming_api/test/test_audit_operation_with_update.py deleted file mode 100644 index f15aa5af..00000000 --- a/streaming_api/test/test_audit_operation_with_update.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.audit_operation_with_update import AuditOperationWithUpdate - -class TestAuditOperationWithUpdate(unittest.TestCase): - """AuditOperationWithUpdate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuditOperationWithUpdate: - """Test AuditOperationWithUpdate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AuditOperationWithUpdate` - """ - model = AuditOperationWithUpdate() - if include_optional: - return AuditOperationWithUpdate( - created_by = 3962, - created_date = 1679677853573, - updated_by = 3962, - updated_date = 1679677853573 - ) - else: - return AuditOperationWithUpdate( - ) - """ - - def testAuditOperationWithUpdate(self): - """Test AuditOperationWithUpdate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_bad_request_error.py b/streaming_api/test/test_bad_request_error.py deleted file mode 100644 index 083c9c9b..00000000 --- a/streaming_api/test/test_bad_request_error.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.bad_request_error import BadRequestError - -class TestBadRequestError(unittest.TestCase): - """BadRequestError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BadRequestError: - """Test BadRequestError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BadRequestError` - """ - model = BadRequestError() - if include_optional: - return BadRequestError( - timestamp = 1679677853573, - http_status = 'BAD_REQUEST', - errors = [ - 'JSON parse error: invalid type' - ], - path = 'https://api.thousandeyes.com/v7/stream' - ) - else: - return BadRequestError( - ) - """ - - def testBadRequestError(self): - """Test BadRequestError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_create_stream_response.py b/streaming_api/test/test_create_stream_response.py deleted file mode 100644 index 86878ffb..00000000 --- a/streaming_api/test/test_create_stream_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.create_stream_response import CreateStreamResponse - -class TestCreateStreamResponse(unittest.TestCase): - """CreateStreamResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateStreamResponse: - """Test CreateStreamResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateStreamResponse` - """ - model = CreateStreamResponse() - if include_optional: - return CreateStreamResponse( - id = '342ieu09', - enabled = False, - links = streaming_api.models.stream_response__links.StreamResponse__links( - self = streaming_api.models.stream_response__links_self.StreamResponse__links_self( - href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ), ), - type = 'opentelemetry', - endpoint_type = 'grpc', - stream_endpoint_url = 'https://api.thousandeyes.otel-collector', - custom_headers = {Authorization=*****, Content-Type=*****}, - tag_match = [{objectType=test, key=keyA, value=valueA}, {objectType=test, key=keyB, value=valueB}], - audit_operation = streaming_api.models.audit_operation.AuditOperation( - created_by = 3962, - created_date = 1679677853573, ) - ) - else: - return CreateStreamResponse( - ) - """ - - def testCreateStreamResponse(self): - """Test CreateStreamResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_endpoint_type.py b/streaming_api/test/test_endpoint_type.py deleted file mode 100644 index 34024358..00000000 --- a/streaming_api/test/test_endpoint_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.endpoint_type import EndpointType - -class TestEndpointType(unittest.TestCase): - """EndpointType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEndpointType(self): - """Test EndpointType""" - # inst = EndpointType() - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_get_stream_response.py b/streaming_api/test/test_get_stream_response.py deleted file mode 100644 index bfc33e7f..00000000 --- a/streaming_api/test/test_get_stream_response.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.get_stream_response import GetStreamResponse - -class TestGetStreamResponse(unittest.TestCase): - """GetStreamResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetStreamResponse: - """Test GetStreamResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetStreamResponse` - """ - model = GetStreamResponse() - if include_optional: - return GetStreamResponse( - id = '342ieu09', - enabled = False, - links = streaming_api.models.stream_response__links.StreamResponse__links( - self = streaming_api.models.stream_response__links_self.StreamResponse__links_self( - href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ), ), - type = 'opentelemetry', - endpoint_type = 'grpc', - stream_endpoint_url = 'https://api.thousandeyes.otel-collector', - custom_headers = {Authorization=*****, Content-Type=*****}, - tag_match = [{objectType=test, key=keyA, value=valueA}, {objectType=test, key=keyB, value=valueB}], - audit_operation = None - ) - else: - return GetStreamResponse( - ) - """ - - def testGetStreamResponse(self): - """Test GetStreamResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_put_stream.py b/streaming_api/test/test_put_stream.py deleted file mode 100644 index a8c78046..00000000 --- a/streaming_api/test/test_put_stream.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.put_stream import PutStream - -class TestPutStream(unittest.TestCase): - """PutStream unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PutStream: - """Test PutStream - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PutStream` - """ - model = PutStream() - if include_optional: - return PutStream( - custom_headers = {"Authorization":"*****","Content-Type":"*****"}, - tag_match = [{"objectType":"test","key":"keyA","value":"valueA"},{"objectType":"test","key":"keyB","value":"valueB"}], - enabled = False - ) - else: - return PutStream( - ) - """ - - def testPutStream(self): - """Test PutStream""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_put_stream_tag_match_inner.py b/streaming_api/test/test_put_stream_tag_match_inner.py deleted file mode 100644 index c8fb0b11..00000000 --- a/streaming_api/test/test_put_stream_tag_match_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.put_stream_tag_match_inner import PutStreamTagMatchInner - -class TestPutStreamTagMatchInner(unittest.TestCase): - """PutStreamTagMatchInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PutStreamTagMatchInner: - """Test PutStreamTagMatchInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PutStreamTagMatchInner` - """ - model = PutStreamTagMatchInner() - if include_optional: - return PutStreamTagMatchInner( - object_type = 'test', - key = 'keyA', - value = 'valueA' - ) - else: - return PutStreamTagMatchInner( - ) - """ - - def testPutStreamTagMatchInner(self): - """Test PutStreamTagMatchInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_stream.py b/streaming_api/test/test_stream.py deleted file mode 100644 index 058d1356..00000000 --- a/streaming_api/test/test_stream.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.stream import Stream - -class TestStream(unittest.TestCase): - """Stream unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Stream: - """Test Stream - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Stream` - """ - model = Stream() - if include_optional: - return Stream( - custom_headers = {Authorization=*****, Content-Type=*****}, - tag_match = [{objectType=test, key=keyA, value=valueA}, {objectType=test, key=keyB, value=valueB}], - enabled = False, - type = 'opentelemetry', - endpoint_type = 'grpc', - stream_endpoint_url = 'https://api.thousandeyes.otel-collector' - ) - else: - return Stream( - ) - """ - - def testStream(self): - """Test Stream""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_stream_response.py b/streaming_api/test/test_stream_response.py deleted file mode 100644 index ba56e19b..00000000 --- a/streaming_api/test/test_stream_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.stream_response import StreamResponse - -class TestStreamResponse(unittest.TestCase): - """StreamResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> StreamResponse: - """Test StreamResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `StreamResponse` - """ - model = StreamResponse() - if include_optional: - return StreamResponse( - id = '342ieu09', - enabled = False, - links = streaming_api.models.stream_response__links.StreamResponse__links( - self = streaming_api.models.stream_response__links_self.StreamResponse__links_self( - href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ), ) - ) - else: - return StreamResponse( - ) - """ - - def testStreamResponse(self): - """Test StreamResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_stream_response_links.py b/streaming_api/test/test_stream_response_links.py deleted file mode 100644 index 1418ab07..00000000 --- a/streaming_api/test/test_stream_response_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.stream_response_links import StreamResponseLinks - -class TestStreamResponseLinks(unittest.TestCase): - """StreamResponseLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> StreamResponseLinks: - """Test StreamResponseLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `StreamResponseLinks` - """ - model = StreamResponseLinks() - if include_optional: - return StreamResponseLinks( - var_self = streaming_api.models.stream_response__links_self.StreamResponse__links_self( - href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799', ) - ) - else: - return StreamResponseLinks( - ) - """ - - def testStreamResponseLinks(self): - """Test StreamResponseLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_stream_response_links_self.py b/streaming_api/test/test_stream_response_links_self.py deleted file mode 100644 index 2af38e39..00000000 --- a/streaming_api/test/test_stream_response_links_self.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.stream_response_links_self import StreamResponseLinksSelf - -class TestStreamResponseLinksSelf(unittest.TestCase): - """StreamResponseLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> StreamResponseLinksSelf: - """Test StreamResponseLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `StreamResponseLinksSelf` - """ - model = StreamResponseLinksSelf() - if include_optional: - return StreamResponseLinksSelf( - href = 'https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799' - ) - else: - return StreamResponseLinksSelf( - ) - """ - - def testStreamResponseLinksSelf(self): - """Test StreamResponseLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_stream_type.py b/streaming_api/test/test_stream_type.py deleted file mode 100644 index bf89b092..00000000 --- a/streaming_api/test/test_stream_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.stream_type import StreamType - -class TestStreamType(unittest.TestCase): - """StreamType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStreamType(self): - """Test StreamType""" - # inst = StreamType() - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_streaming_api.py b/streaming_api/test/test_streaming_api.py deleted file mode 100644 index 563e1b3c..00000000 --- a/streaming_api/test/test_streaming_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from streaming_api.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(self) -> None: - """Test case for create_stream - - Create data stream - """ - pass - - def test_delete_stream(self) -> None: - """Test case for delete_stream - - Delete a data stream - """ - pass - - def test_get_stream(self) -> None: - """Test case for get_stream - - Retrieve data stream - """ - pass - - def test_get_streams(self) -> None: - """Test case for get_streams - - List data streams - """ - pass - - def test_put_stream(self) -> None: - """Test case for put_stream - - Update data stream - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_tag_match_object_type.py b/streaming_api/test/test_tag_match_object_type.py deleted file mode 100644 index e9b79f0d..00000000 --- a/streaming_api/test/test_tag_match_object_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.tag_match_object_type import TagMatchObjectType - -class TestTagMatchObjectType(unittest.TestCase): - """TagMatchObjectType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTagMatchObjectType(self): - """Test TagMatchObjectType""" - # inst = TagMatchObjectType() - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/test/test_unauthorized_error.py b/streaming_api/test/test_unauthorized_error.py deleted file mode 100644 index 23af6b05..00000000 --- a/streaming_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - ThousandEyes for OpenTelemetry - - Configure ThousandEyes to stream or push test data to a OpenTelemetry compliant endpoint with the ThousandEyes for OpenTelemetry API. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from streaming_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/streaming_api/tox.ini b/streaming_api/tox.ini deleted file mode 100644 index f0261f8b..00000000 --- a/streaming_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=streaming_api diff --git a/test_templates_api/.gitignore b/tags/.gitignore similarity index 100% rename from test_templates_api/.gitignore rename to tags/.gitignore diff --git a/test_templates_api/.openapi-generator-ignore b/tags/.openapi-generator-ignore similarity index 100% rename from test_templates_api/.openapi-generator-ignore rename to tags/.openapi-generator-ignore diff --git a/tags/.openapi-generator/FILES b/tags/.openapi-generator/FILES new file mode 100644 index 00000000..0458c3b7 --- /dev/null +++ b/tags/.openapi-generator/FILES @@ -0,0 +1,88 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AccessType.md +docs/ApiError.md +docs/Assignment.md +docs/AssignmentType.md +docs/BulkTagAssignment.md +docs/BulkTagAssignments.md +docs/BulkTagResponse.md +docs/Error.md +docs/Expand.md +docs/GetTag.md +docs/GetTags200Response.md +docs/Link.md +docs/ObjectType.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/Tag.md +docs/TagAssignment.md +docs/TagAssignmentApi.md +docs/TagBulkCreateError.md +docs/TagCollection.md +docs/TagsApi.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +tags/__init__.py +tags/api/__init__.py +tags/api/tag_assignment_api.py +tags/api/tags_api.py +tags/api_client.py +tags/api_response.py +tags/configuration.py +tags/exceptions.py +tags/models/__init__.py +tags/models/access_type.py +tags/models/api_error.py +tags/models/assignment.py +tags/models/assignment_type.py +tags/models/bulk_tag_assignment.py +tags/models/bulk_tag_assignments.py +tags/models/bulk_tag_response.py +tags/models/error.py +tags/models/expand.py +tags/models/get_tag.py +tags/models/get_tags200_response.py +tags/models/link.py +tags/models/object_type.py +tags/models/self_links.py +tags/models/self_links_links.py +tags/models/tag.py +tags/models/tag_assignment.py +tags/models/tag_bulk_create_error.py +tags/models/tag_collection.py +tags/models/unauthorized_error.py +tags/models/validation_error.py +tags/models/validation_error_all_of_errors.py +tags/py.typed +tags/rest.py +test-requirements.txt +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_get_tag.py +test/test_get_tags200_response.py +test/test_link.py +test/test_object_type.py +test/test_self_links.py +test/test_self_links_links.py +test/test_tag.py +test/test_tag_assignment.py +test/test_tag_bulk_create_error.py +test/test_tag_collection.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py diff --git a/tags/.openapi-generator/VERSION b/tags/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/tags/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/tags/README.md b/tags/README.md new file mode 100644 index 00000000..ce65e5c8 --- /dev/null +++ b/tags/README.md @@ -0,0 +1,165 @@ +# tags +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`. + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import tags +``` + +### 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 tags +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import tags +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagAssignmentApi(api_client) + id = 'c6b78e57-81a2-4c5f-a11a-d96c3c664d55' # str | ID of the tag to associate + tag_assignment = tags.TagAssignment() # TagAssignment | + 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: + # 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) + except ApiException as e: + print("Exception when calling TagAssignmentApi->assign_tag: %s\n" % e) + +``` + +## Documentation for API Endpoints + +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* | [**unassign_tag**](docs/TagAssignmentApi.md#unassign_tag) | **POST** /v7/tags/{id}/unassign | Remove tag 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* | [**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 +*TagsApi* | [**update_tag**](docs/TagsApi.md#update_tag) | **PUT** /v7/tags/{id} | Update tag + + +## Documentation For Models + + - [AccessType](docs/AccessType.md) + - [ApiError](docs/ApiError.md) + - [Assignment](docs/Assignment.md) + - [AssignmentType](docs/AssignmentType.md) + - [BulkTagAssignment](docs/BulkTagAssignment.md) + - [BulkTagAssignments](docs/BulkTagAssignments.md) + - [BulkTagResponse](docs/BulkTagResponse.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [GetTag](docs/GetTag.md) + - [GetTags200Response](docs/GetTags200Response.md) + - [Link](docs/Link.md) + - [ObjectType](docs/ObjectType.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [Tag](docs/Tag.md) + - [TagAssignment](docs/TagAssignment.md) + - [TagBulkCreateError](docs/TagBulkCreateError.md) + - [TagCollection](docs/TagCollection.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/tags/docs/AccessType.md b/tags/docs/AccessType.md new file mode 100644 index 00000000..bc4d0598 --- /dev/null +++ b/tags/docs/AccessType.md @@ -0,0 +1,12 @@ +# AccessType + +The access level of the tag. The access level impacts the visibility of the label in UI and the permissions to modify the label. + +## 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/tags/docs/ApiError.md b/tags/docs/ApiError.md new file mode 100644 index 00000000..94eeff5b --- /dev/null +++ b/tags/docs/ApiError.md @@ -0,0 +1,32 @@ +# ApiError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **int** | | [optional] +**status** | **int** | | [optional] +**errors** | **str** | | [optional] +**path** | **str** | | [optional] + +## Example + +```python +from tags.models.api_error import ApiError + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiError from a JSON string +api_error_instance = ApiError.from_json(json) +# print the JSON string representation of the object +print(ApiError.to_json()) + +# convert the object into a dict +api_error_dict = api_error_instance.to_dict() +# create an instance of ApiError from a dict +api_error_from_dict = ApiError.from_dict(api_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/tags/docs/Assignment.md b/tags/docs/Assignment.md new file mode 100644 index 00000000..77b40d9f --- /dev/null +++ b/tags/docs/Assignment.md @@ -0,0 +1,30 @@ +# Assignment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Object Id | [optional] +**type** | [**AssignmentType**](AssignmentType.md) | | [optional] + +## Example + +```python +from tags.models.assignment import Assignment + +# TODO update the JSON string below +json = "{}" +# create an instance of Assignment from a JSON string +assignment_instance = Assignment.from_json(json) +# print the JSON string representation of the object +print(Assignment.to_json()) + +# convert the object into a dict +assignment_dict = assignment_instance.to_dict() +# create an instance of Assignment from a dict +assignment_from_dict = Assignment.from_dict(assignment_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/tags/docs/AssignmentType.md b/tags/docs/AssignmentType.md new file mode 100644 index 00000000..93369438 --- /dev/null +++ b/tags/docs/AssignmentType.md @@ -0,0 +1,11 @@ +# AssignmentType + + +## 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/tags/docs/BulkTagAssignment.md b/tags/docs/BulkTagAssignment.md new file mode 100644 index 00000000..2c64d75d --- /dev/null +++ b/tags/docs/BulkTagAssignment.md @@ -0,0 +1,30 @@ +# BulkTagAssignment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignments** | [**List[Assignment]**](Assignment.md) | | [optional] +**tag_id** | **str** | The ID of the tag to assign | [optional] + +## Example + +```python +from tags.models.bulk_tag_assignment import BulkTagAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkTagAssignment from a JSON string +bulk_tag_assignment_instance = BulkTagAssignment.from_json(json) +# print the JSON string representation of the object +print(BulkTagAssignment.to_json()) + +# convert the object into a dict +bulk_tag_assignment_dict = bulk_tag_assignment_instance.to_dict() +# create an instance of BulkTagAssignment from a dict +bulk_tag_assignment_from_dict = BulkTagAssignment.from_dict(bulk_tag_assignment_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/tags/docs/BulkTagAssignments.md b/tags/docs/BulkTagAssignments.md new file mode 100644 index 00000000..987666ce --- /dev/null +++ b/tags/docs/BulkTagAssignments.md @@ -0,0 +1,29 @@ +# BulkTagAssignments + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**List[BulkTagAssignment]**](BulkTagAssignment.md) | | [optional] + +## Example + +```python +from tags.models.bulk_tag_assignments import BulkTagAssignments + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkTagAssignments from a JSON string +bulk_tag_assignments_instance = BulkTagAssignments.from_json(json) +# print the JSON string representation of the object +print(BulkTagAssignments.to_json()) + +# convert the object into a dict +bulk_tag_assignments_dict = bulk_tag_assignments_instance.to_dict() +# create an instance of BulkTagAssignments from a dict +bulk_tag_assignments_from_dict = BulkTagAssignments.from_dict(bulk_tag_assignments_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/tags/docs/BulkTagResponse.md b/tags/docs/BulkTagResponse.md new file mode 100644 index 00000000..5de2f05d --- /dev/null +++ b/tags/docs/BulkTagResponse.md @@ -0,0 +1,30 @@ +# BulkTagResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**List[GetTag]**](GetTag.md) | | [optional] +**errors** | [**List[TagBulkCreateError]**](TagBulkCreateError.md) | | [optional] [readonly] + +## Example + +```python +from tags.models.bulk_tag_response import BulkTagResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkTagResponse from a JSON string +bulk_tag_response_instance = BulkTagResponse.from_json(json) +# print the JSON string representation of the object +print(BulkTagResponse.to_json()) + +# convert the object into a dict +bulk_tag_response_dict = bulk_tag_response_instance.to_dict() +# create an instance of BulkTagResponse from a dict +bulk_tag_response_from_dict = BulkTagResponse.from_dict(bulk_tag_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tags/docs/Error.md b/tags/docs/Error.md new file mode 100644 index 00000000..238ff3f3 --- /dev/null +++ b/tags/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 tags.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/tags/docs/Expand.md b/tags/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/tags/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/tags/docs/GetTag.md b/tags/docs/GetTag.md new file mode 100644 index 00000000..17e29dae --- /dev/null +++ b/tags/docs/GetTag.md @@ -0,0 +1,40 @@ +# GetTag + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignments** | [**List[Assignment]**](Assignment.md) | | [optional] +**access_type** | [**AccessType**](AccessType.md) | | [optional] +**aid** | **int** | The account group ID | [optional] [readonly] +**color** | **str** | Tag color | [optional] +**create_date** | **str** | Tag creation date | [optional] [readonly] +**icon** | **str** | | [optional] [readonly] +**id** | **str** | The tag ID | [optional] [readonly] +**key** | **str** | The tags's key | [optional] +**legacy_id** | **str** | | [optional] [readonly] +**object_type** | [**ObjectType**](ObjectType.md) | | [optional] +**value** | **str** | The tag's value | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tags.models.get_tag import GetTag + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTag from a JSON string +get_tag_instance = GetTag.from_json(json) +# print the JSON string representation of the object +print(GetTag.to_json()) + +# convert the object into a dict +get_tag_dict = get_tag_instance.to_dict() +# create an instance of GetTag from a dict +get_tag_from_dict = GetTag.from_dict(get_tag_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/tags/docs/GetTags200Response.md b/tags/docs/GetTags200Response.md new file mode 100644 index 00000000..ed4316ac --- /dev/null +++ b/tags/docs/GetTags200Response.md @@ -0,0 +1,30 @@ +# GetTags200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**List[GetTag]**](GetTag.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tags.models.get_tags200_response import GetTags200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTags200Response from a JSON string +get_tags200_response_instance = GetTags200Response.from_json(json) +# print the JSON string representation of the object +print(GetTags200Response.to_json()) + +# convert the object into a dict +get_tags200_response_dict = get_tags200_response_instance.to_dict() +# create an instance of GetTags200Response from a dict +get_tags200_response_from_dict = GetTags200Response.from_dict(get_tags200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tags/docs/Link.md b/tags/docs/Link.md new file mode 100644 index 00000000..974a352d --- /dev/null +++ b/tags/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 tags.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/tags/docs/ObjectType.md b/tags/docs/ObjectType.md new file mode 100644 index 00000000..d5d2ce91 --- /dev/null +++ b/tags/docs/ObjectType.md @@ -0,0 +1,12 @@ +# ObjectType + +The object type associated with the tag + +## 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/tags/docs/SelfLinks.md b/tags/docs/SelfLinks.md new file mode 100644 index 00000000..2ee502ff --- /dev/null +++ b/tags/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tags.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/tags/docs/SelfLinksLinks.md b/tags/docs/SelfLinksLinks.md new file mode 100644 index 00000000..7cced3a4 --- /dev/null +++ b/tags/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from tags.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/tags/docs/Tag.md b/tags/docs/Tag.md new file mode 100644 index 00000000..9447cfce --- /dev/null +++ b/tags/docs/Tag.md @@ -0,0 +1,39 @@ +# Tag + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignments** | [**List[Assignment]**](Assignment.md) | | [optional] +**access_type** | [**AccessType**](AccessType.md) | | [optional] +**aid** | **int** | The account group ID | [optional] [readonly] +**color** | **str** | Tag color | [optional] +**create_date** | **str** | Tag creation date | [optional] [readonly] +**icon** | **str** | | [optional] [readonly] +**id** | **str** | The tag ID | [optional] [readonly] +**key** | **str** | The tags's key | [optional] +**legacy_id** | **str** | | [optional] [readonly] +**object_type** | [**ObjectType**](ObjectType.md) | | [optional] +**value** | **str** | The tag's value | [optional] + +## Example + +```python +from tags.models.tag import Tag + +# TODO update the JSON string below +json = "{}" +# create an instance of Tag from a JSON string +tag_instance = Tag.from_json(json) +# print the JSON string representation of the object +print(Tag.to_json()) + +# convert the object into a dict +tag_dict = tag_instance.to_dict() +# create an instance of Tag from a dict +tag_from_dict = Tag.from_dict(tag_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/tags/docs/TagAssignment.md b/tags/docs/TagAssignment.md new file mode 100644 index 00000000..9054ec99 --- /dev/null +++ b/tags/docs/TagAssignment.md @@ -0,0 +1,29 @@ +# TagAssignment + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**assignments** | [**List[Assignment]**](Assignment.md) | | [optional] + +## Example + +```python +from tags.models.tag_assignment import TagAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of TagAssignment from a JSON string +tag_assignment_instance = TagAssignment.from_json(json) +# print the JSON string representation of the object +print(TagAssignment.to_json()) + +# convert the object into a dict +tag_assignment_dict = tag_assignment_instance.to_dict() +# create an instance of TagAssignment from a dict +tag_assignment_from_dict = TagAssignment.from_dict(tag_assignment_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/tags/docs/TagAssignmentApi.md b/tags/docs/TagAssignmentApi.md new file mode 100644 index 00000000..43123f35 --- /dev/null +++ b/tags/docs/TagAssignmentApi.md @@ -0,0 +1,355 @@ +# tags.TagAssignmentApi + +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 +[**unassign_tag**](TagAssignmentApi.md#unassign_tag) | **POST** /v7/tags/{id}/unassign | Remove tag from multiple objects + + +# **assign_tag** +> BulkTagAssignment assign_tag(id, tag_assignment, aid=aid) + +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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.bulk_tag_assignment import BulkTagAssignment +from tags.models.tag_assignment import TagAssignment +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagAssignmentApi(api_client) + id = 'c6b78e57-81a2-4c5f-a11a-d96c3c664d55' # str | ID of the tag to associate + tag_assignment = tags.TagAssignment() # TagAssignment | + 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: + # 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) + except Exception as e: + print("Exception when calling TagAssignmentApi->assign_tag: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| ID of the tag to associate | + **tag_assignment** | [**TagAssignment**](TagAssignment.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 + +[**BulkTagAssignment**](BulkTagAssignment.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** | Assignment 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) + +# **bulk_assign_tag** +> BulkTagAssignments bulk_assign_tag(bulk_tag_assignments, aid=aid) + +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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.bulk_tag_assignments import BulkTagAssignments +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagAssignmentApi(api_client) + bulk_tag_assignments = 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: + # 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) + except Exception as e: + print("Exception when calling TagAssignmentApi->bulk_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** | Item 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) + +# **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 tags +from tags.models.bulk_tag_assignments import BulkTagAssignments +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagAssignmentApi(api_client) + bulk_tag_assignments = 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) + +Remove tag from multiple objects + +Removes a tag from one or more objects. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.tag_assignment import TagAssignment +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagAssignmentApi(api_client) + id = '2983u1' # str | ID of the tag to associate + tag_assignment = tags.TagAssignment() # TagAssignment | + 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 tag from multiple objects + api_instance.unassign_tag(id, tag_assignment, aid=aid) + except Exception as e: + print("Exception when calling TagAssignmentApi->unassign_tag: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| ID of the tag to associate | + **tag_assignment** | [**TagAssignment**](TagAssignment.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/problem+json, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**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/tags/docs/TagBulkCreateError.md b/tags/docs/TagBulkCreateError.md new file mode 100644 index 00000000..94f4caa9 --- /dev/null +++ b/tags/docs/TagBulkCreateError.md @@ -0,0 +1,31 @@ +# TagBulkCreateError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag** | [**Dict[str, Tag]**](Tag.md) | | [optional] +**response_code** | **int** | HTTP response code | [optional] +**message** | **str** | Status / error message | [optional] + +## Example + +```python +from tags.models.tag_bulk_create_error import TagBulkCreateError + +# TODO update the JSON string below +json = "{}" +# create an instance of TagBulkCreateError from a JSON string +tag_bulk_create_error_instance = TagBulkCreateError.from_json(json) +# print the JSON string representation of the object +print(TagBulkCreateError.to_json()) + +# convert the object into a dict +tag_bulk_create_error_dict = tag_bulk_create_error_instance.to_dict() +# create an instance of TagBulkCreateError from a dict +tag_bulk_create_error_from_dict = TagBulkCreateError.from_dict(tag_bulk_create_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/tags/docs/TagCollection.md b/tags/docs/TagCollection.md new file mode 100644 index 00000000..4eb53e93 --- /dev/null +++ b/tags/docs/TagCollection.md @@ -0,0 +1,29 @@ +# TagCollection + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tags** | [**List[GetTag]**](GetTag.md) | | [optional] + +## Example + +```python +from tags.models.tag_collection import TagCollection + +# TODO update the JSON string below +json = "{}" +# create an instance of TagCollection from a JSON string +tag_collection_instance = TagCollection.from_json(json) +# print the JSON string representation of the object +print(TagCollection.to_json()) + +# convert the object into a dict +tag_collection_dict = tag_collection_instance.to_dict() +# create an instance of TagCollection from a dict +tag_collection_from_dict = TagCollection.from_dict(tag_collection_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/tags/docs/TagsApi.md b/tags/docs/TagsApi.md new file mode 100644 index 00000000..61fb2cc5 --- /dev/null +++ b/tags/docs/TagsApi.md @@ -0,0 +1,524 @@ +# tags.TagsApi + +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 +[**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 +[**update_tag**](TagsApi.md#update_tag) | **PUT** /v7/tags/{id} | Update tag + + +# **create_tag** +> Tag create_tag(aid=aid, body=body) + +Create tag + +Creates a new tag. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.tag import Tag +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagsApi(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) + body = tags.Tag() # Tag | Tag resource (optional) + + try: + # Create tag + api_response = api_instance.create_tag(aid=aid, body=body) + print("The response of TagsApi->create_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagsApi->create_tag: %s\n" % e) +``` + + + +### 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] + **body** | **Tag**| Tag resource | [optional] + +### Return type + +[**Tag**](Tag.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 | +|-------------|-------------|------------------| +**201** | item created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**409** | An existing item already exists | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_tag_bulk** +> BulkTagResponse create_tag_bulk(aid=aid, bulk_tag_response=bulk_tag_response) + +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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.bulk_tag_response import BulkTagResponse +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagsApi(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_tag_response = tags.BulkTagResponse() # BulkTagResponse | Tag resource (optional) + + 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) + except Exception as e: + print("Exception when calling TagsApi->create_tag_bulk: %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_tag_response** | [**BulkTagResponse**](BulkTagResponse.md)| Tag resource | [optional] + +### Return type + +[**BulkTagResponse**](BulkTagResponse.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** | Item created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**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_tag** +> delete_tag(id, aid=aid) + +Delete tag + +Deletes a tag. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagsApi(api_client) + id = 'c6b78e57-81a2-4c5f-a11a-d96c3c664d55' # str | ID of tag to delete + 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 tag + api_instance.delete_tag(id, aid=aid) + except Exception as e: + print("Exception when calling TagsApi->delete_tag: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| ID of tag to delete | + **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, application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**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_tag** +> GetTag get_tag(id, aid=aid, expand=expand) + +Retrieve tag + +Retrieves a tag using its ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.expand import Expand +from tags.models.get_tag import GetTag +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagsApi(api_client) + id = 'c6b78e57-81a2-4c5f-a11a-d96c3c664d55' # str | ID of tag to retrieve + 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 = [tags.Expand()] # List[Expand] | Optional, to retrieve associated assignments (optional) + + 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) + except Exception as e: + print("Exception when calling TagsApi->get_tag: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| ID of tag to retrieve | + **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)| Optional, to retrieve associated assignments | [optional] + +### Return type + +[**GetTag**](GetTag.md) + +### 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 | +|-------------|-------------|------------------| +**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) + +# **get_tags** +> GetTags200Response get_tags(aid=aid, expand=expand) + +List tags + +This endpoint returns a list of tags in the specified account group (`aid`). + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.expand import Expand +from tags.models.get_tags200_response import GetTags200Response +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagsApi(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) + expand = [tags.Expand()] # List[Expand] | Optional, to retrieve associated assignments (optional) + + try: + # List tags + api_response = api_instance.get_tags(aid=aid, expand=expand) + print("The response of TagsApi->get_tags:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagsApi->get_tags: %s\n" % e) +``` + + + +### 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] + **expand** | [**List[Expand]**](Expand.md)| Optional, to retrieve associated assignments | [optional] + +### Return type + +[**GetTags200Response**](GetTags200Response.md) + +### 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 | +|-------------|-------------|------------------| +**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) + +# **update_tag** +> Tag update_tag(id, aid=aid, body=body) + +Update tag + +Updates a tag. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tags +from tags.models.tag import Tag +from 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 = tags.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 = tags.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tags.TagsApi(api_client) + id = 'c6b78e57-81a2-4c5f-a11a-d96c3c664d55' # str | ID of tag to update + 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) + body = tags.Tag() # Tag | (optional) + + try: + # Update tag + api_response = api_instance.update_tag(id, aid=aid, body=body) + print("The response of TagsApi->update_tag:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TagsApi->update_tag: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| ID of tag to update | + **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] + **body** | **Tag**| | [optional] + +### Return type + +[**Tag**](Tag.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 | +|-------------|-------------|------------------| +**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/tags/docs/UnauthorizedError.md b/tags/docs/UnauthorizedError.md new file mode 100644 index 00000000..eae33aec --- /dev/null +++ b/tags/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from tags.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/tags/docs/ValidationError.md b/tags/docs/ValidationError.md new file mode 100644 index 00000000..2e8e4bb7 --- /dev/null +++ b/tags/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from tags.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/tags/docs/ValidationErrorAllOfErrors.md b/tags/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..2ed5a965 --- /dev/null +++ b/tags/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from tags.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/tags/pyproject.toml b/tags/pyproject.toml new file mode 100644 index 00000000..b117a8e6 --- /dev/null +++ b/tags/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "tags" +version = "1.0.0" +description = "Tags API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Tags API"] +include = ["tags/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "tags", + #"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/test_templates_api/requirements.txt b/tags/requirements.txt similarity index 100% rename from test_templates_api/requirements.txt rename to tags/requirements.txt diff --git a/test_templates_api/setup.cfg b/tags/setup.cfg similarity index 100% rename from test_templates_api/setup.cfg rename to tags/setup.cfg diff --git a/tags/setup.py b/tags/setup.py new file mode 100644 index 00000000..93b1b3fd --- /dev/null +++ b/tags/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "tags" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Tags API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/tags", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Tags API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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`. + """, # noqa: E501 + package_data={"tags": ["py.typed"]}, +) diff --git a/tags/tags/__init__.py b/tags/tags/__init__.py new file mode 100644 index 00000000..5e5e5bcb --- /dev/null +++ b/tags/tags/__init__.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 tags.api.tag_assignment_api import TagAssignmentApi +from tags.api.tags_api import TagsApi + +# import ApiClient +from tags.api_response import ApiResponse +from tags.api_client import ApiClient +from tags.configuration import Configuration +from tags.exceptions import OpenApiException +from tags.exceptions import ApiTypeError +from tags.exceptions import ApiValueError +from tags.exceptions import ApiKeyError +from tags.exceptions import ApiAttributeError +from tags.exceptions import ApiException + +# import models into sdk package +from tags.models.access_type import AccessType +from tags.models.api_error import ApiError +from tags.models.assignment import Assignment +from tags.models.assignment_type import AssignmentType +from tags.models.bulk_tag_assignment import BulkTagAssignment +from tags.models.bulk_tag_assignments import BulkTagAssignments +from tags.models.bulk_tag_response import BulkTagResponse +from tags.models.error import Error +from tags.models.expand import Expand +from tags.models.get_tag import GetTag +from tags.models.get_tags200_response import GetTags200Response +from tags.models.link import Link +from tags.models.object_type import ObjectType +from tags.models.self_links import SelfLinks +from tags.models.self_links_links import SelfLinksLinks +from tags.models.tag import Tag +from tags.models.tag_assignment import TagAssignment +from tags.models.tag_bulk_create_error import TagBulkCreateError +from tags.models.tag_collection import TagCollection +from tags.models.unauthorized_error import UnauthorizedError +from tags.models.validation_error import ValidationError +from tags.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/tags/tags/api/__init__.py b/tags/tags/api/__init__.py new file mode 100644 index 00000000..f6235d55 --- /dev/null +++ b/tags/tags/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from tags.api.tag_assignment_api import TagAssignmentApi +from tags.api.tags_api import TagsApi + diff --git a/tags/tags/api/tag_assignment_api.py b/tags/tags/api/tag_assignment_api.py new file mode 100644 index 00000000..30586be6 --- /dev/null +++ b/tags/tags/api/tag_assignment_api.py @@ -0,0 +1,1287 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from tags.models.bulk_tag_assignment import BulkTagAssignment +from tags.models.bulk_tag_assignments import BulkTagAssignments +from tags.models.tag_assignment import TagAssignment + +from tags.api_client import ApiClient, RequestSerialized +from tags.api_response import ApiResponse +from tags.rest import RESTResponseType + + +class TagAssignmentApi: + """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() + self.api_client = api_client + + + @validate_call + def assign_tag( + self, + id: Annotated[StrictStr, Field(description="ID of the tag to associate")], + tag_assignment: TagAssignment, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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, + ) -> BulkTagAssignment: + """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. + + :param id: ID of the tag to associate (required) + :type id: str + :param tag_assignment: (required) + :type tag_assignment: TagAssignment + :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._assign_tag_serialize( + id=id, + tag_assignment=tag_assignment, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkTagAssignment", + '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, + ).data + + + @validate_call + def assign_tag_with_http_info( + self, + id: Annotated[StrictStr, Field(description="ID of the tag to associate")], + tag_assignment: TagAssignment, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[BulkTagAssignment]: + """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. + + :param id: ID of the tag to associate (required) + :type id: str + :param tag_assignment: (required) + :type tag_assignment: TagAssignment + :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._assign_tag_serialize( + id=id, + tag_assignment=tag_assignment, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkTagAssignment", + '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, + ) + + + @validate_call + def assign_tag_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="ID of the tag to associate")], + tag_assignment: TagAssignment, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: + """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. + + :param id: ID of the tag to associate (required) + :type id: str + :param tag_assignment: (required) + :type tag_assignment: TagAssignment + :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._assign_tag_serialize( + id=id, + tag_assignment=tag_assignment, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkTagAssignment", + '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 _assign_tag_serialize( + self, + id, + tag_assignment, + 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 tag_assignment is not None: + _body_params = tag_assignment + + + # 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/{id}/assign', + 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 bulk_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: + """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. + + :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_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, + ).data + + + @validate_call + def bulk_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]: + """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. + + :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_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, + ) + + + @validate_call + def bulk_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: + """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. + + :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_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_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/assign', + 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 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, + ).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, + ) + + + @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, + id: Annotated[StrictStr, Field(description="ID of the tag to associate")], + tag_assignment: TagAssignment, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 tag from multiple objects + + Removes a tag from one or more objects. + + :param id: ID of the tag to associate (required) + :type id: str + :param tag_assignment: (required) + :type tag_assignment: TagAssignment + :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_tag_serialize( + id=id, + tag_assignment=tag_assignment, + 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, + '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, + ).data + + + @validate_call + def unassign_tag_with_http_info( + self, + id: Annotated[StrictStr, Field(description="ID of the tag to associate")], + tag_assignment: TagAssignment, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 tag from multiple objects + + Removes a tag from one or more objects. + + :param id: ID of the tag to associate (required) + :type id: str + :param tag_assignment: (required) + :type tag_assignment: TagAssignment + :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_tag_serialize( + id=id, + tag_assignment=tag_assignment, + 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, + '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, + ) + + + @validate_call + def unassign_tag_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="ID of the tag to associate")], + tag_assignment: TagAssignment, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 tag from multiple objects + + Removes a tag from one or more objects. + + :param id: ID of the tag to associate (required) + :type id: str + :param tag_assignment: (required) + :type tag_assignment: TagAssignment + :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_tag_serialize( + id=id, + tag_assignment=tag_assignment, + 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, + '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_tag_serialize( + self, + id, + tag_assignment, + 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 tag_assignment is not None: + _body_params = tag_assignment + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/problem+json', + 'application/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/{id}/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/tags/tags/api/tags_api.py b/tags/tags/api/tags_api.py new file mode 100644 index 00000000..29216db2 --- /dev/null +++ b/tags/tags/api/tags_api.py @@ -0,0 +1,1855 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tags.models.bulk_tag_response import BulkTagResponse +from tags.models.expand import Expand +from tags.models.get_tag import GetTag +from tags.models.get_tags200_response import GetTags200Response +from tags.models.tag import Tag + +from tags.api_client import ApiClient, RequestSerialized +from tags.api_response import ApiResponse +from tags.rest import RESTResponseType + + +class TagsApi: + """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() + self.api_client = api_client + + + @validate_call + def create_tag( + 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, + body: Annotated[Optional[Tag], Field(description="Tag resource")] = 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, + ) -> Tag: + """Create tag + + Creates a new tag. + + :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 body: Tag resource + :type body: Tag + :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_tag_serialize( + aid=aid, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Tag", + '400': "ValidationError", + '401': "UnauthorizedError", + '409': None, + '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, + ).data + + + @validate_call + def create_tag_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, + body: Annotated[Optional[Tag], Field(description="Tag resource")] = 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[Tag]: + """Create tag + + Creates a new tag. + + :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 body: Tag resource + :type body: Tag + :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_tag_serialize( + aid=aid, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Tag", + '400': "ValidationError", + '401': "UnauthorizedError", + '409': None, + '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, + ) + + + @validate_call + def create_tag_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, + body: Annotated[Optional[Tag], Field(description="Tag resource")] = 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 tag + + Creates a new tag. + + :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 body: Tag resource + :type body: Tag + :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_tag_serialize( + aid=aid, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Tag", + '400': "ValidationError", + '401': "UnauthorizedError", + '409': None, + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_tag_serialize( + self, + aid, + body, + _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 body is not None: + _body_params = body + + + # 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', + 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 create_tag_bulk( + 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, + _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, + ) -> BulkTagResponse: + """Create multiple tags + + Creates multiple tags. Note the response includes a `statuses` array. This array provides status information for each tag object, indexed 1:1 with the `tags` array. + + :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_tag_response: Tag resource + :type bulk_tag_response: BulkTagResponse + :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_tag_bulk_serialize( + aid=aid, + bulk_tag_response=bulk_tag_response, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkTagResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '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, + ).data + + + @validate_call + def create_tag_bulk_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, + _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[BulkTagResponse]: + """Create multiple tags + + Creates multiple tags. Note the response includes a `statuses` array. This array provides status information for each tag object, indexed 1:1 with the `tags` array. + + :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_tag_response: Tag resource + :type bulk_tag_response: BulkTagResponse + :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_tag_bulk_serialize( + aid=aid, + bulk_tag_response=bulk_tag_response, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkTagResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '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, + ) + + + @validate_call + def create_tag_bulk_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, + _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 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. + + :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_tag_response: Tag resource + :type bulk_tag_response: BulkTagResponse + :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_tag_bulk_serialize( + aid=aid, + bulk_tag_response=bulk_tag_response, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkTagResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_tag_bulk_serialize( + self, + aid, + bulk_tag_response, + _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_response is not None: + _body_params = bulk_tag_response + + + # 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/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 delete_tag( + self, + id: Annotated[StrictStr, Field(description="ID of tag to delete")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 tag + + Deletes a tag. + + :param id: ID of tag to delete (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_tag_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, + '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, + ).data + + + @validate_call + def delete_tag_with_http_info( + self, + id: Annotated[StrictStr, Field(description="ID of tag to delete")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 tag + + Deletes a tag. + + :param id: ID of tag to delete (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_tag_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, + '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, + ) + + + @validate_call + def delete_tag_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="ID of tag to delete")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 tag + + Deletes a tag. + + :param id: ID of tag to delete (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_tag_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, + '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 _delete_tag_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/problem+json', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tags/{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_tag( + self, + id: Annotated[StrictStr, Field(description="ID of tag to retrieve")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional, to retrieve associated assignments")] = 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, + ) -> GetTag: + """Retrieve tag + + Retrieves a tag using its ID. + + :param id: ID of tag to retrieve (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 expand: Optional, to retrieve associated assignments + :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_tag_serialize( + id=id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetTag", + '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, + ).data + + + @validate_call + def get_tag_with_http_info( + self, + id: Annotated[StrictStr, Field(description="ID of tag to retrieve")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional, to retrieve associated assignments")] = 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[GetTag]: + """Retrieve tag + + Retrieves a tag using its ID. + + :param id: ID of tag to retrieve (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 expand: Optional, to retrieve associated assignments + :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_tag_serialize( + id=id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetTag", + '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, + ) + + + @validate_call + def get_tag_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="ID of tag to retrieve")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional, to retrieve associated assignments")] = 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 tag + + Retrieves a tag using its ID. + + :param id: ID of tag to retrieve (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 expand: Optional, to retrieve associated assignments + :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_tag_serialize( + id=id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetTag", + '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 _get_tag_serialize( + self, + id, + aid, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'multi', + } + + _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)) + + 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tags/{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_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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional, to retrieve associated assignments")] = 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, + ) -> GetTags200Response: + """List tags + + This endpoint returns a list of tags in the specified account group (`aid`). + + :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: Optional, to retrieve associated assignments + :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_tags_serialize( + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetTags200Response", + '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, + ).data + + + @validate_call + def get_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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional, to retrieve associated assignments")] = 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[GetTags200Response]: + """List tags + + This endpoint returns a list of tags in the specified account group (`aid`). + + :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: Optional, to retrieve associated assignments + :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_tags_serialize( + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetTags200Response", + '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, + ) + + + @validate_call + def get_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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional, to retrieve associated assignments")] = 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 tags + + This endpoint returns a list of tags in the specified account group (`aid`). + + :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: Optional, to retrieve associated assignments + :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_tags_serialize( + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetTags200Response", + '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 _get_tags_serialize( + self, + aid, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'multi', + } + + _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 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tags', + 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_tag( + self, + id: Annotated[StrictStr, Field(description="ID of tag to update")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + body: Optional[Tag] = 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, + ) -> Tag: + """Update tag + + Updates a tag. + + :param id: ID of tag to update (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 body: + :type body: Tag + :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_tag_serialize( + id=id, + aid=aid, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Tag", + '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, + ).data + + + @validate_call + def update_tag_with_http_info( + self, + id: Annotated[StrictStr, Field(description="ID of tag to update")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + body: Optional[Tag] = 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[Tag]: + """Update tag + + Updates a tag. + + :param id: ID of tag to update (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 body: + :type body: Tag + :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_tag_serialize( + id=id, + aid=aid, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Tag", + '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, + ) + + + @validate_call + def update_tag_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="ID of tag to update")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + body: Optional[Tag] = 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 tag + + Updates a tag. + + :param id: ID of tag to update (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 body: + :type body: Tag + :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_tag_serialize( + id=id, + aid=aid, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Tag", + '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 _update_tag_serialize( + self, + id, + aid, + body, + _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 body is not None: + _body_params = body + + + # 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='PUT', + resource_path='/v7/tags/{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/tags/tags/api_client.py b/tags/tags/api_client.py new file mode 100644 index 00000000..63af4a27 --- /dev/null +++ b/tags/tags/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from tags.configuration import Configuration +from tags.api_response import ApiResponse, T as ApiResponseT +import tags.models +from tags import rest +from tags.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(tags.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/tags/tags/api_response.py b/tags/tags/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/tags/tags/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/tags/tags/configuration.py b/tags/tags/configuration.py new file mode 100644 index 00000000..f1b82916 --- /dev/null +++ b/tags/tags/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("tags") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/tags/tags/exceptions.py b/tags/tags/exceptions.py new file mode 100644 index 00000000..2e97c336 --- /dev/null +++ b/tags/tags/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/tags/tags/models/__init__.py b/tags/tags/models/__init__.py new file mode 100644 index 00000000..15007a32 --- /dev/null +++ b/tags/tags/models/__init__.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from tags.models.access_type import AccessType +from tags.models.api_error import ApiError +from tags.models.assignment import Assignment +from tags.models.assignment_type import AssignmentType +from tags.models.bulk_tag_assignment import BulkTagAssignment +from tags.models.bulk_tag_assignments import BulkTagAssignments +from tags.models.bulk_tag_response import BulkTagResponse +from tags.models.error import Error +from tags.models.expand import Expand +from tags.models.get_tag import GetTag +from tags.models.get_tags200_response import GetTags200Response +from tags.models.link import Link +from tags.models.object_type import ObjectType +from tags.models.self_links import SelfLinks +from tags.models.self_links_links import SelfLinksLinks +from tags.models.tag import Tag +from tags.models.tag_assignment import TagAssignment +from tags.models.tag_bulk_create_error import TagBulkCreateError +from tags.models.tag_collection import TagCollection +from tags.models.unauthorized_error import UnauthorizedError +from tags.models.validation_error import ValidationError +from tags.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/tags/tags/models/access_type.py b/tags/tags/models/access_type.py new file mode 100644 index 00000000..54202cb8 --- /dev/null +++ b/tags/tags/models/access_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AccessType(str, Enum): + """ + The access level of the tag. The access level impacts the visibility of the label in UI and the permissions to modify the label. + """ + + """ + allowed enum values + """ + ALL = 'all' + PARTNER = 'partner' + SYSTEM = 'system' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AccessType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tags/tags/models/api_error.py b/tags/tags/models/api_error.py new file mode 100644 index 00000000..0cb05649 --- /dev/null +++ b/tags/tags/models/api_error.py @@ -0,0 +1,93 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApiError(BaseModel): + """ + ApiError + """ # noqa: E501 + timestamp: Optional[StrictInt] = None + status: Optional[StrictInt] = None + errors: Optional[StrictStr] = None + path: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["timestamp", "status", "errors", "path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApiError 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 ApiError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "status": obj.get("status"), + "errors": obj.get("errors"), + "path": obj.get("path") + }) + return _obj + + diff --git a/tags/tags/models/assignment.py b/tags/tags/models/assignment.py new file mode 100644 index 00000000..ceeca65b --- /dev/null +++ b/tags/tags/models/assignment.py @@ -0,0 +1,90 @@ +# 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.2 + 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 tags.models.assignment_type import AssignmentType +from typing import Optional, Set +from typing_extensions import Self + +class Assignment(BaseModel): + """ + Assignment + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="Object Id") + type: Optional[AssignmentType] = None + __properties: ClassVar[List[str]] = ["id", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Assignment 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 Assignment 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"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tags/tags/models/assignment_type.py b/tags/tags/models/assignment_type.py new file mode 100644 index 00000000..4be28b47 --- /dev/null +++ b/tags/tags/models/assignment_type.py @@ -0,0 +1,39 @@ +# 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.2 + 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 AssignmentType(str, Enum): + """ + AssignmentType + """ + + """ + allowed enum values + """ + TEST = 'test' + AGENT = 'agent' + ENDPOINT_MINUS_AGENT_MINUS_TEST = 'endpoint-agent-test' + REPORT = 'report' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssignmentType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tags/tags/models/bulk_tag_assignment.py b/tags/tags/models/bulk_tag_assignment.py new file mode 100644 index 00000000..149c6e9d --- /dev/null +++ b/tags/tags/models/bulk_tag_assignment.py @@ -0,0 +1,97 @@ +# 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.2 + 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 tags.models.assignment import Assignment +from typing import Optional, Set +from typing_extensions import Self + +class BulkTagAssignment(BaseModel): + """ + BulkTagAssignment + """ # noqa: E501 + assignments: Optional[List[Assignment]] = None + tag_id: Optional[StrictStr] = Field(default=None, description="The ID of the tag to assign", alias="tagId") + __properties: ClassVar[List[str]] = ["assignments", "tagId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkTagAssignment 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 assignments (list) + _items = [] + if self.assignments: + for _item in self.assignments: + if _item: + _items.append(_item.to_dict()) + _dict['assignments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkTagAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignments": [Assignment.from_dict(_item) for _item in obj["assignments"]] if obj.get("assignments") is not None else None, + "tagId": obj.get("tagId") + }) + return _obj + + diff --git a/tags/tags/models/bulk_tag_assignments.py b/tags/tags/models/bulk_tag_assignments.py new file mode 100644 index 00000000..7c899180 --- /dev/null +++ b/tags/tags/models/bulk_tag_assignments.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tags.models.bulk_tag_assignment import BulkTagAssignment +from typing import Optional, Set +from typing_extensions import Self + +class BulkTagAssignments(BaseModel): + """ + BulkTagAssignments + """ # noqa: E501 + tags: Optional[List[BulkTagAssignment]] = None + __properties: ClassVar[List[str]] = ["tags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkTagAssignments 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 tags (list) + _items = [] + if self.tags: + for _item in self.tags: + if _item: + _items.append(_item.to_dict()) + _dict['tags'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkTagAssignments from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": [BulkTagAssignment.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/bulk_tag_response.py b/tags/tags/models/bulk_tag_response.py new file mode 100644 index 00000000..fef2eb84 --- /dev/null +++ b/tags/tags/models/bulk_tag_response.py @@ -0,0 +1,107 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tags.models.get_tag import GetTag +from tags.models.tag_bulk_create_error import TagBulkCreateError +from typing import Optional, Set +from typing_extensions import Self + +class BulkTagResponse(BaseModel): + """ + BulkTagResponse + """ # noqa: E501 + tags: Optional[List[GetTag]] = None + errors: Optional[List[TagBulkCreateError]] = None + __properties: ClassVar[List[str]] = ["tags", "errors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkTagResponse 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([ + "errors", + ]) + + _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 tags (list) + _items = [] + if self.tags: + for _item in self.tags: + if _item: + _items.append(_item.to_dict()) + _dict['tags'] = _items + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkTagResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": [GetTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, + "errors": [TagBulkCreateError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/error.py b/tags/tags/models/error.py new file mode 100644 index 00000000..bebada30 --- /dev/null +++ b/tags/tags/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tags/tags/models/expand.py b/tags/tags/models/expand.py new file mode 100644 index 00000000..67fa2f78 --- /dev/null +++ b/tags/tags/models/expand.py @@ -0,0 +1,36 @@ +# 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.2 + 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 + """ + ASSIGNMENTS = 'assignments' + + @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/tags/tags/models/get_tag.py b/tags/tags/models/get_tag.py new file mode 100644 index 00000000..cab739b9 --- /dev/null +++ b/tags/tags/models/get_tag.py @@ -0,0 +1,143 @@ +# 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.2 + 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 tags.models.access_type import AccessType +from tags.models.assignment import Assignment +from tags.models.object_type import ObjectType +from tags.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetTag(BaseModel): + """ + GetTag + """ # noqa: E501 + assignments: Optional[List[Assignment]] = None + access_type: Optional[AccessType] = Field(default=None, alias="accessType") + aid: Optional[StrictInt] = Field(default=None, description="The account group ID") + color: Optional[StrictStr] = Field(default=None, description="Tag color") + create_date: Optional[StrictStr] = Field(default=None, description="Tag creation date", alias="createDate") + icon: Optional[StrictStr] = None + id: Optional[StrictStr] = Field(default=None, description="The tag ID") + key: Optional[StrictStr] = Field(default=None, description="The tags's key") + legacy_id: Optional[StrictStr] = Field(default=None, alias="legacyId") + object_type: Optional[ObjectType] = Field(default=None, alias="objectType") + value: Optional[StrictStr] = Field(default=None, description="The tag's value") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["assignments", "accessType", "aid", "color", "createDate", "icon", "id", "key", "legacyId", "objectType", "value", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTag 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. + """ + excluded_fields: Set[str] = set([ + "aid", + "create_date", + "icon", + "id", + "legacy_id", + ]) + + _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 assignments (list) + _items = [] + if self.assignments: + for _item in self.assignments: + if _item: + _items.append(_item.to_dict()) + _dict['assignments'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if legacy_id (nullable) is None + # and model_fields_set contains the field + if self.legacy_id is None and "legacy_id" in self.model_fields_set: + _dict['legacyId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetTag from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignments": [Assignment.from_dict(_item) for _item in obj["assignments"]] if obj.get("assignments") is not None else None, + "accessType": obj.get("accessType"), + "aid": obj.get("aid"), + "color": obj.get("color"), + "createDate": obj.get("createDate"), + "icon": obj.get("icon"), + "id": obj.get("id"), + "key": obj.get("key"), + "legacyId": obj.get("legacyId"), + "objectType": obj.get("objectType"), + "value": obj.get("value"), + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/get_tags200_response.py b/tags/tags/models/get_tags200_response.py new file mode 100644 index 00000000..3332473d --- /dev/null +++ b/tags/tags/models/get_tags200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tags.models.get_tag import GetTag +from tags.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetTags200Response(BaseModel): + """ + GetTags200Response + """ # noqa: E501 + tags: Optional[List[GetTag]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tags", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTags200Response 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 tags (list) + _items = [] + if self.tags: + for _item in self.tags: + if _item: + _items.append(_item.to_dict()) + _dict['tags'] = _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 GetTags200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": [GetTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/link.py b/tags/tags/models/link.py new file mode 100644 index 00000000..b7748eca --- /dev/null +++ b/tags/tags/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tags/tags/models/object_type.py b/tags/tags/models/object_type.py new file mode 100644 index 00000000..21433963 --- /dev/null +++ b/tags/tags/models/object_type.py @@ -0,0 +1,39 @@ +# 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.2 + 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 ObjectType(str, Enum): + """ + The object type associated with the tag + """ + + """ + allowed enum values + """ + TEST = 'test' + DASHBOARD = 'dashboard' + ENDPOINT_MINUS_TEST = 'endpoint-test' + V_MINUS_AGENT = 'v-agent' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ObjectType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tags/tags/models/self_links.py b/tags/tags/models/self_links.py new file mode 100644 index 00000000..1f0fb99d --- /dev/null +++ b/tags/tags/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 tags.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/self_links_links.py b/tags/tags/models/self_links_links.py new file mode 100644 index 00000000..cb2a5e3a --- /dev/null +++ b/tags/tags/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 tags.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/tags/tags/models/tag.py b/tags/tags/models/tag.py new file mode 100644 index 00000000..09303142 --- /dev/null +++ b/tags/tags/models/tag.py @@ -0,0 +1,137 @@ +# 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.2 + 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 tags.models.access_type import AccessType +from tags.models.assignment import Assignment +from tags.models.object_type import ObjectType +from typing import Optional, Set +from typing_extensions import Self + +class Tag(BaseModel): + """ + Tag + """ # noqa: E501 + assignments: Optional[List[Assignment]] = None + access_type: Optional[AccessType] = Field(default=None, alias="accessType") + aid: Optional[StrictInt] = Field(default=None, description="The account group ID") + color: Optional[StrictStr] = Field(default=None, description="Tag color") + create_date: Optional[StrictStr] = Field(default=None, description="Tag creation date", alias="createDate") + icon: Optional[StrictStr] = None + id: Optional[StrictStr] = Field(default=None, description="The tag ID") + key: Optional[StrictStr] = Field(default=None, description="The tags's key") + legacy_id: Optional[StrictStr] = Field(default=None, alias="legacyId") + object_type: Optional[ObjectType] = Field(default=None, alias="objectType") + value: Optional[StrictStr] = Field(default=None, description="The tag's value") + __properties: ClassVar[List[str]] = ["assignments", "accessType", "aid", "color", "createDate", "icon", "id", "key", "legacyId", "objectType", "value"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Tag 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. + """ + excluded_fields: Set[str] = set([ + "aid", + "create_date", + "icon", + "id", + "legacy_id", + ]) + + _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 assignments (list) + _items = [] + if self.assignments: + for _item in self.assignments: + if _item: + _items.append(_item.to_dict()) + _dict['assignments'] = _items + # set to None if icon (nullable) is None + # and model_fields_set contains the field + if self.icon is None and "icon" in self.model_fields_set: + _dict['icon'] = None + + # set to None if legacy_id (nullable) is None + # and model_fields_set contains the field + if self.legacy_id is None and "legacy_id" in self.model_fields_set: + _dict['legacyId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Tag from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignments": [Assignment.from_dict(_item) for _item in obj["assignments"]] if obj.get("assignments") is not None else None, + "accessType": obj.get("accessType"), + "aid": obj.get("aid"), + "color": obj.get("color"), + "createDate": obj.get("createDate"), + "icon": obj.get("icon"), + "id": obj.get("id"), + "key": obj.get("key"), + "legacyId": obj.get("legacyId"), + "objectType": obj.get("objectType"), + "value": obj.get("value") + }) + return _obj + + diff --git a/tags/tags/models/tag_assignment.py b/tags/tags/models/tag_assignment.py new file mode 100644 index 00000000..a7fde565 --- /dev/null +++ b/tags/tags/models/tag_assignment.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tags.models.assignment import Assignment +from typing import Optional, Set +from typing_extensions import Self + +class TagAssignment(BaseModel): + """ + TagAssignment + """ # noqa: E501 + assignments: Optional[List[Assignment]] = None + __properties: ClassVar[List[str]] = ["assignments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TagAssignment 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 assignments (list) + _items = [] + if self.assignments: + for _item in self.assignments: + if _item: + _items.append(_item.to_dict()) + _dict['assignments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "assignments": [Assignment.from_dict(_item) for _item in obj["assignments"]] if obj.get("assignments") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/tag_bulk_create_error.py b/tags/tags/models/tag_bulk_create_error.py new file mode 100644 index 00000000..82591ec3 --- /dev/null +++ b/tags/tags/models/tag_bulk_create_error.py @@ -0,0 +1,104 @@ +# 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.2 + 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 tags.models.tag import Tag +from typing import Optional, Set +from typing_extensions import Self + +class TagBulkCreateError(BaseModel): + """ + TagBulkCreateError + """ # noqa: E501 + tag: Optional[Dict[str, Tag]] = None + response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code", alias="responseCode") + message: Optional[StrictStr] = Field(default=None, description="Status / error message") + __properties: ClassVar[List[str]] = ["tag", "responseCode", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TagBulkCreateError 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 value in tag (dict) + _field_dict = {} + if self.tag: + for _key in self.tag: + if self.tag[_key]: + _field_dict[_key] = self.tag[_key].to_dict() + _dict['tag'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagBulkCreateError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag": dict( + (_k, Tag.from_dict(_v)) + for _k, _v in obj["tag"].items() + ) + if obj.get("tag") is not None + else None, + "responseCode": obj.get("responseCode"), + "message": obj.get("message") + }) + return _obj + + diff --git a/tags/tags/models/tag_collection.py b/tags/tags/models/tag_collection.py new file mode 100644 index 00000000..96d46553 --- /dev/null +++ b/tags/tags/models/tag_collection.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tags.models.get_tag import GetTag +from typing import Optional, Set +from typing_extensions import Self + +class TagCollection(BaseModel): + """ + TagCollection + """ # noqa: E501 + tags: Optional[List[GetTag]] = None + __properties: ClassVar[List[str]] = ["tags"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TagCollection 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 tags (list) + _items = [] + if self.tags: + for _item in self.tags: + if _item: + _items.append(_item.to_dict()) + _dict['tags'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagCollection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tags": [GetTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/unauthorized_error.py b/tags/tags/models/unauthorized_error.py new file mode 100644 index 00000000..ec3218d8 --- /dev/null +++ b/tags/tags/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tags/tags/models/validation_error.py b/tags/tags/models/validation_error.py new file mode 100644 index 00000000..59249a0f --- /dev/null +++ b/tags/tags/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 tags.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/tags/tags/models/validation_error_all_of_errors.py b/tags/tags/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..a823da75 --- /dev/null +++ b/tags/tags/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/test_templates_api/test_templates_api/py.typed b/tags/tags/py.typed similarity index 100% rename from test_templates_api/test_templates_api/py.typed rename to tags/tags/py.typed diff --git a/tags/tags/rest.py b/tags/tags/rest.py new file mode 100644 index 00000000..1981471f --- /dev/null +++ b/tags/tags/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from tags.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/tags/test-requirements.txt b/tags/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/tags/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/test_templates_api/test/__init__.py b/tags/test/__init__.py similarity index 100% rename from test_templates_api/test/__init__.py rename to tags/test/__init__.py diff --git a/tags/test/test_access_type.py b/tags/test/test_access_type.py new file mode 100644 index 00000000..6b18cf42 --- /dev/null +++ b/tags/test/test_access_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.access_type import AccessType + +class TestAccessType(unittest.TestCase): + """AccessType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccessType(self): + """Test AccessType""" + # inst = AccessType() + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_api_error.py b/tags/test/test_api_error.py new file mode 100644 index 00000000..5f11884c --- /dev/null +++ b/tags/test/test_api_error.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.api_error import ApiError + +class TestApiError(unittest.TestCase): + """ApiError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApiError: + """Test ApiError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApiError` + """ + model = ApiError() + if include_optional: + return ApiError( + timestamp = 1679677853573, + status = 500, + errors = 'Internal Server Error', + path = '/v7/tags' + ) + else: + return ApiError( + ) + """ + + def testApiError(self): + """Test ApiError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_assignment.py b/tags/test/test_assignment.py new file mode 100644 index 00000000..aef3af77 --- /dev/null +++ b/tags/test/test_assignment.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.assignment import Assignment + +class TestAssignment(unittest.TestCase): + """Assignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Assignment: + """Test Assignment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Assignment` + """ + model = Assignment() + if include_optional: + return Assignment( + id = '123', + type = 'test' + ) + else: + return Assignment( + ) + """ + + def testAssignment(self): + """Test Assignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_assignment_type.py b/tags/test/test_assignment_type.py new file mode 100644 index 00000000..0336ec75 --- /dev/null +++ b/tags/test/test_assignment_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.assignment_type import AssignmentType + +class TestAssignmentType(unittest.TestCase): + """AssignmentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssignmentType(self): + """Test AssignmentType""" + # inst = AssignmentType() + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_bulk_tag_assignment.py b/tags/test/test_bulk_tag_assignment.py new file mode 100644 index 00000000..3568a09d --- /dev/null +++ b/tags/test/test_bulk_tag_assignment.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.bulk_tag_assignment import BulkTagAssignment + +class TestBulkTagAssignment(unittest.TestCase): + """BulkTagAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkTagAssignment: + """Test BulkTagAssignment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkTagAssignment` + """ + model = BulkTagAssignment() + if include_optional: + return BulkTagAssignment( + assignments = [ + tags.models.assignment.Assignment( + id = '123', + type = 'test', ) + ], + tag_id = 'c6b78e57-81a2-4c5f-a11a-d96c3c664d55' + ) + else: + return BulkTagAssignment( + ) + """ + + def testBulkTagAssignment(self): + """Test BulkTagAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_bulk_tag_assignments.py b/tags/test/test_bulk_tag_assignments.py new file mode 100644 index 00000000..f01f6d41 --- /dev/null +++ b/tags/test/test_bulk_tag_assignments.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.bulk_tag_assignments import BulkTagAssignments + +class TestBulkTagAssignments(unittest.TestCase): + """BulkTagAssignments unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkTagAssignments: + """Test BulkTagAssignments + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkTagAssignments` + """ + model = BulkTagAssignments() + if include_optional: + return BulkTagAssignments( + tags = [ + null + ] + ) + else: + return BulkTagAssignments( + ) + """ + + def testBulkTagAssignments(self): + """Test BulkTagAssignments""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_bulk_tag_response.py b/tags/test/test_bulk_tag_response.py new file mode 100644 index 00000000..7cdbba21 --- /dev/null +++ b/tags/test/test_bulk_tag_response.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.bulk_tag_response import BulkTagResponse + +class TestBulkTagResponse(unittest.TestCase): + """BulkTagResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkTagResponse: + """Test BulkTagResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkTagResponse` + """ + model = BulkTagResponse() + if include_optional: + return BulkTagResponse( + tags = [ + null + ], + errors = [ + tags.models.tag_bulk_create_error.TagBulkCreateError( + tag = { + 'key' : null + }, + response_code = 200, + message = 'Object successfully created', ) + ] + ) + else: + return BulkTagResponse( + ) + """ + + def testBulkTagResponse(self): + """Test BulkTagResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_error.py b/tags/test/test_error.py new file mode 100644 index 00000000..18e38832 --- /dev/null +++ b/tags/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_expand.py b/tags/test/test_expand.py new file mode 100644 index 00000000..017501bf --- /dev/null +++ b/tags/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_get_tag.py b/tags/test/test_get_tag.py new file mode 100644 index 00000000..4c707aff --- /dev/null +++ b/tags/test/test_get_tag.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.get_tag import GetTag + +class TestGetTag(unittest.TestCase): + """GetTag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTag: + """Test GetTag + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTag` + """ + model = GetTag() + if include_optional: + return GetTag( + assignments = [ + tags.models.assignment.Assignment( + id = '123', + type = 'test', ) + ], + access_type = 'all', + aid = 1234, + color = '#FF0000', + create_date = '2022-03-01T23:31:11Z', + icon = '', + id = '5aeab5d5-0d34-4d44-a7ac-fb440185295c', + key = 'branch', + legacy_id = '', + object_type = 'test', + value = 'sfo', + links = tags.models.self_links__links.SelfLinks__links( + self = tags.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetTag( + ) + """ + + def testGetTag(self): + """Test GetTag""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_get_tags200_response.py b/tags/test/test_get_tags200_response.py new file mode 100644 index 00000000..569d8736 --- /dev/null +++ b/tags/test/test_get_tags200_response.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.get_tags200_response import GetTags200Response + +class TestGetTags200Response(unittest.TestCase): + """GetTags200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTags200Response: + """Test GetTags200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTags200Response` + """ + model = GetTags200Response() + if include_optional: + return GetTags200Response( + tags = [ + null + ], + links = tags.models.self_links__links.SelfLinks__links( + self = tags.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetTags200Response( + ) + """ + + def testGetTags200Response(self): + """Test GetTags200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_link.py b/tags/test/test_link.py new file mode 100644 index 00000000..5a25ae7d --- /dev/null +++ b/tags/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_object_type.py b/tags/test/test_object_type.py new file mode 100644 index 00000000..d060c00a --- /dev/null +++ b/tags/test/test_object_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.object_type import ObjectType + +class TestObjectType(unittest.TestCase): + """ObjectType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testObjectType(self): + """Test ObjectType""" + # inst = ObjectType() + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_self_links.py b/tags/test/test_self_links.py new file mode 100644 index 00000000..308fe14f --- /dev/null +++ b/tags/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = tags.models.self_links__links.SelfLinks__links( + self = tags.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_self_links_links.py b/tags/test/test_self_links_links.py new file mode 100644 index 00000000..e215aee6 --- /dev/null +++ b/tags/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = tags.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_tag.py b/tags/test/test_tag.py new file mode 100644 index 00000000..17c6ac5d --- /dev/null +++ b/tags/test/test_tag.py @@ -0,0 +1,65 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.tag import Tag + +class TestTag(unittest.TestCase): + """Tag unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Tag: + """Test Tag + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Tag` + """ + model = Tag() + if include_optional: + return Tag( + assignments = [ + tags.models.assignment.Assignment( + id = '123', + type = 'test', ) + ], + access_type = 'all', + aid = 1234, + color = '#FF0000', + create_date = '2022-03-01T23:31:11Z', + icon = '', + id = '5aeab5d5-0d34-4d44-a7ac-fb440185295c', + key = 'branch', + legacy_id = '', + object_type = 'test', + value = 'sfo' + ) + else: + return Tag( + ) + """ + + def testTag(self): + """Test Tag""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_tag_assignment.py b/tags/test/test_tag_assignment.py new file mode 100644 index 00000000..a536bb2e --- /dev/null +++ b/tags/test/test_tag_assignment.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.tag_assignment import TagAssignment + +class TestTagAssignment(unittest.TestCase): + """TagAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagAssignment: + """Test TagAssignment + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagAssignment` + """ + model = TagAssignment() + if include_optional: + return TagAssignment( + assignments = [ + tags.models.assignment.Assignment( + id = '123', + type = 'test', ) + ] + ) + else: + return TagAssignment( + ) + """ + + def testTagAssignment(self): + """Test TagAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_tag_bulk_create_error.py b/tags/test/test_tag_bulk_create_error.py new file mode 100644 index 00000000..a6df40f6 --- /dev/null +++ b/tags/test/test_tag_bulk_create_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.tag_bulk_create_error import TagBulkCreateError + +class TestTagBulkCreateError(unittest.TestCase): + """TagBulkCreateError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagBulkCreateError: + """Test TagBulkCreateError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagBulkCreateError` + """ + model = TagBulkCreateError() + if include_optional: + return TagBulkCreateError( + tag = { + 'key' : null + }, + response_code = 200, + message = 'Object successfully created' + ) + else: + return TagBulkCreateError( + ) + """ + + def testTagBulkCreateError(self): + """Test TagBulkCreateError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_tag_collection.py b/tags/test/test_tag_collection.py new file mode 100644 index 00000000..c5af9ab2 --- /dev/null +++ b/tags/test/test_tag_collection.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.tag_collection import TagCollection + +class TestTagCollection(unittest.TestCase): + """TagCollection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TagCollection: + """Test TagCollection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TagCollection` + """ + model = TagCollection() + if include_optional: + return TagCollection( + tags = [ + null + ] + ) + else: + return TagCollection( + ) + """ + + def testTagCollection(self): + """Test TagCollection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_unauthorized_error.py b/tags/test/test_unauthorized_error.py new file mode 100644 index 00000000..1edc8cd2 --- /dev/null +++ b/tags/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_validation_error.py b/tags/test/test_validation_error.py new file mode 100644 index 00000000..6074f09d --- /dev/null +++ b/tags/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + tags.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tags/test/test_validation_error_all_of_errors.py b/tags/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..c4670130 --- /dev/null +++ b/tags/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tags.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/.gitignore b/test_results/.gitignore similarity index 100% rename from tests_api/.gitignore rename to test_results/.gitignore diff --git a/tests_api/.openapi-generator-ignore b/test_results/.openapi-generator-ignore similarity index 100% rename from tests_api/.openapi-generator-ignore rename to test_results/.openapi-generator-ignore diff --git a/test_results/.openapi-generator/FILES b/test_results/.openapi-generator/FILES new file mode 100644 index 00000000..91af1d9a --- /dev/null +++ b/test_results/.openapi-generator/FILES @@ -0,0 +1,301 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/Agent.md +docs/AppLinks.md +docs/AppLinksLinks.md +docs/BgpBasicTestResult.md +docs/BgpHop.md +docs/BgpTestResult.md +docs/BgpTestResults.md +docs/BgpTestRouteInformationResult.md +docs/BgpTestRouteInformationResults.md +docs/DNSSECTestMetricsApi.md +docs/DNSServerTestMetricsApi.md +docs/DNSTraceTestMetricsApi.md +docs/DnsServerTestResult.md +docs/DnsServerTestResults.md +docs/DnsTraceTestResult.md +docs/DnsTraceTestResults.md +docs/DnssecTestResult.md +docs/DnssecTestResults.md +docs/EpochTimeWindow.md +docs/Error.md +docs/Expand.md +docs/FtpServerTestResult.md +docs/FtpServerTestResults.md +docs/GetTestPathvisAgentRound200Response.md +docs/GetTestResultDnsServer200Response.md +docs/GetTestResultDnsTrace200Response.md +docs/GetTestResultDnssec200Response.md +docs/GetTestResultFtpServer200Response.md +docs/GetTestResultHttpServer200Response.md +docs/GetTestResultMetrics200Response.md +docs/GetTestResultNetworkPathVis200Response.md +docs/GetTestResultPageLoad200Response.md +docs/GetTestResultPageLoadComponentDetail200Response.md +docs/GetTestResultRtpStream200Response.md +docs/GetTestResultSipServer200Response.md +docs/GetTestResultWebTransactions200Response.md +docs/GetTestResultWebTransactionsComponentDetail200Response.md +docs/GetTestResultWebTransactionsComponentPageDetail200Response.md +docs/GetTestResultsBgp200Response.md +docs/GetTestResultsBgpPrefix200Response.md +docs/HttpTestResult.md +docs/HttpTestResultHeaders.md +docs/HttpTestResults.md +docs/Link.md +docs/Marker.md +docs/Monitor.md +docs/NetworkBGPTestMetricsApi.md +docs/NetworkTestMetricsApi.md +docs/NetworkTestResult.md +docs/NetworkTestResults.md +docs/Page.md +docs/PageLoadDetailTestResult.md +docs/PageLoadDetailTestResults.md +docs/PageLoadTestResult.md +docs/PageLoadTestResults.md +docs/PaginationLinks.md +docs/PaginationLinksLinks.md +docs/PathVisBaseTestResult.md +docs/PathVisDetailTestResult.md +docs/PathVisDetailTestResults.md +docs/PathVisDirection.md +docs/PathVisEndpoint.md +docs/PathVisHop.md +docs/PathVisRoute.md +docs/PathVisTestResult.md +docs/PathVisTestResults.md +docs/QueryWindow.md +docs/RtpStreamTestResult.md +docs/RtpStreamTestResults.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/SimpleTest.md +docs/SimpleTestLinks.md +docs/SimpleTestLinksSelf.md +docs/SipServerErrorType.md +docs/SipServerTestResult.md +docs/SipServerTestResults.md +docs/SslCert.md +docs/TestDirection.md +docs/TestInterval.md +docs/TestResult.md +docs/TestResultAppLinks.md +docs/TestType.md +docs/UnauthorizedError.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/VoiceRTPServerTestMetricsApi.md +docs/VoiceSIPServerTestMetricsApi.md +docs/WebFTPServerTestMetricsApi.md +docs/WebHTTPServerTestMetricsApi.md +docs/WebPageLoadTestMetricsApi.md +docs/WebTransactionDetailTestResult.md +docs/WebTransactionDetailTestResults.md +docs/WebTransactionPageDetailTestResult.md +docs/WebTransactionPageDetailTestResults.md +docs/WebTransactionTestResult.md +docs/WebTransactionTestResults.md +docs/WebTransactionsTestMetricsApi.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_agent.py +test/test_app_links.py +test/test_app_links_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_get_test_pathvis_agent_round200_response.py +test/test_get_test_result_dns_server200_response.py +test/test_get_test_result_dns_trace200_response.py +test/test_get_test_result_dnssec200_response.py +test/test_get_test_result_ftp_server200_response.py +test/test_get_test_result_http_server200_response.py +test/test_get_test_result_metrics200_response.py +test/test_get_test_result_network_path_vis200_response.py +test/test_get_test_result_page_load200_response.py +test/test_get_test_result_page_load_component_detail200_response.py +test/test_get_test_result_rtp_stream200_response.py +test/test_get_test_result_sip_server200_response.py +test/test_get_test_result_web_transactions200_response.py +test/test_get_test_result_web_transactions_component_detail200_response.py +test/test_get_test_result_web_transactions_component_page_detail200_response.py +test/test_get_test_results_bgp200_response.py +test/test_get_test_results_bgp_prefix200_response.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_pagination_links_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_query_window.py +test/test_rtp_stream_test_result.py +test/test_rtp_stream_test_results.py +test/test_self_links.py +test/test_self_links_links.py +test/test_simple_test.py +test/test_simple_test_links.py +test/test_simple_test_links_self.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_result.py +test/test_test_result_app_links.py +test/test_test_type.py +test/test_unauthorized_error.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.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_results/__init__.py +test_results/api/__init__.py +test_results/api/dns_server_test_metrics_api.py +test_results/api/dns_trace_test_metrics_api.py +test_results/api/dnssec_test_metrics_api.py +test_results/api/network_bgp_test_metrics_api.py +test_results/api/network_test_metrics_api.py +test_results/api/voice_rtp_server_test_metrics_api.py +test_results/api/voice_sip_server_test_metrics_api.py +test_results/api/web_ftp_server_test_metrics_api.py +test_results/api/web_http_server_test_metrics_api.py +test_results/api/web_page_load_test_metrics_api.py +test_results/api/web_transactions_test_metrics_api.py +test_results/api_client.py +test_results/api_response.py +test_results/configuration.py +test_results/exceptions.py +test_results/models/__init__.py +test_results/models/agent.py +test_results/models/app_links.py +test_results/models/app_links_links.py +test_results/models/bgp_basic_test_result.py +test_results/models/bgp_hop.py +test_results/models/bgp_test_result.py +test_results/models/bgp_test_results.py +test_results/models/bgp_test_route_information_result.py +test_results/models/bgp_test_route_information_results.py +test_results/models/dns_server_test_result.py +test_results/models/dns_server_test_results.py +test_results/models/dns_trace_test_result.py +test_results/models/dns_trace_test_results.py +test_results/models/dnssec_test_result.py +test_results/models/dnssec_test_results.py +test_results/models/epoch_time_window.py +test_results/models/error.py +test_results/models/expand.py +test_results/models/ftp_server_test_result.py +test_results/models/ftp_server_test_results.py +test_results/models/get_test_pathvis_agent_round200_response.py +test_results/models/get_test_result_dns_server200_response.py +test_results/models/get_test_result_dns_trace200_response.py +test_results/models/get_test_result_dnssec200_response.py +test_results/models/get_test_result_ftp_server200_response.py +test_results/models/get_test_result_http_server200_response.py +test_results/models/get_test_result_metrics200_response.py +test_results/models/get_test_result_network_path_vis200_response.py +test_results/models/get_test_result_page_load200_response.py +test_results/models/get_test_result_page_load_component_detail200_response.py +test_results/models/get_test_result_rtp_stream200_response.py +test_results/models/get_test_result_sip_server200_response.py +test_results/models/get_test_result_web_transactions200_response.py +test_results/models/get_test_result_web_transactions_component_detail200_response.py +test_results/models/get_test_result_web_transactions_component_page_detail200_response.py +test_results/models/get_test_results_bgp200_response.py +test_results/models/get_test_results_bgp_prefix200_response.py +test_results/models/http_test_result.py +test_results/models/http_test_result_headers.py +test_results/models/http_test_results.py +test_results/models/link.py +test_results/models/marker.py +test_results/models/monitor.py +test_results/models/network_test_result.py +test_results/models/network_test_results.py +test_results/models/page.py +test_results/models/page_load_detail_test_result.py +test_results/models/page_load_detail_test_results.py +test_results/models/page_load_test_result.py +test_results/models/page_load_test_results.py +test_results/models/pagination_links.py +test_results/models/pagination_links_links.py +test_results/models/path_vis_base_test_result.py +test_results/models/path_vis_detail_test_result.py +test_results/models/path_vis_detail_test_results.py +test_results/models/path_vis_direction.py +test_results/models/path_vis_endpoint.py +test_results/models/path_vis_hop.py +test_results/models/path_vis_route.py +test_results/models/path_vis_test_result.py +test_results/models/path_vis_test_results.py +test_results/models/query_window.py +test_results/models/rtp_stream_test_result.py +test_results/models/rtp_stream_test_results.py +test_results/models/self_links.py +test_results/models/self_links_links.py +test_results/models/simple_test.py +test_results/models/simple_test_links.py +test_results/models/simple_test_links_self.py +test_results/models/sip_server_error_type.py +test_results/models/sip_server_test_result.py +test_results/models/sip_server_test_results.py +test_results/models/ssl_cert.py +test_results/models/test_direction.py +test_results/models/test_interval.py +test_results/models/test_result.py +test_results/models/test_result_app_links.py +test_results/models/test_type.py +test_results/models/unauthorized_error.py +test_results/models/validation_error.py +test_results/models/validation_error_all_of_errors.py +test_results/models/web_transaction_detail_test_result.py +test_results/models/web_transaction_detail_test_results.py +test_results/models/web_transaction_page_detail_test_result.py +test_results/models/web_transaction_page_detail_test_results.py +test_results/models/web_transaction_test_result.py +test_results/models/web_transaction_test_results.py +test_results/py.typed +test_results/rest.py diff --git a/test_results/.openapi-generator/VERSION b/test_results/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/test_results/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/test_results/README.md b/test_results/README.md new file mode 100644 index 00000000..215a6b60 --- /dev/null +++ b/test_results/README.md @@ -0,0 +1,228 @@ +# test-results +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.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import test_results +``` + +### 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 test_results +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import test_results +from 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 = test_results.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 = test_results.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = test_results.DNSSECTestMetricsApi(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: + # 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") + pprint(api_response) + except ApiException as e: + print("Exception when calling DNSSECTestMetricsApi->get_test_result_dnssec: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*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 + + +## Documentation For Models + + - [Agent](docs/Agent.md) + - [AppLinks](docs/AppLinks.md) + - [AppLinksLinks](docs/AppLinksLinks.md) + - [BgpBasicTestResult](docs/BgpBasicTestResult.md) + - [BgpHop](docs/BgpHop.md) + - [BgpTestResult](docs/BgpTestResult.md) + - [BgpTestResults](docs/BgpTestResults.md) + - [BgpTestRouteInformationResult](docs/BgpTestRouteInformationResult.md) + - [BgpTestRouteInformationResults](docs/BgpTestRouteInformationResults.md) + - [DnsServerTestResult](docs/DnsServerTestResult.md) + - [DnsServerTestResults](docs/DnsServerTestResults.md) + - [DnsTraceTestResult](docs/DnsTraceTestResult.md) + - [DnsTraceTestResults](docs/DnsTraceTestResults.md) + - [DnssecTestResult](docs/DnssecTestResult.md) + - [DnssecTestResults](docs/DnssecTestResults.md) + - [EpochTimeWindow](docs/EpochTimeWindow.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [FtpServerTestResult](docs/FtpServerTestResult.md) + - [FtpServerTestResults](docs/FtpServerTestResults.md) + - [GetTestPathvisAgentRound200Response](docs/GetTestPathvisAgentRound200Response.md) + - [GetTestResultDnsServer200Response](docs/GetTestResultDnsServer200Response.md) + - [GetTestResultDnsTrace200Response](docs/GetTestResultDnsTrace200Response.md) + - [GetTestResultDnssec200Response](docs/GetTestResultDnssec200Response.md) + - [GetTestResultFtpServer200Response](docs/GetTestResultFtpServer200Response.md) + - [GetTestResultHttpServer200Response](docs/GetTestResultHttpServer200Response.md) + - [GetTestResultMetrics200Response](docs/GetTestResultMetrics200Response.md) + - [GetTestResultNetworkPathVis200Response](docs/GetTestResultNetworkPathVis200Response.md) + - [GetTestResultPageLoad200Response](docs/GetTestResultPageLoad200Response.md) + - [GetTestResultPageLoadComponentDetail200Response](docs/GetTestResultPageLoadComponentDetail200Response.md) + - [GetTestResultRtpStream200Response](docs/GetTestResultRtpStream200Response.md) + - [GetTestResultSipServer200Response](docs/GetTestResultSipServer200Response.md) + - [GetTestResultWebTransactions200Response](docs/GetTestResultWebTransactions200Response.md) + - [GetTestResultWebTransactionsComponentDetail200Response](docs/GetTestResultWebTransactionsComponentDetail200Response.md) + - [GetTestResultWebTransactionsComponentPageDetail200Response](docs/GetTestResultWebTransactionsComponentPageDetail200Response.md) + - [GetTestResultsBgp200Response](docs/GetTestResultsBgp200Response.md) + - [GetTestResultsBgpPrefix200Response](docs/GetTestResultsBgpPrefix200Response.md) + - [HttpTestResult](docs/HttpTestResult.md) + - [HttpTestResultHeaders](docs/HttpTestResultHeaders.md) + - [HttpTestResults](docs/HttpTestResults.md) + - [Link](docs/Link.md) + - [Marker](docs/Marker.md) + - [Monitor](docs/Monitor.md) + - [NetworkTestResult](docs/NetworkTestResult.md) + - [NetworkTestResults](docs/NetworkTestResults.md) + - [Page](docs/Page.md) + - [PageLoadDetailTestResult](docs/PageLoadDetailTestResult.md) + - [PageLoadDetailTestResults](docs/PageLoadDetailTestResults.md) + - [PageLoadTestResult](docs/PageLoadTestResult.md) + - [PageLoadTestResults](docs/PageLoadTestResults.md) + - [PaginationLinks](docs/PaginationLinks.md) + - [PaginationLinksLinks](docs/PaginationLinksLinks.md) + - [PathVisBaseTestResult](docs/PathVisBaseTestResult.md) + - [PathVisDetailTestResult](docs/PathVisDetailTestResult.md) + - [PathVisDetailTestResults](docs/PathVisDetailTestResults.md) + - [PathVisDirection](docs/PathVisDirection.md) + - [PathVisEndpoint](docs/PathVisEndpoint.md) + - [PathVisHop](docs/PathVisHop.md) + - [PathVisRoute](docs/PathVisRoute.md) + - [PathVisTestResult](docs/PathVisTestResult.md) + - [PathVisTestResults](docs/PathVisTestResults.md) + - [QueryWindow](docs/QueryWindow.md) + - [RtpStreamTestResult](docs/RtpStreamTestResult.md) + - [RtpStreamTestResults](docs/RtpStreamTestResults.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [SimpleTest](docs/SimpleTest.md) + - [SimpleTestLinks](docs/SimpleTestLinks.md) + - [SimpleTestLinksSelf](docs/SimpleTestLinksSelf.md) + - [SipServerErrorType](docs/SipServerErrorType.md) + - [SipServerTestResult](docs/SipServerTestResult.md) + - [SipServerTestResults](docs/SipServerTestResults.md) + - [SslCert](docs/SslCert.md) + - [TestDirection](docs/TestDirection.md) + - [TestInterval](docs/TestInterval.md) + - [TestResult](docs/TestResult.md) + - [TestResultAppLinks](docs/TestResultAppLinks.md) + - [TestType](docs/TestType.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [WebTransactionDetailTestResult](docs/WebTransactionDetailTestResult.md) + - [WebTransactionDetailTestResults](docs/WebTransactionDetailTestResults.md) + - [WebTransactionPageDetailTestResult](docs/WebTransactionPageDetailTestResult.md) + - [WebTransactionPageDetailTestResults](docs/WebTransactionPageDetailTestResults.md) + - [WebTransactionTestResult](docs/WebTransactionTestResult.md) + - [WebTransactionTestResults](docs/WebTransactionTestResults.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/test_results/docs/Agent.md b/test_results/docs/Agent.md new file mode 100644 index 00000000..1a541c99 --- /dev/null +++ b/test_results/docs/Agent.md @@ -0,0 +1,32 @@ +# Agent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_id** | **str** | Unique agent ID | [optional] [readonly] +**agent_name** | **str** | Agent name | [optional] [readonly] +**country_id** | **str** | 2-digit ISO country code | [optional] [readonly] +**location** | **str** | Location of the agent. | [optional] [readonly] + +## Example + +```python +from test_results.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/test_results/docs/AppLinks.md b/test_results/docs/AppLinks.md new file mode 100644 index 00000000..6f7a2eff --- /dev/null +++ b/test_results/docs/AppLinks.md @@ -0,0 +1,29 @@ +# AppLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**AppLinksLinks**](AppLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.app_links import AppLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AppLinks from a JSON string +app_links_instance = AppLinks.from_json(json) +# print the JSON string representation of the object +print(AppLinks.to_json()) + +# convert the object into a dict +app_links_dict = app_links_instance.to_dict() +# create an instance of AppLinks from a dict +app_links_from_dict = AppLinks.from_dict(app_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/test_results/docs/AppLinksLinks.md b/test_results/docs/AppLinksLinks.md new file mode 100644 index 00000000..e41a5798 --- /dev/null +++ b/test_results/docs/AppLinksLinks.md @@ -0,0 +1,30 @@ +# AppLinksLinks + +A links object containing the ThousandEyes App link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_link** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from test_results.models.app_links_links import AppLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of AppLinksLinks from a JSON string +app_links_links_instance = AppLinksLinks.from_json(json) +# print the JSON string representation of the object +print(AppLinksLinks.to_json()) + +# convert the object into a dict +app_links_links_dict = app_links_links_instance.to_dict() +# create an instance of AppLinksLinks from a dict +app_links_links_from_dict = AppLinksLinks.from_dict(app_links_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/test_results_api/docs/BgpBasicTestResult.md b/test_results/docs/BgpBasicTestResult.md similarity index 84% rename from test_results_api/docs/BgpBasicTestResult.md rename to test_results/docs/BgpBasicTestResult.md index 90df2132..6b8a57a4 100644 --- a/test_results_api/docs/BgpBasicTestResult.md +++ b/test_results/docs/BgpBasicTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -14,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.bgp_basic_test_result import BgpBasicTestResult +from test_results.models.bgp_basic_test_result import BgpBasicTestResult # TODO update the JSON string below json = "{}" # create an instance of BgpBasicTestResult from a JSON string bgp_basic_test_result_instance = BgpBasicTestResult.from_json(json) # print the JSON string representation of the object -print BgpBasicTestResult.to_json() +print(BgpBasicTestResult.to_json()) # convert the object into a dict bgp_basic_test_result_dict = bgp_basic_test_result_instance.to_dict() # create an instance of BgpBasicTestResult from a dict -bgp_basic_test_result_form_dict = bgp_basic_test_result.from_dict(bgp_basic_test_result_dict) +bgp_basic_test_result_from_dict = BgpBasicTestResult.from_dict(bgp_basic_test_result_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/test_results_api/docs/BgpHop.md b/test_results/docs/BgpHop.md similarity index 86% rename from test_results_api/docs/BgpHop.md rename to test_results/docs/BgpHop.md index 05f9958f..ba28f478 100644 --- a/test_results_api/docs/BgpHop.md +++ b/test_results/docs/BgpHop.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **asn** | **float** | ASN of transit autonomous system | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.bgp_hop import BgpHop +from test_results.models.bgp_hop import BgpHop # TODO update the JSON string below json = "{}" # create an instance of BgpHop from a JSON string bgp_hop_instance = BgpHop.from_json(json) # print the JSON string representation of the object -print BgpHop.to_json() +print(BgpHop.to_json()) # convert the object into a dict bgp_hop_dict = bgp_hop_instance.to_dict() # create an instance of BgpHop from a dict -bgp_hop_form_dict = bgp_hop.from_dict(bgp_hop_dict) +bgp_hop_from_dict = BgpHop.from_dict(bgp_hop_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/test_results_api/docs/BgpTestResult.md b/test_results/docs/BgpTestResult.md similarity index 78% rename from test_results_api/docs/BgpTestResult.md rename to test_results/docs/BgpTestResult.md index e539950f..453d2d4d 100644 --- a/test_results_api/docs/BgpTestResult.md +++ b/test_results/docs/BgpTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -10,6 +11,8 @@ Name | Type | Description | Notes **monitor** | [**Monitor**](Monitor.md) | | [optional] **prefix_id** | **str** | Internally tracked prefix ID. | [optional] **prefix** | **str** | Prefix being tracked. | [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] **updates** | **float** | Number of updates tracked against this prefix by this monitor. | [optional] **path_changes** | **float** | Number of path changes tracked against this prefix by this monitor. | [optional] **reachability** | **float** | Percentage reachability | [optional] @@ -17,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.bgp_test_result import BgpTestResult +from test_results.models.bgp_test_result import BgpTestResult # TODO update the JSON string below json = "{}" # create an instance of BgpTestResult from a JSON string bgp_test_result_instance = BgpTestResult.from_json(json) # print the JSON string representation of the object -print BgpTestResult.to_json() +print(BgpTestResult.to_json()) # convert the object into a dict bgp_test_result_dict = bgp_test_result_instance.to_dict() # create an instance of BgpTestResult from a dict -bgp_test_result_form_dict = bgp_test_result.from_dict(bgp_test_result_dict) +bgp_test_result_from_dict = BgpTestResult.from_dict(bgp_test_result_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/test_results_api/docs/BgpTestResults.md b/test_results/docs/BgpTestResults.md similarity index 82% rename from test_results_api/docs/BgpTestResults.md rename to test_results/docs/BgpTestResults.md index dff20462..6b424682 100644 --- a/test_results_api/docs/BgpTestResults.md +++ b/test_results/docs/BgpTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[BgpTestResult]**](BgpTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.bgp_test_results import BgpTestResults +from test_results.models.bgp_test_results import BgpTestResults # TODO update the JSON string below json = "{}" # create an instance of BgpTestResults from a JSON string bgp_test_results_instance = BgpTestResults.from_json(json) # print the JSON string representation of the object -print BgpTestResults.to_json() +print(BgpTestResults.to_json()) # convert the object into a dict bgp_test_results_dict = bgp_test_results_instance.to_dict() # create an instance of BgpTestResults from a dict -bgp_test_results_form_dict = bgp_test_results.from_dict(bgp_test_results_dict) +bgp_test_results_from_dict = BgpTestResults.from_dict(bgp_test_results_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/test_results_api/docs/BgpTestRouteInformationResult.md b/test_results/docs/BgpTestRouteInformationResult.md similarity index 85% rename from test_results_api/docs/BgpTestRouteInformationResult.md rename to test_results/docs/BgpTestRouteInformationResult.md index c6fe3cde..57ef1b4f 100644 --- a/test_results_api/docs/BgpTestRouteInformationResult.md +++ b/test_results/docs/BgpTestRouteInformationResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.bgp_test_route_information_result import BgpTestRouteInformationResult +from test_results.models.bgp_test_route_information_result import BgpTestRouteInformationResult # TODO update the JSON string below json = "{}" # create an instance of BgpTestRouteInformationResult from a JSON string bgp_test_route_information_result_instance = BgpTestRouteInformationResult.from_json(json) # print the JSON string representation of the object -print BgpTestRouteInformationResult.to_json() +print(BgpTestRouteInformationResult.to_json()) # convert the object into a dict bgp_test_route_information_result_dict = bgp_test_route_information_result_instance.to_dict() # create an instance of BgpTestRouteInformationResult from a dict -bgp_test_route_information_result_form_dict = bgp_test_route_information_result.from_dict(bgp_test_route_information_result_dict) +bgp_test_route_information_result_from_dict = BgpTestRouteInformationResult.from_dict(bgp_test_route_information_result_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/test_results_api/docs/BgpTestRouteInformationResults.md b/test_results/docs/BgpTestRouteInformationResults.md similarity index 77% rename from test_results_api/docs/BgpTestRouteInformationResults.md rename to test_results/docs/BgpTestRouteInformationResults.md index b5959ebe..5d4c2d97 100644 --- a/test_results_api/docs/BgpTestRouteInformationResults.md +++ b/test_results/docs/BgpTestRouteInformationResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[BgpTestRouteInformationResult]**](BgpTestRouteInformationResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.bgp_test_route_information_results import BgpTestRouteInformationResults +from test_results.models.bgp_test_route_information_results import BgpTestRouteInformationResults # TODO update the JSON string below json = "{}" # create an instance of BgpTestRouteInformationResults from a JSON string bgp_test_route_information_results_instance = BgpTestRouteInformationResults.from_json(json) # print the JSON string representation of the object -print BgpTestRouteInformationResults.to_json() +print(BgpTestRouteInformationResults.to_json()) # convert the object into a dict bgp_test_route_information_results_dict = bgp_test_route_information_results_instance.to_dict() # create an instance of BgpTestRouteInformationResults from a dict -bgp_test_route_information_results_form_dict = bgp_test_route_information_results.from_dict(bgp_test_route_information_results_dict) +bgp_test_route_information_results_from_dict = BgpTestRouteInformationResults.from_dict(bgp_test_route_information_results_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/test_results_api/docs/DNSSECTestMetricsApi.md b/test_results/docs/DNSSECTestMetricsApi.md similarity index 89% rename from test_results_api/docs/DNSSECTestMetricsApi.md rename to test_results/docs/DNSSECTestMetricsApi.md index c244700c..94542b0d 100644 --- a/test_results_api/docs/DNSSECTestMetricsApi.md +++ b/test_results/docs/DNSSECTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.DNSSECTestMetricsApi +# test_results.DNSSECTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns the keychain validity for a record on a domain secured using DNSSEC exte ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,20 +36,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.DNSSECTestMetricsApi(api_client) + api_instance = test_results.DNSSECTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 DNSSEC test results @@ -65,6 +64,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -72,7 +72,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/DNSServerTestMetricsApi.md b/test_results/docs/DNSServerTestMetricsApi.md similarity index 89% rename from test_results_api/docs/DNSServerTestMetricsApi.md rename to test_results/docs/DNSServerTestMetricsApi.md index 86d7dcb6..454f0f11 100644 --- a/test_results_api/docs/DNSServerTestMetricsApi.md +++ b/test_results/docs/DNSServerTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.DNSServerTestMetricsApi +# test_results.DNSServerTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,17 +18,16 @@ Returns mappings for a DNS record and resolution time to the specified server, m ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,21 +37,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.DNSServerTestMetricsApi(api_client) + api_instance = test_results.DNSServerTestMetricsApi(api_client) test_id = '202701' # str | Test ID server_id = '281474976710706' # str | DNS server ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 DNS server test results by server @@ -67,6 +66,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -75,7 +75,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -91,6 +91,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -115,17 +116,16 @@ Returns the mappings for a DNS record, along with the resolution time to each au ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -135,20 +135,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.DNSServerTestMetricsApi(api_client) + api_instance = test_results.DNSServerTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 DNS server test results @@ -163,6 +163,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -170,7 +171,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -186,6 +187,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/DNSTraceTestMetricsApi.md b/test_results/docs/DNSTraceTestMetricsApi.md similarity index 88% rename from test_results_api/docs/DNSTraceTestMetricsApi.md rename to test_results/docs/DNSTraceTestMetricsApi.md index d84be5ef..9e5bf689 100644 --- a/test_results_api/docs/DNSTraceTestMetricsApi.md +++ b/test_results/docs/DNSTraceTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.DNSTraceTestMetricsApi +# test_results.DNSTraceTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns a DNS record from the requesting agent's point of view. This is similar ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,20 +36,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.DNSTraceTestMetricsApi(api_client) + api_instance = test_results.DNSTraceTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 DNS trace test results @@ -65,6 +64,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -72,7 +72,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/DnsServerTestResult.md b/test_results/docs/DnsServerTestResult.md similarity index 89% rename from test_results_api/docs/DnsServerTestResult.md rename to test_results/docs/DnsServerTestResult.md index 05a2db89..fb8e401c 100644 --- a/test_results_api/docs/DnsServerTestResult.md +++ b/test_results/docs/DnsServerTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dns_server_test_result import DnsServerTestResult +from test_results.models.dns_server_test_result import DnsServerTestResult # TODO update the JSON string below json = "{}" # create an instance of DnsServerTestResult from a JSON string dns_server_test_result_instance = DnsServerTestResult.from_json(json) # print the JSON string representation of the object -print DnsServerTestResult.to_json() +print(DnsServerTestResult.to_json()) # convert the object into a dict dns_server_test_result_dict = dns_server_test_result_instance.to_dict() # create an instance of DnsServerTestResult from a dict -dns_server_test_result_form_dict = dns_server_test_result.from_dict(dns_server_test_result_dict) +dns_server_test_result_from_dict = DnsServerTestResult.from_dict(dns_server_test_result_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/test_results_api/docs/DnsServerTestResults.md b/test_results/docs/DnsServerTestResults.md similarity index 80% rename from test_results_api/docs/DnsServerTestResults.md rename to test_results/docs/DnsServerTestResults.md index 403f6427..a2337490 100644 --- a/test_results_api/docs/DnsServerTestResults.md +++ b/test_results/docs/DnsServerTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[DnsServerTestResult]**](DnsServerTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dns_server_test_results import DnsServerTestResults +from test_results.models.dns_server_test_results import DnsServerTestResults # TODO update the JSON string below json = "{}" # create an instance of DnsServerTestResults from a JSON string dns_server_test_results_instance = DnsServerTestResults.from_json(json) # print the JSON string representation of the object -print DnsServerTestResults.to_json() +print(DnsServerTestResults.to_json()) # convert the object into a dict dns_server_test_results_dict = dns_server_test_results_instance.to_dict() # create an instance of DnsServerTestResults from a dict -dns_server_test_results_form_dict = dns_server_test_results.from_dict(dns_server_test_results_dict) +dns_server_test_results_from_dict = DnsServerTestResults.from_dict(dns_server_test_results_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/test_results_api/docs/DnsTraceTestResult.md b/test_results/docs/DnsTraceTestResult.md similarity index 90% rename from test_results_api/docs/DnsTraceTestResult.md rename to test_results/docs/DnsTraceTestResult.md index 149de133..c977323e 100644 --- a/test_results_api/docs/DnsTraceTestResult.md +++ b/test_results/docs/DnsTraceTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -21,19 +22,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dns_trace_test_result import DnsTraceTestResult +from test_results.models.dns_trace_test_result import DnsTraceTestResult # TODO update the JSON string below json = "{}" # create an instance of DnsTraceTestResult from a JSON string dns_trace_test_result_instance = DnsTraceTestResult.from_json(json) # print the JSON string representation of the object -print DnsTraceTestResult.to_json() +print(DnsTraceTestResult.to_json()) # convert the object into a dict dns_trace_test_result_dict = dns_trace_test_result_instance.to_dict() # create an instance of DnsTraceTestResult from a dict -dns_trace_test_result_form_dict = dns_trace_test_result.from_dict(dns_trace_test_result_dict) +dns_trace_test_result_from_dict = DnsTraceTestResult.from_dict(dns_trace_test_result_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/test_results_api/docs/DnsTraceTestResults.md b/test_results/docs/DnsTraceTestResults.md similarity index 80% rename from test_results_api/docs/DnsTraceTestResults.md rename to test_results/docs/DnsTraceTestResults.md index 41348f81..253177bc 100644 --- a/test_results_api/docs/DnsTraceTestResults.md +++ b/test_results/docs/DnsTraceTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[DnsTraceTestResult]**](DnsTraceTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dns_trace_test_results import DnsTraceTestResults +from test_results.models.dns_trace_test_results import DnsTraceTestResults # TODO update the JSON string below json = "{}" # create an instance of DnsTraceTestResults from a JSON string dns_trace_test_results_instance = DnsTraceTestResults.from_json(json) # print the JSON string representation of the object -print DnsTraceTestResults.to_json() +print(DnsTraceTestResults.to_json()) # convert the object into a dict dns_trace_test_results_dict = dns_trace_test_results_instance.to_dict() # create an instance of DnsTraceTestResults from a dict -dns_trace_test_results_form_dict = dns_trace_test_results.from_dict(dns_trace_test_results_dict) +dns_trace_test_results_from_dict = DnsTraceTestResults.from_dict(dns_trace_test_results_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/test_results_api/docs/DnssecTestResult.md b/test_results/docs/DnssecTestResult.md similarity index 88% rename from test_results_api/docs/DnssecTestResult.md rename to test_results/docs/DnssecTestResult.md index 1a76345d..03e914b3 100644 --- a/test_results_api/docs/DnssecTestResult.md +++ b/test_results/docs/DnssecTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dnssec_test_result import DnssecTestResult +from test_results.models.dnssec_test_result import DnssecTestResult # TODO update the JSON string below json = "{}" # create an instance of DnssecTestResult from a JSON string dnssec_test_result_instance = DnssecTestResult.from_json(json) # print the JSON string representation of the object -print DnssecTestResult.to_json() +print(DnssecTestResult.to_json()) # convert the object into a dict dnssec_test_result_dict = dnssec_test_result_instance.to_dict() # create an instance of DnssecTestResult from a dict -dnssec_test_result_form_dict = dnssec_test_result.from_dict(dnssec_test_result_dict) +dnssec_test_result_from_dict = DnssecTestResult.from_dict(dnssec_test_result_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/test_results_api/docs/DnssecTestResults.md b/test_results/docs/DnssecTestResults.md similarity index 81% rename from test_results_api/docs/DnssecTestResults.md rename to test_results/docs/DnssecTestResults.md index d5ff2480..bd9eff92 100644 --- a/test_results_api/docs/DnssecTestResults.md +++ b/test_results/docs/DnssecTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[DnssecTestResult]**](DnssecTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.dnssec_test_results import DnssecTestResults +from test_results.models.dnssec_test_results import DnssecTestResults # TODO update the JSON string below json = "{}" # create an instance of DnssecTestResults from a JSON string dnssec_test_results_instance = DnssecTestResults.from_json(json) # print the JSON string representation of the object -print DnssecTestResults.to_json() +print(DnssecTestResults.to_json()) # convert the object into a dict dnssec_test_results_dict = dnssec_test_results_instance.to_dict() # create an instance of DnssecTestResults from a dict -dnssec_test_results_form_dict = dnssec_test_results.from_dict(dnssec_test_results_dict) +dnssec_test_results_from_dict = DnssecTestResults.from_dict(dnssec_test_results_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/test_results_api/docs/EpochTimeWindow.md b/test_results/docs/EpochTimeWindow.md similarity index 83% rename from test_results_api/docs/EpochTimeWindow.md rename to test_results/docs/EpochTimeWindow.md index b039290c..1f22ddb0 100644 --- a/test_results_api/docs/EpochTimeWindow.md +++ b/test_results/docs/EpochTimeWindow.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start_time** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.epoch_time_window import EpochTimeWindow +from test_results.models.epoch_time_window import EpochTimeWindow # TODO update the JSON string below json = "{}" # create an instance of EpochTimeWindow from a JSON string epoch_time_window_instance = EpochTimeWindow.from_json(json) # print the JSON string representation of the object -print EpochTimeWindow.to_json() +print(EpochTimeWindow.to_json()) # convert the object into a dict epoch_time_window_dict = epoch_time_window_instance.to_dict() # create an instance of EpochTimeWindow from a dict -epoch_time_window_form_dict = epoch_time_window.from_dict(epoch_time_window_dict) +epoch_time_window_from_dict = EpochTimeWindow.from_dict(epoch_time_window_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/test_results/docs/Error.md b/test_results/docs/Error.md new file mode 100644 index 00000000..77c29af1 --- /dev/null +++ b/test_results/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 test_results.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/test_results/docs/Expand.md b/test_results/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/test_results/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/test_results_api/docs/FtpServerTestResult.md b/test_results/docs/FtpServerTestResult.md similarity index 85% rename from test_results_api/docs/FtpServerTestResult.md rename to test_results/docs/FtpServerTestResult.md index 90efea59..c9d79682 100644 --- a/test_results_api/docs/FtpServerTestResult.md +++ b/test_results/docs/FtpServerTestResult.md @@ -2,11 +2,14 @@ ## Properties + 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** | **object** | | [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] **server_ip** | **str** | IP address of destination server | [optional] [readonly] **response_code** | **int** | FTP response code | [optional] [readonly] @@ -25,19 +28,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.ftp_server_test_result import FtpServerTestResult +from test_results.models.ftp_server_test_result import FtpServerTestResult # TODO update the JSON string below json = "{}" # create an instance of FtpServerTestResult from a JSON string ftp_server_test_result_instance = FtpServerTestResult.from_json(json) # print the JSON string representation of the object -print FtpServerTestResult.to_json() +print(FtpServerTestResult.to_json()) # convert the object into a dict ftp_server_test_result_dict = ftp_server_test_result_instance.to_dict() # create an instance of FtpServerTestResult from a dict -ftp_server_test_result_form_dict = ftp_server_test_result.from_dict(ftp_server_test_result_dict) +ftp_server_test_result_from_dict = FtpServerTestResult.from_dict(ftp_server_test_result_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/test_results_api/docs/FtpServerTestResults.md b/test_results/docs/FtpServerTestResults.md similarity index 80% rename from test_results_api/docs/FtpServerTestResults.md rename to test_results/docs/FtpServerTestResults.md index 4466818e..d101bf14 100644 --- a/test_results_api/docs/FtpServerTestResults.md +++ b/test_results/docs/FtpServerTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[FtpServerTestResult]**](FtpServerTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.ftp_server_test_results import FtpServerTestResults +from test_results.models.ftp_server_test_results import FtpServerTestResults # TODO update the JSON string below json = "{}" # create an instance of FtpServerTestResults from a JSON string ftp_server_test_results_instance = FtpServerTestResults.from_json(json) # print the JSON string representation of the object -print FtpServerTestResults.to_json() +print(FtpServerTestResults.to_json()) # convert the object into a dict ftp_server_test_results_dict = ftp_server_test_results_instance.to_dict() # create an instance of FtpServerTestResults from a dict -ftp_server_test_results_form_dict = ftp_server_test_results.from_dict(ftp_server_test_results_dict) +ftp_server_test_results_from_dict = FtpServerTestResults.from_dict(ftp_server_test_results_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/test_results_api/docs/GetTestPathvisAgentRound200Response.md b/test_results/docs/GetTestPathvisAgentRound200Response.md similarity index 77% rename from test_results_api/docs/GetTestPathvisAgentRound200Response.md rename to test_results/docs/GetTestPathvisAgentRound200Response.md index 2fd4b711..578b19e6 100644 --- a/test_results_api/docs/GetTestPathvisAgentRound200Response.md +++ b/test_results/docs/GetTestPathvisAgentRound200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisDetailTestResult]**](PathVisDetailTestResult.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response +from test_results.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestPathvisAgentRound200Response from a JSON string get_test_pathvis_agent_round200_response_instance = GetTestPathvisAgentRound200Response.from_json(json) # print the JSON string representation of the object -print GetTestPathvisAgentRound200Response.to_json() +print(GetTestPathvisAgentRound200Response.to_json()) # convert the object into a dict get_test_pathvis_agent_round200_response_dict = get_test_pathvis_agent_round200_response_instance.to_dict() # create an instance of GetTestPathvisAgentRound200Response from a dict -get_test_pathvis_agent_round200_response_form_dict = get_test_pathvis_agent_round200_response.from_dict(get_test_pathvis_agent_round200_response_dict) +get_test_pathvis_agent_round200_response_from_dict = GetTestPathvisAgentRound200Response.from_dict(get_test_pathvis_agent_round200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results_api/docs/GetTestResultDnsServer200Response.md b/test_results/docs/GetTestResultDnsServer200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultDnsServer200Response.md rename to test_results/docs/GetTestResultDnsServer200Response.md index 1bb02098..78b060c0 100644 --- a/test_results_api/docs/GetTestResultDnsServer200Response.md +++ b/test_results/docs/GetTestResultDnsServer200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[DnsServerTestResult]**](DnsServerTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultDnsServer200Response from a JSON string get_test_result_dns_server200_response_instance = GetTestResultDnsServer200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultDnsServer200Response.to_json() +print(GetTestResultDnsServer200Response.to_json()) # convert the object into a dict get_test_result_dns_server200_response_dict = get_test_result_dns_server200_response_instance.to_dict() # create an instance of GetTestResultDnsServer200Response from a dict -get_test_result_dns_server200_response_form_dict = get_test_result_dns_server200_response.from_dict(get_test_result_dns_server200_response_dict) +get_test_result_dns_server200_response_from_dict = GetTestResultDnsServer200Response.from_dict(get_test_result_dns_server200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results_api/docs/GetTestResultDnsTrace200Response.md b/test_results/docs/GetTestResultDnsTrace200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultDnsTrace200Response.md rename to test_results/docs/GetTestResultDnsTrace200Response.md index 7323e7cd..778c0a9a 100644 --- a/test_results_api/docs/GetTestResultDnsTrace200Response.md +++ b/test_results/docs/GetTestResultDnsTrace200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[DnsTraceTestResult]**](DnsTraceTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response +from test_results.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultDnsTrace200Response from a JSON string get_test_result_dns_trace200_response_instance = GetTestResultDnsTrace200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultDnsTrace200Response.to_json() +print(GetTestResultDnsTrace200Response.to_json()) # convert the object into a dict get_test_result_dns_trace200_response_dict = get_test_result_dns_trace200_response_instance.to_dict() # create an instance of GetTestResultDnsTrace200Response from a dict -get_test_result_dns_trace200_response_form_dict = get_test_result_dns_trace200_response.from_dict(get_test_result_dns_trace200_response_dict) +get_test_result_dns_trace200_response_from_dict = GetTestResultDnsTrace200Response.from_dict(get_test_result_dns_trace200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results_api/docs/GetTestResultDnssec200Response.md b/test_results/docs/GetTestResultDnssec200Response.md similarity index 81% rename from test_results_api/docs/GetTestResultDnssec200Response.md rename to test_results/docs/GetTestResultDnssec200Response.md index 34b981d2..5d452784 100644 --- a/test_results_api/docs/GetTestResultDnssec200Response.md +++ b/test_results/docs/GetTestResultDnssec200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[DnssecTestResult]**](DnssecTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response +from test_results.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultDnssec200Response from a JSON string get_test_result_dnssec200_response_instance = GetTestResultDnssec200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultDnssec200Response.to_json() +print(GetTestResultDnssec200Response.to_json()) # convert the object into a dict get_test_result_dnssec200_response_dict = get_test_result_dnssec200_response_instance.to_dict() # create an instance of GetTestResultDnssec200Response from a dict -get_test_result_dnssec200_response_form_dict = get_test_result_dnssec200_response.from_dict(get_test_result_dnssec200_response_dict) +get_test_result_dnssec200_response_from_dict = GetTestResultDnssec200Response.from_dict(get_test_result_dnssec200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results_api/docs/GetTestResultFtpServer200Response.md b/test_results/docs/GetTestResultFtpServer200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultFtpServer200Response.md rename to test_results/docs/GetTestResultFtpServer200Response.md index 5a3637ca..3e49470a 100644 --- a/test_results_api/docs/GetTestResultFtpServer200Response.md +++ b/test_results/docs/GetTestResultFtpServer200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[FtpServerTestResult]**](FtpServerTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response +from test_results.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultFtpServer200Response from a JSON string get_test_result_ftp_server200_response_instance = GetTestResultFtpServer200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultFtpServer200Response.to_json() +print(GetTestResultFtpServer200Response.to_json()) # convert the object into a dict get_test_result_ftp_server200_response_dict = get_test_result_ftp_server200_response_instance.to_dict() # create an instance of GetTestResultFtpServer200Response from a dict -get_test_result_ftp_server200_response_form_dict = get_test_result_ftp_server200_response.from_dict(get_test_result_ftp_server200_response_dict) +get_test_result_ftp_server200_response_from_dict = GetTestResultFtpServer200Response.from_dict(get_test_result_ftp_server200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results/docs/GetTestResultHttpServer200Response.md b/test_results/docs/GetTestResultHttpServer200Response.md new file mode 100644 index 00000000..9d176e05 --- /dev/null +++ b/test_results/docs/GetTestResultHttpServer200Response.md @@ -0,0 +1,33 @@ +# GetTestResultHttpServer200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultHttpServer200Response from a JSON string +get_test_result_http_server200_response_instance = GetTestResultHttpServer200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultHttpServer200Response.to_json()) + +# convert the object into a dict +get_test_result_http_server200_response_dict = get_test_result_http_server200_response_instance.to_dict() +# create an instance of GetTestResultHttpServer200Response from a dict +get_test_result_http_server200_response_from_dict = GetTestResultHttpServer200Response.from_dict(get_test_result_http_server200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results_api/docs/GetTestResultMetrics200Response.md b/test_results/docs/GetTestResultMetrics200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultMetrics200Response.md rename to test_results/docs/GetTestResultMetrics200Response.md index a16cdf0b..6f2116a2 100644 --- a/test_results_api/docs/GetTestResultMetrics200Response.md +++ b/test_results/docs/GetTestResultMetrics200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_metrics200_response import GetTestResultMetrics200Response +from test_results.models.get_test_result_metrics200_response import GetTestResultMetrics200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultMetrics200Response from a JSON string get_test_result_metrics200_response_instance = GetTestResultMetrics200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultMetrics200Response.to_json() +print(GetTestResultMetrics200Response.to_json()) # convert the object into a dict get_test_result_metrics200_response_dict = get_test_result_metrics200_response_instance.to_dict() # create an instance of GetTestResultMetrics200Response from a dict -get_test_result_metrics200_response_form_dict = get_test_result_metrics200_response.from_dict(get_test_result_metrics200_response_dict) +get_test_result_metrics200_response_from_dict = GetTestResultMetrics200Response.from_dict(get_test_result_metrics200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results/docs/GetTestResultNetworkPathVis200Response.md b/test_results/docs/GetTestResultNetworkPathVis200Response.md new file mode 100644 index 00000000..beffac63 --- /dev/null +++ b/test_results/docs/GetTestResultNetworkPathVis200Response.md @@ -0,0 +1,33 @@ +# GetTestResultNetworkPathVis200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.get_test_result_network_path_vis200_response import GetTestResultNetworkPathVis200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultNetworkPathVis200Response from a JSON string +get_test_result_network_path_vis200_response_instance = GetTestResultNetworkPathVis200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultNetworkPathVis200Response.to_json()) + +# convert the object into a dict +get_test_result_network_path_vis200_response_dict = get_test_result_network_path_vis200_response_instance.to_dict() +# create an instance of GetTestResultNetworkPathVis200Response from a dict +get_test_result_network_path_vis200_response_from_dict = GetTestResultNetworkPathVis200Response.from_dict(get_test_result_network_path_vis200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results_api/docs/GetTestResultPageLoad200Response.md b/test_results/docs/GetTestResultPageLoad200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultPageLoad200Response.md rename to test_results/docs/GetTestResultPageLoad200Response.md index bd22e172..ef285016 100644 --- a/test_results_api/docs/GetTestResultPageLoad200Response.md +++ b/test_results/docs/GetTestResultPageLoad200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[PageLoadTestResult]**](PageLoadTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response +from test_results.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultPageLoad200Response from a JSON string get_test_result_page_load200_response_instance = GetTestResultPageLoad200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultPageLoad200Response.to_json() +print(GetTestResultPageLoad200Response.to_json()) # convert the object into a dict get_test_result_page_load200_response_dict = get_test_result_page_load200_response_instance.to_dict() # create an instance of GetTestResultPageLoad200Response from a dict -get_test_result_page_load200_response_form_dict = get_test_result_page_load200_response.from_dict(get_test_result_page_load200_response_dict) +get_test_result_page_load200_response_from_dict = GetTestResultPageLoad200Response.from_dict(get_test_result_page_load200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results/docs/GetTestResultPageLoadComponentDetail200Response.md b/test_results/docs/GetTestResultPageLoadComponentDetail200Response.md new file mode 100644 index 00000000..ea8b93ef --- /dev/null +++ b/test_results/docs/GetTestResultPageLoadComponentDetail200Response.md @@ -0,0 +1,31 @@ +# GetTestResultPageLoadComponentDetail200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PageLoadDetailTestResult]**](PageLoadDetailTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultPageLoadComponentDetail200Response from a JSON string +get_test_result_page_load_component_detail200_response_instance = GetTestResultPageLoadComponentDetail200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultPageLoadComponentDetail200Response.to_json()) + +# convert the object into a dict +get_test_result_page_load_component_detail200_response_dict = get_test_result_page_load_component_detail200_response_instance.to_dict() +# create an instance of GetTestResultPageLoadComponentDetail200Response from a dict +get_test_result_page_load_component_detail200_response_from_dict = GetTestResultPageLoadComponentDetail200Response.from_dict(get_test_result_page_load_component_detail200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results_api/docs/GetTestResultRtpStream200Response.md b/test_results/docs/GetTestResultRtpStream200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultRtpStream200Response.md rename to test_results/docs/GetTestResultRtpStream200Response.md index f63ee4fd..1b9b2980 100644 --- a/test_results_api/docs/GetTestResultRtpStream200Response.md +++ b/test_results/docs/GetTestResultRtpStream200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[RtpStreamTestResult]**](RtpStreamTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response +from test_results.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultRtpStream200Response from a JSON string get_test_result_rtp_stream200_response_instance = GetTestResultRtpStream200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultRtpStream200Response.to_json() +print(GetTestResultRtpStream200Response.to_json()) # convert the object into a dict get_test_result_rtp_stream200_response_dict = get_test_result_rtp_stream200_response_instance.to_dict() # create an instance of GetTestResultRtpStream200Response from a dict -get_test_result_rtp_stream200_response_form_dict = get_test_result_rtp_stream200_response.from_dict(get_test_result_rtp_stream200_response_dict) +get_test_result_rtp_stream200_response_from_dict = GetTestResultRtpStream200Response.from_dict(get_test_result_rtp_stream200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results_api/docs/GetTestResultSipServer200Response.md b/test_results/docs/GetTestResultSipServer200Response.md similarity index 80% rename from test_results_api/docs/GetTestResultSipServer200Response.md rename to test_results/docs/GetTestResultSipServer200Response.md index d2df77c1..c3f9d27b 100644 --- a/test_results_api/docs/GetTestResultSipServer200Response.md +++ b/test_results/docs/GetTestResultSipServer200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[SipServerTestResult]**](SipServerTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response +from test_results.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultSipServer200Response from a JSON string get_test_result_sip_server200_response_instance = GetTestResultSipServer200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultSipServer200Response.to_json() +print(GetTestResultSipServer200Response.to_json()) # convert the object into a dict get_test_result_sip_server200_response_dict = get_test_result_sip_server200_response_instance.to_dict() # create an instance of GetTestResultSipServer200Response from a dict -get_test_result_sip_server200_response_form_dict = get_test_result_sip_server200_response.from_dict(get_test_result_sip_server200_response_dict) +get_test_result_sip_server200_response_from_dict = GetTestResultSipServer200Response.from_dict(get_test_result_sip_server200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results_api/docs/GetTestResultWebTransactions200Response.md b/test_results/docs/GetTestResultWebTransactions200Response.md similarity index 79% rename from test_results_api/docs/GetTestResultWebTransactions200Response.md rename to test_results/docs/GetTestResultWebTransactions200Response.md index 19bbc11d..f0216efd 100644 --- a/test_results_api/docs/GetTestResultWebTransactions200Response.md +++ b/test_results/docs/GetTestResultWebTransactions200Response.md @@ -2,30 +2,31 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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] **results** | [**List[WebTransactionTestResult]**](WebTransactionTestResult.md) | | [optional] **test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] ## Example ```python -from test_results_api.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response +from test_results.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultWebTransactions200Response from a JSON string get_test_result_web_transactions200_response_instance = GetTestResultWebTransactions200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultWebTransactions200Response.to_json() +print(GetTestResultWebTransactions200Response.to_json()) # convert the object into a dict get_test_result_web_transactions200_response_dict = get_test_result_web_transactions200_response_instance.to_dict() # create an instance of GetTestResultWebTransactions200Response from a dict -get_test_result_web_transactions200_response_form_dict = get_test_result_web_transactions200_response.from_dict(get_test_result_web_transactions200_response_dict) +get_test_result_web_transactions200_response_from_dict = GetTestResultWebTransactions200Response.from_dict(get_test_result_web_transactions200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results/docs/GetTestResultWebTransactionsComponentDetail200Response.md b/test_results/docs/GetTestResultWebTransactionsComponentDetail200Response.md new file mode 100644 index 00000000..cc1a4ddc --- /dev/null +++ b/test_results/docs/GetTestResultWebTransactionsComponentDetail200Response.md @@ -0,0 +1,31 @@ +# GetTestResultWebTransactionsComponentDetail200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[WebTransactionDetailTestResult]**](WebTransactionDetailTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultWebTransactionsComponentDetail200Response from a JSON string +get_test_result_web_transactions_component_detail200_response_instance = GetTestResultWebTransactionsComponentDetail200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultWebTransactionsComponentDetail200Response.to_json()) + +# convert the object into a dict +get_test_result_web_transactions_component_detail200_response_dict = get_test_result_web_transactions_component_detail200_response_instance.to_dict() +# create an instance of GetTestResultWebTransactionsComponentDetail200Response from a dict +get_test_result_web_transactions_component_detail200_response_from_dict = GetTestResultWebTransactionsComponentDetail200Response.from_dict(get_test_result_web_transactions_component_detail200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md b/test_results/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md new file mode 100644 index 00000000..6011dd87 --- /dev/null +++ b/test_results/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md @@ -0,0 +1,31 @@ +# GetTestResultWebTransactionsComponentPageDetail200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[WebTransactionPageDetailTestResult]**](WebTransactionPageDetailTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultWebTransactionsComponentPageDetail200Response from a JSON string +get_test_result_web_transactions_component_page_detail200_response_instance = GetTestResultWebTransactionsComponentPageDetail200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultWebTransactionsComponentPageDetail200Response.to_json()) + +# convert the object into a dict +get_test_result_web_transactions_component_page_detail200_response_dict = get_test_result_web_transactions_component_page_detail200_response_instance.to_dict() +# create an instance of GetTestResultWebTransactionsComponentPageDetail200Response from a dict +get_test_result_web_transactions_component_page_detail200_response_from_dict = GetTestResultWebTransactionsComponentPageDetail200Response.from_dict(get_test_result_web_transactions_component_page_detail200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results/docs/GetTestResultsBgp200Response.md b/test_results/docs/GetTestResultsBgp200Response.md new file mode 100644 index 00000000..a8becb2e --- /dev/null +++ b/test_results/docs/GetTestResultsBgp200Response.md @@ -0,0 +1,33 @@ +# GetTestResultsBgp200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**results** | [**List[BgpTestResult]**](BgpTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.models.get_test_results_bgp200_response import GetTestResultsBgp200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestResultsBgp200Response from a JSON string +get_test_results_bgp200_response_instance = GetTestResultsBgp200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestResultsBgp200Response.to_json()) + +# convert the object into a dict +get_test_results_bgp200_response_dict = get_test_results_bgp200_response_instance.to_dict() +# create an instance of GetTestResultsBgp200Response from a dict +get_test_results_bgp200_response_from_dict = GetTestResultsBgp200Response.from_dict(get_test_results_bgp200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results_api/docs/GetTestResultsBgpPrefix200Response.md b/test_results/docs/GetTestResultsBgpPrefix200Response.md similarity index 77% rename from test_results_api/docs/GetTestResultsBgpPrefix200Response.md rename to test_results/docs/GetTestResultsBgpPrefix200Response.md index ebb752cb..6884d2e4 100644 --- a/test_results_api/docs/GetTestResultsBgpPrefix200Response.md +++ b/test_results/docs/GetTestResultsBgpPrefix200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[BgpTestRouteInformationResult]**](BgpTestRouteInformationResult.md) | | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response +from test_results.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response # TODO update the JSON string below json = "{}" # create an instance of GetTestResultsBgpPrefix200Response from a JSON string get_test_results_bgp_prefix200_response_instance = GetTestResultsBgpPrefix200Response.from_json(json) # print the JSON string representation of the object -print GetTestResultsBgpPrefix200Response.to_json() +print(GetTestResultsBgpPrefix200Response.to_json()) # convert the object into a dict get_test_results_bgp_prefix200_response_dict = get_test_results_bgp_prefix200_response_instance.to_dict() # create an instance of GetTestResultsBgpPrefix200Response from a dict -get_test_results_bgp_prefix200_response_form_dict = get_test_results_bgp_prefix200_response.from_dict(get_test_results_bgp_prefix200_response_dict) +get_test_results_bgp_prefix200_response_from_dict = GetTestResultsBgpPrefix200Response.from_dict(get_test_results_bgp_prefix200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/test_results/docs/HttpTestResult.md b/test_results/docs/HttpTestResult.md new file mode 100644 index 00000000..2069cf77 --- /dev/null +++ b/test_results/docs/HttpTestResult.md @@ -0,0 +1,53 @@ +# HttpTestResult + + +## Properties + +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** | **object** | | [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] +**server_ip** | **str** | IP address of destination server | [optional] [readonly] +**response_code** | **int** | HTTP response code | [optional] +**num_redirects** | **int** | Number of redirects | [optional] +**redirect_time** | **int** | Cumulative redirect timing in milliseconds | [optional] +**dns_time** | **int** | Time required to resolve DNS in milliseconds | [optional] +**ssl_time** | **int** | Time to negotiate SSL/TLS in milliseconds | [optional] +**connect_time** | **int** | Time required to establish a TCP connection to the server | [optional] +**wait_time** | **int** | Time elapsed between completion of request and first byte of response in milliseconds | [optional] +**receive_time** | **int** | Elapsed time between first and last byte of response in milliseconds | [optional] +**wire_size** | **int** | Size of content in bytes | [optional] +**response_time** | **int** | Time to first byte in milliseconds | [optional] +**throughput** | **float** | WireSize divided by receiveTime in byter per second | [optional] +**total_time** | **int** | response time + receive time | [optional] +**headers** | [**HttpTestResultHeaders**](HttpTestResultHeaders.md) | | [optional] +**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] +**ssl_cipher** | **str** | Cipher suite | [optional] +**ssl_version** | **str** | TLS version | [optional] +**ssl_certificates** | [**List[SslCert]**](SslCert.md) | | [optional] + +## Example + +```python +from test_results.models.http_test_result import HttpTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpTestResult from a JSON string +http_test_result_instance = HttpTestResult.from_json(json) +# print the JSON string representation of the object +print(HttpTestResult.to_json()) + +# convert the object into a dict +http_test_result_dict = http_test_result_instance.to_dict() +# create an instance of HttpTestResult from a dict +http_test_result_from_dict = HttpTestResult.from_dict(http_test_result_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/test_results/docs/HttpTestResultHeaders.md b/test_results/docs/HttpTestResultHeaders.md new file mode 100644 index 00000000..d3c6a740 --- /dev/null +++ b/test_results/docs/HttpTestResultHeaders.md @@ -0,0 +1,31 @@ +# HttpTestResultHeaders + +Expandable object containing both request and response headers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_headers** | **str** | Crlf-delimited list of request headers in header: value format | [optional] +**response_headers** | **str** | crlf-delimited list of response headers in header: value format | [optional] + +## Example + +```python +from test_results.models.http_test_result_headers import HttpTestResultHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpTestResultHeaders from a JSON string +http_test_result_headers_instance = HttpTestResultHeaders.from_json(json) +# print the JSON string representation of the object +print(HttpTestResultHeaders.to_json()) + +# convert the object into a dict +http_test_result_headers_dict = http_test_result_headers_instance.to_dict() +# create an instance of HttpTestResultHeaders from a dict +http_test_result_headers_from_dict = HttpTestResultHeaders.from_dict(http_test_result_headers_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/test_results/docs/HttpTestResults.md b/test_results/docs/HttpTestResults.md new file mode 100644 index 00000000..71c71272 --- /dev/null +++ b/test_results/docs/HttpTestResults.md @@ -0,0 +1,30 @@ +# HttpTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] + +## Example + +```python +from test_results.models.http_test_results import HttpTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpTestResults from a JSON string +http_test_results_instance = HttpTestResults.from_json(json) +# print the JSON string representation of the object +print(HttpTestResults.to_json()) + +# convert the object into a dict +http_test_results_dict = http_test_results_instance.to_dict() +# create an instance of HttpTestResults from a dict +http_test_results_from_dict = HttpTestResults.from_dict(http_test_results_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/test_results/docs/Link.md b/test_results/docs/Link.md new file mode 100644 index 00000000..3a74d314 --- /dev/null +++ b/test_results/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 test_results.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/test_results_api/docs/Marker.md b/test_results/docs/Marker.md similarity index 86% rename from test_results_api/docs/Marker.md rename to test_results/docs/Marker.md index b4a9d1e9..25d86d2b 100644 --- a/test_results_api/docs/Marker.md +++ b/test_results/docs/Marker.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Name assigned to marker in transaction script | [optional] [readonly] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.marker import Marker +from test_results.models.marker import Marker # TODO update the JSON string below json = "{}" # create an instance of Marker from a JSON string marker_instance = Marker.from_json(json) # print the JSON string representation of the object -print Marker.to_json() +print(Marker.to_json()) # convert the object into a dict marker_dict = marker_instance.to_dict() # create an instance of Marker from a dict -marker_form_dict = marker.from_dict(marker_dict) +marker_from_dict = Marker.from_dict(marker_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/test_results/docs/Monitor.md b/test_results/docs/Monitor.md new file mode 100644 index 00000000..cc021932 --- /dev/null +++ b/test_results/docs/Monitor.md @@ -0,0 +1,31 @@ +# Monitor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**monitor_id** | **str** | Unique monitor ID. | [optional] [readonly] +**monitor_name** | **str** | The name of the Monitor. | [optional] [readonly] +**country_id** | **str** | 2-digit ISO country code. | [optional] [readonly] + +## Example + +```python +from test_results.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/test_results_api/docs/NetworkBGPTestMetricsApi.md b/test_results/docs/NetworkBGPTestMetricsApi.md similarity index 88% rename from test_results_api/docs/NetworkBGPTestMetricsApi.md rename to test_results/docs/NetworkBGPTestMetricsApi.md index fc83d7ee..0e5deabc 100644 --- a/test_results_api/docs/NetworkBGPTestMetricsApi.md +++ b/test_results/docs/NetworkBGPTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.NetworkBGPTestMetricsApi +# test_results.NetworkBGPTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,17 +18,16 @@ Returns a list of BGP monitors actively monitoring the destination's target pref ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_results_bgp200_response import GetTestResultsBgp200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_results_bgp200_response import GetTestResultsBgp200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,20 +37,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkBGPTestMetricsApi(api_client) + api_instance = test_results.NetworkBGPTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 BGP test results @@ -66,6 +65,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -73,7 +73,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -89,6 +89,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -113,17 +114,16 @@ Returns an ordered list of networks crossed by a particular network prefix, incl ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -133,18 +133,18 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.NetworkBGPTestMetricsApi(api_client) + api_instance = test_results.NetworkBGPTestMetricsApi(api_client) test_id = '202701' # str | Test ID prefix_id = '3789376546' # str | The ID of the prefix. You can get `prefixId` from the `/test-results/{testId}/bgp` endpoint. round_id = '1384309800' # str | Round ID - aid = '2067' # 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) + 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 BGP route test results by prefix @@ -159,6 +159,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -180,6 +181,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results/docs/NetworkTestMetricsApi.md b/test_results/docs/NetworkTestMetricsApi.md new file mode 100644 index 00000000..c6a4264c --- /dev/null +++ b/test_results/docs/NetworkTestMetricsApi.md @@ -0,0 +1,304 @@ +# test_results.NetworkTestMetricsApi + +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_pathvis_agent_round** +> GetTestPathvisAgentRound200Response 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 test_results +from test_results.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response +from test_results.models.path_vis_direction import PathVisDirection +from 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 = test_results.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 = test_results.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = 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 = 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 + +[**GetTestPathvisAgentRound200Response**](GetTestPathvisAgentRound200Response.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** +> GetTestResultMetrics200Response get_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) + +Get network test results + +Returns network test results for every agent and round. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import test_results +from test_results.models.get_test_result_metrics200_response import GetTestResultMetrics200Response +from test_results.models.test_direction import TestDirection +from 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 = test_results.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 = test_results.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = test_results.NetworkTestMetricsApi(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) + direction = test_results.TestDirection() # TestDirection | Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkTestMetricsApi->get_test_result_metrics: %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] + **direction** | [**TestDirection**](.md)| Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 + +[**GetTestResultMetrics200Response**](GetTestResultMetrics200Response.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_network_path_vis** +> GetTestResultNetworkPathVis200Response 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 path visualization network test results + +Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 test_results +from test_results.models.get_test_result_network_path_vis200_response import GetTestResultNetworkPathVis200Response +from test_results.models.path_vis_direction import PathVisDirection +from 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 = test_results.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 = test_results.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = test_results.NetworkTestMetricsApi(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) + direction = 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkTestMetricsApi->get_test_result_network_path_vis: %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] + **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 + +[**GetTestResultNetworkPathVis200Response**](GetTestResultNetworkPathVis200Response.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) + diff --git a/test_results/docs/NetworkTestResult.md b/test_results/docs/NetworkTestResult.md new file mode 100644 index 00000000..fded8e91 --- /dev/null +++ b/test_results/docs/NetworkTestResult.md @@ -0,0 +1,46 @@ +# NetworkTestResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_date** | **datetime** | Data point date in UTC (ISO date-time format). | [optional] [readonly] +**round_id** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] +**links** | **object** | | [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] +**available_bandwidth** | **float** | The bandwidth from the client to the server measured in Mbps. This value is not available if bandwidth testing is disabled, if no value could be calculated, or if the target is a proxy. | [optional] [readonly] +**avg_latency** | **float** | Average RTT for packets sent to destination | [optional] [readonly] +**bandwidth** | **float** | | [optional] [readonly] +**capacity** | **float** | The capacity from the client to the server measured in Mbps. This value is not available if bandwidth testing is disabled, if no value could be calculated, or if the target is a proxy. | [optional] [readonly] +**jitter** | **float** | Standard deviation of latency | [optional] [readonly] +**loss** | **float** | Percentage of packets not reaching destination | [optional] [readonly] +**max_latency** | **float** | Maximum RTT for packets sent to destination | [optional] [readonly] +**min_latency** | **float** | Minimum RTT for packets sent to destination | [optional] [readonly] +**packets_by_second** | **List[List[int]]** | Number of packets sent and received in a second. | [optional] [readonly] +**agent** | [**Agent**](Agent.md) | | [optional] +**server_ip** | **str** | IP of target server | [optional] [readonly] +**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] +**direction** | [**TestDirection**](TestDirection.md) | | [optional] + +## Example + +```python +from test_results.models.network_test_result import NetworkTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkTestResult from a JSON string +network_test_result_instance = NetworkTestResult.from_json(json) +# print the JSON string representation of the object +print(NetworkTestResult.to_json()) + +# convert the object into a dict +network_test_result_dict = network_test_result_instance.to_dict() +# create an instance of NetworkTestResult from a dict +network_test_result_from_dict = NetworkTestResult.from_dict(network_test_result_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/test_results/docs/NetworkTestResults.md b/test_results/docs/NetworkTestResults.md new file mode 100644 index 00000000..a8f4153e --- /dev/null +++ b/test_results/docs/NetworkTestResults.md @@ -0,0 +1,30 @@ +# NetworkTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] + +## Example + +```python +from test_results.models.network_test_results import NetworkTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of NetworkTestResults from a JSON string +network_test_results_instance = NetworkTestResults.from_json(json) +# print the JSON string representation of the object +print(NetworkTestResults.to_json()) + +# convert the object into a dict +network_test_results_dict = network_test_results_instance.to_dict() +# create an instance of NetworkTestResults from a dict +network_test_results_from_dict = NetworkTestResults.from_dict(network_test_results_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/test_results_api/docs/Page.md b/test_results/docs/Page.md similarity index 90% rename from test_results_api/docs/Page.md rename to test_results/docs/Page.md index 4458777b..138f2499 100644 --- a/test_results_api/docs/Page.md +++ b/test_results/docs/Page.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **page_num** | **int** | Page index | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.page import Page +from test_results.models.page import Page # TODO update the JSON string below json = "{}" # create an instance of Page from a JSON string page_instance = Page.from_json(json) # print the JSON string representation of the object -print Page.to_json() +print(Page.to_json()) # convert the object into a dict page_dict = page_instance.to_dict() # create an instance of Page from a dict -page_form_dict = page.from_dict(page_dict) +page_from_dict = Page.from_dict(page_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/test_results_api/docs/PageLoadDetailTestResult.md b/test_results/docs/PageLoadDetailTestResult.md similarity index 87% rename from test_results_api/docs/PageLoadDetailTestResult.md rename to test_results/docs/PageLoadDetailTestResult.md index dc99e5e0..dd9299f6 100644 --- a/test_results_api/docs/PageLoadDetailTestResult.md +++ b/test_results/docs/PageLoadDetailTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.page_load_detail_test_result import PageLoadDetailTestResult +from test_results.models.page_load_detail_test_result import PageLoadDetailTestResult # TODO update the JSON string below json = "{}" # create an instance of PageLoadDetailTestResult from a JSON string page_load_detail_test_result_instance = PageLoadDetailTestResult.from_json(json) # print the JSON string representation of the object -print PageLoadDetailTestResult.to_json() +print(PageLoadDetailTestResult.to_json()) # convert the object into a dict page_load_detail_test_result_dict = page_load_detail_test_result_instance.to_dict() # create an instance of PageLoadDetailTestResult from a dict -page_load_detail_test_result_form_dict = page_load_detail_test_result.from_dict(page_load_detail_test_result_dict) +page_load_detail_test_result_from_dict = PageLoadDetailTestResult.from_dict(page_load_detail_test_result_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/test_results_api/docs/PageLoadDetailTestResults.md b/test_results/docs/PageLoadDetailTestResults.md similarity index 78% rename from test_results_api/docs/PageLoadDetailTestResults.md rename to test_results/docs/PageLoadDetailTestResults.md index dc32e60b..3889cd93 100644 --- a/test_results_api/docs/PageLoadDetailTestResults.md +++ b/test_results/docs/PageLoadDetailTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PageLoadDetailTestResult]**](PageLoadDetailTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.page_load_detail_test_results import PageLoadDetailTestResults +from test_results.models.page_load_detail_test_results import PageLoadDetailTestResults # TODO update the JSON string below json = "{}" # create an instance of PageLoadDetailTestResults from a JSON string page_load_detail_test_results_instance = PageLoadDetailTestResults.from_json(json) # print the JSON string representation of the object -print PageLoadDetailTestResults.to_json() +print(PageLoadDetailTestResults.to_json()) # convert the object into a dict page_load_detail_test_results_dict = page_load_detail_test_results_instance.to_dict() # create an instance of PageLoadDetailTestResults from a dict -page_load_detail_test_results_form_dict = page_load_detail_test_results.from_dict(page_load_detail_test_results_dict) +page_load_detail_test_results_from_dict = PageLoadDetailTestResults.from_dict(page_load_detail_test_results_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/test_results_api/docs/PageLoadTestResult.md b/test_results/docs/PageLoadTestResult.md similarity index 88% rename from test_results_api/docs/PageLoadTestResult.md rename to test_results/docs/PageLoadTestResult.md index 0b681e4d..6d0d130f 100644 --- a/test_results_api/docs/PageLoadTestResult.md +++ b/test_results/docs/PageLoadTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -18,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.page_load_test_result import PageLoadTestResult +from test_results.models.page_load_test_result import PageLoadTestResult # TODO update the JSON string below json = "{}" # create an instance of PageLoadTestResult from a JSON string page_load_test_result_instance = PageLoadTestResult.from_json(json) # print the JSON string representation of the object -print PageLoadTestResult.to_json() +print(PageLoadTestResult.to_json()) # convert the object into a dict page_load_test_result_dict = page_load_test_result_instance.to_dict() # create an instance of PageLoadTestResult from a dict -page_load_test_result_form_dict = page_load_test_result.from_dict(page_load_test_result_dict) +page_load_test_result_from_dict = PageLoadTestResult.from_dict(page_load_test_result_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/test_results_api/docs/PageLoadTestResults.md b/test_results/docs/PageLoadTestResults.md similarity index 80% rename from test_results_api/docs/PageLoadTestResults.md rename to test_results/docs/PageLoadTestResults.md index a3a90f61..4a8d4a77 100644 --- a/test_results_api/docs/PageLoadTestResults.md +++ b/test_results/docs/PageLoadTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PageLoadTestResult]**](PageLoadTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.page_load_test_results import PageLoadTestResults +from test_results.models.page_load_test_results import PageLoadTestResults # TODO update the JSON string below json = "{}" # create an instance of PageLoadTestResults from a JSON string page_load_test_results_instance = PageLoadTestResults.from_json(json) # print the JSON string representation of the object -print PageLoadTestResults.to_json() +print(PageLoadTestResults.to_json()) # convert the object into a dict page_load_test_results_dict = page_load_test_results_instance.to_dict() # create an instance of PageLoadTestResults from a dict -page_load_test_results_form_dict = page_load_test_results.from_dict(page_load_test_results_dict) +page_load_test_results_from_dict = PageLoadTestResults.from_dict(page_load_test_results_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/test_results/docs/PaginationLinks.md b/test_results/docs/PaginationLinks.md new file mode 100644 index 00000000..c969e0cb --- /dev/null +++ b/test_results/docs/PaginationLinks.md @@ -0,0 +1,30 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.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/test_results/docs/PaginationLinksLinks.md b/test_results/docs/PaginationLinksLinks.md new file mode 100644 index 00000000..86957da3 --- /dev/null +++ b/test_results/docs/PaginationLinksLinks.md @@ -0,0 +1,31 @@ +# PaginationLinksLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from test_results.models.pagination_links_links import PaginationLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinksLinks from a JSON string +pagination_links_links_instance = PaginationLinksLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinksLinks.to_json()) + +# convert the object into a dict +pagination_links_links_dict = pagination_links_links_instance.to_dict() +# create an instance of PaginationLinksLinks from a dict +pagination_links_links_from_dict = PaginationLinksLinks.from_dict(pagination_links_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/test_results/docs/PathVisBaseTestResult.md b/test_results/docs/PathVisBaseTestResult.md new file mode 100644 index 00000000..1642cabb --- /dev/null +++ b/test_results/docs/PathVisBaseTestResult.md @@ -0,0 +1,40 @@ +# PathVisBaseTestResult + + +## Properties + +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** | **object** | | [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] +**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] +**server_ip** | **str** | IP of target server | [optional] [readonly] +**source_ip** | **str** | IP address of source agent | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source agent | [optional] [readonly] +**target_is_proxy** | **bool** | Specifies whether the traces are targeting a proxy. If not set, it is considered as false. | [optional] [readonly] +**direction** | [**PathVisDirection**](PathVisDirection.md) | | [optional] + +## Example + +```python +from test_results.models.path_vis_base_test_result import PathVisBaseTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisBaseTestResult from a JSON string +path_vis_base_test_result_instance = PathVisBaseTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisBaseTestResult.to_json()) + +# convert the object into a dict +path_vis_base_test_result_dict = path_vis_base_test_result_instance.to_dict() +# create an instance of PathVisBaseTestResult from a dict +path_vis_base_test_result_from_dict = PathVisBaseTestResult.from_dict(path_vis_base_test_result_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/test_results/docs/PathVisDetailTestResult.md b/test_results/docs/PathVisDetailTestResult.md new file mode 100644 index 00000000..14d29a41 --- /dev/null +++ b/test_results/docs/PathVisDetailTestResult.md @@ -0,0 +1,41 @@ +# PathVisDetailTestResult + + +## Properties + +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** | **object** | | [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] +**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] +**server_ip** | **str** | IP of target server | [optional] [readonly] +**source_ip** | **str** | IP address of source agent | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source agent | [optional] [readonly] +**target_is_proxy** | **bool** | Specifies whether the traces are targeting a proxy. If not set, it is considered as false. | [optional] [readonly] +**direction** | [**PathVisDirection**](PathVisDirection.md) | | [optional] +**path_traces** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows 3 iterations of path trace, with each iteration specified by a pathId | [optional] + +## Example + +```python +from test_results.models.path_vis_detail_test_result import PathVisDetailTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisDetailTestResult from a JSON string +path_vis_detail_test_result_instance = PathVisDetailTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisDetailTestResult.to_json()) + +# convert the object into a dict +path_vis_detail_test_result_dict = path_vis_detail_test_result_instance.to_dict() +# create an instance of PathVisDetailTestResult from a dict +path_vis_detail_test_result_from_dict = PathVisDetailTestResult.from_dict(path_vis_detail_test_result_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/test_results/docs/PathVisDetailTestResults.md b/test_results/docs/PathVisDetailTestResults.md new file mode 100644 index 00000000..8027dbfe --- /dev/null +++ b/test_results/docs/PathVisDetailTestResults.md @@ -0,0 +1,30 @@ +# PathVisDetailTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PathVisDetailTestResult]**](PathVisDetailTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] + +## Example + +```python +from test_results.models.path_vis_detail_test_results import PathVisDetailTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisDetailTestResults from a JSON string +path_vis_detail_test_results_instance = PathVisDetailTestResults.from_json(json) +# print the JSON string representation of the object +print(PathVisDetailTestResults.to_json()) + +# convert the object into a dict +path_vis_detail_test_results_dict = path_vis_detail_test_results_instance.to_dict() +# create an instance of PathVisDetailTestResults from a dict +path_vis_detail_test_results_from_dict = PathVisDetailTestResults.from_dict(path_vis_detail_test_results_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/test_results/docs/PathVisDirection.md b/test_results/docs/PathVisDirection.md new file mode 100644 index 00000000..61218235 --- /dev/null +++ b/test_results/docs/PathVisDirection.md @@ -0,0 +1,12 @@ +# PathVisDirection + +Direction of the path trace. + +## 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/test_results/docs/PathVisEndpoint.md b/test_results/docs/PathVisEndpoint.md new file mode 100644 index 00000000..8fc7b8fd --- /dev/null +++ b/test_results/docs/PathVisEndpoint.md @@ -0,0 +1,34 @@ +# PathVisEndpoint + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_address** | **str** | IP address of the hop | [optional] [readonly] +**mss** | **int** | Maximum segment size in bytes | [optional] [readonly] +**number_of_hops** | **int** | Number of hops for path trace to destination | [optional] [readonly] +**path_id** | **str** | Unique ID of path trace | [optional] [readonly] +**path_mtu** | **int** | MTU sizes on network from agents to the target | [optional] [readonly] +**response_time** | **int** | RTT of the path trace to the destination in milliseconds | [optional] [readonly] + +## Example + +```python +from test_results.models.path_vis_endpoint import PathVisEndpoint + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisEndpoint from a JSON string +path_vis_endpoint_instance = PathVisEndpoint.from_json(json) +# print the JSON string representation of the object +print(PathVisEndpoint.to_json()) + +# convert the object into a dict +path_vis_endpoint_dict = path_vis_endpoint_instance.to_dict() +# create an instance of PathVisEndpoint from a dict +path_vis_endpoint_from_dict = PathVisEndpoint.from_dict(path_vis_endpoint_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/test_results/docs/PathVisHop.md b/test_results/docs/PathVisHop.md new file mode 100644 index 00000000..d89762bb --- /dev/null +++ b/test_results/docs/PathVisHop.md @@ -0,0 +1,36 @@ +# PathVisHop + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hop** | **int** | Hop index | [optional] [readonly] +**ip_address** | **str** | IP address of the hop | [optional] [readonly] +**prefix** | **str** | Prefix of IP address shown in CIDR | [optional] [readonly] +**rdns** | **str** | Reverse DNS entry of IP, if available | [optional] [readonly] +**network** | **str** | Autonomous System originating the prefix | [optional] [readonly] +**response_time** | **int** | RTT to the hop’s IP in milliseconds | [optional] [readonly] +**location** | **str** | Location information for the hop | [optional] [readonly] +**mpls** | **str** | Multiprotocol Label Switching information, if available | [optional] [readonly] + +## Example + +```python +from test_results.models.path_vis_hop import PathVisHop + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisHop from a JSON string +path_vis_hop_instance = PathVisHop.from_json(json) +# print the JSON string representation of the object +print(PathVisHop.to_json()) + +# convert the object into a dict +path_vis_hop_dict = path_vis_hop_instance.to_dict() +# create an instance of PathVisHop from a dict +path_vis_hop_from_dict = PathVisHop.from_dict(path_vis_hop_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/test_results/docs/PathVisRoute.md b/test_results/docs/PathVisRoute.md new file mode 100644 index 00000000..3b22270b --- /dev/null +++ b/test_results/docs/PathVisRoute.md @@ -0,0 +1,30 @@ +# PathVisRoute + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path_id** | **str** | Unique ID of path trace | [optional] [readonly] +**hops** | [**List[PathVisHop]**](PathVisHop.md) | Array of hop objects indicating each step in the traceroute | [optional] + +## Example + +```python +from test_results.models.path_vis_route import PathVisRoute + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisRoute from a JSON string +path_vis_route_instance = PathVisRoute.from_json(json) +# print the JSON string representation of the object +print(PathVisRoute.to_json()) + +# convert the object into a dict +path_vis_route_dict = path_vis_route_instance.to_dict() +# create an instance of PathVisRoute from a dict +path_vis_route_from_dict = PathVisRoute.from_dict(path_vis_route_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/test_results/docs/PathVisTestResult.md b/test_results/docs/PathVisTestResult.md new file mode 100644 index 00000000..7419b7c8 --- /dev/null +++ b/test_results/docs/PathVisTestResult.md @@ -0,0 +1,41 @@ +# PathVisTestResult + + +## Properties + +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** | **object** | | [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] +**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] +**server_ip** | **str** | IP of target server | [optional] [readonly] +**source_ip** | **str** | IP address of source agent | [optional] [readonly] +**source_prefix** | **str** | IP prefix of source agent | [optional] [readonly] +**target_is_proxy** | **bool** | Specifies whether the traces are targeting a proxy. If not set, it is considered as false. | [optional] [readonly] +**direction** | [**PathVisDirection**](PathVisDirection.md) | | [optional] +**path_traces** | [**List[PathVisEndpoint]**](PathVisEndpoint.md) | Shows all iterations of path trace, with each iteration specified by a pathId | [optional] + +## Example + +```python +from test_results.models.path_vis_test_result import PathVisTestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisTestResult from a JSON string +path_vis_test_result_instance = PathVisTestResult.from_json(json) +# print the JSON string representation of the object +print(PathVisTestResult.to_json()) + +# convert the object into a dict +path_vis_test_result_dict = path_vis_test_result_instance.to_dict() +# create an instance of PathVisTestResult from a dict +path_vis_test_result_from_dict = PathVisTestResult.from_dict(path_vis_test_result_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/test_results/docs/PathVisTestResults.md b/test_results/docs/PathVisTestResults.md new file mode 100644 index 00000000..6d2ed541 --- /dev/null +++ b/test_results/docs/PathVisTestResults.md @@ -0,0 +1,30 @@ +# PathVisTestResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [optional] +**test** | [**SimpleTest**](SimpleTest.md) | | [optional] + +## Example + +```python +from test_results.models.path_vis_test_results import PathVisTestResults + +# TODO update the JSON string below +json = "{}" +# create an instance of PathVisTestResults from a JSON string +path_vis_test_results_instance = PathVisTestResults.from_json(json) +# print the JSON string representation of the object +print(PathVisTestResults.to_json()) + +# convert the object into a dict +path_vis_test_results_dict = path_vis_test_results_instance.to_dict() +# create an instance of PathVisTestResults from a dict +path_vis_test_results_from_dict = PathVisTestResults.from_dict(path_vis_test_results_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/test_results/docs/QueryWindow.md b/test_results/docs/QueryWindow.md new file mode 100644 index 00000000..1f6b8463 --- /dev/null +++ b/test_results/docs/QueryWindow.md @@ -0,0 +1,30 @@ +# QueryWindow + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +## Example + +```python +from test_results.models.query_window import QueryWindow + +# TODO update the JSON string below +json = "{}" +# create an instance of QueryWindow from a JSON string +query_window_instance = QueryWindow.from_json(json) +# print the JSON string representation of the object +print(QueryWindow.to_json()) + +# convert the object into a dict +query_window_dict = query_window_instance.to_dict() +# create an instance of QueryWindow from a dict +query_window_from_dict = QueryWindow.from_dict(query_window_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/test_results_api/docs/RtpStreamTestResult.md b/test_results/docs/RtpStreamTestResult.md similarity index 82% rename from test_results_api/docs/RtpStreamTestResult.md rename to test_results/docs/RtpStreamTestResult.md index 07cffe24..43f16073 100644 --- a/test_results_api/docs/RtpStreamTestResult.md +++ b/test_results/docs/RtpStreamTestResult.md @@ -2,11 +2,14 @@ ## Properties + 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** | **object** | | [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] **server_ip** | **str** | Target agent IP address | [optional] [readonly] **dscp** | **str** | DSCP value received by the server from the agent | [optional] [readonly] @@ -23,19 +26,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.rtp_stream_test_result import RtpStreamTestResult +from test_results.models.rtp_stream_test_result import RtpStreamTestResult # TODO update the JSON string below json = "{}" # create an instance of RtpStreamTestResult from a JSON string rtp_stream_test_result_instance = RtpStreamTestResult.from_json(json) # print the JSON string representation of the object -print RtpStreamTestResult.to_json() +print(RtpStreamTestResult.to_json()) # convert the object into a dict rtp_stream_test_result_dict = rtp_stream_test_result_instance.to_dict() # create an instance of RtpStreamTestResult from a dict -rtp_stream_test_result_form_dict = rtp_stream_test_result.from_dict(rtp_stream_test_result_dict) +rtp_stream_test_result_from_dict = RtpStreamTestResult.from_dict(rtp_stream_test_result_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/test_results_api/docs/RtpStreamTestResults.md b/test_results/docs/RtpStreamTestResults.md similarity index 80% rename from test_results_api/docs/RtpStreamTestResults.md rename to test_results/docs/RtpStreamTestResults.md index 3cd27cee..19f22d8b 100644 --- a/test_results_api/docs/RtpStreamTestResults.md +++ b/test_results/docs/RtpStreamTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[RtpStreamTestResult]**](RtpStreamTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.rtp_stream_test_results import RtpStreamTestResults +from test_results.models.rtp_stream_test_results import RtpStreamTestResults # TODO update the JSON string below json = "{}" # create an instance of RtpStreamTestResults from a JSON string rtp_stream_test_results_instance = RtpStreamTestResults.from_json(json) # print the JSON string representation of the object -print RtpStreamTestResults.to_json() +print(RtpStreamTestResults.to_json()) # convert the object into a dict rtp_stream_test_results_dict = rtp_stream_test_results_instance.to_dict() # create an instance of RtpStreamTestResults from a dict -rtp_stream_test_results_form_dict = rtp_stream_test_results.from_dict(rtp_stream_test_results_dict) +rtp_stream_test_results_from_dict = RtpStreamTestResults.from_dict(rtp_stream_test_results_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/test_results/docs/SelfLinks.md b/test_results/docs/SelfLinks.md new file mode 100644 index 00000000..41ccaab0 --- /dev/null +++ b/test_results/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from test_results.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/test_results/docs/SelfLinksLinks.md b/test_results/docs/SelfLinksLinks.md new file mode 100644 index 00000000..e91ed0c3 --- /dev/null +++ b/test_results/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from test_results.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/test_results/docs/SimpleTest.md b/test_results/docs/SimpleTest.md new file mode 100644 index 00000000..22d817dc --- /dev/null +++ b/test_results/docs/SimpleTest.md @@ -0,0 +1,43 @@ +# SimpleTest + +Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**SimpleTestLinks**](SimpleTestLinks.md) | | [optional] + +## Example + +```python +from test_results.models.simple_test import SimpleTest + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTest from a JSON string +simple_test_instance = SimpleTest.from_json(json) +# print the JSON string representation of the object +print(SimpleTest.to_json()) + +# convert the object into a dict +simple_test_dict = simple_test_instance.to_dict() +# create an instance of SimpleTest from a dict +simple_test_from_dict = SimpleTest.from_dict(simple_test_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/test_results/docs/SimpleTestLinks.md b/test_results/docs/SimpleTestLinks.md new file mode 100644 index 00000000..3ad3145b --- /dev/null +++ b/test_results/docs/SimpleTestLinks.md @@ -0,0 +1,31 @@ +# SimpleTestLinks + +A list of links that can be accessed to get more information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**SimpleTestLinksSelf**](SimpleTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from test_results.models.simple_test_links import SimpleTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTestLinks from a JSON string +simple_test_links_instance = SimpleTestLinks.from_json(json) +# print the JSON string representation of the object +print(SimpleTestLinks.to_json()) + +# convert the object into a dict +simple_test_links_dict = simple_test_links_instance.to_dict() +# create an instance of SimpleTestLinks from a dict +simple_test_links_from_dict = SimpleTestLinks.from_dict(simple_test_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/test_results/docs/SimpleTestLinksSelf.md b/test_results/docs/SimpleTestLinksSelf.md new file mode 100644 index 00000000..9ac933e0 --- /dev/null +++ b/test_results/docs/SimpleTestLinksSelf.md @@ -0,0 +1,36 @@ +# SimpleTestLinksSelf + + +## 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 test_results.models.simple_test_links_self import SimpleTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTestLinksSelf from a JSON string +simple_test_links_self_instance = SimpleTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(SimpleTestLinksSelf.to_json()) + +# convert the object into a dict +simple_test_links_self_dict = simple_test_links_self_instance.to_dict() +# create an instance of SimpleTestLinksSelf from a dict +simple_test_links_self_from_dict = SimpleTestLinksSelf.from_dict(simple_test_links_self_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/test_results_api/docs/SipServerErrorType.md b/test_results/docs/SipServerErrorType.md similarity index 99% rename from test_results_api/docs/SipServerErrorType.md rename to test_results/docs/SipServerErrorType.md index 470dbab0..d4d9595c 100644 --- a/test_results_api/docs/SipServerErrorType.md +++ b/test_results/docs/SipServerErrorType.md @@ -3,6 +3,7 @@ Error type, none if there is no error ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/test_results_api/docs/SipServerTestResult.md b/test_results/docs/SipServerTestResult.md similarity index 85% rename from test_results_api/docs/SipServerTestResult.md rename to test_results/docs/SipServerTestResult.md index b409347d..020b2c8b 100644 --- a/test_results_api/docs/SipServerTestResult.md +++ b/test_results/docs/SipServerTestResult.md @@ -2,11 +2,14 @@ ## Properties + 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** | **object** | | [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] **server_ip** | **str** | Target agent IP address | [optional] [readonly] **agent** | [**Agent**](Agent.md) | | [optional] **availability** | **float** | availability of the service | [optional] [readonly] @@ -28,19 +31,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.sip_server_test_result import SipServerTestResult +from test_results.models.sip_server_test_result import SipServerTestResult # TODO update the JSON string below json = "{}" # create an instance of SipServerTestResult from a JSON string sip_server_test_result_instance = SipServerTestResult.from_json(json) # print the JSON string representation of the object -print SipServerTestResult.to_json() +print(SipServerTestResult.to_json()) # convert the object into a dict sip_server_test_result_dict = sip_server_test_result_instance.to_dict() # create an instance of SipServerTestResult from a dict -sip_server_test_result_form_dict = sip_server_test_result.from_dict(sip_server_test_result_dict) +sip_server_test_result_from_dict = SipServerTestResult.from_dict(sip_server_test_result_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/test_results_api/docs/SipServerTestResults.md b/test_results/docs/SipServerTestResults.md similarity index 80% rename from test_results_api/docs/SipServerTestResults.md rename to test_results/docs/SipServerTestResults.md index 27167ad3..ee9d5823 100644 --- a/test_results_api/docs/SipServerTestResults.md +++ b/test_results/docs/SipServerTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[SipServerTestResult]**](SipServerTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.sip_server_test_results import SipServerTestResults +from test_results.models.sip_server_test_results import SipServerTestResults # TODO update the JSON string below json = "{}" # create an instance of SipServerTestResults from a JSON string sip_server_test_results_instance = SipServerTestResults.from_json(json) # print the JSON string representation of the object -print SipServerTestResults.to_json() +print(SipServerTestResults.to_json()) # convert the object into a dict sip_server_test_results_dict = sip_server_test_results_instance.to_dict() # create an instance of SipServerTestResults from a dict -sip_server_test_results_form_dict = sip_server_test_results.from_dict(sip_server_test_results_dict) +sip_server_test_results_from_dict = SipServerTestResults.from_dict(sip_server_test_results_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/test_results/docs/SslCert.md b/test_results/docs/SslCert.md new file mode 100644 index 00000000..5416c3c2 --- /dev/null +++ b/test_results/docs/SslCert.md @@ -0,0 +1,36 @@ +# SslCert + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**days_until_expiry** | **int** | Days until certificate expires, rounded down. 0 is shown if there are less than 24 hours remaining. Calculated when the test was executed. | [optional] +**is_fetch_date_in_valid_cert_date_range** | **bool** | True when certificate fetch date is within the valid certificate date range, false otherwise | [optional] +**has_valid_signing_cert** | **bool** | This field is implicitly true; it is output only when false. false indicates this certificate was missing a valid signing certificate in the chain. | [optional] +**issuer_name** | **str** | Certificate issuer | [optional] +**valid_before** | **datetime** | Certificate is not valid after this date | [optional] +**valid_after** | **datetime** | Certificate is not valid before this date | [optional] +**subject_alternative_names** | **List[str]** | Alternative name(s) of the certificate subject, extracted from the Subject Alternative Name (SAN) X.509 certificate extension, for example example.com, www2.example.com | [optional] +**subject_name** | **str** | certificate’s subject name - a value of the common name (CN) RDN from the certificate’s Subject attribute, for example www.example.com | [optional] + +## Example + +```python +from test_results.models.ssl_cert import SslCert + +# TODO update the JSON string below +json = "{}" +# create an instance of SslCert from a JSON string +ssl_cert_instance = SslCert.from_json(json) +# print the JSON string representation of the object +print(SslCert.to_json()) + +# convert the object into a dict +ssl_cert_dict = ssl_cert_instance.to_dict() +# create an instance of SslCert from a dict +ssl_cert_from_dict = SslCert.from_dict(ssl_cert_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/test_results/docs/TestDirection.md b/test_results/docs/TestDirection.md new file mode 100644 index 00000000..27747f93 --- /dev/null +++ b/test_results/docs/TestDirection.md @@ -0,0 +1,12 @@ +# TestDirection + +Direction of the test, which affects how results are shown. + +## 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/test_results/docs/TestInterval.md b/test_results/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/test_results/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/test_results/docs/TestResult.md b/test_results/docs/TestResult.md new file mode 100644 index 00000000..ed780f84 --- /dev/null +++ b/test_results/docs/TestResult.md @@ -0,0 +1,31 @@ +# TestResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | **object** | | [optional] +**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] + +## Example + +```python +from test_results.models.test_result import TestResult + +# TODO update the JSON string below +json = "{}" +# create an instance of TestResult from a JSON string +test_result_instance = TestResult.from_json(json) +# print the JSON string representation of the object +print(TestResult.to_json()) + +# convert the object into a dict +test_result_dict = test_result_instance.to_dict() +# create an instance of TestResult from a dict +test_result_from_dict = TestResult.from_dict(test_result_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/test_results_api/docs/TestResultAppLinks.md b/test_results/docs/TestResultAppLinks.md similarity index 78% rename from test_results_api/docs/TestResultAppLinks.md rename to test_results/docs/TestResultAppLinks.md index 93c067e7..de61353b 100644 --- a/test_results_api/docs/TestResultAppLinks.md +++ b/test_results/docs/TestResultAppLinks.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **object** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.test_result_app_links import TestResultAppLinks +from test_results.models.test_result_app_links import TestResultAppLinks # TODO update the JSON string below json = "{}" # create an instance of TestResultAppLinks from a JSON string test_result_app_links_instance = TestResultAppLinks.from_json(json) # print the JSON string representation of the object -print TestResultAppLinks.to_json() +print(TestResultAppLinks.to_json()) # convert the object into a dict test_result_app_links_dict = test_result_app_links_instance.to_dict() # create an instance of TestResultAppLinks from a dict -test_result_app_links_form_dict = test_result_app_links.from_dict(test_result_app_links_dict) +test_result_app_links_from_dict = TestResultAppLinks.from_dict(test_result_app_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/test_results/docs/TestType.md b/test_results/docs/TestType.md new file mode 100644 index 00000000..8093a739 --- /dev/null +++ b/test_results/docs/TestType.md @@ -0,0 +1,12 @@ +# TestType + +This is a read only value, as test type is implicit in the test creation url. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/test_results/docs/UnauthorizedError.md b/test_results/docs/UnauthorizedError.md new file mode 100644 index 00000000..74d5c9e8 --- /dev/null +++ b/test_results/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from test_results.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/test_results/docs/ValidationError.md b/test_results/docs/ValidationError.md new file mode 100644 index 00000000..396d7da9 --- /dev/null +++ b/test_results/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from test_results.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/test_results/docs/ValidationErrorAllOfErrors.md b/test_results/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..265d2b4f --- /dev/null +++ b/test_results/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/test_results_api/docs/VoiceRTPServerTestMetricsApi.md b/test_results/docs/VoiceRTPServerTestMetricsApi.md similarity index 88% rename from test_results_api/docs/VoiceRTPServerTestMetricsApi.md rename to test_results/docs/VoiceRTPServerTestMetricsApi.md index 30df6577..0c72c9ef 100644 --- a/test_results_api/docs/VoiceRTPServerTestMetricsApi.md +++ b/test_results/docs/VoiceRTPServerTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.VoiceRTPServerTestMetricsApi +# test_results.VoiceRTPServerTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns Voice RTP server test results. If you do not specify a window or a start ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,20 +36,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.VoiceRTPServerTestMetricsApi(api_client) + api_instance = test_results.VoiceRTPServerTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 RTP server test metrics @@ -65,6 +64,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -72,7 +72,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/VoiceSIPServerTestMetricsApi.md b/test_results/docs/VoiceSIPServerTestMetricsApi.md similarity index 89% rename from test_results_api/docs/VoiceSIPServerTestMetricsApi.md rename to test_results/docs/VoiceSIPServerTestMetricsApi.md index d49d5ea0..52100268 100644 --- a/test_results_api/docs/VoiceSIPServerTestMetricsApi.md +++ b/test_results/docs/VoiceSIPServerTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.VoiceSIPServerTestMetricsApi +# test_results.VoiceSIPServerTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns Voice SIP server test results. It returns data for each agent and each ` ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,20 +36,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.VoiceSIPServerTestMetricsApi(api_client) + api_instance = test_results.VoiceSIPServerTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 SIP server test results @@ -65,6 +64,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -72,7 +72,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/WebFTPServerTestMetricsApi.md b/test_results/docs/WebFTPServerTestMetricsApi.md similarity index 89% rename from test_results_api/docs/WebFTPServerTestMetricsApi.md rename to test_results/docs/WebFTPServerTestMetricsApi.md index 31761790..62e829ba 100644 --- a/test_results_api/docs/WebFTPServerTestMetricsApi.md +++ b/test_results/docs/WebFTPServerTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.WebFTPServerTestMetricsApi +# test_results.WebFTPServerTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns test results for FTP server requests. If you do not specify a window or ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,20 +36,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebFTPServerTestMetricsApi(api_client) + api_instance = test_results.WebFTPServerTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 FTP server test results @@ -65,6 +64,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -72,7 +72,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/WebHTTPServerTestMetricsApi.md b/test_results/docs/WebHTTPServerTestMetricsApi.md similarity index 84% rename from test_results_api/docs/WebHTTPServerTestMetricsApi.md rename to test_results/docs/WebHTTPServerTestMetricsApi.md index d77d7c33..29c4b496 100644 --- a/test_results_api/docs/WebHTTPServerTestMetricsApi.md +++ b/test_results/docs/WebHTTPServerTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.WebHTTPServerTestMetricsApi +# test_results.WebHTTPServerTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,18 +17,17 @@ Returns results for requests made over HTTP. Components include DNS, Connect, Wa ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.expand import Expand -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.expand import Expand +from test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,21 +37,21 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebHTTPServerTestMetricsApi(api_client) + api_instance = test_results.WebHTTPServerTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (optional) - expand = [test_results_api.Expand()] # List[Expand] | This parameter lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + expand = [test_results.Expand()] # List[Expand] | This parameter lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. (optional) try: # Get HTTP server test results @@ -67,6 +66,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -74,7 +74,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. | [optional] ### Return type @@ -91,6 +91,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/WebPageLoadTestMetricsApi.md b/test_results/docs/WebPageLoadTestMetricsApi.md similarity index 88% rename from test_results_api/docs/WebPageLoadTestMetricsApi.md rename to test_results/docs/WebPageLoadTestMetricsApi.md index c65301d1..a909a444 100644 --- a/test_results_api/docs/WebPageLoadTestMetricsApi.md +++ b/test_results/docs/WebPageLoadTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.WebPageLoadTestMetricsApi +# test_results.WebPageLoadTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -18,17 +18,16 @@ Returns results for page load server tests with a focus on page load times and D ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -38,20 +37,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebPageLoadTestMetricsApi(api_client) + api_instance = test_results.WebPageLoadTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 page load server test results @@ -66,6 +65,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -73,7 +73,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -89,6 +89,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -113,17 +114,16 @@ Returns test results for a given agent and round in [HAR (http archive)](http:// ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -133,18 +133,18 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebPageLoadTestMetricsApi(api_client) + api_instance = test_results.WebPageLoadTestMetricsApi(api_client) test_id = '202701' # str | Test ID agent_id = '11' # str | Agent ID round_id = '1384309800' # str | Round ID - aid = '2067' # 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) + 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 @@ -159,6 +159,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -180,6 +181,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results_api/docs/WebTransactionDetailTestResult.md b/test_results/docs/WebTransactionDetailTestResult.md similarity index 85% rename from test_results_api/docs/WebTransactionDetailTestResult.md rename to test_results/docs/WebTransactionDetailTestResult.md index a342e85b..b457c7dd 100644 --- a/test_results_api/docs/WebTransactionDetailTestResult.md +++ b/test_results/docs/WebTransactionDetailTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -18,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.web_transaction_detail_test_result import WebTransactionDetailTestResult +from test_results.models.web_transaction_detail_test_result import WebTransactionDetailTestResult # TODO update the JSON string below json = "{}" # create an instance of WebTransactionDetailTestResult from a JSON string web_transaction_detail_test_result_instance = WebTransactionDetailTestResult.from_json(json) # print the JSON string representation of the object -print WebTransactionDetailTestResult.to_json() +print(WebTransactionDetailTestResult.to_json()) # convert the object into a dict web_transaction_detail_test_result_dict = web_transaction_detail_test_result_instance.to_dict() # create an instance of WebTransactionDetailTestResult from a dict -web_transaction_detail_test_result_form_dict = web_transaction_detail_test_result.from_dict(web_transaction_detail_test_result_dict) +web_transaction_detail_test_result_from_dict = WebTransactionDetailTestResult.from_dict(web_transaction_detail_test_result_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/test_results_api/docs/WebTransactionDetailTestResults.md b/test_results/docs/WebTransactionDetailTestResults.md similarity index 77% rename from test_results_api/docs/WebTransactionDetailTestResults.md rename to test_results/docs/WebTransactionDetailTestResults.md index dd71247c..d7b03706 100644 --- a/test_results_api/docs/WebTransactionDetailTestResults.md +++ b/test_results/docs/WebTransactionDetailTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[WebTransactionDetailTestResult]**](WebTransactionDetailTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.web_transaction_detail_test_results import WebTransactionDetailTestResults +from test_results.models.web_transaction_detail_test_results import WebTransactionDetailTestResults # TODO update the JSON string below json = "{}" # create an instance of WebTransactionDetailTestResults from a JSON string web_transaction_detail_test_results_instance = WebTransactionDetailTestResults.from_json(json) # print the JSON string representation of the object -print WebTransactionDetailTestResults.to_json() +print(WebTransactionDetailTestResults.to_json()) # convert the object into a dict web_transaction_detail_test_results_dict = web_transaction_detail_test_results_instance.to_dict() # create an instance of WebTransactionDetailTestResults from a dict -web_transaction_detail_test_results_form_dict = web_transaction_detail_test_results.from_dict(web_transaction_detail_test_results_dict) +web_transaction_detail_test_results_from_dict = WebTransactionDetailTestResults.from_dict(web_transaction_detail_test_results_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/test_results_api/docs/WebTransactionPageDetailTestResult.md b/test_results/docs/WebTransactionPageDetailTestResult.md similarity index 85% rename from test_results_api/docs/WebTransactionPageDetailTestResult.md rename to test_results/docs/WebTransactionPageDetailTestResult.md index 8f75b505..b5ec734c 100644 --- a/test_results_api/docs/WebTransactionPageDetailTestResult.md +++ b/test_results/docs/WebTransactionPageDetailTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -19,19 +20,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult +from test_results.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult # TODO update the JSON string below json = "{}" # create an instance of WebTransactionPageDetailTestResult from a JSON string web_transaction_page_detail_test_result_instance = WebTransactionPageDetailTestResult.from_json(json) # print the JSON string representation of the object -print WebTransactionPageDetailTestResult.to_json() +print(WebTransactionPageDetailTestResult.to_json()) # convert the object into a dict web_transaction_page_detail_test_result_dict = web_transaction_page_detail_test_result_instance.to_dict() # create an instance of WebTransactionPageDetailTestResult from a dict -web_transaction_page_detail_test_result_form_dict = web_transaction_page_detail_test_result.from_dict(web_transaction_page_detail_test_result_dict) +web_transaction_page_detail_test_result_from_dict = WebTransactionPageDetailTestResult.from_dict(web_transaction_page_detail_test_result_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/test_results_api/docs/WebTransactionPageDetailTestResults.md b/test_results/docs/WebTransactionPageDetailTestResults.md similarity index 76% rename from test_results_api/docs/WebTransactionPageDetailTestResults.md rename to test_results/docs/WebTransactionPageDetailTestResults.md index 43c212e7..d1cb850a 100644 --- a/test_results_api/docs/WebTransactionPageDetailTestResults.md +++ b/test_results/docs/WebTransactionPageDetailTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[WebTransactionPageDetailTestResult]**](WebTransactionPageDetailTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults +from test_results.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults # TODO update the JSON string below json = "{}" # create an instance of WebTransactionPageDetailTestResults from a JSON string web_transaction_page_detail_test_results_instance = WebTransactionPageDetailTestResults.from_json(json) # print the JSON string representation of the object -print WebTransactionPageDetailTestResults.to_json() +print(WebTransactionPageDetailTestResults.to_json()) # convert the object into a dict web_transaction_page_detail_test_results_dict = web_transaction_page_detail_test_results_instance.to_dict() # create an instance of WebTransactionPageDetailTestResults from a dict -web_transaction_page_detail_test_results_form_dict = web_transaction_page_detail_test_results.from_dict(web_transaction_page_detail_test_results_dict) +web_transaction_page_detail_test_results_from_dict = WebTransactionPageDetailTestResults.from_dict(web_transaction_page_detail_test_results_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/test_results_api/docs/WebTransactionTestResult.md b/test_results/docs/WebTransactionTestResult.md similarity index 86% rename from test_results_api/docs/WebTransactionTestResult.md rename to test_results/docs/WebTransactionTestResult.md index f03f08a2..21b140c9 100644 --- a/test_results_api/docs/WebTransactionTestResult.md +++ b/test_results/docs/WebTransactionTestResult.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.web_transaction_test_result import WebTransactionTestResult +from test_results.models.web_transaction_test_result import WebTransactionTestResult # TODO update the JSON string below json = "{}" # create an instance of WebTransactionTestResult from a JSON string web_transaction_test_result_instance = WebTransactionTestResult.from_json(json) # print the JSON string representation of the object -print WebTransactionTestResult.to_json() +print(WebTransactionTestResult.to_json()) # convert the object into a dict web_transaction_test_result_dict = web_transaction_test_result_instance.to_dict() # create an instance of WebTransactionTestResult from a dict -web_transaction_test_result_form_dict = web_transaction_test_result.from_dict(web_transaction_test_result_dict) +web_transaction_test_result_from_dict = WebTransactionTestResult.from_dict(web_transaction_test_result_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/test_results_api/docs/WebTransactionTestResults.md b/test_results/docs/WebTransactionTestResults.md similarity index 78% rename from test_results_api/docs/WebTransactionTestResults.md rename to test_results/docs/WebTransactionTestResults.md index fcca3591..22e0d444 100644 --- a/test_results_api/docs/WebTransactionTestResults.md +++ b/test_results/docs/WebTransactionTestResults.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[WebTransactionTestResult]**](WebTransactionTestResult.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from test_results_api.models.web_transaction_test_results import WebTransactionTestResults +from test_results.models.web_transaction_test_results import WebTransactionTestResults # TODO update the JSON string below json = "{}" # create an instance of WebTransactionTestResults from a JSON string web_transaction_test_results_instance = WebTransactionTestResults.from_json(json) # print the JSON string representation of the object -print WebTransactionTestResults.to_json() +print(WebTransactionTestResults.to_json()) # convert the object into a dict web_transaction_test_results_dict = web_transaction_test_results_instance.to_dict() # create an instance of WebTransactionTestResults from a dict -web_transaction_test_results_form_dict = web_transaction_test_results.from_dict(web_transaction_test_results_dict) +web_transaction_test_results_from_dict = WebTransactionTestResults.from_dict(web_transaction_test_results_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/test_results_api/docs/WebTransactionsTestMetricsApi.md b/test_results/docs/WebTransactionsTestMetricsApi.md similarity index 88% rename from test_results_api/docs/WebTransactionsTestMetricsApi.md rename to test_results/docs/WebTransactionsTestMetricsApi.md index a736bf68..bd3e0d15 100644 --- a/test_results_api/docs/WebTransactionsTestMetricsApi.md +++ b/test_results/docs/WebTransactionsTestMetricsApi.md @@ -1,4 +1,4 @@ -# test_results_api.WebTransactionsTestMetricsApi +# test_results.WebTransactionsTestMetricsApi All URIs are relative to *https://api.thousandeyes.com* @@ -19,17 +19,16 @@ Returns test results for web transactions. If you do not specify a window or a s ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -39,20 +38,20 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebTransactionsTestMetricsApi(api_client) + api_instance = test_results.WebTransactionsTestMetricsApi(api_client) test_id = '202701' # str | Test ID - aid = '2067' # 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) + 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 `_links` instead of this parameter. (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 web transactions test results @@ -67,6 +66,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -74,7 +74,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] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `_links` instead of this parameter. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] ### Return type @@ -90,6 +90,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -114,17 +115,16 @@ Returns test results for web transactions for a given agent and round. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -134,18 +134,18 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebTransactionsTestMetricsApi(api_client) + api_instance = test_results.WebTransactionsTestMetricsApi(api_client) test_id = '202701' # str | Test ID agent_id = '11' # str | Agent ID round_id = '1384309800' # str | Round ID - aid = '2067' # 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) + 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 @@ -160,6 +160,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -181,6 +182,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -205,17 +207,16 @@ Returns a page of web transaction test results for an agent and round. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response -from test_results_api.rest import ApiException +import test_results +from test_results.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response +from 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 = test_results_api.Configuration( +configuration = test_results.Configuration( host = "https://api.thousandeyes.com" ) @@ -225,19 +226,19 @@ configuration = test_results_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = test_results_api.Configuration( +configuration = test_results.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: +with test_results.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = test_results_api.WebTransactionsTestMetricsApi(api_client) + api_instance = 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 = '2067' # 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) + 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 @@ -252,6 +253,7 @@ with test_results_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| Test ID | @@ -274,6 +276,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/test_results/pyproject.toml b/test_results/pyproject.toml new file mode 100644 index 00000000..e1232644 --- /dev/null +++ b/test_results/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "test_results" +version = "1.0.0" +description = "Test Results API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Test Results API"] +include = ["test_results/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "test_results", + #"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/tests_api/requirements.txt b/test_results/requirements.txt similarity index 100% rename from tests_api/requirements.txt rename to test_results/requirements.txt diff --git a/tests_api/setup.cfg b/test_results/setup.cfg similarity index 100% rename from tests_api/setup.cfg rename to test_results/setup.cfg diff --git a/test_results/setup.py b/test_results/setup.py new file mode 100644 index 00000000..b37e2a41 --- /dev/null +++ b/test_results/setup.py @@ -0,0 +1,49 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "test-results" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Test Results API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/test_results", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Test Results API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + Get test result metrics for Cloud and Enterprise Agent tests. + """, # noqa: E501 + package_data={"test_results": ["py.typed"]}, +) diff --git a/test_results/test-requirements.txt b/test_results/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/test_results/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/tests_api/test/__init__.py b/test_results/test/__init__.py similarity index 100% rename from tests_api/test/__init__.py rename to test_results/test/__init__.py diff --git a/test_results/test/test_agent.py b/test_results/test/test_agent.py new file mode 100644 index 00000000..5094e6dc --- /dev/null +++ b/test_results/test/test_agent.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.agent import Agent + +class TestAgent(unittest.TestCase): + """Agent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Agent: + """Test Agent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Agent` + """ + model = Agent() + if include_optional: + return Agent( + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + country_id = 'US', + location = 'San Francisco Bay Area' + ) + else: + return Agent( + ) + """ + + def testAgent(self): + """Test Agent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_app_links.py b/test_results/test/test_app_links.py new file mode 100644 index 00000000..b716198e --- /dev/null +++ b/test_results/test/test_app_links.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.app_links import AppLinks + +class TestAppLinks(unittest.TestCase): + """AppLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppLinks: + """Test AppLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppLinks` + """ + model = AppLinks() + if include_optional: + return AppLinks( + links = test_results.models.app_links__links.AppLinks__links( + app_link = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return AppLinks( + ) + """ + + def testAppLinks(self): + """Test AppLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_app_links_links.py b/test_results/test/test_app_links_links.py new file mode 100644 index 00000000..d61e4085 --- /dev/null +++ b/test_results/test/test_app_links_links.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.app_links_links import AppLinksLinks + +class TestAppLinksLinks(unittest.TestCase): + """AppLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppLinksLinks: + """Test AppLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppLinksLinks` + """ + model = AppLinksLinks() + if include_optional: + return AppLinksLinks( + app_link = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return AppLinksLinks( + ) + """ + + def testAppLinksLinks(self): + """Test AppLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_bgp_basic_test_result.py b/test_results/test/test_bgp_basic_test_result.py similarity index 89% rename from test_results_api/test/test_bgp_basic_test_result.py rename to test_results/test/test_bgp_basic_test_result.py index 199aac33..65ab6a79 100644 --- a/test_results_api/test/test_bgp_basic_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.bgp_basic_test_result import BgpBasicTestResult +from test_results.models.bgp_basic_test_result import BgpBasicTestResult class TestBgpBasicTestResult(unittest.TestCase): """BgpBasicTestResult unit test stubs""" @@ -39,7 +38,7 @@ class TestBgpBasicTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - monitor = test_results_api.models.monitor.Monitor( + monitor = test_results.models.monitor.Monitor( monitor_id = '281474976710706', monitor_name = 'Vancouver, Canada - Bell Canada (AS 6539)', country_id = 'US', ), diff --git a/test_results_api/test/test_bgp_hop.py b/test_results/test/test_bgp_hop.py similarity index 91% rename from test_results_api/test/test_bgp_hop.py rename to test_results/test/test_bgp_hop.py index 03dc5060..5c326c9e 100644 --- a/test_results_api/test/test_bgp_hop.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.bgp_hop import BgpHop +from test_results.models.bgp_hop import BgpHop class TestBgpHop(unittest.TestCase): """BgpHop unit test stubs""" diff --git a/test_results_api/test/test_bgp_test_result.py b/test_results/test/test_bgp_test_result.py similarity index 87% rename from test_results_api/test/test_bgp_test_result.py rename to test_results/test/test_bgp_test_result.py index 62c2c474..97f78711 100644 --- a/test_results_api/test/test_bgp_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.bgp_test_result import BgpTestResult +from test_results.models.bgp_test_result import BgpTestResult class TestBgpTestResult(unittest.TestCase): """BgpTestResult unit test stubs""" @@ -39,12 +38,14 @@ class TestBgpTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - monitor = test_results_api.models.monitor.Monitor( + monitor = test_results.models.monitor.Monitor( monitor_id = '281474976710706', monitor_name = 'Vancouver, Canada - Bell Canada (AS 6539)', country_id = 'US', ), prefix_id = '215', prefix = '99.128.0.0/11', + start_time = 1384309800, + end_time = 1384309800, updates = 0.0, path_changes = 0.0, reachability = 0.0 diff --git a/test_results_api/test/test_bgp_test_results.py b/test_results/test/test_bgp_test_results.py similarity index 88% rename from test_results_api/test/test_bgp_test_results.py rename to test_results/test/test_bgp_test_results.py index 73be8b30..c2191dde 100644 --- a/test_results_api/test/test_bgp_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.bgp_test_results import BgpTestResults +from test_results.models.bgp_test_results import BgpTestResults class TestBgpTestResults(unittest.TestCase): """BgpTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestBgpTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return BgpTestResults( diff --git a/test_results_api/test/test_bgp_test_route_information_result.py b/test_results/test/test_bgp_test_route_information_result.py similarity index 87% rename from test_results_api/test/test_bgp_test_route_information_result.py rename to test_results/test/test_bgp_test_route_information_result.py index 5bdac4aa..7c014a4e 100644 --- a/test_results_api/test/test_bgp_test_route_information_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.bgp_test_route_information_result import BgpTestRouteInformationResult +from test_results.models.bgp_test_route_information_result import BgpTestRouteInformationResult class TestBgpTestRouteInformationResult(unittest.TestCase): """BgpTestRouteInformationResult unit test stubs""" @@ -39,7 +38,7 @@ class TestBgpTestRouteInformationResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - monitor = test_results_api.models.monitor.Monitor( + monitor = test_results.models.monitor.Monitor( monitor_id = '281474976710706', monitor_name = 'Vancouver, Canada - Bell Canada (AS 6539)', country_id = 'US', ), @@ -47,7 +46,7 @@ class TestBgpTestRouteInformationResult(unittest.TestCase): prefix = '99.128.0.0/11', is_active = True, hops = [ - test_results_api.models.bgp_hop.BgpHop( + test_results.models.bgp_hop.BgpHop( asn = 852, as_name = 'Telus Advanced Communications', ) ] diff --git a/test_results_api/test/test_bgp_test_route_information_results.py b/test_results/test/test_bgp_test_route_information_results.py similarity index 88% rename from test_results_api/test/test_bgp_test_route_information_results.py rename to test_results/test/test_bgp_test_route_information_results.py index 5ed1421e..8d78e794 100644 --- a/test_results_api/test/test_bgp_test_route_information_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.bgp_test_route_information_results import BgpTestRouteInformationResults +from test_results.models.bgp_test_route_information_results import BgpTestRouteInformationResults class TestBgpTestRouteInformationResults(unittest.TestCase): """BgpTestRouteInformationResults unit test stubs""" @@ -39,7 +38,7 @@ class TestBgpTestRouteInformationResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return BgpTestRouteInformationResults( diff --git a/test_results_api/test/test_dns_server_test_result.py b/test_results/test/test_dns_server_test_result.py similarity index 87% rename from test_results_api/test/test_dns_server_test_result.py rename to test_results/test/test_dns_server_test_result.py index 40a14980..dc44a00c 100644 --- a/test_results_api/test/test_dns_server_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dns_server_test_result import DnsServerTestResult +from test_results.models.dns_server_test_result import DnsServerTestResult class TestDnsServerTestResult(unittest.TestCase): """DnsServerTestResult unit test stubs""" @@ -41,10 +40,11 @@ class TestDnsServerTestResult(unittest.TestCase): links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, start_time = 1384309800, end_time = 1384309800, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), server_id = '456', server = 'a1.verisigndns.com.', resolution_time = 3, diff --git a/test_results_api/test/test_dns_server_test_results.py b/test_results/test/test_dns_server_test_results.py similarity index 88% rename from test_results_api/test/test_dns_server_test_results.py rename to test_results/test/test_dns_server_test_results.py index 3c4a251f..f9427291 100644 --- a/test_results_api/test/test_dns_server_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dns_server_test_results import DnsServerTestResults +from test_results.models.dns_server_test_results import DnsServerTestResults class TestDnsServerTestResults(unittest.TestCase): """DnsServerTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestDnsServerTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return DnsServerTestResults( diff --git a/test_results_api/test/test_dns_trace_test_result.py b/test_results/test/test_dns_trace_test_result.py similarity index 91% rename from test_results_api/test/test_dns_trace_test_result.py rename to test_results/test/test_dns_trace_test_result.py index 46d90923..c16c8302 100644 --- a/test_results_api/test/test_dns_trace_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dns_trace_test_result import DnsTraceTestResult +from test_results.models.dns_trace_test_result import DnsTraceTestResult class TestDnsTraceTestResult(unittest.TestCase): """DnsTraceTestResult unit test stubs""" @@ -41,10 +40,11 @@ class TestDnsTraceTestResult(unittest.TestCase): links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, start_time = 1384309800, end_time = 1384309800, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), output = 'com. 172800 IN NS a.gtld-servers.net. com. 172800 IN NS f.gtld-servers.net. com. 172800 IN NS c.gtld-servers.net. diff --git a/test_results_api/test/test_dns_trace_test_results.py b/test_results/test/test_dns_trace_test_results.py similarity index 88% rename from test_results_api/test/test_dns_trace_test_results.py rename to test_results/test/test_dns_trace_test_results.py index 7b83dbaf..898702a3 100644 --- a/test_results_api/test/test_dns_trace_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dns_trace_test_results import DnsTraceTestResults +from test_results.models.dns_trace_test_results import DnsTraceTestResults class TestDnsTraceTestResults(unittest.TestCase): """DnsTraceTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestDnsTraceTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return DnsTraceTestResults( diff --git a/test_results_api/test/test_dnssec_test_result.py b/test_results/test/test_dnssec_test_result.py similarity index 86% rename from test_results_api/test/test_dnssec_test_result.py rename to test_results/test/test_dnssec_test_result.py index f86c2995..e1fe4fb3 100644 --- a/test_results_api/test/test_dnssec_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dnssec_test_result import DnssecTestResult +from test_results.models.dnssec_test_result import DnssecTestResult class TestDnssecTestResult(unittest.TestCase): """DnssecTestResult unit test stubs""" @@ -41,10 +40,11 @@ class TestDnssecTestResult(unittest.TestCase): links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, start_time = 1384309800, end_time = 1384309800, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), is_valid = True, error_details = 'Connection error' ) diff --git a/test_results_api/test/test_dnssec_test_results.py b/test_results/test/test_dnssec_test_results.py similarity index 88% rename from test_results_api/test/test_dnssec_test_results.py rename to test_results/test/test_dnssec_test_results.py index eb0bb6a2..cf2aa9fa 100644 --- a/test_results_api/test/test_dnssec_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.dnssec_test_results import DnssecTestResults +from test_results.models.dnssec_test_results import DnssecTestResults class TestDnssecTestResults(unittest.TestCase): """DnssecTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestDnssecTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return DnssecTestResults( diff --git a/test_results_api/test/test_epoch_time_window.py b/test_results/test/test_epoch_time_window.py similarity index 90% rename from test_results_api/test/test_epoch_time_window.py rename to test_results/test/test_epoch_time_window.py index 7cb811f0..84712ea8 100644 --- a/test_results_api/test/test_epoch_time_window.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.epoch_time_window import EpochTimeWindow +from test_results.models.epoch_time_window import EpochTimeWindow class TestEpochTimeWindow(unittest.TestCase): """EpochTimeWindow unit test stubs""" diff --git a/test_results/test/test_error.py b/test_results/test/test_error.py new file mode 100644 index 00000000..fa6b028c --- /dev/null +++ b/test_results/test/test_error.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_expand.py b/test_results/test/test_expand.py new file mode 100644 index 00000000..5307b783 --- /dev/null +++ b/test_results/test/test_expand.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_ftp_server_test_result.py b/test_results/test/test_ftp_server_test_result.py similarity index 85% rename from test_results_api/test/test_ftp_server_test_result.py rename to test_results/test/test_ftp_server_test_result.py index 3c6a9d41..9ba74616 100644 --- a/test_results_api/test/test_ftp_server_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.ftp_server_test_result import FtpServerTestResult +from test_results.models.ftp_server_test_result import FtpServerTestResult class TestFtpServerTestResult(unittest.TestCase): """FtpServerTestResult unit test stubs""" @@ -39,10 +38,13 @@ class TestFtpServerTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + start_time = 1384309800, + end_time = 1384309800, + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), server_ip = '193.2.1.88', response_code = 226, dns_time = 0.589, diff --git a/test_results_api/test/test_ftp_server_test_results.py b/test_results/test/test_ftp_server_test_results.py similarity index 88% rename from test_results_api/test/test_ftp_server_test_results.py rename to test_results/test/test_ftp_server_test_results.py index 3b1d48e8..bbfcd624 100644 --- a/test_results_api/test/test_ftp_server_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.ftp_server_test_results import FtpServerTestResults +from test_results.models.ftp_server_test_results import FtpServerTestResults class TestFtpServerTestResults(unittest.TestCase): """FtpServerTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestFtpServerTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return FtpServerTestResults( diff --git a/test_results_api/test/test_get_test_pathvis_agent_round200_response.py b/test_results/test/test_get_test_pathvis_agent_round200_response.py similarity index 84% rename from test_results_api/test/test_get_test_pathvis_agent_round200_response.py rename to test_results/test/test_get_test_pathvis_agent_round200_response.py index bba87677..cce088d6 100644 --- a/test_results_api/test/test_get_test_pathvis_agent_round200_response.py +++ b/test_results/test/test_get_test_pathvis_agent_round200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response +from test_results.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response class TestGetTestPathvisAgentRound200Response(unittest.TestCase): """GetTestPathvisAgentRound200Response unit test stubs""" @@ -39,9 +38,9 @@ class TestGetTestPathvisAgentRound200Response(unittest.TestCase): results = [ null ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + test = { }, + links = test_results.models.self_links__links.SelfLinks__links( + self = test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/test_results/test/test_get_test_result_dns_server200_response.py b/test_results/test/test_get_test_result_dns_server200_response.py new file mode 100644 index 00000000..e8b5c253 --- /dev/null +++ b/test_results/test/test_get_test_result_dns_server200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response + +class TestGetTestResultDnsServer200Response(unittest.TestCase): + """GetTestResultDnsServer200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultDnsServer200Response: + """Test GetTestResultDnsServer200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultDnsServer200Response` + """ + model = GetTestResultDnsServer200Response() + if include_optional: + return GetTestResultDnsServer200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultDnsServer200Response( + ) + """ + + def testGetTestResultDnsServer200Response(self): + """Test GetTestResultDnsServer200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_dns_trace200_response.py b/test_results/test/test_get_test_result_dns_trace200_response.py new file mode 100644 index 00000000..865ae0b8 --- /dev/null +++ b/test_results/test/test_get_test_result_dns_trace200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response + +class TestGetTestResultDnsTrace200Response(unittest.TestCase): + """GetTestResultDnsTrace200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultDnsTrace200Response: + """Test GetTestResultDnsTrace200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultDnsTrace200Response` + """ + model = GetTestResultDnsTrace200Response() + if include_optional: + return GetTestResultDnsTrace200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultDnsTrace200Response( + ) + """ + + def testGetTestResultDnsTrace200Response(self): + """Test GetTestResultDnsTrace200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_dnssec200_response.py b/test_results/test/test_get_test_result_dnssec200_response.py new file mode 100644 index 00000000..1a831bdd --- /dev/null +++ b/test_results/test/test_get_test_result_dnssec200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response + +class TestGetTestResultDnssec200Response(unittest.TestCase): + """GetTestResultDnssec200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultDnssec200Response: + """Test GetTestResultDnssec200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultDnssec200Response` + """ + model = GetTestResultDnssec200Response() + if include_optional: + return GetTestResultDnssec200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultDnssec200Response( + ) + """ + + def testGetTestResultDnssec200Response(self): + """Test GetTestResultDnssec200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_ftp_server200_response.py b/test_results/test/test_get_test_result_ftp_server200_response.py new file mode 100644 index 00000000..58805a22 --- /dev/null +++ b/test_results/test/test_get_test_result_ftp_server200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response + +class TestGetTestResultFtpServer200Response(unittest.TestCase): + """GetTestResultFtpServer200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultFtpServer200Response: + """Test GetTestResultFtpServer200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultFtpServer200Response` + """ + model = GetTestResultFtpServer200Response() + if include_optional: + return GetTestResultFtpServer200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultFtpServer200Response( + ) + """ + + def testGetTestResultFtpServer200Response(self): + """Test GetTestResultFtpServer200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_http_server200_response.py b/test_results/test/test_get_test_result_http_server200_response.py new file mode 100644 index 00000000..f8a96a27 --- /dev/null +++ b/test_results/test/test_get_test_result_http_server200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response + +class TestGetTestResultHttpServer200Response(unittest.TestCase): + """GetTestResultHttpServer200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultHttpServer200Response: + """Test GetTestResultHttpServer200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultHttpServer200Response` + """ + model = GetTestResultHttpServer200Response() + if include_optional: + return GetTestResultHttpServer200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultHttpServer200Response( + ) + """ + + def testGetTestResultHttpServer200Response(self): + """Test GetTestResultHttpServer200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_metrics200_response.py b/test_results/test/test_get_test_result_metrics200_response.py new file mode 100644 index 00000000..2ba186e2 --- /dev/null +++ b/test_results/test/test_get_test_result_metrics200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_metrics200_response import GetTestResultMetrics200Response + +class TestGetTestResultMetrics200Response(unittest.TestCase): + """GetTestResultMetrics200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultMetrics200Response: + """Test GetTestResultMetrics200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultMetrics200Response` + """ + model = GetTestResultMetrics200Response() + if include_optional: + return GetTestResultMetrics200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultMetrics200Response( + ) + """ + + def testGetTestResultMetrics200Response(self): + """Test GetTestResultMetrics200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_network_path_vis200_response.py b/test_results/test/test_get_test_result_network_path_vis200_response.py new file mode 100644 index 00000000..dca7ed53 --- /dev/null +++ b/test_results/test/test_get_test_result_network_path_vis200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_network_path_vis200_response import GetTestResultNetworkPathVis200Response + +class TestGetTestResultNetworkPathVis200Response(unittest.TestCase): + """GetTestResultNetworkPathVis200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultNetworkPathVis200Response: + """Test GetTestResultNetworkPathVis200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultNetworkPathVis200Response` + """ + model = GetTestResultNetworkPathVis200Response() + if include_optional: + return GetTestResultNetworkPathVis200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultNetworkPathVis200Response( + ) + """ + + def testGetTestResultNetworkPathVis200Response(self): + """Test GetTestResultNetworkPathVis200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_page_load200_response.py b/test_results/test/test_get_test_result_page_load200_response.py new file mode 100644 index 00000000..15355f3e --- /dev/null +++ b/test_results/test/test_get_test_result_page_load200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response + +class TestGetTestResultPageLoad200Response(unittest.TestCase): + """GetTestResultPageLoad200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultPageLoad200Response: + """Test GetTestResultPageLoad200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultPageLoad200Response` + """ + model = GetTestResultPageLoad200Response() + if include_optional: + return GetTestResultPageLoad200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultPageLoad200Response( + ) + """ + + def testGetTestResultPageLoad200Response(self): + """Test GetTestResultPageLoad200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_page_load_component_detail200_response.py b/test_results/test/test_get_test_result_page_load_component_detail200_response.py new file mode 100644 index 00000000..fbf44763 --- /dev/null +++ b/test_results/test/test_get_test_result_page_load_component_detail200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response + +class TestGetTestResultPageLoadComponentDetail200Response(unittest.TestCase): + """GetTestResultPageLoadComponentDetail200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultPageLoadComponentDetail200Response: + """Test GetTestResultPageLoadComponentDetail200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultPageLoadComponentDetail200Response` + """ + model = GetTestResultPageLoadComponentDetail200Response() + if include_optional: + return GetTestResultPageLoadComponentDetail200Response( + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultPageLoadComponentDetail200Response( + ) + """ + + def testGetTestResultPageLoadComponentDetail200Response(self): + """Test GetTestResultPageLoadComponentDetail200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_rtp_stream200_response.py b/test_results/test/test_get_test_result_rtp_stream200_response.py new file mode 100644 index 00000000..4c1ec0ff --- /dev/null +++ b/test_results/test/test_get_test_result_rtp_stream200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response + +class TestGetTestResultRtpStream200Response(unittest.TestCase): + """GetTestResultRtpStream200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultRtpStream200Response: + """Test GetTestResultRtpStream200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultRtpStream200Response` + """ + model = GetTestResultRtpStream200Response() + if include_optional: + return GetTestResultRtpStream200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultRtpStream200Response( + ) + """ + + def testGetTestResultRtpStream200Response(self): + """Test GetTestResultRtpStream200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_sip_server200_response.py b/test_results/test/test_get_test_result_sip_server200_response.py new file mode 100644 index 00000000..8a8a5121 --- /dev/null +++ b/test_results/test/test_get_test_result_sip_server200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response + +class TestGetTestResultSipServer200Response(unittest.TestCase): + """GetTestResultSipServer200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultSipServer200Response: + """Test GetTestResultSipServer200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultSipServer200Response` + """ + model = GetTestResultSipServer200Response() + if include_optional: + return GetTestResultSipServer200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultSipServer200Response( + ) + """ + + def testGetTestResultSipServer200Response(self): + """Test GetTestResultSipServer200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_web_transactions200_response.py b/test_results/test/test_get_test_result_web_transactions200_response.py new file mode 100644 index 00000000..605713d9 --- /dev/null +++ b/test_results/test/test_get_test_result_web_transactions200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response + +class TestGetTestResultWebTransactions200Response(unittest.TestCase): + """GetTestResultWebTransactions200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultWebTransactions200Response: + """Test GetTestResultWebTransactions200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultWebTransactions200Response` + """ + model = GetTestResultWebTransactions200Response() + if include_optional: + return GetTestResultWebTransactions200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultWebTransactions200Response( + ) + """ + + def testGetTestResultWebTransactions200Response(self): + """Test GetTestResultWebTransactions200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_web_transactions_component_detail200_response.py b/test_results/test/test_get_test_result_web_transactions_component_detail200_response.py new file mode 100644 index 00000000..00e05341 --- /dev/null +++ b/test_results/test/test_get_test_result_web_transactions_component_detail200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response + +class TestGetTestResultWebTransactionsComponentDetail200Response(unittest.TestCase): + """GetTestResultWebTransactionsComponentDetail200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultWebTransactionsComponentDetail200Response: + """Test GetTestResultWebTransactionsComponentDetail200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultWebTransactionsComponentDetail200Response` + """ + model = GetTestResultWebTransactionsComponentDetail200Response() + if include_optional: + return GetTestResultWebTransactionsComponentDetail200Response( + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultWebTransactionsComponentDetail200Response( + ) + """ + + def testGetTestResultWebTransactionsComponentDetail200Response(self): + """Test GetTestResultWebTransactionsComponentDetail200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_result_web_transactions_component_page_detail200_response.py b/test_results/test/test_get_test_result_web_transactions_component_page_detail200_response.py new file mode 100644 index 00000000..52fda622 --- /dev/null +++ b/test_results/test/test_get_test_result_web_transactions_component_page_detail200_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response + +class TestGetTestResultWebTransactionsComponentPageDetail200Response(unittest.TestCase): + """GetTestResultWebTransactionsComponentPageDetail200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultWebTransactionsComponentPageDetail200Response: + """Test GetTestResultWebTransactionsComponentPageDetail200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultWebTransactionsComponentPageDetail200Response` + """ + model = GetTestResultWebTransactionsComponentPageDetail200Response() + if include_optional: + return GetTestResultWebTransactionsComponentPageDetail200Response( + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultWebTransactionsComponentPageDetail200Response( + ) + """ + + def testGetTestResultWebTransactionsComponentPageDetail200Response(self): + """Test GetTestResultWebTransactionsComponentPageDetail200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_get_test_results_bgp200_response.py b/test_results/test/test_get_test_results_bgp200_response.py new file mode 100644 index 00000000..141b50a7 --- /dev/null +++ b/test_results/test/test_get_test_results_bgp200_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.get_test_results_bgp200_response import GetTestResultsBgp200Response + +class TestGetTestResultsBgp200Response(unittest.TestCase): + """GetTestResultsBgp200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestResultsBgp200Response: + """Test GetTestResultsBgp200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestResultsBgp200Response` + """ + model = GetTestResultsBgp200Response() + if include_optional: + return GetTestResultsBgp200Response( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z', + results = [ + null + ], + test = { }, + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestResultsBgp200Response( + ) + """ + + def testGetTestResultsBgp200Response(self): + """Test GetTestResultsBgp200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_get_test_results_bgp_prefix200_response.py b/test_results/test/test_get_test_results_bgp_prefix200_response.py similarity index 84% rename from test_results_api/test/test_get_test_results_bgp_prefix200_response.py rename to test_results/test/test_get_test_results_bgp_prefix200_response.py index 60d59fc0..c1989ba7 100644 --- a/test_results_api/test/test_get_test_results_bgp_prefix200_response.py +++ b/test_results/test/test_get_test_results_bgp_prefix200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response +from test_results.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response class TestGetTestResultsBgpPrefix200Response(unittest.TestCase): """GetTestResultsBgpPrefix200Response unit test stubs""" @@ -39,9 +38,9 @@ class TestGetTestResultsBgpPrefix200Response(unittest.TestCase): results = [ null ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( + test = { }, + links = test_results.models.self_links__links.SelfLinks__links( + self = test_results.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/test_results/test/test_http_test_result.py b/test_results/test/test_http_test_result.py new file mode 100644 index 00000000..672c5806 --- /dev/null +++ b/test_results/test/test_http_test_result.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.http_test_result import HttpTestResult + +class TestHttpTestResult(unittest.TestCase): + """HttpTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpTestResult: + """Test HttpTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpTestResult` + """ + model = HttpTestResult() + if include_optional: + return HttpTestResult( + var_date = '2022-07-17T22:00:54Z', + round_id = 1384309800, + links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + start_time = 1384309800, + end_time = 1384309800, + agent = test_results.models.agent.Agent( + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + country_id = 'US', + location = 'San Francisco Bay Area', ), + server_ip = '193.2.1.88', + response_code = 200, + num_redirects = 0, + redirect_time = 10, + dns_time = 0, + ssl_time = 9, + connect_time = 2, + wait_time = 3, + receive_time = 1, + wire_size = 9993, + response_time = 14, + throughput = 123, + total_time = 15, + headers = test_results.models.http_test_result_headers.HttpTestResultHeaders( + request_headers = 'GET / HTTP/1.1 +Host: www.thousandeyes.com +User-Agent: curl/7.58.0-DEV +Accept: */* +Accept-Encoding: deflate, gzip +X-ThousandEyes-Agent: yes +', + response_headers = 'HTTP/1.1 200 OK +Content-Type: text/html;charset=UTF-8 +Content-Length: 9993 +Connection: keep-alive +Date: Mon, 04 May 2020 16:13:00 GMT +Server: Apache +Content-Language: en-US +Content-Encoding: gzip +X-Frame-Options: sameorigin +Cache-Control: max-age=600, must-revalidate +Strict-Transport-Security: max-age=31536000 +X-Content-Type-Options: nosniff +X-XSS-Protection: 1; mode=block +Vary: Accept-Encoding +X-Cache: Hit from cloudfront +Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) +X-Amz-Cf-Pop: SFO5-C3 +X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== +Age: 132 +', ), + error_type = 'None', + error_details = 'Connection error', + ssl_cipher = '', + ssl_version = 'TLSv1.3', + ssl_certificates = [ + test_results.models.ssl_cert.SslCert( + days_until_expiry = 56, + is_fetch_date_in_valid_cert_date_range = True, + has_valid_signing_cert = False, + issuer_name = 'DigiCert SHA2 Extended Validation Server CA', + valid_before = '2020-05-12T12:00Z', + valid_after = '2018-03-27T00:00Z', + subject_alternative_names = ["www.thousandeyes.com","thousandeyes.com"], + subject_name = 'www.thousandeyes.com', ) + ] + ) + else: + return HttpTestResult( + ) + """ + + def testHttpTestResult(self): + """Test HttpTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_http_test_result_headers.py b/test_results/test/test_http_test_result_headers.py new file mode 100644 index 00000000..1b39fb15 --- /dev/null +++ b/test_results/test/test_http_test_result_headers.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.http_test_result_headers import HttpTestResultHeaders + +class TestHttpTestResultHeaders(unittest.TestCase): + """HttpTestResultHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpTestResultHeaders: + """Test HttpTestResultHeaders + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpTestResultHeaders` + """ + model = HttpTestResultHeaders() + if include_optional: + return HttpTestResultHeaders( + request_headers = 'GET / HTTP/1.1 +Host: www.thousandeyes.com +User-Agent: curl/7.58.0-DEV +Accept: */* +Accept-Encoding: deflate, gzip +X-ThousandEyes-Agent: yes +', + response_headers = 'HTTP/1.1 200 OK +Content-Type: text/html;charset=UTF-8 +Content-Length: 9993 +Connection: keep-alive +Date: Mon, 04 May 2020 16:13:00 GMT +Server: Apache +Content-Language: en-US +Content-Encoding: gzip +X-Frame-Options: sameorigin +Cache-Control: max-age=600, must-revalidate +Strict-Transport-Security: max-age=31536000 +X-Content-Type-Options: nosniff +X-XSS-Protection: 1; mode=block +Vary: Accept-Encoding +X-Cache: Hit from cloudfront +Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) +X-Amz-Cf-Pop: SFO5-C3 +X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== +Age: 132 +' + ) + else: + return HttpTestResultHeaders( + ) + """ + + def testHttpTestResultHeaders(self): + """Test HttpTestResultHeaders""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_http_test_results.py b/test_results/test/test_http_test_results.py new file mode 100644 index 00000000..87401b73 --- /dev/null +++ b/test_results/test/test_http_test_results.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.http_test_results import HttpTestResults + +class TestHttpTestResults(unittest.TestCase): + """HttpTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpTestResults: + """Test HttpTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpTestResults` + """ + model = HttpTestResults() + if include_optional: + return HttpTestResults( + results = [ + null + ], + test = { } + ) + else: + return HttpTestResults( + ) + """ + + def testHttpTestResults(self): + """Test HttpTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_link.py b/test_results/test/test_link.py new file mode 100644 index 00000000..2259e556 --- /dev/null +++ b/test_results/test/test_link.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_marker.py b/test_results/test/test_marker.py similarity index 91% rename from test_results_api/test/test_marker.py rename to test_results/test/test_marker.py index 16c6da33..2eb336d3 100644 --- a/test_results_api/test/test_marker.py +++ b/test_results/test/test_marker.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.marker import Marker +from test_results.models.marker import Marker class TestMarker(unittest.TestCase): """Marker unit test stubs""" diff --git a/test_results/test/test_monitor.py b/test_results/test/test_monitor.py new file mode 100644 index 00000000..7cfff9b6 --- /dev/null +++ b/test_results/test/test_monitor.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.monitor import Monitor + +class TestMonitor(unittest.TestCase): + """Monitor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Monitor: + """Test Monitor + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Monitor` + """ + model = Monitor() + if include_optional: + return Monitor( + monitor_id = '281474976710706', + monitor_name = 'Vancouver, Canada - Bell Canada (AS 6539)', + country_id = 'US' + ) + else: + return Monitor( + ) + """ + + def testMonitor(self): + """Test Monitor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_network_test_result.py b/test_results/test/test_network_test_result.py new file mode 100644 index 00000000..6aafdac9 --- /dev/null +++ b/test_results/test/test_network_test_result.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.network_test_result import NetworkTestResult + +class TestNetworkTestResult(unittest.TestCase): + """NetworkTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkTestResult: + """Test NetworkTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkTestResult` + """ + model = NetworkTestResult() + if include_optional: + return NetworkTestResult( + var_date = '2022-07-17T22:00:54Z', + round_id = 1384309800, + links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + start_time = 1384309800, + end_time = 1384309800, + available_bandwidth = 9.100464, + avg_latency = 167.04, + bandwidth = 4.3313155, + capacity = 210.10854, + jitter = 0.076808, + loss = 0.0, + max_latency = 168.0, + min_latency = 167.0, + packets_by_second = [[],[0],[2],[2,1],[1,1]], + agent = test_results.models.agent.Agent( + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + country_id = 'US', + location = 'San Francisco Bay Area', ), + server_ip = '50.18.127.223', + server = 'www.thousandeyes.com:80', + direction = 'to-target' + ) + else: + return NetworkTestResult( + ) + """ + + def testNetworkTestResult(self): + """Test NetworkTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_network_test_results.py b/test_results/test/test_network_test_results.py new file mode 100644 index 00000000..5eff5252 --- /dev/null +++ b/test_results/test/test_network_test_results.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.network_test_results import NetworkTestResults + +class TestNetworkTestResults(unittest.TestCase): + """NetworkTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NetworkTestResults: + """Test NetworkTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NetworkTestResults` + """ + model = NetworkTestResults() + if include_optional: + return NetworkTestResults( + results = [ + null + ], + test = { } + ) + else: + return NetworkTestResults( + ) + """ + + def testNetworkTestResults(self): + """Test NetworkTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_page.py b/test_results/test/test_page.py similarity index 92% rename from test_results_api/test/test_page.py rename to test_results/test/test_page.py index 66012e86..183c4ee4 100644 --- a/test_results_api/test/test_page.py +++ b/test_results/test/test_page.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.page import Page +from test_results.models.page import Page class TestPage(unittest.TestCase): """Page unit test stubs""" diff --git a/test_results_api/test/test_page_load_detail_test_result.py b/test_results/test/test_page_load_detail_test_result.py similarity index 95% rename from test_results_api/test/test_page_load_detail_test_result.py rename to test_results/test/test_page_load_detail_test_result.py index 25824dad..cfcb6303 100644 --- a/test_results_api/test/test_page_load_detail_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.page_load_detail_test_result import PageLoadDetailTestResult +from test_results.models.page_load_detail_test_result import PageLoadDetailTestResult class TestPageLoadDetailTestResult(unittest.TestCase): """PageLoadDetailTestResult unit test stubs""" @@ -39,10 +38,11 @@ class TestPageLoadDetailTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), response_time = 34.35, total_size = 403301, num_objects = 17, diff --git a/test_results_api/test/test_page_load_detail_test_results.py b/test_results/test/test_page_load_detail_test_results.py similarity index 88% rename from test_results_api/test/test_page_load_detail_test_results.py rename to test_results/test/test_page_load_detail_test_results.py index 3d0595a1..5b810a8a 100644 --- a/test_results_api/test/test_page_load_detail_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.page_load_detail_test_results import PageLoadDetailTestResults +from test_results.models.page_load_detail_test_results import PageLoadDetailTestResults class TestPageLoadDetailTestResults(unittest.TestCase): """PageLoadDetailTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestPageLoadDetailTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return PageLoadDetailTestResults( diff --git a/test_results_api/test/test_page_load_test_result.py b/test_results/test/test_page_load_test_result.py similarity index 86% rename from test_results_api/test/test_page_load_test_result.py rename to test_results/test/test_page_load_test_result.py index 530b6579..3ff02e27 100644 --- a/test_results_api/test/test_page_load_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.page_load_test_result import PageLoadTestResult +from test_results.models.page_load_test_result import PageLoadTestResult class TestPageLoadTestResult(unittest.TestCase): """PageLoadTestResult unit test stubs""" @@ -39,10 +38,11 @@ class TestPageLoadTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), response_time = 34.35, total_size = 403301, num_objects = 17, diff --git a/test_results_api/test/test_page_load_test_results.py b/test_results/test/test_page_load_test_results.py similarity index 88% rename from test_results_api/test/test_page_load_test_results.py rename to test_results/test/test_page_load_test_results.py index 91bbcdde..b634f5d1 100644 --- a/test_results_api/test/test_page_load_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.page_load_test_results import PageLoadTestResults +from test_results.models.page_load_test_results import PageLoadTestResults class TestPageLoadTestResults(unittest.TestCase): """PageLoadTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestPageLoadTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return PageLoadTestResults( diff --git a/test_results/test/test_pagination_links.py b/test_results/test/test_pagination_links.py new file mode 100644 index 00000000..9d2542e4 --- /dev/null +++ b/test_results/test/test_pagination_links.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.pagination_links import PaginationLinks + +class TestPaginationLinks(unittest.TestCase): + """PaginationLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinks: + """Test PaginationLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinks` + """ + model = PaginationLinks() + if include_optional: + return PaginationLinks( + links = test_results.models.pagination_links__links.PaginationLinks__links( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return PaginationLinks( + ) + """ + + def testPaginationLinks(self): + """Test PaginationLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_pagination_links_links.py b/test_results/test/test_pagination_links_links.py new file mode 100644 index 00000000..269b9b96 --- /dev/null +++ b/test_results/test/test_pagination_links_links.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.pagination_links_links import PaginationLinksLinks + +class TestPaginationLinksLinks(unittest.TestCase): + """PaginationLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinksLinks: + """Test PaginationLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinksLinks` + """ + model = PaginationLinksLinks() + if include_optional: + return PaginationLinksLinks( + previous = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationLinksLinks( + ) + """ + + def testPaginationLinksLinks(self): + """Test PaginationLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_base_test_result.py b/test_results/test/test_path_vis_base_test_result.py new file mode 100644 index 00000000..8ebe3c25 --- /dev/null +++ b/test_results/test/test_path_vis_base_test_result.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_base_test_result import PathVisBaseTestResult + +class TestPathVisBaseTestResult(unittest.TestCase): + """PathVisBaseTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisBaseTestResult: + """Test PathVisBaseTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisBaseTestResult` + """ + model = PathVisBaseTestResult() + if include_optional: + return PathVisBaseTestResult( + var_date = '2022-07-17T22:00:54Z', + round_id = 1384309800, + links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + start_time = 1384309800, + end_time = 1384309800, + agent = test_results.models.agent.Agent( + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + country_id = 'US', + location = 'San Francisco Bay Area', ), + server = 'www.google.com:443', + server_ip = '172.217.170.68', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + target_is_proxy = True, + direction = 'to-target' + ) + else: + return PathVisBaseTestResult( + ) + """ + + def testPathVisBaseTestResult(self): + """Test PathVisBaseTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_detail_test_result.py b/test_results/test/test_path_vis_detail_test_result.py new file mode 100644 index 00000000..a6da82b1 --- /dev/null +++ b/test_results/test/test_path_vis_detail_test_result.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_detail_test_result import PathVisDetailTestResult + +class TestPathVisDetailTestResult(unittest.TestCase): + """PathVisDetailTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDetailTestResult: + """Test PathVisDetailTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDetailTestResult` + """ + model = PathVisDetailTestResult() + if include_optional: + return PathVisDetailTestResult( + var_date = '2022-07-17T22:00:54Z', + round_id = 1384309800, + links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + start_time = 1384309800, + end_time = 1384309800, + agent = test_results.models.agent.Agent( + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + country_id = 'US', + location = 'San Francisco Bay Area', ), + server = 'www.google.com:443', + server_ip = '172.217.170.68', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + target_is_proxy = True, + direction = 'to-target', + path_traces = [ + test_results.models.path_vis_route.PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + test_results.models.path_vis_hop.PathVisHop( + hop = 1, + ip_address = '196.40.106.237', + prefix = '196.40.96.0/20', + rdns = 'core-router1.cpt2.host-h.net', + network = 'HETZNER (Pty) Ltd (AS 37153)', + response_time = 1, + location = 'Cape Town, South Africa', + mpls = '', ) + ], ) + ] + ) + else: + return PathVisDetailTestResult( + ) + """ + + def testPathVisDetailTestResult(self): + """Test PathVisDetailTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_detail_test_results.py b/test_results/test/test_path_vis_detail_test_results.py new file mode 100644 index 00000000..c98035db --- /dev/null +++ b/test_results/test/test_path_vis_detail_test_results.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_detail_test_results import PathVisDetailTestResults + +class TestPathVisDetailTestResults(unittest.TestCase): + """PathVisDetailTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisDetailTestResults: + """Test PathVisDetailTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisDetailTestResults` + """ + model = PathVisDetailTestResults() + if include_optional: + return PathVisDetailTestResults( + results = [ + null + ], + test = { } + ) + else: + return PathVisDetailTestResults( + ) + """ + + def testPathVisDetailTestResults(self): + """Test PathVisDetailTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_direction.py b/test_results/test/test_path_vis_direction.py new file mode 100644 index 00000000..008ed6d6 --- /dev/null +++ b/test_results/test/test_path_vis_direction.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_direction import PathVisDirection + +class TestPathVisDirection(unittest.TestCase): + """PathVisDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPathVisDirection(self): + """Test PathVisDirection""" + # inst = PathVisDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_endpoint.py b/test_results/test/test_path_vis_endpoint.py new file mode 100644 index 00000000..036a1f17 --- /dev/null +++ b/test_results/test/test_path_vis_endpoint.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_endpoint import PathVisEndpoint + +class TestPathVisEndpoint(unittest.TestCase): + """PathVisEndpoint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisEndpoint: + """Test PathVisEndpoint + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisEndpoint` + """ + model = PathVisEndpoint() + if include_optional: + return PathVisEndpoint( + ip_address = '196.40.106.237', + mss = 1460, + number_of_hops = 15, + path_id = '1230899668701775614109128428722974545787322404682781961521', + path_mtu = 1500, + response_time = 1500 + ) + else: + return PathVisEndpoint( + ) + """ + + def testPathVisEndpoint(self): + """Test PathVisEndpoint""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_hop.py b/test_results/test/test_path_vis_hop.py new file mode 100644 index 00000000..c5b1b4df --- /dev/null +++ b/test_results/test/test_path_vis_hop.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_hop import PathVisHop + +class TestPathVisHop(unittest.TestCase): + """PathVisHop unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisHop: + """Test PathVisHop + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisHop` + """ + model = PathVisHop() + if include_optional: + return PathVisHop( + hop = 1, + ip_address = '196.40.106.237', + prefix = '196.40.96.0/20', + rdns = 'core-router1.cpt2.host-h.net', + network = 'HETZNER (Pty) Ltd (AS 37153)', + response_time = 1, + location = 'Cape Town, South Africa', + mpls = '' + ) + else: + return PathVisHop( + ) + """ + + def testPathVisHop(self): + """Test PathVisHop""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_route.py b/test_results/test/test_path_vis_route.py new file mode 100644 index 00000000..3681d57c --- /dev/null +++ b/test_results/test/test_path_vis_route.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_route import PathVisRoute + +class TestPathVisRoute(unittest.TestCase): + """PathVisRoute unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisRoute: + """Test PathVisRoute + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisRoute` + """ + model = PathVisRoute() + if include_optional: + return PathVisRoute( + path_id = '4711301366345855606023718047703941305741293841502186803', + hops = [ + test_results.models.path_vis_hop.PathVisHop( + hop = 1, + ip_address = '196.40.106.237', + prefix = '196.40.96.0/20', + rdns = 'core-router1.cpt2.host-h.net', + network = 'HETZNER (Pty) Ltd (AS 37153)', + response_time = 1, + location = 'Cape Town, South Africa', + mpls = '', ) + ] + ) + else: + return PathVisRoute( + ) + """ + + def testPathVisRoute(self): + """Test PathVisRoute""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_test_result.py b/test_results/test/test_path_vis_test_result.py new file mode 100644 index 00000000..327abc45 --- /dev/null +++ b/test_results/test/test_path_vis_test_result.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_test_result import PathVisTestResult + +class TestPathVisTestResult(unittest.TestCase): + """PathVisTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisTestResult: + """Test PathVisTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisTestResult` + """ + model = PathVisTestResult() + if include_optional: + return PathVisTestResult( + var_date = '2022-07-17T22:00:54Z', + round_id = 1384309800, + links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + start_time = 1384309800, + end_time = 1384309800, + agent = test_results.models.agent.Agent( + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + country_id = 'US', + location = 'San Francisco Bay Area', ), + server = 'www.google.com:443', + server_ip = '172.217.170.68', + source_ip = '196.40.106.237', + source_prefix = '196.40.96.0/20', + target_is_proxy = True, + direction = 'to-target', + path_traces = [ + test_results.models.path_vis_endpoint.PathVisEndpoint( + ip_address = '196.40.106.237', + mss = 1460, + number_of_hops = 15, + path_id = '1230899668701775614109128428722974545787322404682781961521', + path_mtu = 1500, + response_time = 1500, ) + ] + ) + else: + return PathVisTestResult( + ) + """ + + def testPathVisTestResult(self): + """Test PathVisTestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_path_vis_test_results.py b/test_results/test/test_path_vis_test_results.py new file mode 100644 index 00000000..18cf2e6d --- /dev/null +++ b/test_results/test/test_path_vis_test_results.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.path_vis_test_results import PathVisTestResults + +class TestPathVisTestResults(unittest.TestCase): + """PathVisTestResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PathVisTestResults: + """Test PathVisTestResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PathVisTestResults` + """ + model = PathVisTestResults() + if include_optional: + return PathVisTestResults( + results = [ + null + ], + test = { } + ) + else: + return PathVisTestResults( + ) + """ + + def testPathVisTestResults(self): + """Test PathVisTestResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_query_window.py b/test_results/test/test_query_window.py new file mode 100644 index 00000000..24b3d35b --- /dev/null +++ b/test_results/test/test_query_window.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.query_window import QueryWindow + +class TestQueryWindow(unittest.TestCase): + """QueryWindow unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QueryWindow: + """Test QueryWindow + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QueryWindow` + """ + model = QueryWindow() + if include_optional: + return QueryWindow( + start_date = '2022-07-17T22:00:54Z', + end_date = '2022-07-18T22:00:54Z' + ) + else: + return QueryWindow( + ) + """ + + def testQueryWindow(self): + """Test QueryWindow""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_rtp_stream_test_result.py b/test_results/test/test_rtp_stream_test_result.py similarity index 84% rename from test_results_api/test/test_rtp_stream_test_result.py rename to test_results/test/test_rtp_stream_test_result.py index 7d699b17..0bc27929 100644 --- a/test_results_api/test/test_rtp_stream_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.rtp_stream_test_result import RtpStreamTestResult +from test_results.models.rtp_stream_test_result import RtpStreamTestResult class TestRtpStreamTestResult(unittest.TestCase): """RtpStreamTestResult unit test stubs""" @@ -39,10 +38,13 @@ class TestRtpStreamTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + start_time = 1384309800, + end_time = 1384309800, + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), server_ip = '172.97.102.37', dscp = '46', dscp_name = 'EF (DSCP 46)', diff --git a/test_results_api/test/test_rtp_stream_test_results.py b/test_results/test/test_rtp_stream_test_results.py similarity index 88% rename from test_results_api/test/test_rtp_stream_test_results.py rename to test_results/test/test_rtp_stream_test_results.py index 2d5049a9..d7524b1f 100644 --- a/test_results_api/test/test_rtp_stream_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.rtp_stream_test_results import RtpStreamTestResults +from test_results.models.rtp_stream_test_results import RtpStreamTestResults class TestRtpStreamTestResults(unittest.TestCase): """RtpStreamTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestRtpStreamTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return RtpStreamTestResults( diff --git a/test_results/test/test_self_links.py b/test_results/test/test_self_links.py new file mode 100644 index 00000000..b825380a --- /dev/null +++ b/test_results/test/test_self_links.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = test_results.models.self_links__links.SelfLinks__links( + self = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_self_links_links.py b/test_results/test/test_self_links_links.py new file mode 100644 index 00000000..e280276a --- /dev/null +++ b/test_results/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = test_results.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_simple_test.py b/test_results/test/test_simple_test.py new file mode 100644 index 00000000..bb53f6fc --- /dev/null +++ b/test_results/test/test_simple_test.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.simple_test import SimpleTest + +class TestSimpleTest(unittest.TestCase): + """SimpleTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTest: + """Test SimpleTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTest` + """ + model = SimpleTest() + if include_optional: + return SimpleTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = test_results.models.simple_test__links.SimpleTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) + ) + else: + return SimpleTest( + ) + """ + + def testSimpleTest(self): + """Test SimpleTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_simple_test_links.py b/test_results/test/test_simple_test_links.py new file mode 100644 index 00000000..799dcef1 --- /dev/null +++ b/test_results/test/test_simple_test_links.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.simple_test_links import SimpleTestLinks + +class TestSimpleTestLinks(unittest.TestCase): + """SimpleTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTestLinks: + """Test SimpleTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTestLinks` + """ + model = SimpleTestLinks() + if include_optional: + return SimpleTestLinks( + var_self = None, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}] + ) + else: + return SimpleTestLinks( + ) + """ + + def testSimpleTestLinks(self): + """Test SimpleTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_simple_test_links_self.py b/test_results/test/test_simple_test_links_self.py new file mode 100644 index 00000000..206d7cc3 --- /dev/null +++ b/test_results/test/test_simple_test_links_self.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.simple_test_links_self import SimpleTestLinksSelf + +class TestSimpleTestLinksSelf(unittest.TestCase): + """SimpleTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTestLinksSelf: + """Test SimpleTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTestLinksSelf` + """ + model = SimpleTestLinksSelf() + if include_optional: + return SimpleTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return SimpleTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testSimpleTestLinksSelf(self): + """Test SimpleTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_sip_server_error_type.py b/test_results/test/test_sip_server_error_type.py similarity index 80% rename from test_results_api/test/test_sip_server_error_type.py rename to test_results/test/test_sip_server_error_type.py index 23f8f5c2..36d6467d 100644 --- a/test_results_api/test/test_sip_server_error_type.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.sip_server_error_type import SipServerErrorType +from test_results.models.sip_server_error_type import SipServerErrorType class TestSipServerErrorType(unittest.TestCase): """SipServerErrorType unit test stubs""" diff --git a/test_results_api/test/test_sip_server_test_result.py b/test_results/test/test_sip_server_test_result.py similarity index 91% rename from test_results_api/test/test_sip_server_test_result.py rename to test_results/test/test_sip_server_test_result.py index 27752f22..3f5d630d 100644 --- a/test_results_api/test/test_sip_server_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.sip_server_test_result import SipServerTestResult +from test_results.models.sip_server_test_result import SipServerTestResult class TestSipServerTestResult(unittest.TestCase): """SipServerTestResult unit test stubs""" @@ -39,11 +38,14 @@ class TestSipServerTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + start_time = 1384309800, + end_time = 1384309800, server_ip = '193.2.1.88', - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), availability = 100.0, connect_time = 5, dns_time = 2, diff --git a/test_results_api/test/test_sip_server_test_results.py b/test_results/test/test_sip_server_test_results.py similarity index 88% rename from test_results_api/test/test_sip_server_test_results.py rename to test_results/test/test_sip_server_test_results.py index 1355b32f..87dc07a1 100644 --- a/test_results_api/test/test_sip_server_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.sip_server_test_results import SipServerTestResults +from test_results.models.sip_server_test_results import SipServerTestResults class TestSipServerTestResults(unittest.TestCase): """SipServerTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestSipServerTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return SipServerTestResults( diff --git a/test_results_api/test/test_ssl_cert.py b/test_results/test/test_ssl_cert.py similarity index 86% rename from test_results_api/test/test_ssl_cert.py rename to test_results/test/test_ssl_cert.py index 4bf3258f..38aa6be3 100644 --- a/test_results_api/test/test_ssl_cert.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.ssl_cert import SslCert +from test_results.models.ssl_cert import SslCert class TestSslCert(unittest.TestCase): """SslCert unit test stubs""" @@ -37,8 +36,8 @@ class TestSslCert(unittest.TestCase): if include_optional: return SslCert( days_until_expiry = 56, - is_fetch_date_in_valid_cert_date_range = 'true', - has_valid_signing_cert = 'false', + is_fetch_date_in_valid_cert_date_range = True, + has_valid_signing_cert = False, issuer_name = 'DigiCert SHA2 Extended Validation Server CA', valid_before = '2020-05-12T12:00Z', valid_after = '2018-03-27T00:00Z', diff --git a/test_results/test/test_test_direction.py b/test_results/test/test_test_direction.py new file mode 100644 index 00000000..d0af0f2f --- /dev/null +++ b/test_results/test/test_test_direction.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.test_direction import TestDirection + +class TestTestDirection(unittest.TestCase): + """TestDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDirection(self): + """Test TestDirection""" + # inst = TestDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_test_interval.py b/test_results/test/test_test_interval.py new file mode 100644 index 00000000..908e5747 --- /dev/null +++ b/test_results/test/test_test_interval.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_test_result.py b/test_results/test/test_test_result.py new file mode 100644 index 00000000..bfaad011 --- /dev/null +++ b/test_results/test/test_test_result.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.test_result import TestResult + +class TestTestResult(unittest.TestCase): + """TestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestResult: + """Test TestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestResult` + """ + model = TestResult() + if include_optional: + return TestResult( + links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, + var_date = '2022-07-17T22:00:54Z', + round_id = 1384309800 + ) + else: + return TestResult( + ) + """ + + def testTestResult(self): + """Test TestResult""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_test_result_app_links.py b/test_results/test/test_test_result_app_links.py similarity index 90% rename from test_results_api/test/test_test_result_app_links.py rename to test_results/test/test_test_result_app_links.py index ddefcdbf..7f48e0a7 100644 --- a/test_results_api/test/test_test_result_app_links.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.test_result_app_links import TestResultAppLinks +from test_results.models.test_result_app_links import TestResultAppLinks class TestTestResultAppLinks(unittest.TestCase): """TestResultAppLinks unit test stubs""" diff --git a/test_results/test/test_test_type.py b/test_results/test/test_test_type.py new file mode 100644 index 00000000..6fbc1f65 --- /dev/null +++ b/test_results/test/test_test_type.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.test_type import TestType + +class TestTestType(unittest.TestCase): + """TestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestType(self): + """Test TestType""" + # inst = TestType() + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_unauthorized_error.py b/test_results/test/test_unauthorized_error.py new file mode 100644 index 00000000..e31e01af --- /dev/null +++ b/test_results/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_validation_error.py b/test_results/test/test_validation_error.py new file mode 100644 index 00000000..730e98ae --- /dev/null +++ b/test_results/test/test_validation_error.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + test_results.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results/test/test_validation_error_all_of_errors.py b/test_results/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..dba120f6 --- /dev/null +++ b/test_results/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test_results_api/test/test_web_transaction_detail_test_result.py b/test_results/test/test_web_transaction_detail_test_result.py similarity index 84% rename from test_results_api/test/test_web_transaction_detail_test_result.py rename to test_results/test/test_web_transaction_detail_test_result.py index 70fd994b..6949340f 100644 --- a/test_results_api/test/test_web_transaction_detail_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.web_transaction_detail_test_result import WebTransactionDetailTestResult +from test_results.models.web_transaction_detail_test_result import WebTransactionDetailTestResult class TestWebTransactionDetailTestResult(unittest.TestCase): """WebTransactionDetailTestResult unit test stubs""" @@ -39,21 +38,22 @@ class TestWebTransactionDetailTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), component_errors = 5, transaction_time = 2379, error_type = 'None', error_details = 'Connection error', markers = [ - test_results_api.models.marker.Marker( + test_results.models.marker.Marker( name = 'SearchForWebdriver', duration = 56, ) ], pages = [ - test_results_api.models.page.Page( + test_results.models.page.Page( page_num = 0, page_name = 'Google', component_count = 136, diff --git a/test_results_api/test/test_web_transaction_detail_test_results.py b/test_results/test/test_web_transaction_detail_test_results.py similarity index 88% rename from test_results_api/test/test_web_transaction_detail_test_results.py rename to test_results/test/test_web_transaction_detail_test_results.py index 2f924b44..4eb96807 100644 --- a/test_results_api/test/test_web_transaction_detail_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.web_transaction_detail_test_results import WebTransactionDetailTestResults +from test_results.models.web_transaction_detail_test_results import WebTransactionDetailTestResults class TestWebTransactionDetailTestResults(unittest.TestCase): """WebTransactionDetailTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestWebTransactionDetailTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return WebTransactionDetailTestResults( diff --git a/test_results_api/test/test_web_transaction_page_detail_test_result.py b/test_results/test/test_web_transaction_page_detail_test_result.py similarity index 93% rename from test_results_api/test/test_web_transaction_page_detail_test_result.py rename to test_results/test/test_web_transaction_page_detail_test_result.py index bbfbcbbd..c49a6a6b 100644 --- a/test_results_api/test/test_web_transaction_page_detail_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult +from test_results.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult class TestWebTransactionPageDetailTestResult(unittest.TestCase): """WebTransactionPageDetailTestResult unit test stubs""" @@ -39,21 +38,22 @@ class TestWebTransactionPageDetailTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), component_errors = 5, transaction_time = 2379, error_type = 'None', error_details = 'Connection error', markers = [ - test_results_api.models.marker.Marker( + test_results.models.marker.Marker( name = 'SearchForWebdriver', duration = 56, ) ], pages = [ - test_results_api.models.page.Page( + test_results.models.page.Page( page_num = 0, page_name = 'Google', component_count = 136, diff --git a/test_results_api/test/test_web_transaction_page_detail_test_results.py b/test_results/test/test_web_transaction_page_detail_test_results.py similarity index 87% rename from test_results_api/test/test_web_transaction_page_detail_test_results.py rename to test_results/test/test_web_transaction_page_detail_test_results.py index 20240c81..55ad093a 100644 --- a/test_results_api/test/test_web_transaction_page_detail_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults +from test_results.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults class TestWebTransactionPageDetailTestResults(unittest.TestCase): """WebTransactionPageDetailTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestWebTransactionPageDetailTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return WebTransactionPageDetailTestResults( diff --git a/test_results_api/test/test_web_transaction_test_result.py b/test_results/test/test_web_transaction_test_result.py similarity index 86% rename from test_results_api/test/test_web_transaction_test_result.py rename to test_results/test/test_web_transaction_test_result.py index d4815b64..4aa762d3 100644 --- a/test_results_api/test/test_web_transaction_test_result.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.web_transaction_test_result import WebTransactionTestResult +from test_results.models.web_transaction_test_result import WebTransactionTestResult class TestWebTransactionTestResult(unittest.TestCase): """WebTransactionTestResult unit test stubs""" @@ -39,10 +38,11 @@ class TestWebTransactionTestResult(unittest.TestCase): var_date = '2022-07-17T22:00:54Z', round_id = 1384309800, links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( + agent = test_results.models.agent.Agent( agent_id = '281474976710706', agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), + country_id = 'US', + location = 'San Francisco Bay Area', ), component_errors = 5, transaction_time = 2379, error_type = 'None', diff --git a/test_results_api/test/test_web_transaction_test_results.py b/test_results/test/test_web_transaction_test_results.py similarity index 88% rename from test_results_api/test/test_web_transaction_test_results.py rename to test_results/test/test_web_transaction_test_results.py index 15574a60..6ef0b06b 100644 --- a/test_results_api/test/test_web_transaction_test_results.py +++ b/test_results/test/test_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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from test_results_api.models.web_transaction_test_results import WebTransactionTestResults +from test_results.models.web_transaction_test_results import WebTransactionTestResults class TestWebTransactionTestResults(unittest.TestCase): """WebTransactionTestResults unit test stubs""" @@ -39,7 +38,7 @@ class TestWebTransactionTestResults(unittest.TestCase): results = [ null ], - test = None + test = { } ) else: return WebTransactionTestResults( diff --git a/test_results/test_results/__init__.py b/test_results/test_results/__init__.py new file mode 100644 index 00000000..0eb9c0d7 --- /dev/null +++ b/test_results/test_results/__init__.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.api.dnssec_test_metrics_api import DNSSECTestMetricsApi +from test_results.api.dns_server_test_metrics_api import DNSServerTestMetricsApi +from test_results.api.dns_trace_test_metrics_api import DNSTraceTestMetricsApi +from test_results.api.network_bgp_test_metrics_api import NetworkBGPTestMetricsApi +from test_results.api.network_test_metrics_api import NetworkTestMetricsApi +from test_results.api.voice_rtp_server_test_metrics_api import VoiceRTPServerTestMetricsApi +from test_results.api.voice_sip_server_test_metrics_api import VoiceSIPServerTestMetricsApi +from test_results.api.web_ftp_server_test_metrics_api import WebFTPServerTestMetricsApi +from test_results.api.web_http_server_test_metrics_api import WebHTTPServerTestMetricsApi +from test_results.api.web_page_load_test_metrics_api import WebPageLoadTestMetricsApi +from test_results.api.web_transactions_test_metrics_api import WebTransactionsTestMetricsApi + +# import ApiClient +from test_results.api_response import ApiResponse +from test_results.api_client import ApiClient +from test_results.configuration import Configuration +from test_results.exceptions import OpenApiException +from test_results.exceptions import ApiTypeError +from test_results.exceptions import ApiValueError +from test_results.exceptions import ApiKeyError +from test_results.exceptions import ApiAttributeError +from test_results.exceptions import ApiException + +# import models into sdk package +from test_results.models.agent import Agent +from test_results.models.app_links import AppLinks +from test_results.models.app_links_links import AppLinksLinks +from test_results.models.bgp_basic_test_result import BgpBasicTestResult +from test_results.models.bgp_hop import BgpHop +from test_results.models.bgp_test_result import BgpTestResult +from test_results.models.bgp_test_results import BgpTestResults +from test_results.models.bgp_test_route_information_result import BgpTestRouteInformationResult +from test_results.models.bgp_test_route_information_results import BgpTestRouteInformationResults +from test_results.models.dns_server_test_result import DnsServerTestResult +from test_results.models.dns_server_test_results import DnsServerTestResults +from test_results.models.dns_trace_test_result import DnsTraceTestResult +from test_results.models.dns_trace_test_results import DnsTraceTestResults +from test_results.models.dnssec_test_result import DnssecTestResult +from test_results.models.dnssec_test_results import DnssecTestResults +from test_results.models.epoch_time_window import EpochTimeWindow +from test_results.models.error import Error +from test_results.models.expand import Expand +from test_results.models.ftp_server_test_result import FtpServerTestResult +from test_results.models.ftp_server_test_results import FtpServerTestResults +from test_results.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response +from test_results.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response +from test_results.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response +from test_results.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response +from test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response +from test_results.models.get_test_result_metrics200_response import GetTestResultMetrics200Response +from test_results.models.get_test_result_network_path_vis200_response import GetTestResultNetworkPathVis200Response +from test_results.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response +from test_results.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response +from test_results.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response +from test_results.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response +from test_results.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response +from test_results.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response +from test_results.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response +from test_results.models.get_test_results_bgp200_response import GetTestResultsBgp200Response +from test_results.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response +from test_results.models.http_test_result import HttpTestResult +from test_results.models.http_test_result_headers import HttpTestResultHeaders +from test_results.models.http_test_results import HttpTestResults +from test_results.models.link import Link +from test_results.models.marker import Marker +from test_results.models.monitor import Monitor +from test_results.models.network_test_result import NetworkTestResult +from test_results.models.network_test_results import NetworkTestResults +from test_results.models.page import Page +from test_results.models.page_load_detail_test_result import PageLoadDetailTestResult +from test_results.models.page_load_detail_test_results import PageLoadDetailTestResults +from test_results.models.page_load_test_result import PageLoadTestResult +from test_results.models.page_load_test_results import PageLoadTestResults +from test_results.models.pagination_links import PaginationLinks +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.path_vis_base_test_result import PathVisBaseTestResult +from test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from test_results.models.path_vis_detail_test_results import PathVisDetailTestResults +from test_results.models.path_vis_direction import PathVisDirection +from test_results.models.path_vis_endpoint import PathVisEndpoint +from test_results.models.path_vis_hop import PathVisHop +from test_results.models.path_vis_route import PathVisRoute +from test_results.models.path_vis_test_result import PathVisTestResult +from test_results.models.path_vis_test_results import PathVisTestResults +from test_results.models.query_window import QueryWindow +from test_results.models.rtp_stream_test_result import RtpStreamTestResult +from test_results.models.rtp_stream_test_results import RtpStreamTestResults +from test_results.models.self_links import SelfLinks +from test_results.models.self_links_links import SelfLinksLinks +from test_results.models.simple_test import SimpleTest +from test_results.models.simple_test_links import SimpleTestLinks +from test_results.models.simple_test_links_self import SimpleTestLinksSelf +from test_results.models.sip_server_error_type import SipServerErrorType +from test_results.models.sip_server_test_result import SipServerTestResult +from test_results.models.sip_server_test_results import SipServerTestResults +from test_results.models.ssl_cert import SslCert +from test_results.models.test_direction import TestDirection +from test_results.models.test_interval import TestInterval +from test_results.models.test_result import TestResult +from test_results.models.test_result_app_links import TestResultAppLinks +from test_results.models.test_type import TestType +from test_results.models.unauthorized_error import UnauthorizedError +from test_results.models.validation_error import ValidationError +from test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from test_results.models.web_transaction_detail_test_result import WebTransactionDetailTestResult +from test_results.models.web_transaction_detail_test_results import WebTransactionDetailTestResults +from test_results.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult +from test_results.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults +from test_results.models.web_transaction_test_result import WebTransactionTestResult +from test_results.models.web_transaction_test_results import WebTransactionTestResults diff --git a/test_results/test_results/api/__init__.py b/test_results/test_results/api/__init__.py new file mode 100644 index 00000000..6285d562 --- /dev/null +++ b/test_results/test_results/api/__init__.py @@ -0,0 +1,15 @@ +# flake8: noqa + +# import apis into api package +from test_results.api.dnssec_test_metrics_api import DNSSECTestMetricsApi +from test_results.api.dns_server_test_metrics_api import DNSServerTestMetricsApi +from test_results.api.dns_trace_test_metrics_api import DNSTraceTestMetricsApi +from test_results.api.network_bgp_test_metrics_api import NetworkBGPTestMetricsApi +from test_results.api.network_test_metrics_api import NetworkTestMetricsApi +from test_results.api.voice_rtp_server_test_metrics_api import VoiceRTPServerTestMetricsApi +from test_results.api.voice_sip_server_test_metrics_api import VoiceSIPServerTestMetricsApi +from test_results.api.web_ftp_server_test_metrics_api import WebFTPServerTestMetricsApi +from test_results.api.web_http_server_test_metrics_api import WebHTTPServerTestMetricsApi +from test_results.api.web_page_load_test_metrics_api import WebPageLoadTestMetricsApi +from test_results.api.web_transactions_test_metrics_api import WebTransactionsTestMetricsApi + diff --git a/test_results_api/test_results_api/api/dns_server_test_metrics_api.py b/test_results/test_results/api/dns_server_test_metrics_api.py similarity index 96% rename from test_results_api/test_results_api/api/dns_server_test_metrics_api.py rename to test_results/test_results/api/dns_server_test_metrics_api.py index de83869e..ef5b15f7 100644 --- a/test_results_api/test_results_api/api/dns_server_test_metrics_api.py +++ b/test_results/test_results/api/dns_server_test_metrics_api.py @@ -5,37 +5,26 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class DNSServerTestMetricsApi: @@ -60,7 +49,7 @@ class DNSServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -90,7 +79,7 @@ class DNSServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -130,15 +119,13 @@ class DNSServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -160,7 +147,7 @@ class DNSServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -190,7 +177,7 @@ class DNSServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -230,15 +217,13 @@ class DNSServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -260,7 +245,7 @@ class DNSServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -290,7 +275,7 @@ class DNSServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -330,15 +315,13 @@ class DNSServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -360,19 +343,18 @@ class DNSServerTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -464,7 +446,7 @@ class DNSServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -492,7 +474,7 @@ class DNSServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -531,15 +513,13 @@ class DNSServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -560,7 +540,7 @@ class DNSServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -588,7 +568,7 @@ class DNSServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -627,15 +607,13 @@ class DNSServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -656,7 +634,7 @@ class DNSServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -684,7 +662,7 @@ class DNSServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -723,15 +701,13 @@ class DNSServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -752,19 +728,18 @@ class DNSServerTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/dns_trace_test_metrics_api.py b/test_results/test_results/api/dns_trace_test_metrics_api.py similarity index 95% rename from test_results_api/test_results_api/api/dns_trace_test_metrics_api.py rename to test_results/test_results/api/dns_trace_test_metrics_api.py index 4bf47d95..b434fa32 100644 --- a/test_results_api/test_results_api/api/dns_trace_test_metrics_api.py +++ b/test_results/test_results/api/dns_trace_test_metrics_api.py @@ -5,37 +5,26 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response -from test_results_api.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class DNSTraceTestMetricsApi: @@ -59,7 +48,7 @@ class DNSTraceTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -87,7 +76,7 @@ class DNSTraceTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -126,15 +115,13 @@ class DNSTraceTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsTrace200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -155,7 +142,7 @@ class DNSTraceTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -183,7 +170,7 @@ class DNSTraceTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -222,15 +209,13 @@ class DNSTraceTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsTrace200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -251,7 +236,7 @@ class DNSTraceTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -279,7 +264,7 @@ class DNSTraceTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -318,15 +303,13 @@ class DNSTraceTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnsTrace200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -347,19 +330,18 @@ class DNSTraceTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/dnssec_test_metrics_api.py b/test_results/test_results/api/dnssec_test_metrics_api.py similarity index 95% rename from test_results_api/test_results_api/api/dnssec_test_metrics_api.py rename to test_results/test_results/api/dnssec_test_metrics_api.py index 18890593..627fb776 100644 --- a/test_results_api/test_results_api/api/dnssec_test_metrics_api.py +++ b/test_results/test_results/api/dnssec_test_metrics_api.py @@ -5,37 +5,26 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response -from test_results_api.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class DNSSECTestMetricsApi: @@ -59,7 +48,7 @@ class DNSSECTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -87,7 +76,7 @@ class DNSSECTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -126,15 +115,13 @@ class DNSSECTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnssec200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -155,7 +142,7 @@ class DNSSECTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -183,7 +170,7 @@ class DNSSECTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -222,15 +209,13 @@ class DNSSECTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnssec200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -251,7 +236,7 @@ class DNSSECTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -279,7 +264,7 @@ class DNSSECTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -318,15 +303,13 @@ class DNSSECTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultDnssec200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -347,19 +330,18 @@ class DNSSECTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/network_bgp_test_metrics_api.py b/test_results/test_results/api/network_bgp_test_metrics_api.py similarity index 96% rename from test_results_api/test_results_api/api/network_bgp_test_metrics_api.py rename to test_results/test_results/api/network_bgp_test_metrics_api.py index c47dbf05..0fac900d 100644 --- a/test_results_api/test_results_api/api/network_bgp_test_metrics_api.py +++ b/test_results/test_results/api/network_bgp_test_metrics_api.py @@ -5,38 +5,27 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_results_bgp200_response import GetTestResultsBgp200Response +from test_results.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response -from test_results_api.models.get_test_results_bgp200_response import GetTestResultsBgp200Response -from test_results_api.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class NetworkBGPTestMetricsApi: @@ -60,7 +49,7 @@ class NetworkBGPTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -88,7 +77,7 @@ class NetworkBGPTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -127,15 +116,13 @@ class NetworkBGPTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultsBgp200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -156,7 +143,7 @@ class NetworkBGPTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -184,7 +171,7 @@ class NetworkBGPTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -223,15 +210,13 @@ class NetworkBGPTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultsBgp200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -252,7 +237,7 @@ class NetworkBGPTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -280,7 +265,7 @@ class NetworkBGPTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -319,15 +304,13 @@ class NetworkBGPTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultsBgp200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -348,19 +331,18 @@ class NetworkBGPTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -509,15 +491,13 @@ class NetworkBGPTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultsBgpPrefix200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -597,15 +577,13 @@ class NetworkBGPTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultsBgpPrefix200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -685,15 +663,13 @@ class NetworkBGPTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultsBgpPrefix200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -712,19 +688,18 @@ class NetworkBGPTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/network_test_metrics_api.py b/test_results/test_results/api/network_test_metrics_api.py similarity index 84% rename from test_results_api/test_results_api/api/network_test_metrics_api.py rename to test_results/test_results/api/network_test_metrics_api.py index f0bc7b76..4658147e 100644 --- a/test_results_api/test_results_api/api/network_test_metrics_api.py +++ b/test_results/test_results/api/network_test_metrics_api.py @@ -5,40 +5,30 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response +from test_results.models.get_test_result_metrics200_response import GetTestResultMetrics200Response +from test_results.models.get_test_result_network_path_vis200_response import GetTestResultNetworkPathVis200Response +from test_results.models.path_vis_direction import PathVisDirection +from test_results.models.test_direction import TestDirection -from test_results_api.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response -from test_results_api.models.get_test_result_metrics200_response import GetTestResultMetrics200Response -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.test_direction import TestDirection - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class NetworkTestMetricsApi: @@ -61,7 +51,7 @@ class NetworkTestMetricsApi: 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[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, + 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)], @@ -75,9 +65,9 @@ class NetworkTestMetricsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetTestPathvisAgentRound200Response: - """Get pathvis test results by agent and round + """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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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. + 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 @@ -87,8 +77,8 @@ class NetworkTestMetricsApi: :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`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection + :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 @@ -125,15 +115,13 @@ class NetworkTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestPathvisAgentRound200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -153,7 +141,7 @@ class NetworkTestMetricsApi: 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[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, + 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)], @@ -167,9 +155,9 @@ class NetworkTestMetricsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetTestPathvisAgentRound200Response]: - """Get pathvis test results by agent and round + """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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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. + 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 @@ -179,8 +167,8 @@ class NetworkTestMetricsApi: :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`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection + :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 @@ -217,15 +205,13 @@ class NetworkTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestPathvisAgentRound200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -245,7 +231,7 @@ class NetworkTestMetricsApi: 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[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, + 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)], @@ -259,9 +245,9 @@ class NetworkTestMetricsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get pathvis test results by agent and round + """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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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. + 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 @@ -271,8 +257,8 @@ class NetworkTestMetricsApi: :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`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection + :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 @@ -309,15 +295,13 @@ class NetworkTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestPathvisAgentRound200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -337,19 +321,18 @@ class NetworkTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -389,7 +372,7 @@ class NetworkTestMetricsApi: return self.api_client.param_serialize( method='GET', - resource_path='/v7/test-results/{testId}/pathvis/agent/{agentId}/round/{roundId}', + resource_path='/v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -413,7 +396,7 @@ class NetworkTestMetricsApi: 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 `_links` instead of this parameter.")] = 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, direction: Annotated[Optional[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, @@ -442,7 +425,7 @@ class NetworkTestMetricsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection @@ -484,15 +467,13 @@ class NetworkTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultMetrics200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -513,7 +494,7 @@ class NetworkTestMetricsApi: 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 `_links` instead of this parameter.")] = 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, direction: Annotated[Optional[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, @@ -542,7 +523,7 @@ class NetworkTestMetricsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection @@ -584,15 +565,13 @@ class NetworkTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultMetrics200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -613,7 +592,7 @@ class NetworkTestMetricsApi: 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 `_links` instead of this parameter.")] = 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, direction: Annotated[Optional[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, @@ -642,7 +621,7 @@ class NetworkTestMetricsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection @@ -684,15 +663,13 @@ class NetworkTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultMetrics200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -714,19 +691,18 @@ class NetworkTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -813,15 +789,15 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_network_pathvis( + def get_test_result_network_path_vis( 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 `_links` instead of this parameter.")] = None, - direction: Annotated[Optional[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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)], @@ -834,10 +810,10 @@ class NetworkTestMetricsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetTestResultNetworkPathvis200Response: - """Get pathvis network test results + ) -> GetTestResultNetworkPathVis200Response: + """Get path visualization network test results - Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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. + Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 @@ -849,10 +825,10 @@ class NetworkTestMetricsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str - :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection + :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 @@ -875,7 +851,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_network_pathvis_serialize( + _param = self._get_test_result_network_path_vis_serialize( test_id=test_id, aid=aid, window=window, @@ -890,16 +866,14 @@ class NetworkTestMetricsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTestResultNetworkPathvis200Response", - '400': "Error", + '200': "GetTestResultNetworkPathVis200Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -913,15 +887,15 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_network_pathvis_with_http_info( + def get_test_result_network_path_vis_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 `_links` instead of this parameter.")] = None, - direction: Annotated[Optional[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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)], @@ -934,10 +908,10 @@ class NetworkTestMetricsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetTestResultNetworkPathvis200Response]: - """Get pathvis network test results + ) -> ApiResponse[GetTestResultNetworkPathVis200Response]: + """Get path visualization network test results - Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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. + Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 @@ -949,10 +923,10 @@ class NetworkTestMetricsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str - :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection + :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 @@ -975,7 +949,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_network_pathvis_serialize( + _param = self._get_test_result_network_path_vis_serialize( test_id=test_id, aid=aid, window=window, @@ -990,16 +964,14 @@ class NetworkTestMetricsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTestResultNetworkPathvis200Response", - '400': "Error", + '200': "GetTestResultNetworkPathVis200Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1013,15 +985,15 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_network_pathvis_without_preload_content( + def get_test_result_network_path_vis_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 `_links` instead of this parameter.")] = None, - direction: Annotated[Optional[TestDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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)], @@ -1035,9 +1007,9 @@ class NetworkTestMetricsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get pathvis network test results + """Get path visualization network test results - Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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. + Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 @@ -1049,10 +1021,10 @@ class NetworkTestMetricsApi: :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 `_links` instead of this parameter. + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str - :param direction: Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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: TestDirection + :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 @@ -1075,7 +1047,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_network_pathvis_serialize( + _param = self._get_test_result_network_path_vis_serialize( test_id=test_id, aid=aid, window=window, @@ -1090,16 +1062,14 @@ class NetworkTestMetricsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTestResultNetworkPathvis200Response", - '400': "Error", + '200': "GetTestResultNetworkPathVis200Response", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1108,7 +1078,7 @@ class NetworkTestMetricsApi: return response_data.response - def _get_test_result_network_pathvis_serialize( + def _get_test_result_network_path_vis_serialize( self, test_id, aid, @@ -1121,19 +1091,18 @@ class NetworkTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1203,7 +1172,7 @@ class NetworkTestMetricsApi: return self.api_client.param_serialize( method='GET', - resource_path='/v7/test-results/{testId}/pathvis', + resource_path='/v7/test-results/{testId}/path-vis', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/test_results_api/test_results_api/api/voice_rtp_server_test_metrics_api.py b/test_results/test_results/api/voice_rtp_server_test_metrics_api.py similarity index 95% rename from test_results_api/test_results_api/api/voice_rtp_server_test_metrics_api.py rename to test_results/test_results/api/voice_rtp_server_test_metrics_api.py index f8a2292f..12abb98e 100644 --- a/test_results_api/test_results_api/api/voice_rtp_server_test_metrics_api.py +++ b/test_results/test_results/api/voice_rtp_server_test_metrics_api.py @@ -5,37 +5,26 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response -from test_results_api.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class VoiceRTPServerTestMetricsApi: @@ -59,7 +48,7 @@ class VoiceRTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -87,7 +76,7 @@ class VoiceRTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -126,15 +115,13 @@ class VoiceRTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultRtpStream200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -155,7 +142,7 @@ class VoiceRTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -183,7 +170,7 @@ class VoiceRTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -222,15 +209,13 @@ class VoiceRTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultRtpStream200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -251,7 +236,7 @@ class VoiceRTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -279,7 +264,7 @@ class VoiceRTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -318,15 +303,13 @@ class VoiceRTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultRtpStream200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -347,19 +330,18 @@ class VoiceRTPServerTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/voice_sip_server_test_metrics_api.py b/test_results/test_results/api/voice_sip_server_test_metrics_api.py similarity index 95% rename from test_results_api/test_results_api/api/voice_sip_server_test_metrics_api.py rename to test_results/test_results/api/voice_sip_server_test_metrics_api.py index bcba0d1c..e09d4d8d 100644 --- a/test_results_api/test_results_api/api/voice_sip_server_test_metrics_api.py +++ b/test_results/test_results/api/voice_sip_server_test_metrics_api.py @@ -5,37 +5,26 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response -from test_results_api.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class VoiceSIPServerTestMetricsApi: @@ -59,7 +48,7 @@ class VoiceSIPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -87,7 +76,7 @@ class VoiceSIPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -126,15 +115,13 @@ class VoiceSIPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultSipServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -155,7 +142,7 @@ class VoiceSIPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -183,7 +170,7 @@ class VoiceSIPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -222,15 +209,13 @@ class VoiceSIPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultSipServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -251,7 +236,7 @@ class VoiceSIPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -279,7 +264,7 @@ class VoiceSIPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -318,15 +303,13 @@ class VoiceSIPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultSipServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -347,19 +330,18 @@ class VoiceSIPServerTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/web_ftp_server_test_metrics_api.py b/test_results/test_results/api/web_ftp_server_test_metrics_api.py similarity index 95% rename from test_results_api/test_results_api/api/web_ftp_server_test_metrics_api.py rename to test_results/test_results/api/web_ftp_server_test_metrics_api.py index 73304dbc..a0629142 100644 --- a/test_results_api/test_results_api/api/web_ftp_server_test_metrics_api.py +++ b/test_results/test_results/api/web_ftp_server_test_metrics_api.py @@ -5,37 +5,26 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response -from test_results_api.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class WebFTPServerTestMetricsApi: @@ -59,7 +48,7 @@ class WebFTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -87,7 +76,7 @@ class WebFTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -126,15 +115,13 @@ class WebFTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultFtpServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -155,7 +142,7 @@ class WebFTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -183,7 +170,7 @@ class WebFTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -222,15 +209,13 @@ class WebFTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultFtpServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -251,7 +236,7 @@ class WebFTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -279,7 +264,7 @@ class WebFTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -318,15 +303,13 @@ class WebFTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultFtpServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -347,19 +330,18 @@ class WebFTPServerTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/web_http_server_test_metrics_api.py b/test_results/test_results/api/web_http_server_test_metrics_api.py similarity index 95% rename from test_results_api/test_results_api/api/web_http_server_test_metrics_api.py rename to test_results/test_results/api/web_http_server_test_metrics_api.py index 9745c58d..b329542e 100644 --- a/test_results_api/test_results_api/api/web_http_server_test_metrics_api.py +++ b/test_results/test_results/api/web_http_server_test_metrics_api.py @@ -5,38 +5,27 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import List, Optional +from typing_extensions import Annotated +from test_results.models.expand import Expand +from test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.models.expand import Expand -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class WebHTTPServerTestMetricsApi: @@ -60,7 +49,7 @@ class WebHTTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query.")] = None, _request_timeout: Union[ None, @@ -89,7 +78,7 @@ class WebHTTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. :type expand: List[Expand] @@ -131,15 +120,13 @@ class WebHTTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultHttpServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -160,7 +147,7 @@ class WebHTTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query.")] = None, _request_timeout: Union[ None, @@ -189,7 +176,7 @@ class WebHTTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. :type expand: List[Expand] @@ -231,15 +218,13 @@ class WebHTTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultHttpServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -260,7 +245,7 @@ class WebHTTPServerTestMetricsApi: 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 `_links` instead of this parameter.")] = 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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query.")] = None, _request_timeout: Union[ None, @@ -289,7 +274,7 @@ class WebHTTPServerTestMetricsApi: :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 `_links` instead of this parameter. + :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 lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. :type expand: List[Expand] @@ -331,15 +316,13 @@ class WebHTTPServerTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultHttpServer200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -361,12 +344,11 @@ class WebHTTPServerTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -374,7 +356,7 @@ class WebHTTPServerTestMetricsApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/web_page_load_test_metrics_api.py b/test_results/test_results/api/web_page_load_test_metrics_api.py similarity index 96% rename from test_results_api/test_results_api/api/web_page_load_test_metrics_api.py rename to test_results/test_results/api/web_page_load_test_metrics_api.py index 3ab2da4c..70b10915 100644 --- a/test_results_api/test_results_api/api/web_page_load_test_metrics_api.py +++ b/test_results/test_results/api/web_page_load_test_metrics_api.py @@ -5,38 +5,27 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response +from test_results.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response -from test_results_api.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response -from test_results_api.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class WebPageLoadTestMetricsApi: @@ -60,7 +49,7 @@ class WebPageLoadTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -88,7 +77,7 @@ class WebPageLoadTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -127,15 +116,13 @@ class WebPageLoadTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultPageLoad200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -156,7 +143,7 @@ class WebPageLoadTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -184,7 +171,7 @@ class WebPageLoadTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -223,15 +210,13 @@ class WebPageLoadTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultPageLoad200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -252,7 +237,7 @@ class WebPageLoadTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -280,7 +265,7 @@ class WebPageLoadTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -319,15 +304,13 @@ class WebPageLoadTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultPageLoad200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -348,19 +331,18 @@ class WebPageLoadTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -509,15 +491,13 @@ class WebPageLoadTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultPageLoadComponentDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -597,15 +577,13 @@ class WebPageLoadTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultPageLoadComponentDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -685,15 +663,13 @@ class WebPageLoadTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultPageLoadComponentDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -712,19 +688,18 @@ class WebPageLoadTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results_api/test_results_api/api/web_transactions_test_metrics_api.py b/test_results/test_results/api/web_transactions_test_metrics_api.py similarity index 96% rename from test_results_api/test_results_api/api/web_transactions_test_metrics_api.py rename to test_results/test_results/api/web_transactions_test_metrics_api.py index 6303fdf2..c881e2ba 100644 --- a/test_results_api/test_results_api/api/web_transactions_test_metrics_api.py +++ b/test_results/test_results/api/web_transactions_test_metrics_api.py @@ -5,39 +5,28 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated + from datetime import datetime - -from pydantic import StrictStr, field_validator - +from pydantic import Field, StrictStr, field_validator from typing import Optional +from typing_extensions import Annotated +from test_results.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response +from test_results.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response +from test_results.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response -from test_results_api.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response -from test_results_api.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response -from test_results_api.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response - -from test_results_api.api_client import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.rest import RESTResponseType +from test_results.api_client import ApiClient, RequestSerialized +from test_results.api_response import ApiResponse +from test_results.rest import RESTResponseType class WebTransactionsTestMetricsApi: @@ -61,7 +50,7 @@ class WebTransactionsTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -89,7 +78,7 @@ class WebTransactionsTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -128,15 +117,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactions200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -157,7 +144,7 @@ class WebTransactionsTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -185,7 +172,7 @@ class WebTransactionsTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -224,15 +211,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactions200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -253,7 +238,7 @@ class WebTransactionsTestMetricsApi: 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 `_links` instead of this parameter.")] = 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)], @@ -281,7 +266,7 @@ class WebTransactionsTestMetricsApi: :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 `_links` instead of this parameter. + :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 @@ -320,15 +305,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactions200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -349,19 +332,18 @@ class WebTransactionsTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -510,15 +492,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactionsComponentDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -598,15 +578,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactionsComponentDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -686,15 +664,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactionsComponentDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -713,19 +689,18 @@ class WebTransactionsTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -848,15 +823,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactionsComponentPageDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -940,15 +913,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactionsComponentPageDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1032,15 +1003,13 @@ class WebTransactionsTestMetricsApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetTestResultWebTransactionsComponentPageDetail200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1060,19 +1029,18 @@ class WebTransactionsTestMetricsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/test_results/test_results/api_client.py b/test_results/test_results/api_client.py new file mode 100644 index 00000000..8b418f51 --- /dev/null +++ b/test_results/test_results/api_client.py @@ -0,0 +1,770 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from test_results.configuration import Configuration +from test_results.api_response import ApiResponse, T as ApiResponseT +import test_results.models +from test_results import rest +from test_results.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(test_results.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/test_results/test_results/api_response.py b/test_results/test_results/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/test_results/test_results/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/test_results/test_results/configuration.py b/test_results/test_results/configuration.py new file mode 100644 index 00000000..5fbe6f19 --- /dev/null +++ b/test_results/test_results/configuration.py @@ -0,0 +1,444 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("test_results") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/test_results/test_results/exceptions.py b/test_results/test_results/exceptions.py new file mode 100644 index 00000000..2e9e4688 --- /dev/null +++ b/test_results/test_results/exceptions.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/test_results/test_results/models/__init__.py b/test_results/test_results/models/__init__.py new file mode 100644 index 00000000..7b0f8630 --- /dev/null +++ b/test_results/test_results/models/__init__.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +# flake8: noqa +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from test_results.models.agent import Agent +from test_results.models.app_links import AppLinks +from test_results.models.app_links_links import AppLinksLinks +from test_results.models.bgp_basic_test_result import BgpBasicTestResult +from test_results.models.bgp_hop import BgpHop +from test_results.models.bgp_test_result import BgpTestResult +from test_results.models.bgp_test_results import BgpTestResults +from test_results.models.bgp_test_route_information_result import BgpTestRouteInformationResult +from test_results.models.bgp_test_route_information_results import BgpTestRouteInformationResults +from test_results.models.dns_server_test_result import DnsServerTestResult +from test_results.models.dns_server_test_results import DnsServerTestResults +from test_results.models.dns_trace_test_result import DnsTraceTestResult +from test_results.models.dns_trace_test_results import DnsTraceTestResults +from test_results.models.dnssec_test_result import DnssecTestResult +from test_results.models.dnssec_test_results import DnssecTestResults +from test_results.models.epoch_time_window import EpochTimeWindow +from test_results.models.error import Error +from test_results.models.expand import Expand +from test_results.models.ftp_server_test_result import FtpServerTestResult +from test_results.models.ftp_server_test_results import FtpServerTestResults +from test_results.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response +from test_results.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response +from test_results.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response +from test_results.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response +from test_results.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response +from test_results.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response +from test_results.models.get_test_result_metrics200_response import GetTestResultMetrics200Response +from test_results.models.get_test_result_network_path_vis200_response import GetTestResultNetworkPathVis200Response +from test_results.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response +from test_results.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response +from test_results.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response +from test_results.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response +from test_results.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response +from test_results.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response +from test_results.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response +from test_results.models.get_test_results_bgp200_response import GetTestResultsBgp200Response +from test_results.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response +from test_results.models.http_test_result import HttpTestResult +from test_results.models.http_test_result_headers import HttpTestResultHeaders +from test_results.models.http_test_results import HttpTestResults +from test_results.models.link import Link +from test_results.models.marker import Marker +from test_results.models.monitor import Monitor +from test_results.models.network_test_result import NetworkTestResult +from test_results.models.network_test_results import NetworkTestResults +from test_results.models.page import Page +from test_results.models.page_load_detail_test_result import PageLoadDetailTestResult +from test_results.models.page_load_detail_test_results import PageLoadDetailTestResults +from test_results.models.page_load_test_result import PageLoadTestResult +from test_results.models.page_load_test_results import PageLoadTestResults +from test_results.models.pagination_links import PaginationLinks +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.path_vis_base_test_result import PathVisBaseTestResult +from test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from test_results.models.path_vis_detail_test_results import PathVisDetailTestResults +from test_results.models.path_vis_direction import PathVisDirection +from test_results.models.path_vis_endpoint import PathVisEndpoint +from test_results.models.path_vis_hop import PathVisHop +from test_results.models.path_vis_route import PathVisRoute +from test_results.models.path_vis_test_result import PathVisTestResult +from test_results.models.path_vis_test_results import PathVisTestResults +from test_results.models.query_window import QueryWindow +from test_results.models.rtp_stream_test_result import RtpStreamTestResult +from test_results.models.rtp_stream_test_results import RtpStreamTestResults +from test_results.models.self_links import SelfLinks +from test_results.models.self_links_links import SelfLinksLinks +from test_results.models.simple_test import SimpleTest +from test_results.models.simple_test_links import SimpleTestLinks +from test_results.models.simple_test_links_self import SimpleTestLinksSelf +from test_results.models.sip_server_error_type import SipServerErrorType +from test_results.models.sip_server_test_result import SipServerTestResult +from test_results.models.sip_server_test_results import SipServerTestResults +from test_results.models.ssl_cert import SslCert +from test_results.models.test_direction import TestDirection +from test_results.models.test_interval import TestInterval +from test_results.models.test_result import TestResult +from test_results.models.test_result_app_links import TestResultAppLinks +from test_results.models.test_type import TestType +from test_results.models.unauthorized_error import UnauthorizedError +from test_results.models.validation_error import ValidationError +from test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from test_results.models.web_transaction_detail_test_result import WebTransactionDetailTestResult +from test_results.models.web_transaction_detail_test_results import WebTransactionDetailTestResults +from test_results.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult +from test_results.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults +from test_results.models.web_transaction_test_result import WebTransactionTestResult +from test_results.models.web_transaction_test_results import WebTransactionTestResults diff --git a/test_results/test_results/models/agent.py b/test_results/test_results/models/agent.py new file mode 100644 index 00000000..02f1fba1 --- /dev/null +++ b/test_results/test_results/models/agent.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 Agent(BaseModel): + """ + Agent + """ # noqa: E501 + agent_id: Optional[StrictStr] = Field(default=None, description="Unique agent ID", alias="agentId") + agent_name: Optional[StrictStr] = Field(default=None, description="Agent name", alias="agentName") + country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId") + location: Optional[StrictStr] = Field(default=None, description="Location of the agent.") + __properties: ClassVar[List[str]] = ["agentId", "agentName", "countryId", "location"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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. + """ + excluded_fields: Set[str] = set([ + "agent_id", + "agent_name", + "country_id", + "location", + ]) + + _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({ + "agentId": obj.get("agentId"), + "agentName": obj.get("agentName"), + "countryId": obj.get("countryId"), + "location": obj.get("location") + }) + return _obj + + diff --git a/test_results/test_results/models/app_links.py b/test_results/test_results/models/app_links.py new file mode 100644 index 00000000..231da17c --- /dev/null +++ b/test_results/test_results/models/app_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.app_links_links import AppLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class AppLinks(BaseModel): + """ + AppLinks + """ # noqa: E501 + links: Optional[AppLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppLinks 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 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 AppLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": AppLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/app_links_links.py b/test_results/test_results/models/app_links_links.py new file mode 100644 index 00000000..81b1c056 --- /dev/null +++ b/test_results/test_results/models/app_links_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class AppLinksLinks(BaseModel): + """ + A links object containing the ThousandEyes App link + """ # noqa: E501 + app_link: Optional[Link] = Field(default=None, alias="appLink") + __properties: ClassVar[List[str]] = ["appLink"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppLinksLinks 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 app_link + if self.app_link: + _dict['appLink'] = self.app_link.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppLinksLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "appLink": Link.from_dict(obj["appLink"]) if obj.get("appLink") is not None else None + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/bgp_basic_test_result.py b/test_results/test_results/models/bgp_basic_test_result.py similarity index 76% rename from test_results_api/test_results_api/models/bgp_basic_test_result.py rename to test_results/test_results/models/bgp_basic_test_result.py index b342caa9..8ead0a00 100644 --- a/test_results_api/test_results_api/models/bgp_basic_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.monitor import Monitor -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.monitor import Monitor +from typing import Optional, Set +from typing_extensions import Self class BgpBasicTestResult(BaseModel): """ @@ -33,16 +30,17 @@ class BgpBasicTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") monitor: Optional[Monitor] = None prefix_id: Optional[StrictStr] = Field(default=None, description="Internally tracked prefix ID.", alias="prefixId") prefix: Optional[StrictStr] = Field(default=None, description="Prefix being tracked.") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "monitor", "prefixId", "prefix"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ class BgpBasicTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BgpBasicTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +69,14 @@ class BgpBasicTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of monitor @@ -85,7 +85,7 @@ class BgpBasicTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BgpBasicTestResult from a dict""" if obj is None: return None @@ -97,7 +97,7 @@ class BgpBasicTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "monitor": Monitor.from_dict(obj.get("monitor")) if obj.get("monitor") is not None else None, + "monitor": Monitor.from_dict(obj["monitor"]) if obj.get("monitor") is not None else None, "prefixId": obj.get("prefixId"), "prefix": obj.get("prefix") }) diff --git a/test_results_api/test_results_api/models/bgp_hop.py b/test_results/test_results/models/bgp_hop.py similarity index 79% rename from test_results_api/test_results_api/models/bgp_hop.py rename to test_results/test_results/models/bgp_hop.py index 01d745b6..9308f8fc 100644 --- a/test_results_api/test_results_api/models/bgp_hop.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class BgpHop(BaseModel): """ @@ -34,10 +30,11 @@ class BgpHop(BaseModel): as_name: Optional[StrictStr] = Field(default=None, description="Name of autonomous system.", alias="asName") __properties: ClassVar[List[str]] = ["asn", "asName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class BgpHop(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BgpHop from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class BgpHop(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "asn", + "as_name", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "asn", - "as_name", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BgpHop from a dict""" if obj is None: return None diff --git a/test_results/test_results/models/bgp_test_result.py b/test_results/test_results/models/bgp_test_result.py new file mode 100644 index 00000000..e24d74b4 --- /dev/null +++ b/test_results/test_results/models/bgp_test_result.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from test_results.models.monitor import Monitor +from typing import Optional, Set +from typing_extensions import Self + +class BgpTestResult(BaseModel): + """ + BgpTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = Field(default=None, alias="_links") + monitor: Optional[Monitor] = None + prefix_id: Optional[StrictStr] = Field(default=None, description="Internally tracked prefix ID.", alias="prefixId") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix being tracked.") + 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") + updates: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of updates tracked against this prefix by this monitor.") + path_changes: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of path changes tracked against this prefix by this monitor.", alias="pathChanges") + reachability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage reachability") + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "monitor", "prefixId", "prefix", "startTime", "endTime", "updates", "pathChanges", "reachability"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BgpTestResult 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. + """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of monitor + if self.monitor: + _dict['monitor'] = self.monitor.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BgpTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "monitor": Monitor.from_dict(obj["monitor"]) if obj.get("monitor") is not None else None, + "prefixId": obj.get("prefixId"), + "prefix": obj.get("prefix"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "updates": obj.get("updates"), + "pathChanges": obj.get("pathChanges"), + "reachability": obj.get("reachability") + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/bgp_test_results.py b/test_results/test_results/models/bgp_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/bgp_test_results.py rename to test_results/test_results/models/bgp_test_results.py index 26dc4dfe..8d97f9f5 100644 --- a/test_results_api/test_results_api/models/bgp_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.bgp_test_result import BgpTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.bgp_test_result import BgpTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class BgpTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class BgpTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class BgpTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BgpTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class BgpTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class BgpTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BgpTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class BgpTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [BgpTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [BgpTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/bgp_test_route_information_result.py b/test_results/test_results/models/bgp_test_route_information_result.py similarity index 78% rename from test_results_api/test_results_api/models/bgp_test_route_information_result.py rename to test_results/test_results/models/bgp_test_route_information_result.py index e2c6ad2a..5f0994b0 100644 --- a/test_results_api/test_results_api/models/bgp_test_route_information_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,15 +18,12 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.bgp_hop import BgpHop -from test_results_api.models.monitor import Monitor -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.bgp_hop import BgpHop +from test_results.models.monitor import Monitor +from typing import Optional, Set +from typing_extensions import Self class BgpTestRouteInformationResult(BaseModel): """ @@ -34,7 +31,7 @@ class BgpTestRouteInformationResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") monitor: Optional[Monitor] = None prefix_id: Optional[StrictStr] = Field(default=None, description="Internally tracked prefix ID.", alias="prefixId") prefix: Optional[StrictStr] = Field(default=None, description="Prefix being tracked.") @@ -42,10 +39,11 @@ class BgpTestRouteInformationResult(BaseModel): hops: Optional[List[BgpHop]] = None __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "monitor", "prefixId", "prefix", "isActive", "hops"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ class BgpTestRouteInformationResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BgpTestRouteInformationResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,12 +72,14 @@ class BgpTestRouteInformationResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of monitor @@ -95,7 +95,7 @@ class BgpTestRouteInformationResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BgpTestRouteInformationResult from a dict""" if obj is None: return None @@ -107,11 +107,11 @@ class BgpTestRouteInformationResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "monitor": Monitor.from_dict(obj.get("monitor")) if obj.get("monitor") is not None else None, + "monitor": Monitor.from_dict(obj["monitor"]) if obj.get("monitor") is not None else None, "prefixId": obj.get("prefixId"), "prefix": obj.get("prefix"), "isActive": obj.get("isActive"), - "hops": [BgpHop.from_dict(_item) for _item in obj.get("hops")] if obj.get("hops") is not None else None + "hops": [BgpHop.from_dict(_item) for _item in obj["hops"]] if obj.get("hops") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/bgp_test_route_information_results.py b/test_results/test_results/models/bgp_test_route_information_results.py similarity index 75% rename from test_results_api/test_results_api/models/bgp_test_route_information_results.py rename to test_results/test_results/models/bgp_test_route_information_results.py index 270d4418..5c3d76ae 100644 --- a/test_results_api/test_results_api/models/bgp_test_route_information_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.bgp_test_route_information_result import BgpTestRouteInformationResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.bgp_test_route_information_result import BgpTestRouteInformationResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class BgpTestRouteInformationResults(BaseModel): """ @@ -35,10 +32,11 @@ class BgpTestRouteInformationResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class BgpTestRouteInformationResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BgpTestRouteInformationResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class BgpTestRouteInformationResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class BgpTestRouteInformationResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BgpTestRouteInformationResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class BgpTestRouteInformationResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [BgpTestRouteInformationResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [BgpTestRouteInformationResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/dns_server_test_result.py b/test_results/test_results/models/dns_server_test_result.py similarity index 80% rename from test_results_api/test_results_api/models/dns_server_test_result.py rename to test_results/test_results/models/dns_server_test_result.py index ef4617e6..27b989e0 100644 --- a/test_results_api/test_results_api/models/dns_server_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class DnsServerTestResult(BaseModel): """ @@ -33,7 +30,7 @@ class DnsServerTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = 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 @@ -44,10 +41,11 @@ class DnsServerTestResult(BaseModel): mappings: Optional[StrictStr] = Field(default=None, description="Final mappings returned from the request") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "serverId", "server", "resolutionTime", "errorDetails", "mappings"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +58,7 @@ class DnsServerTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsServerTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,19 +81,21 @@ class DnsServerTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + "server_id", + "server", + "resolution_time", + "error_details", + "mappings", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "server_id", - "server", - "resolution_time", - "error_details", - "mappings", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -104,7 +104,7 @@ class DnsServerTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsServerTestResult from a dict""" if obj is None: return None @@ -118,7 +118,7 @@ class DnsServerTestResult(BaseModel): "_links": obj.get("_links"), "startTime": obj.get("startTime"), "endTime": obj.get("endTime"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "serverId": obj.get("serverId"), "server": obj.get("server"), "resolutionTime": obj.get("resolutionTime"), diff --git a/test_results_api/test_results_api/models/dns_server_test_results.py b/test_results/test_results/models/dns_server_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/dns_server_test_results.py rename to test_results/test_results/models/dns_server_test_results.py index a7adc3b6..41ce3d06 100644 --- a/test_results_api/test_results_api/models/dns_server_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dns_server_test_result import DnsServerTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.dns_server_test_result import DnsServerTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class DnsServerTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class DnsServerTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class DnsServerTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsServerTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class DnsServerTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class DnsServerTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsServerTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class DnsServerTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [DnsServerTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [DnsServerTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/dns_trace_test_result.py b/test_results/test_results/models/dns_trace_test_result.py similarity index 81% rename from test_results_api/test_results_api/models/dns_trace_test_result.py rename to test_results/test_results/models/dns_trace_test_result.py index cacfb946..59c43e13 100644 --- a/test_results_api/test_results_api/models/dns_trace_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class DnsTraceTestResult(BaseModel): """ @@ -33,7 +30,7 @@ class DnsTraceTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = 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 @@ -46,10 +43,11 @@ class DnsTraceTestResult(BaseModel): mappings: Optional[StrictStr] = Field(default=None, description="Final mappings returned from the request") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "output", "errorDetails", "queries", "failedQueries", "finalServerQueried", "finalQueryTime", "mappings"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +60,7 @@ class DnsTraceTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsTraceTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,21 +85,23 @@ class DnsTraceTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + "output", + "error_details", + "queries", + "failed_queries", + "final_server_queried", + "final_query_time", + "mappings", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "output", - "error_details", - "queries", - "failed_queries", - "final_server_queried", - "final_query_time", - "mappings", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -110,7 +110,7 @@ class DnsTraceTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsTraceTestResult from a dict""" if obj is None: return None @@ -124,7 +124,7 @@ class DnsTraceTestResult(BaseModel): "_links": obj.get("_links"), "startTime": obj.get("startTime"), "endTime": obj.get("endTime"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "output": obj.get("output"), "errorDetails": obj.get("errorDetails"), "queries": obj.get("queries"), diff --git a/test_results_api/test_results_api/models/dns_trace_test_results.py b/test_results/test_results/models/dns_trace_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/dns_trace_test_results.py rename to test_results/test_results/models/dns_trace_test_results.py index 548d28de..b68c1f48 100644 --- a/test_results_api/test_results_api/models/dns_trace_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dns_trace_test_result import DnsTraceTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.dns_trace_test_result import DnsTraceTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class DnsTraceTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class DnsTraceTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class DnsTraceTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsTraceTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class DnsTraceTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class DnsTraceTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsTraceTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class DnsTraceTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [DnsTraceTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [DnsTraceTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/dnssec_test_result.py b/test_results/test_results/models/dnssec_test_result.py similarity index 78% rename from test_results_api/test_results_api/models/dnssec_test_result.py rename to test_results/test_results/models/dnssec_test_result.py index c2a950cd..ef27bb65 100644 --- a/test_results_api/test_results_api/models/dnssec_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class DnssecTestResult(BaseModel): """ @@ -33,7 +30,7 @@ class DnssecTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = 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 @@ -41,10 +38,11 @@ class DnssecTestResult(BaseModel): error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered", alias="errorDetails") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "isValid", "errorDetails"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +55,7 @@ class DnssecTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnssecTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,16 +75,18 @@ class DnssecTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + "is_valid", + "error_details", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "is_valid", - "error_details", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -95,7 +95,7 @@ class DnssecTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnssecTestResult from a dict""" if obj is None: return None @@ -109,7 +109,7 @@ class DnssecTestResult(BaseModel): "_links": obj.get("_links"), "startTime": obj.get("startTime"), "endTime": obj.get("endTime"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "isValid": obj.get("isValid"), "errorDetails": obj.get("errorDetails") }) diff --git a/test_results_api/test_results_api/models/dnssec_test_results.py b/test_results/test_results/models/dnssec_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/dnssec_test_results.py rename to test_results/test_results/models/dnssec_test_results.py index 4cd4531b..c9ab3866 100644 --- a/test_results_api/test_results_api/models/dnssec_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.dnssec_test_result import DnssecTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.dnssec_test_result import DnssecTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class DnssecTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class DnssecTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class DnssecTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnssecTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class DnssecTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class DnssecTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnssecTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class DnssecTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [DnssecTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [DnssecTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/epoch_time_window.py b/test_results/test_results/models/epoch_time_window.py similarity index 80% rename from test_results_api/test_results_api/models/epoch_time_window.py rename to test_results/test_results/models/epoch_time_window.py index 67d74595..9646ae1d 100644 --- a/test_results_api/test_results_api/models/epoch_time_window.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EpochTimeWindow(BaseModel): """ @@ -34,10 +30,11 @@ class EpochTimeWindow(BaseModel): end_time: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the end time of the round", alias="endTime") __properties: ClassVar[List[str]] = ["startTime", "endTime"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class EpochTimeWindow(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EpochTimeWindow from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class EpochTimeWindow(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "start_time", + "end_time", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "start_time", - "end_time", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EpochTimeWindow from a dict""" if obj is None: return None diff --git a/test_results/test_results/models/error.py b/test_results/test_results/models/error.py new file mode 100644 index 00000000..627f3a90 --- /dev/null +++ b/test_results/test_results/models/error.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/test_results/test_results/models/expand.py b/test_results/test_results/models/expand.py new file mode 100644 index 00000000..33cb337a --- /dev/null +++ b/test_results/test_results/models/expand.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 + """ + HEADER = 'header' + CERTIFICATE = 'certificate' + + @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/test_results_api/test_results_api/models/ftp_server_test_result.py b/test_results/test_results/models/ftp_server_test_result.py similarity index 75% rename from test_results_api/test_results_api/models/ftp_server_test_result.py rename to test_results/test_results/models/ftp_server_test_result.py index 8e2fe026..7e2183a6 100644 --- a/test_results_api/test_results_api/models/ftp_server_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class FtpServerTestResult(BaseModel): """ @@ -33,7 +30,9 @@ class FtpServerTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = 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 server_ip: Optional[StrictStr] = Field(default=None, description="IP address of destination server", alias="serverIp") response_code: Optional[StrictInt] = Field(default=None, description="FTP response code", alias="responseCode") @@ -48,12 +47,13 @@ class FtpServerTestResult(BaseModel): 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") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "serverIp", "responseCode", "dnsTime", "connectTime", "negotiationTime", "waitTime", "responseTime", "transferTime", "wireSize", "totalTime", "errorType", "errorDetails", "throughput"] + __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 = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -66,7 +66,7 @@ class FtpServerTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of FtpServerTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -94,26 +94,32 @@ class FtpServerTestResult(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", + "server_ip", + "response_code", + "dns_time", + "connect_time", + "negotiation_time", + "wait_time", + "response_time", + "transfer_time", + "wire_size", + "total_time", + "error_type", + "error_details", + "throughput", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "server_ip", - "response_code", - "dns_time", - "connect_time", - "negotiation_time", - "wait_time", - "response_time", - "transfer_time", - "wire_size", - "total_time", - "error_type", - "error_details", - "throughput", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -122,7 +128,7 @@ class FtpServerTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of FtpServerTestResult from a dict""" if obj is None: return None @@ -134,7 +140,9 @@ class FtpServerTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") 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, "serverIp": obj.get("serverIp"), "responseCode": obj.get("responseCode"), "dnsTime": obj.get("dnsTime"), diff --git a/test_results_api/test_results_api/models/ftp_server_test_results.py b/test_results/test_results/models/ftp_server_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/ftp_server_test_results.py rename to test_results/test_results/models/ftp_server_test_results.py index c68fdb3c..55b1571f 100644 --- a/test_results_api/test_results_api/models/ftp_server_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.ftp_server_test_result import FtpServerTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.ftp_server_test_result import FtpServerTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class FtpServerTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class FtpServerTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class FtpServerTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of FtpServerTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class FtpServerTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class FtpServerTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of FtpServerTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class FtpServerTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [FtpServerTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [FtpServerTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results/test_results/models/get_test_pathvis_agent_round200_response.py b/test_results/test_results/models/get_test_pathvis_agent_round200_response.py new file mode 100644 index 00000000..80658e56 --- /dev/null +++ b/test_results/test_results/models/get_test_pathvis_agent_round200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from test_results.models.self_links_links import SelfLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTestPathvisAgentRound200Response(BaseModel): + """ + GetTestPathvisAgentRound200Response + """ # noqa: E501 + results: Optional[List[PathVisDetailTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestPathvisAgentRound200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestPathvisAgentRound200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/get_test_result_dns_server200_response.py b/test_results/test_results/models/get_test_result_dns_server200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_dns_server200_response.py rename to test_results/test_results/models/get_test_result_dns_server200_response.py index aff7d65a..87e0edad 100644 --- a/test_results_api/test_results_api/models/get_test_result_dns_server200_response.py +++ b/test_results/test_results/models/get_test_result_dns_server200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dns_server_test_result import DnsServerTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.dns_server_test_result import DnsServerTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultDnsServer200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultDnsServer200Response(BaseModel): 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") results: Optional[List[DnsServerTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultDnsServer200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultDnsServer200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultDnsServer200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultDnsServer200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultDnsServer200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultDnsServer200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [DnsServerTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [DnsServerTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/get_test_result_dns_trace200_response.py b/test_results/test_results/models/get_test_result_dns_trace200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_dns_trace200_response.py rename to test_results/test_results/models/get_test_result_dns_trace200_response.py index 52455706..0e95960e 100644 --- a/test_results_api/test_results_api/models/get_test_result_dns_trace200_response.py +++ b/test_results/test_results/models/get_test_result_dns_trace200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dns_trace_test_result import DnsTraceTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.dns_trace_test_result import DnsTraceTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultDnsTrace200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultDnsTrace200Response(BaseModel): 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") results: Optional[List[DnsTraceTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultDnsTrace200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultDnsTrace200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultDnsTrace200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultDnsTrace200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultDnsTrace200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultDnsTrace200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [DnsTraceTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [DnsTraceTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/get_test_result_dnssec200_response.py b/test_results/test_results/models/get_test_result_dnssec200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_dnssec200_response.py rename to test_results/test_results/models/get_test_result_dnssec200_response.py index 7a163492..6658dba4 100644 --- a/test_results_api/test_results_api/models/get_test_result_dnssec200_response.py +++ b/test_results/test_results/models/get_test_result_dnssec200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.dnssec_test_result import DnssecTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.dnssec_test_result import DnssecTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultDnssec200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultDnssec200Response(BaseModel): 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") results: Optional[List[DnssecTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultDnssec200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultDnssec200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultDnssec200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultDnssec200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultDnssec200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultDnssec200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [DnssecTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [DnssecTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/get_test_result_ftp_server200_response.py b/test_results/test_results/models/get_test_result_ftp_server200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_ftp_server200_response.py rename to test_results/test_results/models/get_test_result_ftp_server200_response.py index 0b647f77..f7dafbc9 100644 --- a/test_results_api/test_results_api/models/get_test_result_ftp_server200_response.py +++ b/test_results/test_results/models/get_test_result_ftp_server200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.ftp_server_test_result import FtpServerTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.ftp_server_test_result import FtpServerTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultFtpServer200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultFtpServer200Response(BaseModel): 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") results: Optional[List[FtpServerTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultFtpServer200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultFtpServer200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultFtpServer200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultFtpServer200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultFtpServer200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultFtpServer200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [FtpServerTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [FtpServerTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results/test_results/models/get_test_result_http_server200_response.py b/test_results/test_results/models/get_test_result_http_server200_response.py new file mode 100644 index 00000000..7a7fdb8a --- /dev/null +++ b/test_results/test_results/models/get_test_result_http_server200_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.http_test_result import HttpTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultHttpServer200Response(BaseModel): + """ + GetTestResultHttpServer200Response + """ # noqa: E501 + 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") + results: Optional[List[HttpTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultHttpServer200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultHttpServer200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "results": [HttpTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/get_test_result_metrics200_response.py b/test_results/test_results/models/get_test_result_metrics200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_metrics200_response.py rename to test_results/test_results/models/get_test_result_metrics200_response.py index 283507f3..26579f3d 100644 --- a/test_results_api/test_results_api/models/get_test_result_metrics200_response.py +++ b/test_results/test_results/models/get_test_result_metrics200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.network_test_result import NetworkTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultMetrics200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultMetrics200Response(BaseModel): 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") results: Optional[List[NetworkTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultMetrics200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultMetrics200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultMetrics200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultMetrics200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultMetrics200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultMetrics200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [NetworkTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [NetworkTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results/test_results/models/get_test_result_network_path_vis200_response.py b/test_results/test_results/models/get_test_result_network_path_vis200_response.py new file mode 100644 index 00000000..f945ca3a --- /dev/null +++ b/test_results/test_results/models/get_test_result_network_path_vis200_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.path_vis_test_result import PathVisTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultNetworkPathVis200Response(BaseModel): + """ + GetTestResultNetworkPathVis200Response + """ # noqa: E501 + 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") + results: Optional[List[PathVisTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultNetworkPathVis200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultNetworkPathVis200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "results": [PathVisTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/get_test_result_page_load200_response.py b/test_results/test_results/models/get_test_result_page_load200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_page_load200_response.py rename to test_results/test_results/models/get_test_result_page_load200_response.py index e09a2c49..8205c735 100644 --- a/test_results_api/test_results_api/models/get_test_result_page_load200_response.py +++ b/test_results/test_results/models/get_test_result_page_load200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.page_load_test_result import PageLoadTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.page_load_test_result import PageLoadTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultPageLoad200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultPageLoad200Response(BaseModel): 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") results: Optional[List[PageLoadTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultPageLoad200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultPageLoad200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultPageLoad200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultPageLoad200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultPageLoad200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultPageLoad200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [PageLoadTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [PageLoadTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results/test_results/models/get_test_result_page_load_component_detail200_response.py b/test_results/test_results/models/get_test_result_page_load_component_detail200_response.py new file mode 100644 index 00000000..5200dc1d --- /dev/null +++ b/test_results/test_results/models/get_test_result_page_load_component_detail200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.page_load_detail_test_result import PageLoadDetailTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultPageLoadComponentDetail200Response(BaseModel): + """ + GetTestResultPageLoadComponentDetail200Response + """ # noqa: E501 + results: Optional[List[PageLoadDetailTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultPageLoadComponentDetail200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultPageLoadComponentDetail200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PageLoadDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/get_test_result_rtp_stream200_response.py b/test_results/test_results/models/get_test_result_rtp_stream200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_rtp_stream200_response.py rename to test_results/test_results/models/get_test_result_rtp_stream200_response.py index ab25d7e0..e6a79e61 100644 --- a/test_results_api/test_results_api/models/get_test_result_rtp_stream200_response.py +++ b/test_results/test_results/models/get_test_result_rtp_stream200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.rtp_stream_test_result import RtpStreamTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.rtp_stream_test_result import RtpStreamTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class GetTestResultRtpStream200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultRtpStream200Response(BaseModel): 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") results: Optional[List[RtpStreamTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultRtpStream200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultRtpStream200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultRtpStream200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultRtpStream200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultRtpStream200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultRtpStream200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [RtpStreamTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [RtpStreamTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/get_test_result_sip_server200_response.py b/test_results/test_results/models/get_test_result_sip_server200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_sip_server200_response.py rename to test_results/test_results/models/get_test_result_sip_server200_response.py index 4307898e..5a4ccdb5 100644 --- a/test_results_api/test_results_api/models/get_test_result_sip_server200_response.py +++ b/test_results/test_results/models/get_test_result_sip_server200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.sip_server_test_result import SipServerTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from test_results.models.sip_server_test_result import SipServerTestResult +from typing import Optional, Set +from typing_extensions import Self class GetTestResultSipServer200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultSipServer200Response(BaseModel): 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") results: Optional[List[SipServerTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultSipServer200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultSipServer200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultSipServer200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultSipServer200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultSipServer200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultSipServer200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [SipServerTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [SipServerTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/get_test_result_web_transactions200_response.py b/test_results/test_results/models/get_test_result_web_transactions200_response.py similarity index 75% rename from test_results_api/test_results_api/models/get_test_result_web_transactions200_response.py rename to test_results/test_results/models/get_test_result_web_transactions200_response.py index 5d02a6c2..9e1e128e 100644 --- a/test_results_api/test_results_api/models/get_test_result_web_transactions200_response.py +++ b/test_results/test_results/models/get_test_result_web_transactions200_response.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ 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 pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.web_transaction_test_result import WebTransactionTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from test_results.models.web_transaction_test_result import WebTransactionTestResult +from typing import Optional, Set +from typing_extensions import Self class GetTestResultWebTransactions200Response(BaseModel): """ @@ -37,13 +34,14 @@ class GetTestResultWebTransactions200Response(BaseModel): 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") results: Optional[List[WebTransactionTestResult]] = None test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class GetTestResultWebTransactions200Response(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTestResultWebTransactions200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,12 +70,14 @@ class GetTestResultWebTransactions200Response(BaseModel): * 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={ - "start_date", - "end_date", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -96,7 +96,7 @@ class GetTestResultWebTransactions200Response(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTestResultWebTransactions200Response from a dict""" if obj is None: return None @@ -107,9 +107,9 @@ class GetTestResultWebTransactions200Response(BaseModel): _obj = cls.model_validate({ "startDate": obj.get("startDate"), "endDate": obj.get("endDate"), - "results": [WebTransactionTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None + "results": [WebTransactionTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) return _obj diff --git a/test_results/test_results/models/get_test_result_web_transactions_component_detail200_response.py b/test_results/test_results/models/get_test_result_web_transactions_component_detail200_response.py new file mode 100644 index 00000000..3bf6bbcf --- /dev/null +++ b/test_results/test_results/models/get_test_result_web_transactions_component_detail200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from test_results.models.web_transaction_detail_test_result import WebTransactionDetailTestResult +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultWebTransactionsComponentDetail200Response(BaseModel): + """ + GetTestResultWebTransactionsComponentDetail200Response + """ # noqa: E501 + results: Optional[List[WebTransactionDetailTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultWebTransactionsComponentDetail200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultWebTransactionsComponentDetail200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [WebTransactionDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/get_test_result_web_transactions_component_page_detail200_response.py b/test_results/test_results/models/get_test_result_web_transactions_component_page_detail200_response.py new file mode 100644 index 00000000..9b8fe5b1 --- /dev/null +++ b/test_results/test_results/models/get_test_result_web_transactions_component_page_detail200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from test_results.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultWebTransactionsComponentPageDetail200Response(BaseModel): + """ + GetTestResultWebTransactionsComponentPageDetail200Response + """ # noqa: E501 + results: Optional[List[WebTransactionPageDetailTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultWebTransactionsComponentPageDetail200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultWebTransactionsComponentPageDetail200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [WebTransactionPageDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/get_test_results_bgp200_response.py b/test_results/test_results/models/get_test_results_bgp200_response.py new file mode 100644 index 00000000..a8f1ec69 --- /dev/null +++ b/test_results/test_results/models/get_test_results_bgp200_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.bgp_test_result import BgpTestResult +from test_results.models.pagination_links_links import PaginationLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultsBgp200Response(BaseModel): + """ + GetTestResultsBgp200Response + """ # noqa: E501 + 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") + results: Optional[List[BgpTestResult]] = None + test: Optional[SimpleTest] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultsBgp200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultsBgp200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "results": [BgpTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/get_test_results_bgp_prefix200_response.py b/test_results/test_results/models/get_test_results_bgp_prefix200_response.py new file mode 100644 index 00000000..c2189aca --- /dev/null +++ b/test_results/test_results/models/get_test_results_bgp_prefix200_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.bgp_test_route_information_result import BgpTestRouteInformationResult +from test_results.models.self_links_links import SelfLinksLinks +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTestResultsBgpPrefix200Response(BaseModel): + """ + GetTestResultsBgpPrefix200Response + """ # noqa: E501 + results: Optional[List[BgpTestRouteInformationResult]] = None + test: Optional[SimpleTest] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["results", "test", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestResultsBgpPrefix200Response 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + # 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 GetTestResultsBgpPrefix200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [BgpTestRouteInformationResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/http_test_result.py b/test_results/test_results/models/http_test_result.py new file mode 100644 index 00000000..c3571094 --- /dev/null +++ b/test_results/test_results/models/http_test_result.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from test_results.models.agent import Agent +from test_results.models.http_test_result_headers import HttpTestResultHeaders +from test_results.models.ssl_cert import SslCert +from typing import Optional, Set +from typing_extensions import Self + +class HttpTestResult(BaseModel): + """ + HttpTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = 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 + server_ip: Optional[StrictStr] = Field(default=None, description="IP address of destination server", alias="serverIp") + response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code", alias="responseCode") + num_redirects: Optional[StrictInt] = Field(default=None, description="Number of redirects", alias="numRedirects") + redirect_time: Optional[StrictInt] = Field(default=None, description="Cumulative redirect timing in milliseconds", alias="redirectTime") + dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds", alias="dnsTime") + ssl_time: Optional[StrictInt] = Field(default=None, description="Time to negotiate SSL/TLS in milliseconds", alias="sslTime") + connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server", alias="connectTime") + wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response in milliseconds", alias="waitTime") + receive_time: Optional[StrictInt] = Field(default=None, description="Elapsed time between first and last byte of response in milliseconds", alias="receiveTime") + wire_size: Optional[StrictInt] = Field(default=None, description="Size of content in bytes", alias="wireSize") + response_time: Optional[StrictInt] = Field(default=None, description="Time to first byte in milliseconds", alias="responseTime") + throughput: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="WireSize divided by receiveTime in byter per second") + total_time: Optional[StrictInt] = Field(default=None, description="response time + receive time", alias="totalTime") + headers: Optional[HttpTestResultHeaders] = None + 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") + ssl_cipher: Optional[StrictStr] = Field(default=None, description="Cipher suite", alias="sslCipher") + ssl_version: Optional[StrictStr] = Field(default=None, description="TLS version", alias="sslVersion") + ssl_certificates: Optional[List[SslCert]] = Field(default=None, alias="sslCertificates") + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "serverIp", "responseCode", "numRedirects", "redirectTime", "dnsTime", "sslTime", "connectTime", "waitTime", "receiveTime", "wireSize", "responseTime", "throughput", "totalTime", "headers", "errorType", "errorDetails", "sslCipher", "sslVersion", "sslCertificates"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpTestResult 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([ + "var_date", + "round_id", + "start_time", + "end_time", + "server_ip", + "error_type", + "error_details", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + # override the default output from pydantic by calling `to_dict()` of headers + if self.headers: + _dict['headers'] = self.headers.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in ssl_certificates (list) + _items = [] + if self.ssl_certificates: + for _item in self.ssl_certificates: + if _item: + _items.append(_item.to_dict()) + _dict['sslCertificates'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "serverIp": obj.get("serverIp"), + "responseCode": obj.get("responseCode"), + "numRedirects": obj.get("numRedirects"), + "redirectTime": obj.get("redirectTime"), + "dnsTime": obj.get("dnsTime"), + "sslTime": obj.get("sslTime"), + "connectTime": obj.get("connectTime"), + "waitTime": obj.get("waitTime"), + "receiveTime": obj.get("receiveTime"), + "wireSize": obj.get("wireSize"), + "responseTime": obj.get("responseTime"), + "throughput": obj.get("throughput"), + "totalTime": obj.get("totalTime"), + "headers": HttpTestResultHeaders.from_dict(obj["headers"]) if obj.get("headers") is not None else None, + "errorType": obj.get("errorType"), + "errorDetails": obj.get("errorDetails"), + "sslCipher": obj.get("sslCipher"), + "sslVersion": obj.get("sslVersion"), + "sslCertificates": [SslCert.from_dict(_item) for _item in obj["sslCertificates"]] if obj.get("sslCertificates") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/http_test_result_headers.py b/test_results/test_results/models/http_test_result_headers.py new file mode 100644 index 00000000..4167e2f5 --- /dev/null +++ b/test_results/test_results/models/http_test_result_headers.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 HttpTestResultHeaders(BaseModel): + """ + Expandable object containing both request and response headers + """ # noqa: E501 + request_headers: Optional[StrictStr] = Field(default=None, description="Crlf-delimited list of request headers in header: value format", alias="requestHeaders") + response_headers: Optional[StrictStr] = Field(default=None, description="crlf-delimited list of response headers in header: value format", alias="responseHeaders") + __properties: ClassVar[List[str]] = ["requestHeaders", "responseHeaders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpTestResultHeaders 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 HttpTestResultHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "requestHeaders": obj.get("requestHeaders"), + "responseHeaders": obj.get("responseHeaders") + }) + return _obj + + diff --git a/test_results/test_results/models/http_test_results.py b/test_results/test_results/models/http_test_results.py new file mode 100644 index 00000000..2e7b480b --- /dev/null +++ b/test_results/test_results/models/http_test_results.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.http_test_result import HttpTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class HttpTestResults(BaseModel): + """ + HttpTestResults + """ # noqa: E501 + results: Optional[List[HttpTestResult]] = None + test: Optional[SimpleTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [HttpTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/link.py b/test_results/test_results/models/link.py new file mode 100644 index 00000000..3fb691f2 --- /dev/null +++ b/test_results/test_results/models/link.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/test_results_api/test_results_api/models/marker.py b/test_results/test_results/models/marker.py similarity index 79% rename from test_results_api/test_results_api/models/marker.py rename to test_results/test_results/models/marker.py index 4c8d75d6..3b890b93 100644 --- a/test_results_api/test_results_api/models/marker.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Marker(BaseModel): """ @@ -34,10 +30,11 @@ class Marker(BaseModel): duration: Optional[StrictInt] = Field(default=None, description="Total time recorded by marker in milliseconds") __properties: ClassVar[List[str]] = ["name", "duration"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class Marker(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Marker from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,18 +63,20 @@ class Marker(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "name", + "duration", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "name", - "duration", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Marker from a dict""" if obj is None: return None diff --git a/test_results/test_results/models/monitor.py b/test_results/test_results/models/monitor.py new file mode 100644 index 00000000..2f2ee1e5 --- /dev/null +++ b/test_results/test_results/models/monitor.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 Monitor(BaseModel): + """ + Monitor + """ # noqa: E501 + monitor_id: Optional[StrictStr] = Field(default=None, description="Unique monitor ID.", alias="monitorId") + monitor_name: Optional[StrictStr] = Field(default=None, description="The name of the Monitor.", alias="monitorName") + country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code.", alias="countryId") + __properties: ClassVar[List[str]] = ["monitorId", "monitorName", "countryId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "monitor_id", + "monitor_name", + "country_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({ + "monitorId": obj.get("monitorId"), + "monitorName": obj.get("monitorName"), + "countryId": obj.get("countryId") + }) + return _obj + + diff --git a/test_results/test_results/models/network_test_result.py b/test_results/test_results/models/network_test_result.py new file mode 100644 index 00000000..3a1a4521 --- /dev/null +++ b/test_results/test_results/models/network_test_result.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from test_results.models.agent import Agent +from test_results.models.test_direction import TestDirection +from typing import Optional, Set +from typing_extensions import Self + +class NetworkTestResult(BaseModel): + """ + NetworkTestResult + """ # noqa: E501 + var_date: Optional[datetime] = Field(default=None, description="Data point date in 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[Dict[str, Any]] = 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") + available_bandwidth: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The bandwidth from the client to the server measured in Mbps. This value is not available if bandwidth testing is disabled, if no value could be calculated, or if the target is a proxy.", alias="availableBandwidth") + avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination", alias="avgLatency") + bandwidth: Optional[Union[StrictFloat, StrictInt]] = None + capacity: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The capacity from the client to the server measured in Mbps. This value is not available if bandwidth testing is disabled, if no value could be calculated, or if the target is a proxy.") + jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency") + loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination") + 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") + packets_by_second: Optional[List[List[StrictInt]]] = Field(default=None, description="Number of packets sent and received in a second.", alias="packetsBySecond") + agent: Optional[Agent] = None + server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") + server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") + direction: Optional[TestDirection] = None + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "availableBandwidth", "avgLatency", "bandwidth", "capacity", "jitter", "loss", "maxLatency", "minLatency", "packetsBySecond", "agent", "serverIp", "server", "direction"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkTestResult 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([ + "var_date", + "round_id", + "start_time", + "end_time", + "available_bandwidth", + "avg_latency", + "bandwidth", + "capacity", + "jitter", + "loss", + "max_latency", + "min_latency", + "packets_by_second", + "server_ip", + "server", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "availableBandwidth": obj.get("availableBandwidth"), + "avgLatency": obj.get("avgLatency"), + "bandwidth": obj.get("bandwidth"), + "capacity": obj.get("capacity"), + "jitter": obj.get("jitter"), + "loss": obj.get("loss"), + "maxLatency": obj.get("maxLatency"), + "minLatency": obj.get("minLatency"), + "packetsBySecond": obj.get("packetsBySecond"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "serverIp": obj.get("serverIp"), + "server": obj.get("server"), + "direction": obj.get("direction") + }) + return _obj + + diff --git a/test_results/test_results/models/network_test_results.py b/test_results/test_results/models/network_test_results.py new file mode 100644 index 00000000..68f46f1e --- /dev/null +++ b/test_results/test_results/models/network_test_results.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.network_test_result import NetworkTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class NetworkTestResults(BaseModel): + """ + NetworkTestResults + """ # noqa: E501 + results: Optional[List[NetworkTestResult]] = None + test: Optional[SimpleTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [NetworkTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/page.py b/test_results/test_results/models/page.py similarity index 81% rename from test_results_api/test_results_api/models/page.py rename to test_results/test_results/models/page.py index 7008012b..5e8c8d2d 100644 --- a/test_results_api/test_results_api/models/page.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ 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, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Page(BaseModel): """ @@ -37,10 +33,11 @@ class Page(BaseModel): duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Time spent on page in milliseconds") __properties: ClassVar[List[str]] = ["pageNum", "pageName", "componentCount", "errorCount", "duration"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class Page(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Page from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,21 +69,23 @@ class Page(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "page_num", + "page_name", + "component_count", + "error_count", + "duration", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "page_num", - "page_name", - "component_count", - "error_count", - "duration", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Page from a dict""" if obj is None: return None diff --git a/test_results_api/test_results_api/models/page_load_detail_test_result.py b/test_results/test_results/models/page_load_detail_test_result.py similarity index 78% rename from test_results_api/test_results_api/models/page_load_detail_test_result.py rename to test_results/test_results/models/page_load_detail_test_result.py index 84696f41..53e07e3e 100644 --- a/test_results_api/test_results_api/models/page_load_detail_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class PageLoadDetailTestResult(BaseModel): """ @@ -33,7 +30,7 @@ class PageLoadDetailTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") agent: Optional[Agent] = None response_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Time to first byte in milliseconds", alias="responseTime") total_size: Optional[StrictInt] = Field(default=None, description="Sum of wire size of all objects on page in bytes", alias="totalSize") @@ -41,13 +38,14 @@ class PageLoadDetailTestResult(BaseModel): num_errors: Optional[StrictInt] = Field(default=None, description="Number of objects which encountered errors during download", alias="numErrors") dom_load_time: Optional[StrictInt] = Field(default=None, description="Time to interaction in milliseconds", alias="domLoadTime") page_load_time: Optional[StrictInt] = Field(default=None, description="Time to completely load page in milliseconds", alias="pageLoadTime") - har: Optional[Union[str, Any]] = Field(default=None, description="See [HAR specification](http://www.softwareishard.com/blog/har-12-spec/) for details") + har: Optional[Dict[str, Any]] = Field(default=None, description="See [HAR specification](http://www.softwareishard.com/blog/har-12-spec/) for details") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "responseTime", "totalSize", "numObjects", "numErrors", "domLoadTime", "pageLoadTime", "har"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +58,7 @@ class PageLoadDetailTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PageLoadDetailTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,19 +81,21 @@ class PageLoadDetailTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "response_time", + "total_size", + "num_objects", + "num_errors", + "dom_load_time", + "page_load_time", + "har", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "response_time", - "total_size", - "num_objects", - "num_errors", - "dom_load_time", - "page_load_time", - "har", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -104,7 +104,7 @@ class PageLoadDetailTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PageLoadDetailTestResult from a dict""" if obj is None: return None @@ -116,7 +116,7 @@ class PageLoadDetailTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "responseTime": obj.get("responseTime"), "totalSize": obj.get("totalSize"), "numObjects": obj.get("numObjects"), diff --git a/test_results_api/test_results_api/models/page_load_detail_test_results.py b/test_results/test_results/models/page_load_detail_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/page_load_detail_test_results.py rename to test_results/test_results/models/page_load_detail_test_results.py index 682cda55..c371f934 100644 --- a/test_results_api/test_results_api/models/page_load_detail_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.page_load_detail_test_result import PageLoadDetailTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.page_load_detail_test_result import PageLoadDetailTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class PageLoadDetailTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class PageLoadDetailTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class PageLoadDetailTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PageLoadDetailTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class PageLoadDetailTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class PageLoadDetailTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PageLoadDetailTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class PageLoadDetailTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [PageLoadDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [PageLoadDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/page_load_test_result.py b/test_results/test_results/models/page_load_test_result.py similarity index 81% rename from test_results_api/test_results_api/models/page_load_test_result.py rename to test_results/test_results/models/page_load_test_result.py index 9415e02d..983ee906 100644 --- a/test_results_api/test_results_api/models/page_load_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ 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, StrictFloat, StrictInt -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class PageLoadTestResult(BaseModel): """ @@ -33,7 +30,7 @@ class PageLoadTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") agent: Optional[Agent] = None response_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Time to first byte in milliseconds", alias="responseTime") total_size: Optional[StrictInt] = Field(default=None, description="Sum of wire size of all objects on page in bytes", alias="totalSize") @@ -43,10 +40,11 @@ class PageLoadTestResult(BaseModel): page_load_time: Optional[StrictInt] = Field(default=None, description="Time to completely load page in milliseconds", alias="pageLoadTime") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "responseTime", "totalSize", "numObjects", "numErrors", "domLoadTime", "pageLoadTime"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +57,7 @@ class PageLoadTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PageLoadTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,18 +79,20 @@ class PageLoadTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "response_time", + "total_size", + "num_objects", + "num_errors", + "dom_load_time", + "page_load_time", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "response_time", - "total_size", - "num_objects", - "num_errors", - "dom_load_time", - "page_load_time", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -101,7 +101,7 @@ class PageLoadTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PageLoadTestResult from a dict""" if obj is None: return None @@ -113,7 +113,7 @@ class PageLoadTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "responseTime": obj.get("responseTime"), "totalSize": obj.get("totalSize"), "numObjects": obj.get("numObjects"), diff --git a/test_results_api/test_results_api/models/page_load_test_results.py b/test_results/test_results/models/page_load_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/page_load_test_results.py rename to test_results/test_results/models/page_load_test_results.py index a9cbdc43..b3c5a627 100644 --- a/test_results_api/test_results_api/models/page_load_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.page_load_test_result import PageLoadTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.page_load_test_result import PageLoadTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class PageLoadTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class PageLoadTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class PageLoadTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PageLoadTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class PageLoadTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class PageLoadTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PageLoadTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class PageLoadTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [PageLoadTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [PageLoadTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results/test_results/models/pagination_links.py b/test_results/test_results/models/pagination_links.py new file mode 100644 index 00000000..ff63d94a --- /dev/null +++ b/test_results/test_results/models/pagination_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/pagination_links_links.py b/test_results/test_results/models/pagination_links_links.py new file mode 100644 index 00000000..6f94ab24 --- /dev/null +++ b/test_results/test_results/models/pagination_links_links.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinksLinks(BaseModel): + """ + PaginationLinksLinks + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationLinksLinks 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 PaginationLinksLinks 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/test_results/test_results/models/path_vis_base_test_result.py b/test_results/test_results/models/path_vis_base_test_result.py new file mode 100644 index 00000000..5aee0a0f --- /dev/null +++ b/test_results/test_results/models/path_vis_base_test_result.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.agent import Agent +from test_results.models.path_vis_direction import PathVisDirection +from typing import Optional, Set +from typing_extensions import Self + +class PathVisBaseTestResult(BaseModel): + """ + PathVisBaseTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = 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 + server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") + server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") + source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source agent", alias="sourceIp") + source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source agent", alias="sourcePrefix") + target_is_proxy: Optional[StrictBool] = Field(default=None, description="Specifies whether the traces are targeting a proxy. If not set, it is considered as false.", alias="targetIsProxy") + direction: Optional[PathVisDirection] = None + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "server", "serverIp", "sourceIp", "sourcePrefix", "targetIsProxy", "direction"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisBaseTestResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + "server", + "server_ip", + "source_ip", + "source_prefix", + "target_is_proxy", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisBaseTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "server": obj.get("server"), + "serverIp": obj.get("serverIp"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "targetIsProxy": obj.get("targetIsProxy"), + "direction": obj.get("direction") + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_detail_test_result.py b/test_results/test_results/models/path_vis_detail_test_result.py new file mode 100644 index 00000000..24c5d62e --- /dev/null +++ b/test_results/test_results/models/path_vis_detail_test_result.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.agent import Agent +from test_results.models.path_vis_direction import PathVisDirection +from test_results.models.path_vis_route import PathVisRoute +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDetailTestResult(BaseModel): + """ + PathVisDetailTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = 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 + server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") + server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") + source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source agent", alias="sourceIp") + source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source agent", alias="sourcePrefix") + target_is_proxy: Optional[StrictBool] = Field(default=None, description="Specifies whether the traces are targeting a proxy. If not set, it is considered as false.", alias="targetIsProxy") + direction: Optional[PathVisDirection] = None + path_traces: Optional[List[PathVisRoute]] = Field(default=None, description="Shows 3 iterations of path trace, with each iteration specified by a pathId", alias="pathTraces") + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "server", "serverIp", "sourceIp", "sourcePrefix", "targetIsProxy", "direction", "pathTraces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDetailTestResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + "server", + "server_ip", + "source_ip", + "source_prefix", + "target_is_proxy", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in path_traces (list) + _items = [] + if self.path_traces: + for _item in self.path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['pathTraces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDetailTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "server": obj.get("server"), + "serverIp": obj.get("serverIp"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "targetIsProxy": obj.get("targetIsProxy"), + "direction": obj.get("direction"), + "pathTraces": [PathVisRoute.from_dict(_item) for _item in obj["pathTraces"]] if obj.get("pathTraces") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_detail_test_results.py b/test_results/test_results/models/path_vis_detail_test_results.py new file mode 100644 index 00000000..51e6c8b2 --- /dev/null +++ b/test_results/test_results/models/path_vis_detail_test_results.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.path_vis_detail_test_result import PathVisDetailTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class PathVisDetailTestResults(BaseModel): + """ + PathVisDetailTestResults + """ # noqa: E501 + results: Optional[List[PathVisDetailTestResult]] = None + test: Optional[SimpleTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisDetailTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisDetailTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_direction.py b/test_results/test_results/models/path_vis_direction.py new file mode 100644 index 00000000..d3b7eb8a --- /dev/null +++ b/test_results/test_results/models/path_vis_direction.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 PathVisDirection(str, Enum): + """ + Direction of the path trace. + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PathVisDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test_results/test_results/models/path_vis_endpoint.py b/test_results/test_results/models/path_vis_endpoint.py new file mode 100644 index 00000000..a7678422 --- /dev/null +++ b/test_results/test_results/models/path_vis_endpoint.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 PathVisEndpoint(BaseModel): + """ + PathVisEndpoint + """ # noqa: E501 + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop", alias="ipAddress") + mss: Optional[StrictInt] = Field(default=None, description="Maximum segment size in bytes") + number_of_hops: Optional[StrictInt] = Field(default=None, description="Number of hops for path trace to destination", alias="numberOfHops") + path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace", alias="pathId") + path_mtu: Optional[StrictInt] = Field(default=None, description="MTU sizes on network from agents to the target", alias="pathMtu") + response_time: Optional[StrictInt] = Field(default=None, description="RTT of the path trace to the destination in milliseconds", alias="responseTime") + __properties: ClassVar[List[str]] = ["ipAddress", "mss", "numberOfHops", "pathId", "pathMtu", "responseTime"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisEndpoint 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. + """ + excluded_fields: Set[str] = set([ + "ip_address", + "mss", + "number_of_hops", + "path_id", + "path_mtu", + "response_time", + ]) + + _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 PathVisEndpoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipAddress": obj.get("ipAddress"), + "mss": obj.get("mss"), + "numberOfHops": obj.get("numberOfHops"), + "pathId": obj.get("pathId"), + "pathMtu": obj.get("pathMtu"), + "responseTime": obj.get("responseTime") + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_hop.py b/test_results/test_results/models/path_vis_hop.py new file mode 100644 index 00000000..470d9df5 --- /dev/null +++ b/test_results/test_results/models/path_vis_hop.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 PathVisHop(BaseModel): + """ + PathVisHop + """ # noqa: E501 + hop: Optional[StrictInt] = Field(default=None, description="Hop index") + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop", alias="ipAddress") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix of IP address shown in CIDR") + rdns: Optional[StrictStr] = Field(default=None, description="Reverse DNS entry of IP, if available") + network: Optional[StrictStr] = Field(default=None, description="Autonomous System originating the prefix") + response_time: Optional[StrictInt] = Field(default=None, description="RTT to the hop’s IP in milliseconds", alias="responseTime") + location: Optional[StrictStr] = Field(default=None, description="Location information for the hop") + mpls: Optional[StrictStr] = Field(default=None, description="Multiprotocol Label Switching information, if available") + __properties: ClassVar[List[str]] = ["hop", "ipAddress", "prefix", "rdns", "network", "responseTime", "location", "mpls"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisHop 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([ + "hop", + "ip_address", + "prefix", + "rdns", + "network", + "response_time", + "location", + "mpls", + ]) + + _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 PathVisHop from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hop": obj.get("hop"), + "ipAddress": obj.get("ipAddress"), + "prefix": obj.get("prefix"), + "rdns": obj.get("rdns"), + "network": obj.get("network"), + "responseTime": obj.get("responseTime"), + "location": obj.get("location"), + "mpls": obj.get("mpls") + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_route.py b/test_results/test_results/models/path_vis_route.py new file mode 100644 index 00000000..14a542b5 --- /dev/null +++ b/test_results/test_results/models/path_vis_route.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.path_vis_hop import PathVisHop +from typing import Optional, Set +from typing_extensions import Self + +class PathVisRoute(BaseModel): + """ + PathVisRoute + """ # noqa: E501 + path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace", alias="pathId") + hops: Optional[List[PathVisHop]] = Field(default=None, description="Array of hop objects indicating each step in the traceroute") + __properties: ClassVar[List[str]] = ["pathId", "hops"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisRoute 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([ + "path_id", + ]) + + _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 hops (list) + _items = [] + if self.hops: + for _item in self.hops: + if _item: + _items.append(_item.to_dict()) + _dict['hops'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisRoute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pathId": obj.get("pathId"), + "hops": [PathVisHop.from_dict(_item) for _item in obj["hops"]] if obj.get("hops") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_test_result.py b/test_results/test_results/models/path_vis_test_result.py new file mode 100644 index 00000000..9b7f0b2b --- /dev/null +++ b/test_results/test_results/models/path_vis_test_result.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.agent import Agent +from test_results.models.path_vis_direction import PathVisDirection +from test_results.models.path_vis_endpoint import PathVisEndpoint +from typing import Optional, Set +from typing_extensions import Self + +class PathVisTestResult(BaseModel): + """ + PathVisTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = 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 + server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") + server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") + source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source agent", alias="sourceIp") + source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source agent", alias="sourcePrefix") + target_is_proxy: Optional[StrictBool] = Field(default=None, description="Specifies whether the traces are targeting a proxy. If not set, it is considered as false.", alias="targetIsProxy") + direction: Optional[PathVisDirection] = None + path_traces: Optional[List[PathVisEndpoint]] = Field(default=None, description="Shows all iterations of path trace, with each iteration specified by a pathId", alias="pathTraces") + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "server", "serverIp", "sourceIp", "sourcePrefix", "targetIsProxy", "direction", "pathTraces"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisTestResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "start_time", + "end_time", + "server", + "server_ip", + "source_ip", + "source_prefix", + "target_is_proxy", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in path_traces (list) + _items = [] + if self.path_traces: + for _item in self.path_traces: + if _item: + _items.append(_item.to_dict()) + _dict['pathTraces'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "server": obj.get("server"), + "serverIp": obj.get("serverIp"), + "sourceIp": obj.get("sourceIp"), + "sourcePrefix": obj.get("sourcePrefix"), + "targetIsProxy": obj.get("targetIsProxy"), + "direction": obj.get("direction"), + "pathTraces": [PathVisEndpoint.from_dict(_item) for _item in obj["pathTraces"]] if obj.get("pathTraces") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/path_vis_test_results.py b/test_results/test_results/models/path_vis_test_results.py new file mode 100644 index 00000000..9f6d4403 --- /dev/null +++ b/test_results/test_results/models/path_vis_test_results.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.path_vis_test_result import PathVisTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class PathVisTestResults(BaseModel): + """ + PathVisTestResults + """ # noqa: E501 + results: Optional[List[PathVisTestResult]] = None + test: Optional[SimpleTest] = None + __properties: ClassVar[List[str]] = ["results", "test"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PathVisTestResults 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 results (list) + _items = [] + if self.results: + for _item in self.results: + if _item: + _items.append(_item.to_dict()) + _dict['results'] = _items + # override the default output from pydantic by calling `to_dict()` of test + if self.test: + _dict['test'] = self.test.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PathVisTestResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "results": [PathVisTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/query_window.py b/test_results/test_results/models/query_window.py new file mode 100644 index 00000000..d1462e6e --- /dev/null +++ b/test_results/test_results/models/query_window.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 typing import Optional, Set +from typing_extensions import Self + +class QueryWindow(BaseModel): + """ + QueryWindow + """ # noqa: E501 + 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") + __properties: ClassVar[List[str]] = ["startDate", "endDate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QueryWindow 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, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QueryWindow from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate") + }) + return _obj + + diff --git a/test_results/test_results/models/rtp_stream_test_result.py b/test_results/test_results/models/rtp_stream_test_result.py new file mode 100644 index 00000000..c519199a --- /dev/null +++ b/test_results/test_results/models/rtp_stream_test_result.py @@ -0,0 +1,154 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self + +class RtpStreamTestResult(BaseModel): + """ + RtpStreamTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = 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 + server_ip: Optional[StrictStr] = Field(default=None, description="Target agent IP address", alias="serverIp") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP value received by the server from the agent") + dscp_name: Optional[StrictStr] = Field(default=None, description="Name of DSCP value received by the server from the agent", alias="dscpName") + mos: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mean opinion score for agent’s stream") + codec_name: Optional[StrictStr] = Field(default=None, description="Name of codec used by agen", alias="codecName") + codec_max_mos: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum value of Mean Opinion Score based on codec selection", alias="codecMaxMos") + loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage value of packets sent from agent not received by server") + discards: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets discarded") + latency: Optional[StrictInt] = Field(default=None, description="Time to send packets from source to server in milliseconds") + pdv: Optional[StrictInt] = Field(default=None, description="Variation in packet delay in milliseconds") + error_detail: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered", alias="errorDetail") + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "serverIp", "dscp", "dscpName", "mos", "codecName", "codecMaxMos", "loss", "discards", "latency", "pdv", "errorDetail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RtpStreamTestResult 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([ + "var_date", + "round_id", + "start_time", + "end_time", + "server_ip", + "dscp", + "dscp_name", + "mos", + "codec_name", + "codec_max_mos", + "loss", + "discards", + "latency", + "pdv", + "error_detail", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RtpStreamTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "serverIp": obj.get("serverIp"), + "dscp": obj.get("dscp"), + "dscpName": obj.get("dscpName"), + "mos": obj.get("mos"), + "codecName": obj.get("codecName"), + "codecMaxMos": obj.get("codecMaxMos"), + "loss": obj.get("loss"), + "discards": obj.get("discards"), + "latency": obj.get("latency"), + "pdv": obj.get("pdv"), + "errorDetail": obj.get("errorDetail") + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/rtp_stream_test_results.py b/test_results/test_results/models/rtp_stream_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/rtp_stream_test_results.py rename to test_results/test_results/models/rtp_stream_test_results.py index 6cd0ad1e..3ea1c103 100644 --- a/test_results_api/test_results_api/models/rtp_stream_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.rtp_stream_test_result import RtpStreamTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.rtp_stream_test_result import RtpStreamTestResult +from test_results.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self class RtpStreamTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class RtpStreamTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class RtpStreamTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RtpStreamTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class RtpStreamTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class RtpStreamTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RtpStreamTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class RtpStreamTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [RtpStreamTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [RtpStreamTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results/test_results/models/self_links.py b/test_results/test_results/models/self_links.py new file mode 100644 index 00000000..3594bb91 --- /dev/null +++ b/test_results/test_results/models/self_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/self_links_links.py b/test_results/test_results/models/self_links_links.py new file mode 100644 index 00000000..a65994c2 --- /dev/null +++ b/test_results/test_results/models/self_links_links.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/test_results/test_results/models/simple_test.py b/test_results/test_results/models/simple_test.py new file mode 100644 index 00000000..54a0c5bb --- /dev/null +++ b/test_results/test_results/models/simple_test.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.simple_test_links import SimpleTestLinks +from test_results.models.test_interval import TestInterval +from test_results.models.test_type import TestType +from typing import Optional, Set +from typing_extensions import Self + +class SimpleTest(BaseModel): + """ + Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[SimpleTestLinks] = Field(default=None, alias="_links") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTest 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": SimpleTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/test_results/test_results/models/simple_test_links.py b/test_results/test_results/models/simple_test_links.py new file mode 100644 index 00000000..f7593658 --- /dev/null +++ b/test_results/test_results/models/simple_test_links.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.link import Link +from test_results.models.simple_test_links_self import SimpleTestLinksSelf +from typing import Optional, Set +from typing_extensions import Self + +class SimpleTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information + """ # noqa: E501 + var_self: Optional[SimpleTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": SimpleTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/simple_test_links_self.py b/test_results/test_results/models/simple_test_links_self.py new file mode 100644 index 00000000..51fd1d04 --- /dev/null +++ b/test_results/test_results/models/simple_test_links_self.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 SimpleTestLinksSelf(BaseModel): + """ + SimpleTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTestLinksSelf 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 SimpleTestLinksSelf 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/test_results_api/test_results_api/models/sip_server_error_type.py b/test_results/test_results/models/sip_server_error_type.py similarity index 81% rename from test_results_api/test_results_api/models/sip_server_error_type.py rename to test_results/test_results/models/sip_server_error_type.py index b590e9e8..66279859 100644 --- a/test_results_api/test_results_api/models/sip_server_error_type.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -14,16 +14,8 @@ from __future__ import annotations import json -import pprint -import re # noqa: F401 from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing_extensions import Self class SipServerErrorType(str, Enum): diff --git a/test_results/test_results/models/sip_server_test_result.py b/test_results/test_results/models/sip_server_test_result.py new file mode 100644 index 00000000..4bd31e23 --- /dev/null +++ b/test_results/test_results/models/sip_server_test_result.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from test_results.models.agent import Agent +from test_results.models.sip_server_error_type import SipServerErrorType +from typing import Optional, Set +from typing_extensions import Self + +class SipServerTestResult(BaseModel): + """ + SipServerTestResult + """ # noqa: E501 + 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[Dict[str, Any]] = 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") + server_ip: Optional[StrictStr] = Field(default=None, description="Target agent IP address", alias="serverIp") + agent: Optional[Agent] = None + availability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="availability of the service") + connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server in milliseconds, only available when TCP is configured as protocol", alias="connectTime") + dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds", alias="dnsTime") + invite_time: Optional[StrictInt] = Field(default=None, description="Time to complete INVITE in milliseconds", alias="inviteTime") + options_time: Optional[StrictInt] = Field(default=None, description="Time to complete OPTIONS in milliseconds", alias="optionsTime") + num_redirects: Optional[StrictInt] = Field(default=None, description="Number of redirects", alias="numRedirects") + options_request: Optional[StrictStr] = Field(default=None, description="Entire OPTIONS request", alias="optionsRequest") + options_response: Optional[StrictStr] = Field(default=None, description="Entire OPTIONS response", alias="optionsResponse") + register_time: Optional[StrictInt] = Field(default=None, description="Time to complete REGISTER in milliseconds", alias="registerTime") + response_code: Optional[StrictInt] = Field(default=None, description="SIP server response code", alias="responseCode") + response_time: Optional[StrictInt] = Field(default=None, description="Time to first byte", alias="responseTime") + total_time: Optional[StrictInt] = Field(default=None, description="Total time", alias="totalTime") + wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response", alias="waitTime") + error_type: Optional[SipServerErrorType] = Field(default=None, alias="errorType") + problem_detail: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered", alias="problemDetail") + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "serverIp", "agent", "availability", "connectTime", "dnsTime", "inviteTime", "optionsTime", "numRedirects", "optionsRequest", "optionsResponse", "registerTime", "responseCode", "responseTime", "totalTime", "waitTime", "errorType", "problemDetail"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerTestResult 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. + * 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", + "server_ip", + "availability", + "connect_time", + "dns_time", + "invite_time", + "options_time", + "num_redirects", + "options_request", + "options_response", + "register_time", + "response_code", + "response_time", + "total_time", + "wait_time", + "problem_detail", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict['agent'] = self.agent.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SipServerTestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "roundId": obj.get("roundId"), + "_links": obj.get("_links"), + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), + "serverIp": obj.get("serverIp"), + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, + "availability": obj.get("availability"), + "connectTime": obj.get("connectTime"), + "dnsTime": obj.get("dnsTime"), + "inviteTime": obj.get("inviteTime"), + "optionsTime": obj.get("optionsTime"), + "numRedirects": obj.get("numRedirects"), + "optionsRequest": obj.get("optionsRequest"), + "optionsResponse": obj.get("optionsResponse"), + "registerTime": obj.get("registerTime"), + "responseCode": obj.get("responseCode"), + "responseTime": obj.get("responseTime"), + "totalTime": obj.get("totalTime"), + "waitTime": obj.get("waitTime"), + "errorType": obj.get("errorType"), + "problemDetail": obj.get("problemDetail") + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/sip_server_test_results.py b/test_results/test_results/models/sip_server_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/sip_server_test_results.py rename to test_results/test_results/models/sip_server_test_results.py index 2522d7ee..c843bb03 100644 --- a/test_results_api/test_results_api/models/sip_server_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.sip_server_test_result import SipServerTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.simple_test import SimpleTest +from test_results.models.sip_server_test_result import SipServerTestResult +from typing import Optional, Set +from typing_extensions import Self class SipServerTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class SipServerTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class SipServerTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SipServerTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class SipServerTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class SipServerTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SipServerTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class SipServerTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [SipServerTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [SipServerTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/ssl_cert.py b/test_results/test_results/models/ssl_cert.py similarity index 77% rename from test_results_api/test_results_api/models/ssl_cert.py rename to test_results/test_results/models/ssl_cert.py index 86f39c2a..14eb5a1c 100644 --- a/test_results_api/test_results_api/models/ssl_cert.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,21 +18,18 @@ 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 pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SslCert(BaseModel): """ SslCert """ # noqa: E501 days_until_expiry: Optional[StrictInt] = Field(default=None, description="Days until certificate expires, rounded down. 0 is shown if there are less than 24 hours remaining. Calculated when the test was executed.", alias="daysUntilExpiry") - is_fetch_date_in_valid_cert_date_range: Optional[StrictStr] = Field(default=None, description="True when certificate fetch date is within the valid certificate date range, false otherwise", alias="isFetchDateInValidCertDateRange") - has_valid_signing_cert: Optional[StrictStr] = Field(default=None, description="This field is implicitly true; it is output only when false. false indicates this certificate was missing a valid signing certificate in the chain.", alias="hasValidSigningCert") + is_fetch_date_in_valid_cert_date_range: Optional[StrictBool] = Field(default=None, description="True when certificate fetch date is within the valid certificate date range, false otherwise", alias="isFetchDateInValidCertDateRange") + has_valid_signing_cert: Optional[StrictBool] = Field(default=None, description="This field is implicitly true; it is output only when false. false indicates this certificate was missing a valid signing certificate in the chain.", alias="hasValidSigningCert") issuer_name: Optional[StrictStr] = Field(default=None, description="Certificate issuer", alias="issuerName") valid_before: Optional[datetime] = Field(default=None, description="Certificate is not valid after this date", alias="validBefore") valid_after: Optional[datetime] = Field(default=None, description="Certificate is not valid before this date", alias="validAfter") @@ -40,10 +37,11 @@ class SslCert(BaseModel): subject_name: Optional[StrictStr] = Field(default=None, description="certificate’s subject name - a value of the common name (CN) RDN from the certificate’s Subject attribute, for example www.example.com", alias="subjectName") __properties: ClassVar[List[str]] = ["daysUntilExpiry", "isFetchDateInValidCertDateRange", "hasValidSigningCert", "issuerName", "validBefore", "validAfter", "subjectAlternativeNames", "subjectName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ class SslCert(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SslCert from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +68,18 @@ class SslCert(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SslCert from a dict""" if obj is None: return None diff --git a/test_results/test_results/models/test_direction.py b/test_results/test_results/models/test_direction.py new file mode 100644 index 00000000..d026fbcc --- /dev/null +++ b/test_results/test_results/models/test_direction.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 TestDirection(str, Enum): + """ + Direction of the test, which affects how results are shown. + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test_results/test_results/models/test_interval.py b/test_results/test_results/models/test_interval.py new file mode 100644 index 00000000..1c8aa6c2 --- /dev/null +++ b/test_results/test_results/models/test_interval.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test_results/test_results/models/test_result.py b/test_results/test_results/models/test_result.py new file mode 100644 index 00000000..7b0790b4 --- /dev/null +++ b/test_results/test_results/models/test_result.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TestResult(BaseModel): + """ + TestResult + """ # noqa: E501 + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") + 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") + __properties: ClassVar[List[str]] = ["_links", "date", "roundId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestResult 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([ + "var_date", + "round_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 TestResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": obj.get("_links"), + "date": obj.get("date"), + "roundId": obj.get("roundId") + }) + return _obj + + diff --git a/test_results_api/test_results_api/models/test_result_app_links.py b/test_results/test_results/models/test_result_app_links.py similarity index 80% rename from test_results_api/test_results_api/models/test_result_app_links.py rename to test_results/test_results/models/test_result_app_links.py index 97674850..a1c4b227 100644 --- a/test_results_api/test_results_api/models/test_result_app_links.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TestResultAppLinks(BaseModel): """ @@ -33,10 +29,11 @@ class TestResultAppLinks(BaseModel): links: Optional[Any] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["_links"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +46,7 @@ class TestResultAppLinks(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestResultAppLinks from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,10 +60,12 @@ class TestResultAppLinks(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if links (nullable) is None @@ -77,7 +76,7 @@ class TestResultAppLinks(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestResultAppLinks from a dict""" if obj is None: return None diff --git a/test_results/test_results/models/test_type.py b/test_results/test_results/models/test_type.py new file mode 100644 index 00000000..e652040d --- /dev/null +++ b/test_results/test_results/models/test_type.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TestType(str, Enum): + """ + This is a read only value, as test type is implicit in the test creation url. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + BGP = 'bgp' + HTTP_MINUS_SERVER = 'http-server' + PAGE_MINUS_LOAD = 'page-load' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + FTP_MINUS_SERVER = 'ftp-server' + DNS_MINUS_TRACE = 'dns-trace' + DNS_MINUS_SERVER = 'dns-server' + DNSSEC = 'dnssec' + SIP_MINUS_SERVER = 'sip-server' + VOICE = 'voice' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test_results/test_results/models/unauthorized_error.py b/test_results/test_results/models/unauthorized_error.py new file mode 100644 index 00000000..d7b3b00b --- /dev/null +++ b/test_results/test_results/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/test_results/test_results/models/validation_error.py b/test_results/test_results/models/validation_error.py new file mode 100644 index 00000000..04950a48 --- /dev/null +++ b/test_results/test_results/models/validation_error.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 test_results.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/test_results/test_results/models/validation_error_all_of_errors.py b/test_results/test_results/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..3c9932b3 --- /dev/null +++ b/test_results/test_results/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/test_results_api/test_results_api/models/web_transaction_detail_test_result.py b/test_results/test_results/models/web_transaction_detail_test_result.py similarity index 78% rename from test_results_api/test_results_api/models/web_transaction_detail_test_result.py rename to test_results/test_results/models/web_transaction_detail_test_result.py index b68449ee..1bdcd361 100644 --- a/test_results_api/test_results_api/models/web_transaction_detail_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.marker import Marker -from test_results_api.models.page import Page -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.agent import Agent +from test_results.models.marker import Marker +from test_results.models.page import Page +from typing import Optional, Set +from typing_extensions import Self class WebTransactionDetailTestResult(BaseModel): """ @@ -35,7 +32,7 @@ class WebTransactionDetailTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") agent: Optional[Agent] = None component_errors: Optional[StrictInt] = Field(default=None, description="Number of components which did not successfully load", alias="componentErrors") transaction_time: Optional[StrictInt] = Field(default=None, description="Elapsed execution time of the web transaction script in milliseconds", alias="transactionTime") @@ -45,10 +42,11 @@ class WebTransactionDetailTestResult(BaseModel): pages: Optional[List[Page]] = None __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "componentErrors", "transactionTime", "errorType", "errorDetails", "markers", "pages"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +59,7 @@ class WebTransactionDetailTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionDetailTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,16 +79,18 @@ class WebTransactionDetailTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "component_errors", + "transaction_time", + "error_type", + "error_details", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "component_errors", - "transaction_time", - "error_type", - "error_details", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -113,7 +113,7 @@ class WebTransactionDetailTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionDetailTestResult from a dict""" if obj is None: return None @@ -125,13 +125,13 @@ class WebTransactionDetailTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "componentErrors": obj.get("componentErrors"), "transactionTime": obj.get("transactionTime"), "errorType": obj.get("errorType"), "errorDetails": obj.get("errorDetails"), - "markers": [Marker.from_dict(_item) for _item in obj.get("markers")] if obj.get("markers") is not None else None, - "pages": [Page.from_dict(_item) for _item in obj.get("pages")] if obj.get("pages") is not None else None + "markers": [Marker.from_dict(_item) for _item in obj["markers"]] if obj.get("markers") is not None else None, + "pages": [Page.from_dict(_item) for _item in obj["pages"]] if obj.get("pages") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/web_transaction_detail_test_results.py b/test_results/test_results/models/web_transaction_detail_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/web_transaction_detail_test_results.py rename to test_results/test_results/models/web_transaction_detail_test_results.py index c56c401e..688d32f6 100644 --- a/test_results_api/test_results_api/models/web_transaction_detail_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.web_transaction_detail_test_result import WebTransactionDetailTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.simple_test import SimpleTest +from test_results.models.web_transaction_detail_test_result import WebTransactionDetailTestResult +from typing import Optional, Set +from typing_extensions import Self class WebTransactionDetailTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class WebTransactionDetailTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class WebTransactionDetailTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionDetailTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class WebTransactionDetailTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class WebTransactionDetailTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionDetailTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class WebTransactionDetailTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [WebTransactionDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [WebTransactionDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/web_transaction_page_detail_test_result.py b/test_results/test_results/models/web_transaction_page_detail_test_result.py similarity index 76% rename from test_results_api/test_results_api/models/web_transaction_page_detail_test_result.py rename to test_results/test_results/models/web_transaction_page_detail_test_result.py index d69fad45..9ab736d5 100644 --- a/test_results_api/test_results_api/models/web_transaction_page_detail_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,16 +18,13 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.marker import Marker -from test_results_api.models.page import Page -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.agent import Agent +from test_results.models.marker import Marker +from test_results.models.page import Page +from typing import Optional, Set +from typing_extensions import Self class WebTransactionPageDetailTestResult(BaseModel): """ @@ -35,7 +32,7 @@ class WebTransactionPageDetailTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") agent: Optional[Agent] = None component_errors: Optional[StrictInt] = Field(default=None, description="Number of components which did not successfully load", alias="componentErrors") transaction_time: Optional[StrictInt] = Field(default=None, description="Elapsed execution time of the web transaction script in milliseconds", alias="transactionTime") @@ -43,13 +40,14 @@ class WebTransactionPageDetailTestResult(BaseModel): error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered", alias="errorDetails") markers: Optional[List[Marker]] = None pages: Optional[List[Page]] = None - har: Optional[Union[str, Any]] = Field(default=None, description="See [HAR specification](http://www.softwareishard.com/blog/har-12-spec/) for details") + har: Optional[Dict[str, Any]] = Field(default=None, description="See [HAR specification](http://www.softwareishard.com/blog/har-12-spec/) for details") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "componentErrors", "transactionTime", "errorType", "errorDetails", "markers", "pages", "har"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +60,7 @@ class WebTransactionPageDetailTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionPageDetailTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,17 +81,19 @@ class WebTransactionPageDetailTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "component_errors", + "transaction_time", + "error_type", + "error_details", + "har", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "component_errors", - "transaction_time", - "error_type", - "error_details", - "har", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -116,7 +116,7 @@ class WebTransactionPageDetailTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionPageDetailTestResult from a dict""" if obj is None: return None @@ -128,13 +128,13 @@ class WebTransactionPageDetailTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "componentErrors": obj.get("componentErrors"), "transactionTime": obj.get("transactionTime"), "errorType": obj.get("errorType"), "errorDetails": obj.get("errorDetails"), - "markers": [Marker.from_dict(_item) for _item in obj.get("markers")] if obj.get("markers") is not None else None, - "pages": [Page.from_dict(_item) for _item in obj.get("pages")] if obj.get("pages") is not None else None, + "markers": [Marker.from_dict(_item) for _item in obj["markers"]] if obj.get("markers") is not None else None, + "pages": [Page.from_dict(_item) for _item in obj["pages"]] if obj.get("pages") is not None else None, "har": obj.get("har") }) return _obj diff --git a/test_results_api/test_results_api/models/web_transaction_page_detail_test_results.py b/test_results/test_results/models/web_transaction_page_detail_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/web_transaction_page_detail_test_results.py rename to test_results/test_results/models/web_transaction_page_detail_test_results.py index de4e58ae..c0a34ef0 100644 --- a/test_results_api/test_results_api/models/web_transaction_page_detail_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.simple_test import SimpleTest +from test_results.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult +from typing import Optional, Set +from typing_extensions import Self class WebTransactionPageDetailTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class WebTransactionPageDetailTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class WebTransactionPageDetailTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionPageDetailTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class WebTransactionPageDetailTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class WebTransactionPageDetailTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionPageDetailTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class WebTransactionPageDetailTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [WebTransactionPageDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [WebTransactionPageDetailTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/test_results_api/test_results_api/models/web_transaction_test_result.py b/test_results/test_results/models/web_transaction_test_result.py similarity index 79% rename from test_results_api/test_results_api/models/web_transaction_test_result.py rename to test_results/test_results/models/web_transaction_test_result.py index 051b58dd..e968853f 100644 --- a/test_results_api/test_results_api/models/web_transaction_test_result.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from test_results.models.agent import Agent +from typing import Optional, Set +from typing_extensions import Self class WebTransactionTestResult(BaseModel): """ @@ -33,7 +30,7 @@ class WebTransactionTestResult(BaseModel): """ # noqa: E501 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[Union[str, Any]] = Field(default=None, alias="_links") + links: Optional[Dict[str, Any]] = Field(default=None, alias="_links") agent: Optional[Agent] = None component_errors: Optional[StrictInt] = Field(default=None, description="Number of components which did not successfully load", alias="componentErrors") transaction_time: Optional[StrictInt] = Field(default=None, description="Elapsed execution time of the web transaction script in milliseconds", alias="transactionTime") @@ -41,10 +38,11 @@ class WebTransactionTestResult(BaseModel): 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", "componentErrors", "transactionTime", "errorType", "errorDetails"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +55,7 @@ class WebTransactionTestResult(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionTestResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,16 +75,18 @@ class WebTransactionTestResult(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "var_date", + "round_id", + "component_errors", + "transaction_time", + "error_type", + "error_details", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "var_date", - "round_id", - "component_errors", - "transaction_time", - "error_type", - "error_details", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of agent @@ -95,7 +95,7 @@ class WebTransactionTestResult(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionTestResult from a dict""" if obj is None: return None @@ -107,7 +107,7 @@ class WebTransactionTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, + "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "componentErrors": obj.get("componentErrors"), "transactionTime": obj.get("transactionTime"), "errorType": obj.get("errorType"), diff --git a/test_results_api/test_results_api/models/web_transaction_test_results.py b/test_results/test_results/models/web_transaction_test_results.py similarity index 75% rename from test_results_api/test_results_api/models/web_transaction_test_results.py rename to test_results/test_results/models/web_transaction_test_results.py index 7bb9bb33..84ad0382 100644 --- a/test_results_api/test_results_api/models/web_transaction_test_results.py +++ b/test_results/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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,12 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.web_transaction_test_result import WebTransactionTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from test_results.models.simple_test import SimpleTest +from test_results.models.web_transaction_test_result import WebTransactionTestResult +from typing import Optional, Set +from typing_extensions import Self class WebTransactionTestResults(BaseModel): """ @@ -35,10 +32,11 @@ class WebTransactionTestResults(BaseModel): test: Optional[SimpleTest] = None __properties: ClassVar[List[str]] = ["results", "test"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ class WebTransactionTestResults(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionTestResults from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ class WebTransactionTestResults(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in results (list) @@ -84,7 +84,7 @@ class WebTransactionTestResults(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionTestResults from a dict""" if obj is None: return None @@ -93,8 +93,8 @@ class WebTransactionTestResults(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "results": [WebTransactionTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None + "results": [WebTransactionTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None, + "test": SimpleTest.from_dict(obj["test"]) if obj.get("test") is not None else None }) return _obj diff --git a/tests_api/tests_api/py.typed b/test_results/test_results/py.typed similarity index 100% rename from tests_api/tests_api/py.typed rename to test_results/test_results/py.typed diff --git a/test_results/test_results/rest.py b/test_results/test_results/rest.py new file mode 100644 index 00000000..c4b9f6d0 --- /dev/null +++ b/test_results/test_results/rest.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from test_results.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/test_results_api/.github/workflows/python.yml b/test_results_api/.github/workflows/python.yml deleted file mode 100644 index f2ad1718..00000000 --- a/test_results_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: test_results_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/test_results_api/.gitlab-ci.yml b/test_results_api/.gitlab-ci.yml deleted file mode 100644 index 90ae7365..00000000 --- a/test_results_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=test_results_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/test_results_api/.openapi-generator/FILES b/test_results_api/.openapi-generator/FILES deleted file mode 100644 index 64d2ff35..00000000 --- a/test_results_api/.openapi-generator/FILES +++ /dev/null @@ -1,317 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/Agent.md -docs/AppLinks.md -docs/AppLinksLinks.md -docs/BgpBasicTestResult.md -docs/BgpHop.md -docs/BgpTestResult.md -docs/BgpTestResults.md -docs/BgpTestRouteInformationResult.md -docs/BgpTestRouteInformationResults.md -docs/DNSSECTestMetricsApi.md -docs/DNSServerTestMetricsApi.md -docs/DNSTraceTestMetricsApi.md -docs/DnsServerTestResult.md -docs/DnsServerTestResults.md -docs/DnsTraceTestResult.md -docs/DnsTraceTestResults.md -docs/DnssecTestResult.md -docs/DnssecTestResults.md -docs/EpochTimeWindow.md -docs/Error.md -docs/Expand.md -docs/FtpServerTestResult.md -docs/FtpServerTestResults.md -docs/GetTestPathvisAgentRound200Response.md -docs/GetTestResultDnsServer200Response.md -docs/GetTestResultDnsTrace200Response.md -docs/GetTestResultDnssec200Response.md -docs/GetTestResultFtpServer200Response.md -docs/GetTestResultHttpServer200Response.md -docs/GetTestResultMetrics200Response.md -docs/GetTestResultNetworkPathvis200Response.md -docs/GetTestResultPageLoad200Response.md -docs/GetTestResultPageLoadComponentDetail200Response.md -docs/GetTestResultRtpStream200Response.md -docs/GetTestResultSipServer200Response.md -docs/GetTestResultWebTransactions200Response.md -docs/GetTestResultWebTransactionsComponentDetail200Response.md -docs/GetTestResultWebTransactionsComponentPageDetail200Response.md -docs/GetTestResultsBgp200Response.md -docs/GetTestResultsBgpPrefix200Response.md -docs/HttpTestResult.md -docs/HttpTestResultHeaders.md -docs/HttpTestResults.md -docs/Link.md -docs/Marker.md -docs/Monitor.md -docs/NetworkBGPTestMetricsApi.md -docs/NetworkTestMetricsApi.md -docs/NetworkTestResult.md -docs/NetworkTestResults.md -docs/Page.md -docs/PageLoadDetailTestResult.md -docs/PageLoadDetailTestResults.md -docs/PageLoadTestResult.md -docs/PageLoadTestResults.md -docs/PaginationLinks.md -docs/PaginationLinksLinks.md -docs/PathVisBaseTestResult.md -docs/PathVisDetailTestResult.md -docs/PathVisDetailTestResults.md -docs/PathVisEndpoint.md -docs/PathVisHop.md -docs/PathVisRoute.md -docs/PathVisTestResult.md -docs/PathVisTestResults.md -docs/QueryWindow.md -docs/RtpStreamTestResult.md -docs/RtpStreamTestResults.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SimpleTest.md -docs/SipServerErrorType.md -docs/SipServerTestResult.md -docs/SipServerTestResults.md -docs/SslCert.md -docs/TestDirection.md -docs/TestInterval.md -docs/TestResult.md -docs/TestResultAppLinks.md -docs/TestType.md -docs/UnauthorizedError.md -docs/UnexpandedInstantTest.md -docs/UnexpandedInstantTestLinks.md -docs/UnexpandedInstantTestLinksSelf.md -docs/UnexpandedInstantTestLinksTestResults.md -docs/UnexpandedTest.md -docs/VoiceRTPServerTestMetricsApi.md -docs/VoiceSIPServerTestMetricsApi.md -docs/WebFTPServerTestMetricsApi.md -docs/WebHTTPServerTestMetricsApi.md -docs/WebPageLoadTestMetricsApi.md -docs/WebTransactionDetailTestResult.md -docs/WebTransactionDetailTestResults.md -docs/WebTransactionPageDetailTestResult.md -docs/WebTransactionPageDetailTestResults.md -docs/WebTransactionTestResult.md -docs/WebTransactionTestResults.md -docs/WebTransactionsTestMetricsApi.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_agent.py -test/test_app_links.py -test/test_app_links_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_metrics_api.py -test/test_dns_server_test_result.py -test/test_dns_server_test_results.py -test/test_dns_trace_test_metrics_api.py -test/test_dns_trace_test_result.py -test/test_dns_trace_test_results.py -test/test_dnssec_test_metrics_api.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_get_test_pathvis_agent_round200_response.py -test/test_get_test_result_dns_server200_response.py -test/test_get_test_result_dns_trace200_response.py -test/test_get_test_result_dnssec200_response.py -test/test_get_test_result_ftp_server200_response.py -test/test_get_test_result_http_server200_response.py -test/test_get_test_result_metrics200_response.py -test/test_get_test_result_network_pathvis200_response.py -test/test_get_test_result_page_load200_response.py -test/test_get_test_result_page_load_component_detail200_response.py -test/test_get_test_result_rtp_stream200_response.py -test/test_get_test_result_sip_server200_response.py -test/test_get_test_result_web_transactions200_response.py -test/test_get_test_result_web_transactions_component_detail200_response.py -test/test_get_test_result_web_transactions_component_page_detail200_response.py -test/test_get_test_results_bgp200_response.py -test/test_get_test_results_bgp_prefix200_response.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_bgp_test_metrics_api.py -test/test_network_test_metrics_api.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_pagination_links_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_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_query_window.py -test/test_rtp_stream_test_result.py -test/test_rtp_stream_test_results.py -test/test_self_links.py -test/test_self_links_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_result.py -test/test_test_result_app_links.py -test/test_test_type.py -test/test_unauthorized_error.py -test/test_unexpanded_instant_test.py -test/test_unexpanded_instant_test_links.py -test/test_unexpanded_instant_test_links_self.py -test/test_unexpanded_instant_test_links_test_results.py -test/test_unexpanded_test.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_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_web_transactions_test_metrics_api.py -test_results_api/__init__.py -test_results_api/api/__init__.py -test_results_api/api/dns_server_test_metrics_api.py -test_results_api/api/dns_trace_test_metrics_api.py -test_results_api/api/dnssec_test_metrics_api.py -test_results_api/api/network_bgp_test_metrics_api.py -test_results_api/api/network_test_metrics_api.py -test_results_api/api/voice_rtp_server_test_metrics_api.py -test_results_api/api/voice_sip_server_test_metrics_api.py -test_results_api/api/web_ftp_server_test_metrics_api.py -test_results_api/api/web_http_server_test_metrics_api.py -test_results_api/api/web_page_load_test_metrics_api.py -test_results_api/api/web_transactions_test_metrics_api.py -test_results_api/api_client.py -test_results_api/api_response.py -test_results_api/configuration.py -test_results_api/exceptions.py -test_results_api/models/__init__.py -test_results_api/models/agent.py -test_results_api/models/app_links.py -test_results_api/models/app_links_links.py -test_results_api/models/bgp_basic_test_result.py -test_results_api/models/bgp_hop.py -test_results_api/models/bgp_test_result.py -test_results_api/models/bgp_test_results.py -test_results_api/models/bgp_test_route_information_result.py -test_results_api/models/bgp_test_route_information_results.py -test_results_api/models/dns_server_test_result.py -test_results_api/models/dns_server_test_results.py -test_results_api/models/dns_trace_test_result.py -test_results_api/models/dns_trace_test_results.py -test_results_api/models/dnssec_test_result.py -test_results_api/models/dnssec_test_results.py -test_results_api/models/epoch_time_window.py -test_results_api/models/error.py -test_results_api/models/expand.py -test_results_api/models/ftp_server_test_result.py -test_results_api/models/ftp_server_test_results.py -test_results_api/models/get_test_pathvis_agent_round200_response.py -test_results_api/models/get_test_result_dns_server200_response.py -test_results_api/models/get_test_result_dns_trace200_response.py -test_results_api/models/get_test_result_dnssec200_response.py -test_results_api/models/get_test_result_ftp_server200_response.py -test_results_api/models/get_test_result_http_server200_response.py -test_results_api/models/get_test_result_metrics200_response.py -test_results_api/models/get_test_result_network_pathvis200_response.py -test_results_api/models/get_test_result_page_load200_response.py -test_results_api/models/get_test_result_page_load_component_detail200_response.py -test_results_api/models/get_test_result_rtp_stream200_response.py -test_results_api/models/get_test_result_sip_server200_response.py -test_results_api/models/get_test_result_web_transactions200_response.py -test_results_api/models/get_test_result_web_transactions_component_detail200_response.py -test_results_api/models/get_test_result_web_transactions_component_page_detail200_response.py -test_results_api/models/get_test_results_bgp200_response.py -test_results_api/models/get_test_results_bgp_prefix200_response.py -test_results_api/models/http_test_result.py -test_results_api/models/http_test_result_headers.py -test_results_api/models/http_test_results.py -test_results_api/models/link.py -test_results_api/models/marker.py -test_results_api/models/monitor.py -test_results_api/models/network_test_result.py -test_results_api/models/network_test_results.py -test_results_api/models/page.py -test_results_api/models/page_load_detail_test_result.py -test_results_api/models/page_load_detail_test_results.py -test_results_api/models/page_load_test_result.py -test_results_api/models/page_load_test_results.py -test_results_api/models/pagination_links.py -test_results_api/models/pagination_links_links.py -test_results_api/models/path_vis_base_test_result.py -test_results_api/models/path_vis_detail_test_result.py -test_results_api/models/path_vis_detail_test_results.py -test_results_api/models/path_vis_endpoint.py -test_results_api/models/path_vis_hop.py -test_results_api/models/path_vis_route.py -test_results_api/models/path_vis_test_result.py -test_results_api/models/path_vis_test_results.py -test_results_api/models/query_window.py -test_results_api/models/rtp_stream_test_result.py -test_results_api/models/rtp_stream_test_results.py -test_results_api/models/self_links.py -test_results_api/models/self_links_links.py -test_results_api/models/simple_test.py -test_results_api/models/sip_server_error_type.py -test_results_api/models/sip_server_test_result.py -test_results_api/models/sip_server_test_results.py -test_results_api/models/ssl_cert.py -test_results_api/models/test_direction.py -test_results_api/models/test_interval.py -test_results_api/models/test_result.py -test_results_api/models/test_result_app_links.py -test_results_api/models/test_type.py -test_results_api/models/unauthorized_error.py -test_results_api/models/unexpanded_instant_test.py -test_results_api/models/unexpanded_instant_test_links.py -test_results_api/models/unexpanded_instant_test_links_self.py -test_results_api/models/unexpanded_instant_test_links_test_results.py -test_results_api/models/unexpanded_test.py -test_results_api/models/web_transaction_detail_test_result.py -test_results_api/models/web_transaction_detail_test_results.py -test_results_api/models/web_transaction_page_detail_test_result.py -test_results_api/models/web_transaction_page_detail_test_results.py -test_results_api/models/web_transaction_test_result.py -test_results_api/models/web_transaction_test_results.py -test_results_api/py.typed -test_results_api/rest.py -tox.ini diff --git a/test_results_api/.openapi-generator/VERSION b/test_results_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/test_results_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/test_results_api/.travis.yml b/test_results_api/.travis.yml deleted file mode 100644 index bebf5aee..00000000 --- a/test_results_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=test_results_api diff --git a/test_results_api/README.md b/test_results_api/README.md deleted file mode 100644 index f9596588..00000000 --- a/test_results_api/README.md +++ /dev/null @@ -1,228 +0,0 @@ -# test-results-api -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.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import test_results_api -``` - -### 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 test_results_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import test_results_api -from test_results_api.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 = test_results_api.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 = test_results_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_results_api.DNSSECTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - aid = '2067' # 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 `_links` instead of this parameter. (optional) - - 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") - pprint(api_response) - except ApiException as e: - print("Exception when calling DNSSECTestMetricsApi->get_test_result_dnssec: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*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}/pathvis/agent/{agentId}/round/{roundId} | Get pathvis 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_pathvis**](docs/NetworkTestMetricsApi.md#get_test_result_network_pathvis) | **GET** /v7/test-results/{testId}/pathvis | Get pathvis 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 - - -## Documentation For Models - - - [Agent](docs/Agent.md) - - [AppLinks](docs/AppLinks.md) - - [AppLinksLinks](docs/AppLinksLinks.md) - - [BgpBasicTestResult](docs/BgpBasicTestResult.md) - - [BgpHop](docs/BgpHop.md) - - [BgpTestResult](docs/BgpTestResult.md) - - [BgpTestResults](docs/BgpTestResults.md) - - [BgpTestRouteInformationResult](docs/BgpTestRouteInformationResult.md) - - [BgpTestRouteInformationResults](docs/BgpTestRouteInformationResults.md) - - [DnsServerTestResult](docs/DnsServerTestResult.md) - - [DnsServerTestResults](docs/DnsServerTestResults.md) - - [DnsTraceTestResult](docs/DnsTraceTestResult.md) - - [DnsTraceTestResults](docs/DnsTraceTestResults.md) - - [DnssecTestResult](docs/DnssecTestResult.md) - - [DnssecTestResults](docs/DnssecTestResults.md) - - [EpochTimeWindow](docs/EpochTimeWindow.md) - - [Error](docs/Error.md) - - [Expand](docs/Expand.md) - - [FtpServerTestResult](docs/FtpServerTestResult.md) - - [FtpServerTestResults](docs/FtpServerTestResults.md) - - [GetTestPathvisAgentRound200Response](docs/GetTestPathvisAgentRound200Response.md) - - [GetTestResultDnsServer200Response](docs/GetTestResultDnsServer200Response.md) - - [GetTestResultDnsTrace200Response](docs/GetTestResultDnsTrace200Response.md) - - [GetTestResultDnssec200Response](docs/GetTestResultDnssec200Response.md) - - [GetTestResultFtpServer200Response](docs/GetTestResultFtpServer200Response.md) - - [GetTestResultHttpServer200Response](docs/GetTestResultHttpServer200Response.md) - - [GetTestResultMetrics200Response](docs/GetTestResultMetrics200Response.md) - - [GetTestResultNetworkPathvis200Response](docs/GetTestResultNetworkPathvis200Response.md) - - [GetTestResultPageLoad200Response](docs/GetTestResultPageLoad200Response.md) - - [GetTestResultPageLoadComponentDetail200Response](docs/GetTestResultPageLoadComponentDetail200Response.md) - - [GetTestResultRtpStream200Response](docs/GetTestResultRtpStream200Response.md) - - [GetTestResultSipServer200Response](docs/GetTestResultSipServer200Response.md) - - [GetTestResultWebTransactions200Response](docs/GetTestResultWebTransactions200Response.md) - - [GetTestResultWebTransactionsComponentDetail200Response](docs/GetTestResultWebTransactionsComponentDetail200Response.md) - - [GetTestResultWebTransactionsComponentPageDetail200Response](docs/GetTestResultWebTransactionsComponentPageDetail200Response.md) - - [GetTestResultsBgp200Response](docs/GetTestResultsBgp200Response.md) - - [GetTestResultsBgpPrefix200Response](docs/GetTestResultsBgpPrefix200Response.md) - - [HttpTestResult](docs/HttpTestResult.md) - - [HttpTestResultHeaders](docs/HttpTestResultHeaders.md) - - [HttpTestResults](docs/HttpTestResults.md) - - [Link](docs/Link.md) - - [Marker](docs/Marker.md) - - [Monitor](docs/Monitor.md) - - [NetworkTestResult](docs/NetworkTestResult.md) - - [NetworkTestResults](docs/NetworkTestResults.md) - - [Page](docs/Page.md) - - [PageLoadDetailTestResult](docs/PageLoadDetailTestResult.md) - - [PageLoadDetailTestResults](docs/PageLoadDetailTestResults.md) - - [PageLoadTestResult](docs/PageLoadTestResult.md) - - [PageLoadTestResults](docs/PageLoadTestResults.md) - - [PaginationLinks](docs/PaginationLinks.md) - - [PaginationLinksLinks](docs/PaginationLinksLinks.md) - - [PathVisBaseTestResult](docs/PathVisBaseTestResult.md) - - [PathVisDetailTestResult](docs/PathVisDetailTestResult.md) - - [PathVisDetailTestResults](docs/PathVisDetailTestResults.md) - - [PathVisEndpoint](docs/PathVisEndpoint.md) - - [PathVisHop](docs/PathVisHop.md) - - [PathVisRoute](docs/PathVisRoute.md) - - [PathVisTestResult](docs/PathVisTestResult.md) - - [PathVisTestResults](docs/PathVisTestResults.md) - - [QueryWindow](docs/QueryWindow.md) - - [RtpStreamTestResult](docs/RtpStreamTestResult.md) - - [RtpStreamTestResults](docs/RtpStreamTestResults.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SimpleTest](docs/SimpleTest.md) - - [SipServerErrorType](docs/SipServerErrorType.md) - - [SipServerTestResult](docs/SipServerTestResult.md) - - [SipServerTestResults](docs/SipServerTestResults.md) - - [SslCert](docs/SslCert.md) - - [TestDirection](docs/TestDirection.md) - - [TestInterval](docs/TestInterval.md) - - [TestResult](docs/TestResult.md) - - [TestResultAppLinks](docs/TestResultAppLinks.md) - - [TestType](docs/TestType.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) - - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) - - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) - - [UnexpandedInstantTestLinksTestResults](docs/UnexpandedInstantTestLinksTestResults.md) - - [UnexpandedTest](docs/UnexpandedTest.md) - - [WebTransactionDetailTestResult](docs/WebTransactionDetailTestResult.md) - - [WebTransactionDetailTestResults](docs/WebTransactionDetailTestResults.md) - - [WebTransactionPageDetailTestResult](docs/WebTransactionPageDetailTestResult.md) - - [WebTransactionPageDetailTestResults](docs/WebTransactionPageDetailTestResults.md) - - [WebTransactionTestResult](docs/WebTransactionTestResult.md) - - [WebTransactionTestResults](docs/WebTransactionTestResults.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/test_results_api/docs/Agent.md b/test_results_api/docs/Agent.md deleted file mode 100644 index 7ab7062c..00000000 --- a/test_results_api/docs/Agent.md +++ /dev/null @@ -1,30 +0,0 @@ -# Agent - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_id** | **str** | Unique agent ID | [optional] [readonly] -**agent_name** | **str** | Agent name | [optional] [readonly] -**country_id** | **str** | 2-digit ISO country code | [optional] [readonly] - -## Example - -```python -from test_results_api.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_form_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/test_results_api/docs/AppLinks.md b/test_results_api/docs/AppLinks.md deleted file mode 100644 index d50c44fe..00000000 --- a/test_results_api/docs/AppLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# AppLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**AppLinksLinks**](AppLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.app_links import AppLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of AppLinks from a JSON string -app_links_instance = AppLinks.from_json(json) -# print the JSON string representation of the object -print AppLinks.to_json() - -# convert the object into a dict -app_links_dict = app_links_instance.to_dict() -# create an instance of AppLinks from a dict -app_links_form_dict = app_links.from_dict(app_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/test_results_api/docs/AppLinksLinks.md b/test_results_api/docs/AppLinksLinks.md deleted file mode 100644 index 1b5c1ea1..00000000 --- a/test_results_api/docs/AppLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# AppLinksLinks - -A links object containing the ThousandEyes App link - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_link** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from test_results_api.models.app_links_links import AppLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of AppLinksLinks from a JSON string -app_links_links_instance = AppLinksLinks.from_json(json) -# print the JSON string representation of the object -print AppLinksLinks.to_json() - -# convert the object into a dict -app_links_links_dict = app_links_links_instance.to_dict() -# create an instance of AppLinksLinks from a dict -app_links_links_form_dict = app_links_links.from_dict(app_links_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/test_results_api/docs/Error.md b/test_results_api/docs/Error.md deleted file mode 100644 index 192750be..00000000 --- a/test_results_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 test_results_api.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_form_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/test_results_api/docs/Expand.md b/test_results_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/test_results_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/test_results_api/docs/GetTestResultHttpServer200Response.md b/test_results_api/docs/GetTestResultHttpServer200Response.md deleted file mode 100644 index 0539832e..00000000 --- a/test_results_api/docs/GetTestResultHttpServer200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetTestResultHttpServer200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] -**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultHttpServer200Response from a JSON string -get_test_result_http_server200_response_instance = GetTestResultHttpServer200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultHttpServer200Response.to_json() - -# convert the object into a dict -get_test_result_http_server200_response_dict = get_test_result_http_server200_response_instance.to_dict() -# create an instance of GetTestResultHttpServer200Response from a dict -get_test_result_http_server200_response_form_dict = get_test_result_http_server200_response.from_dict(get_test_result_http_server200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/GetTestResultNetworkPathvis200Response.md b/test_results_api/docs/GetTestResultNetworkPathvis200Response.md deleted file mode 100644 index 488e8466..00000000 --- a/test_results_api/docs/GetTestResultNetworkPathvis200Response.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetTestResultNetworkPathvis200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] -**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultNetworkPathvis200Response from a JSON string -get_test_result_network_pathvis200_response_instance = GetTestResultNetworkPathvis200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultNetworkPathvis200Response.to_json() - -# convert the object into a dict -get_test_result_network_pathvis200_response_dict = get_test_result_network_pathvis200_response_instance.to_dict() -# create an instance of GetTestResultNetworkPathvis200Response from a dict -get_test_result_network_pathvis200_response_form_dict = get_test_result_network_pathvis200_response.from_dict(get_test_result_network_pathvis200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/GetTestResultPageLoadComponentDetail200Response.md b/test_results_api/docs/GetTestResultPageLoadComponentDetail200Response.md deleted file mode 100644 index 43317c33..00000000 --- a/test_results_api/docs/GetTestResultPageLoadComponentDetail200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetTestResultPageLoadComponentDetail200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PageLoadDetailTestResult]**](PageLoadDetailTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultPageLoadComponentDetail200Response from a JSON string -get_test_result_page_load_component_detail200_response_instance = GetTestResultPageLoadComponentDetail200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultPageLoadComponentDetail200Response.to_json() - -# convert the object into a dict -get_test_result_page_load_component_detail200_response_dict = get_test_result_page_load_component_detail200_response_instance.to_dict() -# create an instance of GetTestResultPageLoadComponentDetail200Response from a dict -get_test_result_page_load_component_detail200_response_form_dict = get_test_result_page_load_component_detail200_response.from_dict(get_test_result_page_load_component_detail200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/GetTestResultWebTransactionsComponentDetail200Response.md b/test_results_api/docs/GetTestResultWebTransactionsComponentDetail200Response.md deleted file mode 100644 index c7ebd739..00000000 --- a/test_results_api/docs/GetTestResultWebTransactionsComponentDetail200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetTestResultWebTransactionsComponentDetail200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[WebTransactionDetailTestResult]**](WebTransactionDetailTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultWebTransactionsComponentDetail200Response from a JSON string -get_test_result_web_transactions_component_detail200_response_instance = GetTestResultWebTransactionsComponentDetail200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultWebTransactionsComponentDetail200Response.to_json() - -# convert the object into a dict -get_test_result_web_transactions_component_detail200_response_dict = get_test_result_web_transactions_component_detail200_response_instance.to_dict() -# create an instance of GetTestResultWebTransactionsComponentDetail200Response from a dict -get_test_result_web_transactions_component_detail200_response_form_dict = get_test_result_web_transactions_component_detail200_response.from_dict(get_test_result_web_transactions_component_detail200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md b/test_results_api/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md deleted file mode 100644 index 272315a6..00000000 --- a/test_results_api/docs/GetTestResultWebTransactionsComponentPageDetail200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetTestResultWebTransactionsComponentPageDetail200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[WebTransactionPageDetailTestResult]**](WebTransactionPageDetailTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultWebTransactionsComponentPageDetail200Response from a JSON string -get_test_result_web_transactions_component_page_detail200_response_instance = GetTestResultWebTransactionsComponentPageDetail200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultWebTransactionsComponentPageDetail200Response.to_json() - -# convert the object into a dict -get_test_result_web_transactions_component_page_detail200_response_dict = get_test_result_web_transactions_component_page_detail200_response_instance.to_dict() -# create an instance of GetTestResultWebTransactionsComponentPageDetail200Response from a dict -get_test_result_web_transactions_component_page_detail200_response_form_dict = get_test_result_web_transactions_component_page_detail200_response.from_dict(get_test_result_web_transactions_component_page_detail200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/GetTestResultsBgp200Response.md b/test_results_api/docs/GetTestResultsBgp200Response.md deleted file mode 100644 index 036cc175..00000000 --- a/test_results_api/docs/GetTestResultsBgp200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetTestResultsBgp200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[BgpTestResult]**](BgpTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.get_test_results_bgp200_response import GetTestResultsBgp200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTestResultsBgp200Response from a JSON string -get_test_results_bgp200_response_instance = GetTestResultsBgp200Response.from_json(json) -# print the JSON string representation of the object -print GetTestResultsBgp200Response.to_json() - -# convert the object into a dict -get_test_results_bgp200_response_dict = get_test_results_bgp200_response_instance.to_dict() -# create an instance of GetTestResultsBgp200Response from a dict -get_test_results_bgp200_response_form_dict = get_test_results_bgp200_response.from_dict(get_test_results_bgp200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/HttpTestResult.md b/test_results_api/docs/HttpTestResult.md deleted file mode 100644 index 86dff3c7..00000000 --- a/test_results_api/docs/HttpTestResult.md +++ /dev/null @@ -1,50 +0,0 @@ -# HttpTestResult - - -## Properties -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** | **object** | | [optional] -**agent** | [**Agent**](Agent.md) | | [optional] -**server_ip** | **str** | IP address of destination server | [optional] [readonly] -**response_code** | **int** | HTTP response code | [optional] -**num_redirects** | **int** | Number of redirects | [optional] -**redirect_time** | **int** | Cumulative redirect timing in milliseconds | [optional] -**dns_time** | **int** | Time required to resolve DNS in milliseconds | [optional] -**ssl_time** | **int** | Time to negotiate SSL/TLS in milliseconds | [optional] -**connect_time** | **int** | Time required to establish a TCP connection to the server | [optional] -**wait_time** | **int** | Time elapsed between completion of request and first byte of response in milliseconds | [optional] -**receive_time** | **int** | Elapsed time between first and last byte of response in milliseconds | [optional] -**wire_size** | **int** | Size of content in bytes | [optional] -**response_time** | **int** | Time to first byte in milliseconds | [optional] -**throughput** | **float** | WireSize divided by receiveTime in byter per second | [optional] -**total_time** | **int** | response time + receive time | [optional] -**headers** | [**HttpTestResultHeaders**](HttpTestResultHeaders.md) | | [optional] -**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] -**ssl_cipher** | **str** | Cipher suite | [optional] -**ssl_version** | **str** | TLS version | [optional] -**ssl_certificates** | [**List[SslCert]**](SslCert.md) | | [optional] - -## Example - -```python -from test_results_api.models.http_test_result import HttpTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpTestResult from a JSON string -http_test_result_instance = HttpTestResult.from_json(json) -# print the JSON string representation of the object -print HttpTestResult.to_json() - -# convert the object into a dict -http_test_result_dict = http_test_result_instance.to_dict() -# create an instance of HttpTestResult from a dict -http_test_result_form_dict = http_test_result.from_dict(http_test_result_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/test_results_api/docs/HttpTestResultHeaders.md b/test_results_api/docs/HttpTestResultHeaders.md deleted file mode 100644 index 55c8132e..00000000 --- a/test_results_api/docs/HttpTestResultHeaders.md +++ /dev/null @@ -1,30 +0,0 @@ -# HttpTestResultHeaders - -Expandable object containing both request and response headers - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**request_headers** | **str** | Crlf-delimited list of request headers in header: value format | [optional] -**response_headers** | **str** | crlf-delimited list of response headers in header: value format | [optional] - -## Example - -```python -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpTestResultHeaders from a JSON string -http_test_result_headers_instance = HttpTestResultHeaders.from_json(json) -# print the JSON string representation of the object -print HttpTestResultHeaders.to_json() - -# convert the object into a dict -http_test_result_headers_dict = http_test_result_headers_instance.to_dict() -# create an instance of HttpTestResultHeaders from a dict -http_test_result_headers_form_dict = http_test_result_headers.from_dict(http_test_result_headers_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/test_results_api/docs/HttpTestResults.md b/test_results_api/docs/HttpTestResults.md deleted file mode 100644 index ecdc7704..00000000 --- a/test_results_api/docs/HttpTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# HttpTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[HttpTestResult]**](HttpTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.http_test_results import HttpTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpTestResults from a JSON string -http_test_results_instance = HttpTestResults.from_json(json) -# print the JSON string representation of the object -print HttpTestResults.to_json() - -# convert the object into a dict -http_test_results_dict = http_test_results_instance.to_dict() -# create an instance of HttpTestResults from a dict -http_test_results_form_dict = http_test_results.from_dict(http_test_results_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/test_results_api/docs/Link.md b/test_results_api/docs/Link.md deleted file mode 100644 index ceef9be3..00000000 --- a/test_results_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 test_results_api.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_form_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/test_results_api/docs/Monitor.md b/test_results_api/docs/Monitor.md deleted file mode 100644 index f054012f..00000000 --- a/test_results_api/docs/Monitor.md +++ /dev/null @@ -1,30 +0,0 @@ -# Monitor - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**monitor_id** | **str** | Unique monitor ID. | [optional] [readonly] -**monitor_name** | **str** | The name of the Monitor. | [optional] [readonly] -**country_id** | **str** | 2-digit ISO country code. | [optional] [readonly] - -## Example - -```python -from test_results_api.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_form_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/test_results_api/docs/NetworkTestMetricsApi.md b/test_results_api/docs/NetworkTestMetricsApi.md deleted file mode 100644 index 6096c106..00000000 --- a/test_results_api/docs/NetworkTestMetricsApi.md +++ /dev/null @@ -1,301 +0,0 @@ -# test_results_api.NetworkTestMetricsApi - -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}/pathvis/agent/{agentId}/round/{roundId} | Get pathvis 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_pathvis**](NetworkTestMetricsApi.md#get_test_result_network_pathvis) | **GET** /v7/test-results/{testId}/pathvis | Get pathvis network test results - - -# **get_test_pathvis_agent_round** -> GetTestPathvisAgentRound200Response get_test_pathvis_agent_round(test_id, agent_id, round_id, aid=aid, direction=direction) - -Get pathvis 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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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 time -import os -import test_results_api -from test_results_api.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response -from test_results_api.models.test_direction import TestDirection -from test_results_api.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 = test_results_api.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 = test_results_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_results_api.NetworkTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - aid = '2067' # 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 = test_results_api.TestDirection() # TestDirection | Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 pathvis 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** | [**TestDirection**](.md)| Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 - -[**GetTestPathvisAgentRound200Response**](GetTestPathvisAgentRound200Response.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** -> GetTestResultMetrics200Response get_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) - -Get network test results - -Returns network test results for every agent and round. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_results_api -from test_results_api.models.get_test_result_metrics200_response import GetTestResultMetrics200Response -from test_results_api.models.test_direction import TestDirection -from test_results_api.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 = test_results_api.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 = test_results_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_results_api.NetworkTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - aid = '2067' # 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 `_links` instead of this parameter. (optional) - direction = test_results_api.TestDirection() # TestDirection | Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 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") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkTestMetricsApi->get_test_result_metrics: %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 `_links` instead of this parameter. | [optional] - **direction** | [**TestDirection**](.md)| Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 - -[**GetTestResultMetrics200Response**](GetTestResultMetrics200Response.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_network_pathvis** -> GetTestResultNetworkPathvis200Response get_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) - -Get pathvis network test results - -Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. 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 `pathvis?direction=to-target`. For results from agent D to agent A, you can use `pathvis?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 time -import os -import test_results_api -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.test_direction import TestDirection -from test_results_api.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 = test_results_api.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 = test_results_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_results_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_results_api.NetworkTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - aid = '2067' # 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 `_links` instead of this parameter. (optional) - direction = test_results_api.TestDirection() # TestDirection | Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 pathvis network 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, direction=direction) - print("The response of NetworkTestMetricsApi->get_test_result_network_pathvis:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkTestMetricsApi->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 `_links` instead of this parameter. | [optional] - **direction** | [**TestDirection**](.md)| Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; 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 - -[**GetTestResultNetworkPathvis200Response**](GetTestResultNetworkPathvis200Response.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) - diff --git a/test_results_api/docs/NetworkTestResult.md b/test_results_api/docs/NetworkTestResult.md deleted file mode 100644 index 0a1d013e..00000000 --- a/test_results_api/docs/NetworkTestResult.md +++ /dev/null @@ -1,44 +0,0 @@ -# NetworkTestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_date** | **datetime** | Data point date in UTC (ISO date-time format). | [optional] [readonly] -**round_id** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] -**links** | **object** | | [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] -**available_bandwidth** | **float** | | [optional] [readonly] -**avg_latency** | **float** | Average RTT for packets sent to destination | [optional] [readonly] -**bandwidth** | **float** | | [optional] [readonly] -**capacity** | **float** | | [optional] [readonly] -**jitter** | **float** | Standard deviation of latency | [optional] [readonly] -**loss** | **float** | Percentage of packets not reaching destination | [optional] [readonly] -**max_latency** | **float** | Maximum RTT for packets sent to destination | [optional] [readonly] -**min_latency** | **float** | Minimum RTT for packets sent to destination | [optional] [readonly] -**agent** | [**Agent**](Agent.md) | | [optional] -**server_ip** | **str** | IP of target server | [optional] [readonly] -**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] - -## Example - -```python -from test_results_api.models.network_test_result import NetworkTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of NetworkTestResult from a JSON string -network_test_result_instance = NetworkTestResult.from_json(json) -# print the JSON string representation of the object -print NetworkTestResult.to_json() - -# convert the object into a dict -network_test_result_dict = network_test_result_instance.to_dict() -# create an instance of NetworkTestResult from a dict -network_test_result_form_dict = network_test_result.from_dict(network_test_result_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/test_results_api/docs/NetworkTestResults.md b/test_results_api/docs/NetworkTestResults.md deleted file mode 100644 index d7062e55..00000000 --- a/test_results_api/docs/NetworkTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# NetworkTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.network_test_results import NetworkTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of NetworkTestResults from a JSON string -network_test_results_instance = NetworkTestResults.from_json(json) -# print the JSON string representation of the object -print NetworkTestResults.to_json() - -# convert the object into a dict -network_test_results_dict = network_test_results_instance.to_dict() -# create an instance of NetworkTestResults from a dict -network_test_results_form_dict = network_test_results.from_dict(network_test_results_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/test_results_api/docs/PaginationLinks.md b/test_results_api/docs/PaginationLinks.md deleted file mode 100644 index 2b864257..00000000 --- a/test_results_api/docs/PaginationLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinks - -A links object containing pagination related link(s). - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.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_form_dict = pagination_links.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/test_results_api/docs/PaginationLinksLinks.md b/test_results_api/docs/PaginationLinksLinks.md deleted file mode 100644 index 002477dc..00000000 --- a/test_results_api/docs/PaginationLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# PaginationLinksLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**previous** | [**Link**](Link.md) | | [optional] -**next** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from test_results_api.models.pagination_links_links import PaginationLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of PaginationLinksLinks from a JSON string -pagination_links_links_instance = PaginationLinksLinks.from_json(json) -# print the JSON string representation of the object -print PaginationLinksLinks.to_json() - -# convert the object into a dict -pagination_links_links_dict = pagination_links_links_instance.to_dict() -# create an instance of PaginationLinksLinks from a dict -pagination_links_links_form_dict = pagination_links_links.from_dict(pagination_links_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/test_results_api/docs/PathVisBaseTestResult.md b/test_results_api/docs/PathVisBaseTestResult.md deleted file mode 100644 index 82ab1097..00000000 --- a/test_results_api/docs/PathVisBaseTestResult.md +++ /dev/null @@ -1,39 +0,0 @@ -# PathVisBaseTestResult - - -## Properties -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** | **object** | | [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] -**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] -**server_ip** | **str** | IP of target server | [optional] [readonly] -**source_ip** | **str** | IP address of source agent | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source agent | [optional] [readonly] -**target_is_proxy** | **bool** | | [optional] [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] - -## Example - -```python -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisBaseTestResult from a JSON string -path_vis_base_test_result_instance = PathVisBaseTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisBaseTestResult.to_json() - -# convert the object into a dict -path_vis_base_test_result_dict = path_vis_base_test_result_instance.to_dict() -# create an instance of PathVisBaseTestResult from a dict -path_vis_base_test_result_form_dict = path_vis_base_test_result.from_dict(path_vis_base_test_result_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/test_results_api/docs/PathVisDetailTestResult.md b/test_results_api/docs/PathVisDetailTestResult.md deleted file mode 100644 index e4a320eb..00000000 --- a/test_results_api/docs/PathVisDetailTestResult.md +++ /dev/null @@ -1,40 +0,0 @@ -# PathVisDetailTestResult - - -## Properties -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** | **object** | | [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] -**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] -**server_ip** | **str** | IP of target server | [optional] [readonly] -**source_ip** | **str** | IP address of source agent | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source agent | [optional] [readonly] -**target_is_proxy** | **bool** | | [optional] [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**routes** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows 3 iterations of path trace, with each iteration specified by a pathId | [optional] - -## Example - -```python -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisDetailTestResult from a JSON string -path_vis_detail_test_result_instance = PathVisDetailTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisDetailTestResult.to_json() - -# convert the object into a dict -path_vis_detail_test_result_dict = path_vis_detail_test_result_instance.to_dict() -# create an instance of PathVisDetailTestResult from a dict -path_vis_detail_test_result_form_dict = path_vis_detail_test_result.from_dict(path_vis_detail_test_result_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/test_results_api/docs/PathVisDetailTestResults.md b/test_results_api/docs/PathVisDetailTestResults.md deleted file mode 100644 index 3253f069..00000000 --- a/test_results_api/docs/PathVisDetailTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# PathVisDetailTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PathVisDetailTestResult]**](PathVisDetailTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisDetailTestResults from a JSON string -path_vis_detail_test_results_instance = PathVisDetailTestResults.from_json(json) -# print the JSON string representation of the object -print PathVisDetailTestResults.to_json() - -# convert the object into a dict -path_vis_detail_test_results_dict = path_vis_detail_test_results_instance.to_dict() -# create an instance of PathVisDetailTestResults from a dict -path_vis_detail_test_results_form_dict = path_vis_detail_test_results.from_dict(path_vis_detail_test_results_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/test_results_api/docs/PathVisEndpoint.md b/test_results_api/docs/PathVisEndpoint.md deleted file mode 100644 index 7dee720a..00000000 --- a/test_results_api/docs/PathVisEndpoint.md +++ /dev/null @@ -1,33 +0,0 @@ -# PathVisEndpoint - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ip_address** | **str** | IP address of the hop | [optional] [readonly] -**mss** | **int** | Maximum segment size in bytes | [optional] [readonly] -**number_of_hops** | **int** | Number of hops for path trace to destination | [optional] [readonly] -**path_id** | **str** | Unique ID of path trace | [optional] [readonly] -**path_mtu** | **str** | Location information for the hop | [optional] [readonly] -**response_time** | **int** | RTT of the path trace to the destination in milliseconds | [optional] [readonly] - -## Example - -```python -from test_results_api.models.path_vis_endpoint import PathVisEndpoint - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisEndpoint from a JSON string -path_vis_endpoint_instance = PathVisEndpoint.from_json(json) -# print the JSON string representation of the object -print PathVisEndpoint.to_json() - -# convert the object into a dict -path_vis_endpoint_dict = path_vis_endpoint_instance.to_dict() -# create an instance of PathVisEndpoint from a dict -path_vis_endpoint_form_dict = path_vis_endpoint.from_dict(path_vis_endpoint_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/test_results_api/docs/PathVisHop.md b/test_results_api/docs/PathVisHop.md deleted file mode 100644 index 56aa7902..00000000 --- a/test_results_api/docs/PathVisHop.md +++ /dev/null @@ -1,35 +0,0 @@ -# PathVisHop - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**hop** | **int** | Hop index | [optional] [readonly] -**ip_address** | **str** | IP address of the hop | [optional] [readonly] -**prefix** | **str** | Prefix of IP address shown in CIDR | [optional] [readonly] -**rdns** | **str** | Reverse DNS entry of IP, if available | [optional] [readonly] -**network** | **str** | Autonomous System originating the prefix | [optional] [readonly] -**response_time** | **int** | RTT to the hop’s IP in milliseconds | [optional] [readonly] -**location** | **str** | Location information for the hop | [optional] [readonly] -**mpls** | **str** | Multiprotocol Label Switching information, if available | [optional] [readonly] - -## Example - -```python -from test_results_api.models.path_vis_hop import PathVisHop - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisHop from a JSON string -path_vis_hop_instance = PathVisHop.from_json(json) -# print the JSON string representation of the object -print PathVisHop.to_json() - -# convert the object into a dict -path_vis_hop_dict = path_vis_hop_instance.to_dict() -# create an instance of PathVisHop from a dict -path_vis_hop_form_dict = path_vis_hop.from_dict(path_vis_hop_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/test_results_api/docs/PathVisRoute.md b/test_results_api/docs/PathVisRoute.md deleted file mode 100644 index 4e88edec..00000000 --- a/test_results_api/docs/PathVisRoute.md +++ /dev/null @@ -1,29 +0,0 @@ -# PathVisRoute - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path_id** | **str** | Unique ID of path trace | [optional] [readonly] -**hops** | [**List[PathVisHop]**](PathVisHop.md) | Array of hop objects indicating each step in the traceroute | [optional] - -## Example - -```python -from test_results_api.models.path_vis_route import PathVisRoute - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisRoute from a JSON string -path_vis_route_instance = PathVisRoute.from_json(json) -# print the JSON string representation of the object -print PathVisRoute.to_json() - -# convert the object into a dict -path_vis_route_dict = path_vis_route_instance.to_dict() -# create an instance of PathVisRoute from a dict -path_vis_route_form_dict = path_vis_route.from_dict(path_vis_route_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/test_results_api/docs/PathVisTestResult.md b/test_results_api/docs/PathVisTestResult.md deleted file mode 100644 index eded7878..00000000 --- a/test_results_api/docs/PathVisTestResult.md +++ /dev/null @@ -1,40 +0,0 @@ -# PathVisTestResult - - -## Properties -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** | **object** | | [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] -**server** | **str** | Target server, including port (if method used is TCP) | [optional] [readonly] -**server_ip** | **str** | IP of target server | [optional] [readonly] -**source_ip** | **str** | IP address of source agent | [optional] [readonly] -**source_prefix** | **str** | IP prefix of source agent | [optional] [readonly] -**target_is_proxy** | **bool** | | [optional] [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**endpoints** | [**List[PathVisEndpoint]**](PathVisEndpoint.md) | Shows all iterations of path trace, with each iteration specified by a pathId | [optional] - -## Example - -```python -from test_results_api.models.path_vis_test_result import PathVisTestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisTestResult from a JSON string -path_vis_test_result_instance = PathVisTestResult.from_json(json) -# print the JSON string representation of the object -print PathVisTestResult.to_json() - -# convert the object into a dict -path_vis_test_result_dict = path_vis_test_result_instance.to_dict() -# create an instance of PathVisTestResult from a dict -path_vis_test_result_form_dict = path_vis_test_result.from_dict(path_vis_test_result_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/test_results_api/docs/PathVisTestResults.md b/test_results_api/docs/PathVisTestResults.md deleted file mode 100644 index 1210688a..00000000 --- a/test_results_api/docs/PathVisTestResults.md +++ /dev/null @@ -1,29 +0,0 @@ -# PathVisTestResults - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**results** | [**List[PathVisTestResult]**](PathVisTestResult.md) | | [optional] -**test** | [**SimpleTest**](SimpleTest.md) | | [optional] - -## Example - -```python -from test_results_api.models.path_vis_test_results import PathVisTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of PathVisTestResults from a JSON string -path_vis_test_results_instance = PathVisTestResults.from_json(json) -# print the JSON string representation of the object -print PathVisTestResults.to_json() - -# convert the object into a dict -path_vis_test_results_dict = path_vis_test_results_instance.to_dict() -# create an instance of PathVisTestResults from a dict -path_vis_test_results_form_dict = path_vis_test_results.from_dict(path_vis_test_results_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/test_results_api/docs/QueryWindow.md b/test_results_api/docs/QueryWindow.md deleted file mode 100644 index 82dc47d1..00000000 --- a/test_results_api/docs/QueryWindow.md +++ /dev/null @@ -1,29 +0,0 @@ -# QueryWindow - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -## Example - -```python -from test_results_api.models.query_window import QueryWindow - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryWindow from a JSON string -query_window_instance = QueryWindow.from_json(json) -# print the JSON string representation of the object -print QueryWindow.to_json() - -# convert the object into a dict -query_window_dict = query_window_instance.to_dict() -# create an instance of QueryWindow from a dict -query_window_form_dict = query_window.from_dict(query_window_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/test_results_api/docs/SelfLinks.md b/test_results_api/docs/SelfLinks.md deleted file mode 100644 index f3bf2ff8..00000000 --- a/test_results_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from test_results_api.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_form_dict = self_links.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/test_results_api/docs/SelfLinksLinks.md b/test_results_api/docs/SelfLinksLinks.md deleted file mode 100644 index 2eecc7cc..00000000 --- a/test_results_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from test_results_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/test_results_api/docs/SimpleTest.md b/test_results_api/docs/SimpleTest.md deleted file mode 100644 index 744e15d9..00000000 --- a/test_results_api/docs/SimpleTest.md +++ /dev/null @@ -1,42 +0,0 @@ -# SimpleTest - -Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.simple_test import SimpleTest - -# TODO update the JSON string below -json = "{}" -# create an instance of SimpleTest from a JSON string -simple_test_instance = SimpleTest.from_json(json) -# print the JSON string representation of the object -print SimpleTest.to_json() - -# convert the object into a dict -simple_test_dict = simple_test_instance.to_dict() -# create an instance of SimpleTest from a dict -simple_test_form_dict = simple_test.from_dict(simple_test_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/test_results_api/docs/SslCert.md b/test_results_api/docs/SslCert.md deleted file mode 100644 index 7e29a8bb..00000000 --- a/test_results_api/docs/SslCert.md +++ /dev/null @@ -1,35 +0,0 @@ -# SslCert - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**days_until_expiry** | **int** | Days until certificate expires, rounded down. 0 is shown if there are less than 24 hours remaining. Calculated when the test was executed. | [optional] -**is_fetch_date_in_valid_cert_date_range** | **str** | True when certificate fetch date is within the valid certificate date range, false otherwise | [optional] -**has_valid_signing_cert** | **str** | This field is implicitly true; it is output only when false. false indicates this certificate was missing a valid signing certificate in the chain. | [optional] -**issuer_name** | **str** | Certificate issuer | [optional] -**valid_before** | **datetime** | Certificate is not valid after this date | [optional] -**valid_after** | **datetime** | Certificate is not valid before this date | [optional] -**subject_alternative_names** | **List[str]** | Alternative name(s) of the certificate subject, extracted from the Subject Alternative Name (SAN) X.509 certificate extension, for example example.com, www2.example.com | [optional] -**subject_name** | **str** | certificate’s subject name - a value of the common name (CN) RDN from the certificate’s Subject attribute, for example www.example.com | [optional] - -## Example - -```python -from test_results_api.models.ssl_cert import SslCert - -# TODO update the JSON string below -json = "{}" -# create an instance of SslCert from a JSON string -ssl_cert_instance = SslCert.from_json(json) -# print the JSON string representation of the object -print SslCert.to_json() - -# convert the object into a dict -ssl_cert_dict = ssl_cert_instance.to_dict() -# create an instance of SslCert from a dict -ssl_cert_form_dict = ssl_cert.from_dict(ssl_cert_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/test_results_api/docs/TestDirection.md b/test_results_api/docs/TestDirection.md deleted file mode 100644 index 59dab3fb..00000000 --- a/test_results_api/docs/TestDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDirection - -Direction of the test, which affects how results are shown. - -## 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/test_results_api/docs/TestInterval.md b/test_results_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/test_results_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/test_results_api/docs/TestResult.md b/test_results_api/docs/TestResult.md deleted file mode 100644 index 0d161a85..00000000 --- a/test_results_api/docs/TestResult.md +++ /dev/null @@ -1,30 +0,0 @@ -# TestResult - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | **object** | | [optional] -**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] - -## Example - -```python -from test_results_api.models.test_result import TestResult - -# TODO update the JSON string below -json = "{}" -# create an instance of TestResult from a JSON string -test_result_instance = TestResult.from_json(json) -# print the JSON string representation of the object -print TestResult.to_json() - -# convert the object into a dict -test_result_dict = test_result_instance.to_dict() -# create an instance of TestResult from a dict -test_result_form_dict = test_result.from_dict(test_result_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/test_results_api/docs/TestType.md b/test_results_api/docs/TestType.md deleted file mode 100644 index ae5d924e..00000000 --- a/test_results_api/docs/TestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestType - -This is a read only value, as test type is implicit in the test creation url. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/test_results_api/docs/UnauthorizedError.md b/test_results_api/docs/UnauthorizedError.md deleted file mode 100644 index e4879144..00000000 --- a/test_results_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from test_results_api.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_form_dict = unauthorized_error.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/test_results_api/docs/UnexpandedInstantTest.md b/test_results_api/docs/UnexpandedInstantTest.md deleted file mode 100644 index 2f96646f..00000000 --- a/test_results_api/docs/UnexpandedInstantTest.md +++ /dev/null @@ -1,38 +0,0 @@ -# UnexpandedInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from test_results_api.models.unexpanded_instant_test import UnexpandedInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTest from a JSON string -unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTest.to_json() - -# convert the object into a dict -unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() -# create an instance of UnexpandedInstantTest from a dict -unexpanded_instant_test_form_dict = unexpanded_instant_test.from_dict(unexpanded_instant_test_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/test_results_api/docs/UnexpandedInstantTestLinks.md b/test_results_api/docs/UnexpandedInstantTestLinks.md deleted file mode 100644 index a67b7eab..00000000 --- a/test_results_api/docs/UnexpandedInstantTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedInstantTestLinks - -A list of links that can be accessed to get more information - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] -**test_results** | [**UnexpandedInstantTestLinksTestResults**](UnexpandedInstantTestLinksTestResults.md) | | [optional] - -## Example - -```python -from test_results_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinks from a JSON string -unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinks.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() -# create an instance of UnexpandedInstantTestLinks from a dict -unexpanded_instant_test_links_form_dict = unexpanded_instant_test_links.from_dict(unexpanded_instant_test_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/test_results_api/docs/UnexpandedInstantTestLinksSelf.md b/test_results_api/docs/UnexpandedInstantTestLinksSelf.md deleted file mode 100644 index c508e07a..00000000 --- a/test_results_api/docs/UnexpandedInstantTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksSelf - - -## 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 test_results_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksSelf from a JSON string -unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksSelf.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksSelf from a dict -unexpanded_instant_test_links_self_form_dict = unexpanded_instant_test_links_self.from_dict(unexpanded_instant_test_links_self_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/test_results_api/docs/UnexpandedInstantTestLinksTestResults.md b/test_results_api/docs/UnexpandedInstantTestLinksTestResults.md deleted file mode 100644 index 5c006a0d..00000000 --- a/test_results_api/docs/UnexpandedInstantTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksTestResults - - -## 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 test_results_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksTestResults from a JSON string -unexpanded_instant_test_links_test_results_instance = UnexpandedInstantTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksTestResults.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_test_results_dict = unexpanded_instant_test_links_test_results_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksTestResults from a dict -unexpanded_instant_test_links_test_results_form_dict = unexpanded_instant_test_links_test_results.from_dict(unexpanded_instant_test_links_test_results_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/test_results_api/docs/UnexpandedTest.md b/test_results_api/docs/UnexpandedTest.md deleted file mode 100644 index 54b806dc..00000000 --- a/test_results_api/docs/UnexpandedTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] - -## Example - -```python -from test_results_api.models.unexpanded_test import UnexpandedTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedTest from a JSON string -unexpanded_test_instance = UnexpandedTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedTest.to_json() - -# convert the object into a dict -unexpanded_test_dict = unexpanded_test_instance.to_dict() -# create an instance of UnexpandedTest from a dict -unexpanded_test_form_dict = unexpanded_test.from_dict(unexpanded_test_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/test_results_api/git_push.sh b/test_results_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/test_results_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/test_results_api/pyproject.toml b/test_results_api/pyproject.toml deleted file mode 100644 index dac929c2..00000000 --- a/test_results_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "test_results_api" -version = "1.0.0" -description = "Test Results API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Test Results API"] -include = ["test_results_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/test_results_api/setup.py b/test_results_api/setup.py deleted file mode 100644 index a06dae85..00000000 --- a/test_results_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "test-results-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Test Results API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Test Results API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Get test result metrics for Cloud and Enterprise Agent tests. - """, # noqa: E501 - package_data={"test_results_api": ["py.typed"]}, -) diff --git a/test_results_api/test-requirements.txt b/test_results_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/test_results_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/test_results_api/test/test_agent.py b/test_results_api/test/test_agent.py deleted file mode 100644 index 57e6bb76..00000000 --- a/test_results_api/test/test_agent.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.agent import Agent - -class TestAgent(unittest.TestCase): - """Agent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Agent: - """Test Agent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Agent` - """ - model = Agent() - if include_optional: - return Agent( - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - country_id = 'US' - ) - else: - return Agent( - ) - """ - - def testAgent(self): - """Test Agent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_app_links.py b/test_results_api/test/test_app_links.py deleted file mode 100644 index 093b28b8..00000000 --- a/test_results_api/test/test_app_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.app_links import AppLinks - -class TestAppLinks(unittest.TestCase): - """AppLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AppLinks: - """Test AppLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AppLinks` - """ - model = AppLinks() - if include_optional: - return AppLinks( - links = test_results_api.models.app_links__links.AppLinks__links( - app_link = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return AppLinks( - ) - """ - - def testAppLinks(self): - """Test AppLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_app_links_links.py b/test_results_api/test/test_app_links_links.py deleted file mode 100644 index 26c22071..00000000 --- a/test_results_api/test/test_app_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.app_links_links import AppLinksLinks - -class TestAppLinksLinks(unittest.TestCase): - """AppLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AppLinksLinks: - """Test AppLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AppLinksLinks` - """ - model = AppLinksLinks() - if include_optional: - return AppLinksLinks( - app_link = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return AppLinksLinks( - ) - """ - - def testAppLinksLinks(self): - """Test AppLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_dns_server_test_metrics_api.py b/test_results_api/test/test_dns_server_test_metrics_api.py deleted file mode 100644 index e7a999d0..00000000 --- a/test_results_api/test/test_dns_server_test_metrics_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_dns_server(self) -> None: - """Test case for get_test_result_dns_server - - Get DNS server test results by server - """ - pass - - def test_get_test_result_dns_servers(self) -> None: - """Test case for get_test_result_dns_servers - - Get DNS server test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_dns_trace_test_metrics_api.py b/test_results_api/test/test_dns_trace_test_metrics_api.py deleted file mode 100644 index 0dfabcaf..00000000 --- a/test_results_api/test/test_dns_trace_test_metrics_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_dns_trace(self) -> None: - """Test case for get_test_result_dns_trace - - Get DNS trace test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_dnssec_test_metrics_api.py b/test_results_api/test/test_dnssec_test_metrics_api.py deleted file mode 100644 index 172930bd..00000000 --- a/test_results_api/test/test_dnssec_test_metrics_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_dnssec(self) -> None: - """Test case for get_test_result_dnssec - - Get DNSSEC test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_error.py b/test_results_api/test/test_error.py deleted file mode 100644 index 72b5a4d1..00000000 --- a/test_results_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_expand.py b/test_results_api/test/test_expand.py deleted file mode 100644 index cb82fbaf..00000000 --- a/test_results_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_dns_server200_response.py b/test_results_api/test/test_get_test_result_dns_server200_response.py deleted file mode 100644 index 8f47b8c4..00000000 --- a/test_results_api/test/test_get_test_result_dns_server200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response - -class TestGetTestResultDnsServer200Response(unittest.TestCase): - """GetTestResultDnsServer200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultDnsServer200Response: - """Test GetTestResultDnsServer200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultDnsServer200Response` - """ - model = GetTestResultDnsServer200Response() - if include_optional: - return GetTestResultDnsServer200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultDnsServer200Response( - ) - """ - - def testGetTestResultDnsServer200Response(self): - """Test GetTestResultDnsServer200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_dns_trace200_response.py b/test_results_api/test/test_get_test_result_dns_trace200_response.py deleted file mode 100644 index f8375f64..00000000 --- a/test_results_api/test/test_get_test_result_dns_trace200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response - -class TestGetTestResultDnsTrace200Response(unittest.TestCase): - """GetTestResultDnsTrace200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultDnsTrace200Response: - """Test GetTestResultDnsTrace200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultDnsTrace200Response` - """ - model = GetTestResultDnsTrace200Response() - if include_optional: - return GetTestResultDnsTrace200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultDnsTrace200Response( - ) - """ - - def testGetTestResultDnsTrace200Response(self): - """Test GetTestResultDnsTrace200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_dnssec200_response.py b/test_results_api/test/test_get_test_result_dnssec200_response.py deleted file mode 100644 index 7619378a..00000000 --- a/test_results_api/test/test_get_test_result_dnssec200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response - -class TestGetTestResultDnssec200Response(unittest.TestCase): - """GetTestResultDnssec200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultDnssec200Response: - """Test GetTestResultDnssec200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultDnssec200Response` - """ - model = GetTestResultDnssec200Response() - if include_optional: - return GetTestResultDnssec200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultDnssec200Response( - ) - """ - - def testGetTestResultDnssec200Response(self): - """Test GetTestResultDnssec200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_ftp_server200_response.py b/test_results_api/test/test_get_test_result_ftp_server200_response.py deleted file mode 100644 index 1f3c9a26..00000000 --- a/test_results_api/test/test_get_test_result_ftp_server200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response - -class TestGetTestResultFtpServer200Response(unittest.TestCase): - """GetTestResultFtpServer200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultFtpServer200Response: - """Test GetTestResultFtpServer200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultFtpServer200Response` - """ - model = GetTestResultFtpServer200Response() - if include_optional: - return GetTestResultFtpServer200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultFtpServer200Response( - ) - """ - - def testGetTestResultFtpServer200Response(self): - """Test GetTestResultFtpServer200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_http_server200_response.py b/test_results_api/test/test_get_test_result_http_server200_response.py deleted file mode 100644 index 53549a67..00000000 --- a/test_results_api/test/test_get_test_result_http_server200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response - -class TestGetTestResultHttpServer200Response(unittest.TestCase): - """GetTestResultHttpServer200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultHttpServer200Response: - """Test GetTestResultHttpServer200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultHttpServer200Response` - """ - model = GetTestResultHttpServer200Response() - if include_optional: - return GetTestResultHttpServer200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultHttpServer200Response( - ) - """ - - def testGetTestResultHttpServer200Response(self): - """Test GetTestResultHttpServer200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_metrics200_response.py b/test_results_api/test/test_get_test_result_metrics200_response.py deleted file mode 100644 index 25e2c514..00000000 --- a/test_results_api/test/test_get_test_result_metrics200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_metrics200_response import GetTestResultMetrics200Response - -class TestGetTestResultMetrics200Response(unittest.TestCase): - """GetTestResultMetrics200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultMetrics200Response: - """Test GetTestResultMetrics200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultMetrics200Response` - """ - model = GetTestResultMetrics200Response() - if include_optional: - return GetTestResultMetrics200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultMetrics200Response( - ) - """ - - def testGetTestResultMetrics200Response(self): - """Test GetTestResultMetrics200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_network_pathvis200_response.py b/test_results_api/test/test_get_test_result_network_pathvis200_response.py deleted file mode 100644 index c64628f9..00000000 --- a/test_results_api/test/test_get_test_result_network_pathvis200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response - -class TestGetTestResultNetworkPathvis200Response(unittest.TestCase): - """GetTestResultNetworkPathvis200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultNetworkPathvis200Response: - """Test GetTestResultNetworkPathvis200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultNetworkPathvis200Response` - """ - model = GetTestResultNetworkPathvis200Response() - if include_optional: - return GetTestResultNetworkPathvis200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultNetworkPathvis200Response( - ) - """ - - def testGetTestResultNetworkPathvis200Response(self): - """Test GetTestResultNetworkPathvis200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_page_load200_response.py b/test_results_api/test/test_get_test_result_page_load200_response.py deleted file mode 100644 index 3437c588..00000000 --- a/test_results_api/test/test_get_test_result_page_load200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response - -class TestGetTestResultPageLoad200Response(unittest.TestCase): - """GetTestResultPageLoad200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultPageLoad200Response: - """Test GetTestResultPageLoad200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultPageLoad200Response` - """ - model = GetTestResultPageLoad200Response() - if include_optional: - return GetTestResultPageLoad200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultPageLoad200Response( - ) - """ - - def testGetTestResultPageLoad200Response(self): - """Test GetTestResultPageLoad200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_page_load_component_detail200_response.py b/test_results_api/test/test_get_test_result_page_load_component_detail200_response.py deleted file mode 100644 index 5e75edd5..00000000 --- a/test_results_api/test/test_get_test_result_page_load_component_detail200_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response - -class TestGetTestResultPageLoadComponentDetail200Response(unittest.TestCase): - """GetTestResultPageLoadComponentDetail200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultPageLoadComponentDetail200Response: - """Test GetTestResultPageLoadComponentDetail200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultPageLoadComponentDetail200Response` - """ - model = GetTestResultPageLoadComponentDetail200Response() - if include_optional: - return GetTestResultPageLoadComponentDetail200Response( - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultPageLoadComponentDetail200Response( - ) - """ - - def testGetTestResultPageLoadComponentDetail200Response(self): - """Test GetTestResultPageLoadComponentDetail200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_rtp_stream200_response.py b/test_results_api/test/test_get_test_result_rtp_stream200_response.py deleted file mode 100644 index 42fd1915..00000000 --- a/test_results_api/test/test_get_test_result_rtp_stream200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response - -class TestGetTestResultRtpStream200Response(unittest.TestCase): - """GetTestResultRtpStream200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultRtpStream200Response: - """Test GetTestResultRtpStream200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultRtpStream200Response` - """ - model = GetTestResultRtpStream200Response() - if include_optional: - return GetTestResultRtpStream200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultRtpStream200Response( - ) - """ - - def testGetTestResultRtpStream200Response(self): - """Test GetTestResultRtpStream200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_sip_server200_response.py b/test_results_api/test/test_get_test_result_sip_server200_response.py deleted file mode 100644 index 41540d29..00000000 --- a/test_results_api/test/test_get_test_result_sip_server200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response - -class TestGetTestResultSipServer200Response(unittest.TestCase): - """GetTestResultSipServer200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultSipServer200Response: - """Test GetTestResultSipServer200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultSipServer200Response` - """ - model = GetTestResultSipServer200Response() - if include_optional: - return GetTestResultSipServer200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultSipServer200Response( - ) - """ - - def testGetTestResultSipServer200Response(self): - """Test GetTestResultSipServer200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_web_transactions200_response.py b/test_results_api/test/test_get_test_result_web_transactions200_response.py deleted file mode 100644 index 18699757..00000000 --- a/test_results_api/test/test_get_test_result_web_transactions200_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response - -class TestGetTestResultWebTransactions200Response(unittest.TestCase): - """GetTestResultWebTransactions200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultWebTransactions200Response: - """Test GetTestResultWebTransactions200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultWebTransactions200Response` - """ - model = GetTestResultWebTransactions200Response() - if include_optional: - return GetTestResultWebTransactions200Response( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z', - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultWebTransactions200Response( - ) - """ - - def testGetTestResultWebTransactions200Response(self): - """Test GetTestResultWebTransactions200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_web_transactions_component_detail200_response.py b/test_results_api/test/test_get_test_result_web_transactions_component_detail200_response.py deleted file mode 100644 index 9349cec6..00000000 --- a/test_results_api/test/test_get_test_result_web_transactions_component_detail200_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response - -class TestGetTestResultWebTransactionsComponentDetail200Response(unittest.TestCase): - """GetTestResultWebTransactionsComponentDetail200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultWebTransactionsComponentDetail200Response: - """Test GetTestResultWebTransactionsComponentDetail200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultWebTransactionsComponentDetail200Response` - """ - model = GetTestResultWebTransactionsComponentDetail200Response() - if include_optional: - return GetTestResultWebTransactionsComponentDetail200Response( - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultWebTransactionsComponentDetail200Response( - ) - """ - - def testGetTestResultWebTransactionsComponentDetail200Response(self): - """Test GetTestResultWebTransactionsComponentDetail200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_result_web_transactions_component_page_detail200_response.py b/test_results_api/test/test_get_test_result_web_transactions_component_page_detail200_response.py deleted file mode 100644 index 2cf29d57..00000000 --- a/test_results_api/test/test_get_test_result_web_transactions_component_page_detail200_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response - -class TestGetTestResultWebTransactionsComponentPageDetail200Response(unittest.TestCase): - """GetTestResultWebTransactionsComponentPageDetail200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultWebTransactionsComponentPageDetail200Response: - """Test GetTestResultWebTransactionsComponentPageDetail200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultWebTransactionsComponentPageDetail200Response` - """ - model = GetTestResultWebTransactionsComponentPageDetail200Response() - if include_optional: - return GetTestResultWebTransactionsComponentPageDetail200Response( - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultWebTransactionsComponentPageDetail200Response( - ) - """ - - def testGetTestResultWebTransactionsComponentPageDetail200Response(self): - """Test GetTestResultWebTransactionsComponentPageDetail200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_get_test_results_bgp200_response.py b/test_results_api/test/test_get_test_results_bgp200_response.py deleted file mode 100644 index affd1752..00000000 --- a/test_results_api/test/test_get_test_results_bgp200_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.get_test_results_bgp200_response import GetTestResultsBgp200Response - -class TestGetTestResultsBgp200Response(unittest.TestCase): - """GetTestResultsBgp200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTestResultsBgp200Response: - """Test GetTestResultsBgp200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTestResultsBgp200Response` - """ - model = GetTestResultsBgp200Response() - if include_optional: - return GetTestResultsBgp200Response( - results = [ - null - ], - test = None, - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetTestResultsBgp200Response( - ) - """ - - def testGetTestResultsBgp200Response(self): - """Test GetTestResultsBgp200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_http_test_result.py b/test_results_api/test/test_http_test_result.py deleted file mode 100644 index 06eb2a76..00000000 --- a/test_results_api/test/test_http_test_result.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.http_test_result import HttpTestResult - -class TestHttpTestResult(unittest.TestCase): - """HttpTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpTestResult: - """Test HttpTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpTestResult` - """ - model = HttpTestResult() - if include_optional: - return HttpTestResult( - var_date = '2022-07-17T22:00:54Z', - round_id = 1384309800, - links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - agent = test_results_api.models.agent.Agent( - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), - server_ip = '193.2.1.88', - response_code = 200, - num_redirects = 0, - redirect_time = 10, - dns_time = 0, - ssl_time = 9, - connect_time = 2, - wait_time = 3, - receive_time = 1, - wire_size = 9993, - response_time = 14, - throughput = 123, - total_time = 15, - headers = test_results_api.models.http_test_result_headers.HttpTestResultHeaders( - request_headers = 'GET / HTTP/1.1 -Host: www.thousandeyes.com -User-Agent: curl/7.58.0-DEV -Accept: */* -Accept-Encoding: deflate, gzip -X-ThousandEyes-Agent: yes -', - response_headers = 'HTTP/1.1 200 OK -Content-Type: text/html;charset=UTF-8 -Content-Length: 9993 -Connection: keep-alive -Date: Mon, 04 May 2020 16:13:00 GMT -Server: Apache -Content-Language: en-US -Content-Encoding: gzip -X-Frame-Options: sameorigin -Cache-Control: max-age=600, must-revalidate -Strict-Transport-Security: max-age=31536000 -X-Content-Type-Options: nosniff -X-XSS-Protection: 1; mode=block -Vary: Accept-Encoding -X-Cache: Hit from cloudfront -Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) -X-Amz-Cf-Pop: SFO5-C3 -X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== -Age: 132 -', ), - error_type = 'None', - error_details = 'Connection error', - ssl_cipher = '', - ssl_version = 'TLSv1.3', - ssl_certificates = [ - test_results_api.models.ssl_cert.SslCert( - days_until_expiry = 56, - is_fetch_date_in_valid_cert_date_range = 'true', - has_valid_signing_cert = 'false', - issuer_name = 'DigiCert SHA2 Extended Validation Server CA', - valid_before = '2020-05-12T12:00Z', - valid_after = '2018-03-27T00:00Z', - subject_alternative_names = ["www.thousandeyes.com","thousandeyes.com"], - subject_name = 'www.thousandeyes.com', ) - ] - ) - else: - return HttpTestResult( - ) - """ - - def testHttpTestResult(self): - """Test HttpTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_http_test_result_headers.py b/test_results_api/test/test_http_test_result_headers.py deleted file mode 100644 index 4fafe8da..00000000 --- a/test_results_api/test/test_http_test_result_headers.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders - -class TestHttpTestResultHeaders(unittest.TestCase): - """HttpTestResultHeaders unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpTestResultHeaders: - """Test HttpTestResultHeaders - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpTestResultHeaders` - """ - model = HttpTestResultHeaders() - if include_optional: - return HttpTestResultHeaders( - request_headers = 'GET / HTTP/1.1 -Host: www.thousandeyes.com -User-Agent: curl/7.58.0-DEV -Accept: */* -Accept-Encoding: deflate, gzip -X-ThousandEyes-Agent: yes -', - response_headers = 'HTTP/1.1 200 OK -Content-Type: text/html;charset=UTF-8 -Content-Length: 9993 -Connection: keep-alive -Date: Mon, 04 May 2020 16:13:00 GMT -Server: Apache -Content-Language: en-US -Content-Encoding: gzip -X-Frame-Options: sameorigin -Cache-Control: max-age=600, must-revalidate -Strict-Transport-Security: max-age=31536000 -X-Content-Type-Options: nosniff -X-XSS-Protection: 1; mode=block -Vary: Accept-Encoding -X-Cache: Hit from cloudfront -Via: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront) -X-Amz-Cf-Pop: SFO5-C3 -X-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA== -Age: 132 -' - ) - else: - return HttpTestResultHeaders( - ) - """ - - def testHttpTestResultHeaders(self): - """Test HttpTestResultHeaders""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_http_test_results.py b/test_results_api/test/test_http_test_results.py deleted file mode 100644 index d07b6ad5..00000000 --- a/test_results_api/test/test_http_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.http_test_results import HttpTestResults - -class TestHttpTestResults(unittest.TestCase): - """HttpTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpTestResults: - """Test HttpTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpTestResults` - """ - model = HttpTestResults() - if include_optional: - return HttpTestResults( - results = [ - null - ], - test = None - ) - else: - return HttpTestResults( - ) - """ - - def testHttpTestResults(self): - """Test HttpTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_link.py b/test_results_api/test/test_link.py deleted file mode 100644 index 4e0fb1b9..00000000 --- a/test_results_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_monitor.py b/test_results_api/test/test_monitor.py deleted file mode 100644 index 30fb97db..00000000 --- a/test_results_api/test/test_monitor.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.monitor import Monitor - -class TestMonitor(unittest.TestCase): - """Monitor unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Monitor: - """Test Monitor - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Monitor` - """ - model = Monitor() - if include_optional: - return Monitor( - monitor_id = '281474976710706', - monitor_name = 'Vancouver, Canada - Bell Canada (AS 6539)', - country_id = 'US' - ) - else: - return Monitor( - ) - """ - - def testMonitor(self): - """Test Monitor""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_network_bgp_test_metrics_api.py b/test_results_api/test/test_network_bgp_test_metrics_api.py deleted file mode 100644 index e1279a44..00000000 --- a/test_results_api/test/test_network_bgp_test_metrics_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_results_bgp(self) -> None: - """Test case for get_test_results_bgp - - Get BGP test results - """ - pass - - def test_get_test_results_bgp_prefix(self) -> None: - """Test case for get_test_results_bgp_prefix - - Get BGP route test results by prefix - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_network_test_metrics_api.py b/test_results_api/test/test_network_test_metrics_api.py deleted file mode 100644 index f22f4902..00000000 --- a/test_results_api/test/test_network_test_metrics_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_pathvis_agent_round(self) -> None: - """Test case for get_test_pathvis_agent_round - - Get pathvis test results by agent and round - """ - pass - - def test_get_test_result_metrics(self) -> None: - """Test case for get_test_result_metrics - - Get network test results - """ - pass - - def test_get_test_result_network_pathvis(self) -> None: - """Test case for get_test_result_network_pathvis - - Get pathvis network test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_network_test_result.py b/test_results_api/test/test_network_test_result.py deleted file mode 100644 index 27589468..00000000 --- a/test_results_api/test/test_network_test_result.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.network_test_result import NetworkTestResult - -class TestNetworkTestResult(unittest.TestCase): - """NetworkTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NetworkTestResult: - """Test NetworkTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NetworkTestResult` - """ - model = NetworkTestResult() - if include_optional: - return NetworkTestResult( - var_date = '2022-07-17T22:00:54Z', - round_id = 1384309800, - links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - start_time = 1384309800, - end_time = 1384309800, - available_bandwidth = 9.100464, - avg_latency = 167.04, - bandwidth = 4.3313155, - capacity = 210.10854, - jitter = 0.076808, - loss = 0.0, - max_latency = 168.0, - min_latency = 167.0, - agent = test_results_api.models.agent.Agent( - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), - server_ip = '50.18.127.223', - server = 'www.thousandeyes.com:80', - direction = 'to-target' - ) - else: - return NetworkTestResult( - ) - """ - - def testNetworkTestResult(self): - """Test NetworkTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_network_test_results.py b/test_results_api/test/test_network_test_results.py deleted file mode 100644 index 921b9cb3..00000000 --- a/test_results_api/test/test_network_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.network_test_results import NetworkTestResults - -class TestNetworkTestResults(unittest.TestCase): - """NetworkTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NetworkTestResults: - """Test NetworkTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NetworkTestResults` - """ - model = NetworkTestResults() - if include_optional: - return NetworkTestResults( - results = [ - null - ], - test = None - ) - else: - return NetworkTestResults( - ) - """ - - def testNetworkTestResults(self): - """Test NetworkTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_pagination_links.py b/test_results_api/test/test_pagination_links.py deleted file mode 100644 index 6546c96e..00000000 --- a/test_results_api/test/test_pagination_links.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.pagination_links import PaginationLinks - -class TestPaginationLinks(unittest.TestCase): - """PaginationLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinks: - """Test PaginationLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinks` - """ - model = PaginationLinks() - if include_optional: - return PaginationLinks( - links = test_results_api.models.pagination_links__links.PaginationLinks__links( - previous = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return PaginationLinks( - ) - """ - - def testPaginationLinks(self): - """Test PaginationLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_pagination_links_links.py b/test_results_api/test/test_pagination_links_links.py deleted file mode 100644 index ea4c6dae..00000000 --- a/test_results_api/test/test_pagination_links_links.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.pagination_links_links import PaginationLinksLinks - -class TestPaginationLinksLinks(unittest.TestCase): - """PaginationLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PaginationLinksLinks: - """Test PaginationLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PaginationLinksLinks` - """ - model = PaginationLinksLinks() - if include_optional: - return PaginationLinksLinks( - previous = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), - next = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return PaginationLinksLinks( - ) - """ - - def testPaginationLinksLinks(self): - """Test PaginationLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_base_test_result.py b/test_results_api/test/test_path_vis_base_test_result.py deleted file mode 100644 index 809fd978..00000000 --- a/test_results_api/test/test_path_vis_base_test_result.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult - -class TestPathVisBaseTestResult(unittest.TestCase): - """PathVisBaseTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisBaseTestResult: - """Test PathVisBaseTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisBaseTestResult` - """ - model = PathVisBaseTestResult() - if include_optional: - return PathVisBaseTestResult( - var_date = '2022-07-17T22:00:54Z', - round_id = 1384309800, - links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - start_time = 1384309800, - end_time = 1384309800, - agent = test_results_api.models.agent.Agent( - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), - server = 'www.google.com:443', - server_ip = '172.217.170.68', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - target_is_proxy = True, - direction = 'to-target' - ) - else: - return PathVisBaseTestResult( - ) - """ - - def testPathVisBaseTestResult(self): - """Test PathVisBaseTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_detail_test_result.py b/test_results_api/test/test_path_vis_detail_test_result.py deleted file mode 100644 index 13a162ae..00000000 --- a/test_results_api/test/test_path_vis_detail_test_result.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult - -class TestPathVisDetailTestResult(unittest.TestCase): - """PathVisDetailTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDetailTestResult: - """Test PathVisDetailTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDetailTestResult` - """ - model = PathVisDetailTestResult() - if include_optional: - return PathVisDetailTestResult( - var_date = '2022-07-17T22:00:54Z', - round_id = 1384309800, - links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - start_time = 1384309800, - end_time = 1384309800, - agent = test_results_api.models.agent.Agent( - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), - server = 'www.google.com:443', - server_ip = '172.217.170.68', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - target_is_proxy = True, - direction = 'to-target', - routes = [ - test_results_api.models.path_vis_route.PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - test_results_api.models.path_vis_hop.PathVisHop( - hop = 1, - ip_address = '196.40.106.237', - prefix = '196.40.96.0/20', - rdns = 'core-router1.cpt2.host-h.net', - network = 'HETZNER (Pty) Ltd (AS 37153)', - response_time = 1, - location = 'Cape Town, South Africa', - mpls = '', ) - ], ) - ] - ) - else: - return PathVisDetailTestResult( - ) - """ - - def testPathVisDetailTestResult(self): - """Test PathVisDetailTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_detail_test_results.py b/test_results_api/test/test_path_vis_detail_test_results.py deleted file mode 100644 index d72138b7..00000000 --- a/test_results_api/test/test_path_vis_detail_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults - -class TestPathVisDetailTestResults(unittest.TestCase): - """PathVisDetailTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisDetailTestResults: - """Test PathVisDetailTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisDetailTestResults` - """ - model = PathVisDetailTestResults() - if include_optional: - return PathVisDetailTestResults( - results = [ - null - ], - test = None - ) - else: - return PathVisDetailTestResults( - ) - """ - - def testPathVisDetailTestResults(self): - """Test PathVisDetailTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_endpoint.py b/test_results_api/test/test_path_vis_endpoint.py deleted file mode 100644 index 6edfec43..00000000 --- a/test_results_api/test/test_path_vis_endpoint.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_endpoint import PathVisEndpoint - -class TestPathVisEndpoint(unittest.TestCase): - """PathVisEndpoint unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisEndpoint: - """Test PathVisEndpoint - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisEndpoint` - """ - model = PathVisEndpoint() - if include_optional: - return PathVisEndpoint( - ip_address = '196.40.106.237', - mss = 1460, - number_of_hops = 15, - path_id = '1230899668701775614109128428722974545787322404682781961521', - path_mtu = 'Cape Town, South Africa', - response_time = 1500 - ) - else: - return PathVisEndpoint( - ) - """ - - def testPathVisEndpoint(self): - """Test PathVisEndpoint""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_hop.py b/test_results_api/test/test_path_vis_hop.py deleted file mode 100644 index 3913895a..00000000 --- a/test_results_api/test/test_path_vis_hop.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_hop import PathVisHop - -class TestPathVisHop(unittest.TestCase): - """PathVisHop unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisHop: - """Test PathVisHop - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisHop` - """ - model = PathVisHop() - if include_optional: - return PathVisHop( - hop = 1, - ip_address = '196.40.106.237', - prefix = '196.40.96.0/20', - rdns = 'core-router1.cpt2.host-h.net', - network = 'HETZNER (Pty) Ltd (AS 37153)', - response_time = 1, - location = 'Cape Town, South Africa', - mpls = '' - ) - else: - return PathVisHop( - ) - """ - - def testPathVisHop(self): - """Test PathVisHop""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_route.py b/test_results_api/test/test_path_vis_route.py deleted file mode 100644 index 2b8ec4a1..00000000 --- a/test_results_api/test/test_path_vis_route.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_route import PathVisRoute - -class TestPathVisRoute(unittest.TestCase): - """PathVisRoute unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisRoute: - """Test PathVisRoute - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisRoute` - """ - model = PathVisRoute() - if include_optional: - return PathVisRoute( - path_id = '4711301366345855606023718047703941305741293841502186803', - hops = [ - test_results_api.models.path_vis_hop.PathVisHop( - hop = 1, - ip_address = '196.40.106.237', - prefix = '196.40.96.0/20', - rdns = 'core-router1.cpt2.host-h.net', - network = 'HETZNER (Pty) Ltd (AS 37153)', - response_time = 1, - location = 'Cape Town, South Africa', - mpls = '', ) - ] - ) - else: - return PathVisRoute( - ) - """ - - def testPathVisRoute(self): - """Test PathVisRoute""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_test_result.py b/test_results_api/test/test_path_vis_test_result.py deleted file mode 100644 index 656cf6a9..00000000 --- a/test_results_api/test/test_path_vis_test_result.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_test_result import PathVisTestResult - -class TestPathVisTestResult(unittest.TestCase): - """PathVisTestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisTestResult: - """Test PathVisTestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisTestResult` - """ - model = PathVisTestResult() - if include_optional: - return PathVisTestResult( - var_date = '2022-07-17T22:00:54Z', - round_id = 1384309800, - links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - start_time = 1384309800, - end_time = 1384309800, - agent = test_results_api.models.agent.Agent( - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - country_id = 'US', ), - server = 'www.google.com:443', - server_ip = '172.217.170.68', - source_ip = '196.40.106.237', - source_prefix = '196.40.96.0/20', - target_is_proxy = True, - direction = 'to-target', - endpoints = [ - test_results_api.models.path_vis_endpoint.PathVisEndpoint( - ip_address = '196.40.106.237', - mss = 1460, - number_of_hops = 15, - path_id = '1230899668701775614109128428722974545787322404682781961521', - path_mtu = 'Cape Town, South Africa', - response_time = 1500, ) - ] - ) - else: - return PathVisTestResult( - ) - """ - - def testPathVisTestResult(self): - """Test PathVisTestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_path_vis_test_results.py b/test_results_api/test/test_path_vis_test_results.py deleted file mode 100644 index 3ebd6a9f..00000000 --- a/test_results_api/test/test_path_vis_test_results.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.path_vis_test_results import PathVisTestResults - -class TestPathVisTestResults(unittest.TestCase): - """PathVisTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PathVisTestResults: - """Test PathVisTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PathVisTestResults` - """ - model = PathVisTestResults() - if include_optional: - return PathVisTestResults( - results = [ - null - ], - test = None - ) - else: - return PathVisTestResults( - ) - """ - - def testPathVisTestResults(self): - """Test PathVisTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_query_window.py b/test_results_api/test/test_query_window.py deleted file mode 100644 index 6afc1859..00000000 --- a/test_results_api/test/test_query_window.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.query_window import QueryWindow - -class TestQueryWindow(unittest.TestCase): - """QueryWindow unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryWindow: - """Test QueryWindow - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryWindow` - """ - model = QueryWindow() - if include_optional: - return QueryWindow( - start_date = '2022-07-17T22:00:54Z', - end_date = '2022-07-18T22:00:54Z' - ) - else: - return QueryWindow( - ) - """ - - def testQueryWindow(self): - """Test QueryWindow""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_self_links.py b/test_results_api/test/test_self_links.py deleted file mode 100644 index 75a45609..00000000 --- a/test_results_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = test_results_api.models.self_links__links.SelfLinks__links( - self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_self_links_links.py b/test_results_api/test/test_self_links_links.py deleted file mode 100644 index 9d6ed3f3..00000000 --- a/test_results_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = test_results_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_simple_test.py b/test_results_api/test/test_simple_test.py deleted file mode 100644 index e1b94b2d..00000000 --- a/test_results_api/test/test_simple_test.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.simple_test import SimpleTest - -class TestSimpleTest(unittest.TestCase): - """SimpleTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SimpleTest: - """Test SimpleTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SimpleTest` - """ - model = SimpleTest() - if include_optional: - return SimpleTest( - interval = 120, - alerts_enabled = True, - enabled = True, - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = test_results_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return SimpleTest( - ) - """ - - def testSimpleTest(self): - """Test SimpleTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_test_direction.py b/test_results_api/test/test_test_direction.py deleted file mode 100644 index 2ea26fb6..00000000 --- a/test_results_api/test/test_test_direction.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_direction import TestDirection - -class TestTestDirection(unittest.TestCase): - """TestDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDirection(self): - """Test TestDirection""" - # inst = TestDirection() - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_test_interval.py b/test_results_api/test/test_test_interval.py deleted file mode 100644 index f4a7a07a..00000000 --- a/test_results_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_test_result.py b/test_results_api/test/test_test_result.py deleted file mode 100644 index 2f69632b..00000000 --- a/test_results_api/test/test_test_result.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_result import TestResult - -class TestTestResult(unittest.TestCase): - """TestResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestResult: - """Test TestResult - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestResult` - """ - model = TestResult() - if include_optional: - return TestResult( - links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}}, - var_date = '2022-07-17T22:00:54Z', - round_id = 1384309800 - ) - else: - return TestResult( - ) - """ - - def testTestResult(self): - """Test TestResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_test_type.py b/test_results_api/test/test_test_type.py deleted file mode 100644 index 438d7149..00000000 --- a/test_results_api/test/test_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.test_type import TestType - -class TestTestType(unittest.TestCase): - """TestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestType(self): - """Test TestType""" - # inst = TestType() - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_unauthorized_error.py b/test_results_api/test/test_unauthorized_error.py deleted file mode 100644 index 5f0ff289..00000000 --- a/test_results_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_unexpanded_instant_test.py b/test_results_api/test/test_unexpanded_instant_test.py deleted file mode 100644 index 9e992d53..00000000 --- a/test_results_api/test/test_unexpanded_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unexpanded_instant_test import UnexpandedInstantTest - -class TestUnexpandedInstantTest(unittest.TestCase): - """UnexpandedInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTest: - """Test UnexpandedInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTest` - """ - model = UnexpandedInstantTest() - if include_optional: - return UnexpandedInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = test_results_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return UnexpandedInstantTest( - ) - """ - - def testUnexpandedInstantTest(self): - """Test UnexpandedInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_unexpanded_instant_test_links.py b/test_results_api/test/test_unexpanded_instant_test_links.py deleted file mode 100644 index 645ac1d2..00000000 --- a/test_results_api/test/test_unexpanded_instant_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -class TestUnexpandedInstantTestLinks(unittest.TestCase): - """UnexpandedInstantTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: - """Test UnexpandedInstantTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinks` - """ - model = UnexpandedInstantTestLinks() - if include_optional: - return UnexpandedInstantTestLinks( - var_self = None, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}] - ) - else: - return UnexpandedInstantTestLinks( - ) - """ - - def testUnexpandedInstantTestLinks(self): - """Test UnexpandedInstantTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_unexpanded_instant_test_links_self.py b/test_results_api/test/test_unexpanded_instant_test_links_self.py deleted file mode 100644 index 27523088..00000000 --- a/test_results_api/test/test_unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): - """UnexpandedInstantTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: - """Test UnexpandedInstantTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` - """ - model = UnexpandedInstantTestLinksSelf() - if include_optional: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksSelf(self): - """Test UnexpandedInstantTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_unexpanded_instant_test_links_test_results.py b/test_results_api/test/test_unexpanded_instant_test_links_test_results.py deleted file mode 100644 index a955609d..00000000 --- a/test_results_api/test/test_unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -class TestUnexpandedInstantTestLinksTestResults(unittest.TestCase): - """UnexpandedInstantTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksTestResults: - """Test UnexpandedInstantTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksTestResults` - """ - model = UnexpandedInstantTestLinksTestResults() - if include_optional: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksTestResults(self): - """Test UnexpandedInstantTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_unexpanded_test.py b/test_results_api/test/test_unexpanded_test.py deleted file mode 100644 index 722e92f7..00000000 --- a/test_results_api/test/test_unexpanded_test.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_results_api.models.unexpanded_test import UnexpandedTest - -class TestUnexpandedTest(unittest.TestCase): - """UnexpandedTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedTest: - """Test UnexpandedTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedTest` - """ - model = UnexpandedTest() - if include_optional: - return UnexpandedTest( - interval = 120, - alerts_enabled = True, - enabled = True - ) - else: - return UnexpandedTest( - ) - """ - - def testUnexpandedTest(self): - """Test UnexpandedTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_voice_rtp_server_test_metrics_api.py b/test_results_api/test/test_voice_rtp_server_test_metrics_api.py deleted file mode 100644 index 1e647ec4..00000000 --- a/test_results_api/test/test_voice_rtp_server_test_metrics_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_rtp_stream(self) -> None: - """Test case for get_test_result_rtp_stream - - Retrieve RTP server test metrics - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_voice_sip_server_test_metrics_api.py b/test_results_api/test/test_voice_sip_server_test_metrics_api.py deleted file mode 100644 index ff19096b..00000000 --- a/test_results_api/test/test_voice_sip_server_test_metrics_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_sip_server(self) -> None: - """Test case for get_test_result_sip_server - - Get SIP server test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_web_ftp_server_test_metrics_api.py b/test_results_api/test/test_web_ftp_server_test_metrics_api.py deleted file mode 100644 index ccd9d075..00000000 --- a/test_results_api/test/test_web_ftp_server_test_metrics_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_ftp_server(self) -> None: - """Test case for get_test_result_ftp_server - - Get FTP server test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_web_http_server_test_metrics_api.py b/test_results_api/test/test_web_http_server_test_metrics_api.py deleted file mode 100644 index e4a57f51..00000000 --- a/test_results_api/test/test_web_http_server_test_metrics_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_http_server(self) -> None: - """Test case for get_test_result_http_server - - Get HTTP server test results - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_web_page_load_test_metrics_api.py b/test_results_api/test/test_web_page_load_test_metrics_api.py deleted file mode 100644 index 147af5a3..00000000 --- a/test_results_api/test/test_web_page_load_test_metrics_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_page_load(self) -> None: - """Test case for get_test_result_page_load - - Get page load server test results - """ - pass - - def test_get_test_result_page_load_component_detail(self) -> None: - """Test case for get_test_result_page_load_component_detail - - Get page load server test results by agent and round - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test/test_web_transactions_test_metrics_api.py b/test_results_api/test/test_web_transactions_test_metrics_api.py deleted file mode 100644 index 382d0876..00000000 --- a/test_results_api/test/test_web_transactions_test_metrics_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_results_api.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_result_web_transactions(self) -> None: - """Test case for get_test_result_web_transactions - - Get web transactions test results - """ - pass - - def test_get_test_result_web_transactions_component_detail(self) -> None: - """Test case for get_test_result_web_transactions_component_detail - - Get web transactions test results by agent and round - """ - pass - - def test_get_test_result_web_transactions_component_page_detail(self) -> None: - """Test case for get_test_result_web_transactions_component_page_detail - - Get detailed web transactions test result by agent, round, and page - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_results_api/test_results_api/__init__.py b/test_results_api/test_results_api/__init__.py deleted file mode 100644 index a7fc452e..00000000 --- a/test_results_api/test_results_api/__init__.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 test_results_api.api.dnssec_test_metrics_api import DNSSECTestMetricsApi -from test_results_api.api.dns_server_test_metrics_api import DNSServerTestMetricsApi -from test_results_api.api.dns_trace_test_metrics_api import DNSTraceTestMetricsApi -from test_results_api.api.network_bgp_test_metrics_api import NetworkBGPTestMetricsApi -from test_results_api.api.network_test_metrics_api import NetworkTestMetricsApi -from test_results_api.api.voice_rtp_server_test_metrics_api import VoiceRTPServerTestMetricsApi -from test_results_api.api.voice_sip_server_test_metrics_api import VoiceSIPServerTestMetricsApi -from test_results_api.api.web_ftp_server_test_metrics_api import WebFTPServerTestMetricsApi -from test_results_api.api.web_http_server_test_metrics_api import WebHTTPServerTestMetricsApi -from test_results_api.api.web_page_load_test_metrics_api import WebPageLoadTestMetricsApi -from test_results_api.api.web_transactions_test_metrics_api import WebTransactionsTestMetricsApi - -# import ApiClient -from test_results_api.api_response import ApiResponse -from test_results_api.api_client import ApiClient -from test_results_api.configuration import Configuration -from test_results_api.exceptions import OpenApiException -from test_results_api.exceptions import ApiTypeError -from test_results_api.exceptions import ApiValueError -from test_results_api.exceptions import ApiKeyError -from test_results_api.exceptions import ApiAttributeError -from test_results_api.exceptions import ApiException - -# import models into sdk package -from test_results_api.models.agent import Agent -from test_results_api.models.app_links import AppLinks -from test_results_api.models.app_links_links import AppLinksLinks -from test_results_api.models.bgp_basic_test_result import BgpBasicTestResult -from test_results_api.models.bgp_hop import BgpHop -from test_results_api.models.bgp_test_result import BgpTestResult -from test_results_api.models.bgp_test_results import BgpTestResults -from test_results_api.models.bgp_test_route_information_result import BgpTestRouteInformationResult -from test_results_api.models.bgp_test_route_information_results import BgpTestRouteInformationResults -from test_results_api.models.dns_server_test_result import DnsServerTestResult -from test_results_api.models.dns_server_test_results import DnsServerTestResults -from test_results_api.models.dns_trace_test_result import DnsTraceTestResult -from test_results_api.models.dns_trace_test_results import DnsTraceTestResults -from test_results_api.models.dnssec_test_result import DnssecTestResult -from test_results_api.models.dnssec_test_results import DnssecTestResults -from test_results_api.models.epoch_time_window import EpochTimeWindow -from test_results_api.models.error import Error -from test_results_api.models.expand import Expand -from test_results_api.models.ftp_server_test_result import FtpServerTestResult -from test_results_api.models.ftp_server_test_results import FtpServerTestResults -from test_results_api.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response -from test_results_api.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response -from test_results_api.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response -from test_results_api.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.models.get_test_result_metrics200_response import GetTestResultMetrics200Response -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response -from test_results_api.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response -from test_results_api.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response -from test_results_api.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response -from test_results_api.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response -from test_results_api.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response -from test_results_api.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response -from test_results_api.models.get_test_results_bgp200_response import GetTestResultsBgp200Response -from test_results_api.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders -from test_results_api.models.http_test_results import HttpTestResults -from test_results_api.models.link import Link -from test_results_api.models.marker import Marker -from test_results_api.models.monitor import Monitor -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.network_test_results import NetworkTestResults -from test_results_api.models.page import Page -from test_results_api.models.page_load_detail_test_result import PageLoadDetailTestResult -from test_results_api.models.page_load_detail_test_results import PageLoadDetailTestResults -from test_results_api.models.page_load_test_result import PageLoadTestResult -from test_results_api.models.page_load_test_results import PageLoadTestResults -from test_results_api.models.pagination_links import PaginationLinks -from test_results_api.models.pagination_links_links import PaginationLinksLinks -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.path_vis_hop import PathVisHop -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.path_vis_test_results import PathVisTestResults -from test_results_api.models.query_window import QueryWindow -from test_results_api.models.rtp_stream_test_result import RtpStreamTestResult -from test_results_api.models.rtp_stream_test_results import RtpStreamTestResults -from test_results_api.models.self_links import SelfLinks -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.sip_server_error_type import SipServerErrorType -from test_results_api.models.sip_server_test_result import SipServerTestResult -from test_results_api.models.sip_server_test_results import SipServerTestResults -from test_results_api.models.ssl_cert import SslCert -from test_results_api.models.test_direction import TestDirection -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_result import TestResult -from test_results_api.models.test_result_app_links import TestResultAppLinks -from test_results_api.models.test_type import TestType -from test_results_api.models.unauthorized_error import UnauthorizedError -from test_results_api.models.unexpanded_instant_test import UnexpandedInstantTest -from test_results_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from test_results_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from test_results_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from test_results_api.models.unexpanded_test import UnexpandedTest -from test_results_api.models.web_transaction_detail_test_result import WebTransactionDetailTestResult -from test_results_api.models.web_transaction_detail_test_results import WebTransactionDetailTestResults -from test_results_api.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult -from test_results_api.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults -from test_results_api.models.web_transaction_test_result import WebTransactionTestResult -from test_results_api.models.web_transaction_test_results import WebTransactionTestResults diff --git a/test_results_api/test_results_api/api/__init__.py b/test_results_api/test_results_api/api/__init__.py deleted file mode 100644 index e9ebea34..00000000 --- a/test_results_api/test_results_api/api/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# flake8: noqa - -# import apis into api package -from test_results_api.api.dnssec_test_metrics_api import DNSSECTestMetricsApi -from test_results_api.api.dns_server_test_metrics_api import DNSServerTestMetricsApi -from test_results_api.api.dns_trace_test_metrics_api import DNSTraceTestMetricsApi -from test_results_api.api.network_bgp_test_metrics_api import NetworkBGPTestMetricsApi -from test_results_api.api.network_test_metrics_api import NetworkTestMetricsApi -from test_results_api.api.voice_rtp_server_test_metrics_api import VoiceRTPServerTestMetricsApi -from test_results_api.api.voice_sip_server_test_metrics_api import VoiceSIPServerTestMetricsApi -from test_results_api.api.web_ftp_server_test_metrics_api import WebFTPServerTestMetricsApi -from test_results_api.api.web_http_server_test_metrics_api import WebHTTPServerTestMetricsApi -from test_results_api.api.web_page_load_test_metrics_api import WebPageLoadTestMetricsApi -from test_results_api.api.web_transactions_test_metrics_api import WebTransactionsTestMetricsApi - diff --git a/test_results_api/test_results_api/api_client.py b/test_results_api/test_results_api/api_client.py deleted file mode 100644 index b3cda489..00000000 --- a/test_results_api/test_results_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from test_results_api.configuration import Configuration -from test_results_api.api_response import ApiResponse -import test_results_api.models -from test_results_api import rest -from test_results_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(test_results_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/test_results_api/test_results_api/api_response.py b/test_results_api/test_results_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/test_results_api/test_results_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/test_results_api/test_results_api/configuration.py b/test_results_api/test_results_api/configuration.py deleted file mode 100644 index 4e8563ef..00000000 --- a/test_results_api/test_results_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("test_results_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/test_results_api/test_results_api/exceptions.py b/test_results_api/test_results_api/exceptions.py deleted file mode 100644 index f5bd5637..00000000 --- a/test_results_api/test_results_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/test_results_api/test_results_api/models/__init__.py b/test_results_api/test_results_api/models/__init__.py deleted file mode 100644 index f235dda1..00000000 --- a/test_results_api/test_results_api/models/__init__.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from test_results_api.models.agent import Agent -from test_results_api.models.app_links import AppLinks -from test_results_api.models.app_links_links import AppLinksLinks -from test_results_api.models.bgp_basic_test_result import BgpBasicTestResult -from test_results_api.models.bgp_hop import BgpHop -from test_results_api.models.bgp_test_result import BgpTestResult -from test_results_api.models.bgp_test_results import BgpTestResults -from test_results_api.models.bgp_test_route_information_result import BgpTestRouteInformationResult -from test_results_api.models.bgp_test_route_information_results import BgpTestRouteInformationResults -from test_results_api.models.dns_server_test_result import DnsServerTestResult -from test_results_api.models.dns_server_test_results import DnsServerTestResults -from test_results_api.models.dns_trace_test_result import DnsTraceTestResult -from test_results_api.models.dns_trace_test_results import DnsTraceTestResults -from test_results_api.models.dnssec_test_result import DnssecTestResult -from test_results_api.models.dnssec_test_results import DnssecTestResults -from test_results_api.models.epoch_time_window import EpochTimeWindow -from test_results_api.models.error import Error -from test_results_api.models.expand import Expand -from test_results_api.models.ftp_server_test_result import FtpServerTestResult -from test_results_api.models.ftp_server_test_results import FtpServerTestResults -from test_results_api.models.get_test_pathvis_agent_round200_response import GetTestPathvisAgentRound200Response -from test_results_api.models.get_test_result_dns_server200_response import GetTestResultDnsServer200Response -from test_results_api.models.get_test_result_dns_trace200_response import GetTestResultDnsTrace200Response -from test_results_api.models.get_test_result_dnssec200_response import GetTestResultDnssec200Response -from test_results_api.models.get_test_result_ftp_server200_response import GetTestResultFtpServer200Response -from test_results_api.models.get_test_result_http_server200_response import GetTestResultHttpServer200Response -from test_results_api.models.get_test_result_metrics200_response import GetTestResultMetrics200Response -from test_results_api.models.get_test_result_network_pathvis200_response import GetTestResultNetworkPathvis200Response -from test_results_api.models.get_test_result_page_load200_response import GetTestResultPageLoad200Response -from test_results_api.models.get_test_result_page_load_component_detail200_response import GetTestResultPageLoadComponentDetail200Response -from test_results_api.models.get_test_result_rtp_stream200_response import GetTestResultRtpStream200Response -from test_results_api.models.get_test_result_sip_server200_response import GetTestResultSipServer200Response -from test_results_api.models.get_test_result_web_transactions200_response import GetTestResultWebTransactions200Response -from test_results_api.models.get_test_result_web_transactions_component_detail200_response import GetTestResultWebTransactionsComponentDetail200Response -from test_results_api.models.get_test_result_web_transactions_component_page_detail200_response import GetTestResultWebTransactionsComponentPageDetail200Response -from test_results_api.models.get_test_results_bgp200_response import GetTestResultsBgp200Response -from test_results_api.models.get_test_results_bgp_prefix200_response import GetTestResultsBgpPrefix200Response -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders -from test_results_api.models.http_test_results import HttpTestResults -from test_results_api.models.link import Link -from test_results_api.models.marker import Marker -from test_results_api.models.monitor import Monitor -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.network_test_results import NetworkTestResults -from test_results_api.models.page import Page -from test_results_api.models.page_load_detail_test_result import PageLoadDetailTestResult -from test_results_api.models.page_load_detail_test_results import PageLoadDetailTestResults -from test_results_api.models.page_load_test_result import PageLoadTestResult -from test_results_api.models.page_load_test_results import PageLoadTestResults -from test_results_api.models.pagination_links import PaginationLinks -from test_results_api.models.pagination_links_links import PaginationLinksLinks -from test_results_api.models.path_vis_base_test_result import PathVisBaseTestResult -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.path_vis_detail_test_results import PathVisDetailTestResults -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.path_vis_hop import PathVisHop -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.path_vis_test_results import PathVisTestResults -from test_results_api.models.query_window import QueryWindow -from test_results_api.models.rtp_stream_test_result import RtpStreamTestResult -from test_results_api.models.rtp_stream_test_results import RtpStreamTestResults -from test_results_api.models.self_links import SelfLinks -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.sip_server_error_type import SipServerErrorType -from test_results_api.models.sip_server_test_result import SipServerTestResult -from test_results_api.models.sip_server_test_results import SipServerTestResults -from test_results_api.models.ssl_cert import SslCert -from test_results_api.models.test_direction import TestDirection -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_result import TestResult -from test_results_api.models.test_result_app_links import TestResultAppLinks -from test_results_api.models.test_type import TestType -from test_results_api.models.unauthorized_error import UnauthorizedError -from test_results_api.models.unexpanded_instant_test import UnexpandedInstantTest -from test_results_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from test_results_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from test_results_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from test_results_api.models.unexpanded_test import UnexpandedTest -from test_results_api.models.web_transaction_detail_test_result import WebTransactionDetailTestResult -from test_results_api.models.web_transaction_detail_test_results import WebTransactionDetailTestResults -from test_results_api.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult -from test_results_api.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults -from test_results_api.models.web_transaction_test_result import WebTransactionTestResult -from test_results_api.models.web_transaction_test_results import WebTransactionTestResults diff --git a/test_results_api/test_results_api/models/agent.py b/test_results_api/test_results_api/models/agent.py deleted file mode 100644 index e6347e77..00000000 --- a/test_results_api/test_results_api/models/agent.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Agent(BaseModel): - """ - Agent - """ # noqa: E501 - agent_id: Optional[StrictStr] = Field(default=None, description="Unique agent ID", alias="agentId") - agent_name: Optional[StrictStr] = Field(default=None, description="Agent name", alias="agentName") - country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId") - __properties: ClassVar[List[str]] = ["agentId", "agentName", "countryId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "agent_id", - "agent_name", - "country_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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({ - "agentId": obj.get("agentId"), - "agentName": obj.get("agentName"), - "countryId": obj.get("countryId") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/app_links.py b/test_results_api/test_results_api/models/app_links.py deleted file mode 100644 index 75080366..00000000 --- a/test_results_api/test_results_api/models/app_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.app_links_links import AppLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AppLinks(BaseModel): - """ - AppLinks - """ # noqa: E501 - links: Optional[AppLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of AppLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": AppLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/app_links_links.py b/test_results_api/test_results_api/models/app_links_links.py deleted file mode 100644 index 3e90f86b..00000000 --- a/test_results_api/test_results_api/models/app_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AppLinksLinks(BaseModel): - """ - A links object containing the ThousandEyes App link - """ # noqa: E501 - app_link: Optional[Link] = Field(default=None, alias="appLink") - __properties: ClassVar[List[str]] = ["appLink"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app_link - if self.app_link: - _dict['appLink'] = self.app_link.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AppLinksLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appLink": Link.from_dict(obj.get("appLink")) if obj.get("appLink") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/bgp_test_result.py b/test_results_api/test_results_api/models/bgp_test_result.py deleted file mode 100644 index b178a9ea..00000000 --- a/test_results_api/test_results_api/models/bgp_test_result.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.monitor import Monitor -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BgpTestResult(BaseModel): - """ - BgpTestResult - """ # noqa: E501 - 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[Union[str, Any]] = Field(default=None, alias="_links") - monitor: Optional[Monitor] = None - prefix_id: Optional[StrictStr] = Field(default=None, description="Internally tracked prefix ID.", alias="prefixId") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix being tracked.") - updates: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of updates tracked against this prefix by this monitor.") - path_changes: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Number of path changes tracked against this prefix by this monitor.", alias="pathChanges") - reachability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage reachability") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "monitor", "prefixId", "prefix", "updates", "pathChanges", "reachability"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BgpTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of monitor - if self.monitor: - _dict['monitor'] = self.monitor.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of BgpTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "monitor": Monitor.from_dict(obj.get("monitor")) if obj.get("monitor") is not None else None, - "prefixId": obj.get("prefixId"), - "prefix": obj.get("prefix"), - "updates": obj.get("updates"), - "pathChanges": obj.get("pathChanges"), - "reachability": obj.get("reachability") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/error.py b/test_results_api/test_results_api/models/error.py deleted file mode 100644 index 85b596d4..00000000 --- a/test_results_api/test_results_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/test_results_api/test_results_api/models/expand.py b/test_results_api/test_results_api/models/expand.py deleted file mode 100644 index b16cb010..00000000 --- a/test_results_api/test_results_api/models/expand.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - HEADER = 'header' - CERTIFICATE = 'certificate' - - @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/test_results_api/test_results_api/models/get_test_pathvis_agent_round200_response.py b/test_results_api/test_results_api/models/get_test_pathvis_agent_round200_response.py deleted file mode 100644 index e25dedf1..00000000 --- a/test_results_api/test_results_api/models/get_test_pathvis_agent_round200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestPathvisAgentRound200Response(BaseModel): - """ - GetTestPathvisAgentRound200Response - """ # noqa: E501 - results: Optional[List[PathVisDetailTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestPathvisAgentRound200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestPathvisAgentRound200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_result_http_server200_response.py b/test_results_api/test_results_api/models/get_test_result_http_server200_response.py deleted file mode 100644 index 14654421..00000000 --- a/test_results_api/test_results_api/models/get_test_result_http_server200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultHttpServer200Response(BaseModel): - """ - GetTestResultHttpServer200Response - """ # noqa: E501 - 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") - results: Optional[List[HttpTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultHttpServer200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultHttpServer200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "results": [HttpTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py b/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py deleted file mode 100644 index 3441fdd9..00000000 --- a/test_results_api/test_results_api/models/get_test_result_network_pathvis200_response.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultNetworkPathvis200Response(BaseModel): - """ - GetTestResultNetworkPathvis200Response - """ # noqa: E501 - 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") - results: Optional[List[PathVisTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["startDate", "endDate", "results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultNetworkPathvis200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultNetworkPathvis200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate"), - "results": [PathVisTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_result_page_load_component_detail200_response.py b/test_results_api/test_results_api/models/get_test_result_page_load_component_detail200_response.py deleted file mode 100644 index e0a3c737..00000000 --- a/test_results_api/test_results_api/models/get_test_result_page_load_component_detail200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.page_load_detail_test_result import PageLoadDetailTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultPageLoadComponentDetail200Response(BaseModel): - """ - GetTestResultPageLoadComponentDetail200Response - """ # noqa: E501 - results: Optional[List[PageLoadDetailTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultPageLoadComponentDetail200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultPageLoadComponentDetail200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PageLoadDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_result_web_transactions_component_detail200_response.py b/test_results_api/test_results_api/models/get_test_result_web_transactions_component_detail200_response.py deleted file mode 100644 index bb77661a..00000000 --- a/test_results_api/test_results_api/models/get_test_result_web_transactions_component_detail200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.web_transaction_detail_test_result import WebTransactionDetailTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultWebTransactionsComponentDetail200Response(BaseModel): - """ - GetTestResultWebTransactionsComponentDetail200Response - """ # noqa: E501 - results: Optional[List[WebTransactionDetailTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultWebTransactionsComponentDetail200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultWebTransactionsComponentDetail200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [WebTransactionDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_result_web_transactions_component_page_detail200_response.py b/test_results_api/test_results_api/models/get_test_result_web_transactions_component_page_detail200_response.py deleted file mode 100644 index 9758f7ff..00000000 --- a/test_results_api/test_results_api/models/get_test_result_web_transactions_component_page_detail200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -from test_results_api.models.web_transaction_page_detail_test_result import WebTransactionPageDetailTestResult -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultWebTransactionsComponentPageDetail200Response(BaseModel): - """ - GetTestResultWebTransactionsComponentPageDetail200Response - """ # noqa: E501 - results: Optional[List[WebTransactionPageDetailTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultWebTransactionsComponentPageDetail200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultWebTransactionsComponentPageDetail200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [WebTransactionPageDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_results_bgp200_response.py b/test_results_api/test_results_api/models/get_test_results_bgp200_response.py deleted file mode 100644 index b05b2b92..00000000 --- a/test_results_api/test_results_api/models/get_test_results_bgp200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.bgp_test_result import BgpTestResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultsBgp200Response(BaseModel): - """ - GetTestResultsBgp200Response - """ # noqa: E501 - results: Optional[List[BgpTestResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultsBgp200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultsBgp200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [BgpTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/get_test_results_bgp_prefix200_response.py b/test_results_api/test_results_api/models/get_test_results_bgp_prefix200_response.py deleted file mode 100644 index d82c5f44..00000000 --- a/test_results_api/test_results_api/models/get_test_results_bgp_prefix200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.bgp_test_route_information_result import BgpTestRouteInformationResult -from test_results_api.models.self_links_links import SelfLinksLinks -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTestResultsBgpPrefix200Response(BaseModel): - """ - GetTestResultsBgpPrefix200Response - """ # noqa: E501 - results: Optional[List[BgpTestRouteInformationResult]] = None - test: Optional[SimpleTest] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["results", "test", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTestResultsBgpPrefix200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetTestResultsBgpPrefix200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [BgpTestRouteInformationResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/http_test_result.py b/test_results_api/test_results_api/models/http_test_result.py deleted file mode 100644 index 6b92d741..00000000 --- a/test_results_api/test_results_api/models/http_test_result.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.http_test_result_headers import HttpTestResultHeaders -from test_results_api.models.ssl_cert import SslCert -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpTestResult(BaseModel): - """ - HttpTestResult - """ # noqa: E501 - 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[Union[str, Any]] = Field(default=None, alias="_links") - agent: Optional[Agent] = None - server_ip: Optional[StrictStr] = Field(default=None, description="IP address of destination server", alias="serverIp") - response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code", alias="responseCode") - num_redirects: Optional[StrictInt] = Field(default=None, description="Number of redirects", alias="numRedirects") - redirect_time: Optional[StrictInt] = Field(default=None, description="Cumulative redirect timing in milliseconds", alias="redirectTime") - dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds", alias="dnsTime") - ssl_time: Optional[StrictInt] = Field(default=None, description="Time to negotiate SSL/TLS in milliseconds", alias="sslTime") - connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server", alias="connectTime") - wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response in milliseconds", alias="waitTime") - receive_time: Optional[StrictInt] = Field(default=None, description="Elapsed time between first and last byte of response in milliseconds", alias="receiveTime") - wire_size: Optional[StrictInt] = Field(default=None, description="Size of content in bytes", alias="wireSize") - response_time: Optional[StrictInt] = Field(default=None, description="Time to first byte in milliseconds", alias="responseTime") - throughput: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="WireSize divided by receiveTime in byter per second") - total_time: Optional[StrictInt] = Field(default=None, description="response time + receive time", alias="totalTime") - headers: Optional[HttpTestResultHeaders] = None - 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") - ssl_cipher: Optional[StrictStr] = Field(default=None, description="Cipher suite", alias="sslCipher") - ssl_version: Optional[StrictStr] = Field(default=None, description="TLS version", alias="sslVersion") - ssl_certificates: Optional[List[SslCert]] = Field(default=None, alias="sslCertificates") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "serverIp", "responseCode", "numRedirects", "redirectTime", "dnsTime", "sslTime", "connectTime", "waitTime", "receiveTime", "wireSize", "responseTime", "throughput", "totalTime", "headers", "errorType", "errorDetails", "sslCipher", "sslVersion", "sslCertificates"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "server_ip", - "error_type", - "error_details", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - # override the default output from pydantic by calling `to_dict()` of headers - if self.headers: - _dict['headers'] = self.headers.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in ssl_certificates (list) - _items = [] - if self.ssl_certificates: - for _item in self.ssl_certificates: - if _item: - _items.append(_item.to_dict()) - _dict['sslCertificates'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "serverIp": obj.get("serverIp"), - "responseCode": obj.get("responseCode"), - "numRedirects": obj.get("numRedirects"), - "redirectTime": obj.get("redirectTime"), - "dnsTime": obj.get("dnsTime"), - "sslTime": obj.get("sslTime"), - "connectTime": obj.get("connectTime"), - "waitTime": obj.get("waitTime"), - "receiveTime": obj.get("receiveTime"), - "wireSize": obj.get("wireSize"), - "responseTime": obj.get("responseTime"), - "throughput": obj.get("throughput"), - "totalTime": obj.get("totalTime"), - "headers": HttpTestResultHeaders.from_dict(obj.get("headers")) if obj.get("headers") is not None else None, - "errorType": obj.get("errorType"), - "errorDetails": obj.get("errorDetails"), - "sslCipher": obj.get("sslCipher"), - "sslVersion": obj.get("sslVersion"), - "sslCertificates": [SslCert.from_dict(_item) for _item in obj.get("sslCertificates")] if obj.get("sslCertificates") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/http_test_result_headers.py b/test_results_api/test_results_api/models/http_test_result_headers.py deleted file mode 100644 index ce178a7c..00000000 --- a/test_results_api/test_results_api/models/http_test_result_headers.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpTestResultHeaders(BaseModel): - """ - Expandable object containing both request and response headers - """ # noqa: E501 - request_headers: Optional[StrictStr] = Field(default=None, description="Crlf-delimited list of request headers in header: value format", alias="requestHeaders") - response_headers: Optional[StrictStr] = Field(default=None, description="crlf-delimited list of response headers in header: value format", alias="responseHeaders") - __properties: ClassVar[List[str]] = ["requestHeaders", "responseHeaders"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpTestResultHeaders 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpTestResultHeaders from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "requestHeaders": obj.get("requestHeaders"), - "responseHeaders": obj.get("responseHeaders") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/http_test_results.py b/test_results_api/test_results_api/models/http_test_results.py deleted file mode 100644 index 144efc1a..00000000 --- a/test_results_api/test_results_api/models/http_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.http_test_result import HttpTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpTestResults(BaseModel): - """ - HttpTestResults - """ # noqa: E501 - results: Optional[List[HttpTestResult]] = None - test: Optional[SimpleTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [HttpTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/link.py b/test_results_api/test_results_api/models/link.py deleted file mode 100644 index e356d428..00000000 --- a/test_results_api/test_results_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/test_results_api/test_results_api/models/monitor.py b/test_results_api/test_results_api/models/monitor.py deleted file mode 100644 index 7e975106..00000000 --- a/test_results_api/test_results_api/models/monitor.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Monitor(BaseModel): - """ - Monitor - """ # noqa: E501 - monitor_id: Optional[StrictStr] = Field(default=None, description="Unique monitor ID.", alias="monitorId") - monitor_name: Optional[StrictStr] = Field(default=None, description="The name of the Monitor.", alias="monitorName") - country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code.", alias="countryId") - __properties: ClassVar[List[str]] = ["monitorId", "monitorName", "countryId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - * OpenAPI `readOnly` fields are excluded. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "monitor_id", - "monitor_name", - "country_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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({ - "monitorId": obj.get("monitorId"), - "monitorName": obj.get("monitorName"), - "countryId": obj.get("countryId") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/network_test_result.py b/test_results_api/test_results_api/models/network_test_result.py deleted file mode 100644 index 7988b056..00000000 --- a/test_results_api/test_results_api/models/network_test_result.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NetworkTestResult(BaseModel): - """ - NetworkTestResult - """ # noqa: E501 - var_date: Optional[datetime] = Field(default=None, description="Data point date in 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[Union[str, Any]] = 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") - available_bandwidth: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="availableBandwidth") - avg_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Average RTT for packets sent to destination", alias="avgLatency") - bandwidth: Optional[Union[StrictFloat, StrictInt]] = None - capacity: Optional[Union[StrictFloat, StrictInt]] = None - jitter: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Standard deviation of latency") - loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets not reaching destination") - 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") - agent: Optional[Agent] = None - server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") - server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") - direction: Optional[TestDirection] = None - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "availableBandwidth", "avgLatency", "bandwidth", "capacity", "jitter", "loss", "maxLatency", "minLatency", "agent", "serverIp", "server", "direction"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NetworkTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "available_bandwidth", - "avg_latency", - "bandwidth", - "capacity", - "jitter", - "loss", - "max_latency", - "min_latency", - "server_ip", - "server", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NetworkTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "startTime": obj.get("startTime"), - "endTime": obj.get("endTime"), - "availableBandwidth": obj.get("availableBandwidth"), - "avgLatency": obj.get("avgLatency"), - "bandwidth": obj.get("bandwidth"), - "capacity": obj.get("capacity"), - "jitter": obj.get("jitter"), - "loss": obj.get("loss"), - "maxLatency": obj.get("maxLatency"), - "minLatency": obj.get("minLatency"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "serverIp": obj.get("serverIp"), - "server": obj.get("server"), - "direction": obj.get("direction") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/network_test_results.py b/test_results_api/test_results_api/models/network_test_results.py deleted file mode 100644 index 7827ec72..00000000 --- a/test_results_api/test_results_api/models/network_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.network_test_result import NetworkTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NetworkTestResults(BaseModel): - """ - NetworkTestResults - """ # noqa: E501 - results: Optional[List[NetworkTestResult]] = None - test: Optional[SimpleTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NetworkTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NetworkTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [NetworkTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/pagination_links.py b/test_results_api/test_results_api/models/pagination_links.py deleted file mode 100644 index 81f9bc86..00000000 --- a/test_results_api/test_results_api/models/pagination_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.pagination_links_links import PaginationLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinks(BaseModel): - """ - A links object containing pagination related link(s). - """ # noqa: E501 - links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": PaginationLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/pagination_links_links.py b/test_results_api/test_results_api/models/pagination_links_links.py deleted file mode 100644 index c111b3a9..00000000 --- a/test_results_api/test_results_api/models/pagination_links_links.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaginationLinksLinks(BaseModel): - """ - PaginationLinksLinks - """ # noqa: E501 - previous: Optional[Link] = None - next: Optional[Link] = None - __properties: ClassVar[List[str]] = ["previous", "next"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaginationLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaginationLinksLinks 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.get("previous")) if obj.get("previous") is not None else None, - "next": Link.from_dict(obj.get("next")) if obj.get("next") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_base_test_result.py b/test_results_api/test_results_api/models/path_vis_base_test_result.py deleted file mode 100644 index 710baba6..00000000 --- a/test_results_api/test_results_api/models/path_vis_base_test_result.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisBaseTestResult(BaseModel): - """ - PathVisBaseTestResult - """ # noqa: E501 - 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[Union[str, Any]] = 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 - server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") - server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") - source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source agent", alias="sourceIp") - source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source agent", alias="sourcePrefix") - target_is_proxy: Optional[StrictBool] = Field(default=None, alias="targetIsProxy") - direction: Optional[TestDirection] = None - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "server", "serverIp", "sourceIp", "sourcePrefix", "targetIsProxy", "direction"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisBaseTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "server", - "server_ip", - "source_ip", - "source_prefix", - "target_is_proxy", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisBaseTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "startTime": obj.get("startTime"), - "endTime": obj.get("endTime"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "server": obj.get("server"), - "serverIp": obj.get("serverIp"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "targetIsProxy": obj.get("targetIsProxy"), - "direction": obj.get("direction") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_detail_test_result.py b/test_results_api/test_results_api/models/path_vis_detail_test_result.py deleted file mode 100644 index 27dae879..00000000 --- a/test_results_api/test_results_api/models/path_vis_detail_test_result.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.path_vis_route import PathVisRoute -from test_results_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDetailTestResult(BaseModel): - """ - PathVisDetailTestResult - """ # noqa: E501 - 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[Union[str, Any]] = 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 - server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") - server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") - source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source agent", alias="sourceIp") - source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source agent", alias="sourcePrefix") - target_is_proxy: Optional[StrictBool] = Field(default=None, alias="targetIsProxy") - direction: Optional[TestDirection] = None - routes: Optional[List[PathVisRoute]] = Field(default=None, description="Shows 3 iterations of path trace, with each iteration specified by a pathId") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "server", "serverIp", "sourceIp", "sourcePrefix", "targetIsProxy", "direction", "routes"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDetailTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "server", - "server_ip", - "source_ip", - "source_prefix", - "target_is_proxy", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in routes (list) - _items = [] - if self.routes: - for _item in self.routes: - if _item: - _items.append(_item.to_dict()) - _dict['routes'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDetailTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "startTime": obj.get("startTime"), - "endTime": obj.get("endTime"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "server": obj.get("server"), - "serverIp": obj.get("serverIp"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "targetIsProxy": obj.get("targetIsProxy"), - "direction": obj.get("direction"), - "routes": [PathVisRoute.from_dict(_item) for _item in obj.get("routes")] if obj.get("routes") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_detail_test_results.py b/test_results_api/test_results_api/models/path_vis_detail_test_results.py deleted file mode 100644 index 8d96b22c..00000000 --- a/test_results_api/test_results_api/models/path_vis_detail_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.path_vis_detail_test_result import PathVisDetailTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisDetailTestResults(BaseModel): - """ - PathVisDetailTestResults - """ # noqa: E501 - results: Optional[List[PathVisDetailTestResult]] = None - test: Optional[SimpleTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisDetailTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisDetailTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisDetailTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_endpoint.py b/test_results_api/test_results_api/models/path_vis_endpoint.py deleted file mode 100644 index 834ce904..00000000 --- a/test_results_api/test_results_api/models/path_vis_endpoint.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisEndpoint(BaseModel): - """ - PathVisEndpoint - """ # noqa: E501 - ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop", alias="ipAddress") - mss: Optional[StrictInt] = Field(default=None, description="Maximum segment size in bytes") - number_of_hops: Optional[StrictInt] = Field(default=None, description="Number of hops for path trace to destination", alias="numberOfHops") - path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace", alias="pathId") - path_mtu: Optional[StrictStr] = Field(default=None, description="Location information for the hop", alias="pathMtu") - response_time: Optional[StrictInt] = Field(default=None, description="RTT of the path trace to the destination in milliseconds", alias="responseTime") - __properties: ClassVar[List[str]] = ["ipAddress", "mss", "numberOfHops", "pathId", "pathMtu", "responseTime"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisEndpoint 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_address", - "mss", - "number_of_hops", - "path_id", - "path_mtu", - "response_time", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisEndpoint from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ipAddress": obj.get("ipAddress"), - "mss": obj.get("mss"), - "numberOfHops": obj.get("numberOfHops"), - "pathId": obj.get("pathId"), - "pathMtu": obj.get("pathMtu"), - "responseTime": obj.get("responseTime") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_hop.py b/test_results_api/test_results_api/models/path_vis_hop.py deleted file mode 100644 index c3ff44ee..00000000 --- a/test_results_api/test_results_api/models/path_vis_hop.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisHop(BaseModel): - """ - PathVisHop - """ # noqa: E501 - hop: Optional[StrictInt] = Field(default=None, description="Hop index") - ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the hop", alias="ipAddress") - prefix: Optional[StrictStr] = Field(default=None, description="Prefix of IP address shown in CIDR") - rdns: Optional[StrictStr] = Field(default=None, description="Reverse DNS entry of IP, if available") - network: Optional[StrictStr] = Field(default=None, description="Autonomous System originating the prefix") - response_time: Optional[StrictInt] = Field(default=None, description="RTT to the hop’s IP in milliseconds", alias="responseTime") - location: Optional[StrictStr] = Field(default=None, description="Location information for the hop") - mpls: Optional[StrictStr] = Field(default=None, description="Multiprotocol Label Switching information, if available") - __properties: ClassVar[List[str]] = ["hop", "ipAddress", "prefix", "rdns", "network", "responseTime", "location", "mpls"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisHop 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "hop", - "ip_address", - "prefix", - "rdns", - "network", - "response_time", - "location", - "mpls", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisHop from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "hop": obj.get("hop"), - "ipAddress": obj.get("ipAddress"), - "prefix": obj.get("prefix"), - "rdns": obj.get("rdns"), - "network": obj.get("network"), - "responseTime": obj.get("responseTime"), - "location": obj.get("location"), - "mpls": obj.get("mpls") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_route.py b/test_results_api/test_results_api/models/path_vis_route.py deleted file mode 100644 index d31594fd..00000000 --- a/test_results_api/test_results_api/models/path_vis_route.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_results_api.models.path_vis_hop import PathVisHop -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisRoute(BaseModel): - """ - PathVisRoute - """ # noqa: E501 - path_id: Optional[StrictStr] = Field(default=None, description="Unique ID of path trace", alias="pathId") - hops: Optional[List[PathVisHop]] = Field(default=None, description="Array of hop objects indicating each step in the traceroute") - __properties: ClassVar[List[str]] = ["pathId", "hops"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisRoute 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "path_id", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in hops (list) - _items = [] - if self.hops: - for _item in self.hops: - if _item: - _items.append(_item.to_dict()) - _dict['hops'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisRoute from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pathId": obj.get("pathId"), - "hops": [PathVisHop.from_dict(_item) for _item in obj.get("hops")] if obj.get("hops") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_test_result.py b/test_results_api/test_results_api/models/path_vis_test_result.py deleted file mode 100644 index c7cce9fe..00000000 --- a/test_results_api/test_results_api/models/path_vis_test_result.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.path_vis_endpoint import PathVisEndpoint -from test_results_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisTestResult(BaseModel): - """ - PathVisTestResult - """ # noqa: E501 - 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[Union[str, Any]] = 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 - server: Optional[StrictStr] = Field(default=None, description="Target server, including port (if method used is TCP)") - server_ip: Optional[StrictStr] = Field(default=None, description="IP of target server", alias="serverIp") - source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source agent", alias="sourceIp") - source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source agent", alias="sourcePrefix") - target_is_proxy: Optional[StrictBool] = Field(default=None, alias="targetIsProxy") - direction: Optional[TestDirection] = None - endpoints: Optional[List[PathVisEndpoint]] = Field(default=None, description="Shows all iterations of path trace, with each iteration specified by a pathId") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "server", "serverIp", "sourceIp", "sourcePrefix", "targetIsProxy", "direction", "endpoints"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "start_time", - "end_time", - "server", - "server_ip", - "source_ip", - "source_prefix", - "target_is_proxy", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in endpoints (list) - _items = [] - if self.endpoints: - for _item in self.endpoints: - if _item: - _items.append(_item.to_dict()) - _dict['endpoints'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "startTime": obj.get("startTime"), - "endTime": obj.get("endTime"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "server": obj.get("server"), - "serverIp": obj.get("serverIp"), - "sourceIp": obj.get("sourceIp"), - "sourcePrefix": obj.get("sourcePrefix"), - "targetIsProxy": obj.get("targetIsProxy"), - "direction": obj.get("direction"), - "endpoints": [PathVisEndpoint.from_dict(_item) for _item in obj.get("endpoints")] if obj.get("endpoints") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/path_vis_test_results.py b/test_results_api/test_results_api/models/path_vis_test_results.py deleted file mode 100644 index f764bbfb..00000000 --- a/test_results_api/test_results_api/models/path_vis_test_results.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from test_results_api.models.path_vis_test_result import PathVisTestResult -from test_results_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PathVisTestResults(BaseModel): - """ - PathVisTestResults - """ # noqa: E501 - results: Optional[List[PathVisTestResult]] = None - test: Optional[SimpleTest] = None - __properties: ClassVar[List[str]] = ["results", "test"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PathVisTestResults 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in results (list) - _items = [] - if self.results: - for _item in self.results: - if _item: - _items.append(_item.to_dict()) - _dict['results'] = _items - # override the default output from pydantic by calling `to_dict()` of test - if self.test: - _dict['test'] = self.test.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PathVisTestResults from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "results": [PathVisTestResult.from_dict(_item) for _item in obj.get("results")] if obj.get("results") is not None else None, - "test": SimpleTest.from_dict(obj.get("test")) if obj.get("test") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/query_window.py b/test_results_api/test_results_api/models/query_window.py deleted file mode 100644 index c68faf04..00000000 --- a/test_results_api/test_results_api/models/query_window.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QueryWindow(BaseModel): - """ - QueryWindow - """ # noqa: E501 - 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") - __properties: ClassVar[List[str]] = ["startDate", "endDate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QueryWindow 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "start_date", - "end_date", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QueryWindow from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "startDate": obj.get("startDate"), - "endDate": obj.get("endDate") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/rtp_stream_test_result.py b/test_results_api/test_results_api/models/rtp_stream_test_result.py deleted file mode 100644 index 1f525ec4..00000000 --- a/test_results_api/test_results_api/models/rtp_stream_test_result.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RtpStreamTestResult(BaseModel): - """ - RtpStreamTestResult - """ # noqa: E501 - 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[Union[str, Any]] = Field(default=None, alias="_links") - agent: Optional[Agent] = None - server_ip: Optional[StrictStr] = Field(default=None, description="Target agent IP address", alias="serverIp") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP value received by the server from the agent") - dscp_name: Optional[StrictStr] = Field(default=None, description="Name of DSCP value received by the server from the agent", alias="dscpName") - mos: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Mean opinion score for agent’s stream") - codec_name: Optional[StrictStr] = Field(default=None, description="Name of codec used by agen", alias="codecName") - codec_max_mos: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum value of Mean Opinion Score based on codec selection", alias="codecMaxMos") - loss: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage value of packets sent from agent not received by server") - discards: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of packets discarded") - latency: Optional[StrictInt] = Field(default=None, description="Time to send packets from source to server in milliseconds") - pdv: Optional[StrictInt] = Field(default=None, description="Variation in packet delay in milliseconds") - error_detail: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered", alias="errorDetail") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "serverIp", "dscp", "dscpName", "mos", "codecName", "codecMaxMos", "loss", "discards", "latency", "pdv", "errorDetail"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RtpStreamTestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "server_ip", - "dscp", - "dscp_name", - "mos", - "codec_name", - "codec_max_mos", - "loss", - "discards", - "latency", - "pdv", - "error_detail", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RtpStreamTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "serverIp": obj.get("serverIp"), - "dscp": obj.get("dscp"), - "dscpName": obj.get("dscpName"), - "mos": obj.get("mos"), - "codecName": obj.get("codecName"), - "codecMaxMos": obj.get("codecMaxMos"), - "loss": obj.get("loss"), - "discards": obj.get("discards"), - "latency": obj.get("latency"), - "pdv": obj.get("pdv"), - "errorDetail": obj.get("errorDetail") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/self_links.py b/test_results_api/test_results_api/models/self_links.py deleted file mode 100644 index 4b02e080..00000000 --- a/test_results_api/test_results_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/self_links_links.py b/test_results_api/test_results_api/models/self_links_links.py deleted file mode 100644 index 545ba627..00000000 --- a/test_results_api/test_results_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/simple_test.py b/test_results_api/test_results_api/models/simple_test.py deleted file mode 100644 index c31e9e54..00000000 --- a/test_results_api/test_results_api/models/simple_test.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from test_results_api.models.test_interval import TestInterval -from test_results_api.models.test_type import TestType -from test_results_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SimpleTest(BaseModel): - """ - Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SimpleTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of SimpleTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/sip_server_test_result.py b/test_results_api/test_results_api/models/sip_server_test_result.py deleted file mode 100644 index 2a5ac099..00000000 --- a/test_results_api/test_results_api/models/sip_server_test_result.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -from test_results_api.models.agent import Agent -from test_results_api.models.sip_server_error_type import SipServerErrorType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SipServerTestResult(BaseModel): - """ - SipServerTestResult - """ # noqa: E501 - 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[Union[str, Any]] = Field(default=None, alias="_links") - server_ip: Optional[StrictStr] = Field(default=None, description="Target agent IP address", alias="serverIp") - agent: Optional[Agent] = None - availability: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="availability of the service") - connect_time: Optional[StrictInt] = Field(default=None, description="Time required to establish a TCP connection to the server in milliseconds, only available when TCP is configured as protocol", alias="connectTime") - dns_time: Optional[StrictInt] = Field(default=None, description="Time required to resolve DNS in milliseconds", alias="dnsTime") - invite_time: Optional[StrictInt] = Field(default=None, description="Time to complete INVITE in milliseconds", alias="inviteTime") - options_time: Optional[StrictInt] = Field(default=None, description="Time to complete OPTIONS in milliseconds", alias="optionsTime") - num_redirects: Optional[StrictInt] = Field(default=None, description="Number of redirects", alias="numRedirects") - options_request: Optional[StrictStr] = Field(default=None, description="Entire OPTIONS request", alias="optionsRequest") - options_response: Optional[StrictStr] = Field(default=None, description="Entire OPTIONS response", alias="optionsResponse") - register_time: Optional[StrictInt] = Field(default=None, description="Time to complete REGISTER in milliseconds", alias="registerTime") - response_code: Optional[StrictInt] = Field(default=None, description="SIP server response code", alias="responseCode") - response_time: Optional[StrictInt] = Field(default=None, description="Time to first byte", alias="responseTime") - total_time: Optional[StrictInt] = Field(default=None, description="Total time", alias="totalTime") - wait_time: Optional[StrictInt] = Field(default=None, description="Time elapsed between completion of request and first byte of response", alias="waitTime") - error_type: Optional[SipServerErrorType] = Field(default=None, alias="errorType") - problem_detail: Optional[StrictStr] = Field(default=None, description="Error details, if an error was encountered", alias="problemDetail") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "serverIp", "agent", "availability", "connectTime", "dnsTime", "inviteTime", "optionsTime", "numRedirects", "optionsRequest", "optionsResponse", "registerTime", "responseCode", "responseTime", "totalTime", "waitTime", "errorType", "problemDetail"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipServerTestResult 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. - * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - "server_ip", - "availability", - "connect_time", - "dns_time", - "invite_time", - "options_time", - "num_redirects", - "options_request", - "options_response", - "register_time", - "response_code", - "response_time", - "total_time", - "wait_time", - "problem_detail", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent - if self.agent: - _dict['agent'] = self.agent.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of SipServerTestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "date": obj.get("date"), - "roundId": obj.get("roundId"), - "_links": obj.get("_links"), - "serverIp": obj.get("serverIp"), - "agent": Agent.from_dict(obj.get("agent")) if obj.get("agent") is not None else None, - "availability": obj.get("availability"), - "connectTime": obj.get("connectTime"), - "dnsTime": obj.get("dnsTime"), - "inviteTime": obj.get("inviteTime"), - "optionsTime": obj.get("optionsTime"), - "numRedirects": obj.get("numRedirects"), - "optionsRequest": obj.get("optionsRequest"), - "optionsResponse": obj.get("optionsResponse"), - "registerTime": obj.get("registerTime"), - "responseCode": obj.get("responseCode"), - "responseTime": obj.get("responseTime"), - "totalTime": obj.get("totalTime"), - "waitTime": obj.get("waitTime"), - "errorType": obj.get("errorType"), - "problemDetail": obj.get("problemDetail") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/test_direction.py b/test_results_api/test_results_api/models/test_direction.py deleted file mode 100644 index 1945b73e..00000000 --- a/test_results_api/test_results_api/models/test_direction.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDirection(str, Enum): - """ - Direction of the test, which affects how results are shown. - """ - - """ - allowed enum values - """ - TO_MINUS_TARGET = 'to-target' - FROM_MINUS_TARGET = 'from-target' - BIDIRECTIONAL = 'bidirectional' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDirection from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/test_results_api/test_results_api/models/test_interval.py b/test_results_api/test_results_api/models/test_interval.py deleted file mode 100644 index eb3b527a..00000000 --- a/test_results_api/test_results_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/test_results_api/test_results_api/models/test_result.py b/test_results_api/test_results_api/models/test_result.py deleted file mode 100644 index 2422f92e..00000000 --- a/test_results_api/test_results_api/models/test_result.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestResult(BaseModel): - """ - TestResult - """ # noqa: E501 - links: Optional[Union[str, Any]] = Field(default=None, alias="_links") - 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") - __properties: ClassVar[List[str]] = ["_links", "date", "roundId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestResult 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "var_date", - "round_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "_links": obj.get("_links"), - "date": obj.get("date"), - "roundId": obj.get("roundId") - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/test_type.py b/test_results_api/test_results_api/models/test_type.py deleted file mode 100644 index d5387473..00000000 --- a/test_results_api/test_results_api/models/test_type.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestType(str, Enum): - """ - This is a read only value, as test type is implicit in the test creation url. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - BGP = 'bgp' - HTTP_MINUS_SERVER = 'http-server' - PAGE_MINUS_LOAD = 'page-load' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - FTP_MINUS_SERVER = 'ftp-server' - DNS_MINUS_TRACE = 'dns-trace' - DNS_MINUS_SERVER = 'dns-server' - DNSSEC = 'dnssec' - SIP_MINUS_SERVER = 'sip-server' - VOICE = 'voice' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/test_results_api/test_results_api/models/unauthorized_error.py b/test_results_api/test_results_api/models/unauthorized_error.py deleted file mode 100644 index 9bcb49b0..00000000 --- a/test_results_api/test_results_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/test_results_api/test_results_api/models/unexpanded_instant_test.py b/test_results_api/test_results_api/models/unexpanded_instant_test.py deleted file mode 100644 index 5cc41002..00000000 --- a/test_results_api/test_results_api/models/unexpanded_instant_test.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from test_results_api.models.test_type import TestType -from test_results_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTest(BaseModel): - """ - UnexpandedInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UnexpandedInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/unexpanded_instant_test_links.py b/test_results_api/test_results_api/models/unexpanded_instant_test_links.py deleted file mode 100644 index 4a24e5cd..00000000 --- a/test_results_api/test_results_api/models/unexpanded_instant_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_results_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from test_results_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information - """ # noqa: E501 - var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[UnexpandedInstantTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": UnexpandedInstantTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": UnexpandedInstantTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/test_results_api/test_results_api/models/unexpanded_instant_test_links_self.py b/test_results_api/test_results_api/models/unexpanded_instant_test_links_self.py deleted file mode 100644 index 6db102dd..00000000 --- a/test_results_api/test_results_api/models/unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinksSelf(BaseModel): - """ - UnexpandedInstantTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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/test_results_api/test_results_api/models/unexpanded_instant_test_links_test_results.py b/test_results_api/test_results_api/models/unexpanded_instant_test_links_test_results.py deleted file mode 100644 index 15ce5d8e..00000000 --- a/test_results_api/test_results_api/models/unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from test_results_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -UNEXPANDEDINSTANTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class UnexpandedInstantTestLinksTestResults(BaseModel): - """ - UnexpandedInstantTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = UnexpandedInstantTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/test_results_api/test_results_api/models/unexpanded_test.py b/test_results_api/test_results_api/models/unexpanded_test.py deleted file mode 100644 index 9ae6a898..00000000 --- a/test_results_api/test_results_api/models/unexpanded_test.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from test_results_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedTest(BaseModel): - """ - UnexpandedTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True - }) - return _obj - - diff --git a/test_results_api/test_results_api/rest.py b/test_results_api/test_results_api/rest.py deleted file mode 100644 index 21646dd3..00000000 --- a/test_results_api/test_results_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Test Results API - - Get test result metrics for Cloud and Enterprise Agent tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from test_results_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/test_results_api/tox.ini b/test_results_api/tox.ini deleted file mode 100644 index a8148126..00000000 --- a/test_results_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=test_results_api diff --git a/test_templates_api/.github/workflows/python.yml b/test_templates_api/.github/workflows/python.yml deleted file mode 100644 index abf80d0f..00000000 --- a/test_templates_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: test_templates_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/test_templates_api/.gitlab-ci.yml b/test_templates_api/.gitlab-ci.yml deleted file mode 100644 index 009f493e..00000000 --- a/test_templates_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=test_templates_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/test_templates_api/.openapi-generator/FILES b/test_templates_api/.openapi-generator/FILES deleted file mode 100644 index 1408a5c0..00000000 --- a/test_templates_api/.openapi-generator/FILES +++ /dev/null @@ -1,77 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/ApiError.md -docs/BadRequestError.md -docs/DeployTestTemplate.md -docs/DeployTestTemplateTests.md -docs/DeployTestTemplateUserInputValues.md -docs/DeploymentStrategy.md -docs/Link.md -docs/NotFoundError.md -docs/TestTemplate.md -docs/TestTemplateCollection.md -docs/TestTemplateCollectionLinks.md -docs/TestTemplateCollectionLinksSelf.md -docs/TestTemplateEndpointsApi.md -docs/TestTemplateUpsert.md -docs/UnauthorizedError.md -docs/UserInput.md -docs/UserInputDefaultValue.md -docs/UserInputType.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_api_error.py -test/test_bad_request_error.py -test/test_deploy_test_template.py -test/test_deploy_test_template_tests.py -test/test_deploy_test_template_user_input_values.py -test/test_deployment_strategy.py -test/test_link.py -test/test_not_found_error.py -test/test_test_template.py -test/test_test_template_collection.py -test/test_test_template_collection_links.py -test/test_test_template_collection_links_self.py -test/test_test_template_endpoints_api.py -test/test_test_template_upsert.py -test/test_unauthorized_error.py -test/test_user_input.py -test/test_user_input_default_value.py -test/test_user_input_type.py -test_templates_api/__init__.py -test_templates_api/api/__init__.py -test_templates_api/api/test_template_endpoints_api.py -test_templates_api/api_client.py -test_templates_api/api_response.py -test_templates_api/configuration.py -test_templates_api/exceptions.py -test_templates_api/models/__init__.py -test_templates_api/models/api_error.py -test_templates_api/models/bad_request_error.py -test_templates_api/models/deploy_test_template.py -test_templates_api/models/deploy_test_template_tests.py -test_templates_api/models/deploy_test_template_user_input_values.py -test_templates_api/models/deployment_strategy.py -test_templates_api/models/link.py -test_templates_api/models/not_found_error.py -test_templates_api/models/test_template.py -test_templates_api/models/test_template_collection.py -test_templates_api/models/test_template_collection_links.py -test_templates_api/models/test_template_collection_links_self.py -test_templates_api/models/test_template_upsert.py -test_templates_api/models/unauthorized_error.py -test_templates_api/models/user_input.py -test_templates_api/models/user_input_default_value.py -test_templates_api/models/user_input_type.py -test_templates_api/py.typed -test_templates_api/rest.py -tox.ini diff --git a/test_templates_api/.openapi-generator/VERSION b/test_templates_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/test_templates_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/test_templates_api/.travis.yml b/test_templates_api/.travis.yml deleted file mode 100644 index 4133fed3..00000000 --- a/test_templates_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=test_templates_api diff --git a/test_templates_api/README.md b/test_templates_api/README.md deleted file mode 100644 index f430bcff..00000000 --- a/test_templates_api/README.md +++ /dev/null @@ -1,167 +0,0 @@ -# test-templates-api - -## Overview - -Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. - - -The following applies to test templates: - -* You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. - -* Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. - -* Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. - -* Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). - -* The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. - -* To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: - - 1. Labels - 2. Tests - 3. Alert rules - 4. Dashboards - - For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.1 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import test_templates_api -``` - -### 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 test_templates_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import test_templates_api -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - test_template_upsert = test_templates_api.TestTemplateUpsert() # TestTemplateUpsert | The test template to create or update. - aid = '2067' # 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 a test template. - api_response = api_instance.create_test_template(test_template_upsert, aid=aid) - print("The response of TestTemplateEndpointsApi->create_test_template:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling TestTemplateEndpointsApi->create_test_template: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*TestTemplateEndpointsApi* | [**create_test_template**](docs/TestTemplateEndpointsApi.md#create_test_template) | **POST** /v7/tests/templates | Create a test template. -*TestTemplateEndpointsApi* | [**delete_test_template**](docs/TestTemplateEndpointsApi.md#delete_test_template) | **DELETE** /v7/tests/templates/{id} | Delete a test template -*TestTemplateEndpointsApi* | [**deploy_user_template**](docs/TestTemplateEndpointsApi.md#deploy_user_template) | **POST** /v7/tests/templates/{id}/deploy | Deploy a test template. -*TestTemplateEndpointsApi* | [**get_user_org_test_template**](docs/TestTemplateEndpointsApi.md#get_user_org_test_template) | **GET** /v7/tests/templates/{id} | Retrieve a test template -*TestTemplateEndpointsApi* | [**get_user_org_test_templates**](docs/TestTemplateEndpointsApi.md#get_user_org_test_templates) | **GET** /v7/tests/templates | List all test templates. -*TestTemplateEndpointsApi* | [**update_test_template**](docs/TestTemplateEndpointsApi.md#update_test_template) | **PUT** /v7/tests/templates/{id} | Update a test template - - -## Documentation For Models - - - [ApiError](docs/ApiError.md) - - [BadRequestError](docs/BadRequestError.md) - - [DeployTestTemplate](docs/DeployTestTemplate.md) - - [DeployTestTemplateTests](docs/DeployTestTemplateTests.md) - - [DeployTestTemplateUserInputValues](docs/DeployTestTemplateUserInputValues.md) - - [DeploymentStrategy](docs/DeploymentStrategy.md) - - [Link](docs/Link.md) - - [NotFoundError](docs/NotFoundError.md) - - [TestTemplate](docs/TestTemplate.md) - - [TestTemplateCollection](docs/TestTemplateCollection.md) - - [TestTemplateCollectionLinks](docs/TestTemplateCollectionLinks.md) - - [TestTemplateCollectionLinksSelf](docs/TestTemplateCollectionLinksSelf.md) - - [TestTemplateUpsert](docs/TestTemplateUpsert.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UserInput](docs/UserInput.md) - - [UserInputDefaultValue](docs/UserInputDefaultValue.md) - - [UserInputType](docs/UserInputType.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/test_templates_api/docs/ApiError.md b/test_templates_api/docs/ApiError.md deleted file mode 100644 index ce16f06d..00000000 --- a/test_templates_api/docs/ApiError.md +++ /dev/null @@ -1,29 +0,0 @@ -# ApiError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] -**errors** | **List[str]** | | [optional] - -## Example - -```python -from test_templates_api.models.api_error import ApiError - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiError from a JSON string -api_error_instance = ApiError.from_json(json) -# print the JSON string representation of the object -print ApiError.to_json() - -# convert the object into a dict -api_error_dict = api_error_instance.to_dict() -# create an instance of ApiError from a dict -api_error_form_dict = api_error.from_dict(api_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/test_templates_api/docs/BadRequestError.md b/test_templates_api/docs/BadRequestError.md deleted file mode 100644 index 7d5f2ca7..00000000 --- a/test_templates_api/docs/BadRequestError.md +++ /dev/null @@ -1,31 +0,0 @@ -# BadRequestError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**timestamp** | **int** | | [optional] -**status** | **int** | | [optional] -**error** | **str** | | [optional] -**path** | **str** | | [optional] - -## Example - -```python -from test_templates_api.models.bad_request_error import BadRequestError - -# TODO update the JSON string below -json = "{}" -# create an instance of BadRequestError from a JSON string -bad_request_error_instance = BadRequestError.from_json(json) -# print the JSON string representation of the object -print BadRequestError.to_json() - -# convert the object into a dict -bad_request_error_dict = bad_request_error_instance.to_dict() -# create an instance of BadRequestError from a dict -bad_request_error_form_dict = bad_request_error.from_dict(bad_request_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/test_templates_api/docs/DeployTestTemplate.md b/test_templates_api/docs/DeployTestTemplate.md deleted file mode 100644 index 958d8e6f..00000000 --- a/test_templates_api/docs/DeployTestTemplate.md +++ /dev/null @@ -1,30 +0,0 @@ -# DeployTestTemplate - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_input_values** | [**DeployTestTemplateUserInputValues**](DeployTestTemplateUserInputValues.md) | | [optional] -**name** | **str** | | [optional] -**tests** | [**DeployTestTemplateTests**](DeployTestTemplateTests.md) | | [optional] - -## Example - -```python -from test_templates_api.models.deploy_test_template import DeployTestTemplate - -# TODO update the JSON string below -json = "{}" -# create an instance of DeployTestTemplate from a JSON string -deploy_test_template_instance = DeployTestTemplate.from_json(json) -# print the JSON string representation of the object -print DeployTestTemplate.to_json() - -# convert the object into a dict -deploy_test_template_dict = deploy_test_template_instance.to_dict() -# create an instance of DeployTestTemplate from a dict -deploy_test_template_form_dict = deploy_test_template.from_dict(deploy_test_template_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/test_templates_api/docs/DeployTestTemplateTests.md b/test_templates_api/docs/DeployTestTemplateTests.md deleted file mode 100644 index 402ce7fc..00000000 --- a/test_templates_api/docs/DeployTestTemplateTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# DeployTestTemplateTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | **int** | | [optional] - -## Example - -```python -from test_templates_api.models.deploy_test_template_tests import DeployTestTemplateTests - -# TODO update the JSON string below -json = "{}" -# create an instance of DeployTestTemplateTests from a JSON string -deploy_test_template_tests_instance = DeployTestTemplateTests.from_json(json) -# print the JSON string representation of the object -print DeployTestTemplateTests.to_json() - -# convert the object into a dict -deploy_test_template_tests_dict = deploy_test_template_tests_instance.to_dict() -# create an instance of DeployTestTemplateTests from a dict -deploy_test_template_tests_form_dict = deploy_test_template_tests.from_dict(deploy_test_template_tests_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/test_templates_api/docs/DeployTestTemplateUserInputValues.md b/test_templates_api/docs/DeployTestTemplateUserInputValues.md deleted file mode 100644 index d5547b2c..00000000 --- a/test_templates_api/docs/DeployTestTemplateUserInputValues.md +++ /dev/null @@ -1,31 +0,0 @@ -# DeployTestTemplateUserInputValues - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | **int** | | [optional] -**target** | **str** | | [optional] -**agents** | **str** | | [optional] -**domain** | **str** | | [optional] - -## Example - -```python -from test_templates_api.models.deploy_test_template_user_input_values import DeployTestTemplateUserInputValues - -# TODO update the JSON string below -json = "{}" -# create an instance of DeployTestTemplateUserInputValues from a JSON string -deploy_test_template_user_input_values_instance = DeployTestTemplateUserInputValues.from_json(json) -# print the JSON string representation of the object -print DeployTestTemplateUserInputValues.to_json() - -# convert the object into a dict -deploy_test_template_user_input_values_dict = deploy_test_template_user_input_values_instance.to_dict() -# create an instance of DeployTestTemplateUserInputValues from a dict -deploy_test_template_user_input_values_form_dict = deploy_test_template_user_input_values.from_dict(deploy_test_template_user_input_values_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/test_templates_api/docs/DeploymentStrategy.md b/test_templates_api/docs/DeploymentStrategy.md deleted file mode 100644 index 19079c36..00000000 --- a/test_templates_api/docs/DeploymentStrategy.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeploymentStrategy - -The `deploymentStrategy` field defines how the system behaves when an asset (test, label, dashboard) defined in the template already exists. For tests, the system uses the test type and name to determine if a test already exists. For example, if a template contains an http-server test named `Test123` and an http-server test with the same name already exists, the system assumes that this test already exists. If the test had a different type (for example, page-load), then the system would not consider the test to already exist because the types are different. For Labels and Dashboards, the system uses only the name. (Note that current Test Templates only consider \"test\" Labels). Alert Rules do not currently support `deploymentStrategy`. Below are the possible deployment strategies and their behaviors: * `Create Always` - The system will always attempt to create the asset. If an asset of the same name and type already exists, the system will generate an error. This behavior ensures that each asset created from a template is unique. This is the default behavior. * `Update on Change` - If an asset of the same type and name already exists, the existing asset is used instead of creating a new asset. If the configuration of the asset in the template is different from the existing one, the latest configuration is applied. * `Ignore on Change` - If an asset of the same type and name already exists, the existing asset is used instead of creating a new asset. If the configuration of the asset in the template is different from the existing one, the configuration of the existing asset is used and the configuration in the template is ignored. The `Update on Change` and `Ignore on Change` strategies essentially allow assets to be shared across templates. For example, the built-in \"Custom Web Page\", \"Custom Web Server\", and \"Custom Device\" templates all contain a Dashboard asset called \"Health Overview\". It's `deploymentStrategy` is set to `Ignore on Change`, which means that the first deployment of a template such as the \"Custom Web Page\" template creates the \"Health Overview\" dashboard. Subsequent deployments of the \"Custom Web Page\" template do not attempt to recreate the \"Health Overview\" dashboard. Instead, the existing dashboard is reused. Note: Assets that were not created using a template are not included when the system searches for existing assets; they are not used with `Update on Change` or `Ignore on Change`. - -## 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/test_templates_api/docs/Link.md b/test_templates_api/docs/Link.md deleted file mode 100644 index 2f810b68..00000000 --- a/test_templates_api/docs/Link.md +++ /dev/null @@ -1,35 +0,0 @@ -# Link - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **str** | | [optional] -**hreflang** | **str** | | [optional] -**title** | **str** | | [optional] -**type** | **str** | | [optional] -**deprecation** | **str** | | [optional] -**profile** | **str** | | [optional] -**name** | **str** | | [optional] -**templated** | **bool** | | [optional] - -## Example - -```python -from test_templates_api.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_form_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/test_templates_api/docs/NotFoundError.md b/test_templates_api/docs/NotFoundError.md deleted file mode 100644 index 03d555c6..00000000 --- a/test_templates_api/docs/NotFoundError.md +++ /dev/null @@ -1,28 +0,0 @@ -# NotFoundError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -## Example - -```python -from test_templates_api.models.not_found_error import NotFoundError - -# TODO update the JSON string below -json = "{}" -# create an instance of NotFoundError from a JSON string -not_found_error_instance = NotFoundError.from_json(json) -# print the JSON string representation of the object -print NotFoundError.to_json() - -# convert the object into a dict -not_found_error_dict = not_found_error_instance.to_dict() -# create an instance of NotFoundError from a dict -not_found_error_form_dict = not_found_error.from_dict(not_found_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/test_templates_api/docs/TestTemplate.md b/test_templates_api/docs/TestTemplate.md deleted file mode 100644 index d9853009..00000000 --- a/test_templates_api/docs/TestTemplate.md +++ /dev/null @@ -1,41 +0,0 @@ -# TestTemplate - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The ID of the test template. | [optional] -**name** | **str** | The name of the test template. | [optional] -**description** | **str** | Text that describes the test template. | [optional] -**icon** | **str** | Icon for the test template; will be displayed in the UI. | [optional] -**is_built_in** | **bool** | Indicates whether the test template is a built-in template. Note that built-in test templates are read-only. | [optional] -**certification_level** | **str** | | [optional] -**date_created** | **str** | The date and time the test template was created. | [optional] -**user_inputs** | [**Dict[str, UserInput]**](UserInput.md) | | [optional] -**labels** | **object** | A map of <labelKey, labelConfiguration>. | [optional] -**tests** | **object** | A map of <testKey, testConfiguration>. | [optional] -**alert_rules** | **object** | A map of <alertRuleKey, alertRuleConfiguration>. | [optional] -**dashboards** | **object** | A map of <dashboardKey, dashboardConfiguration>. | [optional] -**deployment_strategy** | [**Dict[str, DeploymentStrategy]**](DeploymentStrategy.md) | A map of <assetKey, deploymentStrategy>. | [optional] -**links** | [**Dict[str, Link]**](Link.md) | | [optional] - -## Example - -```python -from test_templates_api.models.test_template import TestTemplate - -# TODO update the JSON string below -json = "{}" -# create an instance of TestTemplate from a JSON string -test_template_instance = TestTemplate.from_json(json) -# print the JSON string representation of the object -print TestTemplate.to_json() - -# convert the object into a dict -test_template_dict = test_template_instance.to_dict() -# create an instance of TestTemplate from a dict -test_template_form_dict = test_template.from_dict(test_template_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/test_templates_api/docs/TestTemplateCollection.md b/test_templates_api/docs/TestTemplateCollection.md deleted file mode 100644 index 616e554f..00000000 --- a/test_templates_api/docs/TestTemplateCollection.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestTemplateCollection - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**templates** | [**List[TestTemplate]**](TestTemplate.md) | | [optional] -**links** | [**TestTemplateCollectionLinks**](TestTemplateCollectionLinks.md) | | [optional] - -## Example - -```python -from test_templates_api.models.test_template_collection import TestTemplateCollection - -# TODO update the JSON string below -json = "{}" -# create an instance of TestTemplateCollection from a JSON string -test_template_collection_instance = TestTemplateCollection.from_json(json) -# print the JSON string representation of the object -print TestTemplateCollection.to_json() - -# convert the object into a dict -test_template_collection_dict = test_template_collection_instance.to_dict() -# create an instance of TestTemplateCollection from a dict -test_template_collection_form_dict = test_template_collection.from_dict(test_template_collection_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/test_templates_api/docs/TestTemplateCollectionLinks.md b/test_templates_api/docs/TestTemplateCollectionLinks.md deleted file mode 100644 index f263f25e..00000000 --- a/test_templates_api/docs/TestTemplateCollectionLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# TestTemplateCollectionLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**TestTemplateCollectionLinksSelf**](TestTemplateCollectionLinksSelf.md) | | [optional] - -## Example - -```python -from test_templates_api.models.test_template_collection_links import TestTemplateCollectionLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of TestTemplateCollectionLinks from a JSON string -test_template_collection_links_instance = TestTemplateCollectionLinks.from_json(json) -# print the JSON string representation of the object -print TestTemplateCollectionLinks.to_json() - -# convert the object into a dict -test_template_collection_links_dict = test_template_collection_links_instance.to_dict() -# create an instance of TestTemplateCollectionLinks from a dict -test_template_collection_links_form_dict = test_template_collection_links.from_dict(test_template_collection_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/test_templates_api/docs/TestTemplateCollectionLinksSelf.md b/test_templates_api/docs/TestTemplateCollectionLinksSelf.md deleted file mode 100644 index 4f4fa584..00000000 --- a/test_templates_api/docs/TestTemplateCollectionLinksSelf.md +++ /dev/null @@ -1,28 +0,0 @@ -# TestTemplateCollectionLinksSelf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**href** | **str** | | [optional] - -## Example - -```python -from test_templates_api.models.test_template_collection_links_self import TestTemplateCollectionLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of TestTemplateCollectionLinksSelf from a JSON string -test_template_collection_links_self_instance = TestTemplateCollectionLinksSelf.from_json(json) -# print the JSON string representation of the object -print TestTemplateCollectionLinksSelf.to_json() - -# convert the object into a dict -test_template_collection_links_self_dict = test_template_collection_links_self_instance.to_dict() -# create an instance of TestTemplateCollectionLinksSelf from a dict -test_template_collection_links_self_form_dict = test_template_collection_links_self.from_dict(test_template_collection_links_self_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/test_templates_api/docs/TestTemplateEndpointsApi.md b/test_templates_api/docs/TestTemplateEndpointsApi.md deleted file mode 100644 index 2bfce3a9..00000000 --- a/test_templates_api/docs/TestTemplateEndpointsApi.md +++ /dev/null @@ -1,517 +0,0 @@ -# test_templates_api.TestTemplateEndpointsApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_test_template**](TestTemplateEndpointsApi.md#create_test_template) | **POST** /v7/tests/templates | Create a test template. -[**delete_test_template**](TestTemplateEndpointsApi.md#delete_test_template) | **DELETE** /v7/tests/templates/{id} | Delete a test template -[**deploy_user_template**](TestTemplateEndpointsApi.md#deploy_user_template) | **POST** /v7/tests/templates/{id}/deploy | Deploy a test template. -[**get_user_org_test_template**](TestTemplateEndpointsApi.md#get_user_org_test_template) | **GET** /v7/tests/templates/{id} | Retrieve a test template -[**get_user_org_test_templates**](TestTemplateEndpointsApi.md#get_user_org_test_templates) | **GET** /v7/tests/templates | List all test templates. -[**update_test_template**](TestTemplateEndpointsApi.md#update_test_template) | **PUT** /v7/tests/templates/{id} | Update a test template - - -# **create_test_template** -> TestTemplate create_test_template(test_template_upsert, aid=aid) - -Create a test template. - -Creates a test template. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_templates_api -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.models.test_template_upsert import TestTemplateUpsert -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - test_template_upsert = test_templates_api.TestTemplateUpsert() # TestTemplateUpsert | The test template to create or update. - aid = '2067' # 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 a test template. - api_response = api_instance.create_test_template(test_template_upsert, aid=aid) - print("The response of TestTemplateEndpointsApi->create_test_template:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestTemplateEndpointsApi->create_test_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_template_upsert** | [**TestTemplateUpsert**](TestTemplateUpsert.md)| The test template to create or update. | - **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 - -[**TestTemplate**](TestTemplate.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** | Forbidden | - | -**404** | Not Found | - | -**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_test_template** -> delete_test_template(id, aid=aid) - -Delete a test template - -Deletes a test template using its ID. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_templates_api -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - id = 'fcbb89a7-61cf-4616-9c4f-828fa3cb4684' # str | The ID of the test template - aid = '2067' # 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 a test template - api_instance.delete_test_template(id, aid=aid) - except Exception as e: - print("Exception when calling TestTemplateEndpointsApi->delete_test_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The ID of the test template | - **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** | Forbidden | - | -**404** | Not Found | - | -**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) - -# **deploy_user_template** -> deploy_user_template(id, deploy_test_template, aid=aid) - -Deploy a test template. - -Deploys a test template to create tests, alert rules, and dashboards defined by the template. You can deploy templates to easily create new tests. To deploy test templates, you must specify `userInputValues` required by the template in the request body. `userInputValues` enables you to specify a minimum set of user values required to configure the tests from a test template. This way, you do not have to edit all the details of each test configuration. If necessary, you can edit the test details directly in the template. ### Considerations Consider the following when deploying a test template: * To deploy a test template, you must first create the template or use one of ThousandEyes' predefined test templates. * The deployment strategy allows you to specify what should happen to a particular asset in the event that a test template is redeployed. When you attempt to deploy a test template that has already been deployed, the API service compares any assets that have not yet been deployed with the assets that were deployed in the previous deployment (the comparison is done using the **asset key**; the asset keys are simply the object keys used in the `tests`, `labels`, `alertRules`, and `dashboards` fields). By default, if the configuration of a particular asset has not changed from the previous deployment, that asset is ignored. If a change is detected: * If the asset is a test, a new test is created with the new configuration. * If the asset is not a test, the asset is updated. * You can create new resources such as tests, alert rules, labels, dashboards, and modify existing resources defined in test templates, overwriting the default configurations. * You can also use existing resources (such as those created outside the test template deployment flow) by adding their ID either in the raw test template or using the overrides when deploying the template. See example usage below for the raw test template sample. **Note**: The test template API does not currently track \"live\" configuration of assets. Any changes made to assets outside of the test template API will not be considered when comparing changes during the redeployment scenario. ### Example usage: ```POST /v7/tests/templates/fcbb89a7-61cf-4616-9c4f-828fa3cb4684/deploy { \"userInputValues\": { \"interval\": 120, \"target\": \"https://microsoft.com\", \"agents\": [{\"agentId\":11}], \"domain\": \"microsoft.com\" }, \"name\":\"Microsoft Suite\", \"tests\": { \"secondPageLoadTest\": { \"httpInterval\": 120, \"interval\": 120, \"testId\": 182481, \"type\": \"page-load\", \"url\": \"https://microsoft.com\", \"testName\": \"Microsoft Suite - Second Page Load\", \"agents\": [ { \"agentId\": 11 } ] } } } ``` #### Raw Test Template Sample ``` { ... \"tests\": { \"existingTest\": { \"testId\": \"123\", //The API will only try to update this test; will never create it \"type\": \"http-server\", .... }, ... }, ... } ``` - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_templates_api -from test_templates_api.models.deploy_test_template import DeployTestTemplate -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - id = 'fcbb89a7-61cf-4616-9c4f-828fa3cb4684' # str | The ID of the test template - deploy_test_template = test_templates_api.DeployTestTemplate() # DeployTestTemplate | Deploy test template - aid = '2067' # 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: - # Deploy a test template. - api_instance.deploy_user_template(id, deploy_test_template, aid=aid) - except Exception as e: - print("Exception when calling TestTemplateEndpointsApi->deploy_user_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The ID of the test template | - **deploy_test_template** | [**DeployTestTemplate**](DeployTestTemplate.md)| Deploy test template | - **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 | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**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_org_test_template** -> TestTemplate get_user_org_test_template(id, aid=aid) - -Retrieve a test template - -Retrieves a test template using its ID. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_templates_api -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - id = 'fcbb89a7-61cf-4616-9c4f-828fa3cb4684' # str | The ID of the test template - aid = '2067' # 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 a test template - api_response = api_instance.get_user_org_test_template(id, aid=aid) - print("The response of TestTemplateEndpointsApi->get_user_org_test_template:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestTemplateEndpointsApi->get_user_org_test_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The ID of the test template | - **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 - -[**TestTemplate**](TestTemplate.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** | Forbidden | - | -**404** | Not Found | - | -**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_org_test_templates** -> TestTemplateCollection get_user_org_test_templates(aid=aid) - -List all test templates. - -Retrieves a list of all your test templates - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_templates_api -from test_templates_api.models.test_template_collection import TestTemplateCollection -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - aid = '2067' # 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 all test templates. - api_response = api_instance.get_user_org_test_templates(aid=aid) - print("The response of TestTemplateEndpointsApi->get_user_org_test_templates:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestTemplateEndpointsApi->get_user_org_test_templates: %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 - -[**TestTemplateCollection**](TestTemplateCollection.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** | Forbidden | - | -**404** | Not Found | - | -**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_test_template** -> TestTemplate update_test_template(id, test_template_upsert, aid=aid) - -Update a test template - -Updates an existing test template. This operation overwrites the existing test template object with the object sent in the request. If a partial update is required, it is recommended that you retrieve the test template and modify the test template object before updating it. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import test_templates_api -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.models.test_template_upsert import TestTemplateUpsert -from test_templates_api.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 = test_templates_api.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 = test_templates_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with test_templates_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = test_templates_api.TestTemplateEndpointsApi(api_client) - id = 'fcbb89a7-61cf-4616-9c4f-828fa3cb4684' # str | The ID of the test template - test_template_upsert = test_templates_api.TestTemplateUpsert() # TestTemplateUpsert | The test template to create or update. - aid = '2067' # 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 a test template - api_response = api_instance.update_test_template(id, test_template_upsert, aid=aid) - print("The response of TestTemplateEndpointsApi->update_test_template:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TestTemplateEndpointsApi->update_test_template: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The ID of the test template | - **test_template_upsert** | [**TestTemplateUpsert**](TestTemplateUpsert.md)| The test template to create or update. | - **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 - -[**TestTemplate**](TestTemplate.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** | Forbidden | - | -**404** | Not Found | - | -**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/test_templates_api/docs/TestTemplateUpsert.md b/test_templates_api/docs/TestTemplateUpsert.md deleted file mode 100644 index 4edeca55..00000000 --- a/test_templates_api/docs/TestTemplateUpsert.md +++ /dev/null @@ -1,38 +0,0 @@ -# TestTemplateUpsert - -The test template to create or update. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the test template. | -**description** | **str** | Text that describes the test template. | [optional] -**icon** | **str** | Icon for the test template; will be displayed in the UI. | [optional] -**is_built_in** | **bool** | Indicates whether the test template is a built-in template. Note that built-in test templates are read-only. | [optional] -**user_inputs** | [**Dict[str, UserInput]**](UserInput.md) | | [optional] -**labels** | **object** | A map of <labelKey, labelConfiguration>. | [optional] -**tests** | **object** | A map of <testKey, testConfiguration>. | [optional] -**alert_rules** | **object** | A map of <alertRuleKey, alertRuleConfiguration>. | [optional] -**dashboards** | **object** | A map of <dashboardKey, dashboardConfiguration>. | [optional] -**deployment_strategy** | [**Dict[str, DeploymentStrategy]**](DeploymentStrategy.md) | A map of <assetKey, deploymentStrategy>. | [optional] - -## Example - -```python -from test_templates_api.models.test_template_upsert import TestTemplateUpsert - -# TODO update the JSON string below -json = "{}" -# create an instance of TestTemplateUpsert from a JSON string -test_template_upsert_instance = TestTemplateUpsert.from_json(json) -# print the JSON string representation of the object -print TestTemplateUpsert.to_json() - -# convert the object into a dict -test_template_upsert_dict = test_template_upsert_instance.to_dict() -# create an instance of TestTemplateUpsert from a dict -test_template_upsert_form_dict = test_template_upsert.from_dict(test_template_upsert_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/test_templates_api/docs/UnauthorizedError.md b/test_templates_api/docs/UnauthorizedError.md deleted file mode 100644 index 550d0405..00000000 --- a/test_templates_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from test_templates_api.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_form_dict = unauthorized_error.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/test_templates_api/docs/UserInput.md b/test_templates_api/docs/UserInput.md deleted file mode 100644 index 79a67dd2..00000000 --- a/test_templates_api/docs/UserInput.md +++ /dev/null @@ -1,33 +0,0 @@ -# UserInput - -The set of inputs that the user must fill in to use the test template. These inputs are provided by the user when creating a set of tests via the test template API or via the UI. The UI dynamically displays these user inputs for the user to input. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | The name of the user input field. | -**title** | **str** | The title of the user input field; may be used by UI. | [optional] -**description** | **str** | Description of the user input field; used by UI. | [optional] -**default_value** | [**UserInputDefaultValue**](UserInputDefaultValue.md) | | [optional] -**type** | [**UserInputType**](UserInputType.md) | | - -## Example - -```python -from test_templates_api.models.user_input import UserInput - -# TODO update the JSON string below -json = "{}" -# create an instance of UserInput from a JSON string -user_input_instance = UserInput.from_json(json) -# print the JSON string representation of the object -print UserInput.to_json() - -# convert the object into a dict -user_input_dict = user_input_instance.to_dict() -# create an instance of UserInput from a dict -user_input_form_dict = user_input.from_dict(user_input_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/test_templates_api/docs/UserInputDefaultValue.md b/test_templates_api/docs/UserInputDefaultValue.md deleted file mode 100644 index 732a34b0..00000000 --- a/test_templates_api/docs/UserInputDefaultValue.md +++ /dev/null @@ -1,28 +0,0 @@ -# UserInputDefaultValue - -Default value of user input field. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from test_templates_api.models.user_input_default_value import UserInputDefaultValue - -# TODO update the JSON string below -json = "{}" -# create an instance of UserInputDefaultValue from a JSON string -user_input_default_value_instance = UserInputDefaultValue.from_json(json) -# print the JSON string representation of the object -print UserInputDefaultValue.to_json() - -# convert the object into a dict -user_input_default_value_dict = user_input_default_value_instance.to_dict() -# create an instance of UserInputDefaultValue from a dict -user_input_default_value_form_dict = user_input_default_value.from_dict(user_input_default_value_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/test_templates_api/docs/UserInputType.md b/test_templates_api/docs/UserInputType.md deleted file mode 100644 index 0d9ba350..00000000 --- a/test_templates_api/docs/UserInputType.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserInputType - -The type of user input field. This is used to validate the user values provided when deploying a template. - \"string\": A string based user input. E.g., `\"https://google.com\"` - \"number\": A number based user input. E.g., `25.8` - \"boolean\": A boolean based user input. E.g., `false` - \"string[]\": A list of string based user inputs. E.g., `[\"someId\", \"someOtherId\"]` - \"number[]\": A list of number based user inputs. E.g., `[1, 2.3, 5000]` - \"boolean[]\": A list of boolean based user inputs. E.g., `[true, false]` - \"any\": For any other user inputs that don't belong to the types listed above. E.g., `[{\"agentId\": 22}]` - -## 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/test_templates_api/git_push.sh b/test_templates_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/test_templates_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/test_templates_api/pyproject.toml b/test_templates_api/pyproject.toml deleted file mode 100644 index 8284309d..00000000 --- a/test_templates_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "test_templates_api" -version = "1.0.0" -description = "Test Template" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Test Template"] -include = ["test_templates_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/test_templates_api/setup.py b/test_templates_api/setup.py deleted file mode 100644 index 35bf9d10..00000000 --- a/test_templates_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "test-templates-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Test Template", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Test Template"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - """, # noqa: E501 - package_data={"test_templates_api": ["py.typed"]}, -) diff --git a/test_templates_api/test-requirements.txt b/test_templates_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/test_templates_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/test_templates_api/test/test_api_error.py b/test_templates_api/test/test_api_error.py deleted file mode 100644 index c9b3aa96..00000000 --- a/test_templates_api/test/test_api_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.api_error import ApiError - -class TestApiError(unittest.TestCase): - """ApiError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ApiError: - """Test ApiError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ApiError` - """ - model = ApiError() - if include_optional: - return ApiError( - message = '', - errors = [ - '' - ] - ) - else: - return ApiError( - ) - """ - - def testApiError(self): - """Test ApiError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_bad_request_error.py b/test_templates_api/test/test_bad_request_error.py deleted file mode 100644 index 3c7fcce0..00000000 --- a/test_templates_api/test/test_bad_request_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.bad_request_error import BadRequestError - -class TestBadRequestError(unittest.TestCase): - """BadRequestError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BadRequestError: - """Test BadRequestError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BadRequestError` - """ - model = BadRequestError() - if include_optional: - return BadRequestError( - timestamp = 1680006221517, - status = 400, - error = 'Bad Request', - path = '/v1/tests/templates' - ) - else: - return BadRequestError( - ) - """ - - def testBadRequestError(self): - """Test BadRequestError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_deploy_test_template.py b/test_templates_api/test/test_deploy_test_template.py deleted file mode 100644 index 66efc71f..00000000 --- a/test_templates_api/test/test_deploy_test_template.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.deploy_test_template import DeployTestTemplate - -class TestDeployTestTemplate(unittest.TestCase): - """DeployTestTemplate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeployTestTemplate: - """Test DeployTestTemplate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DeployTestTemplate` - """ - model = DeployTestTemplate() - if include_optional: - return DeployTestTemplate( - user_input_values = test_templates_api.models.deploy_test_template_user_input_values.DeployTestTemplate_userInputValues( - interval = 56, - target = '', - agents = '', - domain = '', ), - name = '', - tests = test_templates_api.models.deploy_test_template_tests.DeployTestTemplate_tests( - interval = 56, ) - ) - else: - return DeployTestTemplate( - ) - """ - - def testDeployTestTemplate(self): - """Test DeployTestTemplate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_deploy_test_template_tests.py b/test_templates_api/test/test_deploy_test_template_tests.py deleted file mode 100644 index 6b20e75b..00000000 --- a/test_templates_api/test/test_deploy_test_template_tests.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.deploy_test_template_tests import DeployTestTemplateTests - -class TestDeployTestTemplateTests(unittest.TestCase): - """DeployTestTemplateTests unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeployTestTemplateTests: - """Test DeployTestTemplateTests - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DeployTestTemplateTests` - """ - model = DeployTestTemplateTests() - if include_optional: - return DeployTestTemplateTests( - interval = 56 - ) - else: - return DeployTestTemplateTests( - ) - """ - - def testDeployTestTemplateTests(self): - """Test DeployTestTemplateTests""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_deploy_test_template_user_input_values.py b/test_templates_api/test/test_deploy_test_template_user_input_values.py deleted file mode 100644 index 45304e76..00000000 --- a/test_templates_api/test/test_deploy_test_template_user_input_values.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.deploy_test_template_user_input_values import DeployTestTemplateUserInputValues - -class TestDeployTestTemplateUserInputValues(unittest.TestCase): - """DeployTestTemplateUserInputValues unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeployTestTemplateUserInputValues: - """Test DeployTestTemplateUserInputValues - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DeployTestTemplateUserInputValues` - """ - model = DeployTestTemplateUserInputValues() - if include_optional: - return DeployTestTemplateUserInputValues( - interval = 56, - target = '', - agents = '', - domain = '' - ) - else: - return DeployTestTemplateUserInputValues( - ) - """ - - def testDeployTestTemplateUserInputValues(self): - """Test DeployTestTemplateUserInputValues""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_deployment_strategy.py b/test_templates_api/test/test_deployment_strategy.py deleted file mode 100644 index fd6df649..00000000 --- a/test_templates_api/test/test_deployment_strategy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.deployment_strategy import DeploymentStrategy - -class TestDeploymentStrategy(unittest.TestCase): - """DeploymentStrategy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDeploymentStrategy(self): - """Test DeploymentStrategy""" - # inst = DeploymentStrategy() - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_link.py b/test_templates_api/test/test_link.py deleted file mode 100644 index de4da664..00000000 --- a/test_templates_api/test/test_link.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = '', - hreflang = '', - title = '', - type = '', - deprecation = '', - profile = '', - name = '', - templated = True - ) - else: - return Link( - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_not_found_error.py b/test_templates_api/test/test_not_found_error.py deleted file mode 100644 index 8303801e..00000000 --- a/test_templates_api/test/test_not_found_error.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.not_found_error import NotFoundError - -class TestNotFoundError(unittest.TestCase): - """NotFoundError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NotFoundError: - """Test NotFoundError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NotFoundError` - """ - model = NotFoundError() - if include_optional: - return NotFoundError( - message = '' - ) - else: - return NotFoundError( - ) - """ - - def testNotFoundError(self): - """Test NotFoundError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_test_template.py b/test_templates_api/test/test_test_template.py deleted file mode 100644 index 28a27b8c..00000000 --- a/test_templates_api/test/test_test_template.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.test_template import TestTemplate - -class TestTestTemplate(unittest.TestCase): - """TestTemplate unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestTemplate: - """Test TestTemplate - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestTemplate` - """ - model = TestTemplate() - if include_optional: - return TestTemplate( - id = 'fcbb89a7-61cf-4616-9c4f-828fa3cb4684', - name = 'OneDrive Template', - description = 'OneDrive Template', - icon = 'oneDrive.svg', - is_built_in = False, - certification_level = 'User', - date_created = '2022-09-28 13:25:15', - user_inputs = {"tenantName":{"title":"Tenant Name","description":"Name of OneDrive tenant; will be used in OneDrive URL","type":"string"},"agents":{"name":"Agent List","type":"any"}}, - labels = {"templateLabel":{"name":"OneDrive Template"}}, - tests = {"dnsTest":{"type":"object","example":{"domain":"{{userInputs.domain}} A","groups":[{"groupId":"{{labels.webHealthDashLabel.groupId}}"},{"groupId":"{{labels.templateLabel.groupId}}"}],"interval":"{{userInputs.interval}}","type":"dns-server","dnsServers":"{{userInputs.dnsServers}}","testName":"{{name}} - DNS","agents":"{{userInputs.agents}}"}},"httpServerTest":{"groups":[{"groupId":"{{labels.webHealthDashLabel.groupId}}"},{"groupId":"{{labels.templateLabel.groupId}}"}],"interval":"{{userInputs.interval}}","type":"http-server","url":"https://{{userInputs.domain}}","testName":"{{name}} - HTTP Server","agents":"{{userInputs.agents}}"},"networkTest":{"server":"{{userInputs.domain}}","protocol":"TCP","port":"{{userInputs.port}}","groups":{"groupId":"{{labels.webHealthDashLabel.groupId}}"},"interval":"{{userInputs.interval}}","type":"agent-to-server","url":"https://{{userInputs.domain}}","testName":"{{name}} - Network","agents":"{{userInputs.agents}}"},"pageLoadTest":{"name":"OneDrive PageLoad Test","type":"page-load","target":"https://{{tenantName}}-my.sharepoint.com","agents":"{{userInputs.agents}}"},"dnsServerTest":{"name":"OneDrive Dns Server Test","type":"dns-server","domain":"{{tenantName}}-my.sharepoint.com CNAME","agents":"{{userInputs.agents}}"}}, - alert_rules = {"httpAlert":{"testIds":["{{tests.pageLoadTest.testId}}"],"severity":"MINOR","roundsViolatingRequired":1,"roundsViolatingOutOf":1,"alertType":"HTTP Server","expression":"((totalTime >= 500 ms) && (responseTime >= 500 ms))","ruleName":"{{name}} - HTTP Alert","minimumSources":1}}, - dashboards = {"webHealthDashboard":{"title":"Web Health Overview","widgets":[{"metricGroup":"Web - HTTP Server","measure":{"type":"Mean"},"metric":"Total Time","filters":{"Test Labels":"[{{labels.webHealthDashLabel.groupId}}]"},"groupBy":"Tests","type":"Time Series: Line","title":"HTTP Response Times","dataSource":"Cloud & Enterprise Agents"}]}}, - deployment_strategy = {"testVoiceLabel":"Update on Change","testVideoLabel":"Update on Change","testLabel":"Update on Change","dnsTest":"Ignore on Change","webexDashboard":"Ignore on Change","serverTest":"Ignore on Change"}, - links = { - 'key' : test_templates_api.models.link.Link( - href = '', - hreflang = '', - title = '', - type = '', - deprecation = '', - profile = '', - name = '', - templated = True, ) - } - ) - else: - return TestTemplate( - ) - """ - - def testTestTemplate(self): - """Test TestTemplate""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_test_template_collection.py b/test_templates_api/test/test_test_template_collection.py deleted file mode 100644 index 4ff41cf1..00000000 --- a/test_templates_api/test/test_test_template_collection.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.test_template_collection import TestTemplateCollection - -class TestTestTemplateCollection(unittest.TestCase): - """TestTemplateCollection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestTemplateCollection: - """Test TestTemplateCollection - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestTemplateCollection` - """ - model = TestTemplateCollection() - if include_optional: - return TestTemplateCollection( - templates = [ - test_templates_api.models.test_template.TestTemplate( - id = 'fcbb89a7-61cf-4616-9c4f-828fa3cb4684', - name = 'OneDrive Template', - description = 'OneDrive Template', - icon = 'oneDrive.svg', - is_built_in = False, - certification_level = 'User', - date_created = '2022-09-28 13:25:15', - user_inputs = {"tenantName":{"title":"Tenant Name","description":"Name of OneDrive tenant; will be used in OneDrive URL","type":"string"},"agents":{"name":"Agent List","type":"any"}}, - labels = {"templateLabel":{"name":"OneDrive Template"}}, - tests = {"dnsTest":{"type":"object","example":{"domain":"{{userInputs.domain}} A","groups":[{"groupId":"{{labels.webHealthDashLabel.groupId}}"},{"groupId":"{{labels.templateLabel.groupId}}"}],"interval":"{{userInputs.interval}}","type":"dns-server","dnsServers":"{{userInputs.dnsServers}}","testName":"{{name}} - DNS","agents":"{{userInputs.agents}}"}},"httpServerTest":{"groups":[{"groupId":"{{labels.webHealthDashLabel.groupId}}"},{"groupId":"{{labels.templateLabel.groupId}}"}],"interval":"{{userInputs.interval}}","type":"http-server","url":"https://{{userInputs.domain}}","testName":"{{name}} - HTTP Server","agents":"{{userInputs.agents}}"},"networkTest":{"server":"{{userInputs.domain}}","protocol":"TCP","port":"{{userInputs.port}}","groups":{"groupId":"{{labels.webHealthDashLabel.groupId}}"},"interval":"{{userInputs.interval}}","type":"agent-to-server","url":"https://{{userInputs.domain}}","testName":"{{name}} - Network","agents":"{{userInputs.agents}}"},"pageLoadTest":{"name":"OneDrive PageLoad Test","type":"page-load","target":"https://{{tenantName}}-my.sharepoint.com","agents":"{{userInputs.agents}}"},"dnsServerTest":{"name":"OneDrive Dns Server Test","type":"dns-server","domain":"{{tenantName}}-my.sharepoint.com CNAME","agents":"{{userInputs.agents}}"}}, - alert_rules = {"httpAlert":{"testIds":["{{tests.pageLoadTest.testId}}"],"severity":"MINOR","roundsViolatingRequired":1,"roundsViolatingOutOf":1,"alertType":"HTTP Server","expression":"((totalTime >= 500 ms) && (responseTime >= 500 ms))","ruleName":"{{name}} - HTTP Alert","minimumSources":1}}, - dashboards = {"webHealthDashboard":{"title":"Web Health Overview","widgets":[{"metricGroup":"Web - HTTP Server","measure":{"type":"Mean"},"metric":"Total Time","filters":{"Test Labels":"[{{labels.webHealthDashLabel.groupId}}]"},"groupBy":"Tests","type":"Time Series: Line","title":"HTTP Response Times","dataSource":"Cloud & Enterprise Agents"}]}}, - deployment_strategy = {"testVoiceLabel":"Update on Change","testVideoLabel":"Update on Change","testLabel":"Update on Change","dnsTest":"Ignore on Change","webexDashboard":"Ignore on Change","serverTest":"Ignore on Change"}, - _links = { - 'key' : test_templates_api.models.link.Link( - href = '', - hreflang = '', - title = '', - type = '', - deprecation = '', - profile = '', - name = '', - templated = True, ) - }, ) - ], - links = test_templates_api.models.test_template_collection__links.TestTemplateCollection__links( - self = test_templates_api.models.test_template_collection__links_self.TestTemplateCollection__links_self( - href = 'https://api.thousandeyes.com/v7/tests/templates/6c6bc11c-0332-4e28-9efb-f171a14be824', ), ) - ) - else: - return TestTemplateCollection( - ) - """ - - def testTestTemplateCollection(self): - """Test TestTemplateCollection""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_test_template_collection_links.py b/test_templates_api/test/test_test_template_collection_links.py deleted file mode 100644 index 767d42fe..00000000 --- a/test_templates_api/test/test_test_template_collection_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.test_template_collection_links import TestTemplateCollectionLinks - -class TestTestTemplateCollectionLinks(unittest.TestCase): - """TestTemplateCollectionLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestTemplateCollectionLinks: - """Test TestTemplateCollectionLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestTemplateCollectionLinks` - """ - model = TestTemplateCollectionLinks() - if include_optional: - return TestTemplateCollectionLinks( - var_self = test_templates_api.models.test_template_collection__links_self.TestTemplateCollection__links_self( - href = 'https://api.thousandeyes.com/v7/tests/templates/6c6bc11c-0332-4e28-9efb-f171a14be824', ) - ) - else: - return TestTemplateCollectionLinks( - ) - """ - - def testTestTemplateCollectionLinks(self): - """Test TestTemplateCollectionLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_test_template_collection_links_self.py b/test_templates_api/test/test_test_template_collection_links_self.py deleted file mode 100644 index 32174390..00000000 --- a/test_templates_api/test/test_test_template_collection_links_self.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.test_template_collection_links_self import TestTemplateCollectionLinksSelf - -class TestTestTemplateCollectionLinksSelf(unittest.TestCase): - """TestTemplateCollectionLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestTemplateCollectionLinksSelf: - """Test TestTemplateCollectionLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestTemplateCollectionLinksSelf` - """ - model = TestTemplateCollectionLinksSelf() - if include_optional: - return TestTemplateCollectionLinksSelf( - href = 'https://api.thousandeyes.com/v7/tests/templates/6c6bc11c-0332-4e28-9efb-f171a14be824' - ) - else: - return TestTemplateCollectionLinksSelf( - ) - """ - - def testTestTemplateCollectionLinksSelf(self): - """Test TestTemplateCollectionLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_test_template_endpoints_api.py b/test_templates_api/test/test_test_template_endpoints_api.py deleted file mode 100644 index e6b73158..00000000 --- a/test_templates_api/test/test_test_template_endpoints_api.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from test_templates_api.api.test_template_endpoints_api import TestTemplateEndpointsApi - - -class TestTestTemplateEndpointsApi(unittest.TestCase): - """TestTemplateEndpointsApi unit test stubs""" - - def setUp(self) -> None: - self.api = TestTemplateEndpointsApi() - - def tearDown(self) -> None: - pass - - def test_create_test_template(self) -> None: - """Test case for create_test_template - - Create a test template. - """ - pass - - def test_delete_test_template(self) -> None: - """Test case for delete_test_template - - Delete a test template - """ - pass - - def test_deploy_user_template(self) -> None: - """Test case for deploy_user_template - - Deploy a test template. - """ - pass - - def test_get_user_org_test_template(self) -> None: - """Test case for get_user_org_test_template - - Retrieve a test template - """ - pass - - def test_get_user_org_test_templates(self) -> None: - """Test case for get_user_org_test_templates - - List all test templates. - """ - pass - - def test_update_test_template(self) -> None: - """Test case for update_test_template - - Update a test template - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_test_template_upsert.py b/test_templates_api/test/test_test_template_upsert.py deleted file mode 100644 index f49c3f86..00000000 --- a/test_templates_api/test/test_test_template_upsert.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.test_template_upsert import TestTemplateUpsert - -class TestTestTemplateUpsert(unittest.TestCase): - """TestTemplateUpsert unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestTemplateUpsert: - """Test TestTemplateUpsert - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestTemplateUpsert` - """ - model = TestTemplateUpsert() - if include_optional: - return TestTemplateUpsert( - name = 'OneDrive Template', - description = 'OneDrive Template', - icon = 'oneDrive.svg', - is_built_in = False, - user_inputs = { - 'key' : {"tenantName":{"title":"Tenant Name","description":"Name of OneDrive tenant; will be used in OneDrive URL","type":"string"},"agents":{"name":"Agent List","type":"any"}} - }, - labels = {"templateLabel":{"name":"OneDrive Template"}}, - tests = {"pageLoadTest":{"name":"OneDrive PageLoad Test","type":"page-load","target":"https://{{tenantName}}-my.sharepoint.com","agents":"{{userInputs.agents}}"},"dnsServerTest":{"name":"OneDrive Dns Server Test","type":"dns-server","domain":"{{tenantName}}-my.sharepoint.com CNAME","agents":"{{userInputs.agents}}"}}, - alert_rules = {"httpAlert":{"alertType":"HTTP Serverr","ruleName":"An Http alert rule","expression":"((totalTime >= 500 ms) && (responseTime >= 500 ms))","roundsViolatingRequired":1,"roundsViolatingOutOf":1,"testIds":["{{tests.pageLoadTest.testId}}"]}}, - dashboards = {"myDashboard":{"title":"Test Dashboard 12","widgets":[{"filters":{"Test Labels":"[{{labels.templateLabel.groupId}}]"},"type":"Bar Chart: Stacked","title":"A Bar Chart: Stacked widget","metricGroup":"Web - HTTP Server","measure":{"type":"Median"},"metric":"Response Time","axisGroupBy":"Continents","dataSource":"Cloud & Enterprise Agents"}]}}, - deployment_strategy = {"pageLoadTest":"Create Always","httpAlert":"Ignore on Change"} - ) - else: - return TestTemplateUpsert( - name = 'OneDrive Template', - ) - """ - - def testTestTemplateUpsert(self): - """Test TestTemplateUpsert""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_unauthorized_error.py b/test_templates_api/test/test_unauthorized_error.py deleted file mode 100644 index 747f7cfe..00000000 --- a/test_templates_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_user_input.py b/test_templates_api/test/test_user_input.py deleted file mode 100644 index fa5115b9..00000000 --- a/test_templates_api/test/test_user_input.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.user_input import UserInput - -class TestUserInput(unittest.TestCase): - """UserInput unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserInput: - """Test UserInput - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserInput` - """ - model = UserInput() - if include_optional: - return UserInput( - name = 'target', - title = 'Test Target', - description = 'The target of the Tests', - default_value = https://google.com, - type = 'string' - ) - else: - return UserInput( - name = 'target', - type = 'string', - ) - """ - - def testUserInput(self): - """Test UserInput""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_user_input_default_value.py b/test_templates_api/test/test_user_input_default_value.py deleted file mode 100644 index ce6be6ea..00000000 --- a/test_templates_api/test/test_user_input_default_value.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.user_input_default_value import UserInputDefaultValue - -class TestUserInputDefaultValue(unittest.TestCase): - """UserInputDefaultValue unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserInputDefaultValue: - """Test UserInputDefaultValue - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserInputDefaultValue` - """ - model = UserInputDefaultValue() - if include_optional: - return UserInputDefaultValue( - ) - else: - return UserInputDefaultValue( - ) - """ - - def testUserInputDefaultValue(self): - """Test UserInputDefaultValue""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test/test_user_input_type.py b/test_templates_api/test/test_user_input_type.py deleted file mode 100644 index c64d0d82..00000000 --- a/test_templates_api/test/test_user_input_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from test_templates_api.models.user_input_type import UserInputType - -class TestUserInputType(unittest.TestCase): - """UserInputType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserInputType(self): - """Test UserInputType""" - # inst = UserInputType() - -if __name__ == '__main__': - unittest.main() diff --git a/test_templates_api/test_templates_api/__init__.py b/test_templates_api/test_templates_api/__init__.py deleted file mode 100644 index 95643891..00000000 --- a/test_templates_api/test_templates_api/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 test_templates_api.api.test_template_endpoints_api import TestTemplateEndpointsApi - -# import ApiClient -from test_templates_api.api_response import ApiResponse -from test_templates_api.api_client import ApiClient -from test_templates_api.configuration import Configuration -from test_templates_api.exceptions import OpenApiException -from test_templates_api.exceptions import ApiTypeError -from test_templates_api.exceptions import ApiValueError -from test_templates_api.exceptions import ApiKeyError -from test_templates_api.exceptions import ApiAttributeError -from test_templates_api.exceptions import ApiException - -# import models into sdk package -from test_templates_api.models.api_error import ApiError -from test_templates_api.models.bad_request_error import BadRequestError -from test_templates_api.models.deploy_test_template import DeployTestTemplate -from test_templates_api.models.deploy_test_template_tests import DeployTestTemplateTests -from test_templates_api.models.deploy_test_template_user_input_values import DeployTestTemplateUserInputValues -from test_templates_api.models.deployment_strategy import DeploymentStrategy -from test_templates_api.models.link import Link -from test_templates_api.models.not_found_error import NotFoundError -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.models.test_template_collection import TestTemplateCollection -from test_templates_api.models.test_template_collection_links import TestTemplateCollectionLinks -from test_templates_api.models.test_template_collection_links_self import TestTemplateCollectionLinksSelf -from test_templates_api.models.test_template_upsert import TestTemplateUpsert -from test_templates_api.models.unauthorized_error import UnauthorizedError -from test_templates_api.models.user_input import UserInput -from test_templates_api.models.user_input_default_value import UserInputDefaultValue -from test_templates_api.models.user_input_type import UserInputType diff --git a/test_templates_api/test_templates_api/api/__init__.py b/test_templates_api/test_templates_api/api/__init__.py deleted file mode 100644 index 2c783da3..00000000 --- a/test_templates_api/test_templates_api/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from test_templates_api.api.test_template_endpoints_api import TestTemplateEndpointsApi - diff --git a/test_templates_api/test_templates_api/api/test_template_endpoints_api.py b/test_templates_api/test_templates_api/api/test_template_endpoints_api.py deleted file mode 100644 index d7450617..00000000 --- a/test_templates_api/test_templates_api/api/test_template_endpoints_api.py +++ /dev/null @@ -1,1840 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import Optional - -from test_templates_api.models.deploy_test_template import DeployTestTemplate -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.models.test_template_collection import TestTemplateCollection -from test_templates_api.models.test_template_upsert import TestTemplateUpsert - -from test_templates_api.api_client import ApiClient -from test_templates_api.api_response import ApiResponse -from test_templates_api.rest import RESTResponseType - - -class TestTemplateEndpointsApi: - """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() - self.api_client = api_client - - - @validate_call - def create_test_template( - self, - test_template_upsert: Annotated[TestTemplateUpsert, Field(description="The test template to create or update.")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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, - ) -> TestTemplate: - """Create a test template. - - Creates a test template. - - :param test_template_upsert: The test template to create or update. (required) - :type test_template_upsert: TestTemplateUpsert - :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_test_template_serialize( - test_template_upsert=test_template_upsert, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "TestTemplate", - '400': "BadRequestError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "ApiError", - '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, - ).data - - - @validate_call - def create_test_template_with_http_info( - self, - test_template_upsert: Annotated[TestTemplateUpsert, Field(description="The test template to create or update.")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[TestTemplate]: - """Create a test template. - - Creates a test template. - - :param test_template_upsert: The test template to create or update. (required) - :type test_template_upsert: TestTemplateUpsert - :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_test_template_serialize( - test_template_upsert=test_template_upsert, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "TestTemplate", - '400': "BadRequestError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "ApiError", - '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, - ) - - - @validate_call - def create_test_template_without_preload_content( - self, - test_template_upsert: Annotated[TestTemplateUpsert, Field(description="The test template to create or update.")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 a test template. - - Creates a test template. - - :param test_template_upsert: The test template to create or update. (required) - :type test_template_upsert: TestTemplateUpsert - :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_test_template_serialize( - test_template_upsert=test_template_upsert, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "TestTemplate", - '400': "BadRequestError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "ApiError", - '500': "ApiError" - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_test_template_serialize( - self, - test_template_upsert, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 test_template_upsert is not None: - _body_params = test_template_upsert - - - # 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/tests/templates', - 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_test_template( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 a test template - - Deletes a test template using its ID. - - :param id: The ID of the test template (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_test_template_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]] = { - - } - 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, - ).data - - - @validate_call - def delete_test_template_with_http_info( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 a test template - - Deletes a test template using its ID. - - :param id: The ID of the test template (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_test_template_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]] = { - - } - 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, - ) - - - @validate_call - def delete_test_template_without_preload_content( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 a test template - - Deletes a test template using its ID. - - :param id: The ID of the test template (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_test_template_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]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_test_template_serialize( - self, - id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/templates/{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 deploy_user_template( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - deploy_test_template: Annotated[DeployTestTemplate, Field(description="Deploy test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: - """Deploy a test template. - - Deploys a test template to create tests, alert rules, and dashboards defined by the template. You can deploy templates to easily create new tests. To deploy test templates, you must specify `userInputValues` required by the template in the request body. `userInputValues` enables you to specify a minimum set of user values required to configure the tests from a test template. This way, you do not have to edit all the details of each test configuration. If necessary, you can edit the test details directly in the template. ### Considerations Consider the following when deploying a test template: * To deploy a test template, you must first create the template or use one of ThousandEyes' predefined test templates. * The deployment strategy allows you to specify what should happen to a particular asset in the event that a test template is redeployed. When you attempt to deploy a test template that has already been deployed, the API service compares any assets that have not yet been deployed with the assets that were deployed in the previous deployment (the comparison is done using the **asset key**; the asset keys are simply the object keys used in the `tests`, `labels`, `alertRules`, and `dashboards` fields). By default, if the configuration of a particular asset has not changed from the previous deployment, that asset is ignored. If a change is detected: * If the asset is a test, a new test is created with the new configuration. * If the asset is not a test, the asset is updated. * You can create new resources such as tests, alert rules, labels, dashboards, and modify existing resources defined in test templates, overwriting the default configurations. * You can also use existing resources (such as those created outside the test template deployment flow) by adding their ID either in the raw test template or using the overrides when deploying the template. See example usage below for the raw test template sample. **Note**: The test template API does not currently track \"live\" configuration of assets. Any changes made to assets outside of the test template API will not be considered when comparing changes during the redeployment scenario. ### Example usage: ```POST /v7/tests/templates/fcbb89a7-61cf-4616-9c4f-828fa3cb4684/deploy { \"userInputValues\": { \"interval\": 120, \"target\": \"https://microsoft.com\", \"agents\": [{\"agentId\":11}], \"domain\": \"microsoft.com\" }, \"name\":\"Microsoft Suite\", \"tests\": { \"secondPageLoadTest\": { \"httpInterval\": 120, \"interval\": 120, \"testId\": 182481, \"type\": \"page-load\", \"url\": \"https://microsoft.com\", \"testName\": \"Microsoft Suite - Second Page Load\", \"agents\": [ { \"agentId\": 11 } ] } } } ``` #### Raw Test Template Sample ``` { ... \"tests\": { \"existingTest\": { \"testId\": \"123\", //The API will only try to update this test; will never create it \"type\": \"http-server\", .... }, ... }, ... } ``` - - :param id: The ID of the test template (required) - :type id: str - :param deploy_test_template: Deploy test template (required) - :type deploy_test_template: DeployTestTemplate - :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._deploy_user_template_serialize( - id=id, - deploy_test_template=deploy_test_template, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def deploy_user_template_with_http_info( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - deploy_test_template: Annotated[DeployTestTemplate, Field(description="Deploy test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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]: - """Deploy a test template. - - Deploys a test template to create tests, alert rules, and dashboards defined by the template. You can deploy templates to easily create new tests. To deploy test templates, you must specify `userInputValues` required by the template in the request body. `userInputValues` enables you to specify a minimum set of user values required to configure the tests from a test template. This way, you do not have to edit all the details of each test configuration. If necessary, you can edit the test details directly in the template. ### Considerations Consider the following when deploying a test template: * To deploy a test template, you must first create the template or use one of ThousandEyes' predefined test templates. * The deployment strategy allows you to specify what should happen to a particular asset in the event that a test template is redeployed. When you attempt to deploy a test template that has already been deployed, the API service compares any assets that have not yet been deployed with the assets that were deployed in the previous deployment (the comparison is done using the **asset key**; the asset keys are simply the object keys used in the `tests`, `labels`, `alertRules`, and `dashboards` fields). By default, if the configuration of a particular asset has not changed from the previous deployment, that asset is ignored. If a change is detected: * If the asset is a test, a new test is created with the new configuration. * If the asset is not a test, the asset is updated. * You can create new resources such as tests, alert rules, labels, dashboards, and modify existing resources defined in test templates, overwriting the default configurations. * You can also use existing resources (such as those created outside the test template deployment flow) by adding their ID either in the raw test template or using the overrides when deploying the template. See example usage below for the raw test template sample. **Note**: The test template API does not currently track \"live\" configuration of assets. Any changes made to assets outside of the test template API will not be considered when comparing changes during the redeployment scenario. ### Example usage: ```POST /v7/tests/templates/fcbb89a7-61cf-4616-9c4f-828fa3cb4684/deploy { \"userInputValues\": { \"interval\": 120, \"target\": \"https://microsoft.com\", \"agents\": [{\"agentId\":11}], \"domain\": \"microsoft.com\" }, \"name\":\"Microsoft Suite\", \"tests\": { \"secondPageLoadTest\": { \"httpInterval\": 120, \"interval\": 120, \"testId\": 182481, \"type\": \"page-load\", \"url\": \"https://microsoft.com\", \"testName\": \"Microsoft Suite - Second Page Load\", \"agents\": [ { \"agentId\": 11 } ] } } } ``` #### Raw Test Template Sample ``` { ... \"tests\": { \"existingTest\": { \"testId\": \"123\", //The API will only try to update this test; will never create it \"type\": \"http-server\", .... }, ... }, ... } ``` - - :param id: The ID of the test template (required) - :type id: str - :param deploy_test_template: Deploy test template (required) - :type deploy_test_template: DeployTestTemplate - :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._deploy_user_template_serialize( - id=id, - deploy_test_template=deploy_test_template, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def deploy_user_template_without_preload_content( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - deploy_test_template: Annotated[DeployTestTemplate, Field(description="Deploy test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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: - """Deploy a test template. - - Deploys a test template to create tests, alert rules, and dashboards defined by the template. You can deploy templates to easily create new tests. To deploy test templates, you must specify `userInputValues` required by the template in the request body. `userInputValues` enables you to specify a minimum set of user values required to configure the tests from a test template. This way, you do not have to edit all the details of each test configuration. If necessary, you can edit the test details directly in the template. ### Considerations Consider the following when deploying a test template: * To deploy a test template, you must first create the template or use one of ThousandEyes' predefined test templates. * The deployment strategy allows you to specify what should happen to a particular asset in the event that a test template is redeployed. When you attempt to deploy a test template that has already been deployed, the API service compares any assets that have not yet been deployed with the assets that were deployed in the previous deployment (the comparison is done using the **asset key**; the asset keys are simply the object keys used in the `tests`, `labels`, `alertRules`, and `dashboards` fields). By default, if the configuration of a particular asset has not changed from the previous deployment, that asset is ignored. If a change is detected: * If the asset is a test, a new test is created with the new configuration. * If the asset is not a test, the asset is updated. * You can create new resources such as tests, alert rules, labels, dashboards, and modify existing resources defined in test templates, overwriting the default configurations. * You can also use existing resources (such as those created outside the test template deployment flow) by adding their ID either in the raw test template or using the overrides when deploying the template. See example usage below for the raw test template sample. **Note**: The test template API does not currently track \"live\" configuration of assets. Any changes made to assets outside of the test template API will not be considered when comparing changes during the redeployment scenario. ### Example usage: ```POST /v7/tests/templates/fcbb89a7-61cf-4616-9c4f-828fa3cb4684/deploy { \"userInputValues\": { \"interval\": 120, \"target\": \"https://microsoft.com\", \"agents\": [{\"agentId\":11}], \"domain\": \"microsoft.com\" }, \"name\":\"Microsoft Suite\", \"tests\": { \"secondPageLoadTest\": { \"httpInterval\": 120, \"interval\": 120, \"testId\": 182481, \"type\": \"page-load\", \"url\": \"https://microsoft.com\", \"testName\": \"Microsoft Suite - Second Page Load\", \"agents\": [ { \"agentId\": 11 } ] } } } ``` #### Raw Test Template Sample ``` { ... \"tests\": { \"existingTest\": { \"testId\": \"123\", //The API will only try to update this test; will never create it \"type\": \"http-server\", .... }, ... }, ... } ``` - - :param id: The ID of the test template (required) - :type id: str - :param deploy_test_template: Deploy test template (required) - :type deploy_test_template: DeployTestTemplate - :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._deploy_user_template_serialize( - id=id, - deploy_test_template=deploy_test_template, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _deploy_user_template_serialize( - self, - id, - deploy_test_template, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 deploy_test_template is not None: - _body_params = deploy_test_template - - - # 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/tests/templates/{id}/deploy', - 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_org_test_template( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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, - ) -> TestTemplate: - """Retrieve a test template - - Retrieves a test template using its ID. - - :param id: The ID of the test template (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_org_test_template_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': "TestTemplate", - '400': "ApiError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "NotFoundError", - '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, - ).data - - - @validate_call - def get_user_org_test_template_with_http_info( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[TestTemplate]: - """Retrieve a test template - - Retrieves a test template using its ID. - - :param id: The ID of the test template (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_org_test_template_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': "TestTemplate", - '400': "ApiError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "NotFoundError", - '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, - ) - - - @validate_call - def get_user_org_test_template_without_preload_content( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 a test template - - Retrieves a test template using its ID. - - :param id: The ID of the test template (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_org_test_template_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': "TestTemplate", - '400': "ApiError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "NotFoundError", - '500': "ApiError" - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_user_org_test_template_serialize( - self, - id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/templates/{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_org_test_templates( - 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, - ) -> TestTemplateCollection: - """List all test templates. - - Retrieves a list of all your test templates - - :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_org_test_templates_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': "TestTemplateCollection", - '400': "ApiError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "ApiError", - '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, - ).data - - - @validate_call - def get_user_org_test_templates_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[TestTemplateCollection]: - """List all test templates. - - Retrieves a list of all your test templates - - :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_org_test_templates_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': "TestTemplateCollection", - '400': "ApiError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "ApiError", - '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, - ) - - - @validate_call - def get_user_org_test_templates_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 all test templates. - - Retrieves a list of all your test templates - - :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_org_test_templates_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': "TestTemplateCollection", - '400': "ApiError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "ApiError", - '500': "ApiError" - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_user_org_test_templates_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/templates', - 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_test_template( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - test_template_upsert: Annotated[TestTemplateUpsert, Field(description="The test template to create or update.")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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, - ) -> TestTemplate: - """Update a test template - - Updates an existing test template. This operation overwrites the existing test template object with the object sent in the request. If a partial update is required, it is recommended that you retrieve the test template and modify the test template object before updating it. - - :param id: The ID of the test template (required) - :type id: str - :param test_template_upsert: The test template to create or update. (required) - :type test_template_upsert: TestTemplateUpsert - :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_test_template_serialize( - id=id, - test_template_upsert=test_template_upsert, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TestTemplate", - '400': "BadRequestError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "NotFoundError", - '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, - ).data - - - @validate_call - def update_test_template_with_http_info( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - test_template_upsert: Annotated[TestTemplateUpsert, Field(description="The test template to create or update.")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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[TestTemplate]: - """Update a test template - - Updates an existing test template. This operation overwrites the existing test template object with the object sent in the request. If a partial update is required, it is recommended that you retrieve the test template and modify the test template object before updating it. - - :param id: The ID of the test template (required) - :type id: str - :param test_template_upsert: The test template to create or update. (required) - :type test_template_upsert: TestTemplateUpsert - :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_test_template_serialize( - id=id, - test_template_upsert=test_template_upsert, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TestTemplate", - '400': "BadRequestError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "NotFoundError", - '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, - ) - - - @validate_call - def update_test_template_without_preload_content( - self, - id: Annotated[str, Field(min_length=10, strict=True, max_length=36, description="The ID of the test template")], - test_template_upsert: Annotated[TestTemplateUpsert, Field(description="The test template to create or update.")], - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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 a test template - - Updates an existing test template. This operation overwrites the existing test template object with the object sent in the request. If a partial update is required, it is recommended that you retrieve the test template and modify the test template object before updating it. - - :param id: The ID of the test template (required) - :type id: str - :param test_template_upsert: The test template to create or update. (required) - :type test_template_upsert: TestTemplateUpsert - :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_test_template_serialize( - id=id, - test_template_upsert=test_template_upsert, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TestTemplate", - '400': "BadRequestError", - '401': "UnauthorizedError", - '403': "ApiError", - '404': "NotFoundError", - '500': "ApiError" - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_test_template_serialize( - self, - id, - test_template_upsert, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 test_template_upsert is not None: - _body_params = test_template_upsert - - - # 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='PUT', - resource_path='/v7/tests/templates/{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/test_templates_api/test_templates_api/api_client.py b/test_templates_api/test_templates_api/api_client.py deleted file mode 100644 index 2e78e91a..00000000 --- a/test_templates_api/test_templates_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from test_templates_api.configuration import Configuration -from test_templates_api.api_response import ApiResponse -import test_templates_api.models -from test_templates_api import rest -from test_templates_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(test_templates_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/test_templates_api/test_templates_api/api_response.py b/test_templates_api/test_templates_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/test_templates_api/test_templates_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/test_templates_api/test_templates_api/configuration.py b/test_templates_api/test_templates_api/configuration.py deleted file mode 100644 index 07be2fd1..00000000 --- a/test_templates_api/test_templates_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("test_templates_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.1\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/test_templates_api/test_templates_api/exceptions.py b/test_templates_api/test_templates_api/exceptions.py deleted file mode 100644 index b4df2d30..00000000 --- a/test_templates_api/test_templates_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/test_templates_api/test_templates_api/models/__init__.py b/test_templates_api/test_templates_api/models/__init__.py deleted file mode 100644 index b3e6b12c..00000000 --- a/test_templates_api/test_templates_api/models/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from test_templates_api.models.api_error import ApiError -from test_templates_api.models.bad_request_error import BadRequestError -from test_templates_api.models.deploy_test_template import DeployTestTemplate -from test_templates_api.models.deploy_test_template_tests import DeployTestTemplateTests -from test_templates_api.models.deploy_test_template_user_input_values import DeployTestTemplateUserInputValues -from test_templates_api.models.deployment_strategy import DeploymentStrategy -from test_templates_api.models.link import Link -from test_templates_api.models.not_found_error import NotFoundError -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.models.test_template_collection import TestTemplateCollection -from test_templates_api.models.test_template_collection_links import TestTemplateCollectionLinks -from test_templates_api.models.test_template_collection_links_self import TestTemplateCollectionLinksSelf -from test_templates_api.models.test_template_upsert import TestTemplateUpsert -from test_templates_api.models.unauthorized_error import UnauthorizedError -from test_templates_api.models.user_input import UserInput -from test_templates_api.models.user_input_default_value import UserInputDefaultValue -from test_templates_api.models.user_input_type import UserInputType diff --git a/test_templates_api/test_templates_api/models/api_error.py b/test_templates_api/test_templates_api/models/api_error.py deleted file mode 100644 index ae84f1aa..00000000 --- a/test_templates_api/test_templates_api/models/api_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiError(BaseModel): - """ - ApiError - """ # noqa: E501 - message: Optional[StrictStr] = None - errors: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["message", "errors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiError 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message"), - "errors": obj.get("errors") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/bad_request_error.py b/test_templates_api/test_templates_api/models/bad_request_error.py deleted file mode 100644 index f50f869b..00000000 --- a/test_templates_api/test_templates_api/models/bad_request_error.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BadRequestError(BaseModel): - """ - BadRequestError - """ # noqa: E501 - timestamp: Optional[StrictInt] = None - status: Optional[StrictInt] = None - error: Optional[StrictStr] = None - path: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["timestamp", "status", "error", "path"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BadRequestError 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of BadRequestError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "timestamp": obj.get("timestamp"), - "status": obj.get("status"), - "error": obj.get("error"), - "path": obj.get("path") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/deploy_test_template.py b/test_templates_api/test_templates_api/models/deploy_test_template.py deleted file mode 100644 index 95f00fe6..00000000 --- a/test_templates_api/test_templates_api/models/deploy_test_template.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_templates_api.models.deploy_test_template_tests import DeployTestTemplateTests -from test_templates_api.models.deploy_test_template_user_input_values import DeployTestTemplateUserInputValues -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DeployTestTemplate(BaseModel): - """ - DeployTestTemplate - """ # noqa: E501 - user_input_values: Optional[DeployTestTemplateUserInputValues] = Field(default=None, alias="userInputValues") - name: Optional[StrictStr] = None - tests: Optional[DeployTestTemplateTests] = None - __properties: ClassVar[List[str]] = ["userInputValues", "name", "tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DeployTestTemplate 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of user_input_values - if self.user_input_values: - _dict['userInputValues'] = self.user_input_values.to_dict() - # override the default output from pydantic by calling `to_dict()` of tests - if self.tests: - _dict['tests'] = self.tests.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DeployTestTemplate from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "userInputValues": DeployTestTemplateUserInputValues.from_dict(obj.get("userInputValues")) if obj.get("userInputValues") is not None else None, - "name": obj.get("name"), - "tests": DeployTestTemplateTests.from_dict(obj.get("tests")) if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/deploy_test_template_tests.py b/test_templates_api/test_templates_api/models/deploy_test_template_tests.py deleted file mode 100644 index 8ef635e6..00000000 --- a/test_templates_api/test_templates_api/models/deploy_test_template_tests.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DeployTestTemplateTests(BaseModel): - """ - DeployTestTemplateTests - """ # noqa: E501 - interval: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["interval"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DeployTestTemplateTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DeployTestTemplateTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/deploy_test_template_user_input_values.py b/test_templates_api/test_templates_api/models/deploy_test_template_user_input_values.py deleted file mode 100644 index 62e50aa6..00000000 --- a/test_templates_api/test_templates_api/models/deploy_test_template_user_input_values.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DeployTestTemplateUserInputValues(BaseModel): - """ - DeployTestTemplateUserInputValues - """ # noqa: E501 - interval: Optional[StrictInt] = None - target: Optional[StrictStr] = None - agents: Optional[StrictStr] = None - domain: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["interval", "target", "agents", "domain"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DeployTestTemplateUserInputValues 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DeployTestTemplateUserInputValues from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "target": obj.get("target"), - "agents": obj.get("agents"), - "domain": obj.get("domain") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/deployment_strategy.py b/test_templates_api/test_templates_api/models/deployment_strategy.py deleted file mode 100644 index 5d6e3115..00000000 --- a/test_templates_api/test_templates_api/models/deployment_strategy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DeploymentStrategy(str, Enum): - """ - The `deploymentStrategy` field defines how the system behaves when an asset (test, label, dashboard) defined in the template already exists. For tests, the system uses the test type and name to determine if a test already exists. For example, if a template contains an http-server test named `Test123` and an http-server test with the same name already exists, the system assumes that this test already exists. If the test had a different type (for example, page-load), then the system would not consider the test to already exist because the types are different. For Labels and Dashboards, the system uses only the name. (Note that current Test Templates only consider \"test\" Labels). Alert Rules do not currently support `deploymentStrategy`. Below are the possible deployment strategies and their behaviors: * `Create Always` - The system will always attempt to create the asset. If an asset of the same name and type already exists, the system will generate an error. This behavior ensures that each asset created from a template is unique. This is the default behavior. * `Update on Change` - If an asset of the same type and name already exists, the existing asset is used instead of creating a new asset. If the configuration of the asset in the template is different from the existing one, the latest configuration is applied. * `Ignore on Change` - If an asset of the same type and name already exists, the existing asset is used instead of creating a new asset. If the configuration of the asset in the template is different from the existing one, the configuration of the existing asset is used and the configuration in the template is ignored. The `Update on Change` and `Ignore on Change` strategies essentially allow assets to be shared across templates. For example, the built-in \"Custom Web Page\", \"Custom Web Server\", and \"Custom Device\" templates all contain a Dashboard asset called \"Health Overview\". It's `deploymentStrategy` is set to `Ignore on Change`, which means that the first deployment of a template such as the \"Custom Web Page\" template creates the \"Health Overview\" dashboard. Subsequent deployments of the \"Custom Web Page\" template do not attempt to recreate the \"Health Overview\" dashboard. Instead, the existing dashboard is reused. Note: Assets that were not created using a template are not included when the system searches for existing assets; they are not used with `Update on Change` or `Ignore on Change`. - """ - - """ - allowed enum values - """ - CREATE_ON_CHANGE = 'Create on Change' - UPDATE_ON_CHANGE = 'Update on Change' - IGNORE_ON_CHANGE = 'Ignore on Change' - CREATE_ALWAYS = 'Create Always' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DeploymentStrategy from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/test_templates_api/test_templates_api/models/link.py b/test_templates_api/test_templates_api/models/link.py deleted file mode 100644 index 39e7ed88..00000000 --- a/test_templates_api/test_templates_api/models/link.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Link(BaseModel): - """ - Link - """ # noqa: E501 - href: Optional[StrictStr] = None - hreflang: Optional[StrictStr] = None - title: Optional[StrictStr] = None - type: Optional[StrictStr] = None - deprecation: Optional[StrictStr] = None - profile: Optional[StrictStr] = None - name: Optional[StrictStr] = None - templated: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["href", "hreflang", "title", "type", "deprecation", "profile", "name", "templated"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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"), - "hreflang": obj.get("hreflang"), - "title": obj.get("title"), - "type": obj.get("type"), - "deprecation": obj.get("deprecation"), - "profile": obj.get("profile"), - "name": obj.get("name"), - "templated": obj.get("templated") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/not_found_error.py b/test_templates_api/test_templates_api/models/not_found_error.py deleted file mode 100644 index f5a504b0..00000000 --- a/test_templates_api/test_templates_api/models/not_found_error.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class NotFoundError(BaseModel): - """ - NotFoundError - """ # noqa: E501 - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["message"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of NotFoundError 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of NotFoundError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/test_template.py b/test_templates_api/test_templates_api/models/test_template.py deleted file mode 100644 index 80092dc7..00000000 --- a/test_templates_api/test_templates_api/models/test_template.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from test_templates_api.models.deployment_strategy import DeploymentStrategy -from test_templates_api.models.link import Link -from test_templates_api.models.user_input import UserInput -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestTemplate(BaseModel): - """ - TestTemplate - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="The ID of the test template.") - name: Optional[StrictStr] = Field(default=None, description="The name of the test template.") - description: Optional[StrictStr] = Field(default=None, description="Text that describes the test template.") - icon: Optional[StrictStr] = Field(default=None, description="Icon for the test template; will be displayed in the UI.") - is_built_in: Optional[StrictBool] = Field(default=None, description="Indicates whether the test template is a built-in template. Note that built-in test templates are read-only.", alias="isBuiltIn") - certification_level: Optional[StrictStr] = Field(default=None, alias="certificationLevel") - date_created: Optional[StrictStr] = Field(default=None, description="The date and time the test template was created.", alias="dateCreated") - user_inputs: Optional[Dict[str, UserInput]] = Field(default=None, alias="userInputs") - labels: Optional[Union[str, Any]] = Field(default=None, description="A map of .") - tests: Optional[Union[str, Any]] = Field(default=None, description="A map of .") - alert_rules: Optional[Union[str, Any]] = Field(default=None, description="A map of .", alias="alertRules") - dashboards: Optional[Union[str, Any]] = Field(default=None, description="A map of .") - deployment_strategy: Optional[Dict[str, DeploymentStrategy]] = Field(default=None, description="A map of .", alias="deploymentStrategy") - links: Optional[Dict[str, Link]] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["id", "name", "description", "icon", "isBuiltIn", "certificationLevel", "dateCreated", "userInputs", "labels", "tests", "alertRules", "dashboards", "deploymentStrategy", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTemplate 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each value in user_inputs (dict) - _field_dict = {} - if self.user_inputs: - for _key in self.user_inputs: - if self.user_inputs[_key]: - _field_dict[_key] = self.user_inputs[_key].to_dict() - _dict['userInputs'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in links (dict) - _field_dict = {} - if self.links: - for _key in self.links: - if self.links[_key]: - _field_dict[_key] = self.links[_key].to_dict() - _dict['_links'] = _field_dict - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestTemplate 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"), - "name": obj.get("name"), - "description": obj.get("description"), - "icon": obj.get("icon"), - "isBuiltIn": obj.get("isBuiltIn"), - "certificationLevel": obj.get("certificationLevel"), - "dateCreated": obj.get("dateCreated"), - "userInputs": dict( - (_k, UserInput.from_dict(_v)) - for _k, _v in obj.get("userInputs").items() - ) - if obj.get("userInputs") is not None - else None, - "labels": obj.get("labels"), - "tests": obj.get("tests"), - "alertRules": obj.get("alertRules"), - "dashboards": obj.get("dashboards"), - "deploymentStrategy": dict((_k, _v) for _k, _v in obj.get("deploymentStrategy").items()), - "_links": dict( - (_k, Link.from_dict(_v)) - for _k, _v in obj.get("_links").items() - ) - if obj.get("_links") is not None - else None - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/test_template_collection.py b/test_templates_api/test_templates_api/models/test_template_collection.py deleted file mode 100644 index e0f97b28..00000000 --- a/test_templates_api/test_templates_api/models/test_template_collection.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_templates_api.models.test_template import TestTemplate -from test_templates_api.models.test_template_collection_links import TestTemplateCollectionLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestTemplateCollection(BaseModel): - """ - TestTemplateCollection - """ # noqa: E501 - templates: Optional[List[TestTemplate]] = None - links: Optional[TestTemplateCollectionLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["templates", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTemplateCollection 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in templates (list) - _items = [] - if self.templates: - for _item in self.templates: - if _item: - _items.append(_item.to_dict()) - _dict['templates'] = _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: Dict) -> Self: - """Create an instance of TestTemplateCollection from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "templates": [TestTemplate.from_dict(_item) for _item in obj.get("templates")] if obj.get("templates") is not None else None, - "_links": TestTemplateCollectionLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/test_template_collection_links.py b/test_templates_api/test_templates_api/models/test_template_collection_links.py deleted file mode 100644 index 7094a110..00000000 --- a/test_templates_api/test_templates_api/models/test_template_collection_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from test_templates_api.models.test_template_collection_links_self import TestTemplateCollectionLinksSelf -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestTemplateCollectionLinks(BaseModel): - """ - TestTemplateCollectionLinks - """ # noqa: E501 - var_self: Optional[TestTemplateCollectionLinksSelf] = Field(default=None, alias="self") - __properties: ClassVar[List[str]] = ["self"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTemplateCollectionLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of TestTemplateCollectionLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": TestTemplateCollectionLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/test_template_collection_links_self.py b/test_templates_api/test_templates_api/models/test_template_collection_links_self.py deleted file mode 100644 index cc30a1c0..00000000 --- a/test_templates_api/test_templates_api/models/test_template_collection_links_self.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestTemplateCollectionLinksSelf(BaseModel): - """ - TestTemplateCollectionLinksSelf - """ # noqa: E501 - href: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["href"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTemplateCollectionLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestTemplateCollectionLinksSelf 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") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/test_template_upsert.py b/test_templates_api/test_templates_api/models/test_template_upsert.py deleted file mode 100644 index 1e19221c..00000000 --- a/test_templates_api/test_templates_api/models/test_template_upsert.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from test_templates_api.models.deployment_strategy import DeploymentStrategy -from test_templates_api.models.user_input import UserInput -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestTemplateUpsert(BaseModel): - """ - The test template to create or update. - """ # noqa: E501 - name: StrictStr = Field(description="The name of the test template.") - description: Optional[StrictStr] = Field(default=None, description="Text that describes the test template.") - icon: Optional[StrictStr] = Field(default=None, description="Icon for the test template; will be displayed in the UI.") - is_built_in: Optional[StrictBool] = Field(default=None, description="Indicates whether the test template is a built-in template. Note that built-in test templates are read-only.", alias="isBuiltIn") - user_inputs: Optional[Dict[str, UserInput]] = Field(default=None, alias="userInputs") - labels: Optional[Union[str, Any]] = Field(default=None, description="A map of .") - tests: Optional[Union[str, Any]] = Field(default=None, description="A map of .") - alert_rules: Optional[Union[str, Any]] = Field(default=None, description="A map of .", alias="alertRules") - dashboards: Optional[Union[str, Any]] = Field(default=None, description="A map of .") - deployment_strategy: Optional[Dict[str, DeploymentStrategy]] = Field(default=None, description="A map of .", alias="deploymentStrategy") - __properties: ClassVar[List[str]] = ["name", "description", "icon", "isBuiltIn", "userInputs", "labels", "tests", "alertRules", "dashboards", "deploymentStrategy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestTemplateUpsert 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each value in user_inputs (dict) - _field_dict = {} - if self.user_inputs: - for _key in self.user_inputs: - if self.user_inputs[_key]: - _field_dict[_key] = self.user_inputs[_key].to_dict() - _dict['userInputs'] = _field_dict - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestTemplateUpsert 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"), - "description": obj.get("description"), - "icon": obj.get("icon"), - "isBuiltIn": obj.get("isBuiltIn"), - "userInputs": dict( - (_k, UserInput.from_dict(_v)) - for _k, _v in obj.get("userInputs").items() - ) - if obj.get("userInputs") is not None - else None, - "labels": obj.get("labels"), - "tests": obj.get("tests"), - "alertRules": obj.get("alertRules"), - "dashboards": obj.get("dashboards"), - "deploymentStrategy": dict((_k, _v) for _k, _v in obj.get("deploymentStrategy").items()) - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/unauthorized_error.py b/test_templates_api/test_templates_api/models/unauthorized_error.py deleted file mode 100644 index 0da3f7db..00000000 --- a/test_templates_api/test_templates_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/test_templates_api/test_templates_api/models/user_input.py b/test_templates_api/test_templates_api/models/user_input.py deleted file mode 100644 index 0f653d5e..00000000 --- a/test_templates_api/test_templates_api/models/user_input.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from test_templates_api.models.user_input_default_value import UserInputDefaultValue -from test_templates_api.models.user_input_type import UserInputType -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UserInput(BaseModel): - """ - The set of inputs that the user must fill in to use the test template. These inputs are provided by the user when creating a set of tests via the test template API or via the UI. The UI dynamically displays these user inputs for the user to input. - """ # noqa: E501 - name: StrictStr = Field(description="The name of the user input field.") - title: Optional[StrictStr] = Field(default=None, description="The title of the user input field; may be used by UI.") - description: Optional[StrictStr] = Field(default=None, description="Description of the user input field; used by UI.") - default_value: Optional[UserInputDefaultValue] = Field(default=None, alias="defaultValue") - type: UserInputType - __properties: ClassVar[List[str]] = ["name", "title", "description", "defaultValue", "type"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UserInput 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of default_value - if self.default_value: - _dict['defaultValue'] = self.default_value.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UserInput 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"), - "title": obj.get("title"), - "description": obj.get("description"), - "defaultValue": UserInputDefaultValue.from_dict(obj.get("defaultValue")) if obj.get("defaultValue") is not None else None, - "type": obj.get("type") - }) - return _obj - - diff --git a/test_templates_api/test_templates_api/models/user_input_default_value.py b/test_templates_api/test_templates_api/models/user_input_default_value.py deleted file mode 100644 index 2f1cb529..00000000 --- a/test_templates_api/test_templates_api/models/user_input_default_value.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional, Union -from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -USERINPUTDEFAULTVALUE_ONE_OF_SCHEMAS = ["float", "str"] - -class UserInputDefaultValue(BaseModel): - """ - Default value of user input field. - """ - # data type: str - oneof_schema_1_validator: Optional[StrictStr] = None - # data type: float - oneof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None - actual_instance: Optional[Union[float, str]] = None - one_of_schemas: List[str] = Literal["float", "str"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = UserInputDefaultValue.model_construct() - error_messages = [] - match = 0 - # validate data type: str - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: float - try: - instance.oneof_schema_2_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in UserInputDefaultValue with oneOf schemas: float, str. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in UserInputDefaultValue with oneOf schemas: float, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into str - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into float - try: - # validation - instance.oneof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_2_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into UserInputDefaultValue with oneOf schemas: float, str. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into UserInputDefaultValue with oneOf schemas: float, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/test_templates_api/test_templates_api/models/user_input_type.py b/test_templates_api/test_templates_api/models/user_input_type.py deleted file mode 100644 index 3f558355..00000000 --- a/test_templates_api/test_templates_api/models/user_input_type.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class UserInputType(str, Enum): - """ - The type of user input field. This is used to validate the user values provided when deploying a template. - \"string\": A string based user input. E.g., `\"https://google.com\"` - \"number\": A number based user input. E.g., `25.8` - \"boolean\": A boolean based user input. E.g., `false` - \"string[]\": A list of string based user inputs. E.g., `[\"someId\", \"someOtherId\"]` - \"number[]\": A list of number based user inputs. E.g., `[1, 2.3, 5000]` - \"boolean[]\": A list of boolean based user inputs. E.g., `[true, false]` - \"any\": For any other user inputs that don't belong to the types listed above. E.g., `[{\"agentId\": 22}]` - """ - - """ - allowed enum values - """ - STRING = 'string' - NUMBER = 'number' - BOOLEAN = 'boolean' - STRING_LEFT_SQUARE_BRACKET_RIGHT_SQUARE_BRACKET = 'string[]' - NUMBER_LEFT_SQUARE_BRACKET_RIGHT_SQUARE_BRACKET = 'number[]' - BOOLEAN_LEFT_SQUARE_BRACKET_RIGHT_SQUARE_BRACKET = 'boolean[]' - AGENTSELECTIONCONFIG = 'agentSelectionConfig' - ANY = 'any' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UserInputType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/test_templates_api/test_templates_api/rest.py b/test_templates_api/test_templates_api/rest.py deleted file mode 100644 index 48d6c718..00000000 --- a/test_templates_api/test_templates_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Test Template - - ## Overview Test templates allow you create a set of tests, alert rules, dashboards, and labels from a single template configuration file. The following applies to test templates: * You can create tests for monitoring common services and applications such as Microsoft 365, Webex, and others using a predefined set of certified templates. * Test templates reduce the time and complexity of creating tests for common SaaS or other services by providing a set of templates for creating tests, alert rules, and other assets within the ThousandEyes platform. * Templates created with an account group in a particular organization are visible to all account groups in that organization, provided they have the `View Test Templates` permission. * Credentials (usernames, passwords, tokens, etc.) can be included in a test template only as placeholders whose value is provided by user input when the template is deployed. Creating or updating a test template that contains a credentials field in plain text will result in a bad request (HTTP 400). * The schemas to use for `labels`, `tests`, `alertRules` and `dashboards` are defined at https://developer.thousandeyes.com/v7/. * To support referencing an asset from another asset of a different type (for example, defining the `testId` field of an `alertRule` by referencing the ID of a test defined in the template itself), the deployment of assets is done in a specific order: 1. Labels 2. Tests 3. Alert rules 4. Dashboards For a given asset type, you can reference any asset type with a higher order. (For example, labels cannot reference other assets in the template; tests can only reference labels; alert rules can reference tests and labels, etc.) - - The version of the OpenAPI document: 7.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from test_templates_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/test_templates_api/tox.ini b/test_templates_api/tox.ini deleted file mode 100644 index dbc059b4..00000000 --- a/test_templates_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=test_templates_api diff --git a/usage_api/.gitignore b/tests/.gitignore similarity index 100% rename from usage_api/.gitignore rename to tests/.gitignore diff --git a/usage_api/.openapi-generator-ignore b/tests/.openapi-generator-ignore similarity index 100% rename from usage_api/.openapi-generator-ignore rename to tests/.openapi-generator-ignore diff --git a/tests/.openapi-generator/FILES b/tests/.openapi-generator/FILES new file mode 100644 index 00000000..87908680 --- /dev/null +++ b/tests/.openapi-generator/FILES @@ -0,0 +1,487 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/Agent.md +docs/AgentBase.md +docs/AgentToAgentApi.md +docs/AgentToAgentInstantTest.md +docs/AgentToAgentProperties.md +docs/AgentToAgentTest.md +docs/AgentToAgentTestProtocol.md +docs/AgentToAgentTests.md +docs/AgentToServerApi.md +docs/AgentToServerInstantTest.md +docs/AgentToServerProperties.md +docs/AgentToServerTest.md +docs/AgentToServerTests.md +docs/AlertDirection.md +docs/AlertRoundsViolationMode.md +docs/AlertRule.md +docs/AlertType.md +docs/AllTestTypesApi.md +docs/BGPApi.md +docs/BaseBgpTest.md +docs/BaseRequest.md +docs/BaseTest.md +docs/BgpTest.md +docs/BgpTests.md +docs/CloudEnterpriseAgentType.md +docs/DNSSECApi.md +docs/DNSServerApi.md +docs/DNSTraceApi.md +docs/DnsQueryClass.md +docs/DnsSecInstantTest.md +docs/DnsSecProperties.md +docs/DnsSecTest.md +docs/DnsSecTests.md +docs/DnsServerInstantTest.md +docs/DnsServerProperties.md +docs/DnsServerTest.md +docs/DnsServerTests.md +docs/DnsServersRequest.md +docs/DnsTraceInstantTest.md +docs/DnsTraceProperties.md +docs/DnsTraceTest.md +docs/DnsTraceTests.md +docs/Error.md +docs/Expand.md +docs/FTPServerApi.md +docs/FtpServerInstantTest.md +docs/FtpServerProperties.md +docs/FtpServerRequestType.md +docs/FtpServerTest.md +docs/FtpServerTests.md +docs/GetAgentToAgentTests200Response.md +docs/GetAgentToServerTests200Response.md +docs/GetBgpTests200Response.md +docs/GetDNSServerTests200Response.md +docs/GetDnsSecTests200Response.md +docs/GetDnsTraceTests200Response.md +docs/GetFtpServerTests200Response.md +docs/GetHttpServerTests200Response.md +docs/GetPageLoadTests200Response.md +docs/GetPathVisInterfaceGroups200Response.md +docs/GetSipServerTests200Response.md +docs/GetTests200Response.md +docs/GetVoiceTests200Response.md +docs/GetWebTransactionsTests200Response.md +docs/HTTPServerApi.md +docs/HttpServerInstantTest.md +docs/HttpServerProperties.md +docs/HttpServerTest.md +docs/HttpServerTests.md +docs/InstantTest.md +docs/InterfaceGroup.md +docs/InterfaceGroups.md +docs/Link.md +docs/Monitor.md +docs/MonitorType.md +docs/MonitorsRequest.md +docs/PageLoadApi.md +docs/PageLoadInstantTest.md +docs/PageLoadProperties.md +docs/PageLoadTest.md +docs/PageLoadTests.md +docs/PathVisualizationInterfaceGroupsApi.md +docs/SIPServerApi.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/Severity.md +docs/SimpleAgent.md +docs/SimpleTest.md +docs/SipServerInstantTest.md +docs/SipServerInstantTestRequest.md +docs/SipServerInstantTestResponse.md +docs/SipServerProperties.md +docs/SipServerTest.md +docs/SipServerTests.md +docs/SipTestProtocol.md +docs/TestAuthType.md +docs/TestCustomHeaders.md +docs/TestDirection.md +docs/TestDnsServer.md +docs/TestDnsTransportProtocol.md +docs/TestDscpId.md +docs/TestHttpInterval.md +docs/TestInterval.md +docs/TestIpv6Policy.md +docs/TestLabelsInner.md +docs/TestMonitorsProperties.md +docs/TestPageLoadingStrategy.md +docs/TestPathTraceMode.md +docs/TestProbeMode.md +docs/TestProtocol.md +docs/TestRequest.md +docs/TestRequestAllOfAgents.md +docs/TestSharedAccountsInner.md +docs/TestSipCredentials.md +docs/TestSslVersionId.md +docs/TestSubInterval.md +docs/TestType.md +docs/Tests.md +docs/UnauthorizedError.md +docs/UnexpandedAgentToAgentTest.md +docs/UnexpandedAgentToServerTest.md +docs/UnexpandedBgpTest.md +docs/UnexpandedDnsSecTest.md +docs/UnexpandedDnsServerTest.md +docs/UnexpandedDnsTraceTest.md +docs/UnexpandedFtpServerTest.md +docs/UnexpandedHttpServerTest.md +docs/UnexpandedInstantTest.md +docs/UnexpandedInstantTestLinks.md +docs/UnexpandedInstantTestLinksSelf.md +docs/UnexpandedPageLoadTest.md +docs/UnexpandedSipServerTest.md +docs/UnexpandedTest.md +docs/UnexpandedVoiceTest.md +docs/UnexpandedWebTransactionTest.md +docs/UpdateAgentToAgentTest.md +docs/UpdateAgentToServerTest.md +docs/UpdateBgpTest.md +docs/UpdateBgpTestRequest.md +docs/UpdateDnsSecTest.md +docs/UpdateDnsServerTest.md +docs/UpdateDnsTraceTest.md +docs/UpdateFtpServerTest.md +docs/UpdateHttpServerTest.md +docs/UpdatePageLoadTest.md +docs/UpdateSipServerTest.md +docs/UpdateSipServerTest1.md +docs/UpdateVoiceTest.md +docs/UpdateWebTransactionTest.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +docs/VoiceApi.md +docs/VoiceInstantTest.md +docs/VoiceProperties.md +docs/VoiceTest.md +docs/VoiceTests.md +docs/WebTransactionApi.md +docs/WebTransactionInstantTest.md +docs/WebTransactionProperties.md +docs/WebTransactionTest.md +docs/WebTransactionTests.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +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_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_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_get_agent_to_agent_tests200_response.py +test/test_get_agent_to_server_tests200_response.py +test/test_get_bgp_tests200_response.py +test/test_get_dns_sec_tests200_response.py +test/test_get_dns_server_tests200_response.py +test/test_get_dns_trace_tests200_response.py +test/test_get_ftp_server_tests200_response.py +test/test_get_http_server_tests200_response.py +test/test_get_page_load_tests200_response.py +test/test_get_path_vis_interface_groups200_response.py +test/test_get_sip_server_tests200_response.py +test/test_get_tests200_response.py +test/test_get_voice_tests200_response.py +test/test_get_web_transactions_tests200_response.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_self_links_links.py +test/test_severity.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_labels_inner.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_request_all_of_agents.py +test/test_test_shared_accounts_inner.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_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_instant_test_links.py +test/test_unexpanded_instant_test_links_self.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_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_all_of_errors.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 +tests/__init__.py +tests/api/__init__.py +tests/api/agent_to_agent_api.py +tests/api/agent_to_server_api.py +tests/api/all_test_types_api.py +tests/api/bgp_api.py +tests/api/dns_server_api.py +tests/api/dns_trace_api.py +tests/api/dnssec_api.py +tests/api/ftp_server_api.py +tests/api/http_server_api.py +tests/api/page_load_api.py +tests/api/path_visualization_interface_groups_api.py +tests/api/sip_server_api.py +tests/api/voice_api.py +tests/api/web_transaction_api.py +tests/api_client.py +tests/api_response.py +tests/configuration.py +tests/exceptions.py +tests/models/__init__.py +tests/models/agent.py +tests/models/agent_base.py +tests/models/agent_to_agent_instant_test.py +tests/models/agent_to_agent_properties.py +tests/models/agent_to_agent_test.py +tests/models/agent_to_agent_test_protocol.py +tests/models/agent_to_agent_tests.py +tests/models/agent_to_server_instant_test.py +tests/models/agent_to_server_properties.py +tests/models/agent_to_server_test.py +tests/models/agent_to_server_tests.py +tests/models/alert_direction.py +tests/models/alert_rounds_violation_mode.py +tests/models/alert_rule.py +tests/models/alert_type.py +tests/models/base_bgp_test.py +tests/models/base_request.py +tests/models/base_test.py +tests/models/bgp_test.py +tests/models/bgp_tests.py +tests/models/cloud_enterprise_agent_type.py +tests/models/dns_query_class.py +tests/models/dns_sec_instant_test.py +tests/models/dns_sec_properties.py +tests/models/dns_sec_test.py +tests/models/dns_sec_tests.py +tests/models/dns_server_instant_test.py +tests/models/dns_server_properties.py +tests/models/dns_server_test.py +tests/models/dns_server_tests.py +tests/models/dns_servers_request.py +tests/models/dns_trace_instant_test.py +tests/models/dns_trace_properties.py +tests/models/dns_trace_test.py +tests/models/dns_trace_tests.py +tests/models/error.py +tests/models/expand.py +tests/models/ftp_server_instant_test.py +tests/models/ftp_server_properties.py +tests/models/ftp_server_request_type.py +tests/models/ftp_server_test.py +tests/models/ftp_server_tests.py +tests/models/get_agent_to_agent_tests200_response.py +tests/models/get_agent_to_server_tests200_response.py +tests/models/get_bgp_tests200_response.py +tests/models/get_dns_sec_tests200_response.py +tests/models/get_dns_server_tests200_response.py +tests/models/get_dns_trace_tests200_response.py +tests/models/get_ftp_server_tests200_response.py +tests/models/get_http_server_tests200_response.py +tests/models/get_page_load_tests200_response.py +tests/models/get_path_vis_interface_groups200_response.py +tests/models/get_sip_server_tests200_response.py +tests/models/get_tests200_response.py +tests/models/get_voice_tests200_response.py +tests/models/get_web_transactions_tests200_response.py +tests/models/http_server_instant_test.py +tests/models/http_server_properties.py +tests/models/http_server_test.py +tests/models/http_server_tests.py +tests/models/instant_test.py +tests/models/interface_group.py +tests/models/interface_groups.py +tests/models/link.py +tests/models/monitor.py +tests/models/monitor_type.py +tests/models/monitors_request.py +tests/models/page_load_instant_test.py +tests/models/page_load_properties.py +tests/models/page_load_test.py +tests/models/page_load_tests.py +tests/models/self_links.py +tests/models/self_links_links.py +tests/models/severity.py +tests/models/simple_agent.py +tests/models/simple_test.py +tests/models/sip_server_instant_test.py +tests/models/sip_server_instant_test_request.py +tests/models/sip_server_instant_test_response.py +tests/models/sip_server_properties.py +tests/models/sip_server_test.py +tests/models/sip_server_tests.py +tests/models/sip_test_protocol.py +tests/models/test_auth_type.py +tests/models/test_custom_headers.py +tests/models/test_direction.py +tests/models/test_dns_server.py +tests/models/test_dns_transport_protocol.py +tests/models/test_dscp_id.py +tests/models/test_http_interval.py +tests/models/test_interval.py +tests/models/test_ipv6_policy.py +tests/models/test_labels_inner.py +tests/models/test_monitors_properties.py +tests/models/test_page_loading_strategy.py +tests/models/test_path_trace_mode.py +tests/models/test_probe_mode.py +tests/models/test_protocol.py +tests/models/test_request.py +tests/models/test_request_all_of_agents.py +tests/models/test_shared_accounts_inner.py +tests/models/test_sip_credentials.py +tests/models/test_ssl_version_id.py +tests/models/test_sub_interval.py +tests/models/test_type.py +tests/models/tests.py +tests/models/unauthorized_error.py +tests/models/unexpanded_agent_to_agent_test.py +tests/models/unexpanded_agent_to_server_test.py +tests/models/unexpanded_bgp_test.py +tests/models/unexpanded_dns_sec_test.py +tests/models/unexpanded_dns_server_test.py +tests/models/unexpanded_dns_trace_test.py +tests/models/unexpanded_ftp_server_test.py +tests/models/unexpanded_http_server_test.py +tests/models/unexpanded_instant_test.py +tests/models/unexpanded_instant_test_links.py +tests/models/unexpanded_instant_test_links_self.py +tests/models/unexpanded_page_load_test.py +tests/models/unexpanded_sip_server_test.py +tests/models/unexpanded_test.py +tests/models/unexpanded_voice_test.py +tests/models/unexpanded_web_transaction_test.py +tests/models/update_agent_to_agent_test.py +tests/models/update_agent_to_server_test.py +tests/models/update_bgp_test.py +tests/models/update_bgp_test_request.py +tests/models/update_dns_sec_test.py +tests/models/update_dns_server_test.py +tests/models/update_dns_trace_test.py +tests/models/update_ftp_server_test.py +tests/models/update_http_server_test.py +tests/models/update_page_load_test.py +tests/models/update_sip_server_test.py +tests/models/update_sip_server_test1.py +tests/models/update_voice_test.py +tests/models/update_web_transaction_test.py +tests/models/validation_error.py +tests/models/validation_error_all_of_errors.py +tests/models/voice_instant_test.py +tests/models/voice_properties.py +tests/models/voice_test.py +tests/models/voice_tests.py +tests/models/web_transaction_instant_test.py +tests/models/web_transaction_properties.py +tests/models/web_transaction_test.py +tests/models/web_transaction_tests.py +tests/py.typed +tests/rest.py diff --git a/tests/.openapi-generator/VERSION b/tests/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/tests/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 00000000..d8353335 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,333 @@ +# tests +This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import tests +``` + +### 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 tests +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToAgentApi(api_client) + update_agent_to_agent_test = tests.UpdateAgentToAgentTest() # UpdateAgentToAgentTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create Agent to Agent test + api_response = api_instance.create_agent_to_agent_test(update_agent_to_agent_test, aid=aid, expand=expand) + print("The response of AgentToAgentApi->create_agent_to_agent_test:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AgentToAgentApi->create_agent_to_agent_test: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AgentToAgentApi* | [**create_agent_to_agent_test**](docs/AgentToAgentApi.md#create_agent_to_agent_test) | **POST** /v7/tests/agent-to-agent | Create Agent to Agent test +*AgentToAgentApi* | [**delete_agent_to_agent_test**](docs/AgentToAgentApi.md#delete_agent_to_agent_test) | **DELETE** /v7/tests/agent-to-agent/{testId} | Delete Agent to Agent test +*AgentToAgentApi* | [**get_agent_to_agent_test**](docs/AgentToAgentApi.md#get_agent_to_agent_test) | **GET** /v7/tests/agent-to-agent/{testId} | Get Agent to Agent test +*AgentToAgentApi* | [**get_agent_to_agent_tests**](docs/AgentToAgentApi.md#get_agent_to_agent_tests) | **GET** /v7/tests/agent-to-agent | List Agent to Agent tests +*AgentToAgentApi* | [**update_agent_to_agent_test**](docs/AgentToAgentApi.md#update_agent_to_agent_test) | **PUT** /v7/tests/agent-to-agent/{testId} | Update Agent to Agent test +*AgentToServerApi* | [**create_agent_to_server_test**](docs/AgentToServerApi.md#create_agent_to_server_test) | **POST** /v7/tests/agent-to-server | Create Agent to Server test +*AgentToServerApi* | [**delete_agent_to_server_test**](docs/AgentToServerApi.md#delete_agent_to_server_test) | **DELETE** /v7/tests/agent-to-server/{testId} | Delete Agent to Server test +*AgentToServerApi* | [**get_agent_to_server_test**](docs/AgentToServerApi.md#get_agent_to_server_test) | **GET** /v7/tests/agent-to-server/{testId} | Get Agent to Server test +*AgentToServerApi* | [**get_agent_to_server_tests**](docs/AgentToServerApi.md#get_agent_to_server_tests) | **GET** /v7/tests/agent-to-server | List Agent to Server tests +*AgentToServerApi* | [**update_agent_to_server_test**](docs/AgentToServerApi.md#update_agent_to_server_test) | **PUT** /v7/tests/agent-to-server/{testId} | Update Agent to Server test +*AllTestTypesApi* | [**get_tests**](docs/AllTestTypesApi.md#get_tests) | **GET** /v7/tests | List configured tests +*BGPApi* | [**create_bgp_test**](docs/BGPApi.md#create_bgp_test) | **POST** /v7/tests/bgp | Create BGP test +*BGPApi* | [**delete_bgp_test**](docs/BGPApi.md#delete_bgp_test) | **DELETE** /v7/tests/bgp/{testId} | Delete BGP test +*BGPApi* | [**get_bgp_test**](docs/BGPApi.md#get_bgp_test) | **GET** /v7/tests/bgp/{testId} | Get BGP test +*BGPApi* | [**get_bgp_tests**](docs/BGPApi.md#get_bgp_tests) | **GET** /v7/tests/bgp | List BGP tests +*BGPApi* | [**update_bgp_test**](docs/BGPApi.md#update_bgp_test) | **PUT** /v7/tests/bgp/{testId} | Update BGP test +*DNSSECApi* | [**create_dns_sec_test**](docs/DNSSECApi.md#create_dns_sec_test) | **POST** /v7/tests/dnssec | Create DNSSEC test +*DNSSECApi* | [**delete_dns_sec_test**](docs/DNSSECApi.md#delete_dns_sec_test) | **DELETE** /v7/tests/dnssec/{testId} | Delete DNSSEC test +*DNSSECApi* | [**get_dns_sec_test**](docs/DNSSECApi.md#get_dns_sec_test) | **GET** /v7/tests/dnssec/{testId} | Get DNSSEC test +*DNSSECApi* | [**get_dns_sec_tests**](docs/DNSSECApi.md#get_dns_sec_tests) | **GET** /v7/tests/dnssec | List DNSSEC tests +*DNSSECApi* | [**update_dns_sec_test**](docs/DNSSECApi.md#update_dns_sec_test) | **PUT** /v7/tests/dnssec/{testId} | Update DNSSEC test +*DNSServerApi* | [**create_dns_server_test**](docs/DNSServerApi.md#create_dns_server_test) | **POST** /v7/tests/dns-server | Create DNS Server test +*DNSServerApi* | [**delete_dns_server_test**](docs/DNSServerApi.md#delete_dns_server_test) | **DELETE** /v7/tests/dns-server/{testId} | Delete DNS Server test +*DNSServerApi* | [**get_dns_server_test**](docs/DNSServerApi.md#get_dns_server_test) | **GET** /v7/tests/dns-server/{testId} | Get DNS Server test +*DNSServerApi* | [**get_dns_server_tests**](docs/DNSServerApi.md#get_dns_server_tests) | **GET** /v7/tests/dns-server | List DNS Server tests +*DNSServerApi* | [**update_dns_server_test**](docs/DNSServerApi.md#update_dns_server_test) | **PUT** /v7/tests/dns-server/{testId} | Update DNS Server test +*DNSTraceApi* | [**create_dns_trace_test**](docs/DNSTraceApi.md#create_dns_trace_test) | **POST** /v7/tests/dns-trace | Create DNS Trace test +*DNSTraceApi* | [**delete_dns_trace_test**](docs/DNSTraceApi.md#delete_dns_trace_test) | **DELETE** /v7/tests/dns-trace/{testId} | Delete DNS Trace test +*DNSTraceApi* | [**get_dns_trace_test**](docs/DNSTraceApi.md#get_dns_trace_test) | **GET** /v7/tests/dns-trace/{testId} | Get DNS Trace test +*DNSTraceApi* | [**get_dns_trace_tests**](docs/DNSTraceApi.md#get_dns_trace_tests) | **GET** /v7/tests/dns-trace | List DNS Trace tests +*DNSTraceApi* | [**update_dns_trace_test**](docs/DNSTraceApi.md#update_dns_trace_test) | **PUT** /v7/tests/dns-trace/{testId} | Update DNS Trace test +*FTPServerApi* | [**create_ftp_server_test**](docs/FTPServerApi.md#create_ftp_server_test) | **POST** /v7/tests/ftp-server | Create FTP Server test +*FTPServerApi* | [**delete_ftp_server_test**](docs/FTPServerApi.md#delete_ftp_server_test) | **DELETE** /v7/tests/ftp-server/{testId} | Delete FTP Server test +*FTPServerApi* | [**get_ftp_server_test**](docs/FTPServerApi.md#get_ftp_server_test) | **GET** /v7/tests/ftp-server/{testId} | Get FTP Server test +*FTPServerApi* | [**get_ftp_server_tests**](docs/FTPServerApi.md#get_ftp_server_tests) | **GET** /v7/tests/ftp-server | List FTP Server tests +*FTPServerApi* | [**update_ftp_server_test**](docs/FTPServerApi.md#update_ftp_server_test) | **PUT** /v7/tests/ftp-server/{testId} | Update FTP Server test +*HTTPServerApi* | [**create_http_server_test**](docs/HTTPServerApi.md#create_http_server_test) | **POST** /v7/tests/http-server | Create HTTP Server test +*HTTPServerApi* | [**delete_http_server_test**](docs/HTTPServerApi.md#delete_http_server_test) | **DELETE** /v7/tests/http-server/{testId} | Delete HTTP Server test +*HTTPServerApi* | [**get_http_server_test**](docs/HTTPServerApi.md#get_http_server_test) | **GET** /v7/tests/http-server/{testId} | Get HTTP Server test +*HTTPServerApi* | [**get_http_server_tests**](docs/HTTPServerApi.md#get_http_server_tests) | **GET** /v7/tests/http-server | List HTTP Server tests +*HTTPServerApi* | [**update_http_server_test**](docs/HTTPServerApi.md#update_http_server_test) | **PUT** /v7/tests/http-server/{testId} | Update HTTP Server test +*PageLoadApi* | [**create_page_load_test**](docs/PageLoadApi.md#create_page_load_test) | **POST** /v7/tests/page-load | Create Page Load test +*PageLoadApi* | [**delete_page_load_test**](docs/PageLoadApi.md#delete_page_load_test) | **DELETE** /v7/tests/page-load/{testId} | Delete Page Load test +*PageLoadApi* | [**get_page_load_test**](docs/PageLoadApi.md#get_page_load_test) | **GET** /v7/tests/page-load/{testId} | Get Page Load test +*PageLoadApi* | [**get_page_load_tests**](docs/PageLoadApi.md#get_page_load_tests) | **GET** /v7/tests/page-load | List Page Load tests +*PageLoadApi* | [**update_page_load_test**](docs/PageLoadApi.md#update_page_load_test) | **PUT** /v7/tests/page-load/{testId} | Update Page Load test +*PathVisualizationInterfaceGroupsApi* | [**create_path_vis_interface_groups**](docs/PathVisualizationInterfaceGroupsApi.md#create_path_vis_interface_groups) | **POST** /v7/network/path-vis/interface-groups | Create interface group for path visualization +*PathVisualizationInterfaceGroupsApi* | [**delete_path_vis_interface_group**](docs/PathVisualizationInterfaceGroupsApi.md#delete_path_vis_interface_group) | **DELETE** /v7/network/path-vis/interface-groups/{interfaceGroupId} | Delete interface group +*PathVisualizationInterfaceGroupsApi* | [**get_path_vis_interface_groups**](docs/PathVisualizationInterfaceGroupsApi.md#get_path_vis_interface_groups) | **GET** /v7/network/path-vis/interface-groups | List interface groups for path visualization +*PathVisualizationInterfaceGroupsApi* | [**update_path_vis_interface_group**](docs/PathVisualizationInterfaceGroupsApi.md#update_path_vis_interface_group) | **PUT** /v7/network/path-vis/interface-groups/{interfaceGroupId} | Update interface group +*SIPServerApi* | [**create_sip_server_test**](docs/SIPServerApi.md#create_sip_server_test) | **POST** /v7/tests/sip-server | Create SIP Server test +*SIPServerApi* | [**delete_sip_server_test**](docs/SIPServerApi.md#delete_sip_server_test) | **DELETE** /v7/tests/sip-server/{testId} | Delete SIP Server test +*SIPServerApi* | [**get_sip_server_test**](docs/SIPServerApi.md#get_sip_server_test) | **GET** /v7/tests/sip-server/{testId} | Get SIP Server test +*SIPServerApi* | [**get_sip_server_tests**](docs/SIPServerApi.md#get_sip_server_tests) | **GET** /v7/tests/sip-server | List SIP Server tests +*SIPServerApi* | [**update_sip_server_test**](docs/SIPServerApi.md#update_sip_server_test) | **PUT** /v7/tests/sip-server/{testId} | Update SIP Server test +*VoiceApi* | [**create_voice_test**](docs/VoiceApi.md#create_voice_test) | **POST** /v7/tests/voice | Create Voice test +*VoiceApi* | [**delete_voice_test**](docs/VoiceApi.md#delete_voice_test) | **DELETE** /v7/tests/voice/{testId} | Delete Voice test +*VoiceApi* | [**get_voice_test**](docs/VoiceApi.md#get_voice_test) | **GET** /v7/tests/voice/{testId} | Get Voice test +*VoiceApi* | [**get_voice_tests**](docs/VoiceApi.md#get_voice_tests) | **GET** /v7/tests/voice | List Voice tests +*VoiceApi* | [**update_voice_test**](docs/VoiceApi.md#update_voice_test) | **PUT** /v7/tests/voice/{testId} | Update Voice test +*WebTransactionApi* | [**create_web_transactions_test**](docs/WebTransactionApi.md#create_web_transactions_test) | **POST** /v7/tests/web-transactions | Create Web Transactions test +*WebTransactionApi* | [**delete_web_transactions_test**](docs/WebTransactionApi.md#delete_web_transactions_test) | **DELETE** /v7/tests/web-transactions/{testId} | Delete Web Transactions test +*WebTransactionApi* | [**get_web_transactions_test**](docs/WebTransactionApi.md#get_web_transactions_test) | **GET** /v7/tests/web-transactions/{testId} | Get Web Transactions test +*WebTransactionApi* | [**get_web_transactions_tests**](docs/WebTransactionApi.md#get_web_transactions_tests) | **GET** /v7/tests/web-transactions | List Web Transactions tests +*WebTransactionApi* | [**update_web_transactions_test**](docs/WebTransactionApi.md#update_web_transactions_test) | **PUT** /v7/tests/web-transactions/{testId} | Update Web Transactions test + + +## Documentation For Models + + - [Agent](docs/Agent.md) + - [AgentBase](docs/AgentBase.md) + - [AgentToAgentInstantTest](docs/AgentToAgentInstantTest.md) + - [AgentToAgentProperties](docs/AgentToAgentProperties.md) + - [AgentToAgentTest](docs/AgentToAgentTest.md) + - [AgentToAgentTestProtocol](docs/AgentToAgentTestProtocol.md) + - [AgentToAgentTests](docs/AgentToAgentTests.md) + - [AgentToServerInstantTest](docs/AgentToServerInstantTest.md) + - [AgentToServerProperties](docs/AgentToServerProperties.md) + - [AgentToServerTest](docs/AgentToServerTest.md) + - [AgentToServerTests](docs/AgentToServerTests.md) + - [AlertDirection](docs/AlertDirection.md) + - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) + - [AlertRule](docs/AlertRule.md) + - [AlertType](docs/AlertType.md) + - [BaseBgpTest](docs/BaseBgpTest.md) + - [BaseRequest](docs/BaseRequest.md) + - [BaseTest](docs/BaseTest.md) + - [BgpTest](docs/BgpTest.md) + - [BgpTests](docs/BgpTests.md) + - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) + - [DnsQueryClass](docs/DnsQueryClass.md) + - [DnsSecInstantTest](docs/DnsSecInstantTest.md) + - [DnsSecProperties](docs/DnsSecProperties.md) + - [DnsSecTest](docs/DnsSecTest.md) + - [DnsSecTests](docs/DnsSecTests.md) + - [DnsServerInstantTest](docs/DnsServerInstantTest.md) + - [DnsServerProperties](docs/DnsServerProperties.md) + - [DnsServerTest](docs/DnsServerTest.md) + - [DnsServerTests](docs/DnsServerTests.md) + - [DnsServersRequest](docs/DnsServersRequest.md) + - [DnsTraceInstantTest](docs/DnsTraceInstantTest.md) + - [DnsTraceProperties](docs/DnsTraceProperties.md) + - [DnsTraceTest](docs/DnsTraceTest.md) + - [DnsTraceTests](docs/DnsTraceTests.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [FtpServerInstantTest](docs/FtpServerInstantTest.md) + - [FtpServerProperties](docs/FtpServerProperties.md) + - [FtpServerRequestType](docs/FtpServerRequestType.md) + - [FtpServerTest](docs/FtpServerTest.md) + - [FtpServerTests](docs/FtpServerTests.md) + - [GetAgentToAgentTests200Response](docs/GetAgentToAgentTests200Response.md) + - [GetAgentToServerTests200Response](docs/GetAgentToServerTests200Response.md) + - [GetBgpTests200Response](docs/GetBgpTests200Response.md) + - [GetDNSServerTests200Response](docs/GetDNSServerTests200Response.md) + - [GetDnsSecTests200Response](docs/GetDnsSecTests200Response.md) + - [GetDnsTraceTests200Response](docs/GetDnsTraceTests200Response.md) + - [GetFtpServerTests200Response](docs/GetFtpServerTests200Response.md) + - [GetHttpServerTests200Response](docs/GetHttpServerTests200Response.md) + - [GetPageLoadTests200Response](docs/GetPageLoadTests200Response.md) + - [GetPathVisInterfaceGroups200Response](docs/GetPathVisInterfaceGroups200Response.md) + - [GetSipServerTests200Response](docs/GetSipServerTests200Response.md) + - [GetTests200Response](docs/GetTests200Response.md) + - [GetVoiceTests200Response](docs/GetVoiceTests200Response.md) + - [GetWebTransactionsTests200Response](docs/GetWebTransactionsTests200Response.md) + - [HttpServerInstantTest](docs/HttpServerInstantTest.md) + - [HttpServerProperties](docs/HttpServerProperties.md) + - [HttpServerTest](docs/HttpServerTest.md) + - [HttpServerTests](docs/HttpServerTests.md) + - [InstantTest](docs/InstantTest.md) + - [InterfaceGroup](docs/InterfaceGroup.md) + - [InterfaceGroups](docs/InterfaceGroups.md) + - [Link](docs/Link.md) + - [Monitor](docs/Monitor.md) + - [MonitorType](docs/MonitorType.md) + - [MonitorsRequest](docs/MonitorsRequest.md) + - [PageLoadInstantTest](docs/PageLoadInstantTest.md) + - [PageLoadProperties](docs/PageLoadProperties.md) + - [PageLoadTest](docs/PageLoadTest.md) + - [PageLoadTests](docs/PageLoadTests.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [Severity](docs/Severity.md) + - [SimpleAgent](docs/SimpleAgent.md) + - [SimpleTest](docs/SimpleTest.md) + - [SipServerInstantTest](docs/SipServerInstantTest.md) + - [SipServerInstantTestRequest](docs/SipServerInstantTestRequest.md) + - [SipServerInstantTestResponse](docs/SipServerInstantTestResponse.md) + - [SipServerProperties](docs/SipServerProperties.md) + - [SipServerTest](docs/SipServerTest.md) + - [SipServerTests](docs/SipServerTests.md) + - [SipTestProtocol](docs/SipTestProtocol.md) + - [TestAuthType](docs/TestAuthType.md) + - [TestCustomHeaders](docs/TestCustomHeaders.md) + - [TestDirection](docs/TestDirection.md) + - [TestDnsServer](docs/TestDnsServer.md) + - [TestDnsTransportProtocol](docs/TestDnsTransportProtocol.md) + - [TestDscpId](docs/TestDscpId.md) + - [TestHttpInterval](docs/TestHttpInterval.md) + - [TestInterval](docs/TestInterval.md) + - [TestIpv6Policy](docs/TestIpv6Policy.md) + - [TestLabelsInner](docs/TestLabelsInner.md) + - [TestMonitorsProperties](docs/TestMonitorsProperties.md) + - [TestPageLoadingStrategy](docs/TestPageLoadingStrategy.md) + - [TestPathTraceMode](docs/TestPathTraceMode.md) + - [TestProbeMode](docs/TestProbeMode.md) + - [TestProtocol](docs/TestProtocol.md) + - [TestRequest](docs/TestRequest.md) + - [TestRequestAllOfAgents](docs/TestRequestAllOfAgents.md) + - [TestSharedAccountsInner](docs/TestSharedAccountsInner.md) + - [TestSipCredentials](docs/TestSipCredentials.md) + - [TestSslVersionId](docs/TestSslVersionId.md) + - [TestSubInterval](docs/TestSubInterval.md) + - [TestType](docs/TestType.md) + - [Tests](docs/Tests.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UnexpandedAgentToAgentTest](docs/UnexpandedAgentToAgentTest.md) + - [UnexpandedAgentToServerTest](docs/UnexpandedAgentToServerTest.md) + - [UnexpandedBgpTest](docs/UnexpandedBgpTest.md) + - [UnexpandedDnsSecTest](docs/UnexpandedDnsSecTest.md) + - [UnexpandedDnsServerTest](docs/UnexpandedDnsServerTest.md) + - [UnexpandedDnsTraceTest](docs/UnexpandedDnsTraceTest.md) + - [UnexpandedFtpServerTest](docs/UnexpandedFtpServerTest.md) + - [UnexpandedHttpServerTest](docs/UnexpandedHttpServerTest.md) + - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) + - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) + - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) + - [UnexpandedPageLoadTest](docs/UnexpandedPageLoadTest.md) + - [UnexpandedSipServerTest](docs/UnexpandedSipServerTest.md) + - [UnexpandedTest](docs/UnexpandedTest.md) + - [UnexpandedVoiceTest](docs/UnexpandedVoiceTest.md) + - [UnexpandedWebTransactionTest](docs/UnexpandedWebTransactionTest.md) + - [UpdateAgentToAgentTest](docs/UpdateAgentToAgentTest.md) + - [UpdateAgentToServerTest](docs/UpdateAgentToServerTest.md) + - [UpdateBgpTest](docs/UpdateBgpTest.md) + - [UpdateBgpTestRequest](docs/UpdateBgpTestRequest.md) + - [UpdateDnsSecTest](docs/UpdateDnsSecTest.md) + - [UpdateDnsServerTest](docs/UpdateDnsServerTest.md) + - [UpdateDnsTraceTest](docs/UpdateDnsTraceTest.md) + - [UpdateFtpServerTest](docs/UpdateFtpServerTest.md) + - [UpdateHttpServerTest](docs/UpdateHttpServerTest.md) + - [UpdatePageLoadTest](docs/UpdatePageLoadTest.md) + - [UpdateSipServerTest](docs/UpdateSipServerTest.md) + - [UpdateSipServerTest1](docs/UpdateSipServerTest1.md) + - [UpdateVoiceTest](docs/UpdateVoiceTest.md) + - [UpdateWebTransactionTest](docs/UpdateWebTransactionTest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + - [VoiceInstantTest](docs/VoiceInstantTest.md) + - [VoiceProperties](docs/VoiceProperties.md) + - [VoiceTest](docs/VoiceTest.md) + - [VoiceTests](docs/VoiceTests.md) + - [WebTransactionInstantTest](docs/WebTransactionInstantTest.md) + - [WebTransactionProperties](docs/WebTransactionProperties.md) + - [WebTransactionTest](docs/WebTransactionTest.md) + - [WebTransactionTests](docs/WebTransactionTests.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/tests/docs/Agent.md b/tests/docs/Agent.md new file mode 100644 index 00000000..75fc4bbc --- /dev/null +++ b/tests/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 tests.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/tests/docs/AgentBase.md b/tests/docs/AgentBase.md new file mode 100644 index 00000000..e0729dd9 --- /dev/null +++ b/tests/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 tests.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/tests/docs/AgentToAgentApi.md b/tests/docs/AgentToAgentApi.md new file mode 100644 index 00000000..92a47622 --- /dev/null +++ b/tests/docs/AgentToAgentApi.md @@ -0,0 +1,458 @@ +# tests.AgentToAgentApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_agent_to_agent_test**](AgentToAgentApi.md#create_agent_to_agent_test) | **POST** /v7/tests/agent-to-agent | Create Agent to Agent test +[**delete_agent_to_agent_test**](AgentToAgentApi.md#delete_agent_to_agent_test) | **DELETE** /v7/tests/agent-to-agent/{testId} | Delete Agent to Agent test +[**get_agent_to_agent_test**](AgentToAgentApi.md#get_agent_to_agent_test) | **GET** /v7/tests/agent-to-agent/{testId} | Get Agent to Agent test +[**get_agent_to_agent_tests**](AgentToAgentApi.md#get_agent_to_agent_tests) | **GET** /v7/tests/agent-to-agent | List Agent to Agent tests +[**update_agent_to_agent_test**](AgentToAgentApi.md#update_agent_to_agent_test) | **PUT** /v7/tests/agent-to-agent/{testId} | Update Agent to Agent test + + +# **create_agent_to_agent_test** +> AgentToAgentTest create_agent_to_agent_test(update_agent_to_agent_test, aid=aid, expand=expand) + +Create Agent to Agent test + +Creates a new Agent to Agent test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.agent_to_agent_test import AgentToAgentTest +from tests.models.expand import Expand +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToAgentApi(api_client) + update_agent_to_agent_test = tests.UpdateAgentToAgentTest() # UpdateAgentToAgentTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create Agent to Agent test + api_response = api_instance.create_agent_to_agent_test(update_agent_to_agent_test, aid=aid, expand=expand) + print("The response of AgentToAgentApi->create_agent_to_agent_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToAgentApi->create_agent_to_agent_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_agent_to_agent_test** | [**UpdateAgentToAgentTest**](UpdateAgentToAgentTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**AgentToAgentTest**](AgentToAgentTest.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 | - | +**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) + +# **delete_agent_to_agent_test** +> delete_agent_to_agent_test(test_id, aid=aid) + +Delete Agent to Agent test + +Deletes the specified Agent to Agent test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToAgentApi(api_client) + test_id = '281474976710706' # str | ID of the 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 Agent test + api_instance.delete_agent_to_agent_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling AgentToAgentApi->delete_agent_to_agent_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_agent_test** +> AgentToAgentTest get_agent_to_agent_test(test_id, aid=aid, expand=expand) + +Get Agent to Agent test + +Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.agent_to_agent_test import AgentToAgentTest +from tests.models.expand import Expand +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToAgentApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get Agent to Agent test + api_response = api_instance.get_agent_to_agent_test(test_id, aid=aid, expand=expand) + print("The response of AgentToAgentApi->get_agent_to_agent_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToAgentApi->get_agent_to_agent_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**AgentToAgentTest**](AgentToAgentTest.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_agent_to_agent_tests** +> GetAgentToAgentTests200Response get_agent_to_agent_tests(aid=aid) + +List Agent to Agent tests + +Returns a list of Agent to Agent tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToAgentApi(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 Agent tests + api_response = api_instance.get_agent_to_agent_tests(aid=aid) + print("The response of AgentToAgentApi->get_agent_to_agent_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToAgentApi->get_agent_to_agent_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 + +[**GetAgentToAgentTests200Response**](GetAgentToAgentTests200Response.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) + +# **update_agent_to_agent_test** +> AgentToAgentTest update_agent_to_agent_test(test_id, update_agent_to_agent_test, aid=aid, expand=expand) + +Update Agent to Agent test + +Updates a Agent to Agent test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.agent_to_agent_test import AgentToAgentTest +from tests.models.expand import Expand +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToAgentApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_agent_to_agent_test = tests.UpdateAgentToAgentTest() # UpdateAgentToAgentTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update Agent to Agent test + api_response = api_instance.update_agent_to_agent_test(test_id, update_agent_to_agent_test, aid=aid, expand=expand) + print("The response of AgentToAgentApi->update_agent_to_agent_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToAgentApi->update_agent_to_agent_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_agent_to_agent_test** | [**UpdateAgentToAgentTest**](UpdateAgentToAgentTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**AgentToAgentTest**](AgentToAgentTest.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 | - | +**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) + diff --git a/tests/docs/AgentToAgentInstantTest.md b/tests/docs/AgentToAgentInstantTest.md new file mode 100644 index 00000000..558725c9 --- /dev/null +++ b/tests/docs/AgentToAgentInstantTest.md @@ -0,0 +1,55 @@ +# AgentToAgentInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**mss** | **int** | Maximum segment size, in bytes. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] +**target_agent_id** | **str** | `agentId` of the target agent for the test. | +**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] +**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] +**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToAgentInstantTest from a JSON string +agent_to_agent_instant_test_instance = AgentToAgentInstantTest.from_json(json) +# print the JSON string representation of the object +print(AgentToAgentInstantTest.to_json()) + +# convert the object into a dict +agent_to_agent_instant_test_dict = agent_to_agent_instant_test_instance.to_dict() +# create an instance of AgentToAgentInstantTest from a dict +agent_to_agent_instant_test_from_dict = AgentToAgentInstantTest.from_dict(agent_to_agent_instant_test_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/tests/docs/AgentToAgentProperties.md b/tests/docs/AgentToAgentProperties.md new file mode 100644 index 00000000..7a95237f --- /dev/null +++ b/tests/docs/AgentToAgentProperties.md @@ -0,0 +1,42 @@ +# AgentToAgentProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**mss** | **int** | Maximum segment size, in bytes. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] +**target_agent_id** | **str** | `agentId` of the target agent for the test. | +**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] +**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] +**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.agent_to_agent_properties import AgentToAgentProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToAgentProperties from a JSON string +agent_to_agent_properties_instance = AgentToAgentProperties.from_json(json) +# print the JSON string representation of the object +print(AgentToAgentProperties.to_json()) + +# convert the object into a dict +agent_to_agent_properties_dict = agent_to_agent_properties_instance.to_dict() +# create an instance of AgentToAgentProperties from a dict +agent_to_agent_properties_from_dict = AgentToAgentProperties.from_dict(agent_to_agent_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/AgentToAgentTest.md b/tests/docs/AgentToAgentTest.md similarity index 90% rename from tests_api/docs/AgentToAgentTest.md rename to tests/docs/AgentToAgentTest.md index 8a5ed2a6..c2c7721f 100644 --- a/tests_api/docs/AgentToAgentTest.md +++ b/tests/docs/AgentToAgentTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **direction** | [**TestDirection**](TestDirection.md) | | [optional] **dscp** | **str** | DSCP label. | [optional] [readonly] **dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] @@ -35,25 +35,27 @@ Name | Type | Description | Notes **throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] **throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.agent_to_agent_test import AgentToAgentTest +from tests.models.agent_to_agent_test import AgentToAgentTest # TODO update the JSON string below json = "{}" # create an instance of AgentToAgentTest from a JSON string agent_to_agent_test_instance = AgentToAgentTest.from_json(json) # print the JSON string representation of the object -print AgentToAgentTest.to_json() +print(AgentToAgentTest.to_json()) # convert the object into a dict agent_to_agent_test_dict = agent_to_agent_test_instance.to_dict() # create an instance of AgentToAgentTest from a dict -agent_to_agent_test_form_dict = agent_to_agent_test.from_dict(agent_to_agent_test_dict) +agent_to_agent_test_from_dict = AgentToAgentTest.from_dict(agent_to_agent_test_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/tests/docs/AgentToAgentTestProtocol.md b/tests/docs/AgentToAgentTestProtocol.md new file mode 100644 index 00000000..0b65947f --- /dev/null +++ b/tests/docs/AgentToAgentTestProtocol.md @@ -0,0 +1,11 @@ +# AgentToAgentTestProtocol + + +## 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/tests/docs/AgentToAgentTests.md b/tests/docs/AgentToAgentTests.md new file mode 100644 index 00000000..84c45165 --- /dev/null +++ b/tests/docs/AgentToAgentTests.md @@ -0,0 +1,29 @@ +# AgentToAgentTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedAgentToAgentTest]**](UnexpandedAgentToAgentTest.md) | | [optional] + +## Example + +```python +from tests.models.agent_to_agent_tests import AgentToAgentTests + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToAgentTests from a JSON string +agent_to_agent_tests_instance = AgentToAgentTests.from_json(json) +# print the JSON string representation of the object +print(AgentToAgentTests.to_json()) + +# convert the object into a dict +agent_to_agent_tests_dict = agent_to_agent_tests_instance.to_dict() +# create an instance of AgentToAgentTests from a dict +agent_to_agent_tests_from_dict = AgentToAgentTests.from_dict(agent_to_agent_tests_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/tests/docs/AgentToServerApi.md b/tests/docs/AgentToServerApi.md new file mode 100644 index 00000000..db5e302c --- /dev/null +++ b/tests/docs/AgentToServerApi.md @@ -0,0 +1,458 @@ +# tests.AgentToServerApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_agent_to_server_test**](AgentToServerApi.md#create_agent_to_server_test) | **POST** /v7/tests/agent-to-server | Create Agent to Server test +[**delete_agent_to_server_test**](AgentToServerApi.md#delete_agent_to_server_test) | **DELETE** /v7/tests/agent-to-server/{testId} | Delete Agent to Server test +[**get_agent_to_server_test**](AgentToServerApi.md#get_agent_to_server_test) | **GET** /v7/tests/agent-to-server/{testId} | Get Agent to Server test +[**get_agent_to_server_tests**](AgentToServerApi.md#get_agent_to_server_tests) | **GET** /v7/tests/agent-to-server | List Agent to Server tests +[**update_agent_to_server_test**](AgentToServerApi.md#update_agent_to_server_test) | **PUT** /v7/tests/agent-to-server/{testId} | Update Agent to Server test + + +# **create_agent_to_server_test** +> AgentToServerTest create_agent_to_server_test(update_agent_to_server_test, aid=aid, expand=expand) + +Create Agent to Server test + +Creates a new Agent to Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.agent_to_server_test import AgentToServerTest +from tests.models.expand import Expand +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToServerApi(api_client) + update_agent_to_server_test = tests.UpdateAgentToServerTest() # UpdateAgentToServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create Agent to Server test + api_response = api_instance.create_agent_to_server_test(update_agent_to_server_test, aid=aid, expand=expand) + print("The response of AgentToServerApi->create_agent_to_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToServerApi->create_agent_to_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_agent_to_server_test** | [**UpdateAgentToServerTest**](UpdateAgentToServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**AgentToServerTest**](AgentToServerTest.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 | - | +**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) + +# **delete_agent_to_server_test** +> delete_agent_to_server_test(test_id, aid=aid) + +Delete Agent to Server test + +Deletes an Agent to Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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 test + api_instance.delete_agent_to_server_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling AgentToServerApi->delete_agent_to_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_test** +> AgentToServerTest get_agent_to_server_test(test_id, aid=aid, expand=expand) + +Get Agent to Server test + +Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.agent_to_server_test import AgentToServerTest +from tests.models.expand import Expand +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get Agent to Server test + api_response = api_instance.get_agent_to_server_test(test_id, aid=aid, expand=expand) + print("The response of AgentToServerApi->get_agent_to_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToServerApi->get_agent_to_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**AgentToServerTest**](AgentToServerTest.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_agent_to_server_tests** +> GetAgentToServerTests200Response get_agent_to_server_tests(aid=aid) + +List Agent to Server tests + +Returns a list of Agent to Server tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToServerApi(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 tests + api_response = api_instance.get_agent_to_server_tests(aid=aid) + print("The response of AgentToServerApi->get_agent_to_server_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToServerApi->get_agent_to_server_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 + +[**GetAgentToServerTests200Response**](GetAgentToServerTests200Response.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) + +# **update_agent_to_server_test** +> AgentToServerTest update_agent_to_server_test(test_id, update_agent_to_server_test, aid=aid, expand=expand) + +Update Agent to Server test + +Updates an Agent to Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.agent_to_server_test import AgentToServerTest +from tests.models.expand import Expand +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.AgentToServerApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_agent_to_server_test = tests.UpdateAgentToServerTest() # UpdateAgentToServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update Agent to Server test + api_response = api_instance.update_agent_to_server_test(test_id, update_agent_to_server_test, aid=aid, expand=expand) + print("The response of AgentToServerApi->update_agent_to_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentToServerApi->update_agent_to_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_agent_to_server_test** | [**UpdateAgentToServerTest**](UpdateAgentToServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**AgentToServerTest**](AgentToServerTest.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 | - | +**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) + diff --git a/tests/docs/AgentToServerInstantTest.md b/tests/docs/AgentToServerInstantTest.md new file mode 100644 index 00000000..ce869da3 --- /dev/null +++ b/tests/docs/AgentToServerInstantTest.md @@ -0,0 +1,57 @@ +# AgentToServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] +**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] +**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**server** | **str** | Target name or IP address. | +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] +**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.agent_to_server_instant_test import AgentToServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToServerInstantTest from a JSON string +agent_to_server_instant_test_instance = AgentToServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(AgentToServerInstantTest.to_json()) + +# convert the object into a dict +agent_to_server_instant_test_dict = agent_to_server_instant_test_instance.to_dict() +# create an instance of AgentToServerInstantTest from a dict +agent_to_server_instant_test_from_dict = AgentToServerInstantTest.from_dict(agent_to_server_instant_test_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/tests/docs/AgentToServerProperties.md b/tests/docs/AgentToServerProperties.md new file mode 100644 index 00000000..28edc17b --- /dev/null +++ b/tests/docs/AgentToServerProperties.md @@ -0,0 +1,44 @@ +# AgentToServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] +**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] +**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**server** | **str** | Target name or IP address. | +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] +**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.agent_to_server_properties import AgentToServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToServerProperties from a JSON string +agent_to_server_properties_instance = AgentToServerProperties.from_json(json) +# print the JSON string representation of the object +print(AgentToServerProperties.to_json()) + +# convert the object into a dict +agent_to_server_properties_dict = agent_to_server_properties_instance.to_dict() +# create an instance of AgentToServerProperties from a dict +agent_to_server_properties_from_dict = AgentToServerProperties.from_dict(agent_to_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/AgentToServerTest.md b/tests/docs/AgentToServerTest.md similarity index 92% rename from tests_api/docs/AgentToServerTest.md rename to tests/docs/AgentToServerTest.md index db8ff552..a115ab29 100644 --- a/tests_api/docs/AgentToServerTest.md +++ b/tests/docs/AgentToServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] **fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] @@ -37,25 +37,27 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] **network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.agent_to_server_test import AgentToServerTest +from tests.models.agent_to_server_test import AgentToServerTest # TODO update the JSON string below json = "{}" # create an instance of AgentToServerTest from a JSON string agent_to_server_test_instance = AgentToServerTest.from_json(json) # print the JSON string representation of the object -print AgentToServerTest.to_json() +print(AgentToServerTest.to_json()) # convert the object into a dict agent_to_server_test_dict = agent_to_server_test_instance.to_dict() # create an instance of AgentToServerTest from a dict -agent_to_server_test_form_dict = agent_to_server_test.from_dict(agent_to_server_test_dict) +agent_to_server_test_from_dict = AgentToServerTest.from_dict(agent_to_server_test_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/tests/docs/AgentToServerTests.md b/tests/docs/AgentToServerTests.md new file mode 100644 index 00000000..2837117b --- /dev/null +++ b/tests/docs/AgentToServerTests.md @@ -0,0 +1,29 @@ +# AgentToServerTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedAgentToServerTest]**](UnexpandedAgentToServerTest.md) | | [optional] + +## Example + +```python +from tests.models.agent_to_server_tests import AgentToServerTests + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentToServerTests from a JSON string +agent_to_server_tests_instance = AgentToServerTests.from_json(json) +# print the JSON string representation of the object +print(AgentToServerTests.to_json()) + +# convert the object into a dict +agent_to_server_tests_dict = agent_to_server_tests_instance.to_dict() +# create an instance of AgentToServerTests from a dict +agent_to_server_tests_from_dict = AgentToServerTests.from_dict(agent_to_server_tests_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/tests/docs/AlertDirection.md b/tests/docs/AlertDirection.md new file mode 100644 index 00000000..8902e9bf --- /dev/null +++ b/tests/docs/AlertDirection.md @@ -0,0 +1,12 @@ +# AlertDirection + +Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + +## 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/tests/docs/AlertRoundsViolationMode.md b/tests/docs/AlertRoundsViolationMode.md new file mode 100644 index 00000000..efe78921 --- /dev/null +++ b/tests/docs/AlertRoundsViolationMode.md @@ -0,0 +1,12 @@ +# AlertRoundsViolationMode + +`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + +## 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/tests/docs/AlertRule.md b/tests/docs/AlertRule.md new file mode 100644 index 00000000..729179d4 --- /dev/null +++ b/tests/docs/AlertRule.md @@ -0,0 +1,40 @@ +# AlertRule + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] +**rule_name** | **str** | Name of the alert rule | [optional] [readonly] +**expression** | **str** | String expression of alert rule | [optional] [readonly] +**direction** | [**AlertDirection**](AlertDirection.md) | | [optional] +**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] +**alert_type** | [**AlertType**](AlertType.md) | | [optional] +**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] +**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] +**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] +**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] +**severity** | [**Severity**](Severity.md) | | [optional] + +## Example + +```python +from tests.models.alert_rule import AlertRule + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertRule from a JSON string +alert_rule_instance = AlertRule.from_json(json) +# print the JSON string representation of the object +print(AlertRule.to_json()) + +# convert the object into a dict +alert_rule_dict = alert_rule_instance.to_dict() +# create an instance of AlertRule from a dict +alert_rule_from_dict = AlertRule.from_dict(alert_rule_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/tests/docs/AlertType.md b/tests/docs/AlertType.md new file mode 100644 index 00000000..cde41743 --- /dev/null +++ b/tests/docs/AlertType.md @@ -0,0 +1,12 @@ +# AlertType + +Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + +## 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/tests_api/docs/AllTestTypesApi.md b/tests/docs/AllTestTypesApi.md similarity index 87% rename from tests_api/docs/AllTestTypesApi.md rename to tests/docs/AllTestTypesApi.md index e10dcaeb..dc33698c 100644 --- a/tests_api/docs/AllTestTypesApi.md +++ b/tests/docs/AllTestTypesApi.md @@ -1,4 +1,4 @@ -# tests_api.AllTestTypesApi +# tests.AllTestTypesApi All URIs are relative to *https://api.thousandeyes.com* @@ -17,17 +17,16 @@ Returns configured tests and saved events. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.get_tests200_response import GetTests200Response -from tests_api.rest import ApiException +import tests +from tests.models.get_tests200_response import GetTests200Response +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -37,15 +36,15 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.AllTestTypesApi(api_client) - aid = '2067' # 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) + api_instance = tests.AllTestTypesApi(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 configured tests @@ -60,6 +59,7 @@ with tests_api.ApiClient(configuration) as api_client: ### 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] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/tests_api/docs/BGPApi.md b/tests/docs/BGPApi.md similarity index 80% rename from tests_api/docs/BGPApi.md rename to tests/docs/BGPApi.md index 11b8b7fe..48f3e102 100644 --- a/tests_api/docs/BGPApi.md +++ b/tests/docs/BGPApi.md @@ -1,4 +1,4 @@ -# tests_api.BGPApi +# tests.BGPApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,19 +21,18 @@ Creates a new BGP test. This method requires Account Admin permissions. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.bgp_test import BgpTest -from tests_api.models.expand import Expand -from tests_api.models.update_bgp_test import UpdateBgpTest -from tests_api.rest import ApiException +import tests +from tests.models.bgp_test import BgpTest +from tests.models.expand import Expand +from tests.models.update_bgp_test import UpdateBgpTest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,17 +42,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.BGPApi(api_client) - update_bgp_test = tests_api.UpdateBgpTest() # UpdateBgpTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + api_instance = tests.BGPApi(api_client) + update_bgp_test = tests.UpdateBgpTest() # UpdateBgpTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Create BGP test @@ -68,6 +67,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **update_bgp_test** | [**UpdateBgpTest**](UpdateBgpTest.md)| | @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -112,16 +113,15 @@ Deletes a BGP test. This method requires Account Admin permissions. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.rest import ApiException +import tests +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -131,16 +131,16 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.BGPApi(api_client) + api_instance = tests.BGPApi(api_client) test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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) + 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 BGP test @@ -153,6 +153,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -169,9 +170,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -186,7 +188,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_bgp_test** -> GetBgpTest200Response get_bgp_test(test_id, aid=aid, expand=expand) +> BgpTest get_bgp_test(test_id, aid=aid, expand=expand) Get BGP test @@ -195,18 +197,17 @@ Returns details for a BGP test, including name, intervals, targets, alert rules ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response -from tests_api.rest import ApiException +import tests +from tests.models.bgp_test import BgpTest +from tests.models.expand import Expand +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -216,17 +217,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.BGPApi(api_client) + api_instance = tests.BGPApi(api_client) test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Get BGP test @@ -241,6 +242,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -249,7 +251,7 @@ Name | Type | Description | Notes ### Return type -[**GetBgpTest200Response**](GetBgpTest200Response.md) +[**BgpTest**](BgpTest.md) ### Authorization @@ -261,6 +263,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -284,17 +287,16 @@ Returns a list of BGP tests and saved events. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.get_bgp_tests200_response import GetBgpTests200Response -from tests_api.rest import ApiException +import tests +from tests.models.get_bgp_tests200_response import GetBgpTests200Response +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -304,15 +306,15 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.BGPApi(api_client) - aid = '2067' # 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) + api_instance = tests.BGPApi(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 tests @@ -327,6 +329,7 @@ with tests_api.ApiClient(configuration) as api_client: ### 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] @@ -345,6 +348,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -359,7 +363,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_bgp_test** -> GetBgpTest200Response update_bgp_test(test_id, update_bgp_test, aid=aid, expand=expand) +> BgpTest update_bgp_test(test_id, update_bgp_test_request, aid=aid, expand=expand) Update BGP test @@ -368,19 +372,18 @@ Updates a BGP test. This method requires Account Admin permissions. The target t ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response -from tests_api.models.update_bgp_test import UpdateBgpTest -from tests_api.rest import ApiException +import tests +from tests.models.bgp_test import BgpTest +from tests.models.expand import Expand +from tests.models.update_bgp_test_request import UpdateBgpTestRequest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -390,22 +393,22 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.BGPApi(api_client) + api_instance = tests.BGPApi(api_client) test_id = '281474976710706' # str | ID of the test - update_bgp_test = tests_api.UpdateBgpTest() # UpdateBgpTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + update_bgp_test_request = tests.UpdateBgpTestRequest() # UpdateBgpTestRequest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Update BGP test - api_response = api_instance.update_bgp_test(test_id, update_bgp_test, aid=aid, expand=expand) + api_response = api_instance.update_bgp_test(test_id, update_bgp_test_request, aid=aid, expand=expand) print("The response of BGPApi->update_bgp_test:\n") pprint(api_response) except Exception as e: @@ -416,16 +419,17 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | - **update_bgp_test** | [**UpdateBgpTest**](UpdateBgpTest.md)| | + **update_bgp_test_request** | [**UpdateBgpTestRequest**](UpdateBgpTestRequest.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] **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] ### Return type -[**GetBgpTest200Response**](GetBgpTest200Response.md) +[**BgpTest**](BgpTest.md) ### Authorization @@ -437,6 +441,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/tests/docs/BaseBgpTest.md b/tests/docs/BaseBgpTest.md new file mode 100644 index 00000000..4c0a1f91 --- /dev/null +++ b/tests/docs/BaseBgpTest.md @@ -0,0 +1,47 @@ +# BaseBgpTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] +**include_covered_prefixes** | **bool** | Indicate if queries for subprefixes detected under this prefix should included. | [optional] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | A list of enabled alert rule objects. | [optional] + +## Example + +```python +from tests.models.base_bgp_test import BaseBgpTest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseBgpTest from a JSON string +base_bgp_test_instance = BaseBgpTest.from_json(json) +# print the JSON string representation of the object +print(BaseBgpTest.to_json()) + +# convert the object into a dict +base_bgp_test_dict = base_bgp_test_instance.to_dict() +# create an instance of BaseBgpTest from a dict +base_bgp_test_from_dict = BaseBgpTest.from_dict(base_bgp_test_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/tests_api/docs/BaseRequest.md b/tests/docs/BaseRequest.md similarity index 89% rename from tests_api/docs/BaseRequest.md rename to tests/docs/BaseRequest.md index 1209690b..3ad93bbe 100644 --- a/tests_api/docs/BaseRequest.md +++ b/tests/docs/BaseRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **labels** | **List[str]** | Contains list of test label IDs (get `labelId` from `/labels` endpoint) | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.base_request import BaseRequest +from tests.models.base_request import BaseRequest # TODO update the JSON string below json = "{}" # create an instance of BaseRequest from a JSON string base_request_instance = BaseRequest.from_json(json) # print the JSON string representation of the object -print BaseRequest.to_json() +print(BaseRequest.to_json()) # convert the object into a dict base_request_dict = base_request_instance.to_dict() # create an instance of BaseRequest from a dict -base_request_form_dict = base_request.from_dict(base_request_dict) +base_request_from_dict = BaseRequest.from_dict(base_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/tests/docs/BaseTest.md b/tests/docs/BaseTest.md new file mode 100644 index 00000000..affe4058 --- /dev/null +++ b/tests/docs/BaseTest.md @@ -0,0 +1,32 @@ +# BaseTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] + +## Example + +```python +from tests.models.base_test import BaseTest + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseTest from a JSON string +base_test_instance = BaseTest.from_json(json) +# print the JSON string representation of the object +print(BaseTest.to_json()) + +# convert the object into a dict +base_test_dict = base_test_instance.to_dict() +# create an instance of BaseTest from a dict +base_test_from_dict = BaseTest.from_dict(base_test_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/tests_api/docs/BgpTest.md b/tests/docs/BgpTest.md similarity index 88% rename from tests_api/docs/BgpTest.md rename to tests/docs/BgpTest.md index 6acb02fa..4b3eb8f3 100644 --- a/tests_api/docs/BgpTest.md +++ b/tests/docs/BgpTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,29 +18,30 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] **include_covered_prefixes** | **bool** | Indicate if queries for subprefixes detected under this prefix should included. | [optional] -**prefix** | **str** | a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24. | -**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used. | [optional] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] **alert_rules** | [**List[AlertRule]**](AlertRule.md) | A list of enabled alert rule objects. | [optional] +**prefix** | **str** | a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24. | ## Example ```python -from tests_api.models.bgp_test import BgpTest +from tests.models.bgp_test import BgpTest # TODO update the JSON string below json = "{}" # create an instance of BgpTest from a JSON string bgp_test_instance = BgpTest.from_json(json) # print the JSON string representation of the object -print BgpTest.to_json() +print(BgpTest.to_json()) # convert the object into a dict bgp_test_dict = bgp_test_instance.to_dict() # create an instance of BgpTest from a dict -bgp_test_form_dict = bgp_test.from_dict(bgp_test_dict) +bgp_test_from_dict = BgpTest.from_dict(bgp_test_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/tests_api/docs/BgpTests.md b/tests/docs/BgpTests.md similarity index 75% rename from tests_api/docs/BgpTests.md rename to tests/docs/BgpTests.md index a1f1d0ad..3512cba3 100644 --- a/tests_api/docs/BgpTests.md +++ b/tests/docs/BgpTests.md @@ -2,26 +2,27 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tests** | [**List[BgpTest]**](BgpTest.md) | | [optional] +**tests** | [**List[UnexpandedBgpTest]**](UnexpandedBgpTest.md) | | [optional] ## Example ```python -from tests_api.models.bgp_tests import BgpTests +from tests.models.bgp_tests import BgpTests # TODO update the JSON string below json = "{}" # create an instance of BgpTests from a JSON string bgp_tests_instance = BgpTests.from_json(json) # print the JSON string representation of the object -print BgpTests.to_json() +print(BgpTests.to_json()) # convert the object into a dict bgp_tests_dict = bgp_tests_instance.to_dict() # create an instance of BgpTests from a dict -bgp_tests_form_dict = bgp_tests.from_dict(bgp_tests_dict) +bgp_tests_from_dict = BgpTests.from_dict(bgp_tests_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/tests/docs/CloudEnterpriseAgentType.md b/tests/docs/CloudEnterpriseAgentType.md new file mode 100644 index 00000000..371c853b --- /dev/null +++ b/tests/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/tests_api/docs/DNSSECApi.md b/tests/docs/DNSSECApi.md similarity index 80% rename from tests_api/docs/DNSSECApi.md rename to tests/docs/DNSSECApi.md index cdaecc55..a41188ef 100644 --- a/tests_api/docs/DNSSECApi.md +++ b/tests/docs/DNSSECApi.md @@ -1,4 +1,4 @@ -# tests_api.DNSSECApi +# tests.DNSSECApi All URIs are relative to *https://api.thousandeyes.com* @@ -7,7 +7,7 @@ Method | HTTP request | Description [**create_dns_sec_test**](DNSSECApi.md#create_dns_sec_test) | **POST** /v7/tests/dnssec | Create DNSSEC test [**delete_dns_sec_test**](DNSSECApi.md#delete_dns_sec_test) | **DELETE** /v7/tests/dnssec/{testId} | Delete DNSSEC test [**get_dns_sec_test**](DNSSECApi.md#get_dns_sec_test) | **GET** /v7/tests/dnssec/{testId} | Get DNSSEC test -[**get_dns_sec_tests**](DNSSECApi.md#get_dns_sec_tests) | **GET** /v7/tests/dnssec | List DNS Sec tests +[**get_dns_sec_tests**](DNSSECApi.md#get_dns_sec_tests) | **GET** /v7/tests/dnssec | List DNSSEC tests [**update_dns_sec_test**](DNSSECApi.md#update_dns_sec_test) | **PUT** /v7/tests/dnssec/{testId} | Update DNSSEC test @@ -21,19 +21,18 @@ Creates a new DNSSEC test. This method requires Account Admin permissions. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.dns_sec_test import DnsSecTest -from tests_api.models.expand import Expand -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest -from tests_api.rest import ApiException +import tests +from tests.models.dns_sec_test import DnsSecTest +from tests.models.expand import Expand +from tests.models.update_dns_sec_test import UpdateDnsSecTest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,17 +42,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.DNSSECApi(api_client) - update_dns_sec_test = tests_api.UpdateDnsSecTest() # UpdateDnsSecTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + api_instance = tests.DNSSECApi(api_client) + update_dns_sec_test = tests.UpdateDnsSecTest() # UpdateDnsSecTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Create DNSSEC test @@ -68,6 +67,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **update_dns_sec_test** | [**UpdateDnsSecTest**](UpdateDnsSecTest.md)| | @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -112,16 +113,15 @@ Deletes the specified DNSSEC test. This method requires Account Admin permission ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.rest import ApiException +import tests +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -131,16 +131,16 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.DNSSECApi(api_client) + api_instance = tests.DNSSECApi(api_client) test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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) + 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 DNSSEC test @@ -153,6 +153,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -169,9 +170,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -186,7 +188,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_dns_sec_test** -> GetDnsSecTest200Response get_dns_sec_test(test_id, aid=aid, expand=expand) +> DnsSecTest get_dns_sec_test(test_id, aid=aid, expand=expand) Get DNSSEC test @@ -195,18 +197,17 @@ Returns details for a DNSSEC test, including name, intervals, targets, alert rul ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response -from tests_api.rest import ApiException +import tests +from tests.models.dns_sec_test import DnsSecTest +from tests.models.expand import Expand +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -216,17 +217,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.DNSSECApi(api_client) + api_instance = tests.DNSSECApi(api_client) test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Get DNSSEC test @@ -241,6 +242,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -249,7 +251,7 @@ Name | Type | Description | Notes ### Return type -[**GetDnsSecTest200Response**](GetDnsSecTest200Response.md) +[**DnsSecTest**](DnsSecTest.md) ### Authorization @@ -261,6 +263,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -277,24 +280,23 @@ Name | Type | Description | Notes # **get_dns_sec_tests** > GetDnsSecTests200Response get_dns_sec_tests(aid=aid) -List DNS Sec tests +List DNSSEC tests -Returns a list of all DNS Sec tests and saved events. +Returns a list of all DNSSEC tests and saved events. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.get_dns_sec_tests200_response import GetDnsSecTests200Response -from tests_api.rest import ApiException +import tests +from tests.models.get_dns_sec_tests200_response import GetDnsSecTests200Response +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -304,18 +306,18 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.DNSSECApi(api_client) - aid = '2067' # 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) + api_instance = tests.DNSSECApi(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 DNS Sec tests + # List DNSSEC tests api_response = api_instance.get_dns_sec_tests(aid=aid) print("The response of DNSSECApi->get_dns_sec_tests:\n") pprint(api_response) @@ -327,6 +329,7 @@ with tests_api.ApiClient(configuration) as api_client: ### 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] @@ -345,6 +348,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -359,7 +363,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_dns_sec_test** -> GetDnsSecTest200Response update_dns_sec_test(test_id, update_dns_sec_test, aid=aid, expand=expand) +> DnsSecTest update_dns_sec_test(test_id, update_dns_sec_test, aid=aid, expand=expand) Update DNSSEC test @@ -368,19 +372,18 @@ Updates a DNSSEC test. The target test cannot be a live share or saved event. Th ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest -from tests_api.rest import ApiException +import tests +from tests.models.dns_sec_test import DnsSecTest +from tests.models.expand import Expand +from tests.models.update_dns_sec_test import UpdateDnsSecTest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -390,18 +393,18 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.DNSSECApi(api_client) + api_instance = tests.DNSSECApi(api_client) test_id = '281474976710706' # str | ID of the test - update_dns_sec_test = tests_api.UpdateDnsSecTest() # UpdateDnsSecTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + update_dns_sec_test = tests.UpdateDnsSecTest() # UpdateDnsSecTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Update DNSSEC test @@ -416,6 +419,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -425,7 +429,7 @@ Name | Type | Description | Notes ### Return type -[**GetDnsSecTest200Response**](GetDnsSecTest200Response.md) +[**DnsSecTest**](DnsSecTest.md) ### Authorization @@ -437,6 +441,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/tests/docs/DNSServerApi.md b/tests/docs/DNSServerApi.md new file mode 100644 index 00000000..6eac1dbd --- /dev/null +++ b/tests/docs/DNSServerApi.md @@ -0,0 +1,458 @@ +# tests.DNSServerApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_dns_server_test**](DNSServerApi.md#create_dns_server_test) | **POST** /v7/tests/dns-server | Create DNS Server test +[**delete_dns_server_test**](DNSServerApi.md#delete_dns_server_test) | **DELETE** /v7/tests/dns-server/{testId} | Delete DNS Server test +[**get_dns_server_test**](DNSServerApi.md#get_dns_server_test) | **GET** /v7/tests/dns-server/{testId} | Get DNS Server test +[**get_dns_server_tests**](DNSServerApi.md#get_dns_server_tests) | **GET** /v7/tests/dns-server | List DNS Server tests +[**update_dns_server_test**](DNSServerApi.md#update_dns_server_test) | **PUT** /v7/tests/dns-server/{testId} | Update DNS Server test + + +# **create_dns_server_test** +> DnsServerTest create_dns_server_test(update_dns_server_test, aid=aid, expand=expand) + +Create DNS Server test + +Creates a new DNS Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.dns_server_test import DnsServerTest +from tests.models.expand import Expand +from tests.models.update_dns_server_test import UpdateDnsServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSServerApi(api_client) + update_dns_server_test = tests.UpdateDnsServerTest() # UpdateDnsServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create DNS Server test + api_response = api_instance.create_dns_server_test(update_dns_server_test, aid=aid, expand=expand) + print("The response of DNSServerApi->create_dns_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSServerApi->create_dns_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_dns_server_test** | [**UpdateDnsServerTest**](UpdateDnsServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**DnsServerTest**](DnsServerTest.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 | - | +**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) + +# **delete_dns_server_test** +> delete_dns_server_test(test_id, aid=aid) + +Delete DNS Server test + +Deletes the specified DNS Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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 DNS Server test + api_instance.delete_dns_server_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling DNSServerApi->delete_dns_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_dns_server_test** +> DnsServerTest get_dns_server_test(test_id, aid=aid, expand=expand) + +Get DNS Server test + +Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.dns_server_test import DnsServerTest +from tests.models.expand import Expand +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get DNS Server test + api_response = api_instance.get_dns_server_test(test_id, aid=aid, expand=expand) + print("The response of DNSServerApi->get_dns_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSServerApi->get_dns_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**DnsServerTest**](DnsServerTest.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_dns_server_tests** +> GetDNSServerTests200Response get_dns_server_tests(aid=aid) + +List DNS Server tests + +Returns a list of all DNS Server tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_dns_server_tests200_response import GetDNSServerTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSServerApi(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 DNS Server tests + api_response = api_instance.get_dns_server_tests(aid=aid) + print("The response of DNSServerApi->get_dns_server_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSServerApi->get_dns_server_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 + +[**GetDNSServerTests200Response**](GetDNSServerTests200Response.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) + +# **update_dns_server_test** +> DnsServerTest update_dns_server_test(test_id, update_dns_server_test, aid=aid, expand=expand) + +Update DNS Server test + +Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.dns_server_test import DnsServerTest +from tests.models.expand import Expand +from tests.models.update_dns_server_test import UpdateDnsServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSServerApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_dns_server_test = tests.UpdateDnsServerTest() # UpdateDnsServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update DNS Server test + api_response = api_instance.update_dns_server_test(test_id, update_dns_server_test, aid=aid, expand=expand) + print("The response of DNSServerApi->update_dns_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSServerApi->update_dns_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_dns_server_test** | [**UpdateDnsServerTest**](UpdateDnsServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**DnsServerTest**](DnsServerTest.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 | - | +**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) + diff --git a/tests/docs/DNSTraceApi.md b/tests/docs/DNSTraceApi.md new file mode 100644 index 00000000..39c5b9a7 --- /dev/null +++ b/tests/docs/DNSTraceApi.md @@ -0,0 +1,458 @@ +# tests.DNSTraceApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_dns_trace_test**](DNSTraceApi.md#create_dns_trace_test) | **POST** /v7/tests/dns-trace | Create DNS Trace test +[**delete_dns_trace_test**](DNSTraceApi.md#delete_dns_trace_test) | **DELETE** /v7/tests/dns-trace/{testId} | Delete DNS Trace test +[**get_dns_trace_test**](DNSTraceApi.md#get_dns_trace_test) | **GET** /v7/tests/dns-trace/{testId} | Get DNS Trace test +[**get_dns_trace_tests**](DNSTraceApi.md#get_dns_trace_tests) | **GET** /v7/tests/dns-trace | List DNS Trace tests +[**update_dns_trace_test**](DNSTraceApi.md#update_dns_trace_test) | **PUT** /v7/tests/dns-trace/{testId} | Update DNS Trace test + + +# **create_dns_trace_test** +> DnsTraceTest create_dns_trace_test(update_dns_trace_test, aid=aid, expand=expand) + +Create DNS Trace test + +Creates a new DNS Trace test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.dns_trace_test import DnsTraceTest +from tests.models.expand import Expand +from tests.models.update_dns_trace_test import UpdateDnsTraceTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSTraceApi(api_client) + update_dns_trace_test = tests.UpdateDnsTraceTest() # UpdateDnsTraceTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create DNS Trace test + api_response = api_instance.create_dns_trace_test(update_dns_trace_test, aid=aid, expand=expand) + print("The response of DNSTraceApi->create_dns_trace_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSTraceApi->create_dns_trace_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_dns_trace_test** | [**UpdateDnsTraceTest**](UpdateDnsTraceTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**DnsTraceTest**](DnsTraceTest.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 | - | +**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) + +# **delete_dns_trace_test** +> delete_dns_trace_test(test_id, aid=aid) + +Delete DNS Trace test + +Deletes the specified DNS Trace test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSTraceApi(api_client) + test_id = '281474976710706' # str | ID of the 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 DNS Trace test + api_instance.delete_dns_trace_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling DNSTraceApi->delete_dns_trace_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_dns_trace_test** +> DnsTraceTest get_dns_trace_test(test_id, aid=aid, expand=expand) + +Get DNS Trace test + +Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.dns_trace_test import DnsTraceTest +from tests.models.expand import Expand +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSTraceApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get DNS Trace test + api_response = api_instance.get_dns_trace_test(test_id, aid=aid, expand=expand) + print("The response of DNSTraceApi->get_dns_trace_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSTraceApi->get_dns_trace_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**DnsTraceTest**](DnsTraceTest.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_dns_trace_tests** +> GetDnsTraceTests200Response get_dns_trace_tests(aid=aid) + +List DNS Trace tests + +Returns a list of all DNS Trace tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSTraceApi(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 DNS Trace tests + api_response = api_instance.get_dns_trace_tests(aid=aid) + print("The response of DNSTraceApi->get_dns_trace_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSTraceApi->get_dns_trace_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 + +[**GetDnsTraceTests200Response**](GetDnsTraceTests200Response.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) + +# **update_dns_trace_test** +> DnsTraceTest update_dns_trace_test(test_id, update_dns_trace_test, aid=aid, expand=expand) + +Update DNS Trace test + +Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.dns_trace_test import DnsTraceTest +from tests.models.expand import Expand +from tests.models.update_dns_trace_test import UpdateDnsTraceTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.DNSTraceApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_dns_trace_test = tests.UpdateDnsTraceTest() # UpdateDnsTraceTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update DNS Trace test + api_response = api_instance.update_dns_trace_test(test_id, update_dns_trace_test, aid=aid, expand=expand) + print("The response of DNSTraceApi->update_dns_trace_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DNSTraceApi->update_dns_trace_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_dns_trace_test** | [**UpdateDnsTraceTest**](UpdateDnsTraceTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**DnsTraceTest**](DnsTraceTest.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 | - | +**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) + diff --git a/tests/docs/DnsQueryClass.md b/tests/docs/DnsQueryClass.md new file mode 100644 index 00000000..7dccf1c5 --- /dev/null +++ b/tests/docs/DnsQueryClass.md @@ -0,0 +1,12 @@ +# DnsQueryClass + +Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. + +## 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/tests/docs/DnsSecInstantTest.md b/tests/docs/DnsSecInstantTest.md new file mode 100644 index 00000000..487938f2 --- /dev/null +++ b/tests/docs/DnsSecInstantTest.md @@ -0,0 +1,44 @@ +# DnsSecInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.dns_sec_instant_test import DnsSecInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsSecInstantTest from a JSON string +dns_sec_instant_test_instance = DnsSecInstantTest.from_json(json) +# print the JSON string representation of the object +print(DnsSecInstantTest.to_json()) + +# convert the object into a dict +dns_sec_instant_test_dict = dns_sec_instant_test_instance.to_dict() +# create an instance of DnsSecInstantTest from a dict +dns_sec_instant_test_from_dict = DnsSecInstantTest.from_dict(dns_sec_instant_test_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/tests/docs/DnsSecProperties.md b/tests/docs/DnsSecProperties.md new file mode 100644 index 00000000..6434ed2b --- /dev/null +++ b/tests/docs/DnsSecProperties.md @@ -0,0 +1,31 @@ +# DnsSecProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.dns_sec_properties import DnsSecProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsSecProperties from a JSON string +dns_sec_properties_instance = DnsSecProperties.from_json(json) +# print the JSON string representation of the object +print(DnsSecProperties.to_json()) + +# convert the object into a dict +dns_sec_properties_dict = dns_sec_properties_instance.to_dict() +# create an instance of DnsSecProperties from a dict +dns_sec_properties_from_dict = DnsSecProperties.from_dict(dns_sec_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/DnsSecTest.md b/tests/docs/DnsSecTest.md similarity index 93% rename from tests_api/docs/DnsSecTest.md rename to tests/docs/DnsSecTest.md index d1891a54..ee01f2bc 100644 --- a/tests_api/docs/DnsSecTest.md +++ b/tests/docs/DnsSecTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,26 +22,26 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] ## Example ```python -from tests_api.models.dns_sec_test import DnsSecTest +from tests.models.dns_sec_test import DnsSecTest # TODO update the JSON string below json = "{}" # create an instance of DnsSecTest from a JSON string dns_sec_test_instance = DnsSecTest.from_json(json) # print the JSON string representation of the object -print DnsSecTest.to_json() +print(DnsSecTest.to_json()) # convert the object into a dict dns_sec_test_dict = dns_sec_test_instance.to_dict() # create an instance of DnsSecTest from a dict -dns_sec_test_form_dict = dns_sec_test.from_dict(dns_sec_test_dict) +dns_sec_test_from_dict = DnsSecTest.from_dict(dns_sec_test_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/tests/docs/DnsSecTests.md b/tests/docs/DnsSecTests.md new file mode 100644 index 00000000..396f2720 --- /dev/null +++ b/tests/docs/DnsSecTests.md @@ -0,0 +1,29 @@ +# DnsSecTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedDnsSecTest]**](UnexpandedDnsSecTest.md) | | [optional] + +## Example + +```python +from tests.models.dns_sec_tests import DnsSecTests + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsSecTests from a JSON string +dns_sec_tests_instance = DnsSecTests.from_json(json) +# print the JSON string representation of the object +print(DnsSecTests.to_json()) + +# convert the object into a dict +dns_sec_tests_dict = dns_sec_tests_instance.to_dict() +# create an instance of DnsSecTests from a dict +dns_sec_tests_from_dict = DnsSecTests.from_dict(dns_sec_tests_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/tests/docs/DnsServerInstantTest.md b/tests/docs/DnsServerInstantTest.md new file mode 100644 index 00000000..acbd1014 --- /dev/null +++ b/tests/docs/DnsServerInstantTest.md @@ -0,0 +1,56 @@ +# DnsServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**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] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.dns_server_instant_test import DnsServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServerInstantTest from a JSON string +dns_server_instant_test_instance = DnsServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(DnsServerInstantTest.to_json()) + +# convert the object into a dict +dns_server_instant_test_dict = dns_server_instant_test_instance.to_dict() +# create an instance of DnsServerInstantTest from a dict +dns_server_instant_test_from_dict = DnsServerInstantTest.from_dict(dns_server_instant_test_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/tests/docs/DnsServerProperties.md b/tests/docs/DnsServerProperties.md new file mode 100644 index 00000000..aa90e9a9 --- /dev/null +++ b/tests/docs/DnsServerProperties.md @@ -0,0 +1,43 @@ +# DnsServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**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] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.dns_server_properties import DnsServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServerProperties from a JSON string +dns_server_properties_instance = DnsServerProperties.from_json(json) +# print the JSON string representation of the object +print(DnsServerProperties.to_json()) + +# convert the object into a dict +dns_server_properties_dict = dns_server_properties_instance.to_dict() +# create an instance of DnsServerProperties from a dict +dns_server_properties_from_dict = DnsServerProperties.from_dict(dns_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/DnsServerTest.md b/tests/docs/DnsServerTest.md similarity index 91% rename from tests_api/docs/DnsServerTest.md rename to tests/docs/DnsServerTest.md index 2ab41e36..781ec820 100644 --- a/tests_api/docs/DnsServerTest.md +++ b/tests/docs/DnsServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | **dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] @@ -36,25 +36,27 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.dns_server_test import DnsServerTest +from tests.models.dns_server_test import DnsServerTest # TODO update the JSON string below json = "{}" # create an instance of DnsServerTest from a JSON string dns_server_test_instance = DnsServerTest.from_json(json) # print the JSON string representation of the object -print DnsServerTest.to_json() +print(DnsServerTest.to_json()) # convert the object into a dict dns_server_test_dict = dns_server_test_instance.to_dict() # create an instance of DnsServerTest from a dict -dns_server_test_form_dict = dns_server_test.from_dict(dns_server_test_dict) +dns_server_test_from_dict = DnsServerTest.from_dict(dns_server_test_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/tests/docs/DnsServerTests.md b/tests/docs/DnsServerTests.md new file mode 100644 index 00000000..540965a8 --- /dev/null +++ b/tests/docs/DnsServerTests.md @@ -0,0 +1,29 @@ +# DnsServerTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedDnsServerTest]**](UnexpandedDnsServerTest.md) | | [optional] + +## Example + +```python +from tests.models.dns_server_tests import DnsServerTests + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServerTests from a JSON string +dns_server_tests_instance = DnsServerTests.from_json(json) +# print the JSON string representation of the object +print(DnsServerTests.to_json()) + +# convert the object into a dict +dns_server_tests_dict = dns_server_tests_instance.to_dict() +# create an instance of DnsServerTests from a dict +dns_server_tests_from_dict = DnsServerTests.from_dict(dns_server_tests_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/tests/docs/DnsServersRequest.md b/tests/docs/DnsServersRequest.md new file mode 100644 index 00000000..3e82193d --- /dev/null +++ b/tests/docs/DnsServersRequest.md @@ -0,0 +1,29 @@ +# DnsServersRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns_servers** | **List[str]** | A list of DNS server FQDN. | [optional] + +## Example + +```python +from tests.models.dns_servers_request import DnsServersRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsServersRequest from a JSON string +dns_servers_request_instance = DnsServersRequest.from_json(json) +# print the JSON string representation of the object +print(DnsServersRequest.to_json()) + +# convert the object into a dict +dns_servers_request_dict = dns_servers_request_instance.to_dict() +# create an instance of DnsServersRequest from a dict +dns_servers_request_from_dict = DnsServersRequest.from_dict(dns_servers_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/tests/docs/DnsTraceInstantTest.md b/tests/docs/DnsTraceInstantTest.md new file mode 100644 index 00000000..a2e33b94 --- /dev/null +++ b/tests/docs/DnsTraceInstantTest.md @@ -0,0 +1,45 @@ +# DnsTraceInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.dns_trace_instant_test import DnsTraceInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsTraceInstantTest from a JSON string +dns_trace_instant_test_instance = DnsTraceInstantTest.from_json(json) +# print the JSON string representation of the object +print(DnsTraceInstantTest.to_json()) + +# convert the object into a dict +dns_trace_instant_test_dict = dns_trace_instant_test_instance.to_dict() +# create an instance of DnsTraceInstantTest from a dict +dns_trace_instant_test_from_dict = DnsTraceInstantTest.from_dict(dns_trace_instant_test_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/tests/docs/DnsTraceProperties.md b/tests/docs/DnsTraceProperties.md new file mode 100644 index 00000000..edb78765 --- /dev/null +++ b/tests/docs/DnsTraceProperties.md @@ -0,0 +1,32 @@ +# DnsTraceProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.dns_trace_properties import DnsTraceProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsTraceProperties from a JSON string +dns_trace_properties_instance = DnsTraceProperties.from_json(json) +# print the JSON string representation of the object +print(DnsTraceProperties.to_json()) + +# convert the object into a dict +dns_trace_properties_dict = dns_trace_properties_instance.to_dict() +# create an instance of DnsTraceProperties from a dict +dns_trace_properties_from_dict = DnsTraceProperties.from_dict(dns_trace_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/DnsTraceTest.md b/tests/docs/DnsTraceTest.md similarity index 93% rename from tests_api/docs/DnsTraceTest.md rename to tests/docs/DnsTraceTest.md index 9052cb44..d2c57947 100644 --- a/tests_api/docs/DnsTraceTest.md +++ b/tests/docs/DnsTraceTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,27 +22,27 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] ## Example ```python -from tests_api.models.dns_trace_test import DnsTraceTest +from tests.models.dns_trace_test import DnsTraceTest # TODO update the JSON string below json = "{}" # create an instance of DnsTraceTest from a JSON string dns_trace_test_instance = DnsTraceTest.from_json(json) # print the JSON string representation of the object -print DnsTraceTest.to_json() +print(DnsTraceTest.to_json()) # convert the object into a dict dns_trace_test_dict = dns_trace_test_instance.to_dict() # create an instance of DnsTraceTest from a dict -dns_trace_test_form_dict = dns_trace_test.from_dict(dns_trace_test_dict) +dns_trace_test_from_dict = DnsTraceTest.from_dict(dns_trace_test_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/tests/docs/DnsTraceTests.md b/tests/docs/DnsTraceTests.md new file mode 100644 index 00000000..41e7b4f6 --- /dev/null +++ b/tests/docs/DnsTraceTests.md @@ -0,0 +1,29 @@ +# DnsTraceTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedDnsTraceTest]**](UnexpandedDnsTraceTest.md) | | [optional] + +## Example + +```python +from tests.models.dns_trace_tests import DnsTraceTests + +# TODO update the JSON string below +json = "{}" +# create an instance of DnsTraceTests from a JSON string +dns_trace_tests_instance = DnsTraceTests.from_json(json) +# print the JSON string representation of the object +print(DnsTraceTests.to_json()) + +# convert the object into a dict +dns_trace_tests_dict = dns_trace_tests_instance.to_dict() +# create an instance of DnsTraceTests from a dict +dns_trace_tests_from_dict = DnsTraceTests.from_dict(dns_trace_tests_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/tests/docs/Error.md b/tests/docs/Error.md new file mode 100644 index 00000000..a755f5d1 --- /dev/null +++ b/tests/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 tests.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/tests/docs/Expand.md b/tests/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/tests/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/tests/docs/FTPServerApi.md b/tests/docs/FTPServerApi.md new file mode 100644 index 00000000..5aa37bdc --- /dev/null +++ b/tests/docs/FTPServerApi.md @@ -0,0 +1,456 @@ +# tests.FTPServerApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_ftp_server_test**](FTPServerApi.md#create_ftp_server_test) | **POST** /v7/tests/ftp-server | Create FTP Server test +[**delete_ftp_server_test**](FTPServerApi.md#delete_ftp_server_test) | **DELETE** /v7/tests/ftp-server/{testId} | Delete FTP Server test +[**get_ftp_server_test**](FTPServerApi.md#get_ftp_server_test) | **GET** /v7/tests/ftp-server/{testId} | Get FTP Server test +[**get_ftp_server_tests**](FTPServerApi.md#get_ftp_server_tests) | **GET** /v7/tests/ftp-server | List FTP Server tests +[**update_ftp_server_test**](FTPServerApi.md#update_ftp_server_test) | **PUT** /v7/tests/ftp-server/{testId} | Update FTP Server test + + +# **create_ftp_server_test** +> FtpServerTest create_ftp_server_test(update_ftp_server_test, aid=aid, expand=expand) + +Create FTP Server test + +Creates a new FTP Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.ftp_server_test import FtpServerTest +from tests.models.update_ftp_server_test import UpdateFtpServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.FTPServerApi(api_client) + update_ftp_server_test = tests.UpdateFtpServerTest() # UpdateFtpServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create FTP Server test + api_response = api_instance.create_ftp_server_test(update_ftp_server_test, aid=aid, expand=expand) + print("The response of FTPServerApi->create_ftp_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FTPServerApi->create_ftp_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_ftp_server_test** | [**UpdateFtpServerTest**](UpdateFtpServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**FtpServerTest**](FtpServerTest.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 | - | +**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) + +# **delete_ftp_server_test** +> delete_ftp_server_test(test_id, aid=aid) + +Delete FTP Server test + +Deletes the specified FTP Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.FTPServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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 FTP Server test + api_instance.delete_ftp_server_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling FTPServerApi->delete_ftp_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_ftp_server_test** +> FtpServerTest get_ftp_server_test(test_id, aid=aid, expand=expand) + +Get FTP Server test + +Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.ftp_server_test import FtpServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.FTPServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get FTP Server test + api_response = api_instance.get_ftp_server_test(test_id, aid=aid, expand=expand) + print("The response of FTPServerApi->get_ftp_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FTPServerApi->get_ftp_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**FtpServerTest**](FtpServerTest.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_ftp_server_tests** +> GetFtpServerTests200Response get_ftp_server_tests(aid=aid) + +List FTP Server tests + +Returns a list of FTP Server tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_ftp_server_tests200_response import GetFtpServerTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.FTPServerApi(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 FTP Server tests + api_response = api_instance.get_ftp_server_tests(aid=aid) + print("The response of FTPServerApi->get_ftp_server_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FTPServerApi->get_ftp_server_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 + +[**GetFtpServerTests200Response**](GetFtpServerTests200Response.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) + +# **update_ftp_server_test** +> FtpServerTest update_ftp_server_test(test_id, update_ftp_server_test, aid=aid, expand=expand) + +Update FTP Server test + +Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.ftp_server_test import FtpServerTest +from tests.models.update_ftp_server_test import UpdateFtpServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.FTPServerApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_ftp_server_test = tests.UpdateFtpServerTest() # UpdateFtpServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update FTP Server test + api_response = api_instance.update_ftp_server_test(test_id, update_ftp_server_test, aid=aid, expand=expand) + print("The response of FTPServerApi->update_ftp_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FTPServerApi->update_ftp_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_ftp_server_test** | [**UpdateFtpServerTest**](UpdateFtpServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**FtpServerTest**](FtpServerTest.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 | - | +**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) + diff --git a/tests/docs/FtpServerInstantTest.md b/tests/docs/FtpServerInstantTest.md new file mode 100644 index 00000000..04b899d9 --- /dev/null +++ b/tests/docs/FtpServerInstantTest.md @@ -0,0 +1,60 @@ +# FtpServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] +**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] +**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] +**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] +**password** | **str** | Password for Basic/NTLM authentication. | +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | +**url** | **str** | Target for the test. | +**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] +**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.ftp_server_instant_test import FtpServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of FtpServerInstantTest from a JSON string +ftp_server_instant_test_instance = FtpServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(FtpServerInstantTest.to_json()) + +# convert the object into a dict +ftp_server_instant_test_dict = ftp_server_instant_test_instance.to_dict() +# create an instance of FtpServerInstantTest from a dict +ftp_server_instant_test_from_dict = FtpServerInstantTest.from_dict(ftp_server_instant_test_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/tests/docs/FtpServerProperties.md b/tests/docs/FtpServerProperties.md new file mode 100644 index 00000000..fbc1cf1d --- /dev/null +++ b/tests/docs/FtpServerProperties.md @@ -0,0 +1,47 @@ +# FtpServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] +**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] +**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] +**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] +**password** | **str** | Password for Basic/NTLM authentication. | +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | +**url** | **str** | Target for the test. | +**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] +**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.ftp_server_properties import FtpServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of FtpServerProperties from a JSON string +ftp_server_properties_instance = FtpServerProperties.from_json(json) +# print the JSON string representation of the object +print(FtpServerProperties.to_json()) + +# convert the object into a dict +ftp_server_properties_dict = ftp_server_properties_instance.to_dict() +# create an instance of FtpServerProperties from a dict +ftp_server_properties_from_dict = FtpServerProperties.from_dict(ftp_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/FtpServerRequestType.md b/tests/docs/FtpServerRequestType.md new file mode 100644 index 00000000..58d16832 --- /dev/null +++ b/tests/docs/FtpServerRequestType.md @@ -0,0 +1,12 @@ +# FtpServerRequestType + +Set the type of activity for the test. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/FtpServerTest.md b/tests/docs/FtpServerTest.md similarity index 92% rename from tests_api/docs/FtpServerTest.md rename to tests/docs/FtpServerTest.md index 95d82630..5016b81c 100644 --- a/tests_api/docs/FtpServerTest.md +++ b/tests/docs/FtpServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] **ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] @@ -40,25 +40,27 @@ Name | Type | Description | Notes **username** | **str** | Username for Basic/NTLM authentication. | **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.ftp_server_test import FtpServerTest +from tests.models.ftp_server_test import FtpServerTest # TODO update the JSON string below json = "{}" # create an instance of FtpServerTest from a JSON string ftp_server_test_instance = FtpServerTest.from_json(json) # print the JSON string representation of the object -print FtpServerTest.to_json() +print(FtpServerTest.to_json()) # convert the object into a dict ftp_server_test_dict = ftp_server_test_instance.to_dict() # create an instance of FtpServerTest from a dict -ftp_server_test_form_dict = ftp_server_test.from_dict(ftp_server_test_dict) +ftp_server_test_from_dict = FtpServerTest.from_dict(ftp_server_test_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/tests/docs/FtpServerTests.md b/tests/docs/FtpServerTests.md new file mode 100644 index 00000000..b0bdf788 --- /dev/null +++ b/tests/docs/FtpServerTests.md @@ -0,0 +1,29 @@ +# FtpServerTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedFtpServerTest]**](UnexpandedFtpServerTest.md) | | [optional] + +## Example + +```python +from tests.models.ftp_server_tests import FtpServerTests + +# TODO update the JSON string below +json = "{}" +# create an instance of FtpServerTests from a JSON string +ftp_server_tests_instance = FtpServerTests.from_json(json) +# print the JSON string representation of the object +print(FtpServerTests.to_json()) + +# convert the object into a dict +ftp_server_tests_dict = ftp_server_tests_instance.to_dict() +# create an instance of FtpServerTests from a dict +ftp_server_tests_from_dict = FtpServerTests.from_dict(ftp_server_tests_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/tests/docs/GetAgentToAgentTests200Response.md b/tests/docs/GetAgentToAgentTests200Response.md new file mode 100644 index 00000000..4a4c809f --- /dev/null +++ b/tests/docs/GetAgentToAgentTests200Response.md @@ -0,0 +1,30 @@ +# GetAgentToAgentTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedAgentToAgentTest]**](UnexpandedAgentToAgentTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetAgentToAgentTests200Response from a JSON string +get_agent_to_agent_tests200_response_instance = GetAgentToAgentTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetAgentToAgentTests200Response.to_json()) + +# convert the object into a dict +get_agent_to_agent_tests200_response_dict = get_agent_to_agent_tests200_response_instance.to_dict() +# create an instance of GetAgentToAgentTests200Response from a dict +get_agent_to_agent_tests200_response_from_dict = GetAgentToAgentTests200Response.from_dict(get_agent_to_agent_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetAgentToServerTests200Response.md b/tests/docs/GetAgentToServerTests200Response.md new file mode 100644 index 00000000..c5c03ae7 --- /dev/null +++ b/tests/docs/GetAgentToServerTests200Response.md @@ -0,0 +1,30 @@ +# GetAgentToServerTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedAgentToServerTest]**](UnexpandedAgentToServerTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetAgentToServerTests200Response from a JSON string +get_agent_to_server_tests200_response_instance = GetAgentToServerTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetAgentToServerTests200Response.to_json()) + +# convert the object into a dict +get_agent_to_server_tests200_response_dict = get_agent_to_server_tests200_response_instance.to_dict() +# create an instance of GetAgentToServerTests200Response from a dict +get_agent_to_server_tests200_response_from_dict = GetAgentToServerTests200Response.from_dict(get_agent_to_server_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetBgpTests200Response.md b/tests/docs/GetBgpTests200Response.md new file mode 100644 index 00000000..034a42c1 --- /dev/null +++ b/tests/docs/GetBgpTests200Response.md @@ -0,0 +1,30 @@ +# GetBgpTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedBgpTest]**](UnexpandedBgpTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_bgp_tests200_response import GetBgpTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetBgpTests200Response from a JSON string +get_bgp_tests200_response_instance = GetBgpTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetBgpTests200Response.to_json()) + +# convert the object into a dict +get_bgp_tests200_response_dict = get_bgp_tests200_response_instance.to_dict() +# create an instance of GetBgpTests200Response from a dict +get_bgp_tests200_response_from_dict = GetBgpTests200Response.from_dict(get_bgp_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetDNSServerTests200Response.md b/tests/docs/GetDNSServerTests200Response.md new file mode 100644 index 00000000..395e6849 --- /dev/null +++ b/tests/docs/GetDNSServerTests200Response.md @@ -0,0 +1,30 @@ +# GetDNSServerTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedDnsServerTest]**](UnexpandedDnsServerTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_dns_server_tests200_response import GetDNSServerTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDNSServerTests200Response from a JSON string +get_dns_server_tests200_response_instance = GetDNSServerTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetDNSServerTests200Response.to_json()) + +# convert the object into a dict +get_dns_server_tests200_response_dict = get_dns_server_tests200_response_instance.to_dict() +# create an instance of GetDNSServerTests200Response from a dict +get_dns_server_tests200_response_from_dict = GetDNSServerTests200Response.from_dict(get_dns_server_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetDnsSecTests200Response.md b/tests/docs/GetDnsSecTests200Response.md new file mode 100644 index 00000000..646db091 --- /dev/null +++ b/tests/docs/GetDnsSecTests200Response.md @@ -0,0 +1,30 @@ +# GetDnsSecTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedDnsSecTest]**](UnexpandedDnsSecTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_dns_sec_tests200_response import GetDnsSecTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDnsSecTests200Response from a JSON string +get_dns_sec_tests200_response_instance = GetDnsSecTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetDnsSecTests200Response.to_json()) + +# convert the object into a dict +get_dns_sec_tests200_response_dict = get_dns_sec_tests200_response_instance.to_dict() +# create an instance of GetDnsSecTests200Response from a dict +get_dns_sec_tests200_response_from_dict = GetDnsSecTests200Response.from_dict(get_dns_sec_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetDnsTraceTests200Response.md b/tests/docs/GetDnsTraceTests200Response.md new file mode 100644 index 00000000..e29b0d39 --- /dev/null +++ b/tests/docs/GetDnsTraceTests200Response.md @@ -0,0 +1,30 @@ +# GetDnsTraceTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedDnsTraceTest]**](UnexpandedDnsTraceTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDnsTraceTests200Response from a JSON string +get_dns_trace_tests200_response_instance = GetDnsTraceTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetDnsTraceTests200Response.to_json()) + +# convert the object into a dict +get_dns_trace_tests200_response_dict = get_dns_trace_tests200_response_instance.to_dict() +# create an instance of GetDnsTraceTests200Response from a dict +get_dns_trace_tests200_response_from_dict = GetDnsTraceTests200Response.from_dict(get_dns_trace_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetFtpServerTests200Response.md b/tests/docs/GetFtpServerTests200Response.md new file mode 100644 index 00000000..db651ce7 --- /dev/null +++ b/tests/docs/GetFtpServerTests200Response.md @@ -0,0 +1,30 @@ +# GetFtpServerTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedFtpServerTest]**](UnexpandedFtpServerTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_ftp_server_tests200_response import GetFtpServerTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetFtpServerTests200Response from a JSON string +get_ftp_server_tests200_response_instance = GetFtpServerTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetFtpServerTests200Response.to_json()) + +# convert the object into a dict +get_ftp_server_tests200_response_dict = get_ftp_server_tests200_response_instance.to_dict() +# create an instance of GetFtpServerTests200Response from a dict +get_ftp_server_tests200_response_from_dict = GetFtpServerTests200Response.from_dict(get_ftp_server_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetHttpServerTests200Response.md b/tests/docs/GetHttpServerTests200Response.md new file mode 100644 index 00000000..9f442a6e --- /dev/null +++ b/tests/docs/GetHttpServerTests200Response.md @@ -0,0 +1,30 @@ +# GetHttpServerTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedHttpServerTest]**](UnexpandedHttpServerTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_http_server_tests200_response import GetHttpServerTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetHttpServerTests200Response from a JSON string +get_http_server_tests200_response_instance = GetHttpServerTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetHttpServerTests200Response.to_json()) + +# convert the object into a dict +get_http_server_tests200_response_dict = get_http_server_tests200_response_instance.to_dict() +# create an instance of GetHttpServerTests200Response from a dict +get_http_server_tests200_response_from_dict = GetHttpServerTests200Response.from_dict(get_http_server_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetPageLoadTests200Response.md b/tests/docs/GetPageLoadTests200Response.md new file mode 100644 index 00000000..4344c656 --- /dev/null +++ b/tests/docs/GetPageLoadTests200Response.md @@ -0,0 +1,30 @@ +# GetPageLoadTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedPageLoadTest]**](UnexpandedPageLoadTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_page_load_tests200_response import GetPageLoadTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPageLoadTests200Response from a JSON string +get_page_load_tests200_response_instance = GetPageLoadTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetPageLoadTests200Response.to_json()) + +# convert the object into a dict +get_page_load_tests200_response_dict = get_page_load_tests200_response_instance.to_dict() +# create an instance of GetPageLoadTests200Response from a dict +get_page_load_tests200_response_from_dict = GetPageLoadTests200Response.from_dict(get_page_load_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/GetPathVisInterfaceGroups200Response.md b/tests/docs/GetPathVisInterfaceGroups200Response.md similarity index 76% rename from tests_api/docs/GetPathVisInterfaceGroups200Response.md rename to tests/docs/GetPathVisInterfaceGroups200Response.md index c1374043..44249733 100644 --- a/tests_api/docs/GetPathVisInterfaceGroups200Response.md +++ b/tests/docs/GetPathVisInterfaceGroups200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **path_vis_interface_groups** | [**List[InterfaceGroup]**](InterfaceGroup.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response +from tests.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response # TODO update the JSON string below json = "{}" # create an instance of GetPathVisInterfaceGroups200Response from a JSON string get_path_vis_interface_groups200_response_instance = GetPathVisInterfaceGroups200Response.from_json(json) # print the JSON string representation of the object -print GetPathVisInterfaceGroups200Response.to_json() +print(GetPathVisInterfaceGroups200Response.to_json()) # convert the object into a dict get_path_vis_interface_groups200_response_dict = get_path_vis_interface_groups200_response_instance.to_dict() # create an instance of GetPathVisInterfaceGroups200Response from a dict -get_path_vis_interface_groups200_response_form_dict = get_path_vis_interface_groups200_response.from_dict(get_path_vis_interface_groups200_response_dict) +get_path_vis_interface_groups200_response_from_dict = GetPathVisInterfaceGroups200Response.from_dict(get_path_vis_interface_groups200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/tests/docs/GetSipServerTests200Response.md b/tests/docs/GetSipServerTests200Response.md new file mode 100644 index 00000000..f67020e3 --- /dev/null +++ b/tests/docs/GetSipServerTests200Response.md @@ -0,0 +1,30 @@ +# GetSipServerTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedSipServerTest]**](UnexpandedSipServerTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_sip_server_tests200_response import GetSipServerTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSipServerTests200Response from a JSON string +get_sip_server_tests200_response_instance = GetSipServerTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetSipServerTests200Response.to_json()) + +# convert the object into a dict +get_sip_server_tests200_response_dict = get_sip_server_tests200_response_instance.to_dict() +# create an instance of GetSipServerTests200Response from a dict +get_sip_server_tests200_response_from_dict = GetSipServerTests200Response.from_dict(get_sip_server_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/GetTests200Response.md b/tests/docs/GetTests200Response.md similarity index 80% rename from tests_api/docs/GetTests200Response.md rename to tests/docs/GetTests200Response.md index 909f0045..eabfc020 100644 --- a/tests_api/docs/GetTests200Response.md +++ b/tests/docs/GetTests200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[SimpleTest]**](SimpleTest.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.get_tests200_response import GetTests200Response +from tests.models.get_tests200_response import GetTests200Response # TODO update the JSON string below json = "{}" # create an instance of GetTests200Response from a JSON string get_tests200_response_instance = GetTests200Response.from_json(json) # print the JSON string representation of the object -print GetTests200Response.to_json() +print(GetTests200Response.to_json()) # convert the object into a dict get_tests200_response_dict = get_tests200_response_instance.to_dict() # create an instance of GetTests200Response from a dict -get_tests200_response_form_dict = get_tests200_response.from_dict(get_tests200_response_dict) +get_tests200_response_from_dict = GetTests200Response.from_dict(get_tests200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/tests/docs/GetVoiceTests200Response.md b/tests/docs/GetVoiceTests200Response.md new file mode 100644 index 00000000..43e61d8d --- /dev/null +++ b/tests/docs/GetVoiceTests200Response.md @@ -0,0 +1,30 @@ +# GetVoiceTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedVoiceTest]**](UnexpandedVoiceTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_voice_tests200_response import GetVoiceTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetVoiceTests200Response from a JSON string +get_voice_tests200_response_instance = GetVoiceTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetVoiceTests200Response.to_json()) + +# convert the object into a dict +get_voice_tests200_response_dict = get_voice_tests200_response_instance.to_dict() +# create an instance of GetVoiceTests200Response from a dict +get_voice_tests200_response_from_dict = GetVoiceTests200Response.from_dict(get_voice_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/GetWebTransactionsTests200Response.md b/tests/docs/GetWebTransactionsTests200Response.md new file mode 100644 index 00000000..2849276f --- /dev/null +++ b/tests/docs/GetWebTransactionsTests200Response.md @@ -0,0 +1,30 @@ +# GetWebTransactionsTests200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedWebTransactionTest]**](UnexpandedWebTransactionTest.md) | | [optional] +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetWebTransactionsTests200Response from a JSON string +get_web_transactions_tests200_response_instance = GetWebTransactionsTests200Response.from_json(json) +# print the JSON string representation of the object +print(GetWebTransactionsTests200Response.to_json()) + +# convert the object into a dict +get_web_transactions_tests200_response_dict = get_web_transactions_tests200_response_instance.to_dict() +# create an instance of GetWebTransactionsTests200Response from a dict +get_web_transactions_tests200_response_from_dict = GetWebTransactionsTests200Response.from_dict(get_web_transactions_tests200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/HTTPServerApi.md b/tests/docs/HTTPServerApi.md new file mode 100644 index 00000000..f5a78078 --- /dev/null +++ b/tests/docs/HTTPServerApi.md @@ -0,0 +1,458 @@ +# tests.HTTPServerApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_http_server_test**](HTTPServerApi.md#create_http_server_test) | **POST** /v7/tests/http-server | Create HTTP Server test +[**delete_http_server_test**](HTTPServerApi.md#delete_http_server_test) | **DELETE** /v7/tests/http-server/{testId} | Delete HTTP Server test +[**get_http_server_test**](HTTPServerApi.md#get_http_server_test) | **GET** /v7/tests/http-server/{testId} | Get HTTP Server test +[**get_http_server_tests**](HTTPServerApi.md#get_http_server_tests) | **GET** /v7/tests/http-server | List HTTP Server tests +[**update_http_server_test**](HTTPServerApi.md#update_http_server_test) | **PUT** /v7/tests/http-server/{testId} | Update HTTP Server test + + +# **create_http_server_test** +> HttpServerTest create_http_server_test(update_http_server_test, aid=aid, expand=expand) + +Create HTTP Server test + +Creates a new HTTP Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.http_server_test import HttpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.HTTPServerApi(api_client) + update_http_server_test = tests.UpdateHttpServerTest() # UpdateHttpServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create HTTP Server test + api_response = api_instance.create_http_server_test(update_http_server_test, aid=aid, expand=expand) + print("The response of HTTPServerApi->create_http_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HTTPServerApi->create_http_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_http_server_test** | [**UpdateHttpServerTest**](UpdateHttpServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**HttpServerTest**](HttpServerTest.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 | - | +**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) + +# **delete_http_server_test** +> delete_http_server_test(test_id, aid=aid) + +Delete HTTP Server test + +Deletes the specified HTTP Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.HTTPServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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 test + api_instance.delete_http_server_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling HTTPServerApi->delete_http_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_test** +> HttpServerTest get_http_server_test(test_id, aid=aid, expand=expand) + +Get HTTP Server test + +Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.http_server_test import HttpServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.HTTPServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get HTTP Server test + api_response = api_instance.get_http_server_test(test_id, aid=aid, expand=expand) + print("The response of HTTPServerApi->get_http_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HTTPServerApi->get_http_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**HttpServerTest**](HttpServerTest.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_http_server_tests** +> GetHttpServerTests200Response get_http_server_tests(aid=aid) + +List HTTP Server tests + +Returns a list of all HTTP Server tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_http_server_tests200_response import GetHttpServerTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.HTTPServerApi(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 tests + api_response = api_instance.get_http_server_tests(aid=aid) + print("The response of HTTPServerApi->get_http_server_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HTTPServerApi->get_http_server_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 + +[**GetHttpServerTests200Response**](GetHttpServerTests200Response.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) + +# **update_http_server_test** +> HttpServerTest update_http_server_test(test_id, update_http_server_test, aid=aid, expand=expand) + +Update HTTP Server test + +Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.http_server_test import HttpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.HTTPServerApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_http_server_test = tests.UpdateHttpServerTest() # UpdateHttpServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update HTTP Server test + api_response = api_instance.update_http_server_test(test_id, update_http_server_test, aid=aid, expand=expand) + print("The response of HTTPServerApi->update_http_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling HTTPServerApi->update_http_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_http_server_test** | [**UpdateHttpServerTest**](UpdateHttpServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**HttpServerTest**](HttpServerTest.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 | - | +**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) + diff --git a/tests/docs/HttpServerInstantTest.md b/tests/docs/HttpServerInstantTest.md new file mode 100644 index 00000000..920fb5cb --- /dev/null +++ b/tests/docs/HttpServerInstantTest.md @@ -0,0 +1,74 @@ +# HttpServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] +**headers** | **List[str]** | HTTP request headers used. | [optional] +**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'] +**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] +**dns_override** | **str** | IP address to use for DNS override. | [optional] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**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] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.http_server_instant_test import HttpServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpServerInstantTest from a JSON string +http_server_instant_test_instance = HttpServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(HttpServerInstantTest.to_json()) + +# convert the object into a dict +http_server_instant_test_dict = http_server_instant_test_instance.to_dict() +# create an instance of HttpServerInstantTest from a dict +http_server_instant_test_from_dict = HttpServerInstantTest.from_dict(http_server_instant_test_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/tests/docs/HttpServerProperties.md b/tests/docs/HttpServerProperties.md new file mode 100644 index 00000000..283b7ae0 --- /dev/null +++ b/tests/docs/HttpServerProperties.md @@ -0,0 +1,61 @@ +# HttpServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] +**headers** | **List[str]** | HTTP request headers used. | [optional] +**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'] +**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] +**dns_override** | **str** | IP address to use for DNS override. | [optional] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**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] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.http_server_properties import HttpServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpServerProperties from a JSON string +http_server_properties_instance = HttpServerProperties.from_json(json) +# print the JSON string representation of the object +print(HttpServerProperties.to_json()) + +# convert the object into a dict +http_server_properties_dict = http_server_properties_instance.to_dict() +# create an instance of HttpServerProperties from a dict +http_server_properties_from_dict = HttpServerProperties.from_dict(http_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/HttpServerTest.md b/tests/docs/HttpServerTest.md similarity index 91% rename from tests_api/docs/HttpServerTest.md rename to tests/docs/HttpServerTest.md index faa45a24..cf4ee5cb 100644 --- a/tests_api/docs/HttpServerTest.md +++ b/tests/docs/HttpServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] @@ -50,28 +50,31 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.http_server_test import HttpServerTest +from tests.models.http_server_test import HttpServerTest # TODO update the JSON string below json = "{}" # create an instance of HttpServerTest from a JSON string http_server_test_instance = HttpServerTest.from_json(json) # print the JSON string representation of the object -print HttpServerTest.to_json() +print(HttpServerTest.to_json()) # convert the object into a dict http_server_test_dict = http_server_test_instance.to_dict() # create an instance of HttpServerTest from a dict -http_server_test_form_dict = http_server_test.from_dict(http_server_test_dict) +http_server_test_from_dict = HttpServerTest.from_dict(http_server_test_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/tests/docs/HttpServerTests.md b/tests/docs/HttpServerTests.md new file mode 100644 index 00000000..c64ee15f --- /dev/null +++ b/tests/docs/HttpServerTests.md @@ -0,0 +1,29 @@ +# HttpServerTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedHttpServerTest]**](UnexpandedHttpServerTest.md) | | [optional] + +## Example + +```python +from tests.models.http_server_tests import HttpServerTests + +# TODO update the JSON string below +json = "{}" +# create an instance of HttpServerTests from a JSON string +http_server_tests_instance = HttpServerTests.from_json(json) +# print the JSON string representation of the object +print(HttpServerTests.to_json()) + +# convert the object into a dict +http_server_tests_dict = http_server_tests_instance.to_dict() +# create an instance of HttpServerTests from a dict +http_server_tests_from_dict = HttpServerTests.from_dict(http_server_tests_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/tests/docs/InstantTest.md b/tests/docs/InstantTest.md new file mode 100644 index 00000000..ceb32635 --- /dev/null +++ b/tests/docs/InstantTest.md @@ -0,0 +1,41 @@ +# InstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] + +## Example + +```python +from tests.models.instant_test import InstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of InstantTest from a JSON string +instant_test_instance = InstantTest.from_json(json) +# print the JSON string representation of the object +print(InstantTest.to_json()) + +# convert the object into a dict +instant_test_dict = instant_test_instance.to_dict() +# create an instance of InstantTest from a dict +instant_test_from_dict = InstantTest.from_dict(instant_test_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/tests_api/docs/InterfaceGroup.md b/tests/docs/InterfaceGroup.md similarity index 86% rename from tests_api/docs/InterfaceGroup.md rename to tests/docs/InterfaceGroup.md index f8104b73..fcd87c95 100644 --- a/tests_api/docs/InterfaceGroup.md +++ b/tests/docs/InterfaceGroup.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **str** | Account Group Id | [optional] [readonly] @@ -13,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.interface_group import InterfaceGroup +from tests.models.interface_group import InterfaceGroup # TODO update the JSON string below json = "{}" # create an instance of InterfaceGroup from a JSON string interface_group_instance = InterfaceGroup.from_json(json) # print the JSON string representation of the object -print InterfaceGroup.to_json() +print(InterfaceGroup.to_json()) # convert the object into a dict interface_group_dict = interface_group_instance.to_dict() # create an instance of InterfaceGroup from a dict -interface_group_form_dict = interface_group.from_dict(interface_group_dict) +interface_group_from_dict = InterfaceGroup.from_dict(interface_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/tests_api/docs/InterfaceGroups.md b/tests/docs/InterfaceGroups.md similarity index 81% rename from tests_api/docs/InterfaceGroups.md rename to tests/docs/InterfaceGroups.md index c0a95343..bfe070ce 100644 --- a/tests_api/docs/InterfaceGroups.md +++ b/tests/docs/InterfaceGroups.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **path_vis_interface_groups** | [**List[InterfaceGroup]**](InterfaceGroup.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.interface_groups import InterfaceGroups +from tests.models.interface_groups import InterfaceGroups # TODO update the JSON string below json = "{}" # create an instance of InterfaceGroups from a JSON string interface_groups_instance = InterfaceGroups.from_json(json) # print the JSON string representation of the object -print InterfaceGroups.to_json() +print(InterfaceGroups.to_json()) # convert the object into a dict interface_groups_dict = interface_groups_instance.to_dict() # create an instance of InterfaceGroups from a dict -interface_groups_form_dict = interface_groups.from_dict(interface_groups_dict) +interface_groups_from_dict = InterfaceGroups.from_dict(interface_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/tests/docs/Link.md b/tests/docs/Link.md new file mode 100644 index 00000000..e93b8082 --- /dev/null +++ b/tests/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 tests.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/tests/docs/Monitor.md b/tests/docs/Monitor.md new file mode 100644 index 00000000..5a46a3fc --- /dev/null +++ b/tests/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 tests.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/tests/docs/MonitorType.md b/tests/docs/MonitorType.md new file mode 100644 index 00000000..5f7d589b --- /dev/null +++ b/tests/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/tests_api/docs/MonitorsRequest.md b/tests/docs/MonitorsRequest.md similarity index 82% rename from tests_api/docs/MonitorsRequest.md rename to tests/docs/MonitorsRequest.md index 6e510b8e..f801ecf0 100644 --- a/tests_api/docs/MonitorsRequest.md +++ b/tests/docs/MonitorsRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.monitors_request import MonitorsRequest +from tests.models.monitors_request import MonitorsRequest # TODO update the JSON string below json = "{}" # create an instance of MonitorsRequest from a JSON string monitors_request_instance = MonitorsRequest.from_json(json) # print the JSON string representation of the object -print MonitorsRequest.to_json() +print(MonitorsRequest.to_json()) # convert the object into a dict monitors_request_dict = monitors_request_instance.to_dict() # create an instance of MonitorsRequest from a dict -monitors_request_form_dict = monitors_request.from_dict(monitors_request_dict) +monitors_request_from_dict = MonitorsRequest.from_dict(monitors_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/tests_api/docs/PageLoadApi.md b/tests/docs/PageLoadApi.md similarity index 81% rename from tests_api/docs/PageLoadApi.md rename to tests/docs/PageLoadApi.md index 501483f3..8d2e42b9 100644 --- a/tests_api/docs/PageLoadApi.md +++ b/tests/docs/PageLoadApi.md @@ -1,4 +1,4 @@ -# tests_api.PageLoadApi +# tests.PageLoadApi All URIs are relative to *https://api.thousandeyes.com* @@ -21,19 +21,18 @@ Creates a new Page Load test. This method requires Account Admin permissions. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.page_load_test import PageLoadTest -from tests_api.models.update_page_load_test import UpdatePageLoadTest -from tests_api.rest import ApiException +import tests +from tests.models.expand import Expand +from tests.models.page_load_test import PageLoadTest +from tests.models.update_page_load_test import UpdatePageLoadTest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -43,17 +42,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PageLoadApi(api_client) - update_page_load_test = tests_api.UpdatePageLoadTest() # UpdatePageLoadTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + api_instance = tests.PageLoadApi(api_client) + update_page_load_test = tests.UpdatePageLoadTest() # UpdatePageLoadTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Create Page Load test @@ -68,6 +67,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **update_page_load_test** | [**UpdatePageLoadTest**](UpdatePageLoadTest.md)| | @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -112,16 +113,15 @@ Deletes the specified Page Load test. This method requires Account Admin permiss ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.rest import ApiException +import tests +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -131,16 +131,16 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PageLoadApi(api_client) + api_instance = tests.PageLoadApi(api_client) test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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) + 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 Page Load test @@ -153,6 +153,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -169,9 +170,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -186,7 +188,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_page_load_test** -> GetPageLoadTest200Response get_page_load_test(test_id, aid=aid, expand=expand) +> PageLoadTest get_page_load_test(test_id, aid=aid, expand=expand) Get Page Load test @@ -195,18 +197,17 @@ Returns details for a Page Load test, including name, intervals, targets, alert ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response -from tests_api.rest import ApiException +import tests +from tests.models.expand import Expand +from tests.models.page_load_test import PageLoadTest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -216,17 +217,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PageLoadApi(api_client) + api_instance = tests.PageLoadApi(api_client) test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Get Page Load test @@ -241,6 +242,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -249,7 +251,7 @@ Name | Type | Description | Notes ### Return type -[**GetPageLoadTest200Response**](GetPageLoadTest200Response.md) +[**PageLoadTest**](PageLoadTest.md) ### Authorization @@ -261,6 +263,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -284,17 +287,16 @@ Returns a list of all Page Load tests and saved events. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.get_page_load_tests200_response import GetPageLoadTests200Response -from tests_api.rest import ApiException +import tests +from tests.models.get_page_load_tests200_response import GetPageLoadTests200Response +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -304,15 +306,15 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PageLoadApi(api_client) - aid = '2067' # 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) + api_instance = tests.PageLoadApi(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 Page Load tests @@ -327,6 +329,7 @@ with tests_api.ApiClient(configuration) as api_client: ### 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] @@ -345,6 +348,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -359,7 +363,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_page_load_test** -> GetPageLoadTest200Response update_page_load_test(test_id, update_page_load_test, aid=aid, expand=expand) +> PageLoadTest update_page_load_test(test_id, update_page_load_test, aid=aid, expand=expand) Update Page Load test @@ -368,19 +372,18 @@ Updates a Page Load test. The target test cannot be a live share or saved event. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response -from tests_api.models.update_page_load_test import UpdatePageLoadTest -from tests_api.rest import ApiException +import tests +from tests.models.expand import Expand +from tests.models.page_load_test import PageLoadTest +from tests.models.update_page_load_test import UpdatePageLoadTest +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -390,18 +393,18 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PageLoadApi(api_client) + api_instance = tests.PageLoadApi(api_client) test_id = '281474976710706' # str | ID of the test - update_page_load_test = tests_api.UpdatePageLoadTest() # UpdatePageLoadTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + update_page_load_test = tests.UpdatePageLoadTest() # UpdatePageLoadTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) try: # Update Page Load test @@ -416,6 +419,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **test_id** | **str**| ID of the test | @@ -425,7 +429,7 @@ Name | Type | Description | Notes ### Return type -[**GetPageLoadTest200Response**](GetPageLoadTest200Response.md) +[**PageLoadTest**](PageLoadTest.md) ### Authorization @@ -437,6 +441,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/tests/docs/PageLoadInstantTest.md b/tests/docs/PageLoadInstantTest.md new file mode 100644 index 00000000..5a6f9a70 --- /dev/null +++ b/tests/docs/PageLoadInstantTest.md @@ -0,0 +1,77 @@ +# PageLoadInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] +**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.page_load_instant_test import PageLoadInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of PageLoadInstantTest from a JSON string +page_load_instant_test_instance = PageLoadInstantTest.from_json(json) +# print the JSON string representation of the object +print(PageLoadInstantTest.to_json()) + +# convert the object into a dict +page_load_instant_test_dict = page_load_instant_test_instance.to_dict() +# create an instance of PageLoadInstantTest from a dict +page_load_instant_test_from_dict = PageLoadInstantTest.from_dict(page_load_instant_test_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/tests/docs/PageLoadProperties.md b/tests/docs/PageLoadProperties.md new file mode 100644 index 00000000..9daf506a --- /dev/null +++ b/tests/docs/PageLoadProperties.md @@ -0,0 +1,64 @@ +# PageLoadProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] +**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.page_load_properties import PageLoadProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of PageLoadProperties from a JSON string +page_load_properties_instance = PageLoadProperties.from_json(json) +# print the JSON string representation of the object +print(PageLoadProperties.to_json()) + +# convert the object into a dict +page_load_properties_dict = page_load_properties_instance.to_dict() +# create an instance of PageLoadProperties from a dict +page_load_properties_from_dict = PageLoadProperties.from_dict(page_load_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/PageLoadTest.md b/tests/docs/PageLoadTest.md similarity index 89% rename from tests_api/docs/PageLoadTest.md rename to tests/docs/PageLoadTest.md index 9b44b3bf..96b7bf4b 100644 --- a/tests_api/docs/PageLoadTest.md +++ b/tests/docs/PageLoadTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,12 +22,12 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] **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'] **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] @@ -48,6 +49,7 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] **disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] **allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] @@ -55,27 +57,29 @@ Name | Type | Description | Notes **browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | +**http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | [optional] **subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] ## Example ```python -from tests_api.models.page_load_test import PageLoadTest +from tests.models.page_load_test import PageLoadTest # TODO update the JSON string below json = "{}" # create an instance of PageLoadTest from a JSON string page_load_test_instance = PageLoadTest.from_json(json) # print the JSON string representation of the object -print PageLoadTest.to_json() +print(PageLoadTest.to_json()) # convert the object into a dict page_load_test_dict = page_load_test_instance.to_dict() # create an instance of PageLoadTest from a dict -page_load_test_form_dict = page_load_test.from_dict(page_load_test_dict) +page_load_test_from_dict = PageLoadTest.from_dict(page_load_test_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/tests/docs/PageLoadTests.md b/tests/docs/PageLoadTests.md new file mode 100644 index 00000000..9d501a21 --- /dev/null +++ b/tests/docs/PageLoadTests.md @@ -0,0 +1,29 @@ +# PageLoadTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedPageLoadTest]**](UnexpandedPageLoadTest.md) | | [optional] + +## Example + +```python +from tests.models.page_load_tests import PageLoadTests + +# TODO update the JSON string below +json = "{}" +# create an instance of PageLoadTests from a JSON string +page_load_tests_instance = PageLoadTests.from_json(json) +# print the JSON string representation of the object +print(PageLoadTests.to_json()) + +# convert the object into a dict +page_load_tests_dict = page_load_tests_instance.to_dict() +# create an instance of PageLoadTests from a dict +page_load_tests_from_dict = PageLoadTests.from_dict(page_load_tests_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/tests_api/docs/PathVisualizationInterfaceGroupsApi.md b/tests/docs/PathVisualizationInterfaceGroupsApi.md similarity index 85% rename from tests_api/docs/PathVisualizationInterfaceGroupsApi.md rename to tests/docs/PathVisualizationInterfaceGroupsApi.md index 58bf7c13..366f679f 100644 --- a/tests_api/docs/PathVisualizationInterfaceGroupsApi.md +++ b/tests/docs/PathVisualizationInterfaceGroupsApi.md @@ -1,4 +1,4 @@ -# tests_api.PathVisualizationInterfaceGroupsApi +# tests.PathVisualizationInterfaceGroupsApi All URIs are relative to *https://api.thousandeyes.com* @@ -20,17 +20,16 @@ Creates a new path visualization interface group. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.interface_group import InterfaceGroup -from tests_api.rest import ApiException +import tests +from tests.models.interface_group import InterfaceGroup +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -40,16 +39,16 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PathVisualizationInterfaceGroupsApi(api_client) - interface_group = tests_api.InterfaceGroup() # InterfaceGroup | - aid = '2067' # 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) + api_instance = tests.PathVisualizationInterfaceGroupsApi(api_client) + interface_group = tests.InterfaceGroup() # InterfaceGroup | + 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 interface group for path visualization @@ -64,6 +63,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **interface_group** | [**InterfaceGroup**](InterfaceGroup.md)| | @@ -83,6 +83,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **201** | Created | * Location -
| @@ -107,16 +108,15 @@ Deletes a path visualization interface group. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.rest import ApiException +import tests +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -126,16 +126,16 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PathVisualizationInterfaceGroupsApi(api_client) + api_instance = tests.PathVisualizationInterfaceGroupsApi(api_client) interface_group_id = '281474976710706' # str | ID of the network path vis interface group - aid = '2067' # 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) + 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 interface group @@ -148,6 +148,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **interface_group_id** | **str**| ID of the network path vis interface group | @@ -164,9 +165,10 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/problem+json + - **Accept**: application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **204** | No content | - | @@ -190,17 +192,16 @@ Returns a list of all path visualization interface groups. For more information ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response -from tests_api.rest import ApiException +import tests +from tests.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -210,15 +211,15 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PathVisualizationInterfaceGroupsApi(api_client) - aid = '2067' # 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) + api_instance = tests.PathVisualizationInterfaceGroupsApi(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 interface groups for path visualization @@ -233,6 +234,7 @@ with tests_api.ApiClient(configuration) as api_client: ### 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] @@ -251,6 +253,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | @@ -265,7 +268,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_path_vis_interface_group** -> UpdatePathVisInterfaceGroup200Response update_path_vis_interface_group(interface_group_id, interface_group, aid=aid) +> InterfaceGroup update_path_vis_interface_group(interface_group_id, interface_group, aid=aid) Update interface group @@ -274,18 +277,16 @@ Updates a path visualization interface group.. ### Example * Bearer Authentication (BearerAuth): + ```python -import time -import os -import tests_api -from tests_api.models.interface_group import InterfaceGroup -from tests_api.models.update_path_vis_interface_group200_response import UpdatePathVisInterfaceGroup200Response -from tests_api.rest import ApiException +import tests +from tests.models.interface_group import InterfaceGroup +from 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 = tests_api.Configuration( +configuration = tests.Configuration( host = "https://api.thousandeyes.com" ) @@ -295,17 +296,17 @@ configuration = tests_api.Configuration( # satisfies your auth use case. # Configure Bearer authorization: BearerAuth -configuration = tests_api.Configuration( +configuration = tests.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: +with tests.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = tests_api.PathVisualizationInterfaceGroupsApi(api_client) + api_instance = tests.PathVisualizationInterfaceGroupsApi(api_client) interface_group_id = '281474976710706' # str | ID of the network path vis interface group - interface_group = tests_api.InterfaceGroup() # InterfaceGroup | - aid = '2067' # 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) + interface_group = tests.InterfaceGroup() # InterfaceGroup | + 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 interface group @@ -320,6 +321,7 @@ with tests_api.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **interface_group_id** | **str**| ID of the network path vis interface group | @@ -328,7 +330,7 @@ Name | Type | Description | Notes ### Return type -[**UpdatePathVisInterfaceGroup200Response**](UpdatePathVisInterfaceGroup200Response.md) +[**InterfaceGroup**](InterfaceGroup.md) ### Authorization @@ -340,6 +342,7 @@ Name | Type | Description | Notes - **Accept**: application/hal+json, application/problem+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | diff --git a/tests/docs/SIPServerApi.md b/tests/docs/SIPServerApi.md new file mode 100644 index 00000000..f093d8e7 --- /dev/null +++ b/tests/docs/SIPServerApi.md @@ -0,0 +1,456 @@ +# tests.SIPServerApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_sip_server_test**](SIPServerApi.md#create_sip_server_test) | **POST** /v7/tests/sip-server | Create SIP Server test +[**delete_sip_server_test**](SIPServerApi.md#delete_sip_server_test) | **DELETE** /v7/tests/sip-server/{testId} | Delete SIP Server test +[**get_sip_server_test**](SIPServerApi.md#get_sip_server_test) | **GET** /v7/tests/sip-server/{testId} | Get SIP Server test +[**get_sip_server_tests**](SIPServerApi.md#get_sip_server_tests) | **GET** /v7/tests/sip-server | List SIP Server tests +[**update_sip_server_test**](SIPServerApi.md#update_sip_server_test) | **PUT** /v7/tests/sip-server/{testId} | Update SIP Server test + + +# **create_sip_server_test** +> SipServerTest create_sip_server_test(update_sip_server_test, aid=aid, expand=expand) + +Create SIP Server test + +Creates a new SIP Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.sip_server_test import SipServerTest +from tests.models.update_sip_server_test import UpdateSipServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.SIPServerApi(api_client) + update_sip_server_test = tests.UpdateSipServerTest() # UpdateSipServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create SIP Server test + api_response = api_instance.create_sip_server_test(update_sip_server_test, aid=aid, expand=expand) + print("The response of SIPServerApi->create_sip_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SIPServerApi->create_sip_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_sip_server_test** | [**UpdateSipServerTest**](UpdateSipServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**SipServerTest**](SipServerTest.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 | - | +**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) + +# **delete_sip_server_test** +> delete_sip_server_test(test_id, aid=aid) + +Delete SIP Server test + +Deletes the specified SIP Server test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.SIPServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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 SIP Server test + api_instance.delete_sip_server_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling SIPServerApi->delete_sip_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_sip_server_test** +> SipServerTest get_sip_server_test(test_id, aid=aid, expand=expand) + +Get SIP Server test + +Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.sip_server_test import SipServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.SIPServerApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get SIP Server test + api_response = api_instance.get_sip_server_test(test_id, aid=aid, expand=expand) + print("The response of SIPServerApi->get_sip_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SIPServerApi->get_sip_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**SipServerTest**](SipServerTest.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_sip_server_tests** +> GetSipServerTests200Response get_sip_server_tests(aid=aid) + +List SIP Server tests + +Returns a list of SIP Server tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_sip_server_tests200_response import GetSipServerTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.SIPServerApi(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 SIP Server tests + api_response = api_instance.get_sip_server_tests(aid=aid) + print("The response of SIPServerApi->get_sip_server_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SIPServerApi->get_sip_server_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 + +[**GetSipServerTests200Response**](GetSipServerTests200Response.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) + +# **update_sip_server_test** +> SipServerTest update_sip_server_test(test_id, update_sip_server_test, aid=aid, expand=expand) + +Update SIP Server test + +Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.sip_server_test import SipServerTest +from tests.models.update_sip_server_test import UpdateSipServerTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.SIPServerApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_sip_server_test = tests.UpdateSipServerTest() # UpdateSipServerTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update SIP Server test + api_response = api_instance.update_sip_server_test(test_id, update_sip_server_test, aid=aid, expand=expand) + print("The response of SIPServerApi->update_sip_server_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling SIPServerApi->update_sip_server_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_sip_server_test** | [**UpdateSipServerTest**](UpdateSipServerTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**SipServerTest**](SipServerTest.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 | - | +**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) + diff --git a/tests/docs/SelfLinks.md b/tests/docs/SelfLinks.md new file mode 100644 index 00000000..a56f7b30 --- /dev/null +++ b/tests/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from tests.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/tests/docs/SelfLinksLinks.md b/tests/docs/SelfLinksLinks.md new file mode 100644 index 00000000..41b3b734 --- /dev/null +++ b/tests/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from tests.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/tests/docs/Severity.md b/tests/docs/Severity.md new file mode 100644 index 00000000..3abd8037 --- /dev/null +++ b/tests/docs/Severity.md @@ -0,0 +1,12 @@ +# Severity + +The severity of the alert. + +## 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/tests/docs/SimpleAgent.md b/tests/docs/SimpleAgent.md new file mode 100644 index 00000000..1b703b66 --- /dev/null +++ b/tests/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 tests.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/tests/docs/SimpleTest.md b/tests/docs/SimpleTest.md new file mode 100644 index 00000000..9e01592b --- /dev/null +++ b/tests/docs/SimpleTest.md @@ -0,0 +1,43 @@ +# SimpleTest + +Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] + +## Example + +```python +from tests.models.simple_test import SimpleTest + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleTest from a JSON string +simple_test_instance = SimpleTest.from_json(json) +# print the JSON string representation of the object +print(SimpleTest.to_json()) + +# convert the object into a dict +simple_test_dict = simple_test_instance.to_dict() +# create an instance of SimpleTest from a dict +simple_test_from_dict = SimpleTest.from_dict(simple_test_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/tests/docs/SipServerInstantTest.md b/tests/docs/SipServerInstantTest.md new file mode 100644 index 00000000..941d3457 --- /dev/null +++ b/tests/docs/SipServerInstantTest.md @@ -0,0 +1,53 @@ +# SipServerInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.sip_server_instant_test import SipServerInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTest from a JSON string +sip_server_instant_test_instance = SipServerInstantTest.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTest.to_json()) + +# convert the object into a dict +sip_server_instant_test_dict = sip_server_instant_test_instance.to_dict() +# create an instance of SipServerInstantTest from a dict +sip_server_instant_test_from_dict = SipServerInstantTest.from_dict(sip_server_instant_test_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/tests/docs/SipServerInstantTestRequest.md b/tests/docs/SipServerInstantTestRequest.md new file mode 100644 index 00000000..dd3e93f3 --- /dev/null +++ b/tests/docs/SipServerInstantTestRequest.md @@ -0,0 +1,54 @@ +# SipServerInstantTestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | + +## Example + +```python +from tests.models.sip_server_instant_test_request import SipServerInstantTestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTestRequest from a JSON string +sip_server_instant_test_request_instance = SipServerInstantTestRequest.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTestRequest.to_json()) + +# convert the object into a dict +sip_server_instant_test_request_dict = sip_server_instant_test_request_instance.to_dict() +# create an instance of SipServerInstantTestRequest from a dict +sip_server_instant_test_request_from_dict = SipServerInstantTestRequest.from_dict(sip_server_instant_test_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/tests/docs/SipServerInstantTestResponse.md b/tests/docs/SipServerInstantTestResponse.md new file mode 100644 index 00000000..feb94710 --- /dev/null +++ b/tests/docs/SipServerInstantTestResponse.md @@ -0,0 +1,59 @@ +# SipServerInstantTestResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**auth_user** | **str** | Username for authentication with SIP server. | [optional] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**port** | **int** | Target port. | [default to 49153] +**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] +**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] + +## Example + +```python +from tests.models.sip_server_instant_test_response import SipServerInstantTestResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerInstantTestResponse from a JSON string +sip_server_instant_test_response_instance = SipServerInstantTestResponse.from_json(json) +# print the JSON string representation of the object +print(SipServerInstantTestResponse.to_json()) + +# convert the object into a dict +sip_server_instant_test_response_dict = sip_server_instant_test_response_instance.to_dict() +# create an instance of SipServerInstantTestResponse from a dict +sip_server_instant_test_response_from_dict = SipServerInstantTestResponse.from_dict(sip_server_instant_test_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/SipServerProperties.md b/tests/docs/SipServerProperties.md new file mode 100644 index 00000000..79687fc1 --- /dev/null +++ b/tests/docs/SipServerProperties.md @@ -0,0 +1,40 @@ +# SipServerProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.sip_server_properties import SipServerProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerProperties from a JSON string +sip_server_properties_instance = SipServerProperties.from_json(json) +# print the JSON string representation of the object +print(SipServerProperties.to_json()) + +# convert the object into a dict +sip_server_properties_dict = sip_server_properties_instance.to_dict() +# create an instance of SipServerProperties from a dict +sip_server_properties_from_dict = SipServerProperties.from_dict(sip_server_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/SipServerTest.md b/tests/docs/SipServerTest.md similarity index 85% rename from tests_api/docs/SipServerTest.md rename to tests/docs/SipServerTest.md index 86f2731b..da73c5af 100644 --- a/tests_api/docs/SipServerTest.md +++ b/tests/docs/SipServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,41 +22,44 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_user** | **str** | Username for authentication with SIP server. | [optional] **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] **options_regex** | **str** | Options regex, this field does not require escaping. | [optional] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] **path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [default to 49153] -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] **register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] **sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] **sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] -**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**auth_user** | **str** | Username for authentication with SIP server. | [optional] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**port** | **int** | Target port. | [default to 49153] +**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] +**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.sip_server_test import SipServerTest +from tests.models.sip_server_test import SipServerTest # TODO update the JSON string below json = "{}" # create an instance of SipServerTest from a JSON string sip_server_test_instance = SipServerTest.from_json(json) # print the JSON string representation of the object -print SipServerTest.to_json() +print(SipServerTest.to_json()) # convert the object into a dict sip_server_test_dict = sip_server_test_instance.to_dict() # create an instance of SipServerTest from a dict -sip_server_test_form_dict = sip_server_test.from_dict(sip_server_test_dict) +sip_server_test_from_dict = SipServerTest.from_dict(sip_server_test_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/tests/docs/SipServerTests.md b/tests/docs/SipServerTests.md new file mode 100644 index 00000000..d9164ac9 --- /dev/null +++ b/tests/docs/SipServerTests.md @@ -0,0 +1,29 @@ +# SipServerTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedSipServerTest]**](UnexpandedSipServerTest.md) | | [optional] + +## Example + +```python +from tests.models.sip_server_tests import SipServerTests + +# TODO update the JSON string below +json = "{}" +# create an instance of SipServerTests from a JSON string +sip_server_tests_instance = SipServerTests.from_json(json) +# print the JSON string representation of the object +print(SipServerTests.to_json()) + +# convert the object into a dict +sip_server_tests_dict = sip_server_tests_instance.to_dict() +# create an instance of SipServerTests from a dict +sip_server_tests_from_dict = SipServerTests.from_dict(sip_server_tests_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/tests/docs/SipTestProtocol.md b/tests/docs/SipTestProtocol.md new file mode 100644 index 00000000..1bb598f2 --- /dev/null +++ b/tests/docs/SipTestProtocol.md @@ -0,0 +1,12 @@ +# SipTestProtocol + +Transport layer for SIP communication. + +## 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/tests/docs/TestAuthType.md b/tests/docs/TestAuthType.md new file mode 100644 index 00000000..8b16a105 --- /dev/null +++ b/tests/docs/TestAuthType.md @@ -0,0 +1,12 @@ +# TestAuthType + +HTTP authentication type. + +## 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/tests/docs/TestCustomHeaders.md b/tests/docs/TestCustomHeaders.md new file mode 100644 index 00000000..32d92c16 --- /dev/null +++ b/tests/docs/TestCustomHeaders.md @@ -0,0 +1,31 @@ +# TestCustomHeaders + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**root** | **Dict[str, str]** | Use these HTTP headers for root server request. | [optional] +**domains** | **Dict[str, Dict[str, str]]** | Use these HTTP headers for the specified domains. | [optional] +**all** | **Dict[str, str]** | Use these HTTP headers for all domains. | [optional] + +## Example + +```python +from tests.models.test_custom_headers import TestCustomHeaders + +# TODO update the JSON string below +json = "{}" +# create an instance of TestCustomHeaders from a JSON string +test_custom_headers_instance = TestCustomHeaders.from_json(json) +# print the JSON string representation of the object +print(TestCustomHeaders.to_json()) + +# convert the object into a dict +test_custom_headers_dict = test_custom_headers_instance.to_dict() +# create an instance of TestCustomHeaders from a dict +test_custom_headers_from_dict = TestCustomHeaders.from_dict(test_custom_headers_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/tests/docs/TestDirection.md b/tests/docs/TestDirection.md new file mode 100644 index 00000000..27747f93 --- /dev/null +++ b/tests/docs/TestDirection.md @@ -0,0 +1,12 @@ +# TestDirection + +Direction of the test, which affects how results are shown. + +## 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/tests/docs/TestDnsServer.md b/tests/docs/TestDnsServer.md new file mode 100644 index 00000000..73a254ff --- /dev/null +++ b/tests/docs/TestDnsServer.md @@ -0,0 +1,30 @@ +# TestDnsServer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_id** | **str** | Unique identifier of the DNS server. | [optional] +**server_name** | **str** | Fully qualified domain name (FQDN) of DNS server. | [optional] + +## Example + +```python +from tests.models.test_dns_server import TestDnsServer + +# TODO update the JSON string below +json = "{}" +# create an instance of TestDnsServer from a JSON string +test_dns_server_instance = TestDnsServer.from_json(json) +# print the JSON string representation of the object +print(TestDnsServer.to_json()) + +# convert the object into a dict +test_dns_server_dict = test_dns_server_instance.to_dict() +# create an instance of TestDnsServer from a dict +test_dns_server_from_dict = TestDnsServer.from_dict(test_dns_server_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/tests/docs/TestDnsTransportProtocol.md b/tests/docs/TestDnsTransportProtocol.md new file mode 100644 index 00000000..44d75f1f --- /dev/null +++ b/tests/docs/TestDnsTransportProtocol.md @@ -0,0 +1,12 @@ +# TestDnsTransportProtocol + +Transport protocol used for DNS requests. + +## 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/tests/docs/TestDscpId.md b/tests/docs/TestDscpId.md new file mode 100644 index 00000000..f061ff55 --- /dev/null +++ b/tests/docs/TestDscpId.md @@ -0,0 +1,12 @@ +# TestDscpId + +DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) + +## 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/tests_api/docs/TestHttpInterval.md b/tests/docs/TestHttpInterval.md similarity index 99% rename from tests_api/docs/TestHttpInterval.md rename to tests/docs/TestHttpInterval.md index a6b1fde9..737a2960 100644 --- a/tests_api/docs/TestHttpInterval.md +++ b/tests/docs/TestHttpInterval.md @@ -3,6 +3,7 @@ HTTP test run interval. The interval between HTTP test runs in seconds cannot exceed the specified interval value and defaults to the same value as the interval if not set. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/tests/docs/TestInterval.md b/tests/docs/TestInterval.md new file mode 100644 index 00000000..6f14970f --- /dev/null +++ b/tests/docs/TestInterval.md @@ -0,0 +1,12 @@ +# TestInterval + +Interval between test runs in seconds. + +## 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/tests/docs/TestIpv6Policy.md b/tests/docs/TestIpv6Policy.md new file mode 100644 index 00000000..c13e4258 --- /dev/null +++ b/tests/docs/TestIpv6Policy.md @@ -0,0 +1,12 @@ +# TestIpv6Policy + +IP version policy. Overrides the IPv6 policy configured at the agent level. + +## 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/tests/docs/TestLabelsInner.md b/tests/docs/TestLabelsInner.md new file mode 100644 index 00000000..d2ebd558 --- /dev/null +++ b/tests/docs/TestLabelsInner.md @@ -0,0 +1,31 @@ +# TestLabelsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label_id** | **str** | Label ID. | [optional] +**name** | **str** | Name of the label. | [optional] +**is_builtin** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] + +## Example + +```python +from tests.models.test_labels_inner import TestLabelsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestLabelsInner from a JSON string +test_labels_inner_instance = TestLabelsInner.from_json(json) +# print the JSON string representation of the object +print(TestLabelsInner.to_json()) + +# convert the object into a dict +test_labels_inner_dict = test_labels_inner_instance.to_dict() +# create an instance of TestLabelsInner from a dict +test_labels_inner_from_dict = TestLabelsInner.from_dict(test_labels_inner_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/tests/docs/TestMonitorsProperties.md b/tests/docs/TestMonitorsProperties.md new file mode 100644 index 00000000..b9882b11 --- /dev/null +++ b/tests/docs/TestMonitorsProperties.md @@ -0,0 +1,31 @@ +# TestMonitorsProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] + +## Example + +```python +from tests.models.test_monitors_properties import TestMonitorsProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of TestMonitorsProperties from a JSON string +test_monitors_properties_instance = TestMonitorsProperties.from_json(json) +# print the JSON string representation of the object +print(TestMonitorsProperties.to_json()) + +# convert the object into a dict +test_monitors_properties_dict = test_monitors_properties_instance.to_dict() +# create an instance of TestMonitorsProperties from a dict +test_monitors_properties_from_dict = TestMonitorsProperties.from_dict(test_monitors_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests/docs/TestPageLoadingStrategy.md b/tests/docs/TestPageLoadingStrategy.md new file mode 100644 index 00000000..c8413cc8 --- /dev/null +++ b/tests/docs/TestPageLoadingStrategy.md @@ -0,0 +1,12 @@ +# TestPageLoadingStrategy + +* `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. + +## 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/tests/docs/TestPathTraceMode.md b/tests/docs/TestPathTraceMode.md new file mode 100644 index 00000000..53d53a32 --- /dev/null +++ b/tests/docs/TestPathTraceMode.md @@ -0,0 +1,12 @@ +# TestPathTraceMode + +Select `inSession` to perform the path trace within a TCP session. + +## 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/tests/docs/TestProbeMode.md b/tests/docs/TestProbeMode.md new file mode 100644 index 00000000..78dc8563 --- /dev/null +++ b/tests/docs/TestProbeMode.md @@ -0,0 +1,12 @@ +# TestProbeMode + +Probe mode used by network test, only valid when the protocol is set to TCP. + +## 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/tests/docs/TestProtocol.md b/tests/docs/TestProtocol.md new file mode 100644 index 00000000..bf59ffa0 --- /dev/null +++ b/tests/docs/TestProtocol.md @@ -0,0 +1,12 @@ +# TestProtocol + +Protocol used by dependent network tests (end-to-end, path trace, PMTUD). + +## 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/tests_api/docs/TestRequest.md b/tests/docs/TestRequest.md similarity index 91% rename from tests_api/docs/TestRequest.md rename to tests/docs/TestRequest.md index 487d767a..d788b806 100644 --- a/tests_api/docs/TestRequest.md +++ b/tests/docs/TestRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **labels** | **List[str]** | Contains list of test label IDs (get `labelId` from `/labels` endpoint) | [optional] @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.test_request import TestRequest +from tests.models.test_request import TestRequest # TODO update the JSON string below json = "{}" # create an instance of TestRequest from a JSON string test_request_instance = TestRequest.from_json(json) # print the JSON string representation of the object -print TestRequest.to_json() +print(TestRequest.to_json()) # convert the object into a dict test_request_dict = test_request_instance.to_dict() # create an instance of TestRequest from a dict -test_request_form_dict = test_request.from_dict(test_request_dict) +test_request_from_dict = TestRequest.from_dict(test_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/tests_api/docs/TestRequestAllOfAgents.md b/tests/docs/TestRequestAllOfAgents.md similarity index 82% rename from tests_api/docs/TestRequestAllOfAgents.md rename to tests/docs/TestRequestAllOfAgents.md index 70f0ba68..64aa6076 100644 --- a/tests_api/docs/TestRequestAllOfAgents.md +++ b/tests/docs/TestRequestAllOfAgents.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **agent_id** | **str** | Agent Id (get `agentId` from `/agents` endpoint) | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents # TODO update the JSON string below json = "{}" # create an instance of TestRequestAllOfAgents from a JSON string test_request_all_of_agents_instance = TestRequestAllOfAgents.from_json(json) # print the JSON string representation of the object -print TestRequestAllOfAgents.to_json() +print(TestRequestAllOfAgents.to_json()) # convert the object into a dict test_request_all_of_agents_dict = test_request_all_of_agents_instance.to_dict() # create an instance of TestRequestAllOfAgents from a dict -test_request_all_of_agents_form_dict = test_request_all_of_agents.from_dict(test_request_all_of_agents_dict) +test_request_all_of_agents_from_dict = TestRequestAllOfAgents.from_dict(test_request_all_of_agents_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/tests/docs/TestSharedAccountsInner.md b/tests/docs/TestSharedAccountsInner.md new file mode 100644 index 00000000..32fa0b57 --- /dev/null +++ b/tests/docs/TestSharedAccountsInner.md @@ -0,0 +1,30 @@ +# TestSharedAccountsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | Account group ID. | [optional] +**name** | **str** | Account group name. | [optional] + +## Example + +```python +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TestSharedAccountsInner from a JSON string +test_shared_accounts_inner_instance = TestSharedAccountsInner.from_json(json) +# print the JSON string representation of the object +print(TestSharedAccountsInner.to_json()) + +# convert the object into a dict +test_shared_accounts_inner_dict = test_shared_accounts_inner_instance.to_dict() +# create an instance of TestSharedAccountsInner from a dict +test_shared_accounts_inner_from_dict = TestSharedAccountsInner.from_dict(test_shared_accounts_inner_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/tests/docs/TestSipCredentials.md b/tests/docs/TestSipCredentials.md new file mode 100644 index 00000000..ee4b0fd8 --- /dev/null +++ b/tests/docs/TestSipCredentials.md @@ -0,0 +1,34 @@ +# TestSipCredentials + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_user** | **str** | Username for authentication with SIP server. | [optional] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**port** | **int** | Target port. | [default to 49153] +**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] +**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] + +## Example + +```python +from tests.models.test_sip_credentials import TestSipCredentials + +# TODO update the JSON string below +json = "{}" +# create an instance of TestSipCredentials from a JSON string +test_sip_credentials_instance = TestSipCredentials.from_json(json) +# print the JSON string representation of the object +print(TestSipCredentials.to_json()) + +# convert the object into a dict +test_sip_credentials_dict = test_sip_credentials_instance.to_dict() +# create an instance of TestSipCredentials from a dict +test_sip_credentials_from_dict = TestSipCredentials.from_dict(test_sip_credentials_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/tests/docs/TestSslVersionId.md b/tests/docs/TestSslVersionId.md new file mode 100644 index 00000000..f13419ab --- /dev/null +++ b/tests/docs/TestSslVersionId.md @@ -0,0 +1,12 @@ +# TestSslVersionId + +SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + +## 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/tests_api/docs/TestSubInterval.md b/tests/docs/TestSubInterval.md similarity index 99% rename from tests_api/docs/TestSubInterval.md rename to tests/docs/TestSubInterval.md index b693f998..e068578a 100644 --- a/tests_api/docs/TestSubInterval.md +++ b/tests/docs/TestSubInterval.md @@ -3,6 +3,7 @@ Subinterval for round-robin testing (in seconds). Must be less than or equal to interval and must evenly divide interval. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/tests/docs/TestType.md b/tests/docs/TestType.md new file mode 100644 index 00000000..8093a739 --- /dev/null +++ b/tests/docs/TestType.md @@ -0,0 +1,12 @@ +# TestType + +This is a read only value, as test type is implicit in the test creation url. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/Tests.md b/tests/docs/Tests.md similarity index 86% rename from tests_api/docs/Tests.md rename to tests/docs/Tests.md index 851d2434..2c628aa2 100644 --- a/tests_api/docs/Tests.md +++ b/tests/docs/Tests.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tests** | [**List[SimpleTest]**](SimpleTest.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from tests_api.models.tests import Tests +from tests.models.tests import Tests # TODO update the JSON string below json = "{}" # create an instance of Tests from a JSON string tests_instance = Tests.from_json(json) # print the JSON string representation of the object -print Tests.to_json() +print(Tests.to_json()) # convert the object into a dict tests_dict = tests_instance.to_dict() # create an instance of Tests from a dict -tests_form_dict = tests.from_dict(tests_dict) +tests_from_dict = Tests.from_dict(tests_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/tests/docs/UnauthorizedError.md b/tests/docs/UnauthorizedError.md new file mode 100644 index 00000000..c2376863 --- /dev/null +++ b/tests/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from tests.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/tests/docs/UnexpandedAgentToAgentTest.md b/tests/docs/UnexpandedAgentToAgentTest.md new file mode 100644 index 00000000..0ea5a066 --- /dev/null +++ b/tests/docs/UnexpandedAgentToAgentTest.md @@ -0,0 +1,57 @@ +# UnexpandedAgentToAgentTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**direction** | [**TestDirection**](TestDirection.md) | | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**mss** | **int** | Maximum segment size, in bytes. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] +**target_agent_id** | **str** | `agentId` of the target agent for the test. | +**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] +**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] +**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_agent_to_agent_test import UnexpandedAgentToAgentTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedAgentToAgentTest from a JSON string +unexpanded_agent_to_agent_test_instance = UnexpandedAgentToAgentTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedAgentToAgentTest.to_json()) + +# convert the object into a dict +unexpanded_agent_to_agent_test_dict = unexpanded_agent_to_agent_test_instance.to_dict() +# create an instance of UnexpandedAgentToAgentTest from a dict +unexpanded_agent_to_agent_test_from_dict = UnexpandedAgentToAgentTest.from_dict(unexpanded_agent_to_agent_test_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/tests/docs/UnexpandedAgentToServerTest.md b/tests/docs/UnexpandedAgentToServerTest.md new file mode 100644 index 00000000..7c2416c8 --- /dev/null +++ b/tests/docs/UnexpandedAgentToServerTest.md @@ -0,0 +1,59 @@ +# UnexpandedAgentToServerTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] +**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] +**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**port** | **int** | Target port. | [optional] [default to 49153] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**server** | **str** | Target name or IP address. | +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] +**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_agent_to_server_test import UnexpandedAgentToServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedAgentToServerTest from a JSON string +unexpanded_agent_to_server_test_instance = UnexpandedAgentToServerTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedAgentToServerTest.to_json()) + +# convert the object into a dict +unexpanded_agent_to_server_test_dict = unexpanded_agent_to_server_test_instance.to_dict() +# create an instance of UnexpandedAgentToServerTest from a dict +unexpanded_agent_to_server_test_from_dict = UnexpandedAgentToServerTest.from_dict(unexpanded_agent_to_server_test_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/tests/docs/UnexpandedBgpTest.md b/tests/docs/UnexpandedBgpTest.md new file mode 100644 index 00000000..9f26b8e6 --- /dev/null +++ b/tests/docs/UnexpandedBgpTest.md @@ -0,0 +1,44 @@ +# UnexpandedBgpTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**include_covered_prefixes** | **bool** | Indicate if queries for subprefixes detected under this prefix should included. | [optional] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**prefix** | **str** | a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24. | + +## Example + +```python +from tests.models.unexpanded_bgp_test import UnexpandedBgpTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedBgpTest from a JSON string +unexpanded_bgp_test_instance = UnexpandedBgpTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedBgpTest.to_json()) + +# convert the object into a dict +unexpanded_bgp_test_dict = unexpanded_bgp_test_instance.to_dict() +# create an instance of UnexpandedBgpTest from a dict +unexpanded_bgp_test_from_dict = UnexpandedBgpTest.from_dict(unexpanded_bgp_test_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/tests/docs/UnexpandedDnsSecTest.md b/tests/docs/UnexpandedDnsSecTest.md new file mode 100644 index 00000000..5d52ba26 --- /dev/null +++ b/tests/docs/UnexpandedDnsSecTest.md @@ -0,0 +1,44 @@ +# UnexpandedDnsSecTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] + +## Example + +```python +from tests.models.unexpanded_dns_sec_test import UnexpandedDnsSecTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedDnsSecTest from a JSON string +unexpanded_dns_sec_test_instance = UnexpandedDnsSecTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedDnsSecTest.to_json()) + +# convert the object into a dict +unexpanded_dns_sec_test_dict = unexpanded_dns_sec_test_instance.to_dict() +# create an instance of UnexpandedDnsSecTest from a dict +unexpanded_dns_sec_test_from_dict = UnexpandedDnsSecTest.from_dict(unexpanded_dns_sec_test_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/tests/docs/UnexpandedDnsServerTest.md b/tests/docs/UnexpandedDnsServerTest.md new file mode 100644 index 00000000..54eceb54 --- /dev/null +++ b/tests/docs/UnexpandedDnsServerTest.md @@ -0,0 +1,58 @@ +# UnexpandedDnsServerTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**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] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_dns_server_test import UnexpandedDnsServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedDnsServerTest from a JSON string +unexpanded_dns_server_test_instance = UnexpandedDnsServerTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedDnsServerTest.to_json()) + +# convert the object into a dict +unexpanded_dns_server_test_dict = unexpanded_dns_server_test_instance.to_dict() +# create an instance of UnexpandedDnsServerTest from a dict +unexpanded_dns_server_test_from_dict = UnexpandedDnsServerTest.from_dict(unexpanded_dns_server_test_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/tests/docs/UnexpandedDnsTraceTest.md b/tests/docs/UnexpandedDnsTraceTest.md new file mode 100644 index 00000000..8d60ec72 --- /dev/null +++ b/tests/docs/UnexpandedDnsTraceTest.md @@ -0,0 +1,45 @@ +# UnexpandedDnsTraceTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] +**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | +**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] + +## Example + +```python +from tests.models.unexpanded_dns_trace_test import UnexpandedDnsTraceTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedDnsTraceTest from a JSON string +unexpanded_dns_trace_test_instance = UnexpandedDnsTraceTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedDnsTraceTest.to_json()) + +# convert the object into a dict +unexpanded_dns_trace_test_dict = unexpanded_dns_trace_test_instance.to_dict() +# create an instance of UnexpandedDnsTraceTest from a dict +unexpanded_dns_trace_test_from_dict = UnexpandedDnsTraceTest.from_dict(unexpanded_dns_trace_test_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/tests/docs/UnexpandedFtpServerTest.md b/tests/docs/UnexpandedFtpServerTest.md new file mode 100644 index 00000000..d4d6e68d --- /dev/null +++ b/tests/docs/UnexpandedFtpServerTest.md @@ -0,0 +1,62 @@ +# UnexpandedFtpServerTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] +**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] +**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] +**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] +**password** | **str** | Password for Basic/NTLM authentication. | +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | +**url** | **str** | Target for the test. | +**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] +**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_ftp_server_test import UnexpandedFtpServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedFtpServerTest from a JSON string +unexpanded_ftp_server_test_instance = UnexpandedFtpServerTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedFtpServerTest.to_json()) + +# convert the object into a dict +unexpanded_ftp_server_test_dict = unexpanded_ftp_server_test_instance.to_dict() +# create an instance of UnexpandedFtpServerTest from a dict +unexpanded_ftp_server_test_from_dict = UnexpandedFtpServerTest.from_dict(unexpanded_ftp_server_test_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/tests/docs/UnexpandedHttpServerTest.md b/tests/docs/UnexpandedHttpServerTest.md new file mode 100644 index 00000000..a4e47962 --- /dev/null +++ b/tests/docs/UnexpandedHttpServerTest.md @@ -0,0 +1,76 @@ +# UnexpandedHttpServerTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] +**headers** | **List[str]** | HTTP request headers used. | [optional] +**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'] +**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] +**dns_override** | **str** | IP address to use for DNS override. | [optional] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**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] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_http_server_test import UnexpandedHttpServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedHttpServerTest from a JSON string +unexpanded_http_server_test_instance = UnexpandedHttpServerTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedHttpServerTest.to_json()) + +# convert the object into a dict +unexpanded_http_server_test_dict = unexpanded_http_server_test_instance.to_dict() +# create an instance of UnexpandedHttpServerTest from a dict +unexpanded_http_server_test_from_dict = UnexpandedHttpServerTest.from_dict(unexpanded_http_server_test_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/tests/docs/UnexpandedInstantTest.md b/tests/docs/UnexpandedInstantTest.md new file mode 100644 index 00000000..209b98df --- /dev/null +++ b/tests/docs/UnexpandedInstantTest.md @@ -0,0 +1,39 @@ +# UnexpandedInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | [**TestType**](TestType.md) | | [optional] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] + +## Example + +```python +from tests.models.unexpanded_instant_test import UnexpandedInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTest from a JSON string +unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTest.to_json()) + +# convert the object into a dict +unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() +# create an instance of UnexpandedInstantTest from a dict +unexpanded_instant_test_from_dict = UnexpandedInstantTest.from_dict(unexpanded_instant_test_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/tests/docs/UnexpandedInstantTestLinks.md b/tests/docs/UnexpandedInstantTestLinks.md new file mode 100644 index 00000000..44875dc1 --- /dev/null +++ b/tests/docs/UnexpandedInstantTestLinks.md @@ -0,0 +1,31 @@ +# UnexpandedInstantTestLinks + +A list of links that can be accessed to get more information + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] +**test_results** | [**List[Link]**](Link.md) | Reference to the test results. | [optional] + +## Example + +```python +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTestLinks from a JSON string +unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTestLinks.to_json()) + +# convert the object into a dict +unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() +# create an instance of UnexpandedInstantTestLinks from a dict +unexpanded_instant_test_links_from_dict = UnexpandedInstantTestLinks.from_dict(unexpanded_instant_test_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/tests/docs/UnexpandedInstantTestLinksSelf.md b/tests/docs/UnexpandedInstantTestLinksSelf.md new file mode 100644 index 00000000..aec53d05 --- /dev/null +++ b/tests/docs/UnexpandedInstantTestLinksSelf.md @@ -0,0 +1,36 @@ +# UnexpandedInstantTestLinksSelf + + +## 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 tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedInstantTestLinksSelf from a JSON string +unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) +# print the JSON string representation of the object +print(UnexpandedInstantTestLinksSelf.to_json()) + +# convert the object into a dict +unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() +# create an instance of UnexpandedInstantTestLinksSelf from a dict +unexpanded_instant_test_links_self_from_dict = UnexpandedInstantTestLinksSelf.from_dict(unexpanded_instant_test_links_self_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/tests/docs/UnexpandedPageLoadTest.md b/tests/docs/UnexpandedPageLoadTest.md new file mode 100644 index 00000000..808e2a0f --- /dev/null +++ b/tests/docs/UnexpandedPageLoadTest.md @@ -0,0 +1,81 @@ +# UnexpandedPageLoadTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] +**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | [optional] +**subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_page_load_test import UnexpandedPageLoadTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedPageLoadTest from a JSON string +unexpanded_page_load_test_instance = UnexpandedPageLoadTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedPageLoadTest.to_json()) + +# convert the object into a dict +unexpanded_page_load_test_dict = unexpanded_page_load_test_instance.to_dict() +# create an instance of UnexpandedPageLoadTest from a dict +unexpanded_page_load_test_from_dict = UnexpandedPageLoadTest.from_dict(unexpanded_page_load_test_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/tests/docs/UnexpandedSipServerTest.md b/tests/docs/UnexpandedSipServerTest.md new file mode 100644 index 00000000..d7884725 --- /dev/null +++ b/tests/docs/UnexpandedSipServerTest.md @@ -0,0 +1,61 @@ +# UnexpandedSipServerTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**auth_user** | **str** | Username for authentication with SIP server. | [optional] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**port** | **int** | Target port. | [default to 49153] +**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] +**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_sip_server_test import UnexpandedSipServerTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedSipServerTest from a JSON string +unexpanded_sip_server_test_instance = UnexpandedSipServerTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedSipServerTest.to_json()) + +# convert the object into a dict +unexpanded_sip_server_test_dict = unexpanded_sip_server_test_instance.to_dict() +# create an instance of UnexpandedSipServerTest from a dict +unexpanded_sip_server_test_from_dict = UnexpandedSipServerTest.from_dict(unexpanded_sip_server_test_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/tests/docs/UnexpandedTest.md b/tests/docs/UnexpandedTest.md new file mode 100644 index 00000000..5201ef3c --- /dev/null +++ b/tests/docs/UnexpandedTest.md @@ -0,0 +1,31 @@ +# UnexpandedTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | [optional] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_test import UnexpandedTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedTest from a JSON string +unexpanded_test_instance = UnexpandedTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedTest.to_json()) + +# convert the object into a dict +unexpanded_test_dict = unexpanded_test_instance.to_dict() +# create an instance of UnexpandedTest from a dict +unexpanded_test_from_dict = UnexpandedTest.from_dict(unexpanded_test_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/tests/docs/UnexpandedVoiceTest.md b/tests/docs/UnexpandedVoiceTest.md new file mode 100644 index 00000000..c3985c66 --- /dev/null +++ b/tests/docs/UnexpandedVoiceTest.md @@ -0,0 +1,53 @@ +# UnexpandedVoiceTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**codec** | **str** | Codec label | [optional] [readonly] +**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] +**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**port** | **int** | Port number for the chosen protocol. | [optional] +**target_agent_id** | **str** | Agent ID of the target agent for the test. | +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_voice_test import UnexpandedVoiceTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedVoiceTest from a JSON string +unexpanded_voice_test_instance = UnexpandedVoiceTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedVoiceTest.to_json()) + +# convert the object into a dict +unexpanded_voice_test_dict = unexpanded_voice_test_instance.to_dict() +# create an instance of UnexpandedVoiceTest from a dict +unexpanded_voice_test_from_dict = UnexpandedVoiceTest.from_dict(unexpanded_voice_test_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/tests/docs/UnexpandedWebTransactionTest.md b/tests/docs/UnexpandedWebTransactionTest.md new file mode 100644 index 00000000..56f8e27f --- /dev/null +++ b/tests/docs/UnexpandedWebTransactionTest.md @@ -0,0 +1,81 @@ +# UnexpandedWebTransactionTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] +**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] +**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] + +## Example + +```python +from tests.models.unexpanded_web_transaction_test import UnexpandedWebTransactionTest + +# TODO update the JSON string below +json = "{}" +# create an instance of UnexpandedWebTransactionTest from a JSON string +unexpanded_web_transaction_test_instance = UnexpandedWebTransactionTest.from_json(json) +# print the JSON string representation of the object +print(UnexpandedWebTransactionTest.to_json()) + +# convert the object into a dict +unexpanded_web_transaction_test_dict = unexpanded_web_transaction_test_instance.to_dict() +# create an instance of UnexpandedWebTransactionTest from a dict +unexpanded_web_transaction_test_from_dict = UnexpandedWebTransactionTest.from_dict(unexpanded_web_transaction_test_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/tests_api/docs/UpdateAgentToAgentTest.md b/tests/docs/UpdateAgentToAgentTest.md similarity index 90% rename from tests_api/docs/UpdateAgentToAgentTest.md rename to tests/docs/UpdateAgentToAgentTest.md index ca263596..e07fcd51 100644 --- a/tests_api/docs/UpdateAgentToAgentTest.md +++ b/tests/docs/UpdateAgentToAgentTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **direction** | [**TestDirection**](TestDirection.md) | | [optional] **dscp** | **str** | DSCP label. | [optional] [readonly] **dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] @@ -35,25 +35,27 @@ Name | Type | Description | Notes **throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] **throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example ```python -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest # TODO update the JSON string below json = "{}" # create an instance of UpdateAgentToAgentTest from a JSON string update_agent_to_agent_test_instance = UpdateAgentToAgentTest.from_json(json) # print the JSON string representation of the object -print UpdateAgentToAgentTest.to_json() +print(UpdateAgentToAgentTest.to_json()) # convert the object into a dict update_agent_to_agent_test_dict = update_agent_to_agent_test_instance.to_dict() # create an instance of UpdateAgentToAgentTest from a dict -update_agent_to_agent_test_form_dict = update_agent_to_agent_test.from_dict(update_agent_to_agent_test_dict) +update_agent_to_agent_test_from_dict = UpdateAgentToAgentTest.from_dict(update_agent_to_agent_test_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/tests_api/docs/UpdateAgentToServerTest.md b/tests/docs/UpdateAgentToServerTest.md similarity index 91% rename from tests_api/docs/UpdateAgentToServerTest.md rename to tests/docs/UpdateAgentToServerTest.md index a2ff2bdc..0b86fcca 100644 --- a/tests_api/docs/UpdateAgentToServerTest.md +++ b/tests/docs/UpdateAgentToServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] **fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] @@ -37,25 +37,27 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] **network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example ```python -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest # TODO update the JSON string below json = "{}" # create an instance of UpdateAgentToServerTest from a JSON string update_agent_to_server_test_instance = UpdateAgentToServerTest.from_json(json) # print the JSON string representation of the object -print UpdateAgentToServerTest.to_json() +print(UpdateAgentToServerTest.to_json()) # convert the object into a dict update_agent_to_server_test_dict = update_agent_to_server_test_instance.to_dict() # create an instance of UpdateAgentToServerTest from a dict -update_agent_to_server_test_form_dict = update_agent_to_server_test.from_dict(update_agent_to_server_test_dict) +update_agent_to_server_test_from_dict = UpdateAgentToServerTest.from_dict(update_agent_to_server_test_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/tests_api/docs/UpdateBgpTest.md b/tests/docs/UpdateBgpTest.md similarity index 89% rename from tests_api/docs/UpdateBgpTest.md rename to tests/docs/UpdateBgpTest.md index d93b26fa..5243f9ee 100644 --- a/tests_api/docs/UpdateBgpTest.md +++ b/tests/docs/UpdateBgpTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_by** | **str** | User that created the test. | [optional] [readonly] @@ -17,29 +18,30 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] **include_covered_prefixes** | **bool** | Indicate if queries for subprefixes detected under this prefix should included. | [optional] -**prefix** | **str** | a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24. | -**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used. | [optional] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] **alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] +**prefix** | **str** | a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24. | ## Example ```python -from tests_api.models.update_bgp_test import UpdateBgpTest +from tests.models.update_bgp_test import UpdateBgpTest # TODO update the JSON string below json = "{}" # create an instance of UpdateBgpTest from a JSON string update_bgp_test_instance = UpdateBgpTest.from_json(json) # print the JSON string representation of the object -print UpdateBgpTest.to_json() +print(UpdateBgpTest.to_json()) # convert the object into a dict update_bgp_test_dict = update_bgp_test_instance.to_dict() # create an instance of UpdateBgpTest from a dict -update_bgp_test_form_dict = update_bgp_test.from_dict(update_bgp_test_dict) +update_bgp_test_from_dict = UpdateBgpTest.from_dict(update_bgp_test_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/tests/docs/UpdateBgpTestRequest.md b/tests/docs/UpdateBgpTestRequest.md new file mode 100644 index 00000000..0173e5b1 --- /dev/null +++ b/tests/docs/UpdateBgpTestRequest.md @@ -0,0 +1,47 @@ +# UpdateBgpTestRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] +**include_covered_prefixes** | **bool** | Indicate if queries for subprefixes detected under this prefix should included. | [optional] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**alert_rules** | **List[str]** | List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used) | [optional] + +## Example + +```python +from tests.models.update_bgp_test_request import UpdateBgpTestRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateBgpTestRequest from a JSON string +update_bgp_test_request_instance = UpdateBgpTestRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateBgpTestRequest.to_json()) + +# convert the object into a dict +update_bgp_test_request_dict = update_bgp_test_request_instance.to_dict() +# create an instance of UpdateBgpTestRequest from a dict +update_bgp_test_request_from_dict = UpdateBgpTestRequest.from_dict(update_bgp_test_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/tests_api/docs/UpdateDnsSecTest.md b/tests/docs/UpdateDnsSecTest.md similarity index 92% rename from tests_api/docs/UpdateDnsSecTest.md rename to tests/docs/UpdateDnsSecTest.md index 403e64ac..b97af8e9 100644 --- a/tests_api/docs/UpdateDnsSecTest.md +++ b/tests/docs/UpdateDnsSecTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,26 +22,26 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] ## Example ```python -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest +from tests.models.update_dns_sec_test import UpdateDnsSecTest # TODO update the JSON string below json = "{}" # create an instance of UpdateDnsSecTest from a JSON string update_dns_sec_test_instance = UpdateDnsSecTest.from_json(json) # print the JSON string representation of the object -print UpdateDnsSecTest.to_json() +print(UpdateDnsSecTest.to_json()) # convert the object into a dict update_dns_sec_test_dict = update_dns_sec_test_instance.to_dict() # create an instance of UpdateDnsSecTest from a dict -update_dns_sec_test_form_dict = update_dns_sec_test.from_dict(update_dns_sec_test_dict) +update_dns_sec_test_from_dict = UpdateDnsSecTest.from_dict(update_dns_sec_test_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/tests_api/docs/UpdateDnsServerTest.md b/tests/docs/UpdateDnsServerTest.md similarity index 89% rename from tests_api/docs/UpdateDnsServerTest.md rename to tests/docs/UpdateDnsServerTest.md index f7a737e4..87c40f18 100644 --- a/tests_api/docs/UpdateDnsServerTest.md +++ b/tests/docs/UpdateDnsServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,9 +22,8 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | +**dns_servers** | **List[str]** | A list of DNS server FQDN. | **dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] @@ -36,25 +36,27 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example ```python -from tests_api.models.update_dns_server_test import UpdateDnsServerTest +from tests.models.update_dns_server_test import UpdateDnsServerTest # TODO update the JSON string below json = "{}" # create an instance of UpdateDnsServerTest from a JSON string update_dns_server_test_instance = UpdateDnsServerTest.from_json(json) # print the JSON string representation of the object -print UpdateDnsServerTest.to_json() +print(UpdateDnsServerTest.to_json()) # convert the object into a dict update_dns_server_test_dict = update_dns_server_test_instance.to_dict() # create an instance of UpdateDnsServerTest from a dict -update_dns_server_test_form_dict = update_dns_server_test.from_dict(update_dns_server_test_dict) +update_dns_server_test_from_dict = UpdateDnsServerTest.from_dict(update_dns_server_test_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/tests_api/docs/UpdateDnsTraceTest.md b/tests/docs/UpdateDnsTraceTest.md similarity index 92% rename from tests_api/docs/UpdateDnsTraceTest.md rename to tests/docs/UpdateDnsTraceTest.md index a4e34ee2..642f984c 100644 --- a/tests_api/docs/UpdateDnsTraceTest.md +++ b/tests/docs/UpdateDnsTraceTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,27 +22,27 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] ## Example ```python -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest +from tests.models.update_dns_trace_test import UpdateDnsTraceTest # TODO update the JSON string below json = "{}" # create an instance of UpdateDnsTraceTest from a JSON string update_dns_trace_test_instance = UpdateDnsTraceTest.from_json(json) # print the JSON string representation of the object -print UpdateDnsTraceTest.to_json() +print(UpdateDnsTraceTest.to_json()) # convert the object into a dict update_dns_trace_test_dict = update_dns_trace_test_instance.to_dict() # create an instance of UpdateDnsTraceTest from a dict -update_dns_trace_test_form_dict = update_dns_trace_test.from_dict(update_dns_trace_test_dict) +update_dns_trace_test_from_dict = UpdateDnsTraceTest.from_dict(update_dns_trace_test_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/tests_api/docs/UpdateFtpServerTest.md b/tests/docs/UpdateFtpServerTest.md similarity index 91% rename from tests_api/docs/UpdateFtpServerTest.md rename to tests/docs/UpdateFtpServerTest.md index 065626f9..59a0c79c 100644 --- a/tests_api/docs/UpdateFtpServerTest.md +++ b/tests/docs/UpdateFtpServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] **ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] @@ -40,25 +40,27 @@ Name | Type | Description | Notes **username** | **str** | Username for Basic/NTLM authentication. | **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example ```python -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest +from tests.models.update_ftp_server_test import UpdateFtpServerTest # TODO update the JSON string below json = "{}" # create an instance of UpdateFtpServerTest from a JSON string update_ftp_server_test_instance = UpdateFtpServerTest.from_json(json) # print the JSON string representation of the object -print UpdateFtpServerTest.to_json() +print(UpdateFtpServerTest.to_json()) # convert the object into a dict update_ftp_server_test_dict = update_ftp_server_test_instance.to_dict() # create an instance of UpdateFtpServerTest from a dict -update_ftp_server_test_form_dict = update_ftp_server_test.from_dict(update_ftp_server_test_dict) +update_ftp_server_test_from_dict = UpdateFtpServerTest.from_dict(update_ftp_server_test_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/tests_api/docs/UpdateHttpServerTest.md b/tests/docs/UpdateHttpServerTest.md similarity index 90% rename from tests_api/docs/UpdateHttpServerTest.md rename to tests/docs/UpdateHttpServerTest.md index fb7a9fef..dc21531f 100644 --- a/tests_api/docs/UpdateHttpServerTest.md +++ b/tests/docs/UpdateHttpServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] @@ -50,28 +50,31 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] ## Example ```python -from tests_api.models.update_http_server_test import UpdateHttpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest # TODO update the JSON string below json = "{}" # create an instance of UpdateHttpServerTest from a JSON string update_http_server_test_instance = UpdateHttpServerTest.from_json(json) # print the JSON string representation of the object -print UpdateHttpServerTest.to_json() +print(UpdateHttpServerTest.to_json()) # convert the object into a dict update_http_server_test_dict = update_http_server_test_instance.to_dict() # create an instance of UpdateHttpServerTest from a dict -update_http_server_test_form_dict = update_http_server_test.from_dict(update_http_server_test_dict) +update_http_server_test_from_dict = UpdateHttpServerTest.from_dict(update_http_server_test_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/tests_api/docs/UpdatePageLoadTest.md b/tests/docs/UpdatePageLoadTest.md similarity index 89% rename from tests_api/docs/UpdatePageLoadTest.md rename to tests/docs/UpdatePageLoadTest.md index 0c07557e..1bb83816 100644 --- a/tests_api/docs/UpdatePageLoadTest.md +++ b/tests/docs/UpdatePageLoadTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,12 +22,12 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] **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'] **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] @@ -48,6 +49,7 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] **disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] **allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] @@ -55,27 +57,29 @@ Name | Type | Description | Notes **browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] -**http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | +**http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | [optional] **subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] ## Example ```python -from tests_api.models.update_page_load_test import UpdatePageLoadTest +from tests.models.update_page_load_test import UpdatePageLoadTest # TODO update the JSON string below json = "{}" # create an instance of UpdatePageLoadTest from a JSON string update_page_load_test_instance = UpdatePageLoadTest.from_json(json) # print the JSON string representation of the object -print UpdatePageLoadTest.to_json() +print(UpdatePageLoadTest.to_json()) # convert the object into a dict update_page_load_test_dict = update_page_load_test_instance.to_dict() # create an instance of UpdatePageLoadTest from a dict -update_page_load_test_form_dict = update_page_load_test.from_dict(update_page_load_test_dict) +update_page_load_test_from_dict = UpdatePageLoadTest.from_dict(update_page_load_test_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/tests_api/docs/UpdateSipServerTest.md b/tests/docs/UpdateSipServerTest.md similarity index 83% rename from tests_api/docs/UpdateSipServerTest.md rename to tests/docs/UpdateSipServerTest.md index 2e6f1dd0..74e09907 100644 --- a/tests_api/docs/UpdateSipServerTest.md +++ b/tests/docs/UpdateSipServerTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,41 +22,39 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | -**auth_user** | **str** | Username for authentication with SIP server. | [optional] **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] **options_regex** | **str** | Options regex, this field does not require escaping. | [optional] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] **path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [default to 49153] -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] **register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] **sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] **sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] -**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] +**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.update_sip_server_test import UpdateSipServerTest +from tests.models.update_sip_server_test import UpdateSipServerTest # TODO update the JSON string below json = "{}" # create an instance of UpdateSipServerTest from a JSON string update_sip_server_test_instance = UpdateSipServerTest.from_json(json) # print the JSON string representation of the object -print UpdateSipServerTest.to_json() +print(UpdateSipServerTest.to_json()) # convert the object into a dict update_sip_server_test_dict = update_sip_server_test_instance.to_dict() # create an instance of UpdateSipServerTest from a dict -update_sip_server_test_form_dict = update_sip_server_test.from_dict(update_sip_server_test_dict) +update_sip_server_test_from_dict = UpdateSipServerTest.from_dict(update_sip_server_test_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/tests/docs/UpdateSipServerTest1.md b/tests/docs/UpdateSipServerTest1.md new file mode 100644 index 00000000..87d68a97 --- /dev/null +++ b/tests/docs/UpdateSipServerTest1.md @@ -0,0 +1,61 @@ +# UpdateSipServerTest1 + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interval** | [**TestInterval**](TestInterval.md) | | +**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] +**enabled** | **bool** | Test is enabled. | [optional] [default to True] +**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**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] +**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] +**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] +**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | +**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] + +## Example + +```python +from tests.models.update_sip_server_test1 import UpdateSipServerTest1 + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSipServerTest1 from a JSON string +update_sip_server_test1_instance = UpdateSipServerTest1.from_json(json) +# print the JSON string representation of the object +print(UpdateSipServerTest1.to_json()) + +# convert the object into a dict +update_sip_server_test1_dict = update_sip_server_test1_instance.to_dict() +# create an instance of UpdateSipServerTest1 from a dict +update_sip_server_test1_from_dict = UpdateSipServerTest1.from_dict(update_sip_server_test1_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/tests_api/docs/UpdateVoiceTest.md b/tests/docs/UpdateVoiceTest.md similarity index 87% rename from tests_api/docs/UpdateVoiceTest.md rename to tests/docs/UpdateVoiceTest.md index ae04c1f7..087b1b33 100644 --- a/tests_api/docs/UpdateVoiceTest.md +++ b/tests/docs/UpdateVoiceTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **codec** | **str** | Codec label | [optional] [readonly] **codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] **dscp** | **str** | DSCP label. | [optional] [readonly] @@ -31,24 +31,27 @@ Name | Type | Description | Notes **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] **port** | **int** | Port number for the chosen protocol. | [optional] **target_agent_id** | **str** | Agent ID of the target agent for the test. | +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.update_voice_test import UpdateVoiceTest +from tests.models.update_voice_test import UpdateVoiceTest # TODO update the JSON string below json = "{}" # create an instance of UpdateVoiceTest from a JSON string update_voice_test_instance = UpdateVoiceTest.from_json(json) # print the JSON string representation of the object -print UpdateVoiceTest.to_json() +print(UpdateVoiceTest.to_json()) # convert the object into a dict update_voice_test_dict = update_voice_test_instance.to_dict() # create an instance of UpdateVoiceTest from a dict -update_voice_test_form_dict = update_voice_test.from_dict(update_voice_test_dict) +update_voice_test_from_dict = UpdateVoiceTest.from_dict(update_voice_test_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/tests_api/docs/UpdateWebTransactionTest.md b/tests/docs/UpdateWebTransactionTest.md similarity index 90% rename from tests_api/docs/UpdateWebTransactionTest.md rename to tests/docs/UpdateWebTransactionTest.md index f91c3cf8..11227aa9 100644 --- a/tests_api/docs/UpdateWebTransactionTest.md +++ b/tests/docs/UpdateWebTransactionTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,12 +22,10 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.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] -**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **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'] **follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] @@ -43,7 +42,7 @@ Name | Type | Description | Notes **protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] **ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] **time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] **transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | **url** | **str** | Target for the test. | @@ -51,6 +50,7 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] **disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] **allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] @@ -58,26 +58,29 @@ Name | Type | Description | Notes **browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[TestRequestAllOfAgents]**](TestRequestAllOfAgents.md) | Contains list of object with required `agentId` and optional `sourceIpAddress` | [optional] +**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | **List[str]** | Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint) | [optional] **subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] ## Example ```python -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.update_web_transaction_test import UpdateWebTransactionTest # TODO update the JSON string below json = "{}" # create an instance of UpdateWebTransactionTest from a JSON string update_web_transaction_test_instance = UpdateWebTransactionTest.from_json(json) # print the JSON string representation of the object -print UpdateWebTransactionTest.to_json() +print(UpdateWebTransactionTest.to_json()) # convert the object into a dict update_web_transaction_test_dict = update_web_transaction_test_instance.to_dict() # create an instance of UpdateWebTransactionTest from a dict -update_web_transaction_test_form_dict = update_web_transaction_test.from_dict(update_web_transaction_test_dict) +update_web_transaction_test_from_dict = UpdateWebTransactionTest.from_dict(update_web_transaction_test_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/tests/docs/ValidationError.md b/tests/docs/ValidationError.md new file mode 100644 index 00000000..3ac594ba --- /dev/null +++ b/tests/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from tests.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/tests/docs/ValidationErrorAllOfErrors.md b/tests/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..2a2c7c22 --- /dev/null +++ b/tests/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/tests/docs/VoiceApi.md b/tests/docs/VoiceApi.md new file mode 100644 index 00000000..4c10275e --- /dev/null +++ b/tests/docs/VoiceApi.md @@ -0,0 +1,458 @@ +# tests.VoiceApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_voice_test**](VoiceApi.md#create_voice_test) | **POST** /v7/tests/voice | Create Voice test +[**delete_voice_test**](VoiceApi.md#delete_voice_test) | **DELETE** /v7/tests/voice/{testId} | Delete Voice test +[**get_voice_test**](VoiceApi.md#get_voice_test) | **GET** /v7/tests/voice/{testId} | Get Voice test +[**get_voice_tests**](VoiceApi.md#get_voice_tests) | **GET** /v7/tests/voice | List Voice tests +[**update_voice_test**](VoiceApi.md#update_voice_test) | **PUT** /v7/tests/voice/{testId} | Update Voice test + + +# **create_voice_test** +> VoiceTest create_voice_test(update_voice_test, aid=aid, expand=expand) + +Create Voice test + +Creates a new Voice test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.update_voice_test import UpdateVoiceTest +from tests.models.voice_test import VoiceTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.VoiceApi(api_client) + update_voice_test = tests.UpdateVoiceTest() # UpdateVoiceTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create Voice test + api_response = api_instance.create_voice_test(update_voice_test, aid=aid, expand=expand) + print("The response of VoiceApi->create_voice_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VoiceApi->create_voice_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_voice_test** | [**UpdateVoiceTest**](UpdateVoiceTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**VoiceTest**](VoiceTest.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 | - | +**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) + +# **delete_voice_test** +> delete_voice_test(test_id, aid=aid) + +Delete Voice test + +Deletes the specified Voice test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.VoiceApi(api_client) + test_id = '281474976710706' # str | ID of the 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 Voice test + api_instance.delete_voice_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling VoiceApi->delete_voice_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_voice_test** +> VoiceTest get_voice_test(test_id, aid=aid, expand=expand) + +Get Voice test + +Returns details for a Voice test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.voice_test import VoiceTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.VoiceApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get Voice test + api_response = api_instance.get_voice_test(test_id, aid=aid, expand=expand) + print("The response of VoiceApi->get_voice_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VoiceApi->get_voice_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**VoiceTest**](VoiceTest.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_voice_tests** +> GetVoiceTests200Response get_voice_tests(aid=aid) + +List Voice tests + +Returns a list of Voice tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_voice_tests200_response import GetVoiceTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.VoiceApi(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 Voice tests + api_response = api_instance.get_voice_tests(aid=aid) + print("The response of VoiceApi->get_voice_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VoiceApi->get_voice_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 + +[**GetVoiceTests200Response**](GetVoiceTests200Response.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) + +# **update_voice_test** +> VoiceTest update_voice_test(test_id, update_voice_test, aid=aid, expand=expand) + +Update Voice test + +Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.update_voice_test import UpdateVoiceTest +from tests.models.voice_test import VoiceTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.VoiceApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_voice_test = tests.UpdateVoiceTest() # UpdateVoiceTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update Voice test + api_response = api_instance.update_voice_test(test_id, update_voice_test, aid=aid, expand=expand) + print("The response of VoiceApi->update_voice_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VoiceApi->update_voice_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_voice_test** | [**UpdateVoiceTest**](UpdateVoiceTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**VoiceTest**](VoiceTest.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 | - | +**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) + diff --git a/tests/docs/VoiceInstantTest.md b/tests/docs/VoiceInstantTest.md new file mode 100644 index 00000000..1d875f85 --- /dev/null +++ b/tests/docs/VoiceInstantTest.md @@ -0,0 +1,51 @@ +# VoiceInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**codec** | **str** | Codec label | [optional] [readonly] +**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] +**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**port** | **int** | Port number for the chosen protocol. | [optional] +**target_agent_id** | **str** | Agent ID of the target agent for the test. | +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] + +## Example + +```python +from tests.models.voice_instant_test import VoiceInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceInstantTest from a JSON string +voice_instant_test_instance = VoiceInstantTest.from_json(json) +# print the JSON string representation of the object +print(VoiceInstantTest.to_json()) + +# convert the object into a dict +voice_instant_test_dict = voice_instant_test_instance.to_dict() +# create an instance of VoiceInstantTest from a dict +voice_instant_test_from_dict = VoiceInstantTest.from_dict(voice_instant_test_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/tests/docs/VoiceProperties.md b/tests/docs/VoiceProperties.md new file mode 100644 index 00000000..9023e388 --- /dev/null +++ b/tests/docs/VoiceProperties.md @@ -0,0 +1,38 @@ +# VoiceProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**codec** | **str** | Codec label | [optional] [readonly] +**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] +**dscp** | **str** | DSCP label. | [optional] [readonly] +**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] +**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] +**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] +**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] +**port** | **int** | Port number for the chosen protocol. | [optional] +**target_agent_id** | **str** | Agent ID of the target agent for the test. | +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.voice_properties import VoiceProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceProperties from a JSON string +voice_properties_instance = VoiceProperties.from_json(json) +# print the JSON string representation of the object +print(VoiceProperties.to_json()) + +# convert the object into a dict +voice_properties_dict = voice_properties_instance.to_dict() +# create an instance of VoiceProperties from a dict +voice_properties_from_dict = VoiceProperties.from_dict(voice_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/VoiceTest.md b/tests/docs/VoiceTest.md similarity index 87% rename from tests_api/docs/VoiceTest.md rename to tests/docs/VoiceTest.md index 411c6665..be933434 100644 --- a/tests_api/docs/VoiceTest.md +++ b/tests/docs/VoiceTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,7 +22,6 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **codec** | **str** | Codec label | [optional] [readonly] **codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] **dscp** | **str** | DSCP label. | [optional] [readonly] @@ -31,24 +31,27 @@ Name | Type | Description | Notes **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] **port** | **int** | Port number for the chosen protocol. | [optional] **target_agent_id** | **str** | Agent ID of the target agent for the test. | +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] +**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] ## Example ```python -from tests_api.models.voice_test import VoiceTest +from tests.models.voice_test import VoiceTest # TODO update the JSON string below json = "{}" # create an instance of VoiceTest from a JSON string voice_test_instance = VoiceTest.from_json(json) # print the JSON string representation of the object -print VoiceTest.to_json() +print(VoiceTest.to_json()) # convert the object into a dict voice_test_dict = voice_test_instance.to_dict() # create an instance of VoiceTest from a dict -voice_test_form_dict = voice_test.from_dict(voice_test_dict) +voice_test_from_dict = VoiceTest.from_dict(voice_test_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/tests/docs/VoiceTests.md b/tests/docs/VoiceTests.md new file mode 100644 index 00000000..a977631f --- /dev/null +++ b/tests/docs/VoiceTests.md @@ -0,0 +1,29 @@ +# VoiceTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedVoiceTest]**](UnexpandedVoiceTest.md) | | [optional] + +## Example + +```python +from tests.models.voice_tests import VoiceTests + +# TODO update the JSON string below +json = "{}" +# create an instance of VoiceTests from a JSON string +voice_tests_instance = VoiceTests.from_json(json) +# print the JSON string representation of the object +print(VoiceTests.to_json()) + +# convert the object into a dict +voice_tests_dict = voice_tests_instance.to_dict() +# create an instance of VoiceTests from a dict +voice_tests_from_dict = VoiceTests.from_dict(voice_tests_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/tests/docs/WebTransactionApi.md b/tests/docs/WebTransactionApi.md new file mode 100644 index 00000000..08d01c04 --- /dev/null +++ b/tests/docs/WebTransactionApi.md @@ -0,0 +1,458 @@ +# tests.WebTransactionApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_web_transactions_test**](WebTransactionApi.md#create_web_transactions_test) | **POST** /v7/tests/web-transactions | Create Web Transactions test +[**delete_web_transactions_test**](WebTransactionApi.md#delete_web_transactions_test) | **DELETE** /v7/tests/web-transactions/{testId} | Delete Web Transactions test +[**get_web_transactions_test**](WebTransactionApi.md#get_web_transactions_test) | **GET** /v7/tests/web-transactions/{testId} | Get Web Transactions test +[**get_web_transactions_tests**](WebTransactionApi.md#get_web_transactions_tests) | **GET** /v7/tests/web-transactions | List Web Transactions tests +[**update_web_transactions_test**](WebTransactionApi.md#update_web_transactions_test) | **PUT** /v7/tests/web-transactions/{testId} | Update Web Transactions test + + +# **create_web_transactions_test** +> WebTransactionTest create_web_transactions_test(update_web_transaction_test, aid=aid, expand=expand) + +Create Web Transactions test + +Creates a new Web Transactions test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.web_transaction_test import WebTransactionTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.WebTransactionApi(api_client) + update_web_transaction_test = tests.UpdateWebTransactionTest() # UpdateWebTransactionTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Create Web Transactions test + api_response = api_instance.create_web_transactions_test(update_web_transaction_test, aid=aid, expand=expand) + print("The response of WebTransactionApi->create_web_transactions_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionApi->create_web_transactions_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **update_web_transaction_test** | [**UpdateWebTransactionTest**](UpdateWebTransactionTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**WebTransactionTest**](WebTransactionTest.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 | - | +**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) + +# **delete_web_transactions_test** +> delete_web_transactions_test(test_id, aid=aid) + +Delete Web Transactions test + +Deletes the specified Web Transactions test. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.WebTransactionApi(api_client) + test_id = '281474976710706' # str | ID of the 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 Web Transactions test + api_instance.delete_web_transactions_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling WebTransactionApi->delete_web_transactions_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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 | - | +**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_web_transactions_test** +> WebTransactionTest get_web_transactions_test(test_id, aid=aid, expand=expand) + +Get Web Transactions test + +Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.web_transaction_test import WebTransactionTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.WebTransactionApi(api_client) + test_id = '281474976710706' # str | ID of the 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) + expand = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Get Web Transactions test + api_response = api_instance.get_web_transactions_test(test_id, aid=aid, expand=expand) + print("The response of WebTransactionApi->get_web_transactions_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionApi->get_web_transactions_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the 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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**WebTransactionTest**](WebTransactionTest.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_web_transactions_tests** +> GetWebTransactionsTests200Response get_web_transactions_tests(aid=aid) + +List Web Transactions tests + +Returns a list of all Web Transactions tests and saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.WebTransactionApi(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 Web Transactions tests + api_response = api_instance.get_web_transactions_tests(aid=aid) + print("The response of WebTransactionApi->get_web_transactions_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionApi->get_web_transactions_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 + +[**GetWebTransactionsTests200Response**](GetWebTransactionsTests200Response.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) + +# **update_web_transactions_test** +> WebTransactionTest update_web_transactions_test(test_id, update_web_transaction_test, aid=aid, expand=expand) + +Update Web Transactions test + +Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import tests +from tests.models.expand import Expand +from tests.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.web_transaction_test import WebTransactionTest +from 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 = tests.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 = tests.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = tests.WebTransactionApi(api_client) + test_id = '281474976710706' # str | ID of the test + update_web_transaction_test = tests.UpdateWebTransactionTest() # UpdateWebTransactionTest | + 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 = [tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) + + try: + # Update Web Transactions test + api_response = api_instance.update_web_transactions_test(test_id, update_web_transaction_test, aid=aid, expand=expand) + print("The response of WebTransactionApi->update_web_transactions_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionApi->update_web_transactions_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| ID of the test | + **update_web_transaction_test** | [**UpdateWebTransactionTest**](UpdateWebTransactionTest.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] + **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] + +### Return type + +[**WebTransactionTest**](WebTransactionTest.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 | - | +**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) + diff --git a/tests/docs/WebTransactionInstantTest.md b/tests/docs/WebTransactionInstantTest.md new file mode 100644 index 00000000..759c55ff --- /dev/null +++ b/tests/docs/WebTransactionInstantTest.md @@ -0,0 +1,79 @@ +# WebTransactionInstantTest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_by** | **str** | User that created the test. | [optional] [readonly] +**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] +**description** | **str** | A description of the test. | [optional] +**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] +**modified_by** | **str** | User that modified the test. | [optional] [readonly] +**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] +**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] +**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] +**test_name** | **str** | The name of the test. Test name must be unique. | [optional] +**type** | **str** | | [optional] [readonly] +**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] +**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] +**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] +**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] +**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] + +## Example + +```python +from tests.models.web_transaction_instant_test import WebTransactionInstantTest + +# TODO update the JSON string below +json = "{}" +# create an instance of WebTransactionInstantTest from a JSON string +web_transaction_instant_test_instance = WebTransactionInstantTest.from_json(json) +# print the JSON string representation of the object +print(WebTransactionInstantTest.to_json()) + +# convert the object into a dict +web_transaction_instant_test_dict = web_transaction_instant_test_instance.to_dict() +# create an instance of WebTransactionInstantTest from a dict +web_transaction_instant_test_from_dict = WebTransactionInstantTest.from_dict(web_transaction_instant_test_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/tests/docs/WebTransactionProperties.md b/tests/docs/WebTransactionProperties.md new file mode 100644 index 00000000..f45633e9 --- /dev/null +++ b/tests/docs/WebTransactionProperties.md @@ -0,0 +1,65 @@ +# WebTransactionProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] +**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] +**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] +**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] +**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'] +**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] +**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] +**password** | **str** | Password for Basic/NTLM authentication. | [optional] +**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] +**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] +**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] +**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] +**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] +**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] +**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | +**url** | **str** | Target for the test. | +**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] +**user_agent** | **str** | User-agent string to be provided during the test. | [optional] +**username** | **str** | Username for Basic/NTLM authentication. | [optional] +**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] +**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] +**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] +**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] +**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] +**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] +**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] +**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**type** | **str** | | [optional] [readonly] + +## Example + +```python +from tests.models.web_transaction_properties import WebTransactionProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of WebTransactionProperties from a JSON string +web_transaction_properties_instance = WebTransactionProperties.from_json(json) +# print the JSON string representation of the object +print(WebTransactionProperties.to_json()) + +# convert the object into a dict +web_transaction_properties_dict = web_transaction_properties_instance.to_dict() +# create an instance of WebTransactionProperties from a dict +web_transaction_properties_from_dict = WebTransactionProperties.from_dict(web_transaction_properties_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/tests_api/docs/WebTransactionTest.md b/tests/docs/WebTransactionTest.md similarity index 90% rename from tests_api/docs/WebTransactionTest.md rename to tests/docs/WebTransactionTest.md index 3c4a8077..d86198f5 100644 --- a/tests_api/docs/WebTransactionTest.md +++ b/tests/docs/WebTransactionTest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **interval** | [**TestInterval**](TestInterval.md) | | @@ -21,12 +22,10 @@ Name | Type | Description | Notes **links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] **labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] **shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] **auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] **bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] **client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] **content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **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'] **follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] @@ -43,7 +42,7 @@ Name | Type | Description | Notes **protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] **ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. | [optional] +**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior) | [optional] **time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] **transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | **url** | **str** | Target for the test. | @@ -51,6 +50,7 @@ Name | Type | Description | Notes **user_agent** | **str** | User-agent string to be provided during the test. | [optional] **username** | **str** | Username for Basic/NTLM authentication. | [optional] **verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] +**allow_unsafe_legacy_renegotiation** | **bool** | Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation. | [optional] [default to True] **block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] **disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] **allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] @@ -58,26 +58,29 @@ Name | Type | Description | Notes **browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] +**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [optional] [readonly] +**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] +**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] **subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] ## Example ```python -from tests_api.models.web_transaction_test import WebTransactionTest +from tests.models.web_transaction_test import WebTransactionTest # TODO update the JSON string below json = "{}" # create an instance of WebTransactionTest from a JSON string web_transaction_test_instance = WebTransactionTest.from_json(json) # print the JSON string representation of the object -print WebTransactionTest.to_json() +print(WebTransactionTest.to_json()) # convert the object into a dict web_transaction_test_dict = web_transaction_test_instance.to_dict() # create an instance of WebTransactionTest from a dict -web_transaction_test_form_dict = web_transaction_test.from_dict(web_transaction_test_dict) +web_transaction_test_from_dict = WebTransactionTest.from_dict(web_transaction_test_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/tests/docs/WebTransactionTests.md b/tests/docs/WebTransactionTests.md new file mode 100644 index 00000000..8e774465 --- /dev/null +++ b/tests/docs/WebTransactionTests.md @@ -0,0 +1,29 @@ +# WebTransactionTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tests** | [**List[UnexpandedWebTransactionTest]**](UnexpandedWebTransactionTest.md) | | [optional] + +## Example + +```python +from tests.models.web_transaction_tests import WebTransactionTests + +# TODO update the JSON string below +json = "{}" +# create an instance of WebTransactionTests from a JSON string +web_transaction_tests_instance = WebTransactionTests.from_json(json) +# print the JSON string representation of the object +print(WebTransactionTests.to_json()) + +# convert the object into a dict +web_transaction_tests_dict = web_transaction_tests_instance.to_dict() +# create an instance of WebTransactionTests from a dict +web_transaction_tests_from_dict = WebTransactionTests.from_dict(web_transaction_tests_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/tests/pyproject.toml b/tests/pyproject.toml new file mode 100644 index 00000000..21624a9a --- /dev/null +++ b/tests/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "tests" +version = "1.0.0" +description = "Tests API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Tests API"] +include = ["tests/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "tests", + #"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/usage_api/requirements.txt b/tests/requirements.txt similarity index 100% rename from usage_api/requirements.txt rename to tests/requirements.txt diff --git a/usage_api/setup.cfg b/tests/setup.cfg similarity index 100% rename from usage_api/setup.cfg rename to tests/setup.cfg diff --git a/tests/setup.py b/tests/setup.py new file mode 100644 index 00000000..a1373fc6 --- /dev/null +++ b/tests/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "tests" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Tests API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/tests", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Tests API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + """, # noqa: E501 + package_data={"tests": ["py.typed"]}, +) diff --git a/tests/test-requirements.txt b/tests/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/tests/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/usage_api/test/__init__.py b/tests/test/__init__.py similarity index 100% rename from usage_api/test/__init__.py rename to tests/test/__init__.py diff --git a/tests/test/test_agent.py b/tests/test/test_agent.py new file mode 100644 index 00000000..1ef7fb60 --- /dev/null +++ b/tests/test/test_agent.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent import Agent + +class TestAgent(unittest.TestCase): + """Agent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Agent: + """Test Agent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Agent` + """ + model = Agent() + if include_optional: + return Agent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True, + agent_type = 'enterprise-cluster' + ) + else: + return Agent( + agent_type = 'enterprise-cluster', + ) + """ + + def testAgent(self): + """Test Agent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_agent_base.py b/tests/test/test_agent_base.py new file mode 100644 index 00000000..d91668e4 --- /dev/null +++ b/tests/test/test_agent_base.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent_base import AgentBase + +class TestAgentBase(unittest.TestCase): + """AgentBase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentBase: + """Test AgentBase + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentBase` + """ + model = AgentBase() + if include_optional: + return AgentBase( + ip_addresses = ["99.139.65.220","9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce"], + public_ip_addresses = ["192.168.1.78","f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c"], + network = 'AT&T Services, Inc. (AS 7018)' + ) + else: + return AgentBase( + ) + """ + + def testAgentBase(self): + """Test AgentBase""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_agent_to_agent_instant_test.py b/tests/test/test_agent_to_agent_instant_test.py new file mode 100644 index 00000000..a8187d0a --- /dev/null +++ b/tests/test/test_agent_to_agent_instant_test.py @@ -0,0 +1,88 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest + +class TestAgentToAgentInstantTest(unittest.TestCase): + """AgentToAgentInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToAgentInstantTest: + """Test AgentToAgentInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToAgentInstantTest` + """ + model = AgentToAgentInstantTest() + if include_optional: + return AgentToAgentInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-agent', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + direction = 'to-target', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + mss = 20, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + protocol = 'tcp', + target_agent_id = '2954', + throughput_measurements = True, + throughput_duration = 5000, + throughput_rate = 8, + fixed_packet_rate = 50, + agents = [ + null + ] + ) + else: + return AgentToAgentInstantTest( + target_agent_id = '2954', + ) + """ + + def testAgentToAgentInstantTest(self): + """Test AgentToAgentInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_agent_to_agent_properties.py b/tests/test/test_agent_to_agent_properties.py new file mode 100644 index 00000000..68a07468 --- /dev/null +++ b/tests/test/test_agent_to_agent_properties.py @@ -0,0 +1,65 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent_to_agent_properties import AgentToAgentProperties + +class TestAgentToAgentProperties(unittest.TestCase): + """AgentToAgentProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToAgentProperties: + """Test AgentToAgentProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToAgentProperties` + """ + model = AgentToAgentProperties() + if include_optional: + return AgentToAgentProperties( + direction = 'to-target', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + mss = 20, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + protocol = 'tcp', + target_agent_id = '2954', + throughput_measurements = True, + throughput_duration = 5000, + throughput_rate = 8, + fixed_packet_rate = 50, + type = 'agent-to-agent' + ) + else: + return AgentToAgentProperties( + target_agent_id = '2954', + ) + """ + + def testAgentToAgentProperties(self): + """Test AgentToAgentProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_agent_to_agent_test.py b/tests/test/test_agent_to_agent_test.py similarity index 80% rename from tests_api/test/test_agent_to_agent_test.py rename to tests/test/test_agent_to_agent_test.py index 2dc4781c..05ee840b 100644 --- a/tests_api/test/test_agent_to_agent_test.py +++ b/tests/test/test_agent_to_agent_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.agent_to_agent_test import AgentToAgentTest +from tests.models.agent_to_agent_test import AgentToAgentTest class TestAgentToAgentTest(unittest.TestCase): """AgentToAgentTest unit test stubs""" @@ -40,7 +39,7 @@ class TestAgentToAgentTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestAgentToAgentTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,25 +63,22 @@ class TestAgentToAgentTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'agent-to-agent', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], direction = 'to-target', dscp = 'Best Effort (DSCP 0)', dscp_id = '0', mss = 20, - num_path_traces = 3, + num_path_traces = 1, path_trace_mode = 'classic', port = 1, protocol = 'tcp', @@ -90,9 +87,13 @@ class TestAgentToAgentTest(unittest.TestCase): throughput_duration = 5000, throughput_rate = 8, fixed_packet_rate = 50, + agents = [ + null + ], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -104,9 +105,6 @@ class TestAgentToAgentTest(unittest.TestCase): else: return AgentToAgentTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], target_agent_id = '2954', ) """ diff --git a/tests/test/test_agent_to_agent_test_protocol.py b/tests/test/test_agent_to_agent_test_protocol.py new file mode 100644 index 00000000..8cdae9d5 --- /dev/null +++ b/tests/test/test_agent_to_agent_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol + +class TestAgentToAgentTestProtocol(unittest.TestCase): + """AgentToAgentTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAgentToAgentTestProtocol(self): + """Test AgentToAgentTestProtocol""" + # inst = AgentToAgentTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_agent_to_agent_tests.py b/tests/test/test_agent_to_agent_tests.py similarity index 82% rename from tests_api/test/test_agent_to_agent_tests.py rename to tests/test/test_agent_to_agent_tests.py index 9b1f2a92..2e9e6c42 100644 --- a/tests_api/test/test_agent_to_agent_tests.py +++ b/tests/test/test_agent_to_agent_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.agent_to_agent_tests import AgentToAgentTests +from tests.models.agent_to_agent_tests import AgentToAgentTests class TestAgentToAgentTests(unittest.TestCase): """AgentToAgentTests unit test stubs""" diff --git a/tests/test/test_agent_to_server_instant_test.py b/tests/test/test_agent_to_server_instant_test.py new file mode 100644 index 00000000..16c86747 --- /dev/null +++ b/tests/test/test_agent_to_server_instant_test.py @@ -0,0 +1,90 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent_to_server_instant_test import AgentToServerInstantTest + +class TestAgentToServerInstantTest(unittest.TestCase): + """AgentToServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToServerInstantTest: + """Test AgentToServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToServerInstantTest` + """ + model = AgentToServerInstantTest() + if include_optional: + return AgentToServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + bandwidth_measurements = True, + continuous_mode = False, + fixed_packet_rate = 25, + mtu_measurements = False, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + probe_mode = 'auto', + protocol = 'tcp', + server = 'www.thousandeyes.com', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + ipv6_policy = 'use-agent-policy', + ping_payload_size = 0, + network_measurements = True, + agents = [ + null + ] + ) + else: + return AgentToServerInstantTest( + server = 'www.thousandeyes.com', + ) + """ + + def testAgentToServerInstantTest(self): + """Test AgentToServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_agent_to_server_properties.py b/tests/test/test_agent_to_server_properties.py new file mode 100644 index 00000000..746f613a --- /dev/null +++ b/tests/test/test_agent_to_server_properties.py @@ -0,0 +1,67 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.agent_to_server_properties import AgentToServerProperties + +class TestAgentToServerProperties(unittest.TestCase): + """AgentToServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AgentToServerProperties: + """Test AgentToServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AgentToServerProperties` + """ + model = AgentToServerProperties() + if include_optional: + return AgentToServerProperties( + bandwidth_measurements = True, + continuous_mode = False, + fixed_packet_rate = 25, + mtu_measurements = False, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + probe_mode = 'auto', + protocol = 'tcp', + server = 'www.thousandeyes.com', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + ipv6_policy = 'use-agent-policy', + ping_payload_size = 0, + network_measurements = True, + type = 'agent-to-server' + ) + else: + return AgentToServerProperties( + server = 'www.thousandeyes.com', + ) + """ + + def testAgentToServerProperties(self): + """Test AgentToServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_agent_to_server_test.py b/tests/test/test_agent_to_server_test.py similarity index 80% rename from tests_api/test/test_agent_to_server_test.py rename to tests/test/test_agent_to_server_test.py index 966abe57..653c16ad 100644 --- a/tests_api/test/test_agent_to_server_test.py +++ b/tests/test/test_agent_to_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.agent_to_server_test import AgentToServerTest +from tests.models.agent_to_server_test import AgentToServerTest class TestAgentToServerTest(unittest.TestCase): """AgentToServerTest unit test stubs""" @@ -40,7 +39,7 @@ class TestAgentToServerTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestAgentToServerTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,25 +63,22 @@ class TestAgentToServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'agent-to-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], bandwidth_measurements = True, continuous_mode = False, fixed_packet_rate = 25, mtu_measurements = False, - num_path_traces = 3, + num_path_traces = 1, path_trace_mode = 'classic', port = 1, probe_mode = 'auto', @@ -92,9 +89,13 @@ class TestAgentToServerTest(unittest.TestCase): ipv6_policy = 'use-agent-policy', ping_payload_size = 0, network_measurements = True, + agents = [ + null + ], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -106,9 +107,6 @@ class TestAgentToServerTest(unittest.TestCase): else: return AgentToServerTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], server = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_agent_to_server_tests.py b/tests/test/test_agent_to_server_tests.py similarity index 82% rename from tests_api/test/test_agent_to_server_tests.py rename to tests/test/test_agent_to_server_tests.py index de4d2d43..ba6897d9 100644 --- a/tests_api/test/test_agent_to_server_tests.py +++ b/tests/test/test_agent_to_server_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.agent_to_server_tests import AgentToServerTests +from tests.models.agent_to_server_tests import AgentToServerTests class TestAgentToServerTests(unittest.TestCase): """AgentToServerTests unit test stubs""" diff --git a/tests/test/test_alert_direction.py b/tests/test/test_alert_direction.py new file mode 100644 index 00000000..98f1d186 --- /dev/null +++ b/tests/test/test_alert_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.alert_direction import AlertDirection + +class TestAlertDirection(unittest.TestCase): + """AlertDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertDirection(self): + """Test AlertDirection""" + # inst = AlertDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_alert_rounds_violation_mode.py b/tests/test/test_alert_rounds_violation_mode.py new file mode 100644 index 00000000..d7e18d31 --- /dev/null +++ b/tests/test/test_alert_rounds_violation_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode + +class TestAlertRoundsViolationMode(unittest.TestCase): + """AlertRoundsViolationMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertRoundsViolationMode(self): + """Test AlertRoundsViolationMode""" + # inst = AlertRoundsViolationMode() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_alert_rule.py b/tests/test/test_alert_rule.py new file mode 100644 index 00000000..67fc1dc7 --- /dev/null +++ b/tests/test/test_alert_rule.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.alert_rule import AlertRule + +class TestAlertRule(unittest.TestCase): + """AlertRule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertRule: + """Test AlertRule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertRule` + """ + model = AlertRule() + if include_optional: + return AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major' + ) + else: + return AlertRule( + ) + """ + + def testAlertRule(self): + """Test AlertRule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_alert_type.py b/tests/test/test_alert_type.py new file mode 100644 index 00000000..c3e4bfd6 --- /dev/null +++ b/tests/test/test_alert_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.alert_type import AlertType + +class TestAlertType(unittest.TestCase): + """AlertType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAlertType(self): + """Test AlertType""" + # inst = AlertType() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_base_bgp_test.py b/tests/test/test_base_bgp_test.py new file mode 100644 index 00000000..22b252ed --- /dev/null +++ b/tests/test/test_base_bgp_test.py @@ -0,0 +1,99 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.base_bgp_test import BaseBgpTest + +class TestBaseBgpTest(unittest.TestCase): + """BaseBgpTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseBgpTest: + """Test BaseBgpTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseBgpTest` + """ + model = BaseBgpTest() + if include_optional: + return BaseBgpTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'bgp', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + enabled = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ], + include_covered_prefixes = True, + use_public_bgp = True, + alerts_enabled = True, + alert_rules = [ + tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ] + ) + else: + return BaseBgpTest( + ) + """ + + def testBaseBgpTest(self): + """Test BaseBgpTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_base_request.py b/tests/test/test_base_request.py similarity index 80% rename from tests_api/test/test_base_request.py rename to tests/test/test_base_request.py index e6e8946d..9d9d71f2 100644 --- a/tests_api/test/test_base_request.py +++ b/tests/test/test_base_request.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.base_request import BaseRequest +from tests.models.base_request import BaseRequest class TestBaseRequest(unittest.TestCase): """BaseRequest unit test stubs""" @@ -37,7 +36,7 @@ class TestBaseRequest(unittest.TestCase): if include_optional: return BaseRequest( labels = ["9842","1283"], - shared_with_accounts = ["2087","100"], + shared_with_accounts = ["1234","12345"], alert_rules = ["344753","212697"] ) else: diff --git a/tests/test/test_base_test.py b/tests/test/test_base_test.py new file mode 100644 index 00000000..432af469 --- /dev/null +++ b/tests/test/test_base_test.py @@ -0,0 +1,68 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.base_test import BaseTest + +class TestBaseTest(unittest.TestCase): + """BaseTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseTest: + """Test BaseTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseTest` + """ + model = BaseTest() + if include_optional: + return BaseTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [ + tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ] + ) + else: + return BaseTest( + ) + """ + + def testBaseTest(self): + """Test BaseTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_bgp_test.py b/tests/test/test_bgp_test.py similarity index 78% rename from tests_api/test/test_bgp_test.py rename to tests/test/test_bgp_test.py index f6d970b8..e18b0c6a 100644 --- a/tests_api/test/test_bgp_test.py +++ b/tests/test/test_bgp_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.bgp_test import BgpTest +from tests.models.bgp_test import BgpTest class TestBgpTest(unittest.TestCase): """BgpTest unit test stubs""" @@ -46,19 +45,20 @@ class TestBgpTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'bgp', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], + enabled = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -67,11 +67,10 @@ class TestBgpTest(unittest.TestCase): monitor_name = 'Seattle, WA', ) ], include_covered_prefixes = True, - prefix = '', - use_public_bgp = False, + use_public_bgp = True, alerts_enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -82,8 +81,10 @@ class TestBgpTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ] + rounds_violating_required = 2, + severity = 'major', ) + ], + prefix = '' ) else: return BgpTest( diff --git a/tests_api/test/test_bgp_tests.py b/tests/test/test_bgp_tests.py similarity index 83% rename from tests_api/test/test_bgp_tests.py rename to tests/test/test_bgp_tests.py index ee18e7f8..a41abe2f 100644 --- a/tests_api/test/test_bgp_tests.py +++ b/tests/test/test_bgp_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.bgp_tests import BgpTests +from tests.models.bgp_tests import BgpTests class TestBgpTests(unittest.TestCase): """BgpTests unit test stubs""" diff --git a/tests/test/test_cloud_enterprise_agent_type.py b/tests/test/test_cloud_enterprise_agent_type.py new file mode 100644 index 00000000..82620918 --- /dev/null +++ b/tests/test/test_cloud_enterprise_agent_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType + +class TestCloudEnterpriseAgentType(unittest.TestCase): + """CloudEnterpriseAgentType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCloudEnterpriseAgentType(self): + """Test CloudEnterpriseAgentType""" + # inst = CloudEnterpriseAgentType() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_dns_query_class.py b/tests/test/test_dns_query_class.py new file mode 100644 index 00000000..406afeb5 --- /dev/null +++ b/tests/test/test_dns_query_class.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_query_class import DnsQueryClass + +class TestDnsQueryClass(unittest.TestCase): + """DnsQueryClass unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDnsQueryClass(self): + """Test DnsQueryClass""" + # inst = DnsQueryClass() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_dns_sec_instant_test.py b/tests/test/test_dns_sec_instant_test.py new file mode 100644 index 00000000..dd98185a --- /dev/null +++ b/tests/test/test_dns_sec_instant_test.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_sec_instant_test import DnsSecInstantTest + +class TestDnsSecInstantTest(unittest.TestCase): + """DnsSecInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsSecInstantTest: + """Test DnsSecInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsSecInstantTest` + """ + model = DnsSecInstantTest() + if include_optional: + return DnsSecInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dnssec', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + agents = [ + null + ] + ) + else: + return DnsSecInstantTest( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsSecInstantTest(self): + """Test DnsSecInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_dns_sec_properties.py b/tests/test/test_dns_sec_properties.py new file mode 100644 index 00000000..6d14e242 --- /dev/null +++ b/tests/test/test_dns_sec_properties.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_sec_properties import DnsSecProperties + +class TestDnsSecProperties(unittest.TestCase): + """DnsSecProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsSecProperties: + """Test DnsSecProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsSecProperties` + """ + model = DnsSecProperties() + if include_optional: + return DnsSecProperties( + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + type = 'dnssec' + ) + else: + return DnsSecProperties( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsSecProperties(self): + """Test DnsSecProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_dns_sec_test.py b/tests/test/test_dns_sec_test.py similarity index 76% rename from tests_api/test/test_dns_sec_test.py rename to tests/test/test_dns_sec_test.py index a6c9e4d0..f4612361 100644 --- a/tests_api/test/test_dns_sec_test.py +++ b/tests/test/test_dns_sec_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dns_sec_test import DnsSecTest +from tests.models.dns_sec_test import DnsSecTest class TestDnsSecTest(unittest.TestCase): """DnsSecTest unit test stubs""" @@ -40,7 +39,7 @@ class TestDnsSecTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestDnsSecTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,29 +63,26 @@ class TestDnsSecTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'dnssec', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], domain = 'www.thousandeyes.com', - dns_query_class = 'in' + dns_query_class = 'in', + agents = [ + null + ] ) else: return DnsSecTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], domain = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_dns_sec_tests.py b/tests/test/test_dns_sec_tests.py similarity index 82% rename from tests_api/test/test_dns_sec_tests.py rename to tests/test/test_dns_sec_tests.py index fe535a5a..9dc93e85 100644 --- a/tests_api/test/test_dns_sec_tests.py +++ b/tests/test/test_dns_sec_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dns_sec_tests import DnsSecTests +from tests.models.dns_sec_tests import DnsSecTests class TestDnsSecTests(unittest.TestCase): """DnsSecTests unit test stubs""" diff --git a/tests/test/test_dns_server_instant_test.py b/tests/test/test_dns_server_instant_test.py new file mode 100644 index 00000000..a716f8ae --- /dev/null +++ b/tests/test/test_dns_server_instant_test.py @@ -0,0 +1,98 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_server_instant_test import DnsServerInstantTest + +class TestDnsServerInstantTest(unittest.TestCase): + """DnsServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServerInstantTest: + """Test DnsServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServerInstantTest` + """ + model = DnsServerInstantTest() + if include_optional: + return DnsServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + bandwidth_measurements = True, + dns_servers = [ + tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + agents = [ + null + ] + ) + else: + return DnsServerInstantTest( + dns_servers = [ + tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsServerInstantTest(self): + """Test DnsServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_dns_server_properties.py b/tests/test/test_dns_server_properties.py new file mode 100644 index 00000000..67bc13d9 --- /dev/null +++ b/tests/test/test_dns_server_properties.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_server_properties import DnsServerProperties + +class TestDnsServerProperties(unittest.TestCase): + """DnsServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServerProperties: + """Test DnsServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServerProperties` + """ + model = DnsServerProperties() + if include_optional: + return DnsServerProperties( + bandwidth_measurements = True, + dns_servers = [ + tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + type = 'dns-server' + ) + else: + return DnsServerProperties( + dns_servers = [ + tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsServerProperties(self): + """Test DnsServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_dns_server_test.py b/tests/test/test_dns_server_test.py similarity index 79% rename from tests_api/test/test_dns_server_test.py rename to tests/test/test_dns_server_test.py index 6a63790a..cbf708b7 100644 --- a/tests_api/test/test_dns_server_test.py +++ b/tests/test/test_dns_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dns_server_test import DnsServerTest +from tests.models.dns_server_test import DnsServerTest class TestDnsServerTest(unittest.TestCase): """DnsServerTest unit test stubs""" @@ -40,7 +39,7 @@ class TestDnsServerTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestDnsServerTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,23 +63,20 @@ class TestDnsServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'dns-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], bandwidth_measurements = True, dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( + tests.models.test_dns_server.TestDnsServer( server_id = '1447', server_name = 'dns-example.net', ) ], @@ -87,7 +84,7 @@ class TestDnsServerTest(unittest.TestCase): domain = 'www.thousandeyes.com', mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, path_trace_mode = 'classic', probe_mode = 'auto', protocol = 'tcp', @@ -95,9 +92,13 @@ class TestDnsServerTest(unittest.TestCase): ipv6_policy = 'use-agent-policy', fixed_packet_rate = 50, dns_query_class = 'in', + agents = [ + null + ], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -109,11 +110,8 @@ class TestDnsServerTest(unittest.TestCase): else: return DnsServerTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( + tests.models.test_dns_server.TestDnsServer( server_id = '1447', server_name = 'dns-example.net', ) ], diff --git a/tests_api/test/test_dns_server_tests.py b/tests/test/test_dns_server_tests.py similarity index 82% rename from tests_api/test/test_dns_server_tests.py rename to tests/test/test_dns_server_tests.py index 12c2d5ca..306f8850 100644 --- a/tests_api/test/test_dns_server_tests.py +++ b/tests/test/test_dns_server_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dns_server_tests import DnsServerTests +from tests.models.dns_server_tests import DnsServerTests class TestDnsServerTests(unittest.TestCase): """DnsServerTests unit test stubs""" diff --git a/tests/test/test_dns_servers_request.py b/tests/test/test_dns_servers_request.py new file mode 100644 index 00000000..4db22a38 --- /dev/null +++ b/tests/test/test_dns_servers_request.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_servers_request import DnsServersRequest + +class TestDnsServersRequest(unittest.TestCase): + """DnsServersRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsServersRequest: + """Test DnsServersRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsServersRequest` + """ + model = DnsServersRequest() + if include_optional: + return DnsServersRequest( + dns_servers = ["dns-example.net","8.8.8.8"] + ) + else: + return DnsServersRequest( + ) + """ + + def testDnsServersRequest(self): + """Test DnsServersRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_dns_trace_instant_test.py b/tests/test/test_dns_trace_instant_test.py new file mode 100644 index 00000000..d50c5574 --- /dev/null +++ b/tests/test/test_dns_trace_instant_test.py @@ -0,0 +1,78 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_trace_instant_test import DnsTraceInstantTest + +class TestDnsTraceInstantTest(unittest.TestCase): + """DnsTraceInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsTraceInstantTest: + """Test DnsTraceInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsTraceInstantTest` + """ + model = DnsTraceInstantTest() + if include_optional: + return DnsTraceInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-trace', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + agents = [ + null + ] + ) + else: + return DnsTraceInstantTest( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsTraceInstantTest(self): + """Test DnsTraceInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_dns_trace_properties.py b/tests/test/test_dns_trace_properties.py new file mode 100644 index 00000000..197fffc6 --- /dev/null +++ b/tests/test/test_dns_trace_properties.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.dns_trace_properties import DnsTraceProperties + +class TestDnsTraceProperties(unittest.TestCase): + """DnsTraceProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DnsTraceProperties: + """Test DnsTraceProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DnsTraceProperties` + """ + model = DnsTraceProperties() + if include_optional: + return DnsTraceProperties( + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + dns_query_class = 'in', + type = 'dns-trace' + ) + else: + return DnsTraceProperties( + domain = 'www.thousandeyes.com', + ) + """ + + def testDnsTraceProperties(self): + """Test DnsTraceProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_dns_trace_test.py b/tests/test/test_dns_trace_test.py similarity index 76% rename from tests_api/test/test_dns_trace_test.py rename to tests/test/test_dns_trace_test.py index ba3f206f..38f76e12 100644 --- a/tests_api/test/test_dns_trace_test.py +++ b/tests/test/test_dns_trace_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dns_trace_test import DnsTraceTest +from tests.models.dns_trace_test import DnsTraceTest class TestDnsTraceTest(unittest.TestCase): """DnsTraceTest unit test stubs""" @@ -40,7 +39,7 @@ class TestDnsTraceTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestDnsTraceTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,30 +63,27 @@ class TestDnsTraceTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'dns-trace', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], dns_transport_protocol = 'udp', domain = 'www.thousandeyes.com', - dns_query_class = 'in' + dns_query_class = 'in', + agents = [ + null + ] ) else: return DnsTraceTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], domain = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_dns_trace_tests.py b/tests/test/test_dns_trace_tests.py similarity index 82% rename from tests_api/test/test_dns_trace_tests.py rename to tests/test/test_dns_trace_tests.py index f00c0615..e9e83607 100644 --- a/tests_api/test/test_dns_trace_tests.py +++ b/tests/test/test_dns_trace_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.dns_trace_tests import DnsTraceTests +from tests.models.dns_trace_tests import DnsTraceTests class TestDnsTraceTests(unittest.TestCase): """DnsTraceTests unit test stubs""" diff --git a/tests/test/test_error.py b/tests/test/test_error.py new file mode 100644 index 00000000..734539a5 --- /dev/null +++ b/tests/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_expand.py b/tests/test/test_expand.py new file mode 100644 index 00000000..f96e3fc1 --- /dev/null +++ b/tests/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_ftp_server_instant_test.py b/tests/test/test_ftp_server_instant_test.py new file mode 100644 index 00000000..d3855d63 --- /dev/null +++ b/tests/test/test_ftp_server_instant_test.py @@ -0,0 +1,96 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.ftp_server_instant_test import FtpServerInstantTest + +class TestFtpServerInstantTest(unittest.TestCase): + """FtpServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FtpServerInstantTest: + """Test FtpServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FtpServerInstantTest` + """ + model = FtpServerInstantTest() + if include_optional: + return FtpServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'ftp-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + bandwidth_measurements = True, + download_limit = 1048576, + ftp_target_time = 1000, + ftp_time_limit = 10, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + request_type = 'download', + url = 'www.thousandeyes.com', + use_active_ftp = True, + use_explicit_ftps = False, + username = 'username', + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ] + ) + else: + return FtpServerInstantTest( + password = 'password', + request_type = 'download', + url = 'www.thousandeyes.com', + username = 'username', + ) + """ + + def testFtpServerInstantTest(self): + """Test FtpServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_ftp_server_properties.py b/tests/test/test_ftp_server_properties.py new file mode 100644 index 00000000..6062aea7 --- /dev/null +++ b/tests/test/test_ftp_server_properties.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.ftp_server_properties import FtpServerProperties + +class TestFtpServerProperties(unittest.TestCase): + """FtpServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FtpServerProperties: + """Test FtpServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FtpServerProperties` + """ + model = FtpServerProperties() + if include_optional: + return FtpServerProperties( + bandwidth_measurements = True, + download_limit = 1048576, + ftp_target_time = 1000, + ftp_time_limit = 10, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + request_type = 'download', + url = 'www.thousandeyes.com', + use_active_ftp = True, + use_explicit_ftps = False, + username = 'username', + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + type = 'ftp-server' + ) + else: + return FtpServerProperties( + password = 'password', + request_type = 'download', + url = 'www.thousandeyes.com', + username = 'username', + ) + """ + + def testFtpServerProperties(self): + """Test FtpServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_ftp_server_request_type.py b/tests/test/test_ftp_server_request_type.py new file mode 100644 index 00000000..e203cdef --- /dev/null +++ b/tests/test/test_ftp_server_request_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.ftp_server_request_type import FtpServerRequestType + +class TestFtpServerRequestType(unittest.TestCase): + """FtpServerRequestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFtpServerRequestType(self): + """Test FtpServerRequestType""" + # inst = FtpServerRequestType() + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_ftp_server_test.py b/tests/test/test_ftp_server_test.py similarity index 81% rename from tests_api/test/test_ftp_server_test.py rename to tests/test/test_ftp_server_test.py index cb384f54..5a572d79 100644 --- a/tests_api/test/test_ftp_server_test.py +++ b/tests/test/test_ftp_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.ftp_server_test import FtpServerTest +from tests.models.ftp_server_test import FtpServerTest class TestFtpServerTest(unittest.TestCase): """FtpServerTest unit test stubs""" @@ -40,7 +39,7 @@ class TestFtpServerTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestFtpServerTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,27 +63,24 @@ class TestFtpServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'ftp-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], bandwidth_measurements = True, download_limit = 1048576, ftp_target_time = 1000, ftp_time_limit = 10, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', probe_mode = 'auto', @@ -95,9 +92,13 @@ class TestFtpServerTest(unittest.TestCase): username = 'username', fixed_packet_rate = 50, ipv6_policy = 'use-agent-policy', + agents = [ + null + ], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -109,9 +110,6 @@ class TestFtpServerTest(unittest.TestCase): else: return FtpServerTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], password = 'password', request_type = 'download', url = 'www.thousandeyes.com', diff --git a/tests_api/test/test_ftp_server_tests.py b/tests/test/test_ftp_server_tests.py similarity index 82% rename from tests_api/test/test_ftp_server_tests.py rename to tests/test/test_ftp_server_tests.py index 0cdd2def..62c78fbf 100644 --- a/tests_api/test/test_ftp_server_tests.py +++ b/tests/test/test_ftp_server_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.ftp_server_tests import FtpServerTests +from tests.models.ftp_server_tests import FtpServerTests class TestFtpServerTests(unittest.TestCase): """FtpServerTests unit test stubs""" diff --git a/tests_api/test/test_get_agent_to_agent_tests200_response.py b/tests/test/test_get_agent_to_agent_tests200_response.py similarity index 80% rename from tests_api/test/test_get_agent_to_agent_tests200_response.py rename to tests/test/test_get_agent_to_agent_tests200_response.py index 2bc6e2a3..0445a2d4 100644 --- a/tests_api/test/test_get_agent_to_agent_tests200_response.py +++ b/tests/test/test_get_agent_to_agent_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response +from tests.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response class TestGetAgentToAgentTests200Response(unittest.TestCase): """GetAgentToAgentTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetAgentToAgentTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_agent_to_server_tests200_response.py b/tests/test/test_get_agent_to_server_tests200_response.py similarity index 80% rename from tests_api/test/test_get_agent_to_server_tests200_response.py rename to tests/test/test_get_agent_to_server_tests200_response.py index ed9a29aa..9bfdca66 100644 --- a/tests_api/test/test_get_agent_to_server_tests200_response.py +++ b/tests/test/test_get_agent_to_server_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response +from tests.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response class TestGetAgentToServerTests200Response(unittest.TestCase): """GetAgentToServerTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetAgentToServerTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_bgp_tests200_response.py b/tests/test/test_get_bgp_tests200_response.py similarity index 80% rename from tests_api/test/test_get_bgp_tests200_response.py rename to tests/test/test_get_bgp_tests200_response.py index b4072974..7c0736b5 100644 --- a/tests_api/test/test_get_bgp_tests200_response.py +++ b/tests/test/test_get_bgp_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_bgp_tests200_response import GetBgpTests200Response +from tests.models.get_bgp_tests200_response import GetBgpTests200Response class TestGetBgpTests200Response(unittest.TestCase): """GetBgpTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetBgpTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_dns_sec_tests200_response.py b/tests/test/test_get_dns_sec_tests200_response.py similarity index 80% rename from tests_api/test/test_get_dns_sec_tests200_response.py rename to tests/test/test_get_dns_sec_tests200_response.py index db28daff..a8ac52d9 100644 --- a/tests_api/test/test_get_dns_sec_tests200_response.py +++ b/tests/test/test_get_dns_sec_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_dns_sec_tests200_response import GetDnsSecTests200Response +from tests.models.get_dns_sec_tests200_response import GetDnsSecTests200Response class TestGetDnsSecTests200Response(unittest.TestCase): """GetDnsSecTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetDnsSecTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_dns_server_tests200_response.py b/tests/test/test_get_dns_server_tests200_response.py similarity index 80% rename from tests_api/test/test_get_dns_server_tests200_response.py rename to tests/test/test_get_dns_server_tests200_response.py index 834491fa..6784891c 100644 --- a/tests_api/test/test_get_dns_server_tests200_response.py +++ b/tests/test/test_get_dns_server_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_dns_server_tests200_response import GetDNSServerTests200Response +from tests.models.get_dns_server_tests200_response import GetDNSServerTests200Response class TestGetDNSServerTests200Response(unittest.TestCase): """GetDNSServerTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetDNSServerTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_dns_trace_tests200_response.py b/tests/test/test_get_dns_trace_tests200_response.py similarity index 80% rename from tests_api/test/test_get_dns_trace_tests200_response.py rename to tests/test/test_get_dns_trace_tests200_response.py index 7335aea4..f8c56d82 100644 --- a/tests_api/test/test_get_dns_trace_tests200_response.py +++ b/tests/test/test_get_dns_trace_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response +from tests.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response class TestGetDnsTraceTests200Response(unittest.TestCase): """GetDnsTraceTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetDnsTraceTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_ftp_server_tests200_response.py b/tests/test/test_get_ftp_server_tests200_response.py similarity index 80% rename from tests_api/test/test_get_ftp_server_tests200_response.py rename to tests/test/test_get_ftp_server_tests200_response.py index 40e0ba58..7bb1d4a9 100644 --- a/tests_api/test/test_get_ftp_server_tests200_response.py +++ b/tests/test/test_get_ftp_server_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_ftp_server_tests200_response import GetFtpServerTests200Response +from tests.models.get_ftp_server_tests200_response import GetFtpServerTests200Response class TestGetFtpServerTests200Response(unittest.TestCase): """GetFtpServerTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetFtpServerTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_http_server_tests200_response.py b/tests/test/test_get_http_server_tests200_response.py similarity index 80% rename from tests_api/test/test_get_http_server_tests200_response.py rename to tests/test/test_get_http_server_tests200_response.py index 8db18501..86d37a72 100644 --- a/tests_api/test/test_get_http_server_tests200_response.py +++ b/tests/test/test_get_http_server_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_http_server_tests200_response import GetHttpServerTests200Response +from tests.models.get_http_server_tests200_response import GetHttpServerTests200Response class TestGetHttpServerTests200Response(unittest.TestCase): """GetHttpServerTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetHttpServerTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_page_load_tests200_response.py b/tests/test/test_get_page_load_tests200_response.py similarity index 80% rename from tests_api/test/test_get_page_load_tests200_response.py rename to tests/test/test_get_page_load_tests200_response.py index 299162e0..005d5485 100644 --- a/tests_api/test/test_get_page_load_tests200_response.py +++ b/tests/test/test_get_page_load_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_page_load_tests200_response import GetPageLoadTests200Response +from tests.models.get_page_load_tests200_response import GetPageLoadTests200Response class TestGetPageLoadTests200Response(unittest.TestCase): """GetPageLoadTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetPageLoadTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_path_vis_interface_groups200_response.py b/tests/test/test_get_path_vis_interface_groups200_response.py similarity index 79% rename from tests_api/test/test_get_path_vis_interface_groups200_response.py rename to tests/test/test_get_path_vis_interface_groups200_response.py index beb4aafb..2ab5ffb4 100644 --- a/tests_api/test/test_get_path_vis_interface_groups200_response.py +++ b/tests/test/test_get_path_vis_interface_groups200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response +from tests.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response class TestGetPathVisInterfaceGroups200Response(unittest.TestCase): """GetPathVisInterfaceGroups200Response unit test stubs""" @@ -37,15 +36,15 @@ class TestGetPathVisInterfaceGroups200Response(unittest.TestCase): if include_optional: return GetPathVisInterfaceGroups200Response( path_vis_interface_groups = [ - tests_api.models.interface_group.InterfaceGroup( - aid = '1123', + tests.models.interface_group.InterfaceGroup( + aid = '1234', group_id = '281474976710706', group_name = 'PathVis Interface Group', ip_addresses = ["1.1.1.1","8.8.8.8"], rdns_regexes = ["aggr403b-1.iad3.rackspace.net","aggr403c-1.iad3.rackspace.net"], ) ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_sip_server_tests200_response.py b/tests/test/test_get_sip_server_tests200_response.py similarity index 80% rename from tests_api/test/test_get_sip_server_tests200_response.py rename to tests/test/test_get_sip_server_tests200_response.py index 3eae74de..e1ca8506 100644 --- a/tests_api/test/test_get_sip_server_tests200_response.py +++ b/tests/test/test_get_sip_server_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_sip_server_tests200_response import GetSipServerTests200Response +from tests.models.get_sip_server_tests200_response import GetSipServerTests200Response class TestGetSipServerTests200Response(unittest.TestCase): """GetSipServerTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetSipServerTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_tests200_response.py b/tests/test/test_get_tests200_response.py similarity index 79% rename from tests_api/test/test_get_tests200_response.py rename to tests/test/test_get_tests200_response.py index ff33f748..9ac01478 100644 --- a/tests_api/test/test_get_tests200_response.py +++ b/tests/test/test_get_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_tests200_response import GetTests200Response +from tests.models.get_tests200_response import GetTests200Response class TestGetTests200Response(unittest.TestCase): """GetTests200Response unit test stubs""" @@ -37,10 +36,10 @@ class TestGetTests200Response(unittest.TestCase): if include_optional: return GetTests200Response( tests = [ - null + { } ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_voice_tests200_response.py b/tests/test/test_get_voice_tests200_response.py similarity index 80% rename from tests_api/test/test_get_voice_tests200_response.py rename to tests/test/test_get_voice_tests200_response.py index 41cae135..bac43720 100644 --- a/tests_api/test/test_get_voice_tests200_response.py +++ b/tests/test/test_get_voice_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_voice_tests200_response import GetVoiceTests200Response +from tests.models.get_voice_tests200_response import GetVoiceTests200Response class TestGetVoiceTests200Response(unittest.TestCase): """GetVoiceTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetVoiceTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests_api/test/test_get_web_transactions_tests200_response.py b/tests/test/test_get_web_transactions_tests200_response.py similarity index 80% rename from tests_api/test/test_get_web_transactions_tests200_response.py rename to tests/test/test_get_web_transactions_tests200_response.py index 48de5570..8972df13 100644 --- a/tests_api/test/test_get_web_transactions_tests200_response.py +++ b/tests/test/test_get_web_transactions_tests200_response.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response +from tests.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response class TestGetWebTransactionsTests200Response(unittest.TestCase): """GetWebTransactionsTests200Response unit test stubs""" @@ -39,8 +38,8 @@ class TestGetWebTransactionsTests200Response(unittest.TestCase): tests = [ null ], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( href = 'https://api.thousandeyes.com/v7/link/to/resource/id', templated = True, type = '', diff --git a/tests/test/test_http_server_instant_test.py b/tests/test/test_http_server_instant_test.py new file mode 100644 index 00000000..6455bd58 --- /dev/null +++ b/tests/test/test_http_server_instant_test.py @@ -0,0 +1,113 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.http_server_instant_test import HttpServerInstantTest + +class TestHttpServerInstantTest(unittest.TestCase): + """HttpServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpServerInstantTest: + """Test HttpServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpServerInstantTest` + """ + model = HttpServerInstantTest() + if include_optional: + return HttpServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'http-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + headers = [header1: value1, header2: value2], + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + download_limit = 2048, + dns_override = '8.8.8.8', + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + post_body = '{ "example" : "value"}', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + ipv6_policy = 'use-agent-policy', + follow_redirects = True, + fixed_packet_rate = 50, + agents = [ + null + ] + ) + else: + return HttpServerInstantTest( + url = 'www.thousandeyes.com', + ) + """ + + def testHttpServerInstantTest(self): + """Test HttpServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_http_server_properties.py b/tests/test/test_http_server_properties.py new file mode 100644 index 00000000..36a6de3f --- /dev/null +++ b/tests/test/test_http_server_properties.py @@ -0,0 +1,90 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.http_server_properties import HttpServerProperties + +class TestHttpServerProperties(unittest.TestCase): + """HttpServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HttpServerProperties: + """Test HttpServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `HttpServerProperties` + """ + model = HttpServerProperties() + if include_optional: + return HttpServerProperties( + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + headers = ["header1: value1","header2: value2"], + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + download_limit = 2048, + dns_override = '8.8.8.8', + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + post_body = '{ "example" : "value"}', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + ipv6_policy = 'use-agent-policy', + follow_redirects = True, + fixed_packet_rate = 50, + type = 'http-server' + ) + else: + return HttpServerProperties( + url = 'www.thousandeyes.com', + ) + """ + + def testHttpServerProperties(self): + """Test HttpServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_http_server_test.py b/tests/test/test_http_server_test.py similarity index 83% rename from tests_api/test/test_http_server_test.py rename to tests/test/test_http_server_test.py index 653b565f..3f1b88b3 100644 --- a/tests_api/test/test_http_server_test.py +++ b/tests/test/test_http_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.http_server_test import HttpServerTest +from tests.models.http_server_test import HttpServerTest class TestHttpServerTest(unittest.TestCase): """HttpServerTest unit test stubs""" @@ -40,7 +39,7 @@ class TestHttpServerTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestHttpServerTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,20 +63,17 @@ class TestHttpServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'http-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -87,7 +84,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL -----END CERTIFICATE----- ', content_regex = '(regex)+', - headers = ["header1: value1","header2: value2"], + headers = [header1: value1, header2: value2], custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, desired_status_code = '200', download_limit = 2048, @@ -98,7 +95,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', post_body = '{ "example" : "value"}', @@ -111,12 +108,17 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, ipv6_policy = 'use-agent-policy', follow_redirects = True, fixed_packet_rate = 50, + agents = [ + null + ], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -128,9 +130,6 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL else: return HttpServerTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], url = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_http_server_tests.py b/tests/test/test_http_server_tests.py similarity index 82% rename from tests_api/test/test_http_server_tests.py rename to tests/test/test_http_server_tests.py index 3fb3e5b9..87f48268 100644 --- a/tests_api/test/test_http_server_tests.py +++ b/tests/test/test_http_server_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.http_server_tests import HttpServerTests +from tests.models.http_server_tests import HttpServerTests class TestHttpServerTests(unittest.TestCase): """HttpServerTests unit test stubs""" diff --git a/tests/test/test_instant_test.py b/tests/test/test_instant_test.py new file mode 100644 index 00000000..50d2083b --- /dev/null +++ b/tests/test/test_instant_test.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.instant_test import InstantTest + +class TestInstantTest(unittest.TestCase): + """InstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstantTest: + """Test InstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstantTest` + """ + model = InstantTest() + if include_optional: + return InstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ] + ) + else: + return InstantTest( + ) + """ + + def testInstantTest(self): + """Test InstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_interface_group.py b/tests/test/test_interface_group.py similarity index 83% rename from tests_api/test/test_interface_group.py rename to tests/test/test_interface_group.py index f9d4f4d8..2243f5c1 100644 --- a/tests_api/test/test_interface_group.py +++ b/tests/test/test_interface_group.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.interface_group import InterfaceGroup +from tests.models.interface_group import InterfaceGroup class TestInterfaceGroup(unittest.TestCase): """InterfaceGroup unit test stubs""" @@ -36,7 +35,7 @@ class TestInterfaceGroup(unittest.TestCase): model = InterfaceGroup() if include_optional: return InterfaceGroup( - aid = '1123', + aid = '1234', group_id = '281474976710706', group_name = 'PathVis Interface Group', ip_addresses = ["1.1.1.1","8.8.8.8"], diff --git a/tests_api/test/test_interface_groups.py b/tests/test/test_interface_groups.py similarity index 80% rename from tests_api/test/test_interface_groups.py rename to tests/test/test_interface_groups.py index 9a25d111..5def664d 100644 --- a/tests_api/test/test_interface_groups.py +++ b/tests/test/test_interface_groups.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.interface_groups import InterfaceGroups +from tests.models.interface_groups import InterfaceGroups class TestInterfaceGroups(unittest.TestCase): """InterfaceGroups unit test stubs""" @@ -37,8 +36,8 @@ class TestInterfaceGroups(unittest.TestCase): if include_optional: return InterfaceGroups( path_vis_interface_groups = [ - tests_api.models.interface_group.InterfaceGroup( - aid = '1123', + tests.models.interface_group.InterfaceGroup( + aid = '1234', group_id = '281474976710706', group_name = 'PathVis Interface Group', ip_addresses = ["1.1.1.1","8.8.8.8"], diff --git a/tests/test/test_link.py b/tests/test/test_link.py new file mode 100644 index 00000000..8d070839 --- /dev/null +++ b/tests/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_monitor.py b/tests/test/test_monitor.py new file mode 100644 index 00000000..b2505612 --- /dev/null +++ b/tests/test/test_monitor.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.monitor import Monitor + +class TestMonitor(unittest.TestCase): + """Monitor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Monitor: + """Test Monitor + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Monitor` + """ + model = Monitor() + if include_optional: + return Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA' + ) + else: + return Monitor( + ) + """ + + def testMonitor(self): + """Test Monitor""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_monitor_type.py b/tests/test/test_monitor_type.py new file mode 100644 index 00000000..2f110bdf --- /dev/null +++ b/tests/test/test_monitor_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.monitor_type import MonitorType + +class TestMonitorType(unittest.TestCase): + """MonitorType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonitorType(self): + """Test MonitorType""" + # inst = MonitorType() + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_monitors_request.py b/tests/test/test_monitors_request.py similarity index 82% rename from tests_api/test/test_monitors_request.py rename to tests/test/test_monitors_request.py index bb14a32c..2eb6f37d 100644 --- a/tests_api/test/test_monitors_request.py +++ b/tests/test/test_monitors_request.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.monitors_request import MonitorsRequest +from tests.models.monitors_request import MonitorsRequest class TestMonitorsRequest(unittest.TestCase): """MonitorsRequest unit test stubs""" diff --git a/tests/test/test_page_load_instant_test.py b/tests/test/test_page_load_instant_test.py new file mode 100644 index 00000000..45e5dd46 --- /dev/null +++ b/tests/test/test_page_load_instant_test.py @@ -0,0 +1,116 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.page_load_instant_test import PageLoadInstantTest + +class TestPageLoadInstantTest(unittest.TestCase): + """PageLoadInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PageLoadInstantTest: + """Test PageLoadInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PageLoadInstantTest` + """ + model = PageLoadInstantTest() + if include_optional: + return PageLoadInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'page-load', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + page_load_target_time = 10, + page_load_time_limit = 5, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + agents = [ + null + ] + ) + else: + return PageLoadInstantTest( + url = 'www.thousandeyes.com', + ) + """ + + def testPageLoadInstantTest(self): + """Test PageLoadInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_page_load_properties.py b/tests/test/test_page_load_properties.py new file mode 100644 index 00000000..221e299a --- /dev/null +++ b/tests/test/test_page_load_properties.py @@ -0,0 +1,93 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.page_load_properties import PageLoadProperties + +class TestPageLoadProperties(unittest.TestCase): + """PageLoadProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PageLoadProperties: + """Test PageLoadProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PageLoadProperties` + """ + model = PageLoadProperties() + if include_optional: + return PageLoadProperties( + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + page_load_target_time = 10, + page_load_time_limit = 5, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + type = 'page-load' + ) + else: + return PageLoadProperties( + url = 'www.thousandeyes.com', + ) + """ + + def testPageLoadProperties(self): + """Test PageLoadProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_page_load_test.py b/tests/test/test_page_load_test.py similarity index 83% rename from tests_api/test/test_page_load_test.py rename to tests/test/test_page_load_test.py index dc13140e..b089f9a3 100644 --- a/tests_api/test/test_page_load_test.py +++ b/tests/test/test_page_load_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.page_load_test import PageLoadTest +from tests.models.page_load_test import PageLoadTest class TestPageLoadTest(unittest.TestCase): """PageLoadTest unit test stubs""" @@ -40,7 +39,7 @@ class TestPageLoadTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestPageLoadTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,20 +63,17 @@ class TestPageLoadTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'page-load', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -88,6 +85,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ', content_regex = '(regex)+', custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', follow_redirects = True, http_target_time = 100, http_time_limit = 5, @@ -95,7 +93,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, page_load_target_time = 10, page_load_time_limit = 5, password = 'password', @@ -109,6 +107,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, block_domains = 'domain.com/', disable_screenshot = True, allow_mic_and_camera = True, @@ -116,9 +115,13 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL browser_language = 'en-US', page_loading_strategy = 'normal', fixed_packet_rate = 50, + agents = [ + null + ], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -132,11 +135,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL else: return PageLoadTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], url = 'www.thousandeyes.com', - http_interval = 120, ) """ diff --git a/tests_api/test/test_page_load_tests.py b/tests/test/test_page_load_tests.py similarity index 82% rename from tests_api/test/test_page_load_tests.py rename to tests/test/test_page_load_tests.py index cc338b4d..43dde6a8 100644 --- a/tests_api/test/test_page_load_tests.py +++ b/tests/test/test_page_load_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.page_load_tests import PageLoadTests +from tests.models.page_load_tests import PageLoadTests class TestPageLoadTests(unittest.TestCase): """PageLoadTests unit test stubs""" diff --git a/tests/test/test_self_links.py b/tests/test/test_self_links.py new file mode 100644 index 00000000..206caf08 --- /dev/null +++ b/tests/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = tests.models.self_links__links.SelfLinks__links( + self = tests.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_self_links_links.py b/tests/test/test_self_links_links.py new file mode 100644 index 00000000..b77f171b --- /dev/null +++ b/tests/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = tests.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_severity.py b/tests/test/test_severity.py new file mode 100644 index 00000000..e3264fb7 --- /dev/null +++ b/tests/test/test_severity.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.severity import Severity + +class TestSeverity(unittest.TestCase): + """Severity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSeverity(self): + """Test Severity""" + # inst = Severity() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_simple_agent.py b/tests/test/test_simple_agent.py new file mode 100644 index 00000000..42ef7b17 --- /dev/null +++ b/tests/test/test_simple_agent.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.simple_agent import SimpleAgent + +class TestSimpleAgent(unittest.TestCase): + """SimpleAgent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleAgent: + """Test SimpleAgent + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleAgent` + """ + model = SimpleAgent() + if include_optional: + return SimpleAgent( + ip_addresses = [99.139.65.220, 9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce], + public_ip_addresses = [192.168.1.78, f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c], + network = 'AT&T Services, Inc. (AS 7018)', + agent_id = '281474976710706', + agent_name = 'thousandeyes-stg-va-254', + location = 'San Francisco Bay Area', + country_id = 'US', + enabled = True, + prefix = '99.128.0.0/11', + verify_ssl_certificates = True + ) + else: + return SimpleAgent( + ) + """ + + def testSimpleAgent(self): + """Test SimpleAgent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_simple_test.py b/tests/test/test_simple_test.py new file mode 100644 index 00000000..892cdef7 --- /dev/null +++ b/tests/test/test_simple_test.py @@ -0,0 +1,66 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.simple_test import SimpleTest + +class TestSimpleTest(unittest.TestCase): + """SimpleTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SimpleTest: + """Test SimpleTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SimpleTest` + """ + model = SimpleTest() + if include_optional: + return SimpleTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) + ) + else: + return SimpleTest( + ) + """ + + def testSimpleTest(self): + """Test SimpleTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_sip_server_instant_test.py b/tests/test/test_sip_server_instant_test.py new file mode 100644 index 00000000..dbbb7568 --- /dev/null +++ b/tests/test/test_sip_server_instant_test.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.sip_server_instant_test import SipServerInstantTest + +class TestSipServerInstantTest(unittest.TestCase): + """SipServerInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTest: + """Test SipServerInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTest` + """ + model = SipServerInstantTest() + if include_optional: + return SipServerInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ] + ) + else: + return SipServerInstantTest( + ) + """ + + def testSipServerInstantTest(self): + """Test SipServerInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_sip_server_instant_test_request.py b/tests/test/test_sip_server_instant_test_request.py new file mode 100644 index 00000000..9ab14760 --- /dev/null +++ b/tests/test/test_sip_server_instant_test_request.py @@ -0,0 +1,99 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.sip_server_instant_test_request import SipServerInstantTestRequest + +class TestSipServerInstantTestRequest(unittest.TestCase): + """SipServerInstantTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTestRequest: + """Test SipServerInstantTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTestRequest` + """ + model = SipServerInstantTestRequest() + if include_optional: + return SipServerInstantTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ], + target_sip_credentials = tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ) + ) + else: + return SipServerInstantTestRequest( + target_sip_credentials = tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + ) + """ + + def testSipServerInstantTestRequest(self): + """Test SipServerInstantTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_sip_server_instant_test_response.py b/tests/test/test_sip_server_instant_test_response.py new file mode 100644 index 00000000..b70e72c9 --- /dev/null +++ b/tests/test/test_sip_server_instant_test_response.py @@ -0,0 +1,92 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.sip_server_instant_test_response import SipServerInstantTestResponse + +class TestSipServerInstantTestResponse(unittest.TestCase): + """SipServerInstantTestResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerInstantTestResponse: + """Test SipServerInstantTestResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerInstantTestResponse` + """ + model = SipServerInstantTestResponse() + if include_optional: + return SipServerInstantTestResponse( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ], + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username' + ) + else: + return SipServerInstantTestResponse( + port = 1, + ) + """ + + def testSipServerInstantTestResponse(self): + """Test SipServerInstantTestResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_sip_server_properties.py b/tests/test/test_sip_server_properties.py new file mode 100644 index 00000000..605c3f8e --- /dev/null +++ b/tests/test/test_sip_server_properties.py @@ -0,0 +1,62 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.sip_server_properties import SipServerProperties + +class TestSipServerProperties(unittest.TestCase): + """SipServerProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerProperties: + """Test SipServerProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerProperties` + """ + model = SipServerProperties() + if include_optional: + return SipServerProperties( + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + type = 'sip-server' + ) + else: + return SipServerProperties( + ) + """ + + def testSipServerProperties(self): + """Test SipServerProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_sip_server_test.py b/tests/test/test_sip_server_test.py new file mode 100644 index 00000000..54ea7d8b --- /dev/null +++ b/tests/test/test_sip_server_test.py @@ -0,0 +1,122 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.sip_server_test import SipServerTest + +class TestSipServerTest(unittest.TestCase): + """SipServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SipServerTest: + """Test SipServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SipServerTest` + """ + model = SipServerTest() + if include_optional: + return SipServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [ + tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ], + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', + bgp_measurements = True, + use_public_bgp = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return SipServerTest( + interval = 120, + port = 1, + ) + """ + + def testSipServerTest(self): + """Test SipServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_sip_server_tests.py b/tests/test/test_sip_server_tests.py similarity index 82% rename from tests_api/test/test_sip_server_tests.py rename to tests/test/test_sip_server_tests.py index 04f4fe77..af33eec1 100644 --- a/tests_api/test/test_sip_server_tests.py +++ b/tests/test/test_sip_server_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.sip_server_tests import SipServerTests +from tests.models.sip_server_tests import SipServerTests class TestSipServerTests(unittest.TestCase): """SipServerTests unit test stubs""" diff --git a/tests/test/test_sip_test_protocol.py b/tests/test/test_sip_test_protocol.py new file mode 100644 index 00000000..d9960c74 --- /dev/null +++ b/tests/test/test_sip_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.sip_test_protocol import SipTestProtocol + +class TestSipTestProtocol(unittest.TestCase): + """SipTestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSipTestProtocol(self): + """Test SipTestProtocol""" + # inst = SipTestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_auth_type.py b/tests/test/test_test_auth_type.py new file mode 100644 index 00000000..91219888 --- /dev/null +++ b/tests/test/test_test_auth_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_auth_type import TestAuthType + +class TestTestAuthType(unittest.TestCase): + """TestAuthType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestAuthType(self): + """Test TestAuthType""" + # inst = TestAuthType() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_custom_headers.py b/tests/test/test_test_custom_headers.py new file mode 100644 index 00000000..85da952c --- /dev/null +++ b/tests/test/test_test_custom_headers.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_custom_headers import TestCustomHeaders + +class TestTestCustomHeaders(unittest.TestCase): + """TestCustomHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestCustomHeaders: + """Test TestCustomHeaders + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestCustomHeaders` + """ + model = TestCustomHeaders() + if include_optional: + return TestCustomHeaders( + root = { + 'key' : '' + }, + domains = { + 'key' : { + 'key' : '' + } + }, + all = { + 'key' : '' + } + ) + else: + return TestCustomHeaders( + ) + """ + + def testTestCustomHeaders(self): + """Test TestCustomHeaders""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_direction.py b/tests/test/test_test_direction.py new file mode 100644 index 00000000..af01b2f5 --- /dev/null +++ b/tests/test/test_test_direction.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_direction import TestDirection + +class TestTestDirection(unittest.TestCase): + """TestDirection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDirection(self): + """Test TestDirection""" + # inst = TestDirection() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_dns_server.py b/tests/test/test_test_dns_server.py new file mode 100644 index 00000000..c011389b --- /dev/null +++ b/tests/test/test_test_dns_server.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_dns_server import TestDnsServer + +class TestTestDnsServer(unittest.TestCase): + """TestDnsServer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestDnsServer: + """Test TestDnsServer + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestDnsServer` + """ + model = TestDnsServer() + if include_optional: + return TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net' + ) + else: + return TestDnsServer( + ) + """ + + def testTestDnsServer(self): + """Test TestDnsServer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_dns_transport_protocol.py b/tests/test/test_test_dns_transport_protocol.py new file mode 100644 index 00000000..c2dedaf8 --- /dev/null +++ b/tests/test/test_test_dns_transport_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol + +class TestTestDnsTransportProtocol(unittest.TestCase): + """TestDnsTransportProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDnsTransportProtocol(self): + """Test TestDnsTransportProtocol""" + # inst = TestDnsTransportProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_dscp_id.py b/tests/test/test_test_dscp_id.py new file mode 100644 index 00000000..ab3edb55 --- /dev/null +++ b/tests/test/test_test_dscp_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_dscp_id import TestDscpId + +class TestTestDscpId(unittest.TestCase): + """TestDscpId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestDscpId(self): + """Test TestDscpId""" + # inst = TestDscpId() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_http_interval.py b/tests/test/test_test_http_interval.py new file mode 100644 index 00000000..1af97194 --- /dev/null +++ b/tests/test/test_test_http_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_http_interval import TestHttpInterval + +class TestTestHttpInterval(unittest.TestCase): + """TestHttpInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestHttpInterval(self): + """Test TestHttpInterval""" + # inst = TestHttpInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_interval.py b/tests/test/test_test_interval.py new file mode 100644 index 00000000..a64415c4 --- /dev/null +++ b/tests/test/test_test_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_interval import TestInterval + +class TestTestInterval(unittest.TestCase): + """TestInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestInterval(self): + """Test TestInterval""" + # inst = TestInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_ipv6_policy.py b/tests/test/test_test_ipv6_policy.py new file mode 100644 index 00000000..d5c187c3 --- /dev/null +++ b/tests/test/test_test_ipv6_policy.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_ipv6_policy import TestIpv6Policy + +class TestTestIpv6Policy(unittest.TestCase): + """TestIpv6Policy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestIpv6Policy(self): + """Test TestIpv6Policy""" + # inst = TestIpv6Policy() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_labels_inner.py b/tests/test/test_test_labels_inner.py new file mode 100644 index 00000000..7f38a63f --- /dev/null +++ b/tests/test/test_test_labels_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_labels_inner import TestLabelsInner + +class TestTestLabelsInner(unittest.TestCase): + """TestLabelsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestLabelsInner: + """Test TestLabelsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestLabelsInner` + """ + model = TestLabelsInner() + if include_optional: + return TestLabelsInner( + label_id = '', + name = '', + is_builtin = True + ) + else: + return TestLabelsInner( + ) + """ + + def testTestLabelsInner(self): + """Test TestLabelsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_monitors_properties.py b/tests/test/test_test_monitors_properties.py new file mode 100644 index 00000000..83a3fec8 --- /dev/null +++ b/tests/test/test_test_monitors_properties.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_monitors_properties import TestMonitorsProperties + +class TestTestMonitorsProperties(unittest.TestCase): + """TestMonitorsProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestMonitorsProperties: + """Test TestMonitorsProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestMonitorsProperties` + """ + model = TestMonitorsProperties() + if include_optional: + return TestMonitorsProperties( + bgp_measurements = True, + use_public_bgp = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return TestMonitorsProperties( + ) + """ + + def testTestMonitorsProperties(self): + """Test TestMonitorsProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_page_loading_strategy.py b/tests/test/test_test_page_loading_strategy.py new file mode 100644 index 00000000..3aeacc69 --- /dev/null +++ b/tests/test/test_test_page_loading_strategy.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy + +class TestTestPageLoadingStrategy(unittest.TestCase): + """TestPageLoadingStrategy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestPageLoadingStrategy(self): + """Test TestPageLoadingStrategy""" + # inst = TestPageLoadingStrategy() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_path_trace_mode.py b/tests/test/test_test_path_trace_mode.py new file mode 100644 index 00000000..0378a0b7 --- /dev/null +++ b/tests/test/test_test_path_trace_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_path_trace_mode import TestPathTraceMode + +class TestTestPathTraceMode(unittest.TestCase): + """TestPathTraceMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestPathTraceMode(self): + """Test TestPathTraceMode""" + # inst = TestPathTraceMode() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_probe_mode.py b/tests/test/test_test_probe_mode.py new file mode 100644 index 00000000..855db371 --- /dev/null +++ b/tests/test/test_test_probe_mode.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_probe_mode import TestProbeMode + +class TestTestProbeMode(unittest.TestCase): + """TestProbeMode unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProbeMode(self): + """Test TestProbeMode""" + # inst = TestProbeMode() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_protocol.py b/tests/test/test_test_protocol.py new file mode 100644 index 00000000..48b80810 --- /dev/null +++ b/tests/test/test_test_protocol.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_protocol import TestProtocol + +class TestTestProtocol(unittest.TestCase): + """TestProtocol unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestProtocol(self): + """Test TestProtocol""" + # inst = TestProtocol() + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_test_request.py b/tests/test/test_test_request.py similarity index 81% rename from tests_api/test/test_test_request.py rename to tests/test/test_test_request.py index da4e8ff9..9c196013 100644 --- a/tests_api/test/test_test_request.py +++ b/tests/test/test_test_request.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.test_request import TestRequest +from tests.models.test_request import TestRequest class TestTestRequest(unittest.TestCase): """TestRequest unit test stubs""" @@ -37,7 +36,7 @@ class TestTestRequest(unittest.TestCase): if include_optional: return TestRequest( labels = [9842, 1283], - shared_with_accounts = [2087, 100], + shared_with_accounts = [1234, 12345], alert_rules = [344753, 212697], agents = [ {"agentId":"125","sourceIpAddress":"1.1.1.1"} diff --git a/tests_api/test/test_test_request_all_of_agents.py b/tests/test/test_test_request_all_of_agents.py similarity index 82% rename from tests_api/test/test_test_request_all_of_agents.py rename to tests/test/test_test_request_all_of_agents.py index 317a945e..aecfd7fe 100644 --- a/tests_api/test/test_test_request_all_of_agents.py +++ b/tests/test/test_test_request_all_of_agents.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents class TestTestRequestAllOfAgents(unittest.TestCase): """TestRequestAllOfAgents unit test stubs""" diff --git a/tests/test/test_test_shared_accounts_inner.py b/tests/test/test_test_shared_accounts_inner.py new file mode 100644 index 00000000..f1d235b5 --- /dev/null +++ b/tests/test/test_test_shared_accounts_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner + +class TestTestSharedAccountsInner(unittest.TestCase): + """TestSharedAccountsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestSharedAccountsInner: + """Test TestSharedAccountsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestSharedAccountsInner` + """ + model = TestSharedAccountsInner() + if include_optional: + return TestSharedAccountsInner( + aid = '1234', + name = 'Account name' + ) + else: + return TestSharedAccountsInner( + ) + """ + + def testTestSharedAccountsInner(self): + """Test TestSharedAccountsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_sip_credentials.py b/tests/test/test_test_sip_credentials.py new file mode 100644 index 00000000..353296c1 --- /dev/null +++ b/tests/test/test_test_sip_credentials.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_sip_credentials import TestSipCredentials + +class TestTestSipCredentials(unittest.TestCase): + """TestSipCredentials unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestSipCredentials: + """Test TestSipCredentials + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestSipCredentials` + """ + model = TestSipCredentials() + if include_optional: + return TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username' + ) + else: + return TestSipCredentials( + port = 1, + ) + """ + + def testTestSipCredentials(self): + """Test TestSipCredentials""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_ssl_version_id.py b/tests/test/test_test_ssl_version_id.py new file mode 100644 index 00000000..e2feff10 --- /dev/null +++ b/tests/test/test_test_ssl_version_id.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_ssl_version_id import TestSslVersionId + +class TestTestSslVersionId(unittest.TestCase): + """TestSslVersionId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestSslVersionId(self): + """Test TestSslVersionId""" + # inst = TestSslVersionId() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_sub_interval.py b/tests/test/test_test_sub_interval.py new file mode 100644 index 00000000..7487bbb8 --- /dev/null +++ b/tests/test/test_test_sub_interval.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_sub_interval import TestSubInterval + +class TestTestSubInterval(unittest.TestCase): + """TestSubInterval unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestSubInterval(self): + """Test TestSubInterval""" + # inst = TestSubInterval() + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_test_type.py b/tests/test/test_test_type.py new file mode 100644 index 00000000..6d2784dd --- /dev/null +++ b/tests/test/test_test_type.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.test_type import TestType + +class TestTestType(unittest.TestCase): + """TestType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTestType(self): + """Test TestType""" + # inst = TestType() + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_tests.py b/tests/test/test_tests.py similarity index 81% rename from tests_api/test/test_tests.py rename to tests/test/test_tests.py index 62d2a8c0..8bc02ded 100644 --- a/tests_api/test/test_tests.py +++ b/tests/test/test_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.tests import Tests +from tests.models.tests import Tests class TestTests(unittest.TestCase): """Tests unit test stubs""" @@ -37,7 +36,7 @@ class TestTests(unittest.TestCase): if include_optional: return Tests( tests = [ - null + { } ] ) else: diff --git a/tests/test/test_unauthorized_error.py b/tests/test/test_unauthorized_error.py new file mode 100644 index 00000000..1206f804 --- /dev/null +++ b/tests/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_agent_to_agent_test.py b/tests/test/test_unexpanded_agent_to_agent_test.py new file mode 100644 index 00000000..4c438c24 --- /dev/null +++ b/tests/test/test_unexpanded_agent_to_agent_test.py @@ -0,0 +1,83 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_agent_to_agent_test import UnexpandedAgentToAgentTest + +class TestUnexpandedAgentToAgentTest(unittest.TestCase): + """UnexpandedAgentToAgentTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedAgentToAgentTest: + """Test UnexpandedAgentToAgentTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedAgentToAgentTest` + """ + model = UnexpandedAgentToAgentTest() + if include_optional: + return UnexpandedAgentToAgentTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-agent', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + direction = 'to-target', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + mss = 20, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + protocol = 'tcp', + target_agent_id = '2954', + throughput_measurements = True, + throughput_duration = 5000, + throughput_rate = 8, + fixed_packet_rate = 50, + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedAgentToAgentTest( + interval = 120, + target_agent_id = '2954', + ) + """ + + def testUnexpandedAgentToAgentTest(self): + """Test UnexpandedAgentToAgentTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_agent_to_server_test.py b/tests/test/test_unexpanded_agent_to_server_test.py new file mode 100644 index 00000000..50f1674e --- /dev/null +++ b/tests/test/test_unexpanded_agent_to_server_test.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_agent_to_server_test import UnexpandedAgentToServerTest + +class TestUnexpandedAgentToServerTest(unittest.TestCase): + """UnexpandedAgentToServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedAgentToServerTest: + """Test UnexpandedAgentToServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedAgentToServerTest` + """ + model = UnexpandedAgentToServerTest() + if include_optional: + return UnexpandedAgentToServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + bandwidth_measurements = True, + continuous_mode = False, + fixed_packet_rate = 25, + mtu_measurements = False, + num_path_traces = 1, + path_trace_mode = 'classic', + port = 1, + probe_mode = 'auto', + protocol = 'tcp', + server = 'www.thousandeyes.com', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + ipv6_policy = 'use-agent-policy', + ping_payload_size = 0, + network_measurements = True, + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedAgentToServerTest( + interval = 120, + server = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedAgentToServerTest(self): + """Test UnexpandedAgentToServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_bgp_test.py b/tests/test/test_unexpanded_bgp_test.py new file mode 100644 index 00000000..3c5d9c56 --- /dev/null +++ b/tests/test/test_unexpanded_bgp_test.py @@ -0,0 +1,69 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_bgp_test import UnexpandedBgpTest + +class TestUnexpandedBgpTest(unittest.TestCase): + """UnexpandedBgpTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedBgpTest: + """Test UnexpandedBgpTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedBgpTest` + """ + model = UnexpandedBgpTest() + if include_optional: + return UnexpandedBgpTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'bgp', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + enabled = True, + include_covered_prefixes = True, + use_public_bgp = True, + alerts_enabled = True, + prefix = '' + ) + else: + return UnexpandedBgpTest( + prefix = '', + ) + """ + + def testUnexpandedBgpTest(self): + """Test UnexpandedBgpTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_dns_sec_test.py b/tests/test/test_unexpanded_dns_sec_test.py new file mode 100644 index 00000000..afb3c439 --- /dev/null +++ b/tests/test/test_unexpanded_dns_sec_test.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_dns_sec_test import UnexpandedDnsSecTest + +class TestUnexpandedDnsSecTest(unittest.TestCase): + """UnexpandedDnsSecTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedDnsSecTest: + """Test UnexpandedDnsSecTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedDnsSecTest` + """ + model = UnexpandedDnsSecTest() + if include_optional: + return UnexpandedDnsSecTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dnssec', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + domain = 'www.thousandeyes.com', + dns_query_class = 'in' + ) + else: + return UnexpandedDnsSecTest( + interval = 120, + domain = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedDnsSecTest(self): + """Test UnexpandedDnsSecTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_dns_server_test.py b/tests/test/test_unexpanded_dns_server_test.py new file mode 100644 index 00000000..f5d5d24a --- /dev/null +++ b/tests/test/test_unexpanded_dns_server_test.py @@ -0,0 +1,93 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_dns_server_test import UnexpandedDnsServerTest + +class TestUnexpandedDnsServerTest(unittest.TestCase): + """UnexpandedDnsServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedDnsServerTest: + """Test UnexpandedDnsServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedDnsServerTest` + """ + model = UnexpandedDnsServerTest() + if include_optional: + return UnexpandedDnsServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + bandwidth_measurements = True, + dns_servers = [ + tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedDnsServerTest( + interval = 120, + dns_servers = [ + tests.models.test_dns_server.TestDnsServer( + server_id = '1447', + server_name = 'dns-example.net', ) + ], + domain = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedDnsServerTest(self): + """Test UnexpandedDnsServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_dns_trace_test.py b/tests/test/test_unexpanded_dns_trace_test.py new file mode 100644 index 00000000..636fdf5e --- /dev/null +++ b/tests/test/test_unexpanded_dns_trace_test.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_dns_trace_test import UnexpandedDnsTraceTest + +class TestUnexpandedDnsTraceTest(unittest.TestCase): + """UnexpandedDnsTraceTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedDnsTraceTest: + """Test UnexpandedDnsTraceTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedDnsTraceTest` + """ + model = UnexpandedDnsTraceTest() + if include_optional: + return UnexpandedDnsTraceTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-trace', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + dns_query_class = 'in' + ) + else: + return UnexpandedDnsTraceTest( + interval = 120, + domain = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedDnsTraceTest(self): + """Test UnexpandedDnsTraceTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_ftp_server_test.py b/tests/test/test_unexpanded_ftp_server_test.py new file mode 100644 index 00000000..5b149d79 --- /dev/null +++ b/tests/test/test_unexpanded_ftp_server_test.py @@ -0,0 +1,91 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_ftp_server_test import UnexpandedFtpServerTest + +class TestUnexpandedFtpServerTest(unittest.TestCase): + """UnexpandedFtpServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedFtpServerTest: + """Test UnexpandedFtpServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedFtpServerTest` + """ + model = UnexpandedFtpServerTest() + if include_optional: + return UnexpandedFtpServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'ftp-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + bandwidth_measurements = True, + download_limit = 1048576, + ftp_target_time = 1000, + ftp_time_limit = 10, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + request_type = 'download', + url = 'www.thousandeyes.com', + use_active_ftp = True, + use_explicit_ftps = False, + username = 'username', + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedFtpServerTest( + interval = 120, + password = 'password', + request_type = 'download', + url = 'www.thousandeyes.com', + username = 'username', + ) + """ + + def testUnexpandedFtpServerTest(self): + """Test UnexpandedFtpServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_http_server_test.py b/tests/test/test_unexpanded_http_server_test.py new file mode 100644 index 00000000..0bddd50e --- /dev/null +++ b/tests/test/test_unexpanded_http_server_test.py @@ -0,0 +1,108 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_http_server_test import UnexpandedHttpServerTest + +class TestUnexpandedHttpServerTest(unittest.TestCase): + """UnexpandedHttpServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedHttpServerTest: + """Test UnexpandedHttpServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedHttpServerTest` + """ + model = UnexpandedHttpServerTest() + if include_optional: + return UnexpandedHttpServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'http-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + headers = [header1: value1, header2: value2], + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + download_limit = 2048, + dns_override = '8.8.8.8', + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + post_body = '{ "example" : "value"}', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + ipv6_policy = 'use-agent-policy', + follow_redirects = True, + fixed_packet_rate = 50, + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedHttpServerTest( + interval = 120, + url = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedHttpServerTest(self): + """Test UnexpandedHttpServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_instant_test.py b/tests/test/test_unexpanded_instant_test.py new file mode 100644 index 00000000..cbce5c88 --- /dev/null +++ b/tests/test/test_unexpanded_instant_test.py @@ -0,0 +1,63 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_instant_test import UnexpandedInstantTest + +class TestUnexpandedInstantTest(unittest.TestCase): + """UnexpandedInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTest: + """Test UnexpandedInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTest` + """ + model = UnexpandedInstantTest() + if include_optional: + return UnexpandedInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'agent-to-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ) + ) + else: + return UnexpandedInstantTest( + ) + """ + + def testUnexpandedInstantTest(self): + """Test UnexpandedInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_instant_test_links.py b/tests/test/test_unexpanded_instant_test_links.py new file mode 100644 index 00000000..355af9c2 --- /dev/null +++ b/tests/test/test_unexpanded_instant_test_links.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks + +class TestUnexpandedInstantTestLinks(unittest.TestCase): + """UnexpandedInstantTestLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: + """Test UnexpandedInstantTestLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTestLinks` + """ + model = UnexpandedInstantTestLinks() + if include_optional: + return UnexpandedInstantTestLinks( + var_self = None, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}] + ) + else: + return UnexpandedInstantTestLinks( + ) + """ + + def testUnexpandedInstantTestLinks(self): + """Test UnexpandedInstantTestLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_instant_test_links_self.py b/tests/test/test_unexpanded_instant_test_links_self.py new file mode 100644 index 00000000..5487fc40 --- /dev/null +++ b/tests/test/test_unexpanded_instant_test_links_self.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf + +class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): + """UnexpandedInstantTestLinksSelf unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: + """Test UnexpandedInstantTestLinksSelf + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` + """ + model = UnexpandedInstantTestLinksSelf() + if include_optional: + return UnexpandedInstantTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return UnexpandedInstantTestLinksSelf( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testUnexpandedInstantTestLinksSelf(self): + """Test UnexpandedInstantTestLinksSelf""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_page_load_test.py b/tests/test/test_unexpanded_page_load_test.py new file mode 100644 index 00000000..eb47068b --- /dev/null +++ b/tests/test/test_unexpanded_page_load_test.py @@ -0,0 +1,113 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_page_load_test import UnexpandedPageLoadTest + +class TestUnexpandedPageLoadTest(unittest.TestCase): + """UnexpandedPageLoadTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedPageLoadTest: + """Test UnexpandedPageLoadTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedPageLoadTest` + """ + model = UnexpandedPageLoadTest() + if include_optional: + return UnexpandedPageLoadTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'page-load', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + page_load_target_time = 10, + page_load_time_limit = 5, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + http_interval = 120, + subinterval = 60, + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedPageLoadTest( + interval = 120, + url = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedPageLoadTest(self): + """Test UnexpandedPageLoadTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_sip_server_test.py b/tests/test/test_unexpanded_sip_server_test.py new file mode 100644 index 00000000..0a95e216 --- /dev/null +++ b/tests/test/test_unexpanded_sip_server_test.py @@ -0,0 +1,87 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_sip_server_test import UnexpandedSipServerTest + +class TestUnexpandedSipServerTest(unittest.TestCase): + """UnexpandedSipServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedSipServerTest: + """Test UnexpandedSipServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedSipServerTest` + """ + model = UnexpandedSipServerTest() + if include_optional: + return UnexpandedSipServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedSipServerTest( + interval = 120, + port = 1, + ) + """ + + def testUnexpandedSipServerTest(self): + """Test UnexpandedSipServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_test.py b/tests/test/test_unexpanded_test.py new file mode 100644 index 00000000..c0bfc234 --- /dev/null +++ b/tests/test/test_unexpanded_test.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_test import UnexpandedTest + +class TestUnexpandedTest(unittest.TestCase): + """UnexpandedTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedTest: + """Test UnexpandedTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedTest` + """ + model = UnexpandedTest() + if include_optional: + return UnexpandedTest( + interval = 120, + alerts_enabled = True, + enabled = True + ) + else: + return UnexpandedTest( + ) + """ + + def testUnexpandedTest(self): + """Test UnexpandedTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_voice_test.py b/tests/test/test_unexpanded_voice_test.py new file mode 100644 index 00000000..36645db2 --- /dev/null +++ b/tests/test/test_unexpanded_voice_test.py @@ -0,0 +1,79 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_voice_test import UnexpandedVoiceTest + +class TestUnexpandedVoiceTest(unittest.TestCase): + """UnexpandedVoiceTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedVoiceTest: + """Test UnexpandedVoiceTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedVoiceTest` + """ + model = UnexpandedVoiceTest() + if include_optional: + return UnexpandedVoiceTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'voice', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedVoiceTest( + interval = 120, + target_agent_id = '281474976710706', + ) + """ + + def testUnexpandedVoiceTest(self): + """Test UnexpandedVoiceTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_unexpanded_web_transaction_test.py b/tests/test/test_unexpanded_web_transaction_test.py new file mode 100644 index 00000000..eb8bc304 --- /dev/null +++ b/tests/test/test_unexpanded_web_transaction_test.py @@ -0,0 +1,114 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.unexpanded_web_transaction_test import UnexpandedWebTransactionTest + +class TestUnexpandedWebTransactionTest(unittest.TestCase): + """UnexpandedWebTransactionTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnexpandedWebTransactionTest: + """Test UnexpandedWebTransactionTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnexpandedWebTransactionTest` + """ + model = UnexpandedWebTransactionTest() + if include_optional: + return UnexpandedWebTransactionTest( + interval = 120, + alerts_enabled = True, + enabled = True, + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'web-transactions', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + target_time = 1, + time_limit = 5, + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + subinterval = 60, + bgp_measurements = True, + use_public_bgp = True + ) + else: + return UnexpandedWebTransactionTest( + interval = 120, + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + ) + """ + + def testUnexpandedWebTransactionTest(self): + """Test UnexpandedWebTransactionTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_update_agent_to_agent_test.py b/tests/test/test_update_agent_to_agent_test.py similarity index 81% rename from tests_api/test/test_update_agent_to_agent_test.py rename to tests/test/test_update_agent_to_agent_test.py index 06eaebfc..92dd7be3 100644 --- a/tests_api/test/test_update_agent_to_agent_test.py +++ b/tests/test/test_update_agent_to_agent_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest class TestUpdateAgentToAgentTest(unittest.TestCase): """UpdateAgentToAgentTest unit test stubs""" @@ -50,19 +49,16 @@ class TestUpdateAgentToAgentTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'agent-to-agent', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], direction = 'to-target', dscp = 'Best Effort (DSCP 0)', dscp_id = '0', mss = 20, - num_path_traces = 3, + num_path_traces = 1, path_trace_mode = 'classic', port = 1, protocol = 'tcp', @@ -71,15 +67,16 @@ class TestUpdateAgentToAgentTest(unittest.TestCase): throughput_duration = 5000, throughput_rate = 8, fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], bgp_measurements = True, + use_public_bgp = True, monitors = [17410, 5] ) else: return UpdateAgentToAgentTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], target_agent_id = '2954', ) """ diff --git a/tests_api/test/test_update_agent_to_server_test.py b/tests/test/test_update_agent_to_server_test.py similarity index 81% rename from tests_api/test/test_update_agent_to_server_test.py rename to tests/test/test_update_agent_to_server_test.py index 3ed382c6..6de549f1 100644 --- a/tests_api/test/test_update_agent_to_server_test.py +++ b/tests/test/test_update_agent_to_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest class TestUpdateAgentToServerTest(unittest.TestCase): """UpdateAgentToServerTest unit test stubs""" @@ -50,19 +49,16 @@ class TestUpdateAgentToServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'agent-to-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], bandwidth_measurements = True, continuous_mode = False, fixed_packet_rate = 25, mtu_measurements = False, - num_path_traces = 3, + num_path_traces = 1, path_trace_mode = 'classic', port = 1, probe_mode = 'auto', @@ -73,15 +69,16 @@ class TestUpdateAgentToServerTest(unittest.TestCase): ipv6_policy = 'use-agent-policy', ping_payload_size = 0, network_measurements = True, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], bgp_measurements = True, + use_public_bgp = True, monitors = [17410, 5] ) else: return UpdateAgentToServerTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], server = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_update_bgp_test.py b/tests/test/test_update_bgp_test.py similarity index 76% rename from tests_api/test/test_update_bgp_test.py rename to tests/test/test_update_bgp_test.py index 5f10c35c..ca052ee3 100644 --- a/tests_api/test/test_update_bgp_test.py +++ b/tests/test/test_update_bgp_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_bgp_test import UpdateBgpTest +from tests.models.update_bgp_test import UpdateBgpTest class TestUpdateBgpTest(unittest.TestCase): """UpdateBgpTest unit test stubs""" @@ -46,17 +45,18 @@ class TestUpdateBgpTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'bgp', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], + shared_with_accounts = [1234, 12345], + enabled = True, monitors = [17410, 5], include_covered_prefixes = True, - prefix = '', - use_public_bgp = False, + use_public_bgp = True, alerts_enabled = True, - alert_rules = [344753, 212697] + alert_rules = [344753, 212697], + prefix = '' ) else: return UpdateBgpTest( diff --git a/tests/test/test_update_bgp_test_request.py b/tests/test/test_update_bgp_test_request.py new file mode 100644 index 00000000..04025c12 --- /dev/null +++ b/tests/test/test_update_bgp_test_request.py @@ -0,0 +1,71 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.update_bgp_test_request import UpdateBgpTestRequest + +class TestUpdateBgpTestRequest(unittest.TestCase): + """UpdateBgpTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateBgpTestRequest: + """Test UpdateBgpTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateBgpTestRequest` + """ + model = UpdateBgpTestRequest() + if include_optional: + return UpdateBgpTestRequest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'bgp', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + enabled = True, + monitors = [17410, 5], + include_covered_prefixes = True, + use_public_bgp = True, + alerts_enabled = True, + alert_rules = [344753, 212697] + ) + else: + return UpdateBgpTestRequest( + ) + """ + + def testUpdateBgpTestRequest(self): + """Test UpdateBgpTestRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_update_dns_sec_test.py b/tests/test/test_update_dns_sec_test.py similarity index 76% rename from tests_api/test/test_update_dns_sec_test.py rename to tests/test/test_update_dns_sec_test.py index bb1e4186..370075da 100644 --- a/tests_api/test/test_update_dns_sec_test.py +++ b/tests/test/test_update_dns_sec_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest +from tests.models.update_dns_sec_test import UpdateDnsSecTest class TestUpdateDnsSecTest(unittest.TestCase): """UpdateDnsSecTest unit test stubs""" @@ -50,23 +49,20 @@ class TestUpdateDnsSecTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'dnssec', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], + shared_with_accounts = [1234, 12345], + domain = 'www.thousandeyes.com', + dns_query_class = 'in', agents = [ {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - domain = 'www.thousandeyes.com', - dns_query_class = 'in' + ] ) else: return UpdateDnsSecTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], domain = 'www.thousandeyes.com', ) """ diff --git a/tests/test/test_update_dns_server_test.py b/tests/test/test_update_dns_server_test.py new file mode 100644 index 00000000..2d148d4d --- /dev/null +++ b/tests/test/test_update_dns_server_test.py @@ -0,0 +1,92 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.update_dns_server_test import UpdateDnsServerTest + +class TestUpdateDnsServerTest(unittest.TestCase): + """UpdateDnsServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateDnsServerTest: + """Test UpdateDnsServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateDnsServerTest` + """ + model = UpdateDnsServerTest() + if include_optional: + return UpdateDnsServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [344753, 212697], + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'dns-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + bandwidth_measurements = True, + dns_servers = [dns-example.net, 8.8.8.8], + dns_transport_protocol = 'udp', + domain = 'www.thousandeyes.com', + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + recursive_queries = True, + ipv6_policy = 'use-agent-policy', + fixed_packet_rate = 50, + dns_query_class = 'in', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + bgp_measurements = True, + use_public_bgp = True, + monitors = [17410, 5] + ) + else: + return UpdateDnsServerTest( + interval = 120, + dns_servers = [dns-example.net, 8.8.8.8], + domain = 'www.thousandeyes.com', + ) + """ + + def testUpdateDnsServerTest(self): + """Test UpdateDnsServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_update_dns_trace_test.py b/tests/test/test_update_dns_trace_test.py similarity index 77% rename from tests_api/test/test_update_dns_trace_test.py rename to tests/test/test_update_dns_trace_test.py index c51ed2f7..e254e92a 100644 --- a/tests_api/test/test_update_dns_trace_test.py +++ b/tests/test/test_update_dns_trace_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest +from tests.models.update_dns_trace_test import UpdateDnsTraceTest class TestUpdateDnsTraceTest(unittest.TestCase): """UpdateDnsTraceTest unit test stubs""" @@ -50,24 +49,21 @@ class TestUpdateDnsTraceTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'dns-trace', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], dns_transport_protocol = 'udp', domain = 'www.thousandeyes.com', - dns_query_class = 'in' + dns_query_class = 'in', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ] ) else: return UpdateDnsTraceTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], domain = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_update_ftp_server_test.py b/tests/test/test_update_ftp_server_test.py similarity index 82% rename from tests_api/test/test_update_ftp_server_test.py rename to tests/test/test_update_ftp_server_test.py index ee6bf8fc..984116f8 100644 --- a/tests_api/test/test_update_ftp_server_test.py +++ b/tests/test/test_update_ftp_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest +from tests.models.update_ftp_server_test import UpdateFtpServerTest class TestUpdateFtpServerTest(unittest.TestCase): """UpdateFtpServerTest unit test stubs""" @@ -50,21 +49,18 @@ class TestUpdateFtpServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'ftp-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], bandwidth_measurements = True, download_limit = 1048576, ftp_target_time = 1000, ftp_time_limit = 10, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', probe_mode = 'auto', @@ -76,15 +72,16 @@ class TestUpdateFtpServerTest(unittest.TestCase): username = 'username', fixed_packet_rate = 50, ipv6_policy = 'use-agent-policy', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], bgp_measurements = True, + use_public_bgp = True, monitors = [17410, 5] ) else: return UpdateFtpServerTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], password = 'password', request_type = 'download', url = 'www.thousandeyes.com', diff --git a/tests_api/test/test_update_http_server_test.py b/tests/test/test_update_http_server_test.py similarity index 84% rename from tests_api/test/test_update_http_server_test.py rename to tests/test/test_update_http_server_test.py index d7c14676..a5cdf6b7 100644 --- a/tests_api/test/test_update_http_server_test.py +++ b/tests/test/test_update_http_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_http_server_test import UpdateHttpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest class TestUpdateHttpServerTest(unittest.TestCase): """UpdateHttpServerTest unit test stubs""" @@ -50,14 +49,11 @@ class TestUpdateHttpServerTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'http-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -68,7 +64,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL -----END CERTIFICATE----- ', content_regex = '(regex)+', - headers = ["header1: value1","header2: value2"], + headers = [header1: value1, header2: value2], custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, desired_status_code = '200', download_limit = 2048, @@ -79,7 +75,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', post_body = '{ "example" : "value"}', @@ -92,18 +88,20 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, ipv6_policy = 'use-agent-policy', follow_redirects = True, fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], bgp_measurements = True, + use_public_bgp = True, monitors = [17410, 5] ) else: return UpdateHttpServerTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], url = 'www.thousandeyes.com', ) """ diff --git a/tests_api/test/test_update_page_load_test.py b/tests/test/test_update_page_load_test.py similarity index 85% rename from tests_api/test/test_update_page_load_test.py rename to tests/test/test_update_page_load_test.py index 5da32ff7..f280a844 100644 --- a/tests_api/test/test_update_page_load_test.py +++ b/tests/test/test_update_page_load_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_page_load_test import UpdatePageLoadTest +from tests.models.update_page_load_test import UpdatePageLoadTest class TestUpdatePageLoadTest(unittest.TestCase): """UpdatePageLoadTest unit test stubs""" @@ -50,14 +49,11 @@ class TestUpdatePageLoadTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'page-load', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -69,6 +65,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ', content_regex = '(regex)+', custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', follow_redirects = True, http_target_time = 100, http_time_limit = 5, @@ -76,7 +73,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, page_load_target_time = 10, page_load_time_limit = 5, password = 'password', @@ -90,6 +87,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, block_domains = 'domain.com/', disable_screenshot = True, allow_mic_and_camera = True, @@ -97,7 +95,11 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL browser_language = 'en-US', page_loading_strategy = 'normal', fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], bgp_measurements = True, + use_public_bgp = True, monitors = [17410, 5], http_interval = 120, subinterval = 60 @@ -105,11 +107,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL else: return UpdatePageLoadTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], url = 'www.thousandeyes.com', - http_interval = 120, ) """ diff --git a/tests/test/test_update_sip_server_test.py b/tests/test/test_update_sip_server_test.py new file mode 100644 index 00000000..492e8900 --- /dev/null +++ b/tests/test/test_update_sip_server_test.py @@ -0,0 +1,109 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.update_sip_server_test import UpdateSipServerTest + +class TestUpdateSipServerTest(unittest.TestCase): + """UpdateSipServerTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateSipServerTest: + """Test UpdateSipServerTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateSipServerTest` + """ + model = UpdateSipServerTest() + if include_optional: + return UpdateSipServerTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [344753, 212697], + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + target_sip_credentials = tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + bgp_measurements = True, + use_public_bgp = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return UpdateSipServerTest( + interval = 120, + target_sip_credentials = tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + ) + """ + + def testUpdateSipServerTest(self): + """Test UpdateSipServerTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_update_sip_server_test1.py b/tests/test/test_update_sip_server_test1.py new file mode 100644 index 00000000..3fda0392 --- /dev/null +++ b/tests/test/test_update_sip_server_test1.py @@ -0,0 +1,129 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.update_sip_server_test1 import UpdateSipServerTest1 + +class TestUpdateSipServerTest1(unittest.TestCase): + """UpdateSipServerTest1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateSipServerTest1: + """Test UpdateSipServerTest1 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateSipServerTest1` + """ + model = UpdateSipServerTest1() + if include_optional: + return UpdateSipServerTest1( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [ + tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'sip-server', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + options_regex = '["a-z"]', + path_trace_mode = 'classic', + probe_mode = 'auto', + register_enabled = True, + sip_target_time = 100, + sip_time_limit = 5, + fixed_packet_rate = 50, + ipv6_policy = 'use-agent-policy', + agents = [ + null + ], + target_sip_credentials = tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + bgp_measurements = True, + use_public_bgp = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return UpdateSipServerTest1( + interval = 120, + target_sip_credentials = tests.models.test_sip_credentials.TestSipCredentials( + auth_user = 'username', + password = 'password', + port = 1, + protocol = 'tcp', + sip_registrar = 'voice.thousandeyes.com', + user = 'username', ), + ) + """ + + def testUpdateSipServerTest1(self): + """Test UpdateSipServerTest1""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_update_voice_test.py b/tests/test/test_update_voice_test.py new file mode 100644 index 00000000..888eaf0a --- /dev/null +++ b/tests/test/test_update_voice_test.py @@ -0,0 +1,94 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.update_voice_test import UpdateVoiceTest + +class TestUpdateVoiceTest(unittest.TestCase): + """UpdateVoiceTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateVoiceTest: + """Test UpdateVoiceTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateVoiceTest` + """ + model = UpdateVoiceTest() + if include_optional: + return UpdateVoiceTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [344753, 212697], + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'voice', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [9842, 1283], + shared_with_accounts = [1234, 12345], + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + bgp_measurements = True, + use_public_bgp = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return UpdateVoiceTest( + interval = 120, + target_agent_id = '281474976710706', + ) + """ + + def testUpdateVoiceTest(self): + """Test UpdateVoiceTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_update_web_transaction_test.py b/tests/test/test_update_web_transaction_test.py similarity index 85% rename from tests_api/test/test_update_web_transaction_test.py rename to tests/test/test_update_web_transaction_test.py index a777c079..903fced3 100644 --- a/tests_api/test/test_update_web_transaction_test.py +++ b/tests/test/test_update_web_transaction_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.update_web_transaction_test import UpdateWebTransactionTest class TestUpdateWebTransactionTest(unittest.TestCase): """UpdateWebTransactionTest unit test stubs""" @@ -50,14 +49,11 @@ class TestUpdateWebTransactionTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'web-transactions', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], + shared_with_accounts = [1234, 12345], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -68,7 +64,6 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL -----END CERTIFICATE----- ', content_regex = '(regex)+', - credentials = [3247, 1051], custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, desired_status_code = '200', follow_redirects = True, @@ -78,7 +73,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', probe_mode = 'auto', @@ -93,6 +88,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, block_domains = 'domain.com/', disable_screenshot = True, allow_mic_and_camera = True, @@ -100,16 +96,18 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL browser_language = 'en-US', page_loading_strategy = 'normal', fixed_packet_rate = 50, + agents = [ + {"agentId":"125","sourceIpAddress":"1.1.1.1"} + ], + credentials = ["3247","1051"], bgp_measurements = True, + use_public_bgp = True, monitors = [17410, 5], subinterval = 60 ) else: return UpdateWebTransactionTest( interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], transaction_script = 'if (true) { return true; }', url = 'www.thousandeyes.com', ) diff --git a/tests/test/test_validation_error.py b/tests/test/test_validation_error.py new file mode 100644 index 00000000..320d6f80 --- /dev/null +++ b/tests/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + tests.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_validation_error_all_of_errors.py b/tests/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..c2b20dcf --- /dev/null +++ b/tests/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_voice_instant_test.py b/tests/test/test_voice_instant_test.py new file mode 100644 index 00000000..77f4e7d8 --- /dev/null +++ b/tests/test/test_voice_instant_test.py @@ -0,0 +1,84 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.voice_instant_test import VoiceInstantTest + +class TestVoiceInstantTest(unittest.TestCase): + """VoiceInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceInstantTest: + """Test VoiceInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceInstantTest` + """ + model = VoiceInstantTest() + if include_optional: + return VoiceInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'voice', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + agents = [ + null + ] + ) + else: + return VoiceInstantTest( + target_agent_id = '281474976710706', + ) + """ + + def testVoiceInstantTest(self): + """Test VoiceInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_voice_properties.py b/tests/test/test_voice_properties.py new file mode 100644 index 00000000..8e509ad3 --- /dev/null +++ b/tests/test/test_voice_properties.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.voice_properties import VoiceProperties + +class TestVoiceProperties(unittest.TestCase): + """VoiceProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceProperties: + """Test VoiceProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceProperties` + """ + model = VoiceProperties() + if include_optional: + return VoiceProperties( + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + type = 'voice' + ) + else: + return VoiceProperties( + target_agent_id = '281474976710706', + ) + """ + + def testVoiceProperties(self): + """Test VoiceProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_voice_test.py b/tests/test/test_voice_test.py new file mode 100644 index 00000000..e009034d --- /dev/null +++ b/tests/test/test_voice_test.py @@ -0,0 +1,114 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.voice_test import VoiceTest + +class TestVoiceTest(unittest.TestCase): + """VoiceTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VoiceTest: + """Test VoiceTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VoiceTest` + """ + model = VoiceTest() + if include_optional: + return VoiceTest( + interval = 120, + alerts_enabled = True, + enabled = True, + alert_rules = [ + tests.models.alert_rule.AlertRule( + rule_id = '127094', + rule_name = 'The End of the Internet', + expression = '((hops((hopDelay >= 100 ms))))', + direction = 'to-target', + is_default = True, + alert_type = 'http-server', + minimum_sources = 10, + minimum_sources_pct = 99, + rounds_violating_mode = 'exact', + rounds_violating_out_of = 5, + rounds_violating_required = 2, + severity = 'major', ) + ], + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'voice', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + codec = 'G.711 @ 64 Kbps', + codec_id = '0', + dscp = 'Best Effort (DSCP 0)', + dscp_id = '0', + duration = 5, + jitter_buffer = 0, + num_path_traces = 1, + port = 1024, + target_agent_id = '281474976710706', + agents = [ + null + ], + bgp_measurements = True, + use_public_bgp = True, + monitors = [ + tests.models.monitor.Monitor( + country_id = 'GB', + monitor_id = '1234', + ip_address = '4.69.184.193', + network = 'Level 3 Communications, Inc. (AS 3356)', + monitor_type = 'public', + monitor_name = 'Seattle, WA', ) + ] + ) + else: + return VoiceTest( + interval = 120, + target_agent_id = '281474976710706', + ) + """ + + def testVoiceTest(self): + """Test VoiceTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_voice_tests.py b/tests/test/test_voice_tests.py similarity index 83% rename from tests_api/test/test_voice_tests.py rename to tests/test/test_voice_tests.py index 632e2484..37016155 100644 --- a/tests_api/test/test_voice_tests.py +++ b/tests/test/test_voice_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.voice_tests import VoiceTests +from tests.models.voice_tests import VoiceTests class TestVoiceTests(unittest.TestCase): """VoiceTests unit test stubs""" diff --git a/tests/test/test_web_transaction_instant_test.py b/tests/test/test_web_transaction_instant_test.py new file mode 100644 index 00000000..831cde32 --- /dev/null +++ b/tests/test/test_web_transaction_instant_test.py @@ -0,0 +1,119 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.web_transaction_instant_test import WebTransactionInstantTest + +class TestWebTransactionInstantTest(unittest.TestCase): + """WebTransactionInstantTest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebTransactionInstantTest: + """Test WebTransactionInstantTest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebTransactionInstantTest` + """ + model = WebTransactionInstantTest() + if include_optional: + return WebTransactionInstantTest( + created_by = 'user@user.com', + created_date = '2022-07-17T22:00:54Z', + description = 'ThousandEyes Test', + live_share = False, + modified_by = 'user@user.com', + modified_date = '2022-07-17T22:00:54Z', + saved_event = True, + test_id = '281474976710706', + test_name = 'ThousandEyes Test', + type = 'web-transactions', + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + self = null, + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), + labels = [ + {"labelId":"961","name":"Artem label","isBuiltIn":false} + ], + shared_with_accounts = [ + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', + name = 'Account name', ) + ], + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + target_time = 1, + time_limit = 5, + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + agents = [ + null + ], + credentials = ["3247","1051"] + ) + else: + return WebTransactionInstantTest( + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + ) + """ + + def testWebTransactionInstantTest(self): + """Test WebTransactionInstantTest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test/test_web_transaction_properties.py b/tests/test/test_web_transaction_properties.py new file mode 100644 index 00000000..6ed616f6 --- /dev/null +++ b/tests/test/test_web_transaction_properties.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from tests.models.web_transaction_properties import WebTransactionProperties + +class TestWebTransactionProperties(unittest.TestCase): + """WebTransactionProperties unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebTransactionProperties: + """Test WebTransactionProperties + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `WebTransactionProperties` + """ + model = WebTransactionProperties() + if include_optional: + return WebTransactionProperties( + auth_type = 'none', + bandwidth_measurements = True, + client_certificate = '-----BEGIN PRIVATE KEY----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL +-----END CERTIFICATE----- +', + content_regex = '(regex)+', + custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, + desired_status_code = '200', + follow_redirects = True, + http_target_time = 100, + http_time_limit = 5, + http_version = 1, + include_headers = True, + mtu_measurements = False, + network_measurements = True, + num_path_traces = 1, + password = 'password', + path_trace_mode = 'classic', + probe_mode = 'auto', + protocol = 'tcp', + ssl_version = 'Auto', + ssl_version_id = '0', + target_time = 1, + time_limit = 5, + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + use_ntlm = False, + user_agent = 'curl', + username = 'username', + verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, + block_domains = 'domain.com/', + disable_screenshot = True, + allow_mic_and_camera = True, + allow_geolocation = True, + browser_language = 'en-US', + page_loading_strategy = 'normal', + fixed_packet_rate = 50, + type = 'web-transactions' + ) + else: + return WebTransactionProperties( + transaction_script = 'if (true) { return true; }', + url = 'www.thousandeyes.com', + ) + """ + + def testWebTransactionProperties(self): + """Test WebTransactionProperties""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/tests_api/test/test_web_transaction_test.py b/tests/test/test_web_transaction_test.py similarity index 84% rename from tests_api/test/test_web_transaction_test.py rename to tests/test/test_web_transaction_test.py index 7ea2c640..e909e2fc 100644 --- a/tests_api/test/test_web_transaction_test.py +++ b/tests/test/test_web_transaction_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.web_transaction_test import WebTransactionTest +from tests.models.web_transaction_test import WebTransactionTest class TestWebTransactionTest(unittest.TestCase): """WebTransactionTest unit test stubs""" @@ -40,7 +39,7 @@ class TestWebTransactionTest(unittest.TestCase): alerts_enabled = True, enabled = True, alert_rules = [ - tests_api.models.alert_rule.AlertRule( + tests.models.alert_rule.AlertRule( rule_id = '127094', rule_name = 'The End of the Internet', expression = '((hops((hopDelay >= 100 ms))))', @@ -51,7 +50,8 @@ class TestWebTransactionTest(unittest.TestCase): minimum_sources_pct = 99, rounds_violating_mode = 'exact', rounds_violating_out_of = 5, - rounds_violating_required = 2, ) + rounds_violating_required = 2, + severity = 'major', ) ], created_by = 'user@user.com', created_date = '2022-07-17T22:00:54Z', @@ -63,20 +63,17 @@ class TestWebTransactionTest(unittest.TestCase): test_id = '281474976710706', test_name = 'ThousandEyes Test', type = 'web-transactions', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( + links = tests.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), + test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}], ), labels = [ {"labelId":"961","name":"Artem label","isBuiltIn":false} ], shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', + tests.models.test_shared_accounts_inner.TestSharedAccounts_inner( + aid = '1234', name = 'Account name', ) ], - agents = [ - tests_api.models.agent.Agent() - ], auth_type = 'none', bandwidth_measurements = True, client_certificate = '-----BEGIN PRIVATE KEY----- @@ -87,7 +84,6 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL -----END CERTIFICATE----- ', content_regex = '(regex)+', - credentials = [3247, 1051], custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, desired_status_code = '200', follow_redirects = True, @@ -97,7 +93,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL include_headers = True, mtu_measurements = False, network_measurements = True, - num_path_traces = 3, + num_path_traces = 1, password = 'password', path_trace_mode = 'classic', probe_mode = 'auto', @@ -112,6 +108,7 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL user_agent = 'curl', username = 'username', verify_certificate = True, + allow_unsafe_legacy_renegotiation = True, block_domains = 'domain.com/', disable_screenshot = True, allow_mic_and_camera = True, @@ -119,9 +116,14 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL browser_language = 'en-US', page_loading_strategy = 'normal', fixed_packet_rate = 50, + agents = [ + null + ], + credentials = ["3247","1051"], bgp_measurements = True, + use_public_bgp = True, monitors = [ - tests_api.models.monitor.Monitor( + tests.models.monitor.Monitor( country_id = 'GB', monitor_id = '1234', ip_address = '4.69.184.193', @@ -134,9 +136,6 @@ MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL else: return WebTransactionTest( interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], transaction_script = 'if (true) { return true; }', url = 'www.thousandeyes.com', ) diff --git a/tests_api/test/test_web_transaction_tests.py b/tests/test/test_web_transaction_tests.py similarity index 83% rename from tests_api/test/test_web_transaction_tests.py rename to tests/test/test_web_transaction_tests.py index 997b6df6..25804a70 100644 --- a/tests_api/test/test_web_transaction_tests.py +++ b/tests/test/test_web_transaction_tests.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -13,9 +13,8 @@ import unittest -import datetime -from tests_api.models.web_transaction_tests import WebTransactionTests +from tests.models.web_transaction_tests import WebTransactionTests class TestWebTransactionTests(unittest.TestCase): """WebTransactionTests unit test stubs""" diff --git a/tests/tests/__init__.py b/tests/tests/__init__.py new file mode 100644 index 00000000..8e771a67 --- /dev/null +++ b/tests/tests/__init__.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 tests.api.agent_to_agent_api import AgentToAgentApi +from tests.api.agent_to_server_api import AgentToServerApi +from tests.api.all_test_types_api import AllTestTypesApi +from tests.api.bgp_api import BGPApi +from tests.api.dnssec_api import DNSSECApi +from tests.api.dns_server_api import DNSServerApi +from tests.api.dns_trace_api import DNSTraceApi +from tests.api.ftp_server_api import FTPServerApi +from tests.api.http_server_api import HTTPServerApi +from tests.api.page_load_api import PageLoadApi +from tests.api.path_visualization_interface_groups_api import PathVisualizationInterfaceGroupsApi +from tests.api.sip_server_api import SIPServerApi +from tests.api.voice_api import VoiceApi +from tests.api.web_transaction_api import WebTransactionApi + +# import ApiClient +from tests.api_response import ApiResponse +from tests.api_client import ApiClient +from tests.configuration import Configuration +from tests.exceptions import OpenApiException +from tests.exceptions import ApiTypeError +from tests.exceptions import ApiValueError +from tests.exceptions import ApiKeyError +from tests.exceptions import ApiAttributeError +from tests.exceptions import ApiException + +# import models into sdk package +from tests.models.agent import Agent +from tests.models.agent_base import AgentBase +from tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest +from tests.models.agent_to_agent_properties import AgentToAgentProperties +from tests.models.agent_to_agent_test import AgentToAgentTest +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.agent_to_agent_tests import AgentToAgentTests +from tests.models.agent_to_server_instant_test import AgentToServerInstantTest +from tests.models.agent_to_server_properties import AgentToServerProperties +from tests.models.agent_to_server_test import AgentToServerTest +from tests.models.agent_to_server_tests import AgentToServerTests +from tests.models.alert_direction import AlertDirection +from tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from tests.models.alert_rule import AlertRule +from tests.models.alert_type import AlertType +from tests.models.base_bgp_test import BaseBgpTest +from tests.models.base_request import BaseRequest +from tests.models.base_test import BaseTest +from tests.models.bgp_test import BgpTest +from tests.models.bgp_tests import BgpTests +from tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from tests.models.dns_query_class import DnsQueryClass +from tests.models.dns_sec_instant_test import DnsSecInstantTest +from tests.models.dns_sec_properties import DnsSecProperties +from tests.models.dns_sec_test import DnsSecTest +from tests.models.dns_sec_tests import DnsSecTests +from tests.models.dns_server_instant_test import DnsServerInstantTest +from tests.models.dns_server_properties import DnsServerProperties +from tests.models.dns_server_test import DnsServerTest +from tests.models.dns_server_tests import DnsServerTests +from tests.models.dns_servers_request import DnsServersRequest +from tests.models.dns_trace_instant_test import DnsTraceInstantTest +from tests.models.dns_trace_properties import DnsTraceProperties +from tests.models.dns_trace_test import DnsTraceTest +from tests.models.dns_trace_tests import DnsTraceTests +from tests.models.error import Error +from tests.models.expand import Expand +from tests.models.ftp_server_instant_test import FtpServerInstantTest +from tests.models.ftp_server_properties import FtpServerProperties +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.ftp_server_test import FtpServerTest +from tests.models.ftp_server_tests import FtpServerTests +from tests.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response +from tests.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response +from tests.models.get_bgp_tests200_response import GetBgpTests200Response +from tests.models.get_dns_server_tests200_response import GetDNSServerTests200Response +from tests.models.get_dns_sec_tests200_response import GetDnsSecTests200Response +from tests.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response +from tests.models.get_ftp_server_tests200_response import GetFtpServerTests200Response +from tests.models.get_http_server_tests200_response import GetHttpServerTests200Response +from tests.models.get_page_load_tests200_response import GetPageLoadTests200Response +from tests.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response +from tests.models.get_sip_server_tests200_response import GetSipServerTests200Response +from tests.models.get_tests200_response import GetTests200Response +from tests.models.get_voice_tests200_response import GetVoiceTests200Response +from tests.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response +from tests.models.http_server_instant_test import HttpServerInstantTest +from tests.models.http_server_properties import HttpServerProperties +from tests.models.http_server_test import HttpServerTest +from tests.models.http_server_tests import HttpServerTests +from tests.models.instant_test import InstantTest +from tests.models.interface_group import InterfaceGroup +from tests.models.interface_groups import InterfaceGroups +from tests.models.link import Link +from tests.models.monitor import Monitor +from tests.models.monitor_type import MonitorType +from tests.models.monitors_request import MonitorsRequest +from tests.models.page_load_instant_test import PageLoadInstantTest +from tests.models.page_load_properties import PageLoadProperties +from tests.models.page_load_test import PageLoadTest +from tests.models.page_load_tests import PageLoadTests +from tests.models.self_links import SelfLinks +from tests.models.self_links_links import SelfLinksLinks +from tests.models.severity import Severity +from tests.models.simple_agent import SimpleAgent +from tests.models.simple_test import SimpleTest +from tests.models.sip_server_instant_test import SipServerInstantTest +from tests.models.sip_server_instant_test_request import SipServerInstantTestRequest +from tests.models.sip_server_instant_test_response import SipServerInstantTestResponse +from tests.models.sip_server_properties import SipServerProperties +from tests.models.sip_server_test import SipServerTest +from tests.models.sip_server_tests import SipServerTests +from tests.models.sip_test_protocol import SipTestProtocol +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_direction import TestDirection +from tests.models.test_dns_server import TestDnsServer +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_http_interval import TestHttpInterval +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_monitors_properties import TestMonitorsProperties +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request import TestRequest +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_sip_credentials import TestSipCredentials +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.test_type import TestType +from tests.models.tests import Tests +from tests.models.unauthorized_error import UnauthorizedError +from tests.models.unexpanded_agent_to_agent_test import UnexpandedAgentToAgentTest +from tests.models.unexpanded_agent_to_server_test import UnexpandedAgentToServerTest +from tests.models.unexpanded_bgp_test import UnexpandedBgpTest +from tests.models.unexpanded_dns_sec_test import UnexpandedDnsSecTest +from tests.models.unexpanded_dns_server_test import UnexpandedDnsServerTest +from tests.models.unexpanded_dns_trace_test import UnexpandedDnsTraceTest +from tests.models.unexpanded_ftp_server_test import UnexpandedFtpServerTest +from tests.models.unexpanded_http_server_test import UnexpandedHttpServerTest +from tests.models.unexpanded_instant_test import UnexpandedInstantTest +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from tests.models.unexpanded_page_load_test import UnexpandedPageLoadTest +from tests.models.unexpanded_sip_server_test import UnexpandedSipServerTest +from tests.models.unexpanded_test import UnexpandedTest +from tests.models.unexpanded_voice_test import UnexpandedVoiceTest +from tests.models.unexpanded_web_transaction_test import UnexpandedWebTransactionTest +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest +from tests.models.update_bgp_test import UpdateBgpTest +from tests.models.update_bgp_test_request import UpdateBgpTestRequest +from tests.models.update_dns_sec_test import UpdateDnsSecTest +from tests.models.update_dns_server_test import UpdateDnsServerTest +from tests.models.update_dns_trace_test import UpdateDnsTraceTest +from tests.models.update_ftp_server_test import UpdateFtpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest +from tests.models.update_page_load_test import UpdatePageLoadTest +from tests.models.update_sip_server_test import UpdateSipServerTest +from tests.models.update_sip_server_test1 import UpdateSipServerTest1 +from tests.models.update_voice_test import UpdateVoiceTest +from tests.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.validation_error import ValidationError +from tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from tests.models.voice_instant_test import VoiceInstantTest +from tests.models.voice_properties import VoiceProperties +from tests.models.voice_test import VoiceTest +from tests.models.voice_tests import VoiceTests +from tests.models.web_transaction_instant_test import WebTransactionInstantTest +from tests.models.web_transaction_properties import WebTransactionProperties +from tests.models.web_transaction_test import WebTransactionTest +from tests.models.web_transaction_tests import WebTransactionTests diff --git a/tests/tests/api/__init__.py b/tests/tests/api/__init__.py new file mode 100644 index 00000000..56d4e41e --- /dev/null +++ b/tests/tests/api/__init__.py @@ -0,0 +1,18 @@ +# flake8: noqa + +# import apis into api package +from tests.api.agent_to_agent_api import AgentToAgentApi +from tests.api.agent_to_server_api import AgentToServerApi +from tests.api.all_test_types_api import AllTestTypesApi +from tests.api.bgp_api import BGPApi +from tests.api.dnssec_api import DNSSECApi +from tests.api.dns_server_api import DNSServerApi +from tests.api.dns_trace_api import DNSTraceApi +from tests.api.ftp_server_api import FTPServerApi +from tests.api.http_server_api import HTTPServerApi +from tests.api.page_load_api import PageLoadApi +from tests.api.path_visualization_interface_groups_api import PathVisualizationInterfaceGroupsApi +from tests.api.sip_server_api import SIPServerApi +from tests.api.voice_api import VoiceApi +from tests.api.web_transaction_api import WebTransactionApi + diff --git a/tests/tests/api/agent_to_agent_api.py b/tests/tests/api/agent_to_agent_api.py new file mode 100644 index 00000000..9e5e9711 --- /dev/null +++ b/tests/tests/api/agent_to_agent_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.agent_to_agent_test import AgentToAgentTest +from tests.models.expand import Expand +from tests.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class AgentToAgentApi: + """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() + self.api_client = api_client + + + @validate_call + def create_agent_to_agent_test( + self, + update_agent_to_agent_test: UpdateAgentToAgentTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> AgentToAgentTest: + """Create Agent to Agent test + + Creates a new Agent to Agent test. This method requires Account Admin permissions. + + :param update_agent_to_agent_test: (required) + :type update_agent_to_agent_test: UpdateAgentToAgentTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + update_agent_to_agent_test=update_agent_to_agent_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToAgentTest", + '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, + ).data + + + @validate_call + def create_agent_to_agent_test_with_http_info( + self, + update_agent_to_agent_test: UpdateAgentToAgentTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToAgentTest]: + """Create Agent to Agent test + + Creates a new Agent to Agent test. This method requires Account Admin permissions. + + :param update_agent_to_agent_test: (required) + :type update_agent_to_agent_test: UpdateAgentToAgentTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + update_agent_to_agent_test=update_agent_to_agent_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToAgentTest", + '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, + ) + + + @validate_call + def create_agent_to_agent_test_without_preload_content( + self, + update_agent_to_agent_test: UpdateAgentToAgentTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Agent test + + Creates a new Agent to Agent test. This method requires Account Admin permissions. + + :param update_agent_to_agent_test: (required) + :type update_agent_to_agent_test: UpdateAgentToAgentTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + update_agent_to_agent_test=update_agent_to_agent_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToAgentTest", + '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_agent_test_serialize( + self, + update_agent_to_agent_test, + aid, + 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 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 update_agent_to_agent_test is not None: + _body_params = update_agent_to_agent_test + + + # 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/tests/agent-to-agent', + 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_agent_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Agent to Agent test + + Deletes the specified Agent to Agent test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_agent_to_agent_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_agent_to_agent_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Agent to Agent test + + Deletes the specified Agent to Agent test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_agent_to_agent_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_agent_to_agent_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Agent to Agent test + + Deletes the specified Agent to Agent test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_agent_to_agent_test_serialize( + test_id=test_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, + '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 _delete_agent_to_agent_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/agent-to-agent/{testId}', + 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_agent_to_agent_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> AgentToAgentTest: + """Get Agent to Agent test + + Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToAgentTest", + '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, + ).data + + + @validate_call + def get_agent_to_agent_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToAgentTest]: + """Get Agent to Agent test + + Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToAgentTest", + '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, + ) + + + @validate_call + def get_agent_to_agent_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get Agent to Agent test + + Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToAgentTest", + '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_agent_to_agent_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/agent-to-agent/{testId}', + 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_agent_to_agent_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[ + 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, + ) -> GetAgentToAgentTests200Response: + """List Agent to Agent tests + + Returns a list of Agent to Agent tests and saved events. + + :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_agent_to_agent_tests_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': "GetAgentToAgentTests200Response", + '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, + ).data + + + @validate_call + def get_agent_to_agent_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[ + 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[GetAgentToAgentTests200Response]: + """List Agent to Agent tests + + Returns a list of Agent to Agent tests and saved events. + + :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_agent_to_agent_tests_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': "GetAgentToAgentTests200Response", + '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, + ) + + + @validate_call + def get_agent_to_agent_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[ + 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 Agent to Agent tests + + Returns a list of Agent to Agent tests and saved events. + + :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_agent_to_agent_tests_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': "GetAgentToAgentTests200Response", + '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_agent_to_agent_tests_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/tests/agent-to-agent', + 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_agent_to_agent_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_agent_to_agent_test: UpdateAgentToAgentTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> AgentToAgentTest: + """Update Agent to Agent test + + Updates a Agent to Agent test. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_agent_to_agent_test: (required) + :type update_agent_to_agent_test: UpdateAgentToAgentTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + test_id=test_id, + update_agent_to_agent_test=update_agent_to_agent_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToAgentTest", + '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, + ).data + + + @validate_call + def update_agent_to_agent_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_agent_to_agent_test: UpdateAgentToAgentTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToAgentTest]: + """Update Agent to Agent test + + Updates a Agent to Agent test. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_agent_to_agent_test: (required) + :type update_agent_to_agent_test: UpdateAgentToAgentTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + test_id=test_id, + update_agent_to_agent_test=update_agent_to_agent_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToAgentTest", + '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, + ) + + + @validate_call + def update_agent_to_agent_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_agent_to_agent_test: UpdateAgentToAgentTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Agent test + + Updates a Agent to Agent test. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_agent_to_agent_test: (required) + :type update_agent_to_agent_test: UpdateAgentToAgentTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( + test_id=test_id, + update_agent_to_agent_test=update_agent_to_agent_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToAgentTest", + '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 _update_agent_to_agent_test_serialize( + self, + test_id, + update_agent_to_agent_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_agent_to_agent_test is not None: + _body_params = update_agent_to_agent_test + + + # 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='PUT', + resource_path='/v7/tests/agent-to-agent/{testId}', + 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/tests/tests/api/agent_to_server_api.py b/tests/tests/api/agent_to_server_api.py new file mode 100644 index 00000000..f6eb961f --- /dev/null +++ b/tests/tests/api/agent_to_server_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.agent_to_server_test import AgentToServerTest +from tests.models.expand import Expand +from tests.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class AgentToServerApi: + """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() + self.api_client = api_client + + + @validate_call + def create_agent_to_server_test( + self, + update_agent_to_server_test: UpdateAgentToServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> AgentToServerTest: + """Create Agent to Server test + + Creates a new Agent to Server test. This method requires Account Admin permissions. + + :param update_agent_to_server_test: (required) + :type update_agent_to_server_test: UpdateAgentToServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + update_agent_to_server_test=update_agent_to_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToServerTest", + '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, + ).data + + + @validate_call + def create_agent_to_server_test_with_http_info( + self, + update_agent_to_server_test: UpdateAgentToServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToServerTest]: + """Create Agent to Server test + + Creates a new Agent to Server test. This method requires Account Admin permissions. + + :param update_agent_to_server_test: (required) + :type update_agent_to_server_test: UpdateAgentToServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + update_agent_to_server_test=update_agent_to_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToServerTest", + '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, + ) + + + @validate_call + def create_agent_to_server_test_without_preload_content( + self, + update_agent_to_server_test: UpdateAgentToServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Server test + + Creates a new Agent to Server test. This method requires Account Admin permissions. + + :param update_agent_to_server_test: (required) + :type update_agent_to_server_test: UpdateAgentToServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + update_agent_to_server_test=update_agent_to_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AgentToServerTest", + '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_test_serialize( + self, + update_agent_to_server_test, + aid, + 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 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 update_agent_to_server_test is not None: + _body_params = update_agent_to_server_test + + + # 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/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_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Agent to Server test + + Deletes an Agent to Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_agent_to_server_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_agent_to_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Agent to Server test + + Deletes an Agent to Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_agent_to_server_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_agent_to_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Agent to Server test + + Deletes an Agent to Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_agent_to_server_test_serialize( + test_id=test_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, + '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 _delete_agent_to_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/agent-to-server/{testId}', + 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_agent_to_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> AgentToServerTest: + """Get Agent to Server test + + Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToServerTest", + '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, + ).data + + + @validate_call + def get_agent_to_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToServerTest]: + """Get Agent to Server test + + Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToServerTest", + '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, + ) + + + @validate_call + def get_agent_to_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get Agent to Server test + + Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToServerTest", + '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_agent_to_server_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/agent-to-server/{testId}', + 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_agent_to_server_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[ + 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, + ) -> GetAgentToServerTests200Response: + """List Agent to Server tests + + Returns a list of Agent to Server tests and saved events. + + :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_agent_to_server_tests_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': "GetAgentToServerTests200Response", + '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, + ).data + + + @validate_call + def get_agent_to_server_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[ + 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[GetAgentToServerTests200Response]: + """List Agent to Server tests + + Returns a list of Agent to Server tests and saved events. + + :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_agent_to_server_tests_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': "GetAgentToServerTests200Response", + '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, + ) + + + @validate_call + def get_agent_to_server_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[ + 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 Agent to Server tests + + Returns a list of Agent to Server tests and saved events. + + :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_agent_to_server_tests_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': "GetAgentToServerTests200Response", + '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_agent_to_server_tests_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/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_agent_to_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_agent_to_server_test: UpdateAgentToServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> AgentToServerTest: + """Update Agent to Server test + + Updates an Agent to Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_agent_to_server_test: (required) + :type update_agent_to_server_test: UpdateAgentToServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + test_id=test_id, + update_agent_to_server_test=update_agent_to_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToServerTest", + '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, + ).data + + + @validate_call + def update_agent_to_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_agent_to_server_test: UpdateAgentToServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToServerTest]: + """Update Agent to Server test + + Updates an Agent to Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_agent_to_server_test: (required) + :type update_agent_to_server_test: UpdateAgentToServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + test_id=test_id, + update_agent_to_server_test=update_agent_to_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToServerTest", + '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, + ) + + + @validate_call + def update_agent_to_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_agent_to_server_test: UpdateAgentToServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Server test + + Updates an Agent to Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_agent_to_server_test: (required) + :type update_agent_to_server_test: UpdateAgentToServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( + test_id=test_id, + update_agent_to_server_test=update_agent_to_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AgentToServerTest", + '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 _update_agent_to_server_test_serialize( + self, + test_id, + update_agent_to_server_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_agent_to_server_test is not None: + _body_params = update_agent_to_server_test + + + # 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='PUT', + resource_path='/v7/tests/agent-to-server/{testId}', + 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/tests_api/tests_api/api/all_test_types_api.py b/tests/tests/api/all_test_types_api.py similarity index 94% rename from tests_api/tests_api/api/all_test_types_api.py rename to tests/tests/api/all_test_types_api.py index 74f50cfd..6d08cf3b 100644 --- a/tests_api/tests_api/api/all_test_types_api.py +++ b/tests/tests/api/all_test_types_api.py @@ -3,37 +3,27 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from tests.models.get_tests200_response import GetTests200Response -from tests_api.models.get_tests200_response import GetTests200Response - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType class AllTestTypesApi: @@ -110,8 +100,6 @@ class AllTestTypesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -185,8 +173,6 @@ class AllTestTypesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -260,8 +246,6 @@ class AllTestTypesApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -277,19 +261,18 @@ class AllTestTypesApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/tests_api/tests_api/api/bgp_api.py b/tests/tests/api/bgp_api.py similarity index 95% rename from tests_api/tests_api/api/bgp_api.py rename to tests/tests/api/bgp_api.py index b85675b3..111efa66 100644 --- a/tests_api/tests_api/api/bgp_api.py +++ b/tests/tests/api/bgp_api.py @@ -3,41 +3,31 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from tests.models.bgp_test import BgpTest +from tests.models.expand import Expand +from tests.models.get_bgp_tests200_response import GetBgpTests200Response +from tests.models.update_bgp_test import UpdateBgpTest +from tests.models.update_bgp_test_request import UpdateBgpTestRequest -from tests_api.models.bgp_test import BgpTest -from tests_api.models.expand import Expand -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response -from tests_api.models.get_bgp_tests200_response import GetBgpTests200Response -from tests_api.models.update_bgp_test import UpdateBgpTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType class BGPApi: @@ -116,15 +106,13 @@ class BGPApi: _response_types_map: Dict[str, Optional[str]] = { '201': "BgpTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -200,15 +188,13 @@ class BGPApi: _response_types_map: Dict[str, Optional[str]] = { '201': "BgpTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -284,15 +270,13 @@ class BGPApi: _response_types_map: Dict[str, Optional[str]] = { '201': "BgpTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -310,12 +294,11 @@ class BGPApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -323,7 +306,7 @@ class BGPApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -446,7 +429,13 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -517,7 +506,13 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -588,7 +583,13 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -605,19 +606,18 @@ class BGPApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -636,7 +636,6 @@ class BGPApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -683,7 +682,7 @@ class BGPApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetBgpTest200Response: + ) -> BgpTest: """Get BGP test Returns details for a BGP test, including name, intervals, targets, alert rules and agents. @@ -727,15 +726,13 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBgpTest200Response", + '200': "BgpTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -766,7 +763,7 @@ class BGPApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetBgpTest200Response]: + ) -> ApiResponse[BgpTest]: """Get BGP test Returns details for a BGP test, including name, intervals, targets, alert rules and agents. @@ -810,15 +807,13 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBgpTest200Response", + '200': "BgpTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -893,15 +888,13 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBgpTest200Response", + '200': "BgpTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -919,12 +912,11 @@ class BGPApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -932,7 +924,7 @@ class BGPApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1045,8 +1037,6 @@ class BGPApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1120,8 +1110,6 @@ class BGPApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1195,8 +1183,6 @@ class BGPApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1212,19 +1198,18 @@ class BGPApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1274,7 +1259,7 @@ class BGPApi: def update_bgp_test( self, test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_bgp_test: UpdateBgpTest, + update_bgp_test_request: UpdateBgpTestRequest, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.")] = None, _request_timeout: Union[ @@ -1289,15 +1274,15 @@ class BGPApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetBgpTest200Response: + ) -> BgpTest: """Update BGP test Updates a BGP test. This method requires Account Admin permissions. The target test cannot be a live share or saved event. :param test_id: ID of the test (required) :type test_id: str - :param update_bgp_test: (required) - :type update_bgp_test: UpdateBgpTest + :param update_bgp_test_request: (required) + :type update_bgp_test_request: UpdateBgpTestRequest :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. @@ -1326,7 +1311,7 @@ class BGPApi: _param = self._update_bgp_test_serialize( test_id=test_id, - update_bgp_test=update_bgp_test, + update_bgp_test_request=update_bgp_test_request, aid=aid, expand=expand, _request_auth=_request_auth, @@ -1336,16 +1321,14 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBgpTest200Response", - '400': "Error", + '200': "BgpTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1362,7 +1345,7 @@ class BGPApi: def update_bgp_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_bgp_test: UpdateBgpTest, + update_bgp_test_request: UpdateBgpTestRequest, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.")] = None, _request_timeout: Union[ @@ -1377,15 +1360,15 @@ class BGPApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetBgpTest200Response]: + ) -> ApiResponse[BgpTest]: """Update BGP test Updates a BGP test. This method requires Account Admin permissions. The target test cannot be a live share or saved event. :param test_id: ID of the test (required) :type test_id: str - :param update_bgp_test: (required) - :type update_bgp_test: UpdateBgpTest + :param update_bgp_test_request: (required) + :type update_bgp_test_request: UpdateBgpTestRequest :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. @@ -1414,7 +1397,7 @@ class BGPApi: _param = self._update_bgp_test_serialize( test_id=test_id, - update_bgp_test=update_bgp_test, + update_bgp_test_request=update_bgp_test_request, aid=aid, expand=expand, _request_auth=_request_auth, @@ -1424,16 +1407,14 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBgpTest200Response", - '400': "Error", + '200': "BgpTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1450,7 +1431,7 @@ class BGPApi: def update_bgp_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_bgp_test: UpdateBgpTest, + update_bgp_test_request: UpdateBgpTestRequest, aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query.")] = None, _request_timeout: Union[ @@ -1472,8 +1453,8 @@ class BGPApi: :param test_id: ID of the test (required) :type test_id: str - :param update_bgp_test: (required) - :type update_bgp_test: UpdateBgpTest + :param update_bgp_test_request: (required) + :type update_bgp_test_request: UpdateBgpTestRequest :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. @@ -1502,7 +1483,7 @@ class BGPApi: _param = self._update_bgp_test_serialize( test_id=test_id, - update_bgp_test=update_bgp_test, + update_bgp_test_request=update_bgp_test_request, aid=aid, expand=expand, _request_auth=_request_auth, @@ -1512,16 +1493,14 @@ class BGPApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBgpTest200Response", - '400': "Error", + '200': "BgpTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1533,19 +1512,18 @@ class BGPApi: def _update_bgp_test_serialize( self, test_id, - update_bgp_test, + update_bgp_test_request, aid, expand, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1553,7 +1531,7 @@ class BGPApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1571,8 +1549,8 @@ class BGPApi: # process the header parameters # process the form parameters # process the body parameter - if update_bgp_test is not None: - _body_params = update_bgp_test + if update_bgp_test_request is not None: + _body_params = update_bgp_test_request # set the HTTP header `Accept` diff --git a/tests/tests/api/dns_server_api.py b/tests/tests/api/dns_server_api.py new file mode 100644 index 00000000..9fb50de7 --- /dev/null +++ b/tests/tests/api/dns_server_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.dns_server_test import DnsServerTest +from tests.models.expand import Expand +from tests.models.get_dns_server_tests200_response import GetDNSServerTests200Response +from tests.models.update_dns_server_test import UpdateDnsServerTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class DNSServerApi: + """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() + self.api_client = api_client + + + @validate_call + def create_dns_server_test( + self, + update_dns_server_test: UpdateDnsServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> DnsServerTest: + """Create DNS Server test + + Creates a new DNS Server test. This method requires Account Admin permissions. + + :param update_dns_server_test: (required) + :type update_dns_server_test: UpdateDnsServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + update_dns_server_test=update_dns_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsServerTest", + '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, + ).data + + + @validate_call + def create_dns_server_test_with_http_info( + self, + update_dns_server_test: UpdateDnsServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsServerTest]: + """Create DNS Server test + + Creates a new DNS Server test. This method requires Account Admin permissions. + + :param update_dns_server_test: (required) + :type update_dns_server_test: UpdateDnsServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + update_dns_server_test=update_dns_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsServerTest", + '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, + ) + + + @validate_call + def create_dns_server_test_without_preload_content( + self, + update_dns_server_test: UpdateDnsServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Server test + + Creates a new DNS Server test. This method requires Account Admin permissions. + + :param update_dns_server_test: (required) + :type update_dns_server_test: UpdateDnsServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + update_dns_server_test=update_dns_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsServerTest", + '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_dns_server_test_serialize( + self, + update_dns_server_test, + aid, + 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 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 update_dns_server_test is not None: + _body_params = update_dns_server_test + + + # 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/tests/dns-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_dns_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 DNS Server test + + Deletes the specified DNS Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_dns_server_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_dns_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 DNS Server test + + Deletes the specified DNS Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_dns_server_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_dns_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 DNS Server test + + Deletes the specified DNS Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_dns_server_test_serialize( + test_id=test_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, + '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 _delete_dns_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/dns-server/{testId}', + 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_dns_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> DnsServerTest: + """Get DNS Server test + + Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsServerTest", + '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, + ).data + + + @validate_call + def get_dns_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsServerTest]: + """Get DNS Server test + + Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsServerTest", + '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, + ) + + + @validate_call + def get_dns_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get DNS Server test + + Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsServerTest", + '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_dns_server_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/dns-server/{testId}', + 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_dns_server_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[ + 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, + ) -> GetDNSServerTests200Response: + """List DNS Server tests + + Returns a list of all DNS Server tests and saved events. + + :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_dns_server_tests_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': "GetDNSServerTests200Response", + '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, + ).data + + + @validate_call + def get_dns_server_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[ + 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[GetDNSServerTests200Response]: + """List DNS Server tests + + Returns a list of all DNS Server tests and saved events. + + :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_dns_server_tests_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': "GetDNSServerTests200Response", + '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, + ) + + + @validate_call + def get_dns_server_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[ + 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 DNS Server tests + + Returns a list of all DNS Server tests and saved events. + + :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_dns_server_tests_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': "GetDNSServerTests200Response", + '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_dns_server_tests_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/tests/dns-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_dns_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_dns_server_test: UpdateDnsServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> DnsServerTest: + """Update DNS Server test + + Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_dns_server_test: (required) + :type update_dns_server_test: UpdateDnsServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + test_id=test_id, + update_dns_server_test=update_dns_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsServerTest", + '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, + ).data + + + @validate_call + def update_dns_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_dns_server_test: UpdateDnsServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsServerTest]: + """Update DNS Server test + + Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_dns_server_test: (required) + :type update_dns_server_test: UpdateDnsServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + test_id=test_id, + update_dns_server_test=update_dns_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsServerTest", + '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, + ) + + + @validate_call + def update_dns_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_dns_server_test: UpdateDnsServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Server test + + Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_dns_server_test: (required) + :type update_dns_server_test: UpdateDnsServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( + test_id=test_id, + update_dns_server_test=update_dns_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsServerTest", + '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 _update_dns_server_test_serialize( + self, + test_id, + update_dns_server_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_dns_server_test is not None: + _body_params = update_dns_server_test + + + # 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='PUT', + resource_path='/v7/tests/dns-server/{testId}', + 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/tests/tests/api/dns_trace_api.py b/tests/tests/api/dns_trace_api.py new file mode 100644 index 00000000..c263ce48 --- /dev/null +++ b/tests/tests/api/dns_trace_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.dns_trace_test import DnsTraceTest +from tests.models.expand import Expand +from tests.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response +from tests.models.update_dns_trace_test import UpdateDnsTraceTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class DNSTraceApi: + """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() + self.api_client = api_client + + + @validate_call + def create_dns_trace_test( + self, + update_dns_trace_test: UpdateDnsTraceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> DnsTraceTest: + """Create DNS Trace test + + Creates a new DNS Trace test. This method requires Account Admin permissions. + + :param update_dns_trace_test: (required) + :type update_dns_trace_test: UpdateDnsTraceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + update_dns_trace_test=update_dns_trace_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsTraceTest", + '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, + ).data + + + @validate_call + def create_dns_trace_test_with_http_info( + self, + update_dns_trace_test: UpdateDnsTraceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsTraceTest]: + """Create DNS Trace test + + Creates a new DNS Trace test. This method requires Account Admin permissions. + + :param update_dns_trace_test: (required) + :type update_dns_trace_test: UpdateDnsTraceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + update_dns_trace_test=update_dns_trace_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsTraceTest", + '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, + ) + + + @validate_call + def create_dns_trace_test_without_preload_content( + self, + update_dns_trace_test: UpdateDnsTraceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Trace test + + Creates a new DNS Trace test. This method requires Account Admin permissions. + + :param update_dns_trace_test: (required) + :type update_dns_trace_test: UpdateDnsTraceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + update_dns_trace_test=update_dns_trace_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DnsTraceTest", + '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_dns_trace_test_serialize( + self, + update_dns_trace_test, + aid, + 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 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 update_dns_trace_test is not None: + _body_params = update_dns_trace_test + + + # 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/tests/dns-trace', + 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_dns_trace_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 DNS Trace test + + Deletes the specified DNS Trace test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_dns_trace_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_dns_trace_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 DNS Trace test + + Deletes the specified DNS Trace test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_dns_trace_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_dns_trace_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 DNS Trace test + + Deletes the specified DNS Trace test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_dns_trace_test_serialize( + test_id=test_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, + '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 _delete_dns_trace_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/dns-trace/{testId}', + 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_dns_trace_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> DnsTraceTest: + """Get DNS Trace test + + Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsTraceTest", + '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, + ).data + + + @validate_call + def get_dns_trace_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsTraceTest]: + """Get DNS Trace test + + Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsTraceTest", + '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, + ) + + + @validate_call + def get_dns_trace_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get DNS Trace test + + Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsTraceTest", + '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_dns_trace_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/dns-trace/{testId}', + 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_dns_trace_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[ + 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, + ) -> GetDnsTraceTests200Response: + """List DNS Trace tests + + Returns a list of all DNS Trace tests and saved events. + + :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_dns_trace_tests_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': "GetDnsTraceTests200Response", + '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, + ).data + + + @validate_call + def get_dns_trace_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[ + 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[GetDnsTraceTests200Response]: + """List DNS Trace tests + + Returns a list of all DNS Trace tests and saved events. + + :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_dns_trace_tests_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': "GetDnsTraceTests200Response", + '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, + ) + + + @validate_call + def get_dns_trace_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[ + 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 DNS Trace tests + + Returns a list of all DNS Trace tests and saved events. + + :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_dns_trace_tests_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': "GetDnsTraceTests200Response", + '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_dns_trace_tests_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/tests/dns-trace', + 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_dns_trace_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_dns_trace_test: UpdateDnsTraceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> DnsTraceTest: + """Update DNS Trace test + + Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_dns_trace_test: (required) + :type update_dns_trace_test: UpdateDnsTraceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + test_id=test_id, + update_dns_trace_test=update_dns_trace_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsTraceTest", + '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, + ).data + + + @validate_call + def update_dns_trace_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_dns_trace_test: UpdateDnsTraceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsTraceTest]: + """Update DNS Trace test + + Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_dns_trace_test: (required) + :type update_dns_trace_test: UpdateDnsTraceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + test_id=test_id, + update_dns_trace_test=update_dns_trace_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsTraceTest", + '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, + ) + + + @validate_call + def update_dns_trace_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_dns_trace_test: UpdateDnsTraceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Trace test + + Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_dns_trace_test: (required) + :type update_dns_trace_test: UpdateDnsTraceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( + test_id=test_id, + update_dns_trace_test=update_dns_trace_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DnsTraceTest", + '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 _update_dns_trace_test_serialize( + self, + test_id, + update_dns_trace_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_dns_trace_test is not None: + _body_params = update_dns_trace_test + + + # 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='PUT', + resource_path='/v7/tests/dns-trace/{testId}', + 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/tests_api/tests_api/api/dnssec_api.py b/tests/tests/api/dnssec_api.py similarity index 96% rename from tests_api/tests_api/api/dnssec_api.py rename to tests/tests/api/dnssec_api.py index 2597a76b..3567200e 100644 --- a/tests_api/tests_api/api/dnssec_api.py +++ b/tests/tests/api/dnssec_api.py @@ -3,41 +3,30 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from tests.models.dns_sec_test import DnsSecTest +from tests.models.expand import Expand +from tests.models.get_dns_sec_tests200_response import GetDnsSecTests200Response +from tests.models.update_dns_sec_test import UpdateDnsSecTest -from tests_api.models.dns_sec_test import DnsSecTest -from tests_api.models.expand import Expand -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response -from tests_api.models.get_dns_sec_tests200_response import GetDnsSecTests200Response -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType class DNSSECApi: @@ -116,15 +105,13 @@ class DNSSECApi: _response_types_map: Dict[str, Optional[str]] = { '201': "DnsSecTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -200,15 +187,13 @@ class DNSSECApi: _response_types_map: Dict[str, Optional[str]] = { '201': "DnsSecTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -284,15 +269,13 @@ class DNSSECApi: _response_types_map: Dict[str, Optional[str]] = { '201': "DnsSecTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -310,12 +293,11 @@ class DNSSECApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -323,7 +305,7 @@ class DNSSECApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -446,7 +428,13 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -517,7 +505,13 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -588,7 +582,13 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -605,19 +605,18 @@ class DNSSECApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -636,7 +635,6 @@ class DNSSECApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -683,7 +681,7 @@ class DNSSECApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDnsSecTest200Response: + ) -> DnsSecTest: """Get DNSSEC test Returns details for a DNSSEC test, including name, intervals, targets, alert rules and agents. @@ -727,15 +725,13 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsSecTest200Response", + '200': "DnsSecTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -766,7 +762,7 @@ class DNSSECApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetDnsSecTest200Response]: + ) -> ApiResponse[DnsSecTest]: """Get DNSSEC test Returns details for a DNSSEC test, including name, intervals, targets, alert rules and agents. @@ -810,15 +806,13 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsSecTest200Response", + '200': "DnsSecTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -893,15 +887,13 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsSecTest200Response", + '200': "DnsSecTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -919,12 +911,11 @@ class DNSSECApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -932,7 +923,7 @@ class DNSSECApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1001,9 +992,9 @@ class DNSSECApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GetDnsSecTests200Response: - """List DNS Sec tests + """List DNSSEC tests - Returns a list of all DNS Sec tests and saved events. + Returns a list of all DNSSEC tests and saved events. :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 @@ -1045,8 +1036,6 @@ class DNSSECApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1076,9 +1065,9 @@ class DNSSECApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GetDnsSecTests200Response]: - """List DNS Sec tests + """List DNSSEC tests - Returns a list of all DNS Sec tests and saved events. + Returns a list of all DNSSEC tests and saved events. :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 @@ -1120,8 +1109,6 @@ class DNSSECApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1151,9 +1138,9 @@ class DNSSECApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List DNS Sec tests + """List DNSSEC tests - Returns a list of all DNS Sec tests and saved events. + Returns a list of all DNSSEC tests and saved events. :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 @@ -1195,8 +1182,6 @@ class DNSSECApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1212,19 +1197,18 @@ class DNSSECApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1289,7 +1273,7 @@ class DNSSECApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetDnsSecTest200Response: + ) -> DnsSecTest: """Update DNSSEC test Updates a DNSSEC test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. @@ -1336,16 +1320,14 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsSecTest200Response", - '400': "Error", + '200': "DnsSecTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1377,7 +1359,7 @@ class DNSSECApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetDnsSecTest200Response]: + ) -> ApiResponse[DnsSecTest]: """Update DNSSEC test Updates a DNSSEC test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. @@ -1424,16 +1406,14 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsSecTest200Response", - '400': "Error", + '200': "DnsSecTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1512,16 +1492,14 @@ class DNSSECApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsSecTest200Response", - '400': "Error", + '200': "DnsSecTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1540,12 +1518,11 @@ class DNSSECApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1553,7 +1530,7 @@ class DNSSECApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/tests/tests/api/ftp_server_api.py b/tests/tests/api/ftp_server_api.py new file mode 100644 index 00000000..32d5211c --- /dev/null +++ b/tests/tests/api/ftp_server_api.py @@ -0,0 +1,1594 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.expand import Expand +from tests.models.ftp_server_test import FtpServerTest +from tests.models.get_ftp_server_tests200_response import GetFtpServerTests200Response +from tests.models.update_ftp_server_test import UpdateFtpServerTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class FTPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def create_ftp_server_test( + self, + update_ftp_server_test: UpdateFtpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> FtpServerTest: + """Create FTP Server test + + Creates a new FTP Server test. This method requires Account Admin permissions. + + :param update_ftp_server_test: (required) + :type update_ftp_server_test: UpdateFtpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + update_ftp_server_test=update_ftp_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FtpServerTest", + '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, + ).data + + + @validate_call + def create_ftp_server_test_with_http_info( + self, + update_ftp_server_test: UpdateFtpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[FtpServerTest]: + """Create FTP Server test + + Creates a new FTP Server test. This method requires Account Admin permissions. + + :param update_ftp_server_test: (required) + :type update_ftp_server_test: UpdateFtpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + update_ftp_server_test=update_ftp_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FtpServerTest", + '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, + ) + + + @validate_call + def create_ftp_server_test_without_preload_content( + self, + update_ftp_server_test: UpdateFtpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 FTP Server test + + Creates a new FTP Server test. This method requires Account Admin permissions. + + :param update_ftp_server_test: (required) + :type update_ftp_server_test: UpdateFtpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + update_ftp_server_test=update_ftp_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FtpServerTest", + '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_ftp_server_test_serialize( + self, + update_ftp_server_test, + aid, + 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 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 update_ftp_server_test is not None: + _body_params = update_ftp_server_test + + + # 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/tests/ftp-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_ftp_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 FTP Server test + + Deletes the specified FTP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_ftp_server_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_ftp_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 FTP Server test + + Deletes the specified FTP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_ftp_server_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_ftp_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 FTP Server test + + Deletes the specified FTP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_ftp_server_test_serialize( + test_id=test_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, + '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_ftp_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/ftp-server/{testId}', + 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_ftp_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> FtpServerTest: + """Get FTP Server test + + Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FtpServerTest", + '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, + ).data + + + @validate_call + def get_ftp_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[FtpServerTest]: + """Get FTP Server test + + Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FtpServerTest", + '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, + ) + + + @validate_call + def get_ftp_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get FTP Server test + + Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FtpServerTest", + '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_ftp_server_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/ftp-server/{testId}', + 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_ftp_server_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[ + 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, + ) -> GetFtpServerTests200Response: + """List FTP Server tests + + Returns a list of FTP Server tests and saved events. + + :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_ftp_server_tests_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': "GetFtpServerTests200Response", + '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, + ).data + + + @validate_call + def get_ftp_server_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[ + 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[GetFtpServerTests200Response]: + """List FTP Server tests + + Returns a list of FTP Server tests and saved events. + + :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_ftp_server_tests_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': "GetFtpServerTests200Response", + '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, + ) + + + @validate_call + def get_ftp_server_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[ + 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 FTP Server tests + + Returns a list of FTP Server tests and saved events. + + :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_ftp_server_tests_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': "GetFtpServerTests200Response", + '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_ftp_server_tests_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/tests/ftp-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_ftp_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_ftp_server_test: UpdateFtpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> FtpServerTest: + """Update FTP Server test + + Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_ftp_server_test: (required) + :type update_ftp_server_test: UpdateFtpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + test_id=test_id, + update_ftp_server_test=update_ftp_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FtpServerTest", + '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, + ).data + + + @validate_call + def update_ftp_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_ftp_server_test: UpdateFtpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[FtpServerTest]: + """Update FTP Server test + + Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_ftp_server_test: (required) + :type update_ftp_server_test: UpdateFtpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + test_id=test_id, + update_ftp_server_test=update_ftp_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FtpServerTest", + '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, + ) + + + @validate_call + def update_ftp_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_ftp_server_test: UpdateFtpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 FTP Server test + + Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_ftp_server_test: (required) + :type update_ftp_server_test: UpdateFtpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( + test_id=test_id, + update_ftp_server_test=update_ftp_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FtpServerTest", + '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 _update_ftp_server_test_serialize( + self, + test_id, + update_ftp_server_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_ftp_server_test is not None: + _body_params = update_ftp_server_test + + + # 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='PUT', + resource_path='/v7/tests/ftp-server/{testId}', + 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/tests/tests/api/http_server_api.py b/tests/tests/api/http_server_api.py new file mode 100644 index 00000000..72fbfd85 --- /dev/null +++ b/tests/tests/api/http_server_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.expand import Expand +from tests.models.get_http_server_tests200_response import GetHttpServerTests200Response +from tests.models.http_server_test import HttpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class HTTPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def create_http_server_test( + self, + update_http_server_test: UpdateHttpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> HttpServerTest: + """Create HTTP Server test + + Creates a new HTTP Server test. This method requires Account Admin permissions. + + :param update_http_server_test: (required) + :type update_http_server_test: UpdateHttpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + update_http_server_test=update_http_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HttpServerTest", + '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, + ).data + + + @validate_call + def create_http_server_test_with_http_info( + self, + update_http_server_test: UpdateHttpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[HttpServerTest]: + """Create HTTP Server test + + Creates a new HTTP Server test. This method requires Account Admin permissions. + + :param update_http_server_test: (required) + :type update_http_server_test: UpdateHttpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + update_http_server_test=update_http_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HttpServerTest", + '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, + ) + + + @validate_call + def create_http_server_test_without_preload_content( + self, + update_http_server_test: UpdateHttpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 HTTP Server test + + Creates a new HTTP Server test. This method requires Account Admin permissions. + + :param update_http_server_test: (required) + :type update_http_server_test: UpdateHttpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + update_http_server_test=update_http_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "HttpServerTest", + '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_test_serialize( + self, + update_http_server_test, + aid, + 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 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 update_http_server_test is not None: + _body_params = update_http_server_test + + + # 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/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_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 HTTP Server test + + Deletes the specified HTTP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_http_server_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_http_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 HTTP Server test + + Deletes the specified HTTP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_http_server_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_http_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 HTTP Server test + + Deletes the specified HTTP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_http_server_test_serialize( + test_id=test_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, + '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 _delete_http_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/http-server/{testId}', + 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_http_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> HttpServerTest: + """Get HTTP Server test + + Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HttpServerTest", + '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, + ).data + + + @validate_call + def get_http_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[HttpServerTest]: + """Get HTTP Server test + + Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HttpServerTest", + '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, + ) + + + @validate_call + def get_http_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get HTTP Server test + + Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HttpServerTest", + '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_http_server_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/http-server/{testId}', + 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_http_server_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[ + 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, + ) -> GetHttpServerTests200Response: + """List HTTP Server tests + + Returns a list of all HTTP Server tests and saved events. + + :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_http_server_tests_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': "GetHttpServerTests200Response", + '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, + ).data + + + @validate_call + def get_http_server_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[ + 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[GetHttpServerTests200Response]: + """List HTTP Server tests + + Returns a list of all HTTP Server tests and saved events. + + :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_http_server_tests_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': "GetHttpServerTests200Response", + '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, + ) + + + @validate_call + def get_http_server_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[ + 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 HTTP Server tests + + Returns a list of all HTTP Server tests and saved events. + + :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_http_server_tests_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': "GetHttpServerTests200Response", + '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_http_server_tests_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/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_http_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_http_server_test: UpdateHttpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> HttpServerTest: + """Update HTTP Server test + + Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_http_server_test: (required) + :type update_http_server_test: UpdateHttpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + test_id=test_id, + update_http_server_test=update_http_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HttpServerTest", + '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, + ).data + + + @validate_call + def update_http_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_http_server_test: UpdateHttpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[HttpServerTest]: + """Update HTTP Server test + + Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_http_server_test: (required) + :type update_http_server_test: UpdateHttpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + test_id=test_id, + update_http_server_test=update_http_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HttpServerTest", + '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, + ) + + + @validate_call + def update_http_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_http_server_test: UpdateHttpServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 HTTP Server test + + Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_http_server_test: (required) + :type update_http_server_test: UpdateHttpServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( + test_id=test_id, + update_http_server_test=update_http_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HttpServerTest", + '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 _update_http_server_test_serialize( + self, + test_id, + update_http_server_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_http_server_test is not None: + _body_params = update_http_server_test + + + # 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='PUT', + resource_path='/v7/tests/http-server/{testId}', + 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/tests_api/tests_api/api/page_load_api.py b/tests/tests/api/page_load_api.py similarity index 96% rename from tests_api/tests_api/api/page_load_api.py rename to tests/tests/api/page_load_api.py index 5786607c..326b948d 100644 --- a/tests_api/tests_api/api/page_load_api.py +++ b/tests/tests/api/page_load_api.py @@ -3,41 +3,30 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import List, Optional +from typing_extensions import Annotated +from tests.models.expand import Expand +from tests.models.get_page_load_tests200_response import GetPageLoadTests200Response +from tests.models.page_load_test import PageLoadTest +from tests.models.update_page_load_test import UpdatePageLoadTest -from tests_api.models.expand import Expand -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response -from tests_api.models.get_page_load_tests200_response import GetPageLoadTests200Response -from tests_api.models.page_load_test import PageLoadTest -from tests_api.models.update_page_load_test import UpdatePageLoadTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType class PageLoadApi: @@ -116,15 +105,13 @@ class PageLoadApi: _response_types_map: Dict[str, Optional[str]] = { '201': "PageLoadTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -200,15 +187,13 @@ class PageLoadApi: _response_types_map: Dict[str, Optional[str]] = { '201': "PageLoadTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -284,15 +269,13 @@ class PageLoadApi: _response_types_map: Dict[str, Optional[str]] = { '201': "PageLoadTest", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -310,12 +293,11 @@ class PageLoadApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -323,7 +305,7 @@ class PageLoadApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -446,7 +428,13 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -517,7 +505,13 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -588,7 +582,13 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -605,19 +605,18 @@ class PageLoadApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -636,7 +635,6 @@ class PageLoadApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -683,7 +681,7 @@ class PageLoadApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetPageLoadTest200Response: + ) -> PageLoadTest: """Get Page Load test Returns details for a Page Load test, including name, intervals, targets, alert rules and agents. @@ -727,15 +725,13 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPageLoadTest200Response", + '200': "PageLoadTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -766,7 +762,7 @@ class PageLoadApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetPageLoadTest200Response]: + ) -> ApiResponse[PageLoadTest]: """Get Page Load test Returns details for a Page Load test, including name, intervals, targets, alert rules and agents. @@ -810,15 +806,13 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPageLoadTest200Response", + '200': "PageLoadTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -893,15 +887,13 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPageLoadTest200Response", + '200': "PageLoadTest", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -919,12 +911,11 @@ class PageLoadApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -932,7 +923,7 @@ class PageLoadApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1045,8 +1036,6 @@ class PageLoadApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1120,8 +1109,6 @@ class PageLoadApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1195,8 +1182,6 @@ class PageLoadApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1212,19 +1197,18 @@ class PageLoadApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1289,7 +1273,7 @@ class PageLoadApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetPageLoadTest200Response: + ) -> PageLoadTest: """Update Page Load test Updates a Page Load test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. @@ -1336,16 +1320,14 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPageLoadTest200Response", - '400': "Error", + '200': "PageLoadTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1377,7 +1359,7 @@ class PageLoadApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetPageLoadTest200Response]: + ) -> ApiResponse[PageLoadTest]: """Update Page Load test Updates a Page Load test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. @@ -1424,16 +1406,14 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPageLoadTest200Response", - '400': "Error", + '200': "PageLoadTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1512,16 +1492,14 @@ class PageLoadApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetPageLoadTest200Response", - '400': "Error", + '200': "PageLoadTest", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1540,12 +1518,11 @@ class PageLoadApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - 'expand': 'csv', } @@ -1553,7 +1530,7 @@ class PageLoadApi: _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/tests_api/tests_api/api/path_visualization_interface_groups_api.py b/tests/tests/api/path_visualization_interface_groups_api.py similarity index 96% rename from tests_api/tests_api/api/path_visualization_interface_groups_api.py rename to tests/tests/api/path_visualization_interface_groups_api.py index cc05b624..2f6ad0fd 100644 --- a/tests_api/tests_api/api/path_visualization_interface_groups_api.py +++ b/tests/tests/api/path_visualization_interface_groups_api.py @@ -3,39 +3,28 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr +from pydantic import Field, StrictStr from typing import Optional +from typing_extensions import Annotated +from tests.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response +from tests.models.interface_group import InterfaceGroup -from tests_api.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response -from tests_api.models.interface_group import InterfaceGroup -from tests_api.models.update_path_vis_interface_group200_response import UpdatePathVisInterfaceGroup200Response - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType class PathVisualizationInterfaceGroupsApi: @@ -110,15 +99,13 @@ class PathVisualizationInterfaceGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "InterfaceGroup", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -190,15 +177,13 @@ class PathVisualizationInterfaceGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "InterfaceGroup", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -270,15 +255,13 @@ class PathVisualizationInterfaceGroupsApi: _response_types_map: Dict[str, Optional[str]] = { '201': "InterfaceGroup", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -295,19 +278,18 @@ class PathVisualizationInterfaceGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -426,7 +408,13 @@ class PathVisualizationInterfaceGroupsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -497,7 +485,13 @@ class PathVisualizationInterfaceGroupsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -568,7 +562,13 @@ class PathVisualizationInterfaceGroupsApi: ) _response_types_map: Dict[str, Optional[str]] = { - + '204': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", } response_data = self.api_client.call_api( *_param, @@ -585,19 +585,18 @@ class PathVisualizationInterfaceGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -616,7 +615,6 @@ class PathVisualizationInterfaceGroupsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -706,8 +704,6 @@ class PathVisualizationInterfaceGroupsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -781,8 +777,6 @@ class PathVisualizationInterfaceGroupsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -856,8 +850,6 @@ class PathVisualizationInterfaceGroupsApi: '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -873,19 +865,18 @@ class PathVisualizationInterfaceGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -949,7 +940,7 @@ class PathVisualizationInterfaceGroupsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UpdatePathVisInterfaceGroup200Response: + ) -> InterfaceGroup: """Update interface group Updates a path visualization interface group.. @@ -993,16 +984,14 @@ class PathVisualizationInterfaceGroupsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdatePathVisInterfaceGroup200Response", - '400': "Error", + '200': "InterfaceGroup", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1033,7 +1022,7 @@ class PathVisualizationInterfaceGroupsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UpdatePathVisInterfaceGroup200Response]: + ) -> ApiResponse[InterfaceGroup]: """Update interface group Updates a path visualization interface group.. @@ -1077,16 +1066,14 @@ class PathVisualizationInterfaceGroupsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdatePathVisInterfaceGroup200Response", - '400': "Error", + '200': "InterfaceGroup", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1161,16 +1148,14 @@ class PathVisualizationInterfaceGroupsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdatePathVisInterfaceGroup200Response", - '400': "Error", + '200': "InterfaceGroup", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", '500': "Error", '502': "Error", - - } response_data = self.api_client.call_api( *_param, @@ -1188,19 +1173,18 @@ class PathVisualizationInterfaceGroupsApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/tests/tests/api/sip_server_api.py b/tests/tests/api/sip_server_api.py new file mode 100644 index 00000000..35982ad0 --- /dev/null +++ b/tests/tests/api/sip_server_api.py @@ -0,0 +1,1594 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.expand import Expand +from tests.models.get_sip_server_tests200_response import GetSipServerTests200Response +from tests.models.sip_server_test import SipServerTest +from tests.models.update_sip_server_test import UpdateSipServerTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class SIPServerApi: + """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() + self.api_client = api_client + + + @validate_call + def create_sip_server_test( + self, + update_sip_server_test: UpdateSipServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> SipServerTest: + """Create SIP Server test + + Creates a new SIP Server test. This method requires Account Admin permissions. + + :param update_sip_server_test: (required) + :type update_sip_server_test: UpdateSipServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + update_sip_server_test=update_sip_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SipServerTest", + '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, + ).data + + + @validate_call + def create_sip_server_test_with_http_info( + self, + update_sip_server_test: UpdateSipServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[SipServerTest]: + """Create SIP Server test + + Creates a new SIP Server test. This method requires Account Admin permissions. + + :param update_sip_server_test: (required) + :type update_sip_server_test: UpdateSipServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + update_sip_server_test=update_sip_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SipServerTest", + '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, + ) + + + @validate_call + def create_sip_server_test_without_preload_content( + self, + update_sip_server_test: UpdateSipServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 SIP Server test + + Creates a new SIP Server test. This method requires Account Admin permissions. + + :param update_sip_server_test: (required) + :type update_sip_server_test: UpdateSipServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + update_sip_server_test=update_sip_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SipServerTest", + '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_sip_server_test_serialize( + self, + update_sip_server_test, + aid, + 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 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 update_sip_server_test is not None: + _body_params = update_sip_server_test + + + # 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/tests/sip-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_sip_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 SIP Server test + + Deletes the specified SIP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_sip_server_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_sip_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 SIP Server test + + Deletes the specified SIP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_sip_server_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_sip_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 SIP Server test + + Deletes the specified SIP Server test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_sip_server_test_serialize( + test_id=test_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, + '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_sip_server_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/sip-server/{testId}', + 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_sip_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> SipServerTest: + """Get SIP Server test + + Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SipServerTest", + '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, + ).data + + + @validate_call + def get_sip_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[SipServerTest]: + """Get SIP Server test + + Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SipServerTest", + '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, + ) + + + @validate_call + def get_sip_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get SIP Server test + + Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SipServerTest", + '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_sip_server_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/sip-server/{testId}', + 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_sip_server_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[ + 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, + ) -> GetSipServerTests200Response: + """List SIP Server tests + + Returns a list of SIP Server tests and saved events. + + :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_sip_server_tests_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': "GetSipServerTests200Response", + '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, + ).data + + + @validate_call + def get_sip_server_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[ + 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[GetSipServerTests200Response]: + """List SIP Server tests + + Returns a list of SIP Server tests and saved events. + + :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_sip_server_tests_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': "GetSipServerTests200Response", + '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, + ) + + + @validate_call + def get_sip_server_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[ + 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 SIP Server tests + + Returns a list of SIP Server tests and saved events. + + :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_sip_server_tests_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': "GetSipServerTests200Response", + '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_sip_server_tests_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/tests/sip-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_sip_server_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_sip_server_test: UpdateSipServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> SipServerTest: + """Update SIP Server test + + Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_sip_server_test: (required) + :type update_sip_server_test: UpdateSipServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + test_id=test_id, + update_sip_server_test=update_sip_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SipServerTest", + '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, + ).data + + + @validate_call + def update_sip_server_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_sip_server_test: UpdateSipServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[SipServerTest]: + """Update SIP Server test + + Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_sip_server_test: (required) + :type update_sip_server_test: UpdateSipServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + test_id=test_id, + update_sip_server_test=update_sip_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SipServerTest", + '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, + ) + + + @validate_call + def update_sip_server_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_sip_server_test: UpdateSipServerTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 SIP Server test + + Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_sip_server_test: (required) + :type update_sip_server_test: UpdateSipServerTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( + test_id=test_id, + update_sip_server_test=update_sip_server_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SipServerTest", + '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 _update_sip_server_test_serialize( + self, + test_id, + update_sip_server_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_sip_server_test is not None: + _body_params = update_sip_server_test + + + # 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='PUT', + resource_path='/v7/tests/sip-server/{testId}', + 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/tests/tests/api/voice_api.py b/tests/tests/api/voice_api.py new file mode 100644 index 00000000..c9c225b3 --- /dev/null +++ b/tests/tests/api/voice_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.expand import Expand +from tests.models.get_voice_tests200_response import GetVoiceTests200Response +from tests.models.update_voice_test import UpdateVoiceTest +from tests.models.voice_test import VoiceTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class VoiceApi: + """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() + self.api_client = api_client + + + @validate_call + def create_voice_test( + self, + update_voice_test: UpdateVoiceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> VoiceTest: + """Create Voice test + + Creates a new Voice test. This method requires Account Admin permissions. + + :param update_voice_test: (required) + :type update_voice_test: UpdateVoiceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + update_voice_test=update_voice_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VoiceTest", + '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, + ).data + + + @validate_call + def create_voice_test_with_http_info( + self, + update_voice_test: UpdateVoiceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[VoiceTest]: + """Create Voice test + + Creates a new Voice test. This method requires Account Admin permissions. + + :param update_voice_test: (required) + :type update_voice_test: UpdateVoiceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + update_voice_test=update_voice_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VoiceTest", + '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, + ) + + + @validate_call + def create_voice_test_without_preload_content( + self, + update_voice_test: UpdateVoiceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Voice test + + Creates a new Voice test. This method requires Account Admin permissions. + + :param update_voice_test: (required) + :type update_voice_test: UpdateVoiceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + update_voice_test=update_voice_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VoiceTest", + '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_voice_test_serialize( + self, + update_voice_test, + aid, + 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 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 update_voice_test is not None: + _body_params = update_voice_test + + + # 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/tests/voice', + 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_voice_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Voice test + + Deletes the specified Voice test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_voice_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_voice_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Voice test + + Deletes the specified Voice test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_voice_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_voice_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Voice test + + Deletes the specified Voice test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_voice_test_serialize( + test_id=test_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, + '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 _delete_voice_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/voice/{testId}', + 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_voice_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> VoiceTest: + """Get Voice test + + Returns details for a Voice test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceTest", + '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, + ).data + + + @validate_call + def get_voice_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[VoiceTest]: + """Get Voice test + + Returns details for a Voice test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceTest", + '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, + ) + + + @validate_call + def get_voice_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get Voice test + + Returns details for a Voice test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceTest", + '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_voice_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/voice/{testId}', + 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_voice_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[ + 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, + ) -> GetVoiceTests200Response: + """List Voice tests + + Returns a list of Voice tests and saved events. + + :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_voice_tests_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': "GetVoiceTests200Response", + '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, + ).data + + + @validate_call + def get_voice_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[ + 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[GetVoiceTests200Response]: + """List Voice tests + + Returns a list of Voice tests and saved events. + + :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_voice_tests_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': "GetVoiceTests200Response", + '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, + ) + + + @validate_call + def get_voice_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[ + 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 Voice tests + + Returns a list of Voice tests and saved events. + + :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_voice_tests_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': "GetVoiceTests200Response", + '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_voice_tests_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/tests/voice', + 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_voice_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_voice_test: UpdateVoiceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> VoiceTest: + """Update Voice test + + Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_voice_test: (required) + :type update_voice_test: UpdateVoiceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + test_id=test_id, + update_voice_test=update_voice_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceTest", + '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, + ).data + + + @validate_call + def update_voice_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_voice_test: UpdateVoiceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[VoiceTest]: + """Update Voice test + + Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_voice_test: (required) + :type update_voice_test: UpdateVoiceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + test_id=test_id, + update_voice_test=update_voice_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceTest", + '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, + ) + + + @validate_call + def update_voice_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_voice_test: UpdateVoiceTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Voice test + + Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_voice_test: (required) + :type update_voice_test: UpdateVoiceTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( + test_id=test_id, + update_voice_test=update_voice_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VoiceTest", + '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 _update_voice_test_serialize( + self, + test_id, + update_voice_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_voice_test is not None: + _body_params = update_voice_test + + + # 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='PUT', + resource_path='/v7/tests/voice/{testId}', + 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/tests/tests/api/web_transaction_api.py b/tests/tests/api/web_transaction_api.py new file mode 100644 index 00000000..3c716fce --- /dev/null +++ b/tests/tests/api/web_transaction_api.py @@ -0,0 +1,1597 @@ +# 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.2 + 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 + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from tests.models.expand import Expand +from tests.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response +from tests.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.web_transaction_test import WebTransactionTest + +from tests.api_client import ApiClient, RequestSerialized +from tests.api_response import ApiResponse +from tests.rest import RESTResponseType + + +class WebTransactionApi: + """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() + self.api_client = api_client + + + @validate_call + def create_web_transactions_test( + self, + update_web_transaction_test: UpdateWebTransactionTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> WebTransactionTest: + """Create Web Transactions test + + Creates a new Web Transactions test. This method requires Account Admin permissions. + + :param update_web_transaction_test: (required) + :type update_web_transaction_test: UpdateWebTransactionTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + update_web_transaction_test=update_web_transaction_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebTransactionTest", + '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, + ).data + + + @validate_call + def create_web_transactions_test_with_http_info( + self, + update_web_transaction_test: UpdateWebTransactionTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[WebTransactionTest]: + """Create Web Transactions test + + Creates a new Web Transactions test. This method requires Account Admin permissions. + + :param update_web_transaction_test: (required) + :type update_web_transaction_test: UpdateWebTransactionTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + update_web_transaction_test=update_web_transaction_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebTransactionTest", + '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, + ) + + + @validate_call + def create_web_transactions_test_without_preload_content( + self, + update_web_transaction_test: UpdateWebTransactionTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Web Transactions test + + Creates a new Web Transactions test. This method requires Account Admin permissions. + + :param update_web_transaction_test: (required) + :type update_web_transaction_test: UpdateWebTransactionTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + update_web_transaction_test=update_web_transaction_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "WebTransactionTest", + '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_web_transactions_test_serialize( + self, + update_web_transaction_test, + aid, + 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 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 update_web_transaction_test is not None: + _body_params = update_web_transaction_test + + + # 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/tests/web-transactions', + 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_web_transactions_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Web Transactions test + + Deletes the specified Web Transactions test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_web_transactions_test_serialize( + test_id=test_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, + '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, + ).data + + + @validate_call + def delete_web_transactions_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Web Transactions test + + Deletes the specified Web Transactions test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_web_transactions_test_serialize( + test_id=test_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, + '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, + ) + + + @validate_call + def delete_web_transactions_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + _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 Web Transactions test + + Deletes the specified Web Transactions test. This method requires Account Admin permissions. + + :param test_id: ID of the test (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 _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_web_transactions_test_serialize( + test_id=test_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, + '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 _delete_web_transactions_test_serialize( + self, + test_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 + # 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/tests/web-transactions/{testId}', + 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_web_transactions_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> WebTransactionTest: + """Get Web Transactions test + + Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionTest", + '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, + ).data + + + @validate_call + def get_web_transactions_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[WebTransactionTest]: + """Get Web Transactions test + + Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionTest", + '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, + ) + + + @validate_call + def get_web_transactions_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the 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, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: + """Get Web Transactions test + + Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. + + :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + test_id=test_id, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionTest", + '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_web_transactions_test_serialize( + self, + test_id, + aid, + 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 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 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/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v7/tests/web-transactions/{testId}', + 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_web_transactions_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[ + 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, + ) -> GetWebTransactionsTests200Response: + """List Web Transactions tests + + Returns a list of all Web Transactions tests and saved events. + + :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_web_transactions_tests_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': "GetWebTransactionsTests200Response", + '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, + ).data + + + @validate_call + def get_web_transactions_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[ + 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[GetWebTransactionsTests200Response]: + """List Web Transactions tests + + Returns a list of all Web Transactions tests and saved events. + + :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_web_transactions_tests_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': "GetWebTransactionsTests200Response", + '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, + ) + + + @validate_call + def get_web_transactions_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[ + 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 Web Transactions tests + + Returns a list of all Web Transactions tests and saved events. + + :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_web_transactions_tests_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': "GetWebTransactionsTests200Response", + '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_web_transactions_tests_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/tests/web-transactions', + 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_web_transactions_test( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_web_transaction_test: UpdateWebTransactionTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, + ) -> WebTransactionTest: + """Update Web Transactions test + + Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_web_transaction_test: (required) + :type update_web_transaction_test: UpdateWebTransactionTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + test_id=test_id, + update_web_transaction_test=update_web_transaction_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionTest", + '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, + ).data + + + @validate_call + def update_web_transactions_test_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_web_transaction_test: UpdateWebTransactionTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[WebTransactionTest]: + """Update Web Transactions test + + Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_web_transaction_test: (required) + :type update_web_transaction_test: UpdateWebTransactionTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + test_id=test_id, + update_web_transaction_test=update_web_transaction_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionTest", + '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, + ) + + + @validate_call + def update_web_transactions_test_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="ID of the test")], + update_web_transaction_test: UpdateWebTransactionTest, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Web Transactions test + + Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. + + :param test_id: ID of the test (required) + :type test_id: str + :param update_web_transaction_test: (required) + :type update_web_transaction_test: UpdateWebTransactionTest + :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( + test_id=test_id, + update_web_transaction_test=update_web_transaction_test, + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionTest", + '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 _update_web_transactions_test_serialize( + self, + test_id, + update_web_transaction_test, + aid, + 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 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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if update_web_transaction_test is not None: + _body_params = update_web_transaction_test + + + # 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='PUT', + resource_path='/v7/tests/web-transactions/{testId}', + 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/tests/tests/api_client.py b/tests/tests/api_client.py new file mode 100644 index 00000000..ead6d3e2 --- /dev/null +++ b/tests/tests/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from tests.configuration import Configuration +from tests.api_response import ApiResponse, T as ApiResponseT +import tests.models +from tests import rest +from tests.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(tests.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/tests/tests/api_response.py b/tests/tests/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/tests/tests/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/tests/tests/configuration.py b/tests/tests/configuration.py new file mode 100644 index 00000000..e2821a5a --- /dev/null +++ b/tests/tests/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("tests") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/tests/tests/exceptions.py b/tests/tests/exceptions.py new file mode 100644 index 00000000..19d9861c --- /dev/null +++ b/tests/tests/exceptions.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/tests/tests/models/__init__.py b/tests/tests/models/__init__.py new file mode 100644 index 00000000..08d6755d --- /dev/null +++ b/tests/tests/models/__init__.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from tests.models.agent import Agent +from tests.models.agent_base import AgentBase +from tests.models.agent_to_agent_instant_test import AgentToAgentInstantTest +from tests.models.agent_to_agent_properties import AgentToAgentProperties +from tests.models.agent_to_agent_test import AgentToAgentTest +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.agent_to_agent_tests import AgentToAgentTests +from tests.models.agent_to_server_instant_test import AgentToServerInstantTest +from tests.models.agent_to_server_properties import AgentToServerProperties +from tests.models.agent_to_server_test import AgentToServerTest +from tests.models.agent_to_server_tests import AgentToServerTests +from tests.models.alert_direction import AlertDirection +from tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from tests.models.alert_rule import AlertRule +from tests.models.alert_type import AlertType +from tests.models.base_bgp_test import BaseBgpTest +from tests.models.base_request import BaseRequest +from tests.models.base_test import BaseTest +from tests.models.bgp_test import BgpTest +from tests.models.bgp_tests import BgpTests +from tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from tests.models.dns_query_class import DnsQueryClass +from tests.models.dns_sec_instant_test import DnsSecInstantTest +from tests.models.dns_sec_properties import DnsSecProperties +from tests.models.dns_sec_test import DnsSecTest +from tests.models.dns_sec_tests import DnsSecTests +from tests.models.dns_server_instant_test import DnsServerInstantTest +from tests.models.dns_server_properties import DnsServerProperties +from tests.models.dns_server_test import DnsServerTest +from tests.models.dns_server_tests import DnsServerTests +from tests.models.dns_servers_request import DnsServersRequest +from tests.models.dns_trace_instant_test import DnsTraceInstantTest +from tests.models.dns_trace_properties import DnsTraceProperties +from tests.models.dns_trace_test import DnsTraceTest +from tests.models.dns_trace_tests import DnsTraceTests +from tests.models.error import Error +from tests.models.expand import Expand +from tests.models.ftp_server_instant_test import FtpServerInstantTest +from tests.models.ftp_server_properties import FtpServerProperties +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.ftp_server_test import FtpServerTest +from tests.models.ftp_server_tests import FtpServerTests +from tests.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response +from tests.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response +from tests.models.get_bgp_tests200_response import GetBgpTests200Response +from tests.models.get_dns_server_tests200_response import GetDNSServerTests200Response +from tests.models.get_dns_sec_tests200_response import GetDnsSecTests200Response +from tests.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response +from tests.models.get_ftp_server_tests200_response import GetFtpServerTests200Response +from tests.models.get_http_server_tests200_response import GetHttpServerTests200Response +from tests.models.get_page_load_tests200_response import GetPageLoadTests200Response +from tests.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response +from tests.models.get_sip_server_tests200_response import GetSipServerTests200Response +from tests.models.get_tests200_response import GetTests200Response +from tests.models.get_voice_tests200_response import GetVoiceTests200Response +from tests.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response +from tests.models.http_server_instant_test import HttpServerInstantTest +from tests.models.http_server_properties import HttpServerProperties +from tests.models.http_server_test import HttpServerTest +from tests.models.http_server_tests import HttpServerTests +from tests.models.instant_test import InstantTest +from tests.models.interface_group import InterfaceGroup +from tests.models.interface_groups import InterfaceGroups +from tests.models.link import Link +from tests.models.monitor import Monitor +from tests.models.monitor_type import MonitorType +from tests.models.monitors_request import MonitorsRequest +from tests.models.page_load_instant_test import PageLoadInstantTest +from tests.models.page_load_properties import PageLoadProperties +from tests.models.page_load_test import PageLoadTest +from tests.models.page_load_tests import PageLoadTests +from tests.models.self_links import SelfLinks +from tests.models.self_links_links import SelfLinksLinks +from tests.models.severity import Severity +from tests.models.simple_agent import SimpleAgent +from tests.models.simple_test import SimpleTest +from tests.models.sip_server_instant_test import SipServerInstantTest +from tests.models.sip_server_instant_test_request import SipServerInstantTestRequest +from tests.models.sip_server_instant_test_response import SipServerInstantTestResponse +from tests.models.sip_server_properties import SipServerProperties +from tests.models.sip_server_test import SipServerTest +from tests.models.sip_server_tests import SipServerTests +from tests.models.sip_test_protocol import SipTestProtocol +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_direction import TestDirection +from tests.models.test_dns_server import TestDnsServer +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_http_interval import TestHttpInterval +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_monitors_properties import TestMonitorsProperties +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request import TestRequest +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_sip_credentials import TestSipCredentials +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.test_type import TestType +from tests.models.tests import Tests +from tests.models.unauthorized_error import UnauthorizedError +from tests.models.unexpanded_agent_to_agent_test import UnexpandedAgentToAgentTest +from tests.models.unexpanded_agent_to_server_test import UnexpandedAgentToServerTest +from tests.models.unexpanded_bgp_test import UnexpandedBgpTest +from tests.models.unexpanded_dns_sec_test import UnexpandedDnsSecTest +from tests.models.unexpanded_dns_server_test import UnexpandedDnsServerTest +from tests.models.unexpanded_dns_trace_test import UnexpandedDnsTraceTest +from tests.models.unexpanded_ftp_server_test import UnexpandedFtpServerTest +from tests.models.unexpanded_http_server_test import UnexpandedHttpServerTest +from tests.models.unexpanded_instant_test import UnexpandedInstantTest +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from tests.models.unexpanded_page_load_test import UnexpandedPageLoadTest +from tests.models.unexpanded_sip_server_test import UnexpandedSipServerTest +from tests.models.unexpanded_test import UnexpandedTest +from tests.models.unexpanded_voice_test import UnexpandedVoiceTest +from tests.models.unexpanded_web_transaction_test import UnexpandedWebTransactionTest +from tests.models.update_agent_to_agent_test import UpdateAgentToAgentTest +from tests.models.update_agent_to_server_test import UpdateAgentToServerTest +from tests.models.update_bgp_test import UpdateBgpTest +from tests.models.update_bgp_test_request import UpdateBgpTestRequest +from tests.models.update_dns_sec_test import UpdateDnsSecTest +from tests.models.update_dns_server_test import UpdateDnsServerTest +from tests.models.update_dns_trace_test import UpdateDnsTraceTest +from tests.models.update_ftp_server_test import UpdateFtpServerTest +from tests.models.update_http_server_test import UpdateHttpServerTest +from tests.models.update_page_load_test import UpdatePageLoadTest +from tests.models.update_sip_server_test import UpdateSipServerTest +from tests.models.update_sip_server_test1 import UpdateSipServerTest1 +from tests.models.update_voice_test import UpdateVoiceTest +from tests.models.update_web_transaction_test import UpdateWebTransactionTest +from tests.models.validation_error import ValidationError +from tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +from tests.models.voice_instant_test import VoiceInstantTest +from tests.models.voice_properties import VoiceProperties +from tests.models.voice_test import VoiceTest +from tests.models.voice_tests import VoiceTests +from tests.models.web_transaction_instant_test import WebTransactionInstantTest +from tests.models.web_transaction_properties import WebTransactionProperties +from tests.models.web_transaction_test import WebTransactionTest +from tests.models.web_transaction_tests import WebTransactionTests diff --git a/tests/tests/models/agent.py b/tests/tests/models/agent.py new file mode 100644 index 00000000..82e0d486 --- /dev/null +++ b/tests/tests/models/agent.py @@ -0,0 +1,124 @@ +# 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.2 + 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 tests.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/agent_base.py b/tests/tests/models/agent_base.py new file mode 100644 index 00000000..44903daf --- /dev/null +++ b/tests/tests/models/agent_base.py @@ -0,0 +1,97 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/agent_to_agent_instant_test.py b/tests/tests/models/agent_to_agent_instant_test.py new file mode 100644 index 00000000..65f3c45d --- /dev/null +++ b/tests/tests/models/agent_to_agent_instant_test.py @@ -0,0 +1,197 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.test_direction import TestDirection +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class AgentToAgentInstantTest(BaseModel): + """ + AgentToAgentInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + direction: Optional[TestDirection] = None + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + protocol: Optional[AgentToAgentTestProtocol] = None + target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") + throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") + throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") + throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToAgentInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "dscp", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 AgentToAgentInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "direction": obj.get("direction"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "mss": obj.get("mss"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "targetAgentId": obj.get("targetAgentId"), + "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, + "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, + "throughputRate": obj.get("throughputRate"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/agent_to_agent_properties.py b/tests/tests/models/agent_to_agent_properties.py new file mode 100644 index 00000000..3a20a764 --- /dev/null +++ b/tests/tests/models/agent_to_agent_properties.py @@ -0,0 +1,122 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.test_direction import TestDirection +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_path_trace_mode import TestPathTraceMode +from typing import Optional, Set +from typing_extensions import Self + +class AgentToAgentProperties(BaseModel): + """ + AgentToAgentProperties + """ # noqa: E501 + direction: Optional[TestDirection] = None + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + protocol: Optional[AgentToAgentTestProtocol] = None + target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") + throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") + throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") + throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToAgentProperties 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([ + "dscp", + "type", + ]) + + _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 AgentToAgentProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "direction": obj.get("direction"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "mss": obj.get("mss"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "targetAgentId": obj.get("targetAgentId"), + "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, + "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, + "throughputRate": obj.get("throughputRate"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/agent_to_agent_test.py b/tests/tests/models/agent_to_agent_test.py similarity index 77% rename from tests_api/tests_api/models/agent_to_agent_test.py rename to tests/tests/models/agent_to_agent_test.py index fb7afb06..49af8463 100644 --- a/tests_api/tests_api/models/agent_to_agent_test.py +++ b/tests/tests/models/agent_to_agent_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,25 +18,22 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.test_direction import TestDirection -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_direction import TestDirection +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class AgentToAgentTest(BaseModel): """ @@ -59,12 +56,11 @@ class AgentToAgentTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") direction: Optional[TestDirection] = None dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") protocol: Optional[AgentToAgentTestProtocol] = None @@ -73,14 +69,17 @@ class AgentToAgentTest(BaseModel): throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -93,7 +92,7 @@ class AgentToAgentTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentToAgentTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -120,23 +119,25 @@ class AgentToAgentTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "dscp", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -180,7 +181,7 @@ class AgentToAgentTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentToAgentTest from a dict""" if obj is None: return None @@ -192,7 +193,7 @@ class AgentToAgentTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -203,10 +204,9 @@ class AgentToAgentTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "direction": obj.get("direction"), "dscp": obj.get("dscp"), "dscpId": obj.get("dscpId"), @@ -220,8 +220,10 @@ class AgentToAgentTest(BaseModel): "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, "throughputRate": obj.get("throughputRate"), "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None }) return _obj diff --git a/tests/tests/models/agent_to_agent_test_protocol.py b/tests/tests/models/agent_to_agent_test_protocol.py new file mode 100644 index 00000000..1d4c5a7b --- /dev/null +++ b/tests/tests/models/agent_to_agent_test_protocol.py @@ -0,0 +1,37 @@ +# 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.2 + 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 AgentToAgentTestProtocol(str, Enum): + """ + AgentToAgentTestProtocol + """ + + """ + allowed enum values + """ + TCP = 'tcp' + UDP = 'udp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AgentToAgentTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/agent_to_agent_tests.py b/tests/tests/models/agent_to_agent_tests.py new file mode 100644 index 00000000..858bd22e --- /dev/null +++ b/tests/tests/models/agent_to_agent_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_agent_to_agent_test import UnexpandedAgentToAgentTest +from typing import Optional, Set +from typing_extensions import Self + +class AgentToAgentTests(BaseModel): + """ + AgentToAgentTests + """ # noqa: E501 + tests: Optional[List[UnexpandedAgentToAgentTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToAgentTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentToAgentTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedAgentToAgentTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/agent_to_server_instant_test.py b/tests/tests/models/agent_to_server_instant_test.py new file mode 100644 index 00000000..7bb1efcc --- /dev/null +++ b/tests/tests/models/agent_to_server_instant_test.py @@ -0,0 +1,202 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class AgentToServerInstantTest(BaseModel): + """ + AgentToServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") + mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + server: StrictStr = Field(description="Target name or IP address.") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") + network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "dscp", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 AgentToServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "continuousMode": obj.get("continuousMode"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "ipv6Policy": obj.get("ipv6Policy"), + "pingPayloadSize": obj.get("pingPayloadSize"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/agent_to_server_properties.py b/tests/tests/models/agent_to_server_properties.py new file mode 100644 index 00000000..9e5eb7e3 --- /dev/null +++ b/tests/tests/models/agent_to_server_properties.py @@ -0,0 +1,127 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class AgentToServerProperties(BaseModel): + """ + AgentToServerProperties + """ # noqa: E501 + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") + mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + server: StrictStr = Field(description="Target name or IP address.") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") + network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToServerProperties 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([ + "dscp", + "type", + ]) + + _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 AgentToServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "continuousMode": obj.get("continuousMode"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "ipv6Policy": obj.get("ipv6Policy"), + "pingPayloadSize": obj.get("pingPayloadSize"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/agent_to_server_test.py b/tests/tests/models/agent_to_server_test.py similarity index 78% rename from tests_api/tests_api/models/agent_to_server_test.py rename to tests/tests/models/agent_to_server_test.py index a1edfee9..0c641ee2 100644 --- a/tests_api/tests_api/models/agent_to_server_test.py +++ b/tests/tests/models/agent_to_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,26 +18,23 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class AgentToServerTest(BaseModel): """ @@ -60,12 +57,11 @@ class AgentToServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") @@ -76,14 +72,17 @@ class AgentToServerTest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -96,7 +95,7 @@ class AgentToServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of AgentToServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -123,23 +122,25 @@ class AgentToServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "dscp", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -183,7 +184,7 @@ class AgentToServerTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of AgentToServerTest from a dict""" if obj is None: return None @@ -195,7 +196,7 @@ class AgentToServerTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -206,10 +207,9 @@ class AgentToServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "continuousMode": obj.get("continuousMode"), "fixedPacketRate": obj.get("fixedPacketRate"), @@ -225,8 +225,10 @@ class AgentToServerTest(BaseModel): "ipv6Policy": obj.get("ipv6Policy"), "pingPayloadSize": obj.get("pingPayloadSize"), "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None }) return _obj diff --git a/tests/tests/models/agent_to_server_tests.py b/tests/tests/models/agent_to_server_tests.py new file mode 100644 index 00000000..d00c92cb --- /dev/null +++ b/tests/tests/models/agent_to_server_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_agent_to_server_test import UnexpandedAgentToServerTest +from typing import Optional, Set +from typing_extensions import Self + +class AgentToServerTests(BaseModel): + """ + AgentToServerTests + """ # noqa: E501 + tests: Optional[List[UnexpandedAgentToServerTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentToServerTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentToServerTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedAgentToServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/alert_direction.py b/tests/tests/models/alert_direction.py new file mode 100644 index 00000000..908e1f3e --- /dev/null +++ b/tests/tests/models/alert_direction.py @@ -0,0 +1,38 @@ +# 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.2 + 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 AlertDirection(str, Enum): + """ + Direction for applicable alert types (eg. path trace, End-to-End (Agent) etc.) + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/alert_rounds_violation_mode.py b/tests/tests/models/alert_rounds_violation_mode.py new file mode 100644 index 00000000..e21dcf7d --- /dev/null +++ b/tests/tests/models/alert_rounds_violation_mode.py @@ -0,0 +1,37 @@ +# 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.2 + 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 AlertRoundsViolationMode(str, Enum): + """ + `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` + """ + + """ + allowed enum values + """ + EXACT = 'exact' + ANY = 'any' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertRoundsViolationMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/alert_rule.py b/tests/tests/models/alert_rule.py new file mode 100644 index 00000000..6b26de15 --- /dev/null +++ b/tests/tests/models/alert_rule.py @@ -0,0 +1,129 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.alert_direction import AlertDirection +from tests.models.alert_rounds_violation_mode import AlertRoundsViolationMode +from tests.models.alert_type import AlertType +from tests.models.severity import Severity +from typing import Optional, Set +from typing_extensions import Self + +class AlertRule(BaseModel): + """ + AlertRule + """ # noqa: E501 + rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") + rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") + expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") + direction: Optional[AlertDirection] = None + is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") + alert_type: Optional[AlertType] = Field(default=None, alias="alertType") + minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") + minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") + rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") + rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") + rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") + severity: Optional[Severity] = None + __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "severity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertRule 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([ + "rule_id", + "rule_name", + "expression", + "is_default", + "minimum_sources", + "minimum_sources_pct", + "rounds_violating_out_of", + "rounds_violating_required", + ]) + + _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 AlertRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ruleId": obj.get("ruleId"), + "ruleName": obj.get("ruleName"), + "expression": obj.get("expression"), + "direction": obj.get("direction"), + "isDefault": obj.get("isDefault"), + "alertType": obj.get("alertType"), + "minimumSources": obj.get("minimumSources"), + "minimumSourcesPct": obj.get("minimumSourcesPct"), + "roundsViolatingMode": obj.get("roundsViolatingMode"), + "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), + "roundsViolatingRequired": obj.get("roundsViolatingRequired"), + "severity": obj.get("severity") + }) + return _obj + + diff --git a/tests/tests/models/alert_type.py b/tests/tests/models/alert_type.py new file mode 100644 index 00000000..01bda866 --- /dev/null +++ b/tests/tests/models/alert_type.py @@ -0,0 +1,62 @@ +# 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.2 + 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 AlertType(str, Enum): + """ + Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values + """ + + """ + allowed enum values + """ + PAGE_MINUS_LOAD = 'page-load' + HTTP_MINUS_SERVER = 'http-server' + END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' + END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' + VOICE = 'voice' + DNS_MINUS_SERVER = 'dns-server' + DNS_MINUS_TRACE = 'dns-trace' + DNSSEC = 'dnssec' + BGP = 'bgp' + PATH_MINUS_TRACE = 'path-trace' + FTP = 'ftp' + SIP_MINUS_SERVER = 'sip-server' + TRANSACTIONS = 'transactions' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + AGENT = 'agent' + NETWORK_MINUS_OUTAGE = 'network-outage' + APPLICATION_MINUS_OUTAGE = 'application-outage' + DEVICE_MINUS_DEVICE = 'device-device' + DEVICE_MINUS_INTERFACE = 'device-interface' + ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' + ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' + ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' + ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' + API = 'api' + WEB_MINUS_TRANSACTION = 'web-transaction' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlertType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/base_bgp_test.py b/tests/tests/models/base_bgp_test.py new file mode 100644 index 00000000..5703542f --- /dev/null +++ b/tests/tests/models/base_bgp_test.py @@ -0,0 +1,182 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class BaseBgpTest(BaseModel): + """ + BaseBgpTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Indicate if queries for subprefixes detected under this prefix should included.", alias="includeCoveredPrefixes") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="A list of enabled alert rule objects.", alias="alertRules") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "enabled", "monitors", "includeCoveredPrefixes", "usePublicBgp", "alertsEnabled", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseBgpTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "monitors", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 each item in alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseBgpTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "alertsEnabled": obj.get("alertsEnabled"), + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/tests_api/tests_api/models/base_request.py b/tests/tests/models/base_request.py similarity index 80% rename from tests_api/tests_api/models/base_request.py rename to tests/tests/models/base_request.py index 8cdad24a..c94671d6 100644 --- a/tests_api/tests_api/models/base_request.py +++ b/tests/tests/models/base_request.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class BaseRequest(BaseModel): """ @@ -35,10 +31,11 @@ class BaseRequest(BaseModel): alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") __properties: ClassVar[List[str]] = ["labels", "sharedWithAccounts", "alertRules"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ class BaseRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BaseRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ class BaseRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BaseRequest from a dict""" if obj is None: return None diff --git a/tests/tests/models/base_test.py b/tests/tests/models/base_test.py new file mode 100644 index 00000000..64eb4dc0 --- /dev/null +++ b/tests/tests/models/base_test.py @@ -0,0 +1,102 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.alert_rule import AlertRule +from tests.models.test_interval import TestInterval +from typing import Optional, Set +from typing_extensions import Self + +class BaseTest(BaseModel): + """ + BaseTest + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseTest 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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None + }) + return _obj + + diff --git a/tests_api/tests_api/models/bgp_test.py b/tests/tests/models/bgp_test.py similarity index 75% rename from tests_api/tests_api/models/bgp_test.py rename to tests/tests/models/bgp_test.py index 41fabad3..c1e0eefa 100644 --- a/tests_api/tests_api/models/bgp_test.py +++ b/tests/tests/models/bgp_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,18 +18,15 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class BgpTest(BaseModel): """ @@ -48,18 +45,20 @@ class BgpTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Indicate if queries for subprefixes detected under this prefix should included.", alias="includeCoveredPrefixes") - prefix: StrictStr = Field(description="a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24.") - use_public_bgp: Optional[StrictBool] = Field(default=None, description="Indicate if all available public BGP monitors should be used.", alias="usePublicBGP") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") alert_rules: Optional[List[AlertRule]] = Field(default=None, description="A list of enabled alert rule objects.", alias="alertRules") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "monitors", "includeCoveredPrefixes", "prefix", "usePublicBGP", "alertsEnabled", "alertRules"] + prefix: StrictStr = Field(description="a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "enabled", "monitors", "includeCoveredPrefixes", "usePublicBgp", "alertsEnabled", "alertRules", "prefix"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +71,7 @@ class BgpTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BgpTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -97,21 +96,23 @@ class BgpTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -148,7 +149,7 @@ class BgpTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BgpTest from a dict""" if obj is None: return None @@ -167,15 +168,16 @@ class BgpTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "prefix": obj.get("prefix"), - "usePublicBGP": obj.get("usePublicBGP"), + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "alertsEnabled": obj.get("alertsEnabled"), - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "prefix": obj.get("prefix") }) return _obj diff --git a/tests/tests/models/bgp_tests.py b/tests/tests/models/bgp_tests.py new file mode 100644 index 00000000..83d6f251 --- /dev/null +++ b/tests/tests/models/bgp_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_bgp_test import UnexpandedBgpTest +from typing import Optional, Set +from typing_extensions import Self + +class BgpTests(BaseModel): + """ + BgpTests + """ # noqa: E501 + tests: Optional[List[UnexpandedBgpTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BgpTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BgpTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedBgpTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/cloud_enterprise_agent_type.py b/tests/tests/models/cloud_enterprise_agent_type.py new file mode 100644 index 00000000..2772c493 --- /dev/null +++ b/tests/tests/models/cloud_enterprise_agent_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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/tests/tests/models/dns_query_class.py b/tests/tests/models/dns_query_class.py new file mode 100644 index 00000000..24ef04ab --- /dev/null +++ b/tests/tests/models/dns_query_class.py @@ -0,0 +1,37 @@ +# 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.2 + 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 DnsQueryClass(str, Enum): + """ + Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. + """ + + """ + allowed enum values + """ + IN = 'in' + CH = 'ch' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DnsQueryClass from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/dns_sec_instant_test.py b/tests/tests/models/dns_sec_instant_test.py new file mode 100644 index 00000000..fcb42dcd --- /dev/null +++ b/tests/tests/models/dns_sec_instant_test.py @@ -0,0 +1,169 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.agent import Agent +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class DnsSecInstantTest(BaseModel): + """ + DnsSecInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsSecInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 DnsSecInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/dns_sec_properties.py b/tests/tests/models/dns_sec_properties.py new file mode 100644 index 00000000..d9092f1f --- /dev/null +++ b/tests/tests/models/dns_sec_properties.py @@ -0,0 +1,94 @@ +# 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.2 + 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 tests.models.dns_query_class import DnsQueryClass +from typing import Optional, Set +from typing_extensions import Self + +class DnsSecProperties(BaseModel): + """ + DnsSecProperties + """ # noqa: E501 + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["domain", "dnsQueryClass", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsSecProperties 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([ + "type", + ]) + + _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 DnsSecProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/dns_sec_test.py b/tests/tests/models/dns_sec_test.py similarity index 77% rename from tests_api/tests_api/models/dns_sec_test.py rename to tests/tests/models/dns_sec_test.py index 14b6210d..0b750964 100644 --- a/tests_api/tests_api/models/dns_sec_test.py +++ b/tests/tests/models/dns_sec_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,20 +18,17 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_interval import TestInterval +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class DnsSecTest(BaseModel): """ @@ -54,15 +51,16 @@ class DnsSecTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "domain", "dnsQueryClass"] + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -75,7 +73,7 @@ class DnsSecTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsSecTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -100,21 +98,23 @@ class DnsSecTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -151,7 +151,7 @@ class DnsSecTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsSecTest from a dict""" if obj is None: return None @@ -163,7 +163,7 @@ class DnsSecTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -174,12 +174,12 @@ class DnsSecTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/tests/tests/models/dns_sec_tests.py b/tests/tests/models/dns_sec_tests.py new file mode 100644 index 00000000..3bf1573c --- /dev/null +++ b/tests/tests/models/dns_sec_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_dns_sec_test import UnexpandedDnsSecTest +from typing import Optional, Set +from typing_extensions import Self + +class DnsSecTests(BaseModel): + """ + DnsSecTests + """ # noqa: E501 + tests: Optional[List[UnexpandedDnsSecTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsSecTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsSecTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedDnsSecTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/dns_server_instant_test.py b/tests/tests/models/dns_server_instant_test.py new file mode 100644 index 00000000..a7e369eb --- /dev/null +++ b/tests/tests/models/dns_server_instant_test.py @@ -0,0 +1,207 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_server import TestDnsServer +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class DnsServerInstantTest(BaseModel): + """ + DnsServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + dns_servers: List[TestDnsServer] = Field(alias="dnsServers") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) + _items = [] + if self.dns_servers: + for _item in self.dns_servers: + if _item: + _items.append(_item.to_dict()) + _dict['dnsServers'] = _items + # 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 DnsServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "recursiveQueries": obj.get("recursiveQueries"), + "ipv6Policy": obj.get("ipv6Policy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/dns_server_properties.py b/tests/tests/models/dns_server_properties.py new file mode 100644 index 00000000..b1260572 --- /dev/null +++ b/tests/tests/models/dns_server_properties.py @@ -0,0 +1,132 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_server import TestDnsServer +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class DnsServerProperties(BaseModel): + """ + DnsServerProperties + """ # noqa: E501 + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + dns_servers: List[TestDnsServer] = Field(alias="dnsServers") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServerProperties 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([ + "type", + ]) + + _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 dns_servers (list) + _items = [] + if self.dns_servers: + for _item in self.dns_servers: + if _item: + _items.append(_item.to_dict()) + _dict['dnsServers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "recursiveQueries": obj.get("recursiveQueries"), + "ipv6Policy": obj.get("ipv6Policy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/dns_server_test.py b/tests/tests/models/dns_server_test.py similarity index 77% rename from tests_api/tests_api/models/dns_server_test.py rename to tests/tests/models/dns_server_test.py index 49c993bf..8ff174eb 100644 --- a/tests_api/tests_api/models/dns_server_test.py +++ b/tests/tests/models/dns_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,28 +18,25 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.monitor import Monitor -from tests_api.models.test_dns_server import TestDnsServer -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.dns_query_class import DnsQueryClass +from tests.models.monitor import Monitor +from tests.models.test_dns_server import TestDnsServer +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class DnsServerTest(BaseModel): """ @@ -62,14 +59,13 @@ class DnsServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") dns_servers: List[TestDnsServer] = Field(alias="dnsServers") dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") protocol: Optional[TestProtocol] = None @@ -77,14 +73,17 @@ class DnsServerTest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -97,7 +96,7 @@ class DnsServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -123,22 +122,24 @@ class DnsServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -165,13 +166,6 @@ class DnsServerTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items - # 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 # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) _items = [] if self.dns_servers: @@ -179,6 +173,13 @@ class DnsServerTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['dnsServers'] = _items + # 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 # override the default output from pydantic by calling `to_dict()` of each item in monitors (list) _items = [] if self.monitors: @@ -189,7 +190,7 @@ class DnsServerTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsServerTest from a dict""" if obj is None: return None @@ -201,7 +202,7 @@ class DnsServerTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -212,12 +213,11 @@ class DnsServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj.get("dnsServers")] if obj.get("dnsServers") is not None else None, + "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None, "dnsTransportProtocol": obj.get("dnsTransportProtocol"), "domain": obj.get("domain"), "mtuMeasurements": obj.get("mtuMeasurements"), @@ -230,8 +230,10 @@ class DnsServerTest(BaseModel): "ipv6Policy": obj.get("ipv6Policy"), "fixedPacketRate": obj.get("fixedPacketRate"), "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None }) return _obj diff --git a/tests/tests/models/dns_server_tests.py b/tests/tests/models/dns_server_tests.py new file mode 100644 index 00000000..a2900a1e --- /dev/null +++ b/tests/tests/models/dns_server_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_dns_server_test import UnexpandedDnsServerTest +from typing import Optional, Set +from typing_extensions import Self + +class DnsServerTests(BaseModel): + """ + DnsServerTests + """ # noqa: E501 + tests: Optional[List[UnexpandedDnsServerTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServerTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsServerTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedDnsServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/dns_servers_request.py b/tests/tests/models/dns_servers_request.py new file mode 100644 index 00000000..e363ec8f --- /dev/null +++ b/tests/tests/models/dns_servers_request.py @@ -0,0 +1,87 @@ +# 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.2 + 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 DnsServersRequest(BaseModel): + """ + DnsServersRequest + """ # noqa: E501 + dns_servers: Optional[List[StrictStr]] = Field(default=None, description="A list of DNS server FQDN.", alias="dnsServers") + __properties: ClassVar[List[str]] = ["dnsServers"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsServersRequest 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 DnsServersRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dnsServers": obj.get("dnsServers") + }) + return _obj + + diff --git a/tests/tests/models/dns_trace_instant_test.py b/tests/tests/models/dns_trace_instant_test.py new file mode 100644 index 00000000..c5a46dd7 --- /dev/null +++ b/tests/tests/models/dns_trace_instant_test.py @@ -0,0 +1,172 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.agent import Agent +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class DnsTraceInstantTest(BaseModel): + """ + DnsTraceInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsTraceInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 DnsTraceInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/dns_trace_properties.py b/tests/tests/models/dns_trace_properties.py new file mode 100644 index 00000000..e07d531d --- /dev/null +++ b/tests/tests/models/dns_trace_properties.py @@ -0,0 +1,97 @@ +# 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.2 + 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 tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from typing import Optional, Set +from typing_extensions import Self + +class DnsTraceProperties(BaseModel): + """ + DnsTraceProperties + """ # noqa: E501 + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["dnsTransportProtocol", "domain", "dnsQueryClass", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsTraceProperties 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([ + "type", + ]) + + _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 DnsTraceProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/dns_trace_test.py b/tests/tests/models/dns_trace_test.py similarity index 77% rename from tests_api/tests_api/models/dns_trace_test.py rename to tests/tests/models/dns_trace_test.py index 63f001cd..4c3f85d8 100644 --- a/tests_api/tests_api/models/dns_trace_test.py +++ b/tests/tests/models/dns_trace_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,21 +18,18 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class DnsTraceTest(BaseModel): """ @@ -55,16 +52,17 @@ class DnsTraceTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "dnsTransportProtocol", "domain", "dnsQueryClass"] + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -77,7 +75,7 @@ class DnsTraceTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DnsTraceTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -102,21 +100,23 @@ class DnsTraceTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -153,7 +153,7 @@ class DnsTraceTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DnsTraceTest from a dict""" if obj is None: return None @@ -165,7 +165,7 @@ class DnsTraceTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -176,13 +176,13 @@ class DnsTraceTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "dnsTransportProtocol": obj.get("dnsTransportProtocol"), "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/tests/tests/models/dns_trace_tests.py b/tests/tests/models/dns_trace_tests.py new file mode 100644 index 00000000..a38085b4 --- /dev/null +++ b/tests/tests/models/dns_trace_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_dns_trace_test import UnexpandedDnsTraceTest +from typing import Optional, Set +from typing_extensions import Self + +class DnsTraceTests(BaseModel): + """ + DnsTraceTests + """ # noqa: E501 + tests: Optional[List[UnexpandedDnsTraceTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DnsTraceTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DnsTraceTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedDnsTraceTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/error.py b/tests/tests/models/error.py new file mode 100644 index 00000000..29b351c3 --- /dev/null +++ b/tests/tests/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/expand.py b/tests/tests/models/expand.py new file mode 100644 index 00000000..2574c550 --- /dev/null +++ b/tests/tests/models/expand.py @@ -0,0 +1,40 @@ +# 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.2 + 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 + """ + AGENT = 'agent' + ALERT_MINUS_RULE = 'alert-rule' + MONITOR = 'monitor' + LABEL = 'label' + SHARED_MINUS_WITH_MINUS_ACCOUNT = 'shared-with-account' + + @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/tests/tests/models/ftp_server_instant_test.py b/tests/tests/models/ftp_server_instant_test.py new file mode 100644 index 00000000..80452048 --- /dev/null +++ b/tests/tests/models/ftp_server_instant_test.py @@ -0,0 +1,206 @@ +# 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.2 + 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 typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class FtpServerInstantTest(BaseModel): + """ + FtpServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") + ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") + ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") + 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") + password: StrictStr = Field(description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + request_type: FtpServerRequestType = Field(alias="requestType") + url: StrictStr = Field(description="Target for the test.") + use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") + use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") + username: StrictStr = Field(description="Username for Basic/NTLM authentication.") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FtpServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 FtpServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "downloadLimit": obj.get("downloadLimit"), + "ftpTargetTime": obj.get("ftpTargetTime"), + "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "requestType": obj.get("requestType"), + "url": obj.get("url"), + "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, + "useExplicitFtps": obj.get("useExplicitFtps"), + "username": obj.get("username"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/ftp_server_properties.py b/tests/tests/models/ftp_server_properties.py new file mode 100644 index 00000000..677e0cdc --- /dev/null +++ b/tests/tests/models/ftp_server_properties.py @@ -0,0 +1,131 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class FtpServerProperties(BaseModel): + """ + FtpServerProperties + """ # noqa: E501 + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") + ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") + ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") + 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") + password: StrictStr = Field(description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + request_type: FtpServerRequestType = Field(alias="requestType") + url: StrictStr = Field(description="Target for the test.") + use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") + use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") + username: StrictStr = Field(description="Username for Basic/NTLM authentication.") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FtpServerProperties 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([ + "type", + ]) + + _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 FtpServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "downloadLimit": obj.get("downloadLimit"), + "ftpTargetTime": obj.get("ftpTargetTime"), + "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "requestType": obj.get("requestType"), + "url": obj.get("url"), + "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, + "useExplicitFtps": obj.get("useExplicitFtps"), + "username": obj.get("username"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests/tests/models/ftp_server_request_type.py b/tests/tests/models/ftp_server_request_type.py new file mode 100644 index 00000000..cfec007b --- /dev/null +++ b/tests/tests/models/ftp_server_request_type.py @@ -0,0 +1,38 @@ +# 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.2 + 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 FtpServerRequestType(str, Enum): + """ + Set the type of activity for the test. + """ + + """ + allowed enum values + """ + DOWNLOAD = 'download' + UPLOAD = 'upload' + LIST = 'list' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FtpServerRequestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests_api/tests_api/models/ftp_server_test.py b/tests/tests/models/ftp_server_test.py similarity index 78% rename from tests_api/tests_api/models/ftp_server_test.py rename to tests/tests/models/ftp_server_test.py index a0c4603d..c041ccd5 100644 --- a/tests_api/tests_api/models/ftp_server_test.py +++ b/tests/tests/models/ftp_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,26 +18,23 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.ftp_server_request_type import FtpServerRequestType -from tests_api.models.monitor import Monitor -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.monitor import Monitor +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class FtpServerTest(BaseModel): """ @@ -60,14 +57,13 @@ class FtpServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: StrictStr = Field(description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") @@ -79,14 +75,17 @@ class FtpServerTest(BaseModel): username: StrictStr = Field(description="Username for Basic/NTLM authentication.") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -99,7 +98,7 @@ class FtpServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of FtpServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -125,22 +124,24 @@ class FtpServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -184,7 +185,7 @@ class FtpServerTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of FtpServerTest from a dict""" if obj is None: return None @@ -196,7 +197,7 @@ class FtpServerTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -207,10 +208,9 @@ class FtpServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "downloadLimit": obj.get("downloadLimit"), "ftpTargetTime": obj.get("ftpTargetTime"), @@ -229,8 +229,10 @@ class FtpServerTest(BaseModel): "username": obj.get("username"), "fixedPacketRate": obj.get("fixedPacketRate"), "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None }) return _obj diff --git a/tests/tests/models/ftp_server_tests.py b/tests/tests/models/ftp_server_tests.py new file mode 100644 index 00000000..ac265e1e --- /dev/null +++ b/tests/tests/models/ftp_server_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_ftp_server_test import UnexpandedFtpServerTest +from typing import Optional, Set +from typing_extensions import Self + +class FtpServerTests(BaseModel): + """ + FtpServerTests + """ # noqa: E501 + tests: Optional[List[UnexpandedFtpServerTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FtpServerTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FtpServerTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedFtpServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_agent_to_agent_tests200_response.py b/tests/tests/models/get_agent_to_agent_tests200_response.py new file mode 100644 index 00000000..200fd139 --- /dev/null +++ b/tests/tests/models/get_agent_to_agent_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_agent_to_agent_test import UnexpandedAgentToAgentTest +from typing import Optional, Set +from typing_extensions import Self + +class GetAgentToAgentTests200Response(BaseModel): + """ + GetAgentToAgentTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedAgentToAgentTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAgentToAgentTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetAgentToAgentTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedAgentToAgentTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_agent_to_server_tests200_response.py b/tests/tests/models/get_agent_to_server_tests200_response.py new file mode 100644 index 00000000..3f8fac50 --- /dev/null +++ b/tests/tests/models/get_agent_to_server_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_agent_to_server_test import UnexpandedAgentToServerTest +from typing import Optional, Set +from typing_extensions import Self + +class GetAgentToServerTests200Response(BaseModel): + """ + GetAgentToServerTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedAgentToServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAgentToServerTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetAgentToServerTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedAgentToServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_bgp_tests200_response.py b/tests/tests/models/get_bgp_tests200_response.py new file mode 100644 index 00000000..7f99c6df --- /dev/null +++ b/tests/tests/models/get_bgp_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_bgp_test import UnexpandedBgpTest +from typing import Optional, Set +from typing_extensions import Self + +class GetBgpTests200Response(BaseModel): + """ + GetBgpTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedBgpTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetBgpTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetBgpTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedBgpTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_dns_sec_tests200_response.py b/tests/tests/models/get_dns_sec_tests200_response.py new file mode 100644 index 00000000..364ca20d --- /dev/null +++ b/tests/tests/models/get_dns_sec_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_dns_sec_test import UnexpandedDnsSecTest +from typing import Optional, Set +from typing_extensions import Self + +class GetDnsSecTests200Response(BaseModel): + """ + GetDnsSecTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedDnsSecTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDnsSecTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetDnsSecTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedDnsSecTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_dns_server_tests200_response.py b/tests/tests/models/get_dns_server_tests200_response.py new file mode 100644 index 00000000..1f74055d --- /dev/null +++ b/tests/tests/models/get_dns_server_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_dns_server_test import UnexpandedDnsServerTest +from typing import Optional, Set +from typing_extensions import Self + +class GetDNSServerTests200Response(BaseModel): + """ + GetDNSServerTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedDnsServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDNSServerTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetDNSServerTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedDnsServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_dns_trace_tests200_response.py b/tests/tests/models/get_dns_trace_tests200_response.py new file mode 100644 index 00000000..6e09c9e8 --- /dev/null +++ b/tests/tests/models/get_dns_trace_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_dns_trace_test import UnexpandedDnsTraceTest +from typing import Optional, Set +from typing_extensions import Self + +class GetDnsTraceTests200Response(BaseModel): + """ + GetDnsTraceTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedDnsTraceTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDnsTraceTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetDnsTraceTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedDnsTraceTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_ftp_server_tests200_response.py b/tests/tests/models/get_ftp_server_tests200_response.py new file mode 100644 index 00000000..356f0822 --- /dev/null +++ b/tests/tests/models/get_ftp_server_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_ftp_server_test import UnexpandedFtpServerTest +from typing import Optional, Set +from typing_extensions import Self + +class GetFtpServerTests200Response(BaseModel): + """ + GetFtpServerTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedFtpServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetFtpServerTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetFtpServerTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedFtpServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_http_server_tests200_response.py b/tests/tests/models/get_http_server_tests200_response.py new file mode 100644 index 00000000..a0b8db90 --- /dev/null +++ b/tests/tests/models/get_http_server_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_http_server_test import UnexpandedHttpServerTest +from typing import Optional, Set +from typing_extensions import Self + +class GetHttpServerTests200Response(BaseModel): + """ + GetHttpServerTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedHttpServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetHttpServerTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetHttpServerTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedHttpServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_page_load_tests200_response.py b/tests/tests/models/get_page_load_tests200_response.py new file mode 100644 index 00000000..2bec1ffb --- /dev/null +++ b/tests/tests/models/get_page_load_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_page_load_test import UnexpandedPageLoadTest +from typing import Optional, Set +from typing_extensions import Self + +class GetPageLoadTests200Response(BaseModel): + """ + GetPageLoadTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedPageLoadTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetPageLoadTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetPageLoadTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedPageLoadTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_path_vis_interface_groups200_response.py b/tests/tests/models/get_path_vis_interface_groups200_response.py new file mode 100644 index 00000000..17e44c5c --- /dev/null +++ b/tests/tests/models/get_path_vis_interface_groups200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.interface_group import InterfaceGroup +from tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetPathVisInterfaceGroups200Response(BaseModel): + """ + GetPathVisInterfaceGroups200Response + """ # noqa: E501 + path_vis_interface_groups: Optional[List[InterfaceGroup]] = Field(default=None, alias="pathVisInterfaceGroups") + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["pathVisInterfaceGroups", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetPathVisInterfaceGroups200Response 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 path_vis_interface_groups (list) + _items = [] + if self.path_vis_interface_groups: + for _item in self.path_vis_interface_groups: + if _item: + _items.append(_item.to_dict()) + _dict['pathVisInterfaceGroups'] = _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 GetPathVisInterfaceGroups200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pathVisInterfaceGroups": [InterfaceGroup.from_dict(_item) for _item in obj["pathVisInterfaceGroups"]] if obj.get("pathVisInterfaceGroups") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_sip_server_tests200_response.py b/tests/tests/models/get_sip_server_tests200_response.py new file mode 100644 index 00000000..22a25789 --- /dev/null +++ b/tests/tests/models/get_sip_server_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_sip_server_test import UnexpandedSipServerTest +from typing import Optional, Set +from typing_extensions import Self + +class GetSipServerTests200Response(BaseModel): + """ + GetSipServerTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedSipServerTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetSipServerTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetSipServerTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedSipServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_tests200_response.py b/tests/tests/models/get_tests200_response.py new file mode 100644 index 00000000..ec263955 --- /dev/null +++ b/tests/tests/models/get_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class GetTests200Response(BaseModel): + """ + GetTests200Response + """ # noqa: E501 + tests: Optional[List[SimpleTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_voice_tests200_response.py b/tests/tests/models/get_voice_tests200_response.py new file mode 100644 index 00000000..33ae9a5e --- /dev/null +++ b/tests/tests/models/get_voice_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_voice_test import UnexpandedVoiceTest +from typing import Optional, Set +from typing_extensions import Self + +class GetVoiceTests200Response(BaseModel): + """ + GetVoiceTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedVoiceTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetVoiceTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetVoiceTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedVoiceTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/get_web_transactions_tests200_response.py b/tests/tests/models/get_web_transactions_tests200_response.py new file mode 100644 index 00000000..9c0e4554 --- /dev/null +++ b/tests/tests/models/get_web_transactions_tests200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from tests.models.unexpanded_web_transaction_test import UnexpandedWebTransactionTest +from typing import Optional, Set +from typing_extensions import Self + +class GetWebTransactionsTests200Response(BaseModel): + """ + GetWebTransactionsTests200Response + """ # noqa: E501 + tests: Optional[List[UnexpandedWebTransactionTest]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["tests", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetWebTransactionsTests200Response 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _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 GetWebTransactionsTests200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedWebTransactionTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/http_server_instant_test.py b/tests/tests/models/http_server_instant_test.py new file mode 100644 index 00000000..3f31feeb --- /dev/null +++ b/tests/tests/models/http_server_instant_test.py @@ -0,0 +1,241 @@ +# 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.2 + 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 typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class HttpServerInstantTest(BaseModel): + """ + HttpServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") + headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") + 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") + download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") + dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + 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") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + 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") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.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 HttpServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "headers": obj.get("headers"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "downloadLimit": obj.get("downloadLimit"), + "dnsOverride": obj.get("dnsOverride"), + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "postBody": obj.get("postBody"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "ipv6Policy": obj.get("ipv6Policy"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/http_server_properties.py b/tests/tests/models/http_server_properties.py new file mode 100644 index 00000000..b74c081e --- /dev/null +++ b/tests/tests/models/http_server_properties.py @@ -0,0 +1,166 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class HttpServerProperties(BaseModel): + """ + HttpServerProperties + """ # noqa: E501 + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") + headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") + 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") + download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") + dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + 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") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + 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") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpServerProperties 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([ + "ssl_version", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "headers": obj.get("headers"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "downloadLimit": obj.get("downloadLimit"), + "dnsOverride": obj.get("dnsOverride"), + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "postBody": obj.get("postBody"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "ipv6Policy": obj.get("ipv6Policy"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/http_server_test.py b/tests/tests/models/http_server_test.py similarity index 78% rename from tests_api/tests_api/models/http_server_test.py rename to tests/tests/models/http_server_test.py index 729d7244..03397352 100644 --- a/tests_api/tests_api/models/http_server_test.py +++ b/tests/tests/models/http_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,28 +18,25 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class HttpServerTest(BaseModel): """ @@ -62,7 +59,6 @@ class HttpServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") @@ -78,7 +74,7 @@ class HttpServerTest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") 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") @@ -91,17 +87,21 @@ class HttpServerTest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") 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") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "ipv6Policy", "followRedirects", "fixedPacketRate", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -114,7 +114,7 @@ class HttpServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of HttpServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -141,23 +141,25 @@ class HttpServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -184,6 +186,9 @@ class HttpServerTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -191,9 +196,6 @@ class HttpServerTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in monitors (list) _items = [] if self.monitors: @@ -204,7 +206,7 @@ class HttpServerTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of HttpServerTest from a dict""" if obj is None: return None @@ -216,7 +218,7 @@ class HttpServerTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -227,16 +229,15 @@ class HttpServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), "headers": obj.get("headers"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "downloadLimit": obj.get("downloadLimit"), "dnsOverride": obj.get("dnsOverride"), @@ -259,11 +260,14 @@ class HttpServerTest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "ipv6Policy": obj.get("ipv6Policy"), "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None }) return _obj diff --git a/tests/tests/models/http_server_tests.py b/tests/tests/models/http_server_tests.py new file mode 100644 index 00000000..a84cdc83 --- /dev/null +++ b/tests/tests/models/http_server_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_http_server_test import UnexpandedHttpServerTest +from typing import Optional, Set +from typing_extensions import Self + +class HttpServerTests(BaseModel): + """ + HttpServerTests + """ # noqa: E501 + tests: Optional[List[UnexpandedHttpServerTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HttpServerTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HttpServerTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedHttpServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/instant_test.py b/tests/tests/models/instant_test.py new file mode 100644 index 00000000..cd4dac17 --- /dev/null +++ b/tests/tests/models/instant_test.py @@ -0,0 +1,151 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_type import TestType +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class InstantTest(BaseModel): + """ + InstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstantTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "labels", + "shared_with_accounts", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None + }) + return _obj + + diff --git a/tests_api/tests_api/models/interface_group.py b/tests/tests/models/interface_group.py similarity index 80% rename from tests_api/tests_api/models/interface_group.py rename to tests/tests/models/interface_group.py index 876b9b26..e42cb1fd 100644 --- a/tests_api/tests_api/models/interface_group.py +++ b/tests/tests/models/interface_group.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class InterfaceGroup(BaseModel): """ @@ -37,10 +33,11 @@ class InterfaceGroup(BaseModel): rdns_regexes: Optional[List[StrictStr]] = Field(default=None, description="Array of RDNS Regexes associated with the interface group", alias="rdnsRegexes") __properties: ClassVar[List[str]] = ["aid", "groupId", "groupName", "ipAddresses", "rdnsRegexes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class InterfaceGroup(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of InterfaceGroup from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,19 +67,21 @@ class InterfaceGroup(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "aid", + "group_id", + "rdns_regexes", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "aid", - "group_id", - "rdns_regexes", - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of InterfaceGroup from a dict""" if obj is None: return None diff --git a/tests/tests/models/interface_groups.py b/tests/tests/models/interface_groups.py new file mode 100644 index 00000000..697cef8b --- /dev/null +++ b/tests/tests/models/interface_groups.py @@ -0,0 +1,95 @@ +# 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.2 + 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 tests.models.interface_group import InterfaceGroup +from typing import Optional, Set +from typing_extensions import Self + +class InterfaceGroups(BaseModel): + """ + InterfaceGroups + """ # noqa: E501 + path_vis_interface_groups: Optional[List[InterfaceGroup]] = Field(default=None, alias="pathVisInterfaceGroups") + __properties: ClassVar[List[str]] = ["pathVisInterfaceGroups"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InterfaceGroups 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 path_vis_interface_groups (list) + _items = [] + if self.path_vis_interface_groups: + for _item in self.path_vis_interface_groups: + if _item: + _items.append(_item.to_dict()) + _dict['pathVisInterfaceGroups'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InterfaceGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pathVisInterfaceGroups": [InterfaceGroup.from_dict(_item) for _item in obj["pathVisInterfaceGroups"]] if obj.get("pathVisInterfaceGroups") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/link.py b/tests/tests/models/link.py new file mode 100644 index 00000000..b7c4a603 --- /dev/null +++ b/tests/tests/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/monitor.py b/tests/tests/models/monitor.py new file mode 100644 index 00000000..4e3efebb --- /dev/null +++ b/tests/tests/models/monitor.py @@ -0,0 +1,102 @@ +# 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.2 + 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 tests.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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/monitor_type.py b/tests/tests/models/monitor_type.py new file mode 100644 index 00000000..54813cca --- /dev/null +++ b/tests/tests/models/monitor_type.py @@ -0,0 +1,37 @@ +# 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.2 + 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/tests_api/tests_api/models/monitors_request.py b/tests/tests/models/monitors_request.py similarity index 75% rename from tests_api/tests_api/models/monitors_request.py rename to tests/tests/models/monitors_request.py index 9bea2270..1207fde7 100644 --- a/tests_api/tests_api/models/monitors_request.py +++ b/tests/tests/models/monitors_request.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class MonitorsRequest(BaseModel): """ @@ -33,10 +29,11 @@ class MonitorsRequest(BaseModel): monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") __properties: ClassVar[List[str]] = ["monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +46,7 @@ class MonitorsRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MonitorsRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +60,18 @@ class MonitorsRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MonitorsRequest from a dict""" if obj is None: return None diff --git a/tests/tests/models/page_load_instant_test.py b/tests/tests/models/page_load_instant_test.py new file mode 100644 index 00000000..6863da19 --- /dev/null +++ b/tests/tests/models/page_load_instant_test.py @@ -0,0 +1,247 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class PageLoadInstantTest(BaseModel): + """ + PageLoadInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") + page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageLoadInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.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 PageLoadInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pageLoadTargetTime": obj.get("pageLoadTargetTime"), + "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/page_load_properties.py b/tests/tests/models/page_load_properties.py new file mode 100644 index 00000000..a2efce94 --- /dev/null +++ b/tests/tests/models/page_load_properties.py @@ -0,0 +1,172 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class PageLoadProperties(BaseModel): + """ + PageLoadProperties + """ # noqa: E501 + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") + page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageLoadProperties 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([ + "ssl_version", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PageLoadProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pageLoadTargetTime": obj.get("pageLoadTargetTime"), + "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/page_load_test.py b/tests/tests/models/page_load_test.py similarity index 77% rename from tests_api/tests_api/models/page_load_test.py rename to tests/tests/models/page_load_test.py index 41c931b2..4e921372 100644 --- a/tests_api/tests_api/models/page_load_test.py +++ b/tests/tests/models/page_load_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,30 +18,27 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_http_interval import TestHttpInterval -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_http_interval import TestHttpInterval +from tests.models.test_interval import TestInterval +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class PageLoadTest(BaseModel): """ @@ -64,12 +61,12 @@ class PageLoadTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") 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") 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") @@ -77,7 +74,7 @@ class PageLoadTest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") @@ -91,6 +88,7 @@ class PageLoadTest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") @@ -98,16 +96,19 @@ class PageLoadTest(BaseModel): browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - http_interval: TestHttpInterval = Field(alias="httpInterval") + http_interval: Optional[TestHttpInterval] = Field(default=None, alias="httpInterval") subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "bgpMeasurements", "monitors", "httpInterval", "subinterval"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -120,7 +121,7 @@ class PageLoadTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PageLoadTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -147,23 +148,25 @@ class PageLoadTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -190,6 +193,9 @@ class PageLoadTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -197,9 +203,6 @@ class PageLoadTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in monitors (list) _items = [] if self.monitors: @@ -210,7 +213,7 @@ class PageLoadTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PageLoadTest from a dict""" if obj is None: return None @@ -222,7 +225,7 @@ class PageLoadTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -233,15 +236,15 @@ class PageLoadTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "httpTargetTime": obj.get("httpTargetTime"), "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, @@ -263,6 +266,7 @@ class PageLoadTest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "blockDomains": obj.get("blockDomains"), "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, @@ -270,8 +274,10 @@ class PageLoadTest(BaseModel): "browserLanguage": obj.get("browserLanguage"), "pageLoadingStrategy": obj.get("pageLoadingStrategy"), "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, "httpInterval": obj.get("httpInterval"), "subinterval": obj.get("subinterval") }) diff --git a/tests/tests/models/page_load_tests.py b/tests/tests/models/page_load_tests.py new file mode 100644 index 00000000..1efa52ff --- /dev/null +++ b/tests/tests/models/page_load_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_page_load_test import UnexpandedPageLoadTest +from typing import Optional, Set +from typing_extensions import Self + +class PageLoadTests(BaseModel): + """ + PageLoadTests + """ # noqa: E501 + tests: Optional[List[UnexpandedPageLoadTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageLoadTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PageLoadTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedPageLoadTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/self_links.py b/tests/tests/models/self_links.py new file mode 100644 index 00000000..98716e16 --- /dev/null +++ b/tests/tests/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 tests.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/self_links_links.py b/tests/tests/models/self_links_links.py new file mode 100644 index 00000000..3183c090 --- /dev/null +++ b/tests/tests/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 tests.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/tests/tests/models/severity.py b/tests/tests/models/severity.py new file mode 100644 index 00000000..48ad3581 --- /dev/null +++ b/tests/tests/models/severity.py @@ -0,0 +1,40 @@ +# 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.2 + 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 Severity(str, Enum): + """ + The severity of the alert. + """ + + """ + allowed enum values + """ + INFO = 'info' + MAJOR = 'major' + MINOR = 'minor' + CRITICAL = 'critical' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Severity from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/simple_agent.py b/tests/tests/models/simple_agent.py new file mode 100644 index 00000000..9b69ab52 --- /dev/null +++ b/tests/tests/models/simple_agent.py @@ -0,0 +1,121 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/simple_test.py b/tests/tests/models/simple_test.py new file mode 100644 index 00000000..bb5a0215 --- /dev/null +++ b/tests/tests/models/simple_test.py @@ -0,0 +1,147 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.test_interval import TestInterval +from tests.models.test_type import TestType +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SimpleTest(BaseModel): + """ + Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SimpleTest 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SimpleTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/tests/tests/models/sip_server_instant_test.py b/tests/tests/models/sip_server_instant_test.py new file mode 100644 index 00000000..e6f16854 --- /dev/null +++ b/tests/tests/models/sip_server_instant_test.py @@ -0,0 +1,190 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTest(BaseModel): + """ + SipServerInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 SipServerInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/sip_server_instant_test_request.py b/tests/tests/models/sip_server_instant_test_request.py new file mode 100644 index 00000000..a4d2af41 --- /dev/null +++ b/tests/tests/models/sip_server_instant_test_request.py @@ -0,0 +1,196 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_sip_credentials import TestSipCredentials +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTestRequest(BaseModel): + """ + SipServerInstantTestRequest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "targetSipCredentials"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTestRequest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 + # override the default output from pydantic by calling `to_dict()` of target_sip_credentials + if self.target_sip_credentials: + _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SipServerInstantTestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/sip_server_instant_test_response.py b/tests/tests/models/sip_server_instant_test_response.py new file mode 100644 index 00000000..d5e51cae --- /dev/null +++ b/tests/tests/models/sip_server_instant_test_response.py @@ -0,0 +1,203 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.sip_test_protocol import SipTestProtocol +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerInstantTestResponse(BaseModel): + """ + SipServerInstantTestResponse + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") + protocol: Optional[SipTestProtocol] = None + sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") + user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "authUser", "password", "port", "protocol", "sipRegistrar", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerInstantTestResponse 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 SipServerInstantTestResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "authUser": obj.get("authUser"), + "password": obj.get("password"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "sipRegistrar": obj.get("sipRegistrar"), + "user": obj.get("user") + }) + return _obj + + diff --git a/tests/tests/models/sip_server_properties.py b/tests/tests/models/sip_server_properties.py new file mode 100644 index 00000000..144e4945 --- /dev/null +++ b/tests/tests/models/sip_server_properties.py @@ -0,0 +1,115 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from typing import Optional, Set +from typing_extensions import Self + +class SipServerProperties(BaseModel): + """ + SipServerProperties + """ # noqa: E501 + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerProperties 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([ + "type", + ]) + + _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 SipServerProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests/tests/models/sip_server_test.py b/tests/tests/models/sip_server_test.py new file mode 100644 index 00000000..6fb9db16 --- /dev/null +++ b/tests/tests/models/sip_server_test.py @@ -0,0 +1,236 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.sip_test_protocol import SipTestProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class SipServerTest(BaseModel): + """ + SipServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") + protocol: Optional[SipTestProtocol] = None + sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") + user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "authUser", "password", "port", "protocol", "sipRegistrar", "user", "bgpMeasurements", "usePublicBgp", "monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + "monitors", + ]) + + _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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SipServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "authUser": obj.get("authUser"), + "password": obj.get("password"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "sipRegistrar": obj.get("sipRegistrar"), + "user": obj.get("user"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/sip_server_tests.py b/tests/tests/models/sip_server_tests.py new file mode 100644 index 00000000..2bde1c98 --- /dev/null +++ b/tests/tests/models/sip_server_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_sip_server_test import UnexpandedSipServerTest +from typing import Optional, Set +from typing_extensions import Self + +class SipServerTests(BaseModel): + """ + SipServerTests + """ # noqa: E501 + tests: Optional[List[UnexpandedSipServerTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SipServerTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SipServerTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedSipServerTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/sip_test_protocol.py b/tests/tests/models/sip_test_protocol.py new file mode 100644 index 00000000..af539f7f --- /dev/null +++ b/tests/tests/models/sip_test_protocol.py @@ -0,0 +1,38 @@ +# 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.2 + 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 SipTestProtocol(str, Enum): + """ + Transport layer for SIP communication. + """ + + """ + allowed enum values + """ + TCP = 'tcp' + TLS = 'tls' + UDP = 'udp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SipTestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_auth_type.py b/tests/tests/models/test_auth_type.py new file mode 100644 index 00000000..6e055688 --- /dev/null +++ b/tests/tests/models/test_auth_type.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestAuthType(str, Enum): + """ + HTTP authentication type. + """ + + """ + allowed enum values + """ + NONE = 'none' + BASIC = 'basic' + NTLM = 'ntlm' + KERBEROS = 'kerberos' + OAUTH = 'oauth' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestAuthType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_custom_headers.py b/tests/tests/models/test_custom_headers.py new file mode 100644 index 00000000..856b8280 --- /dev/null +++ b/tests/tests/models/test_custom_headers.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestCustomHeaders(BaseModel): + """ + TestCustomHeaders + """ # noqa: E501 + root: Optional[Dict[str, StrictStr]] = Field(default=None, description="Use these HTTP headers for root server request.") + domains: Optional[Dict[str, Dict[str, StrictStr]]] = Field(default=None, description="Use these HTTP headers for the specified domains.") + all: Optional[Dict[str, StrictStr]] = Field(default=None, description="Use these HTTP headers for all domains.") + __properties: ClassVar[List[str]] = ["root", "domains", "all"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestCustomHeaders 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 TestCustomHeaders from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "root": obj.get("root"), + "domains": obj.get("domains"), + "all": obj.get("all") + }) + return _obj + + diff --git a/tests/tests/models/test_direction.py b/tests/tests/models/test_direction.py new file mode 100644 index 00000000..d54bfdd1 --- /dev/null +++ b/tests/tests/models/test_direction.py @@ -0,0 +1,38 @@ +# 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.2 + 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 TestDirection(str, Enum): + """ + Direction of the test, which affects how results are shown. + """ + + """ + allowed enum values + """ + TO_MINUS_TARGET = 'to-target' + FROM_MINUS_TARGET = 'from-target' + BIDIRECTIONAL = 'bidirectional' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_dns_server.py b/tests/tests/models/test_dns_server.py new file mode 100644 index 00000000..7384c648 --- /dev/null +++ b/tests/tests/models/test_dns_server.py @@ -0,0 +1,89 @@ +# 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.2 + 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 TestDnsServer(BaseModel): + """ + TestDnsServer + """ # noqa: E501 + server_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the DNS server.", alias="serverId") + server_name: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name (FQDN) of DNS server.", alias="serverName") + __properties: ClassVar[List[str]] = ["serverId", "serverName"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestDnsServer 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 TestDnsServer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "serverId": obj.get("serverId"), + "serverName": obj.get("serverName") + }) + return _obj + + diff --git a/tests/tests/models/test_dns_transport_protocol.py b/tests/tests/models/test_dns_transport_protocol.py new file mode 100644 index 00000000..9ee5ff04 --- /dev/null +++ b/tests/tests/models/test_dns_transport_protocol.py @@ -0,0 +1,37 @@ +# 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.2 + 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 TestDnsTransportProtocol(str, Enum): + """ + Transport protocol used for DNS requests. + """ + + """ + allowed enum values + """ + UDP = 'udp' + TCP = 'tcp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDnsTransportProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_dscp_id.py b/tests/tests/models/test_dscp_id.py new file mode 100644 index 00000000..90715f83 --- /dev/null +++ b/tests/tests/models/test_dscp_id.py @@ -0,0 +1,57 @@ +# 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.2 + 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 TestDscpId(str, Enum): + """ + DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_8 = '8' + ENUM_16 = '16' + ENUM_24 = '24' + ENUM_32 = '32' + ENUM_40 = '40' + ENUM_48 = '48' + ENUM_56 = '56' + ENUM_10 = '10' + ENUM_12 = '12' + ENUM_14 = '14' + ENUM_18 = '18' + ENUM_20 = '20' + ENUM_22 = '22' + ENUM_26 = '26' + ENUM_28 = '28' + ENUM_30 = '30' + ENUM_34 = '34' + ENUM_36 = '36' + ENUM_38 = '38' + ENUM_46 = '46' + ENUM_44 = '44' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestDscpId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_http_interval.py b/tests/tests/models/test_http_interval.py new file mode 100644 index 00000000..85cd53c1 --- /dev/null +++ b/tests/tests/models/test_http_interval.py @@ -0,0 +1,42 @@ +# 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.2 + 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 TestHttpInterval(int, Enum): + """ + HTTP test run interval. The interval between HTTP test runs in seconds cannot exceed the specified interval value and defaults to the same value as the interval if not set. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestHttpInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_interval.py b/tests/tests/models/test_interval.py new file mode 100644 index 00000000..da5c3bc6 --- /dev/null +++ b/tests/tests/models/test_interval.py @@ -0,0 +1,42 @@ +# 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.2 + 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 TestInterval(int, Enum): + """ + Interval between test runs in seconds. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_ipv6_policy.py b/tests/tests/models/test_ipv6_policy.py new file mode 100644 index 00000000..00c96cc3 --- /dev/null +++ b/tests/tests/models/test_ipv6_policy.py @@ -0,0 +1,39 @@ +# 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.2 + 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 TestIpv6Policy(str, Enum): + """ + IP version policy. Overrides the IPv6 policy configured at the agent level. + """ + + """ + allowed enum values + """ + FORCE_MINUS_IPV4 = 'force-ipv4' + PREFER_MINUS_IPV6 = 'prefer-ipv6' + FORCE_MINUS_IPV6 = 'force-ipv6' + USE_MINUS_AGENT_MINUS_POLICY = 'use-agent-policy' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestIpv6Policy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_labels_inner.py b/tests/tests/models/test_labels_inner.py new file mode 100644 index 00000000..a55cf45a --- /dev/null +++ b/tests/tests/models/test_labels_inner.py @@ -0,0 +1,91 @@ +# 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.2 + 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 TestLabelsInner(BaseModel): + """ + TestLabelsInner + """ # noqa: E501 + label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") + name: Optional[StrictStr] = Field(default=None, description="Name of the label.") + is_builtin: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltin"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestLabelsInner 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 TestLabelsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labelId": obj.get("labelId"), + "name": obj.get("name"), + "isBuiltin": obj.get("isBuiltin") + }) + return _obj + + diff --git a/tests/tests/models/test_monitors_properties.py b/tests/tests/models/test_monitors_properties.py new file mode 100644 index 00000000..6a35c25a --- /dev/null +++ b/tests/tests/models/test_monitors_properties.py @@ -0,0 +1,101 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.monitor import Monitor +from typing import Optional, Set +from typing_extensions import Self + +class TestMonitorsProperties(BaseModel): + """ + TestMonitorsProperties + """ # noqa: E501 + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + __properties: ClassVar[List[str]] = ["bgpMeasurements", "usePublicBgp", "monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestMonitorsProperties 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([ + "monitors", + ]) + + _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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestMonitorsProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/test_page_loading_strategy.py b/tests/tests/models/test_page_loading_strategy.py new file mode 100644 index 00000000..82aca5e1 --- /dev/null +++ b/tests/tests/models/test_page_loading_strategy.py @@ -0,0 +1,38 @@ +# 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.2 + 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 TestPageLoadingStrategy(str, Enum): + """ + * `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. + """ + + """ + allowed enum values + """ + NORMAL = 'normal' + EAGER = 'eager' + NONE = 'none' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestPageLoadingStrategy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_path_trace_mode.py b/tests/tests/models/test_path_trace_mode.py new file mode 100644 index 00000000..e6436028 --- /dev/null +++ b/tests/tests/models/test_path_trace_mode.py @@ -0,0 +1,37 @@ +# 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.2 + 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 TestPathTraceMode(str, Enum): + """ + Select `inSession` to perform the path trace within a TCP session. + """ + + """ + allowed enum values + """ + CLASSIC = 'classic' + IN_MINUS_SESSION = 'in-session' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestPathTraceMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_probe_mode.py b/tests/tests/models/test_probe_mode.py new file mode 100644 index 00000000..14ae2599 --- /dev/null +++ b/tests/tests/models/test_probe_mode.py @@ -0,0 +1,38 @@ +# 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.2 + 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 TestProbeMode(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to TCP. + """ + + """ + allowed enum values + """ + AUTO = 'auto' + SACK = 'sack' + SYN = 'syn' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProbeMode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_protocol.py b/tests/tests/models/test_protocol.py new file mode 100644 index 00000000..4674c866 --- /dev/null +++ b/tests/tests/models/test_protocol.py @@ -0,0 +1,37 @@ +# 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.2 + 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 TestProtocol(str, Enum): + """ + Protocol used by dependent network tests (end-to-end, path trace, PMTUD). + """ + + """ + allowed enum values + """ + TCP = 'tcp' + ICMP = 'icmp' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestProtocol from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests_api/tests_api/models/test_request.py b/tests/tests/models/test_request.py similarity index 80% rename from tests_api/tests_api/models/test_request.py rename to tests/tests/models/test_request.py index f7bfc56d..d7533e4f 100644 --- a/tests_api/tests_api/models/test_request.py +++ b/tests/tests/models/test_request.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,15 +17,11 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from typing import Optional, Set +from typing_extensions import Self class TestRequest(BaseModel): """ @@ -37,10 +33,11 @@ class TestRequest(BaseModel): agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") __properties: ClassVar[List[str]] = ["labels", "sharedWithAccounts", "alertRules", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ class TestRequest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ class TestRequest(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in agents (list) @@ -83,7 +82,7 @@ class TestRequest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestRequest from a dict""" if obj is None: return None @@ -95,7 +94,7 @@ class TestRequest(BaseModel): "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), "alertRules": obj.get("alertRules"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/tests_api/tests_api/models/test_request_all_of_agents.py b/tests/tests/models/test_request_all_of_agents.py similarity index 78% rename from tests_api/tests_api/models/test_request_all_of_agents.py rename to tests/tests/models/test_request_all_of_agents.py index 15b7e4ba..737f8d94 100644 --- a/tests_api/tests_api/models/test_request_all_of_agents.py +++ b/tests/tests/models/test_request_all_of_agents.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,14 +17,10 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TestRequestAllOfAgents(BaseModel): """ @@ -34,10 +30,11 @@ class TestRequestAllOfAgents(BaseModel): source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address from `ipAddresses` of Agent Details for interface selection (get `ipAddresses` from `/agents` endpoint)", alias="sourceIpAddress") __properties: ClassVar[List[str]] = ["agentId", "sourceIpAddress"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ class TestRequestAllOfAgents(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TestRequestAllOfAgents from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ class TestRequestAllOfAgents(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TestRequestAllOfAgents from a dict""" if obj is None: return None diff --git a/tests/tests/models/test_shared_accounts_inner.py b/tests/tests/models/test_shared_accounts_inner.py new file mode 100644 index 00000000..71517e32 --- /dev/null +++ b/tests/tests/models/test_shared_accounts_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 TestSharedAccountsInner(BaseModel): + """ + TestSharedAccountsInner + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="Account group ID.") + name: Optional[StrictStr] = Field(default=None, description="Account group name.") + __properties: ClassVar[List[str]] = ["aid", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestSharedAccountsInner 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 TestSharedAccountsInner 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"), + "name": obj.get("name") + }) + return _obj + + diff --git a/tests/tests/models/test_sip_credentials.py b/tests/tests/models/test_sip_credentials.py new file mode 100644 index 00000000..fd7d26f4 --- /dev/null +++ b/tests/tests/models/test_sip_credentials.py @@ -0,0 +1,99 @@ +# 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.2 + 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_extensions import Annotated +from tests.models.sip_test_protocol import SipTestProtocol +from typing import Optional, Set +from typing_extensions import Self + +class TestSipCredentials(BaseModel): + """ + TestSipCredentials + """ # noqa: E501 + auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") + protocol: Optional[SipTestProtocol] = None + sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") + user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") + __properties: ClassVar[List[str]] = ["authUser", "password", "port", "protocol", "sipRegistrar", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestSipCredentials 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 TestSipCredentials from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authUser": obj.get("authUser"), + "password": obj.get("password"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "sipRegistrar": obj.get("sipRegistrar"), + "user": obj.get("user") + }) + return _obj + + diff --git a/tests/tests/models/test_ssl_version_id.py b/tests/tests/models/test_ssl_version_id.py new file mode 100644 index 00000000..e98fc307 --- /dev/null +++ b/tests/tests/models/test_ssl_version_id.py @@ -0,0 +1,40 @@ +# 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.2 + 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 TestSslVersionId(str, Enum): + """ + SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. + """ + + """ + allowed enum values + """ + ENUM_0 = '0' + ENUM_3 = '3' + ENUM_4 = '4' + ENUM_5 = '5' + ENUM_6 = '6' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestSslVersionId from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_sub_interval.py b/tests/tests/models/test_sub_interval.py new file mode 100644 index 00000000..3993f034 --- /dev/null +++ b/tests/tests/models/test_sub_interval.py @@ -0,0 +1,43 @@ +# 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.2 + 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 TestSubInterval(int, Enum): + """ + Subinterval for round-robin testing (in seconds). Must be less than or equal to interval and must evenly divide interval. + """ + + """ + allowed enum values + """ + NUMBER_60 = 60 + NUMBER_120 = 120 + NUMBER_300 = 300 + NUMBER_600 = 600 + NUMBER_900 = 900 + NUMBER_1200 = 1200 + NUMBER_1800 = 1800 + NUMBER_3600 = 3600 + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestSubInterval from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/test_type.py b/tests/tests/models/test_type.py new file mode 100644 index 00000000..dcbc9f31 --- /dev/null +++ b/tests/tests/models/test_type.py @@ -0,0 +1,47 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TestType(str, Enum): + """ + This is a read only value, as test type is implicit in the test creation url. + """ + + """ + allowed enum values + """ + AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + BGP = 'bgp' + HTTP_MINUS_SERVER = 'http-server' + PAGE_MINUS_LOAD = 'page-load' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + FTP_MINUS_SERVER = 'ftp-server' + DNS_MINUS_TRACE = 'dns-trace' + DNS_MINUS_SERVER = 'dns-server' + DNSSEC = 'dnssec' + SIP_MINUS_SERVER = 'sip-server' + VOICE = 'voice' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/tests/tests/models/tests.py b/tests/tests/models/tests.py new file mode 100644 index 00000000..c4a80b64 --- /dev/null +++ b/tests/tests/models/tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.simple_test import SimpleTest +from typing import Optional, Set +from typing_extensions import Self + +class Tests(BaseModel): + """ + Tests + """ # noqa: E501 + tests: Optional[List[SimpleTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Tests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Tests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [SimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/unauthorized_error.py b/tests/tests/models/unauthorized_error.py new file mode 100644 index 00000000..68bd6699 --- /dev/null +++ b/tests/tests/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/tests/tests/models/unexpanded_agent_to_agent_test.py b/tests/tests/models/unexpanded_agent_to_agent_test.py new file mode 100644 index 00000000..c4fef03c --- /dev/null +++ b/tests/tests/models/unexpanded_agent_to_agent_test.py @@ -0,0 +1,172 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.test_direction import TestDirection +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedAgentToAgentTest(BaseModel): + """ + UnexpandedAgentToAgentTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + direction: Optional[TestDirection] = None + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + protocol: Optional[AgentToAgentTestProtocol] = None + target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") + throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") + throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") + throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedAgentToAgentTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "dscp", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedAgentToAgentTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "direction": obj.get("direction"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "mss": obj.get("mss"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "targetAgentId": obj.get("targetAgentId"), + "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, + "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, + "throughputRate": obj.get("throughputRate"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_agent_to_server_test.py b/tests/tests/models/unexpanded_agent_to_server_test.py new file mode 100644 index 00000000..379801ce --- /dev/null +++ b/tests/tests/models/unexpanded_agent_to_server_test.py @@ -0,0 +1,177 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedAgentToServerTest(BaseModel): + """ + UnexpandedAgentToServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") + mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + server: StrictStr = Field(description="Target name or IP address.") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") + network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedAgentToServerTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "dscp", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedAgentToServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "continuousMode": obj.get("continuousMode"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "server": obj.get("server"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "ipv6Policy": obj.get("ipv6Policy"), + "pingPayloadSize": obj.get("pingPayloadSize"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_bgp_test.py b/tests/tests/models/unexpanded_bgp_test.py new file mode 100644 index 00000000..4c74f11a --- /dev/null +++ b/tests/tests/models/unexpanded_bgp_test.py @@ -0,0 +1,138 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedBgpTest(BaseModel): + """ + UnexpandedBgpTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Indicate if queries for subprefixes detected under this prefix should included.", alias="includeCoveredPrefixes") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + prefix: StrictStr = Field(description="a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "enabled", "includeCoveredPrefixes", "usePublicBgp", "alertsEnabled", "prefix"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedBgpTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedBgpTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "alertsEnabled": obj.get("alertsEnabled"), + "prefix": obj.get("prefix") + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_dns_sec_test.py b/tests/tests/models/unexpanded_dns_sec_test.py new file mode 100644 index 00000000..80910e92 --- /dev/null +++ b/tests/tests/models/unexpanded_dns_sec_test.py @@ -0,0 +1,140 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_interval import TestInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedDnsSecTest(BaseModel): + """ + UnexpandedDnsSecTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "domain", "dnsQueryClass"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedDnsSecTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedDnsSecTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass") + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_dns_server_test.py b/tests/tests/models/unexpanded_dns_server_test.py new file mode 100644 index 00000000..af27bcec --- /dev/null +++ b/tests/tests/models/unexpanded_dns_server_test.py @@ -0,0 +1,182 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_server import TestDnsServer +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedDnsServerTest(BaseModel): + """ + UnexpandedDnsServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + dns_servers: List[TestDnsServer] = Field(alias="dnsServers") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + 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") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedDnsServerTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 dns_servers (list) + _items = [] + if self.dns_servers: + for _item in self.dns_servers: + if _item: + _items.append(_item.to_dict()) + _dict['dnsServers'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedDnsServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj["dnsServers"]] if obj.get("dnsServers") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "recursiveQueries": obj.get("recursiveQueries"), + "ipv6Policy": obj.get("ipv6Policy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "dnsQueryClass": obj.get("dnsQueryClass"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_dns_trace_test.py b/tests/tests/models/unexpanded_dns_trace_test.py new file mode 100644 index 00000000..24b0570f --- /dev/null +++ b/tests/tests/models/unexpanded_dns_trace_test.py @@ -0,0 +1,143 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_interval import TestInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedDnsTraceTest(BaseModel): + """ + UnexpandedDnsTraceTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") + domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") + dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "dnsTransportProtocol", "domain", "dnsQueryClass"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedDnsTraceTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedDnsTraceTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "dnsTransportProtocol": obj.get("dnsTransportProtocol"), + "domain": obj.get("domain"), + "dnsQueryClass": obj.get("dnsQueryClass") + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_ftp_server_test.py b/tests/tests/models/unexpanded_ftp_server_test.py new file mode 100644 index 00000000..ec6575c5 --- /dev/null +++ b/tests/tests/models/unexpanded_ftp_server_test.py @@ -0,0 +1,181 @@ +# 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.2 + 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 typing_extensions import Annotated +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedFtpServerTest(BaseModel): + """ + UnexpandedFtpServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") + ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") + ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") + 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") + password: StrictStr = Field(description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + request_type: FtpServerRequestType = Field(alias="requestType") + url: StrictStr = Field(description="Target for the test.") + use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") + use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") + username: StrictStr = Field(description="Username for Basic/NTLM authentication.") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedFtpServerTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedFtpServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "downloadLimit": obj.get("downloadLimit"), + "ftpTargetTime": obj.get("ftpTargetTime"), + "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "requestType": obj.get("requestType"), + "url": obj.get("url"), + "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, + "useExplicitFtps": obj.get("useExplicitFtps"), + "username": obj.get("username"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_http_server_test.py b/tests/tests/models/unexpanded_http_server_test.py new file mode 100644 index 00000000..0bbddd61 --- /dev/null +++ b/tests/tests/models/unexpanded_http_server_test.py @@ -0,0 +1,216 @@ +# 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.2 + 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 typing_extensions import Annotated +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedHttpServerTest(BaseModel): + """ + UnexpandedHttpServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") + headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") + 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") + download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") + dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + 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") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + 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") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedHttpServerTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedHttpServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "headers": obj.get("headers"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "downloadLimit": obj.get("downloadLimit"), + "dnsOverride": obj.get("dnsOverride"), + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "postBody": obj.get("postBody"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "ipv6Policy": obj.get("ipv6Policy"), + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "fixedPacketRate": obj.get("fixedPacketRate"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_instant_test.py b/tests/tests/models/unexpanded_instant_test.py new file mode 100644 index 00000000..57ced772 --- /dev/null +++ b/tests/tests/models/unexpanded_instant_test.py @@ -0,0 +1,127 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.test_type import TestType +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedInstantTest(BaseModel): + """ + UnexpandedInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") + type: Optional[TestType] = None + links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_instant_test_links.py b/tests/tests/models/unexpanded_instant_test_links.py new file mode 100644 index 00000000..0ed1950f --- /dev/null +++ b/tests/tests/models/unexpanded_instant_test_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 tests.models.link import Link +from tests.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedInstantTestLinks(BaseModel): + """ + A list of links that can be accessed to get more information + """ # noqa: E501 + var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") + test_results: Optional[List[Link]] = Field(default=None, description="Reference to the test results.", alias="testResults") + __properties: ClassVar[List[str]] = ["self", "testResults"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinks 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() + # override the default output from pydantic by calling `to_dict()` of each item in test_results (list) + _items = [] + if self.test_results: + for _item in self.test_results: + if _item: + _items.append(_item.to_dict()) + _dict['testResults'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": UnexpandedInstantTestLinksSelf.from_dict(obj["self"]) if obj.get("self") is not None else None, + "testResults": [Link.from_dict(_item) for _item in obj["testResults"]] if obj.get("testResults") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_instant_test_links_self.py b/tests/tests/models/unexpanded_instant_test_links_self.py new file mode 100644 index 00000000..d3c64fd4 --- /dev/null +++ b/tests/tests/models/unexpanded_instant_test_links_self.py @@ -0,0 +1,101 @@ +# 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.2 + 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 UnexpandedInstantTestLinksSelf(BaseModel): + """ + UnexpandedInstantTestLinksSelf + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedInstantTestLinksSelf 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 UnexpandedInstantTestLinksSelf 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/tests/tests/models/unexpanded_page_load_test.py b/tests/tests/models/unexpanded_page_load_test.py new file mode 100644 index 00000000..40dfc856 --- /dev/null +++ b/tests/tests/models/unexpanded_page_load_test.py @@ -0,0 +1,228 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_http_interval import TestHttpInterval +from tests.models.test_interval import TestInterval +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedPageLoadTest(BaseModel): + """ + UnexpandedPageLoadTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") + page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + http_interval: Optional[TestHttpInterval] = Field(default=None, alias="httpInterval") + subinterval: Optional[TestSubInterval] = None + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "httpInterval", "subinterval", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedPageLoadTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedPageLoadTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "pageLoadTargetTime": obj.get("pageLoadTargetTime"), + "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "httpInterval": obj.get("httpInterval"), + "subinterval": obj.get("subinterval"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_sip_server_test.py b/tests/tests/models/unexpanded_sip_server_test.py new file mode 100644 index 00000000..15eba448 --- /dev/null +++ b/tests/tests/models/unexpanded_sip_server_test.py @@ -0,0 +1,178 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.sip_test_protocol import SipTestProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedSipServerTest(BaseModel): + """ + UnexpandedSipServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") + protocol: Optional[SipTestProtocol] = None + sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") + user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "authUser", "password", "port", "protocol", "sipRegistrar", "user", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedSipServerTest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedSipServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "authUser": obj.get("authUser"), + "password": obj.get("password"), + "port": obj.get("port") if obj.get("port") is not None else 49153, + "protocol": obj.get("protocol"), + "sipRegistrar": obj.get("sipRegistrar"), + "user": obj.get("user"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_test.py b/tests/tests/models/unexpanded_test.py new file mode 100644 index 00000000..2daec718 --- /dev/null +++ b/tests/tests/models/unexpanded_test.py @@ -0,0 +1,92 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.test_interval import TestInterval +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedTest(BaseModel): + """ + UnexpandedTest + """ # noqa: E501 + interval: Optional[TestInterval] = None + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedTest 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 UnexpandedTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_voice_test.py b/tests/tests/models/unexpanded_voice_test.py new file mode 100644 index 00000000..c5d7a44a --- /dev/null +++ b/tests/tests/models/unexpanded_voice_test.py @@ -0,0 +1,163 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedVoiceTest(BaseModel): + """ + UnexpandedVoiceTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedVoiceTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "codec", + "dscp", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UnexpandedVoiceTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests/tests/models/unexpanded_web_transaction_test.py b/tests/tests/models/unexpanded_web_transaction_test.py new file mode 100644 index 00000000..8450c8da --- /dev/null +++ b/tests/tests/models/unexpanded_web_transaction_test.py @@ -0,0 +1,227 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_interval import TestInterval +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UnexpandedWebTransactionTest(BaseModel): + """ + UnexpandedWebTransactionTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") + time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") + transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + subinterval: Optional[TestSubInterval] = None + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "subinterval", "bgpMeasurements", "usePublicBgp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnexpandedWebTransactionTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnexpandedWebTransactionTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "targetTime": obj.get("targetTime"), + "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, + "transactionScript": obj.get("transactionScript"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "subinterval": obj.get("subinterval"), + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True + }) + return _obj + + diff --git a/tests_api/tests_api/models/update_agent_to_agent_test.py b/tests/tests/models/update_agent_to_agent_test.py similarity index 79% rename from tests_api/tests_api/models/update_agent_to_agent_test.py rename to tests/tests/models/update_agent_to_agent_test.py index 561425c9..49cd6eb6 100644 --- a/tests_api/tests_api/models/update_agent_to_agent_test.py +++ b/tests/tests/models/update_agent_to_agent_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,21 +18,18 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from tests_api.models.test_direction import TestDirection -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol +from tests.models.test_direction import TestDirection +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateAgentToAgentTest(BaseModel): """ @@ -55,12 +52,11 @@ class UpdateAgentToAgentTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") direction: Optional[TestDirection] = None dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") protocol: Optional[AgentToAgentTestProtocol] = None @@ -69,14 +65,17 @@ class UpdateAgentToAgentTest(BaseModel): throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -89,7 +88,7 @@ class UpdateAgentToAgentTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateAgentToAgentTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -112,19 +111,21 @@ class UpdateAgentToAgentTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "dscp", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "dscp", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -140,7 +141,7 @@ class UpdateAgentToAgentTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateAgentToAgentTest from a dict""" if obj is None: return None @@ -163,10 +164,9 @@ class UpdateAgentToAgentTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "direction": obj.get("direction"), "dscp": obj.get("dscp"), "dscpId": obj.get("dscpId"), @@ -180,7 +180,9 @@ class UpdateAgentToAgentTest(BaseModel): "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, "throughputRate": obj.get("throughputRate"), "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors") }) return _obj diff --git a/tests_api/tests_api/models/update_agent_to_server_test.py b/tests/tests/models/update_agent_to_server_test.py similarity index 80% rename from tests_api/tests_api/models/update_agent_to_server_test.py rename to tests/tests/models/update_agent_to_server_test.py index a1cccf99..a8de48bd 100644 --- a/tests_api/tests_api/models/update_agent_to_server_test.py +++ b/tests/tests/models/update_agent_to_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,22 +18,19 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateAgentToServerTest(BaseModel): """ @@ -56,12 +53,11 @@ class UpdateAgentToServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") @@ -72,14 +68,17 @@ class UpdateAgentToServerTest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -92,7 +91,7 @@ class UpdateAgentToServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateAgentToServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,19 +114,21 @@ class UpdateAgentToServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "dscp", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "dscp", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -143,7 +144,7 @@ class UpdateAgentToServerTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateAgentToServerTest from a dict""" if obj is None: return None @@ -166,10 +167,9 @@ class UpdateAgentToServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "continuousMode": obj.get("continuousMode"), "fixedPacketRate": obj.get("fixedPacketRate"), @@ -185,7 +185,9 @@ class UpdateAgentToServerTest(BaseModel): "ipv6Policy": obj.get("ipv6Policy"), "pingPayloadSize": obj.get("pingPayloadSize"), "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors") }) return _obj diff --git a/tests_api/tests_api/models/update_bgp_test.py b/tests/tests/models/update_bgp_test.py similarity index 78% rename from tests_api/tests_api/models/update_bgp_test.py rename to tests/tests/models/update_bgp_test.py index 25b3d15e..f83813de 100644 --- a/tests_api/tests_api/models/update_bgp_test.py +++ b/tests/tests/models/update_bgp_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,14 +18,11 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateBgpTest(BaseModel): """ @@ -44,18 +41,20 @@ class UpdateBgpTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Indicate if queries for subprefixes detected under this prefix should included.", alias="includeCoveredPrefixes") - prefix: StrictStr = Field(description="a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24.") - use_public_bgp: Optional[StrictBool] = Field(default=None, description="Indicate if all available public BGP monitors should be used.", alias="usePublicBGP") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "monitors", "includeCoveredPrefixes", "prefix", "usePublicBGP", "alertsEnabled", "alertRules"] + prefix: StrictStr = Field(description="a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "enabled", "monitors", "includeCoveredPrefixes", "usePublicBgp", "alertsEnabled", "alertRules", "prefix"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +67,7 @@ class UpdateBgpTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateBgpTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -90,18 +89,20 @@ class UpdateBgpTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -110,7 +111,7 @@ class UpdateBgpTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateBgpTest from a dict""" if obj is None: return None @@ -129,15 +130,16 @@ class UpdateBgpTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, "monitors": obj.get("monitors"), "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "prefix": obj.get("prefix"), - "usePublicBGP": obj.get("usePublicBGP"), + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "alertsEnabled": obj.get("alertsEnabled"), - "alertRules": obj.get("alertRules") + "alertRules": obj.get("alertRules"), + "prefix": obj.get("prefix") }) return _obj diff --git a/tests/tests/models/update_bgp_test_request.py b/tests/tests/models/update_bgp_test_request.py new file mode 100644 index 00000000..87cfed4c --- /dev/null +++ b/tests/tests/models/update_bgp_test_request.py @@ -0,0 +1,144 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UpdateBgpTestRequest(BaseModel): + """ + UpdateBgpTestRequest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = 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") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") + include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Indicate if queries for subprefixes detected under this prefix should included.", alias="includeCoveredPrefixes") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "enabled", "monitors", "includeCoveredPrefixes", "usePublicBgp", "alertsEnabled", "alertRules"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateBgpTestRequest 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([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 UpdateBgpTestRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": obj.get("labels"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "monitors": obj.get("monitors"), + "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "alertsEnabled": obj.get("alertsEnabled"), + "alertRules": obj.get("alertRules") + }) + return _obj + + diff --git a/tests_api/tests_api/models/update_dns_sec_test.py b/tests/tests/models/update_dns_sec_test.py similarity index 80% rename from tests_api/tests_api/models/update_dns_sec_test.py rename to tests/tests/models/update_dns_sec_test.py index 96c0bb17..85d49ff5 100644 --- a/tests_api/tests_api/models/update_dns_sec_test.py +++ b/tests/tests/models/update_dns_sec_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,17 +18,14 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_interval import TestInterval +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateDnsSecTest(BaseModel): """ @@ -51,15 +48,16 @@ class UpdateDnsSecTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "domain", "dnsQueryClass"] + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "domain", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +70,7 @@ class UpdateDnsSecTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateDnsSecTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -94,18 +92,20 @@ class UpdateDnsSecTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -121,7 +121,7 @@ class UpdateDnsSecTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateDnsSecTest from a dict""" if obj is None: return None @@ -144,12 +144,12 @@ class UpdateDnsSecTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/tests_api/tests_api/models/update_dns_server_test.py b/tests/tests/models/update_dns_server_test.py similarity index 77% rename from tests_api/tests_api/models/update_dns_server_test.py rename to tests/tests/models/update_dns_server_test.py index 7c232917..9d851b5c 100644 --- a/tests_api/tests_api/models/update_dns_server_test.py +++ b/tests/tests/models/update_dns_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,24 +18,20 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_dns_server import TestDnsServer -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateDnsServerTest(BaseModel): """ @@ -58,14 +54,13 @@ class UpdateDnsServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - dns_servers: List[TestDnsServer] = Field(alias="dnsServers") + dns_servers: List[StrictStr] = Field(description="A list of DNS server FQDN.", alias="dnsServers") dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") protocol: Optional[TestProtocol] = None @@ -73,14 +68,17 @@ class UpdateDnsServerTest(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -93,7 +91,7 @@ class UpdateDnsServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateDnsServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -115,18 +113,20 @@ class UpdateDnsServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -139,17 +139,10 @@ class UpdateDnsServerTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) - _items = [] - if self.dns_servers: - for _item in self.dns_servers: - if _item: - _items.append(_item.to_dict()) - _dict['dnsServers'] = _items return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateDnsServerTest from a dict""" if obj is None: return None @@ -172,12 +165,11 @@ class UpdateDnsServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj.get("dnsServers")] if obj.get("dnsServers") is not None else None, + "dnsServers": obj.get("dnsServers"), "dnsTransportProtocol": obj.get("dnsTransportProtocol"), "domain": obj.get("domain"), "mtuMeasurements": obj.get("mtuMeasurements"), @@ -190,7 +182,9 @@ class UpdateDnsServerTest(BaseModel): "ipv6Policy": obj.get("ipv6Policy"), "fixedPacketRate": obj.get("fixedPacketRate"), "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors") }) return _obj diff --git a/tests_api/tests_api/models/update_dns_trace_test.py b/tests/tests/models/update_dns_trace_test.py similarity index 79% rename from tests_api/tests_api/models/update_dns_trace_test.py rename to tests/tests/models/update_dns_trace_test.py index 40e3ff40..e71acaf2 100644 --- a/tests_api/tests_api/models/update_dns_trace_test.py +++ b/tests/tests/models/update_dns_trace_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,18 +18,15 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.dns_query_class import DnsQueryClass +from tests.models.test_dns_transport_protocol import TestDnsTransportProtocol +from tests.models.test_interval import TestInterval +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateDnsTraceTest(BaseModel): """ @@ -52,16 +49,17 @@ class UpdateDnsTraceTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "dnsTransportProtocol", "domain", "dnsQueryClass"] + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "agents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -74,7 +72,7 @@ class UpdateDnsTraceTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateDnsTraceTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -96,18 +94,20 @@ class UpdateDnsTraceTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -123,7 +123,7 @@ class UpdateDnsTraceTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateDnsTraceTest from a dict""" if obj is None: return None @@ -146,13 +146,13 @@ class UpdateDnsTraceTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "dnsTransportProtocol": obj.get("dnsTransportProtocol"), "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") + "dnsQueryClass": obj.get("dnsQueryClass"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/tests_api/tests_api/models/update_ftp_server_test.py b/tests/tests/models/update_ftp_server_test.py similarity index 80% rename from tests_api/tests_api/models/update_ftp_server_test.py rename to tests/tests/models/update_ftp_server_test.py index 8ab5e75f..69fa41b7 100644 --- a/tests_api/tests_api/models/update_ftp_server_test.py +++ b/tests/tests/models/update_ftp_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,22 +18,19 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.ftp_server_request_type import FtpServerRequestType -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.ftp_server_request_type import FtpServerRequestType +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateFtpServerTest(BaseModel): """ @@ -56,14 +53,13 @@ class UpdateFtpServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: StrictStr = Field(description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") @@ -75,14 +71,17 @@ class UpdateFtpServerTest(BaseModel): username: StrictStr = Field(description="Username for Basic/NTLM authentication.") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -95,7 +94,7 @@ class UpdateFtpServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateFtpServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -117,18 +116,20 @@ class UpdateFtpServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of links @@ -144,7 +145,7 @@ class UpdateFtpServerTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateFtpServerTest from a dict""" if obj is None: return None @@ -167,10 +168,9 @@ class UpdateFtpServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "downloadLimit": obj.get("downloadLimit"), "ftpTargetTime": obj.get("ftpTargetTime"), @@ -189,7 +189,9 @@ class UpdateFtpServerTest(BaseModel): "username": obj.get("username"), "fixedPacketRate": obj.get("fixedPacketRate"), "ipv6Policy": obj.get("ipv6Policy"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors") }) return _obj diff --git a/tests_api/tests_api/models/update_http_server_test.py b/tests/tests/models/update_http_server_test.py similarity index 80% rename from tests_api/tests_api/models/update_http_server_test.py rename to tests/tests/models/update_http_server_test.py index fe28e452..be07a88d 100644 --- a/tests_api/tests_api/models/update_http_server_test.py +++ b/tests/tests/models/update_http_server_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,24 +18,21 @@ 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 pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateHttpServerTest(BaseModel): """ @@ -58,7 +55,6 @@ class UpdateHttpServerTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") @@ -74,7 +70,7 @@ class UpdateHttpServerTest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") 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") @@ -87,17 +83,21 @@ class UpdateHttpServerTest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") 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") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "ipv6Policy", "followRedirects", "fixedPacketRate", "bgpMeasurements", "monitors"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "ipv6Policy", "followRedirects", "fixedPacketRate", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -110,7 +110,7 @@ class UpdateHttpServerTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateHttpServerTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -133,24 +133,29 @@ class UpdateHttpServerTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "ssl_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -158,13 +163,10 @@ class UpdateHttpServerTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateHttpServerTest from a dict""" if obj is None: return None @@ -187,16 +189,15 @@ class UpdateHttpServerTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), "headers": obj.get("headers"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "downloadLimit": obj.get("downloadLimit"), "dnsOverride": obj.get("dnsOverride"), @@ -219,10 +220,13 @@ class UpdateHttpServerTest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "ipv6Policy": obj.get("ipv6Policy"), "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors") }) return _obj diff --git a/tests_api/tests_api/models/update_page_load_test.py b/tests/tests/models/update_page_load_test.py similarity index 78% rename from tests_api/tests_api/models/update_page_load_test.py rename to tests/tests/models/update_page_load_test.py index ae51de43..01c5e58d 100644 --- a/tests_api/tests_api/models/update_page_load_test.py +++ b/tests/tests/models/update_page_load_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,26 +18,23 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_http_interval import TestHttpInterval -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_http_interval import TestHttpInterval +from tests.models.test_interval import TestInterval +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdatePageLoadTest(BaseModel): """ @@ -60,12 +57,12 @@ class UpdatePageLoadTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") 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") 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") @@ -73,7 +70,7 @@ class UpdatePageLoadTest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") @@ -87,6 +84,7 @@ class UpdatePageLoadTest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") @@ -94,16 +92,19 @@ class UpdatePageLoadTest(BaseModel): browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") - http_interval: TestHttpInterval = Field(alias="httpInterval") + http_interval: Optional[TestHttpInterval] = Field(default=None, alias="httpInterval") subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "bgpMeasurements", "monitors", "httpInterval", "subinterval"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -116,7 +117,7 @@ class UpdatePageLoadTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdatePageLoadTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -139,24 +140,29 @@ class UpdatePageLoadTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "ssl_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -164,13 +170,10 @@ class UpdatePageLoadTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdatePageLoadTest from a dict""" if obj is None: return None @@ -193,15 +196,15 @@ class UpdatePageLoadTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "httpTargetTime": obj.get("httpTargetTime"), "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, @@ -223,6 +226,7 @@ class UpdatePageLoadTest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "blockDomains": obj.get("blockDomains"), "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, @@ -230,7 +234,9 @@ class UpdatePageLoadTest(BaseModel): "browserLanguage": obj.get("browserLanguage"), "pageLoadingStrategy": obj.get("pageLoadingStrategy"), "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors"), "httpInterval": obj.get("httpInterval"), "subinterval": obj.get("subinterval") diff --git a/tests/tests/models/update_sip_server_test.py b/tests/tests/models/update_sip_server_test.py new file mode 100644 index 00000000..be46586d --- /dev/null +++ b/tests/tests/models/update_sip_server_test.py @@ -0,0 +1,199 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.monitor import Monitor +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_sip_credentials import TestSipCredentials +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UpdateSipServerTest(BaseModel): + """ + UpdateSipServerTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = 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") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") + target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "targetSipCredentials", "bgpMeasurements", "usePublicBgp", "monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateSipServerTest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "monitors", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # override the default output from pydantic by calling `to_dict()` of target_sip_credentials + if self.target_sip_credentials: + _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateSipServerTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": obj.get("alertRules"), + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": obj.get("labels"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None, + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/update_sip_server_test1.py b/tests/tests/models/update_sip_server_test1.py new file mode 100644 index 00000000..5fd080fa --- /dev/null +++ b/tests/tests/models/update_sip_server_test1.py @@ -0,0 +1,229 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_interval import TestInterval +from tests.models.test_ipv6_policy import TestIpv6Policy +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_sip_credentials import TestSipCredentials +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UpdateSipServerTest1(BaseModel): + """ + UpdateSipServerTest1 + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + 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") + options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") + sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") + sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "agents", "targetSipCredentials", "bgpMeasurements", "usePublicBgp", "monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateSipServerTest1 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "agents", + "monitors", + ]) + + _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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 + # override the default output from pydantic by calling `to_dict()` of target_sip_credentials + if self.target_sip_credentials: + _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateSipServerTest1 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "optionsRegex": obj.get("optionsRegex"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, + "sipTargetTime": obj.get("sipTargetTime"), + "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, + "fixedPacketRate": obj.get("fixedPacketRate"), + "ipv6Policy": obj.get("ipv6Policy"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "targetSipCredentials": TestSipCredentials.from_dict(obj["targetSipCredentials"]) if obj.get("targetSipCredentials") is not None else None, + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/update_voice_test.py b/tests/tests/models/update_voice_test.py new file mode 100644 index 00000000..0e94f749 --- /dev/null +++ b/tests/tests/models/update_voice_test.py @@ -0,0 +1,191 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.monitor import Monitor +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class UpdateVoiceTest(BaseModel): + """ + UpdateVoiceTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = 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") + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateVoiceTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "codec", + "dscp", + "monitors", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateVoiceTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": obj.get("alertRules"), + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": obj.get("labels"), + "sharedWithAccounts": obj.get("sharedWithAccounts"), + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None + }) + return _obj + + diff --git a/tests_api/tests_api/models/update_web_transaction_test.py b/tests/tests/models/update_web_transaction_test.py similarity index 80% rename from tests_api/tests_api/models/update_web_transaction_test.py rename to tests/tests/models/update_web_transaction_test.py index c96c3ff3..e0d34530 100644 --- a/tests_api/tests_api/models/update_web_transaction_test.py +++ b/tests/tests/models/update_web_transaction_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,25 +18,22 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_interval import TestInterval +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_request_all_of_agents import TestRequestAllOfAgents +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class UpdateWebTransactionTest(BaseModel): """ @@ -59,12 +56,10 @@ class UpdateWebTransactionTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") 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") 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") @@ -74,14 +69,14 @@ class UpdateWebTransactionTest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") protocol: Optional[TestProtocol] = None ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds.", alias="targetTime") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") url: StrictStr = Field(description="Target for the test.") @@ -89,6 +84,7 @@ class UpdateWebTransactionTest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") @@ -96,15 +92,19 @@ class UpdateWebTransactionTest(BaseModel): browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[TestRequestAllOfAgents]] = Field(default=None, description="Contains list of object with required `agentId` and optional `sourceIpAddress`") + credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[StrictStr]] = Field(default=None, description="Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)") subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "credentials", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "bgpMeasurements", "monitors", "subinterval"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -117,7 +117,7 @@ class UpdateWebTransactionTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateWebTransactionTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -140,24 +140,29 @@ class UpdateWebTransactionTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "ssl_version", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "ssl_version", - }, + exclude=excluded_fields, exclude_none=True, ) # 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 custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -165,13 +170,10 @@ class UpdateWebTransactionTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateWebTransactionTest from a dict""" if obj is None: return None @@ -194,16 +196,14 @@ class UpdateWebTransactionTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, "labels": obj.get("labels"), "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), - "credentials": obj.get("credentials"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "httpTargetTime": obj.get("httpTargetTime"), @@ -227,6 +227,7 @@ class UpdateWebTransactionTest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "blockDomains": obj.get("blockDomains"), "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, @@ -234,7 +235,10 @@ class UpdateWebTransactionTest(BaseModel): "browserLanguage": obj.get("browserLanguage"), "pageLoadingStrategy": obj.get("pageLoadingStrategy"), "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "credentials": obj.get("credentials"), "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": obj.get("monitors"), "subinterval": obj.get("subinterval") }) diff --git a/tests/tests/models/validation_error.py b/tests/tests/models/validation_error.py new file mode 100644 index 00000000..cc61a027 --- /dev/null +++ b/tests/tests/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 tests.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/validation_error_all_of_errors.py b/tests/tests/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..93ca4d37 --- /dev/null +++ b/tests/tests/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/tests/tests/models/voice_instant_test.py b/tests/tests/models/voice_instant_test.py new file mode 100644 index 00000000..0a492872 --- /dev/null +++ b/tests/tests/models/voice_instant_test.py @@ -0,0 +1,188 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class VoiceInstantTest(BaseModel): + """ + VoiceInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "agents"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "codec", + "dscp", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 VoiceInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/voice_properties.py b/tests/tests/models/voice_properties.py new file mode 100644 index 00000000..4291940f --- /dev/null +++ b/tests/tests/models/voice_properties.py @@ -0,0 +1,113 @@ +# 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.2 + 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_extensions import Annotated +from tests.models.test_dscp_id import TestDscpId +from typing import Optional, Set +from typing_extensions import Self + +class VoiceProperties(BaseModel): + """ + VoiceProperties + """ # noqa: E501 + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceProperties 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([ + "codec", + "dscp", + "type", + ]) + + _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 VoiceProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests/tests/models/voice_test.py b/tests/tests/models/voice_test.py new file mode 100644 index 00000000..b3577b6d --- /dev/null +++ b/tests/tests/models/voice_test.py @@ -0,0 +1,221 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_dscp_id import TestDscpId +from tests.models.test_interval import TestInterval +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class VoiceTest(BaseModel): + """ + VoiceTest + """ # noqa: E501 + interval: TestInterval + alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") + enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") + alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + codec: Optional[StrictStr] = Field(default=None, description="Codec label") + codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") + dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") + dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") + duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") + jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") + 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") + port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") + target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") + monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "agents", "bgpMeasurements", "usePublicBgp", "monitors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "codec", + "dscp", + "agents", + "monitors", + ]) + + _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 alert_rules (list) + _items = [] + if self.alert_rules: + for _item in self.alert_rules: + if _item: + _items.append(_item.to_dict()) + _dict['alertRules'] = _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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # 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 + # 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interval": obj.get("interval"), + "alertsEnabled": obj.get("alertsEnabled"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "codec": obj.get("codec"), + "codecId": obj.get("codecId"), + "dscp": obj.get("dscp"), + "dscpId": obj.get("dscpId"), + "duration": obj.get("duration") if obj.get("duration") is not None else 5, + "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "port": obj.get("port"), + "targetAgentId": obj.get("targetAgentId"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/voice_tests.py b/tests/tests/models/voice_tests.py new file mode 100644 index 00000000..98ae572f --- /dev/null +++ b/tests/tests/models/voice_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_voice_test import UnexpandedVoiceTest +from typing import Optional, Set +from typing_extensions import Self + +class VoiceTests(BaseModel): + """ + VoiceTests + """ # noqa: E501 + tests: Optional[List[UnexpandedVoiceTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VoiceTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VoiceTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedVoiceTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/tests/tests/models/web_transaction_instant_test.py b/tests/tests/models/web_transaction_instant_test.py new file mode 100644 index 00000000..f49c175a --- /dev/null +++ b/tests/tests/models/web_transaction_instant_test.py @@ -0,0 +1,251 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.agent import Agent +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self + +class WebTransactionInstantTest(BaseModel): + """ + WebTransactionInstantTest + """ # noqa: E501 + created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") + created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") + description: Optional[StrictStr] = Field(default=None, description="A description of the test.") + live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") + modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") + modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") + saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") + test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") + 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") + labels: Optional[List[TestLabelsInner]] = None + shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") + time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") + transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") + __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "credentials"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebTransactionInstantTest 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. + """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # 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 labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) + _items = [] + if self.shared_with_accounts: + for _item in self.shared_with_accounts: + if _item: + _items.append(_item.to_dict()) + _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.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 WebTransactionInstantTest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdBy": obj.get("createdBy"), + "createdDate": obj.get("createdDate"), + "description": obj.get("description"), + "liveShare": obj.get("liveShare"), + "modifiedBy": obj.get("modifiedBy"), + "modifiedDate": obj.get("modifiedDate"), + "savedEvent": obj.get("savedEvent"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "type": obj.get("type"), + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "targetTime": obj.get("targetTime"), + "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, + "transactionScript": obj.get("transactionScript"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "credentials": obj.get("credentials") + }) + return _obj + + diff --git a/tests/tests/models/web_transaction_properties.py b/tests/tests/models/web_transaction_properties.py new file mode 100644 index 00000000..f1e7b16b --- /dev/null +++ b/tests/tests/models/web_transaction_properties.py @@ -0,0 +1,174 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_ssl_version_id import TestSslVersionId +from typing import Optional, Set +from typing_extensions import Self + +class WebTransactionProperties(BaseModel): + """ + WebTransactionProperties + """ # noqa: E501 + auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") + bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") + client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") + content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") + 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") + 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") + include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") + 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") + password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") + path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") + probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") + protocol: Optional[TestProtocol] = None + ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") + ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") + time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") + transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") + url: StrictStr = Field(description="Target for the test.") + use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") + user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") + username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") + verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") + block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") + disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") + allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") + allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") + browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") + page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") + fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebTransactionProperties 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([ + "ssl_version", + "type", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebTransactionProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "authType": obj.get("authType"), + "bandwidthMeasurements": obj.get("bandwidthMeasurements"), + "clientCertificate": obj.get("clientCertificate"), + "contentRegex": obj.get("contentRegex"), + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, + "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', + "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, + "httpTargetTime": obj.get("httpTargetTime"), + "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, + "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, + "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, + "mtuMeasurements": obj.get("mtuMeasurements"), + "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, + "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, + "password": obj.get("password"), + "pathTraceMode": obj.get("pathTraceMode"), + "probeMode": obj.get("probeMode"), + "protocol": obj.get("protocol"), + "sslVersion": obj.get("sslVersion"), + "sslVersionId": obj.get("sslVersionId"), + "targetTime": obj.get("targetTime"), + "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, + "transactionScript": obj.get("transactionScript"), + "url": obj.get("url"), + "useNtlm": obj.get("useNtlm"), + "userAgent": obj.get("userAgent"), + "username": obj.get("username"), + "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, + "blockDomains": obj.get("blockDomains"), + "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, + "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, + "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, + "browserLanguage": obj.get("browserLanguage"), + "pageLoadingStrategy": obj.get("pageLoadingStrategy"), + "fixedPacketRate": obj.get("fixedPacketRate"), + "type": obj.get("type") + }) + return _obj + + diff --git a/tests_api/tests_api/models/web_transaction_test.py b/tests/tests/models/web_transaction_test.py similarity index 78% rename from tests_api/tests_api/models/web_transaction_test.py rename to tests/tests/models/web_transaction_test.py index e84de61d..5369cece 100644 --- a/tests_api/tests_api/models/web_transaction_test.py +++ b/tests/tests/models/web_transaction_test.py @@ -3,9 +3,9 @@ """ Tests API - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,29 +18,26 @@ import re # noqa: F401 import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from tests.models.agent import Agent +from tests.models.alert_rule import AlertRule +from tests.models.monitor import Monitor +from tests.models.test_auth_type import TestAuthType +from tests.models.test_custom_headers import TestCustomHeaders +from tests.models.test_interval import TestInterval +from tests.models.test_labels_inner import TestLabelsInner +from tests.models.test_page_loading_strategy import TestPageLoadingStrategy +from tests.models.test_path_trace_mode import TestPathTraceMode +from tests.models.test_probe_mode import TestProbeMode +from tests.models.test_protocol import TestProtocol +from tests.models.test_shared_accounts_inner import TestSharedAccountsInner +from tests.models.test_ssl_version_id import TestSslVersionId +from tests.models.test_sub_interval import TestSubInterval +from tests.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks +from typing import Optional, Set +from typing_extensions import Self class WebTransactionTest(BaseModel): """ @@ -63,12 +60,10 @@ class WebTransactionTest(BaseModel): links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabelsInner]] = None shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") 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") 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") @@ -78,14 +73,14 @@ class WebTransactionTest(BaseModel): include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") + 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") password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") protocol: Optional[TestProtocol] = None ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds.", alias="targetTime") + target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=0)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds. (0 means default behavior)", alias="targetTime") time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") url: StrictStr = Field(description="Target for the test.") @@ -93,6 +88,7 @@ class WebTransactionTest(BaseModel): user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") + allow_unsafe_legacy_renegotiation: Optional[StrictBool] = Field(default=True, description="Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.", alias="allowUnsafeLegacyRenegotiation") block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") @@ -100,15 +96,19 @@ class WebTransactionTest(BaseModel): browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") + agents: Optional[List[Agent]] = Field(default=None, description="Contains list of agents.") + credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") + use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "credentials", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "bgpMeasurements", "monitors", "subinterval"] + __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "agents", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -121,7 +121,7 @@ class WebTransactionTest(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebTransactionTest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -148,23 +148,25 @@ class WebTransactionTest(BaseModel): * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "created_by", + "created_date", + "live_share", + "modified_by", + "modified_date", + "saved_event", + "test_id", + "type", + "labels", + "shared_with_accounts", + "ssl_version", + "agents", + "monitors", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - "monitors", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) @@ -191,6 +193,9 @@ class WebTransactionTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['sharedWithAccounts'] = _items + # override the default output from pydantic by calling `to_dict()` of custom_headers + if self.custom_headers: + _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in agents (list) _items = [] if self.agents: @@ -198,9 +203,6 @@ class WebTransactionTest(BaseModel): if _item: _items.append(_item.to_dict()) _dict['agents'] = _items - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in monitors (list) _items = [] if self.monitors: @@ -211,7 +213,7 @@ class WebTransactionTest(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebTransactionTest from a dict""" if obj is None: return None @@ -223,7 +225,7 @@ class WebTransactionTest(BaseModel): "interval": obj.get("interval"), "alertsEnabled": obj.get("alertsEnabled"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, + "alertRules": [AlertRule.from_dict(_item) for _item in obj["alertRules"]] if obj.get("alertRules") is not None else None, "createdBy": obj.get("createdBy"), "createdDate": obj.get("createdDate"), "description": obj.get("description"), @@ -234,16 +236,14 @@ class WebTransactionTest(BaseModel): "testId": obj.get("testId"), "testName": obj.get("testName"), "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, + "_links": UnexpandedInstantTestLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "labels": [TestLabelsInner.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj["sharedWithAccounts"]] if obj.get("sharedWithAccounts") is not None else None, "authType": obj.get("authType"), "bandwidthMeasurements": obj.get("bandwidthMeasurements"), "clientCertificate": obj.get("clientCertificate"), "contentRegex": obj.get("contentRegex"), - "credentials": obj.get("credentials"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, + "customHeaders": TestCustomHeaders.from_dict(obj["customHeaders"]) if obj.get("customHeaders") is not None else None, "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, "httpTargetTime": obj.get("httpTargetTime"), @@ -267,6 +267,7 @@ class WebTransactionTest(BaseModel): "userAgent": obj.get("userAgent"), "username": obj.get("username"), "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, + "allowUnsafeLegacyRenegotiation": obj.get("allowUnsafeLegacyRenegotiation") if obj.get("allowUnsafeLegacyRenegotiation") is not None else True, "blockDomains": obj.get("blockDomains"), "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, @@ -274,8 +275,11 @@ class WebTransactionTest(BaseModel): "browserLanguage": obj.get("browserLanguage"), "pageLoadingStrategy": obj.get("pageLoadingStrategy"), "fixedPacketRate": obj.get("fixedPacketRate"), + "agents": [Agent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "credentials": obj.get("credentials"), "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None, + "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, "subinterval": obj.get("subinterval") }) return _obj diff --git a/tests/tests/models/web_transaction_tests.py b/tests/tests/models/web_transaction_tests.py new file mode 100644 index 00000000..2a68cbfa --- /dev/null +++ b/tests/tests/models/web_transaction_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from tests.models.unexpanded_web_transaction_test import UnexpandedWebTransactionTest +from typing import Optional, Set +from typing_extensions import Self + +class WebTransactionTests(BaseModel): + """ + WebTransactionTests + """ # noqa: E501 + tests: Optional[List[UnexpandedWebTransactionTest]] = None + __properties: ClassVar[List[str]] = ["tests"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebTransactionTests 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 tests (list) + _items = [] + if self.tests: + for _item in self.tests: + if _item: + _items.append(_item.to_dict()) + _dict['tests'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebTransactionTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tests": [UnexpandedWebTransactionTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None + }) + return _obj + + diff --git a/usage_api/usage_api/py.typed b/tests/tests/py.typed similarity index 100% rename from usage_api/usage_api/py.typed rename to tests/tests/py.typed diff --git a/tests/tests/rest.py b/tests/tests/rest.py new file mode 100644 index 00000000..f799f1b7 --- /dev/null +++ b/tests/tests/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from tests.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/tests_api/.github/workflows/python.yml b/tests_api/.github/workflows/python.yml deleted file mode 100644 index 939fd9f1..00000000 --- a/tests_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: tests_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/tests_api/.gitlab-ci.yml b/tests_api/.gitlab-ci.yml deleted file mode 100644 index 7e659eac..00000000 --- a/tests_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=tests_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/tests_api/.openapi-generator/FILES b/tests_api/.openapi-generator/FILES deleted file mode 100644 index 0380ddb5..00000000 --- a/tests_api/.openapi-generator/FILES +++ /dev/null @@ -1,452 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/Agent.md -docs/AgentBase.md -docs/AgentToAgentApi.md -docs/AgentToAgentInstantTest.md -docs/AgentToAgentTest.md -docs/AgentToAgentTestProtocol.md -docs/AgentToAgentTests.md -docs/AgentToServerApi.md -docs/AgentToServerInstantTest.md -docs/AgentToServerTest.md -docs/AgentToServerTests.md -docs/AlertRoundsViolationMode.md -docs/AlertRule.md -docs/AlertType.md -docs/AllTestTypesApi.md -docs/BGPApi.md -docs/BaseRequest.md -docs/BaseTest.md -docs/BgpTest.md -docs/BgpTests.md -docs/CloudEnterpriseAgentType.md -docs/DNSSECApi.md -docs/DNSServerApi.md -docs/DNSTraceApi.md -docs/DnsQueryClass.md -docs/DnsSecInstantTest.md -docs/DnsSecTest.md -docs/DnsSecTests.md -docs/DnsServerInstantTest.md -docs/DnsServerTest.md -docs/DnsServerTests.md -docs/DnsTraceInstantTest.md -docs/DnsTraceTest.md -docs/DnsTraceTests.md -docs/Error.md -docs/Expand.md -docs/FTPServerApi.md -docs/FtpServerInstantTest.md -docs/FtpServerRequestType.md -docs/FtpServerTest.md -docs/FtpServerTests.md -docs/GetAgentToAgentTest200Response.md -docs/GetAgentToAgentTests200Response.md -docs/GetAgentToServerTest200Response.md -docs/GetAgentToServerTests200Response.md -docs/GetBgpTest200Response.md -docs/GetBgpTests200Response.md -docs/GetDNSServerTest200Response.md -docs/GetDNSServerTests200Response.md -docs/GetDnsSecTest200Response.md -docs/GetDnsSecTests200Response.md -docs/GetDnsTraceTest200Response.md -docs/GetDnsTraceTests200Response.md -docs/GetFtpServerTest200Response.md -docs/GetFtpServerTests200Response.md -docs/GetHttpServerTest200Response.md -docs/GetHttpServerTests200Response.md -docs/GetPageLoadTest200Response.md -docs/GetPageLoadTests200Response.md -docs/GetPathVisInterfaceGroups200Response.md -docs/GetSipServerTest200Response.md -docs/GetSipServerTests200Response.md -docs/GetTests200Response.md -docs/GetVoiceTest200Response.md -docs/GetVoiceTests200Response.md -docs/GetWebTransactionsTest200Response.md -docs/GetWebTransactionsTests200Response.md -docs/HTTPServerApi.md -docs/HttpServerInstantTest.md -docs/HttpServerTest.md -docs/HttpServerTests.md -docs/InstantTest.md -docs/InterfaceGroup.md -docs/InterfaceGroups.md -docs/Link.md -docs/MapItem.md -docs/Monitor.md -docs/MonitorType.md -docs/MonitorsRequest.md -docs/PageLoadApi.md -docs/PageLoadInstantTest.md -docs/PageLoadTest.md -docs/PageLoadTests.md -docs/PathVisualizationInterfaceGroupsApi.md -docs/SIPServerApi.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/SimpleTest.md -docs/SipServerInstantTest.md -docs/SipServerTest.md -docs/SipServerTests.md -docs/SipTestProtocol.md -docs/TestAuthType.md -docs/TestCustomHeaders.md -docs/TestCustomHeadersAll.md -docs/TestCustomHeadersRoot.md -docs/TestDirection.md -docs/TestDnsServer.md -docs/TestDnsTransportProtocol.md -docs/TestDscpId.md -docs/TestHttpInterval.md -docs/TestInterval.md -docs/TestIpv6Policy.md -docs/TestLabelsInner.md -docs/TestPageLoadingStrategy.md -docs/TestPathTraceMode.md -docs/TestProbeMode.md -docs/TestProtocol.md -docs/TestRequest.md -docs/TestRequestAllOfAgents.md -docs/TestSharedAccountsInner.md -docs/TestSipCredentials.md -docs/TestSslVersionId.md -docs/TestSubInterval.md -docs/TestType.md -docs/Tests.md -docs/UnauthorizedError.md -docs/UnexpandedInstantTest.md -docs/UnexpandedInstantTestLinks.md -docs/UnexpandedInstantTestLinksSelf.md -docs/UnexpandedInstantTestLinksTestResults.md -docs/UnexpandedTest.md -docs/UpdateAgentToAgentTest.md -docs/UpdateAgentToServerTest.md -docs/UpdateBgpTest.md -docs/UpdateDnsSecTest.md -docs/UpdateDnsServerTest.md -docs/UpdateDnsTraceTest.md -docs/UpdateFtpServerTest.md -docs/UpdateHttpServerTest.md -docs/UpdatePageLoadTest.md -docs/UpdatePathVisInterfaceGroup200Response.md -docs/UpdateSipServerTest.md -docs/UpdateVoiceTest.md -docs/UpdateWebTransactionTest.md -docs/VoiceApi.md -docs/VoiceInstantTest.md -docs/VoiceTest.md -docs/VoiceTests.md -docs/WebTransactionApi.md -docs/WebTransactionInstantTest.md -docs/WebTransactionTest.md -docs/WebTransactionTests.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_agent.py -test/test_agent_base.py -test/test_agent_to_agent_api.py -test/test_agent_to_agent_instant_test.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_api.py -test/test_agent_to_server_instant_test.py -test/test_agent_to_server_test.py -test/test_agent_to_server_tests.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_type.py -test/test_all_test_types_api.py -test/test_base_request.py -test/test_base_test.py -test/test_bgp_api.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_test.py -test/test_dns_sec_tests.py -test/test_dns_server_api.py -test/test_dns_server_instant_test.py -test/test_dns_server_test.py -test/test_dns_server_tests.py -test/test_dns_trace_api.py -test/test_dns_trace_instant_test.py -test/test_dns_trace_test.py -test/test_dns_trace_tests.py -test/test_dnssec_api.py -test/test_error.py -test/test_expand.py -test/test_ftp_server_api.py -test/test_ftp_server_instant_test.py -test/test_ftp_server_request_type.py -test/test_ftp_server_test.py -test/test_ftp_server_tests.py -test/test_get_agent_to_agent_test200_response.py -test/test_get_agent_to_agent_tests200_response.py -test/test_get_agent_to_server_test200_response.py -test/test_get_agent_to_server_tests200_response.py -test/test_get_bgp_test200_response.py -test/test_get_bgp_tests200_response.py -test/test_get_dns_sec_test200_response.py -test/test_get_dns_sec_tests200_response.py -test/test_get_dns_server_test200_response.py -test/test_get_dns_server_tests200_response.py -test/test_get_dns_trace_test200_response.py -test/test_get_dns_trace_tests200_response.py -test/test_get_ftp_server_test200_response.py -test/test_get_ftp_server_tests200_response.py -test/test_get_http_server_test200_response.py -test/test_get_http_server_tests200_response.py -test/test_get_page_load_test200_response.py -test/test_get_page_load_tests200_response.py -test/test_get_path_vis_interface_groups200_response.py -test/test_get_sip_server_test200_response.py -test/test_get_sip_server_tests200_response.py -test/test_get_tests200_response.py -test/test_get_voice_test200_response.py -test/test_get_voice_tests200_response.py -test/test_get_web_transactions_test200_response.py -test/test_get_web_transactions_tests200_response.py -test/test_http_server_api.py -test/test_http_server_instant_test.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_map_item.py -test/test_monitor.py -test/test_monitor_type.py -test/test_monitors_request.py -test/test_page_load_api.py -test/test_page_load_instant_test.py -test/test_page_load_test.py -test/test_page_load_tests.py -test/test_path_visualization_interface_groups_api.py -test/test_self_links.py -test/test_self_links_links.py -test/test_simple_test.py -test/test_sip_server_api.py -test/test_sip_server_instant_test.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_custom_headers_all.py -test/test_test_custom_headers_root.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_labels_inner.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_request_all_of_agents.py -test/test_test_shared_accounts_inner.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_instant_test.py -test/test_unexpanded_instant_test_links.py -test/test_unexpanded_instant_test_links_self.py -test/test_unexpanded_instant_test_links_test_results.py -test/test_unexpanded_test.py -test/test_update_agent_to_agent_test.py -test/test_update_agent_to_server_test.py -test/test_update_bgp_test.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_path_vis_interface_group200_response.py -test/test_update_sip_server_test.py -test/test_update_voice_test.py -test/test_update_web_transaction_test.py -test/test_voice_api.py -test/test_voice_instant_test.py -test/test_voice_test.py -test/test_voice_tests.py -test/test_web_transaction_api.py -test/test_web_transaction_instant_test.py -test/test_web_transaction_test.py -test/test_web_transaction_tests.py -tests_api/__init__.py -tests_api/api/__init__.py -tests_api/api/agent_to_agent_api.py -tests_api/api/agent_to_server_api.py -tests_api/api/all_test_types_api.py -tests_api/api/bgp_api.py -tests_api/api/dns_server_api.py -tests_api/api/dns_trace_api.py -tests_api/api/dnssec_api.py -tests_api/api/ftp_server_api.py -tests_api/api/http_server_api.py -tests_api/api/page_load_api.py -tests_api/api/path_visualization_interface_groups_api.py -tests_api/api/sip_server_api.py -tests_api/api/voice_api.py -tests_api/api/web_transaction_api.py -tests_api/api_client.py -tests_api/api_response.py -tests_api/configuration.py -tests_api/exceptions.py -tests_api/models/__init__.py -tests_api/models/agent.py -tests_api/models/agent_base.py -tests_api/models/agent_to_agent_instant_test.py -tests_api/models/agent_to_agent_test.py -tests_api/models/agent_to_agent_test_protocol.py -tests_api/models/agent_to_agent_tests.py -tests_api/models/agent_to_server_instant_test.py -tests_api/models/agent_to_server_test.py -tests_api/models/agent_to_server_tests.py -tests_api/models/alert_rounds_violation_mode.py -tests_api/models/alert_rule.py -tests_api/models/alert_type.py -tests_api/models/base_request.py -tests_api/models/base_test.py -tests_api/models/bgp_test.py -tests_api/models/bgp_tests.py -tests_api/models/cloud_enterprise_agent_type.py -tests_api/models/dns_query_class.py -tests_api/models/dns_sec_instant_test.py -tests_api/models/dns_sec_test.py -tests_api/models/dns_sec_tests.py -tests_api/models/dns_server_instant_test.py -tests_api/models/dns_server_test.py -tests_api/models/dns_server_tests.py -tests_api/models/dns_trace_instant_test.py -tests_api/models/dns_trace_test.py -tests_api/models/dns_trace_tests.py -tests_api/models/error.py -tests_api/models/expand.py -tests_api/models/ftp_server_instant_test.py -tests_api/models/ftp_server_request_type.py -tests_api/models/ftp_server_test.py -tests_api/models/ftp_server_tests.py -tests_api/models/get_agent_to_agent_test200_response.py -tests_api/models/get_agent_to_agent_tests200_response.py -tests_api/models/get_agent_to_server_test200_response.py -tests_api/models/get_agent_to_server_tests200_response.py -tests_api/models/get_bgp_test200_response.py -tests_api/models/get_bgp_tests200_response.py -tests_api/models/get_dns_sec_test200_response.py -tests_api/models/get_dns_sec_tests200_response.py -tests_api/models/get_dns_server_test200_response.py -tests_api/models/get_dns_server_tests200_response.py -tests_api/models/get_dns_trace_test200_response.py -tests_api/models/get_dns_trace_tests200_response.py -tests_api/models/get_ftp_server_test200_response.py -tests_api/models/get_ftp_server_tests200_response.py -tests_api/models/get_http_server_test200_response.py -tests_api/models/get_http_server_tests200_response.py -tests_api/models/get_page_load_test200_response.py -tests_api/models/get_page_load_tests200_response.py -tests_api/models/get_path_vis_interface_groups200_response.py -tests_api/models/get_sip_server_test200_response.py -tests_api/models/get_sip_server_tests200_response.py -tests_api/models/get_tests200_response.py -tests_api/models/get_voice_test200_response.py -tests_api/models/get_voice_tests200_response.py -tests_api/models/get_web_transactions_test200_response.py -tests_api/models/get_web_transactions_tests200_response.py -tests_api/models/http_server_instant_test.py -tests_api/models/http_server_test.py -tests_api/models/http_server_tests.py -tests_api/models/instant_test.py -tests_api/models/interface_group.py -tests_api/models/interface_groups.py -tests_api/models/link.py -tests_api/models/map_item.py -tests_api/models/monitor.py -tests_api/models/monitor_type.py -tests_api/models/monitors_request.py -tests_api/models/page_load_instant_test.py -tests_api/models/page_load_test.py -tests_api/models/page_load_tests.py -tests_api/models/self_links.py -tests_api/models/self_links_links.py -tests_api/models/simple_test.py -tests_api/models/sip_server_instant_test.py -tests_api/models/sip_server_test.py -tests_api/models/sip_server_tests.py -tests_api/models/sip_test_protocol.py -tests_api/models/test_auth_type.py -tests_api/models/test_custom_headers.py -tests_api/models/test_custom_headers_all.py -tests_api/models/test_custom_headers_root.py -tests_api/models/test_direction.py -tests_api/models/test_dns_server.py -tests_api/models/test_dns_transport_protocol.py -tests_api/models/test_dscp_id.py -tests_api/models/test_http_interval.py -tests_api/models/test_interval.py -tests_api/models/test_ipv6_policy.py -tests_api/models/test_labels_inner.py -tests_api/models/test_page_loading_strategy.py -tests_api/models/test_path_trace_mode.py -tests_api/models/test_probe_mode.py -tests_api/models/test_protocol.py -tests_api/models/test_request.py -tests_api/models/test_request_all_of_agents.py -tests_api/models/test_shared_accounts_inner.py -tests_api/models/test_sip_credentials.py -tests_api/models/test_ssl_version_id.py -tests_api/models/test_sub_interval.py -tests_api/models/test_type.py -tests_api/models/tests.py -tests_api/models/unauthorized_error.py -tests_api/models/unexpanded_instant_test.py -tests_api/models/unexpanded_instant_test_links.py -tests_api/models/unexpanded_instant_test_links_self.py -tests_api/models/unexpanded_instant_test_links_test_results.py -tests_api/models/unexpanded_test.py -tests_api/models/update_agent_to_agent_test.py -tests_api/models/update_agent_to_server_test.py -tests_api/models/update_bgp_test.py -tests_api/models/update_dns_sec_test.py -tests_api/models/update_dns_server_test.py -tests_api/models/update_dns_trace_test.py -tests_api/models/update_ftp_server_test.py -tests_api/models/update_http_server_test.py -tests_api/models/update_page_load_test.py -tests_api/models/update_path_vis_interface_group200_response.py -tests_api/models/update_sip_server_test.py -tests_api/models/update_voice_test.py -tests_api/models/update_web_transaction_test.py -tests_api/models/voice_instant_test.py -tests_api/models/voice_test.py -tests_api/models/voice_tests.py -tests_api/models/web_transaction_instant_test.py -tests_api/models/web_transaction_test.py -tests_api/models/web_transaction_tests.py -tests_api/py.typed -tests_api/rest.py -tox.ini diff --git a/tests_api/.openapi-generator/VERSION b/tests_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/tests_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/tests_api/.travis.yml b/tests_api/.travis.yml deleted file mode 100644 index df7c4097..00000000 --- a/tests_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=tests_api diff --git a/tests_api/README.md b/tests_api/README.md deleted file mode 100644 index 3d40e9f4..00000000 --- a/tests_api/README.md +++ /dev/null @@ -1,316 +0,0 @@ -# tests-api - -### Overview -This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import tests_api -``` - -### 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 tests_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToAgentApi(api_client) - update_agent_to_agent_test = tests_api.UpdateAgentToAgentTest() # UpdateAgentToAgentTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create Agent to Agent test - api_response = api_instance.create_agent_to_agent_test(update_agent_to_agent_test, aid=aid, expand=expand) - print("The response of AgentToAgentApi->create_agent_to_agent_test:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling AgentToAgentApi->create_agent_to_agent_test: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AgentToAgentApi* | [**create_agent_to_agent_test**](docs/AgentToAgentApi.md#create_agent_to_agent_test) | **POST** /v7/tests/agent-to-agent | Create Agent to Agent test -*AgentToAgentApi* | [**delete_agent_to_agent_test**](docs/AgentToAgentApi.md#delete_agent_to_agent_test) | **DELETE** /v7/tests/agent-to-agent/{testId} | Delete Agent to Agent test -*AgentToAgentApi* | [**get_agent_to_agent_test**](docs/AgentToAgentApi.md#get_agent_to_agent_test) | **GET** /v7/tests/agent-to-agent/{testId} | Get Agent to Agent test -*AgentToAgentApi* | [**get_agent_to_agent_tests**](docs/AgentToAgentApi.md#get_agent_to_agent_tests) | **GET** /v7/tests/agent-to-agent | List Agent to Agent tests -*AgentToAgentApi* | [**update_agent_to_agent_test**](docs/AgentToAgentApi.md#update_agent_to_agent_test) | **PUT** /v7/tests/agent-to-agent/{testId} | Update Agent to Agent test -*AgentToServerApi* | [**create_agent_to_server_test**](docs/AgentToServerApi.md#create_agent_to_server_test) | **POST** /v7/tests/agent-to-server | Create Agent to Server test -*AgentToServerApi* | [**delete_agent_to_server_test**](docs/AgentToServerApi.md#delete_agent_to_server_test) | **DELETE** /v7/tests/agent-to-server/{testId} | Delete Agent to Server test -*AgentToServerApi* | [**get_agent_to_server_test**](docs/AgentToServerApi.md#get_agent_to_server_test) | **GET** /v7/tests/agent-to-server/{testId} | Get Agent to Server test -*AgentToServerApi* | [**get_agent_to_server_tests**](docs/AgentToServerApi.md#get_agent_to_server_tests) | **GET** /v7/tests/agent-to-server | List Agent to Server tests -*AgentToServerApi* | [**update_agent_to_server_test**](docs/AgentToServerApi.md#update_agent_to_server_test) | **PUT** /v7/tests/agent-to-server/{testId} | Update Agent to Server test -*AllTestTypesApi* | [**get_tests**](docs/AllTestTypesApi.md#get_tests) | **GET** /v7/tests | List configured tests -*BGPApi* | [**create_bgp_test**](docs/BGPApi.md#create_bgp_test) | **POST** /v7/tests/bgp | Create BGP test -*BGPApi* | [**delete_bgp_test**](docs/BGPApi.md#delete_bgp_test) | **DELETE** /v7/tests/bgp/{testId} | Delete BGP test -*BGPApi* | [**get_bgp_test**](docs/BGPApi.md#get_bgp_test) | **GET** /v7/tests/bgp/{testId} | Get BGP test -*BGPApi* | [**get_bgp_tests**](docs/BGPApi.md#get_bgp_tests) | **GET** /v7/tests/bgp | List BGP tests -*BGPApi* | [**update_bgp_test**](docs/BGPApi.md#update_bgp_test) | **PUT** /v7/tests/bgp/{testId} | Update BGP test -*DNSSECApi* | [**create_dns_sec_test**](docs/DNSSECApi.md#create_dns_sec_test) | **POST** /v7/tests/dnssec | Create DNSSEC test -*DNSSECApi* | [**delete_dns_sec_test**](docs/DNSSECApi.md#delete_dns_sec_test) | **DELETE** /v7/tests/dnssec/{testId} | Delete DNSSEC test -*DNSSECApi* | [**get_dns_sec_test**](docs/DNSSECApi.md#get_dns_sec_test) | **GET** /v7/tests/dnssec/{testId} | Get DNSSEC test -*DNSSECApi* | [**get_dns_sec_tests**](docs/DNSSECApi.md#get_dns_sec_tests) | **GET** /v7/tests/dnssec | List DNS Sec tests -*DNSSECApi* | [**update_dns_sec_test**](docs/DNSSECApi.md#update_dns_sec_test) | **PUT** /v7/tests/dnssec/{testId} | Update DNSSEC test -*DNSServerApi* | [**create_dns_server_test**](docs/DNSServerApi.md#create_dns_server_test) | **POST** /v7/tests/dns-server | Create DNS Server test -*DNSServerApi* | [**delete_dns_server_test**](docs/DNSServerApi.md#delete_dns_server_test) | **DELETE** /v7/tests/dns-server/{testId} | Delete DNS Server test -*DNSServerApi* | [**get_dns_server_test**](docs/DNSServerApi.md#get_dns_server_test) | **GET** /v7/tests/dns-server/{testId} | Get DNS Server test -*DNSServerApi* | [**get_dns_server_tests**](docs/DNSServerApi.md#get_dns_server_tests) | **GET** /v7/tests/dns-server | List DNS Server tests -*DNSServerApi* | [**update_dns_server_test**](docs/DNSServerApi.md#update_dns_server_test) | **PUT** /v7/tests/dns-server/{testId} | Update DNS Server test -*DNSTraceApi* | [**create_dns_trace_test**](docs/DNSTraceApi.md#create_dns_trace_test) | **POST** /v7/tests/dns-trace | Create DNS Trace test -*DNSTraceApi* | [**delete_dns_trace_test**](docs/DNSTraceApi.md#delete_dns_trace_test) | **DELETE** /v7/tests/dns-trace/{testId} | Delete DNS Trace test -*DNSTraceApi* | [**get_dns_trace_test**](docs/DNSTraceApi.md#get_dns_trace_test) | **GET** /v7/tests/dns-trace/{testId} | Get DNS Trace test -*DNSTraceApi* | [**get_dns_trace_tests**](docs/DNSTraceApi.md#get_dns_trace_tests) | **GET** /v7/tests/dns-trace | List DNS Trace tests -*DNSTraceApi* | [**update_dns_trace_test**](docs/DNSTraceApi.md#update_dns_trace_test) | **PUT** /v7/tests/dns-trace/{testId} | Update DNS Trace test -*FTPServerApi* | [**create_ftp_server_test**](docs/FTPServerApi.md#create_ftp_server_test) | **POST** /v7/tests/ftp-server | Create FTP Server test -*FTPServerApi* | [**delete_ftp_server_test**](docs/FTPServerApi.md#delete_ftp_server_test) | **DELETE** /v7/tests/ftp-server/{testId} | Delete FTP Server test -*FTPServerApi* | [**get_ftp_server_test**](docs/FTPServerApi.md#get_ftp_server_test) | **GET** /v7/tests/ftp-server/{testId} | Get FTP Server test -*FTPServerApi* | [**get_ftp_server_tests**](docs/FTPServerApi.md#get_ftp_server_tests) | **GET** /v7/tests/ftp-server | List FTP Server tests -*FTPServerApi* | [**update_ftp_server_test**](docs/FTPServerApi.md#update_ftp_server_test) | **PUT** /v7/tests/ftp-server/{testId} | Update FTP Server test -*HTTPServerApi* | [**create_http_server_test**](docs/HTTPServerApi.md#create_http_server_test) | **POST** /v7/tests/http-server | Create HTTP Server test -*HTTPServerApi* | [**delete_http_server_test**](docs/HTTPServerApi.md#delete_http_server_test) | **DELETE** /v7/tests/http-server/{testId} | Delete HTTP Server test -*HTTPServerApi* | [**get_http_server_test**](docs/HTTPServerApi.md#get_http_server_test) | **GET** /v7/tests/http-server/{testId} | Get HTTP Server test -*HTTPServerApi* | [**get_http_server_tests**](docs/HTTPServerApi.md#get_http_server_tests) | **GET** /v7/tests/http-server | List HTTP Server tests -*HTTPServerApi* | [**update_http_server_test**](docs/HTTPServerApi.md#update_http_server_test) | **PUT** /v7/tests/http-server/{testId} | Update HTTP Server test -*PageLoadApi* | [**create_page_load_test**](docs/PageLoadApi.md#create_page_load_test) | **POST** /v7/tests/page-load | Create Page Load test -*PageLoadApi* | [**delete_page_load_test**](docs/PageLoadApi.md#delete_page_load_test) | **DELETE** /v7/tests/page-load/{testId} | Delete Page Load test -*PageLoadApi* | [**get_page_load_test**](docs/PageLoadApi.md#get_page_load_test) | **GET** /v7/tests/page-load/{testId} | Get Page Load test -*PageLoadApi* | [**get_page_load_tests**](docs/PageLoadApi.md#get_page_load_tests) | **GET** /v7/tests/page-load | List Page Load tests -*PageLoadApi* | [**update_page_load_test**](docs/PageLoadApi.md#update_page_load_test) | **PUT** /v7/tests/page-load/{testId} | Update Page Load test -*PathVisualizationInterfaceGroupsApi* | [**create_path_vis_interface_groups**](docs/PathVisualizationInterfaceGroupsApi.md#create_path_vis_interface_groups) | **POST** /v7/network/path-vis/interface-groups | Create interface group for path visualization -*PathVisualizationInterfaceGroupsApi* | [**delete_path_vis_interface_group**](docs/PathVisualizationInterfaceGroupsApi.md#delete_path_vis_interface_group) | **DELETE** /v7/network/path-vis/interface-groups/{interfaceGroupId} | Delete interface group -*PathVisualizationInterfaceGroupsApi* | [**get_path_vis_interface_groups**](docs/PathVisualizationInterfaceGroupsApi.md#get_path_vis_interface_groups) | **GET** /v7/network/path-vis/interface-groups | List interface groups for path visualization -*PathVisualizationInterfaceGroupsApi* | [**update_path_vis_interface_group**](docs/PathVisualizationInterfaceGroupsApi.md#update_path_vis_interface_group) | **PUT** /v7/network/path-vis/interface-groups/{interfaceGroupId} | Update interface group -*SIPServerApi* | [**create_sip_server_test**](docs/SIPServerApi.md#create_sip_server_test) | **POST** /v7/tests/sip-server | Create SIP Server test -*SIPServerApi* | [**delete_sip_server_test**](docs/SIPServerApi.md#delete_sip_server_test) | **DELETE** /v7/tests/sip-server/{testId} | Delete SIP Server test -*SIPServerApi* | [**get_sip_server_test**](docs/SIPServerApi.md#get_sip_server_test) | **GET** /v7/tests/sip-server/{testId} | Get SIP Server test -*SIPServerApi* | [**get_sip_server_tests**](docs/SIPServerApi.md#get_sip_server_tests) | **GET** /v7/tests/sip-server | List SIP Server tests -*SIPServerApi* | [**update_sip_server_test**](docs/SIPServerApi.md#update_sip_server_test) | **PUT** /v7/tests/sip-server/{testId} | Update SIP Server test -*VoiceApi* | [**create_voice_test**](docs/VoiceApi.md#create_voice_test) | **POST** /v7/tests/voice | Create Voice test -*VoiceApi* | [**delete_voice_test**](docs/VoiceApi.md#delete_voice_test) | **DELETE** /v7/tests/voice/{testId} | Delete Voice test -*VoiceApi* | [**get_voice_test**](docs/VoiceApi.md#get_voice_test) | **GET** /v7/tests/voice/{testId} | Get Voice test -*VoiceApi* | [**get_voice_tests**](docs/VoiceApi.md#get_voice_tests) | **GET** /v7/tests/voice | List Voice tests -*VoiceApi* | [**update_voice_test**](docs/VoiceApi.md#update_voice_test) | **PUT** /v7/tests/voice/{testId} | Update Voice test -*WebTransactionApi* | [**create_web_transactions_test**](docs/WebTransactionApi.md#create_web_transactions_test) | **POST** /v7/tests/web-transactions | Create Web Transactions test -*WebTransactionApi* | [**delete_web_transactions_test**](docs/WebTransactionApi.md#delete_web_transactions_test) | **DELETE** /v7/tests/web-transactions/{testId} | Delete Web Transactions test -*WebTransactionApi* | [**get_web_transactions_test**](docs/WebTransactionApi.md#get_web_transactions_test) | **GET** /v7/tests/web-transactions/{testId} | Get Web Transactions test -*WebTransactionApi* | [**get_web_transactions_tests**](docs/WebTransactionApi.md#get_web_transactions_tests) | **GET** /v7/tests/web-transactions | List Web Transactions tests -*WebTransactionApi* | [**update_web_transactions_test**](docs/WebTransactionApi.md#update_web_transactions_test) | **PUT** /v7/tests/web-transactions/{testId} | Update Web Transactions test - - -## Documentation For Models - - - [Agent](docs/Agent.md) - - [AgentBase](docs/AgentBase.md) - - [AgentToAgentInstantTest](docs/AgentToAgentInstantTest.md) - - [AgentToAgentTest](docs/AgentToAgentTest.md) - - [AgentToAgentTestProtocol](docs/AgentToAgentTestProtocol.md) - - [AgentToAgentTests](docs/AgentToAgentTests.md) - - [AgentToServerInstantTest](docs/AgentToServerInstantTest.md) - - [AgentToServerTest](docs/AgentToServerTest.md) - - [AgentToServerTests](docs/AgentToServerTests.md) - - [AlertRoundsViolationMode](docs/AlertRoundsViolationMode.md) - - [AlertRule](docs/AlertRule.md) - - [AlertType](docs/AlertType.md) - - [BaseRequest](docs/BaseRequest.md) - - [BaseTest](docs/BaseTest.md) - - [BgpTest](docs/BgpTest.md) - - [BgpTests](docs/BgpTests.md) - - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) - - [DnsQueryClass](docs/DnsQueryClass.md) - - [DnsSecInstantTest](docs/DnsSecInstantTest.md) - - [DnsSecTest](docs/DnsSecTest.md) - - [DnsSecTests](docs/DnsSecTests.md) - - [DnsServerInstantTest](docs/DnsServerInstantTest.md) - - [DnsServerTest](docs/DnsServerTest.md) - - [DnsServerTests](docs/DnsServerTests.md) - - [DnsTraceInstantTest](docs/DnsTraceInstantTest.md) - - [DnsTraceTest](docs/DnsTraceTest.md) - - [DnsTraceTests](docs/DnsTraceTests.md) - - [Error](docs/Error.md) - - [Expand](docs/Expand.md) - - [FtpServerInstantTest](docs/FtpServerInstantTest.md) - - [FtpServerRequestType](docs/FtpServerRequestType.md) - - [FtpServerTest](docs/FtpServerTest.md) - - [FtpServerTests](docs/FtpServerTests.md) - - [GetAgentToAgentTest200Response](docs/GetAgentToAgentTest200Response.md) - - [GetAgentToAgentTests200Response](docs/GetAgentToAgentTests200Response.md) - - [GetAgentToServerTest200Response](docs/GetAgentToServerTest200Response.md) - - [GetAgentToServerTests200Response](docs/GetAgentToServerTests200Response.md) - - [GetBgpTest200Response](docs/GetBgpTest200Response.md) - - [GetBgpTests200Response](docs/GetBgpTests200Response.md) - - [GetDNSServerTest200Response](docs/GetDNSServerTest200Response.md) - - [GetDNSServerTests200Response](docs/GetDNSServerTests200Response.md) - - [GetDnsSecTest200Response](docs/GetDnsSecTest200Response.md) - - [GetDnsSecTests200Response](docs/GetDnsSecTests200Response.md) - - [GetDnsTraceTest200Response](docs/GetDnsTraceTest200Response.md) - - [GetDnsTraceTests200Response](docs/GetDnsTraceTests200Response.md) - - [GetFtpServerTest200Response](docs/GetFtpServerTest200Response.md) - - [GetFtpServerTests200Response](docs/GetFtpServerTests200Response.md) - - [GetHttpServerTest200Response](docs/GetHttpServerTest200Response.md) - - [GetHttpServerTests200Response](docs/GetHttpServerTests200Response.md) - - [GetPageLoadTest200Response](docs/GetPageLoadTest200Response.md) - - [GetPageLoadTests200Response](docs/GetPageLoadTests200Response.md) - - [GetPathVisInterfaceGroups200Response](docs/GetPathVisInterfaceGroups200Response.md) - - [GetSipServerTest200Response](docs/GetSipServerTest200Response.md) - - [GetSipServerTests200Response](docs/GetSipServerTests200Response.md) - - [GetTests200Response](docs/GetTests200Response.md) - - [GetVoiceTest200Response](docs/GetVoiceTest200Response.md) - - [GetVoiceTests200Response](docs/GetVoiceTests200Response.md) - - [GetWebTransactionsTest200Response](docs/GetWebTransactionsTest200Response.md) - - [GetWebTransactionsTests200Response](docs/GetWebTransactionsTests200Response.md) - - [HttpServerInstantTest](docs/HttpServerInstantTest.md) - - [HttpServerTest](docs/HttpServerTest.md) - - [HttpServerTests](docs/HttpServerTests.md) - - [InstantTest](docs/InstantTest.md) - - [InterfaceGroup](docs/InterfaceGroup.md) - - [InterfaceGroups](docs/InterfaceGroups.md) - - [Link](docs/Link.md) - - [MapItem](docs/MapItem.md) - - [Monitor](docs/Monitor.md) - - [MonitorType](docs/MonitorType.md) - - [MonitorsRequest](docs/MonitorsRequest.md) - - [PageLoadInstantTest](docs/PageLoadInstantTest.md) - - [PageLoadTest](docs/PageLoadTest.md) - - [PageLoadTests](docs/PageLoadTests.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [SimpleTest](docs/SimpleTest.md) - - [SipServerInstantTest](docs/SipServerInstantTest.md) - - [SipServerTest](docs/SipServerTest.md) - - [SipServerTests](docs/SipServerTests.md) - - [SipTestProtocol](docs/SipTestProtocol.md) - - [TestAuthType](docs/TestAuthType.md) - - [TestCustomHeaders](docs/TestCustomHeaders.md) - - [TestCustomHeadersAll](docs/TestCustomHeadersAll.md) - - [TestCustomHeadersRoot](docs/TestCustomHeadersRoot.md) - - [TestDirection](docs/TestDirection.md) - - [TestDnsServer](docs/TestDnsServer.md) - - [TestDnsTransportProtocol](docs/TestDnsTransportProtocol.md) - - [TestDscpId](docs/TestDscpId.md) - - [TestHttpInterval](docs/TestHttpInterval.md) - - [TestInterval](docs/TestInterval.md) - - [TestIpv6Policy](docs/TestIpv6Policy.md) - - [TestLabelsInner](docs/TestLabelsInner.md) - - [TestPageLoadingStrategy](docs/TestPageLoadingStrategy.md) - - [TestPathTraceMode](docs/TestPathTraceMode.md) - - [TestProbeMode](docs/TestProbeMode.md) - - [TestProtocol](docs/TestProtocol.md) - - [TestRequest](docs/TestRequest.md) - - [TestRequestAllOfAgents](docs/TestRequestAllOfAgents.md) - - [TestSharedAccountsInner](docs/TestSharedAccountsInner.md) - - [TestSipCredentials](docs/TestSipCredentials.md) - - [TestSslVersionId](docs/TestSslVersionId.md) - - [TestSubInterval](docs/TestSubInterval.md) - - [TestType](docs/TestType.md) - - [Tests](docs/Tests.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [UnexpandedInstantTest](docs/UnexpandedInstantTest.md) - - [UnexpandedInstantTestLinks](docs/UnexpandedInstantTestLinks.md) - - [UnexpandedInstantTestLinksSelf](docs/UnexpandedInstantTestLinksSelf.md) - - [UnexpandedInstantTestLinksTestResults](docs/UnexpandedInstantTestLinksTestResults.md) - - [UnexpandedTest](docs/UnexpandedTest.md) - - [UpdateAgentToAgentTest](docs/UpdateAgentToAgentTest.md) - - [UpdateAgentToServerTest](docs/UpdateAgentToServerTest.md) - - [UpdateBgpTest](docs/UpdateBgpTest.md) - - [UpdateDnsSecTest](docs/UpdateDnsSecTest.md) - - [UpdateDnsServerTest](docs/UpdateDnsServerTest.md) - - [UpdateDnsTraceTest](docs/UpdateDnsTraceTest.md) - - [UpdateFtpServerTest](docs/UpdateFtpServerTest.md) - - [UpdateHttpServerTest](docs/UpdateHttpServerTest.md) - - [UpdatePageLoadTest](docs/UpdatePageLoadTest.md) - - [UpdatePathVisInterfaceGroup200Response](docs/UpdatePathVisInterfaceGroup200Response.md) - - [UpdateSipServerTest](docs/UpdateSipServerTest.md) - - [UpdateVoiceTest](docs/UpdateVoiceTest.md) - - [UpdateWebTransactionTest](docs/UpdateWebTransactionTest.md) - - [VoiceInstantTest](docs/VoiceInstantTest.md) - - [VoiceTest](docs/VoiceTest.md) - - [VoiceTests](docs/VoiceTests.md) - - [WebTransactionInstantTest](docs/WebTransactionInstantTest.md) - - [WebTransactionTest](docs/WebTransactionTest.md) - - [WebTransactionTests](docs/WebTransactionTests.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/tests_api/docs/Agent.md b/tests_api/docs/Agent.md deleted file mode 100644 index b4ef4534..00000000 --- a/tests_api/docs/Agent.md +++ /dev/null @@ -1,37 +0,0 @@ -# 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] -**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [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] -**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 tests_api.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_form_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/tests_api/docs/AgentBase.md b/tests_api/docs/AgentBase.md deleted file mode 100644 index 7a441cf8..00000000 --- a/tests_api/docs/AgentBase.md +++ /dev/null @@ -1,30 +0,0 @@ -# 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 tests_api.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_form_dict = agent_base.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/tests_api/docs/AgentToAgentApi.md b/tests_api/docs/AgentToAgentApi.md deleted file mode 100644 index 20ae30f3..00000000 --- a/tests_api/docs/AgentToAgentApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.AgentToAgentApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_agent_to_agent_test**](AgentToAgentApi.md#create_agent_to_agent_test) | **POST** /v7/tests/agent-to-agent | Create Agent to Agent test -[**delete_agent_to_agent_test**](AgentToAgentApi.md#delete_agent_to_agent_test) | **DELETE** /v7/tests/agent-to-agent/{testId} | Delete Agent to Agent test -[**get_agent_to_agent_test**](AgentToAgentApi.md#get_agent_to_agent_test) | **GET** /v7/tests/agent-to-agent/{testId} | Get Agent to Agent test -[**get_agent_to_agent_tests**](AgentToAgentApi.md#get_agent_to_agent_tests) | **GET** /v7/tests/agent-to-agent | List Agent to Agent tests -[**update_agent_to_agent_test**](AgentToAgentApi.md#update_agent_to_agent_test) | **PUT** /v7/tests/agent-to-agent/{testId} | Update Agent to Agent test - - -# **create_agent_to_agent_test** -> AgentToAgentTest create_agent_to_agent_test(update_agent_to_agent_test, aid=aid, expand=expand) - -Create Agent to Agent test - -Creates a new Agent to Agent test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.agent_to_agent_test import AgentToAgentTest -from tests_api.models.expand import Expand -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToAgentApi(api_client) - update_agent_to_agent_test = tests_api.UpdateAgentToAgentTest() # UpdateAgentToAgentTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create Agent to Agent test - api_response = api_instance.create_agent_to_agent_test(update_agent_to_agent_test, aid=aid, expand=expand) - print("The response of AgentToAgentApi->create_agent_to_agent_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToAgentApi->create_agent_to_agent_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_agent_to_agent_test** | [**UpdateAgentToAgentTest**](UpdateAgentToAgentTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**AgentToAgentTest**](AgentToAgentTest.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 | - | -**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) - -# **delete_agent_to_agent_test** -> delete_agent_to_agent_test(test_id, aid=aid) - -Delete Agent to Agent test - -Deletes the specified Agent to Agent test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToAgentApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 Agent test - api_instance.delete_agent_to_agent_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling AgentToAgentApi->delete_agent_to_agent_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_agent_test** -> GetAgentToAgentTest200Response get_agent_to_agent_test(test_id, aid=aid, expand=expand) - -Get Agent to Agent test - -Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToAgentApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get Agent to Agent test - api_response = api_instance.get_agent_to_agent_test(test_id, aid=aid, expand=expand) - print("The response of AgentToAgentApi->get_agent_to_agent_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToAgentApi->get_agent_to_agent_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetAgentToAgentTest200Response**](GetAgentToAgentTest200Response.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_agent_to_agent_tests** -> GetAgentToAgentTests200Response get_agent_to_agent_tests(aid=aid) - -List Agent to Agent tests - -Returns a list of Agent to Agent tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToAgentApi(api_client) - aid = '2067' # 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 Agent tests - api_response = api_instance.get_agent_to_agent_tests(aid=aid) - print("The response of AgentToAgentApi->get_agent_to_agent_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToAgentApi->get_agent_to_agent_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 - -[**GetAgentToAgentTests200Response**](GetAgentToAgentTests200Response.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) - -# **update_agent_to_agent_test** -> GetAgentToAgentTest200Response update_agent_to_agent_test(test_id, update_agent_to_agent_test, aid=aid, expand=expand) - -Update Agent to Agent test - -Updates a Agent to Agent test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToAgentApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_agent_to_agent_test = tests_api.UpdateAgentToAgentTest() # UpdateAgentToAgentTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update Agent to Agent test - api_response = api_instance.update_agent_to_agent_test(test_id, update_agent_to_agent_test, aid=aid, expand=expand) - print("The response of AgentToAgentApi->update_agent_to_agent_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToAgentApi->update_agent_to_agent_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_agent_to_agent_test** | [**UpdateAgentToAgentTest**](UpdateAgentToAgentTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetAgentToAgentTest200Response**](GetAgentToAgentTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/AgentToAgentInstantTest.md b/tests_api/docs/AgentToAgentInstantTest.md deleted file mode 100644 index a6214e9f..00000000 --- a/tests_api/docs/AgentToAgentInstantTest.md +++ /dev/null @@ -1,54 +0,0 @@ -# AgentToAgentInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**mss** | **int** | Maximum segment size, in bytes. | [optional] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [optional] [default to 49153] -**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] -**target_agent_id** | **str** | `agentId` of the target agent for the test. | -**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] -**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] -**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentToAgentInstantTest from a JSON string -agent_to_agent_instant_test_instance = AgentToAgentInstantTest.from_json(json) -# print the JSON string representation of the object -print AgentToAgentInstantTest.to_json() - -# convert the object into a dict -agent_to_agent_instant_test_dict = agent_to_agent_instant_test_instance.to_dict() -# create an instance of AgentToAgentInstantTest from a dict -agent_to_agent_instant_test_form_dict = agent_to_agent_instant_test.from_dict(agent_to_agent_instant_test_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/tests_api/docs/AgentToAgentTestProtocol.md b/tests_api/docs/AgentToAgentTestProtocol.md deleted file mode 100644 index ee2d3a70..00000000 --- a/tests_api/docs/AgentToAgentTestProtocol.md +++ /dev/null @@ -1,10 +0,0 @@ -# AgentToAgentTestProtocol - - -## 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/tests_api/docs/AgentToAgentTests.md b/tests_api/docs/AgentToAgentTests.md deleted file mode 100644 index e8392f47..00000000 --- a/tests_api/docs/AgentToAgentTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# AgentToAgentTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[AgentToAgentTest]**](AgentToAgentTest.md) | | [optional] - -## Example - -```python -from tests_api.models.agent_to_agent_tests import AgentToAgentTests - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentToAgentTests from a JSON string -agent_to_agent_tests_instance = AgentToAgentTests.from_json(json) -# print the JSON string representation of the object -print AgentToAgentTests.to_json() - -# convert the object into a dict -agent_to_agent_tests_dict = agent_to_agent_tests_instance.to_dict() -# create an instance of AgentToAgentTests from a dict -agent_to_agent_tests_form_dict = agent_to_agent_tests.from_dict(agent_to_agent_tests_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/tests_api/docs/AgentToServerApi.md b/tests_api/docs/AgentToServerApi.md deleted file mode 100644 index 202a3a2e..00000000 --- a/tests_api/docs/AgentToServerApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.AgentToServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_agent_to_server_test**](AgentToServerApi.md#create_agent_to_server_test) | **POST** /v7/tests/agent-to-server | Create Agent to Server test -[**delete_agent_to_server_test**](AgentToServerApi.md#delete_agent_to_server_test) | **DELETE** /v7/tests/agent-to-server/{testId} | Delete Agent to Server test -[**get_agent_to_server_test**](AgentToServerApi.md#get_agent_to_server_test) | **GET** /v7/tests/agent-to-server/{testId} | Get Agent to Server test -[**get_agent_to_server_tests**](AgentToServerApi.md#get_agent_to_server_tests) | **GET** /v7/tests/agent-to-server | List Agent to Server tests -[**update_agent_to_server_test**](AgentToServerApi.md#update_agent_to_server_test) | **PUT** /v7/tests/agent-to-server/{testId} | Update Agent to Server test - - -# **create_agent_to_server_test** -> AgentToServerTest create_agent_to_server_test(update_agent_to_server_test, aid=aid, expand=expand) - -Create Agent to Server test - -Creates a new Agent to Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.agent_to_server_test import AgentToServerTest -from tests_api.models.expand import Expand -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToServerApi(api_client) - update_agent_to_server_test = tests_api.UpdateAgentToServerTest() # UpdateAgentToServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create Agent to Server test - api_response = api_instance.create_agent_to_server_test(update_agent_to_server_test, aid=aid, expand=expand) - print("The response of AgentToServerApi->create_agent_to_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToServerApi->create_agent_to_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_agent_to_server_test** | [**UpdateAgentToServerTest**](UpdateAgentToServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**AgentToServerTest**](AgentToServerTest.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 | - | -**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) - -# **delete_agent_to_server_test** -> delete_agent_to_server_test(test_id, aid=aid) - -Delete Agent to Server test - -Deletes an Agent to Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 test - api_instance.delete_agent_to_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling AgentToServerApi->delete_agent_to_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_test** -> GetAgentToServerTest200Response get_agent_to_server_test(test_id, aid=aid, expand=expand) - -Get Agent to Server test - -Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get Agent to Server test - api_response = api_instance.get_agent_to_server_test(test_id, aid=aid, expand=expand) - print("The response of AgentToServerApi->get_agent_to_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToServerApi->get_agent_to_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetAgentToServerTest200Response**](GetAgentToServerTest200Response.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_agent_to_server_tests** -> GetAgentToServerTests200Response get_agent_to_server_tests(aid=aid) - -List Agent to Server tests - -Returns a list of Agent to Server tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToServerApi(api_client) - aid = '2067' # 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 tests - api_response = api_instance.get_agent_to_server_tests(aid=aid) - print("The response of AgentToServerApi->get_agent_to_server_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToServerApi->get_agent_to_server_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 - -[**GetAgentToServerTests200Response**](GetAgentToServerTests200Response.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) - -# **update_agent_to_server_test** -> GetAgentToServerTest200Response update_agent_to_server_test(test_id, update_agent_to_server_test, aid=aid, expand=expand) - -Update Agent to Server test - -Updates an Agent to Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.AgentToServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_agent_to_server_test = tests_api.UpdateAgentToServerTest() # UpdateAgentToServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update Agent to Server test - api_response = api_instance.update_agent_to_server_test(test_id, update_agent_to_server_test, aid=aid, expand=expand) - print("The response of AgentToServerApi->update_agent_to_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentToServerApi->update_agent_to_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_agent_to_server_test** | [**UpdateAgentToServerTest**](UpdateAgentToServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetAgentToServerTest200Response**](GetAgentToServerTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/AgentToServerInstantTest.md b/tests_api/docs/AgentToServerInstantTest.md deleted file mode 100644 index 08b5768b..00000000 --- a/tests_api/docs/AgentToServerInstantTest.md +++ /dev/null @@ -1,56 +0,0 @@ -# AgentToServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] -**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] -**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [optional] [default to 49153] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**server** | **str** | Target name or IP address. | -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] -**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] - -## Example - -```python -from tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentToServerInstantTest from a JSON string -agent_to_server_instant_test_instance = AgentToServerInstantTest.from_json(json) -# print the JSON string representation of the object -print AgentToServerInstantTest.to_json() - -# convert the object into a dict -agent_to_server_instant_test_dict = agent_to_server_instant_test_instance.to_dict() -# create an instance of AgentToServerInstantTest from a dict -agent_to_server_instant_test_form_dict = agent_to_server_instant_test.from_dict(agent_to_server_instant_test_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/tests_api/docs/AgentToServerTests.md b/tests_api/docs/AgentToServerTests.md deleted file mode 100644 index dd8c3eac..00000000 --- a/tests_api/docs/AgentToServerTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# AgentToServerTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[AgentToServerTest]**](AgentToServerTest.md) | | [optional] - -## Example - -```python -from tests_api.models.agent_to_server_tests import AgentToServerTests - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentToServerTests from a JSON string -agent_to_server_tests_instance = AgentToServerTests.from_json(json) -# print the JSON string representation of the object -print AgentToServerTests.to_json() - -# convert the object into a dict -agent_to_server_tests_dict = agent_to_server_tests_instance.to_dict() -# create an instance of AgentToServerTests from a dict -agent_to_server_tests_form_dict = agent_to_server_tests.from_dict(agent_to_server_tests_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/tests_api/docs/AlertRoundsViolationMode.md b/tests_api/docs/AlertRoundsViolationMode.md deleted file mode 100644 index a4609630..00000000 --- a/tests_api/docs/AlertRoundsViolationMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# AlertRoundsViolationMode - -`exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` - -## 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/tests_api/docs/AlertRule.md b/tests_api/docs/AlertRule.md deleted file mode 100644 index bec80e4e..00000000 --- a/tests_api/docs/AlertRule.md +++ /dev/null @@ -1,38 +0,0 @@ -# AlertRule - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rule_id** | **str** | Unique ID of the rule | [optional] [readonly] -**rule_name** | **str** | Name of the alert rule | [optional] [readonly] -**expression** | **str** | String expression of alert rule | [optional] [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**is_default** | **bool** | Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here | [optional] [readonly] -**alert_type** | [**AlertType**](AlertType.md) | | [optional] -**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] -**minimum_sources_pct** | **int** | the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert | [optional] [readonly] -**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional] -**rounds_violating_out_of** | **int** | Specifies the divisor (y value) for the “X of Y times” condition. | [optional] [readonly] -**rounds_violating_required** | **int** | Specifies the numerator (x value) for the “X of Y times” condition | [optional] [readonly] - -## Example - -```python -from tests_api.models.alert_rule import AlertRule - -# TODO update the JSON string below -json = "{}" -# create an instance of AlertRule from a JSON string -alert_rule_instance = AlertRule.from_json(json) -# print the JSON string representation of the object -print AlertRule.to_json() - -# convert the object into a dict -alert_rule_dict = alert_rule_instance.to_dict() -# create an instance of AlertRule from a dict -alert_rule_form_dict = alert_rule.from_dict(alert_rule_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/tests_api/docs/AlertType.md b/tests_api/docs/AlertType.md deleted file mode 100644 index 541a3038..00000000 --- a/tests_api/docs/AlertType.md +++ /dev/null @@ -1,11 +0,0 @@ -# AlertType - -Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values - -## 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/tests_api/docs/BaseTest.md b/tests_api/docs/BaseTest.md deleted file mode 100644 index cae1cdbb..00000000 --- a/tests_api/docs/BaseTest.md +++ /dev/null @@ -1,31 +0,0 @@ -# BaseTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] - -## Example - -```python -from tests_api.models.base_test import BaseTest - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseTest from a JSON string -base_test_instance = BaseTest.from_json(json) -# print the JSON string representation of the object -print BaseTest.to_json() - -# convert the object into a dict -base_test_dict = base_test_instance.to_dict() -# create an instance of BaseTest from a dict -base_test_form_dict = base_test.from_dict(base_test_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/tests_api/docs/CloudEnterpriseAgentType.md b/tests_api/docs/CloudEnterpriseAgentType.md deleted file mode 100644 index 951c803e..00000000 --- a/tests_api/docs/CloudEnterpriseAgentType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/tests_api/docs/DNSServerApi.md b/tests_api/docs/DNSServerApi.md deleted file mode 100644 index a31e32ab..00000000 --- a/tests_api/docs/DNSServerApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.DNSServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_dns_server_test**](DNSServerApi.md#create_dns_server_test) | **POST** /v7/tests/dns-server | Create DNS Server test -[**delete_dns_server_test**](DNSServerApi.md#delete_dns_server_test) | **DELETE** /v7/tests/dns-server/{testId} | Delete DNS Server test -[**get_dns_server_test**](DNSServerApi.md#get_dns_server_test) | **GET** /v7/tests/dns-server/{testId} | Get DNS Server test -[**get_dns_server_tests**](DNSServerApi.md#get_dns_server_tests) | **GET** /v7/tests/dns-server | List DNS Server tests -[**update_dns_server_test**](DNSServerApi.md#update_dns_server_test) | **PUT** /v7/tests/dns-server/{testId} | Update DNS Server test - - -# **create_dns_server_test** -> DnsServerTest create_dns_server_test(update_dns_server_test, aid=aid, expand=expand) - -Create DNS Server test - -Creates a new DNS Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.dns_server_test import DnsServerTest -from tests_api.models.expand import Expand -from tests_api.models.update_dns_server_test import UpdateDnsServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSServerApi(api_client) - update_dns_server_test = tests_api.UpdateDnsServerTest() # UpdateDnsServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create DNS Server test - api_response = api_instance.create_dns_server_test(update_dns_server_test, aid=aid, expand=expand) - print("The response of DNSServerApi->create_dns_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSServerApi->create_dns_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_dns_server_test** | [**UpdateDnsServerTest**](UpdateDnsServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**DnsServerTest**](DnsServerTest.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 | - | -**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) - -# **delete_dns_server_test** -> delete_dns_server_test(test_id, aid=aid) - -Delete DNS Server test - -Deletes the specified DNS Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 DNS Server test - api_instance.delete_dns_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling DNSServerApi->delete_dns_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_dns_server_test** -> GetDNSServerTest200Response get_dns_server_test(test_id, aid=aid, expand=expand) - -Get DNS Server test - -Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get DNS Server test - api_response = api_instance.get_dns_server_test(test_id, aid=aid, expand=expand) - print("The response of DNSServerApi->get_dns_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSServerApi->get_dns_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetDNSServerTest200Response**](GetDNSServerTest200Response.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_dns_server_tests** -> GetDNSServerTests200Response get_dns_server_tests(aid=aid) - -List DNS Server tests - -Returns a list of all DNS Server tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_dns_server_tests200_response import GetDNSServerTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSServerApi(api_client) - aid = '2067' # 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 DNS Server tests - api_response = api_instance.get_dns_server_tests(aid=aid) - print("The response of DNSServerApi->get_dns_server_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSServerApi->get_dns_server_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 - -[**GetDNSServerTests200Response**](GetDNSServerTests200Response.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) - -# **update_dns_server_test** -> GetDNSServerTest200Response update_dns_server_test(test_id, update_dns_server_test, aid=aid, expand=expand) - -Update DNS Server test - -Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response -from tests_api.models.update_dns_server_test import UpdateDnsServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_dns_server_test = tests_api.UpdateDnsServerTest() # UpdateDnsServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update DNS Server test - api_response = api_instance.update_dns_server_test(test_id, update_dns_server_test, aid=aid, expand=expand) - print("The response of DNSServerApi->update_dns_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSServerApi->update_dns_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_dns_server_test** | [**UpdateDnsServerTest**](UpdateDnsServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetDNSServerTest200Response**](GetDNSServerTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/DNSTraceApi.md b/tests_api/docs/DNSTraceApi.md deleted file mode 100644 index 65a109d7..00000000 --- a/tests_api/docs/DNSTraceApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.DNSTraceApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_dns_trace_test**](DNSTraceApi.md#create_dns_trace_test) | **POST** /v7/tests/dns-trace | Create DNS Trace test -[**delete_dns_trace_test**](DNSTraceApi.md#delete_dns_trace_test) | **DELETE** /v7/tests/dns-trace/{testId} | Delete DNS Trace test -[**get_dns_trace_test**](DNSTraceApi.md#get_dns_trace_test) | **GET** /v7/tests/dns-trace/{testId} | Get DNS Trace test -[**get_dns_trace_tests**](DNSTraceApi.md#get_dns_trace_tests) | **GET** /v7/tests/dns-trace | List DNS Trace tests -[**update_dns_trace_test**](DNSTraceApi.md#update_dns_trace_test) | **PUT** /v7/tests/dns-trace/{testId} | Update DNS Trace test - - -# **create_dns_trace_test** -> DnsTraceTest create_dns_trace_test(update_dns_trace_test, aid=aid, expand=expand) - -Create DNS Trace test - -Creates a new DNS Trace test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.dns_trace_test import DnsTraceTest -from tests_api.models.expand import Expand -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSTraceApi(api_client) - update_dns_trace_test = tests_api.UpdateDnsTraceTest() # UpdateDnsTraceTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create DNS Trace test - api_response = api_instance.create_dns_trace_test(update_dns_trace_test, aid=aid, expand=expand) - print("The response of DNSTraceApi->create_dns_trace_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSTraceApi->create_dns_trace_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_dns_trace_test** | [**UpdateDnsTraceTest**](UpdateDnsTraceTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**DnsTraceTest**](DnsTraceTest.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 | - | -**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) - -# **delete_dns_trace_test** -> delete_dns_trace_test(test_id, aid=aid) - -Delete DNS Trace test - -Deletes the specified DNS Trace test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSTraceApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 DNS Trace test - api_instance.delete_dns_trace_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling DNSTraceApi->delete_dns_trace_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_dns_trace_test** -> GetDnsTraceTest200Response get_dns_trace_test(test_id, aid=aid, expand=expand) - -Get DNS Trace test - -Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSTraceApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get DNS Trace test - api_response = api_instance.get_dns_trace_test(test_id, aid=aid, expand=expand) - print("The response of DNSTraceApi->get_dns_trace_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSTraceApi->get_dns_trace_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetDnsTraceTest200Response**](GetDnsTraceTest200Response.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_dns_trace_tests** -> GetDnsTraceTests200Response get_dns_trace_tests(aid=aid) - -List DNS Trace tests - -Returns a list of all DNS Trace tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSTraceApi(api_client) - aid = '2067' # 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 DNS Trace tests - api_response = api_instance.get_dns_trace_tests(aid=aid) - print("The response of DNSTraceApi->get_dns_trace_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSTraceApi->get_dns_trace_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 - -[**GetDnsTraceTests200Response**](GetDnsTraceTests200Response.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) - -# **update_dns_trace_test** -> GetDnsTraceTest200Response update_dns_trace_test(test_id, update_dns_trace_test, aid=aid, expand=expand) - -Update DNS Trace test - -Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.DNSTraceApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_dns_trace_test = tests_api.UpdateDnsTraceTest() # UpdateDnsTraceTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update DNS Trace test - api_response = api_instance.update_dns_trace_test(test_id, update_dns_trace_test, aid=aid, expand=expand) - print("The response of DNSTraceApi->update_dns_trace_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DNSTraceApi->update_dns_trace_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_dns_trace_test** | [**UpdateDnsTraceTest**](UpdateDnsTraceTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetDnsTraceTest200Response**](GetDnsTraceTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/DnsQueryClass.md b/tests_api/docs/DnsQueryClass.md deleted file mode 100644 index b4de0b88..00000000 --- a/tests_api/docs/DnsQueryClass.md +++ /dev/null @@ -1,11 +0,0 @@ -# DnsQueryClass - -Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. - -## 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/tests_api/docs/DnsSecInstantTest.md b/tests_api/docs/DnsSecInstantTest.md deleted file mode 100644 index cb358ac8..00000000 --- a/tests_api/docs/DnsSecInstantTest.md +++ /dev/null @@ -1,43 +0,0 @@ -# DnsSecInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from tests_api.models.dns_sec_instant_test import DnsSecInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsSecInstantTest from a JSON string -dns_sec_instant_test_instance = DnsSecInstantTest.from_json(json) -# print the JSON string representation of the object -print DnsSecInstantTest.to_json() - -# convert the object into a dict -dns_sec_instant_test_dict = dns_sec_instant_test_instance.to_dict() -# create an instance of DnsSecInstantTest from a dict -dns_sec_instant_test_form_dict = dns_sec_instant_test.from_dict(dns_sec_instant_test_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/tests_api/docs/DnsSecTests.md b/tests_api/docs/DnsSecTests.md deleted file mode 100644 index 01b72b34..00000000 --- a/tests_api/docs/DnsSecTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# DnsSecTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[DnsSecTest]**](DnsSecTest.md) | | [optional] - -## Example - -```python -from tests_api.models.dns_sec_tests import DnsSecTests - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsSecTests from a JSON string -dns_sec_tests_instance = DnsSecTests.from_json(json) -# print the JSON string representation of the object -print DnsSecTests.to_json() - -# convert the object into a dict -dns_sec_tests_dict = dns_sec_tests_instance.to_dict() -# create an instance of DnsSecTests from a dict -dns_sec_tests_form_dict = dns_sec_tests.from_dict(dns_sec_tests_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/tests_api/docs/DnsServerInstantTest.md b/tests_api/docs/DnsServerInstantTest.md deleted file mode 100644 index 39da4a09..00000000 --- a/tests_api/docs/DnsServerInstantTest.md +++ /dev/null @@ -1,55 +0,0 @@ -# DnsServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | -**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**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] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from tests_api.models.dns_server_instant_test import DnsServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsServerInstantTest from a JSON string -dns_server_instant_test_instance = DnsServerInstantTest.from_json(json) -# print the JSON string representation of the object -print DnsServerInstantTest.to_json() - -# convert the object into a dict -dns_server_instant_test_dict = dns_server_instant_test_instance.to_dict() -# create an instance of DnsServerInstantTest from a dict -dns_server_instant_test_form_dict = dns_server_instant_test.from_dict(dns_server_instant_test_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/tests_api/docs/DnsServerTests.md b/tests_api/docs/DnsServerTests.md deleted file mode 100644 index cc46f383..00000000 --- a/tests_api/docs/DnsServerTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# DnsServerTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[DnsServerTest]**](DnsServerTest.md) | | [optional] - -## Example - -```python -from tests_api.models.dns_server_tests import DnsServerTests - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsServerTests from a JSON string -dns_server_tests_instance = DnsServerTests.from_json(json) -# print the JSON string representation of the object -print DnsServerTests.to_json() - -# convert the object into a dict -dns_server_tests_dict = dns_server_tests_instance.to_dict() -# create an instance of DnsServerTests from a dict -dns_server_tests_form_dict = dns_server_tests.from_dict(dns_server_tests_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/tests_api/docs/DnsTraceInstantTest.md b/tests_api/docs/DnsTraceInstantTest.md deleted file mode 100644 index 1e616484..00000000 --- a/tests_api/docs/DnsTraceInstantTest.md +++ /dev/null @@ -1,44 +0,0 @@ -# DnsTraceInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from tests_api.models.dns_trace_instant_test import DnsTraceInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsTraceInstantTest from a JSON string -dns_trace_instant_test_instance = DnsTraceInstantTest.from_json(json) -# print the JSON string representation of the object -print DnsTraceInstantTest.to_json() - -# convert the object into a dict -dns_trace_instant_test_dict = dns_trace_instant_test_instance.to_dict() -# create an instance of DnsTraceInstantTest from a dict -dns_trace_instant_test_form_dict = dns_trace_instant_test.from_dict(dns_trace_instant_test_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/tests_api/docs/DnsTraceTests.md b/tests_api/docs/DnsTraceTests.md deleted file mode 100644 index 6b9b1d5e..00000000 --- a/tests_api/docs/DnsTraceTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# DnsTraceTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[DnsTraceTest]**](DnsTraceTest.md) | | [optional] - -## Example - -```python -from tests_api.models.dns_trace_tests import DnsTraceTests - -# TODO update the JSON string below -json = "{}" -# create an instance of DnsTraceTests from a JSON string -dns_trace_tests_instance = DnsTraceTests.from_json(json) -# print the JSON string representation of the object -print DnsTraceTests.to_json() - -# convert the object into a dict -dns_trace_tests_dict = dns_trace_tests_instance.to_dict() -# create an instance of DnsTraceTests from a dict -dns_trace_tests_form_dict = dns_trace_tests.from_dict(dns_trace_tests_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/tests_api/docs/Error.md b/tests_api/docs/Error.md deleted file mode 100644 index 7bc50c49..00000000 --- a/tests_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 tests_api.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_form_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/tests_api/docs/Expand.md b/tests_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/tests_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/tests_api/docs/FTPServerApi.md b/tests_api/docs/FTPServerApi.md deleted file mode 100644 index b7dbc2cf..00000000 --- a/tests_api/docs/FTPServerApi.md +++ /dev/null @@ -1,451 +0,0 @@ -# tests_api.FTPServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_ftp_server_test**](FTPServerApi.md#create_ftp_server_test) | **POST** /v7/tests/ftp-server | Create FTP Server test -[**delete_ftp_server_test**](FTPServerApi.md#delete_ftp_server_test) | **DELETE** /v7/tests/ftp-server/{testId} | Delete FTP Server test -[**get_ftp_server_test**](FTPServerApi.md#get_ftp_server_test) | **GET** /v7/tests/ftp-server/{testId} | Get FTP Server test -[**get_ftp_server_tests**](FTPServerApi.md#get_ftp_server_tests) | **GET** /v7/tests/ftp-server | List FTP Server tests -[**update_ftp_server_test**](FTPServerApi.md#update_ftp_server_test) | **PUT** /v7/tests/ftp-server/{testId} | Update FTP Server test - - -# **create_ftp_server_test** -> FtpServerTest create_ftp_server_test(update_ftp_server_test, aid=aid, expand=expand) - -Create FTP Server test - -Creates a new FTP Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.ftp_server_test import FtpServerTest -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.FTPServerApi(api_client) - update_ftp_server_test = tests_api.UpdateFtpServerTest() # UpdateFtpServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create FTP Server test - api_response = api_instance.create_ftp_server_test(update_ftp_server_test, aid=aid, expand=expand) - print("The response of FTPServerApi->create_ftp_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FTPServerApi->create_ftp_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_ftp_server_test** | [**UpdateFtpServerTest**](UpdateFtpServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**FtpServerTest**](FtpServerTest.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 | - | -**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) - -# **delete_ftp_server_test** -> delete_ftp_server_test(test_id, aid=aid) - -Delete FTP Server test - -Deletes the specified FTP Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.FTPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 FTP Server test - api_instance.delete_ftp_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling FTPServerApi->delete_ftp_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_ftp_server_test** -> GetFtpServerTest200Response get_ftp_server_test(test_id, aid=aid, expand=expand) - -Get FTP Server test - -Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.FTPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get FTP Server test - api_response = api_instance.get_ftp_server_test(test_id, aid=aid, expand=expand) - print("The response of FTPServerApi->get_ftp_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FTPServerApi->get_ftp_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetFtpServerTest200Response**](GetFtpServerTest200Response.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_ftp_server_tests** -> GetFtpServerTests200Response get_ftp_server_tests(aid=aid) - -List FTP Server tests - -Returns a list of FTP Server tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_ftp_server_tests200_response import GetFtpServerTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.FTPServerApi(api_client) - aid = '2067' # 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 FTP Server tests - api_response = api_instance.get_ftp_server_tests(aid=aid) - print("The response of FTPServerApi->get_ftp_server_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FTPServerApi->get_ftp_server_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 - -[**GetFtpServerTests200Response**](GetFtpServerTests200Response.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) - -# **update_ftp_server_test** -> GetFtpServerTest200Response update_ftp_server_test(test_id, update_ftp_server_test, aid=aid, expand=expand) - -Update FTP Server test - -Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.FTPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_ftp_server_test = tests_api.UpdateFtpServerTest() # UpdateFtpServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update FTP Server test - api_response = api_instance.update_ftp_server_test(test_id, update_ftp_server_test, aid=aid, expand=expand) - print("The response of FTPServerApi->update_ftp_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FTPServerApi->update_ftp_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_ftp_server_test** | [**UpdateFtpServerTest**](UpdateFtpServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetFtpServerTest200Response**](GetFtpServerTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/FtpServerInstantTest.md b/tests_api/docs/FtpServerInstantTest.md deleted file mode 100644 index f10687aa..00000000 --- a/tests_api/docs/FtpServerInstantTest.md +++ /dev/null @@ -1,59 +0,0 @@ -# FtpServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] -**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] -**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] -**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] -**password** | **str** | Password for Basic/NTLM authentication. | -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | -**url** | **str** | Target for the test. | -**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] -**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] - -## Example - -```python -from tests_api.models.ftp_server_instant_test import FtpServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of FtpServerInstantTest from a JSON string -ftp_server_instant_test_instance = FtpServerInstantTest.from_json(json) -# print the JSON string representation of the object -print FtpServerInstantTest.to_json() - -# convert the object into a dict -ftp_server_instant_test_dict = ftp_server_instant_test_instance.to_dict() -# create an instance of FtpServerInstantTest from a dict -ftp_server_instant_test_form_dict = ftp_server_instant_test.from_dict(ftp_server_instant_test_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/tests_api/docs/FtpServerRequestType.md b/tests_api/docs/FtpServerRequestType.md deleted file mode 100644 index 1180b3a5..00000000 --- a/tests_api/docs/FtpServerRequestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# FtpServerRequestType - -Set the type of activity for the test. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/FtpServerTests.md b/tests_api/docs/FtpServerTests.md deleted file mode 100644 index a0c39f8b..00000000 --- a/tests_api/docs/FtpServerTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# FtpServerTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[FtpServerTest]**](FtpServerTest.md) | | [optional] - -## Example - -```python -from tests_api.models.ftp_server_tests import FtpServerTests - -# TODO update the JSON string below -json = "{}" -# create an instance of FtpServerTests from a JSON string -ftp_server_tests_instance = FtpServerTests.from_json(json) -# print the JSON string representation of the object -print FtpServerTests.to_json() - -# convert the object into a dict -ftp_server_tests_dict = ftp_server_tests_instance.to_dict() -# create an instance of FtpServerTests from a dict -ftp_server_tests_form_dict = ftp_server_tests.from_dict(ftp_server_tests_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/tests_api/docs/GetAgentToAgentTest200Response.md b/tests_api/docs/GetAgentToAgentTest200Response.md deleted file mode 100644 index 98c93979..00000000 --- a/tests_api/docs/GetAgentToAgentTest200Response.md +++ /dev/null @@ -1,60 +0,0 @@ -# GetAgentToAgentTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**direction** | [**TestDirection**](TestDirection.md) | | [optional] -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**mss** | **int** | Maximum segment size, in bytes. | [optional] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [optional] [default to 49153] -**protocol** | [**AgentToAgentTestProtocol**](AgentToAgentTestProtocol.md) | | [optional] -**target_agent_id** | **str** | `agentId` of the target agent for the test. | -**throughput_measurements** | **bool** | Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent. | [optional] [default to False] -**throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] -**throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] - -## Example - -```python -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAgentToAgentTest200Response from a JSON string -get_agent_to_agent_test200_response_instance = GetAgentToAgentTest200Response.from_json(json) -# print the JSON string representation of the object -print GetAgentToAgentTest200Response.to_json() - -# convert the object into a dict -get_agent_to_agent_test200_response_dict = get_agent_to_agent_test200_response_instance.to_dict() -# create an instance of GetAgentToAgentTest200Response from a dict -get_agent_to_agent_test200_response_form_dict = get_agent_to_agent_test200_response.from_dict(get_agent_to_agent_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetAgentToAgentTests200Response.md b/tests_api/docs/GetAgentToAgentTests200Response.md deleted file mode 100644 index 65c7048c..00000000 --- a/tests_api/docs/GetAgentToAgentTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetAgentToAgentTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[AgentToAgentTest]**](AgentToAgentTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAgentToAgentTests200Response from a JSON string -get_agent_to_agent_tests200_response_instance = GetAgentToAgentTests200Response.from_json(json) -# print the JSON string representation of the object -print GetAgentToAgentTests200Response.to_json() - -# convert the object into a dict -get_agent_to_agent_tests200_response_dict = get_agent_to_agent_tests200_response_instance.to_dict() -# create an instance of GetAgentToAgentTests200Response from a dict -get_agent_to_agent_tests200_response_form_dict = get_agent_to_agent_tests200_response.from_dict(get_agent_to_agent_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetAgentToServerTest200Response.md b/tests_api/docs/GetAgentToServerTest200Response.md deleted file mode 100644 index 5c7f62ae..00000000 --- a/tests_api/docs/GetAgentToServerTest200Response.md +++ /dev/null @@ -1,62 +0,0 @@ -# GetAgentToServerTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**continuous_mode** | **bool** | To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. | [optional] -**fixed_packet_rate** | **int** | If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1` | [optional] -**mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [optional] [default to 49153] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**server** | **str** | Target name or IP address. | -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] -**network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] - -## Example - -```python -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAgentToServerTest200Response from a JSON string -get_agent_to_server_test200_response_instance = GetAgentToServerTest200Response.from_json(json) -# print the JSON string representation of the object -print GetAgentToServerTest200Response.to_json() - -# convert the object into a dict -get_agent_to_server_test200_response_dict = get_agent_to_server_test200_response_instance.to_dict() -# create an instance of GetAgentToServerTest200Response from a dict -get_agent_to_server_test200_response_form_dict = get_agent_to_server_test200_response.from_dict(get_agent_to_server_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetAgentToServerTests200Response.md b/tests_api/docs/GetAgentToServerTests200Response.md deleted file mode 100644 index 4038faf4..00000000 --- a/tests_api/docs/GetAgentToServerTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetAgentToServerTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[AgentToServerTest]**](AgentToServerTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAgentToServerTests200Response from a JSON string -get_agent_to_server_tests200_response_instance = GetAgentToServerTests200Response.from_json(json) -# print the JSON string representation of the object -print GetAgentToServerTests200Response.to_json() - -# convert the object into a dict -get_agent_to_server_tests200_response_dict = get_agent_to_server_tests200_response_instance.to_dict() -# create an instance of GetAgentToServerTests200Response from a dict -get_agent_to_server_tests200_response_form_dict = get_agent_to_server_tests200_response.from_dict(get_agent_to_server_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetBgpTest200Response.md b/tests_api/docs/GetBgpTest200Response.md deleted file mode 100644 index dfecccf8..00000000 --- a/tests_api/docs/GetBgpTest200Response.md +++ /dev/null @@ -1,46 +0,0 @@ -# GetBgpTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**include_covered_prefixes** | **bool** | Indicate if queries for subprefixes detected under this prefix should included. | [optional] -**prefix** | **str** | a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24. | -**use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used. | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | A list of enabled alert rule objects. | [optional] - -## Example - -```python -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetBgpTest200Response from a JSON string -get_bgp_test200_response_instance = GetBgpTest200Response.from_json(json) -# print the JSON string representation of the object -print GetBgpTest200Response.to_json() - -# convert the object into a dict -get_bgp_test200_response_dict = get_bgp_test200_response_instance.to_dict() -# create an instance of GetBgpTest200Response from a dict -get_bgp_test200_response_form_dict = get_bgp_test200_response.from_dict(get_bgp_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetBgpTests200Response.md b/tests_api/docs/GetBgpTests200Response.md deleted file mode 100644 index ac45cf2d..00000000 --- a/tests_api/docs/GetBgpTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetBgpTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[BgpTest]**](BgpTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_bgp_tests200_response import GetBgpTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetBgpTests200Response from a JSON string -get_bgp_tests200_response_instance = GetBgpTests200Response.from_json(json) -# print the JSON string representation of the object -print GetBgpTests200Response.to_json() - -# convert the object into a dict -get_bgp_tests200_response_dict = get_bgp_tests200_response_instance.to_dict() -# create an instance of GetBgpTests200Response from a dict -get_bgp_tests200_response_form_dict = get_bgp_tests200_response.from_dict(get_bgp_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetDNSServerTest200Response.md b/tests_api/docs/GetDNSServerTest200Response.md deleted file mode 100644 index 77edbbf6..00000000 --- a/tests_api/docs/GetDNSServerTest200Response.md +++ /dev/null @@ -1,61 +0,0 @@ -# GetDNSServerTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**dns_servers** | [**List[TestDnsServer]**](TestDnsServer.md) | | -**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**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] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**recursive_queries** | **bool** | Set true to run query with RD (recursion desired) flag enabled. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] - -## Example - -```python -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDNSServerTest200Response from a JSON string -get_dns_server_test200_response_instance = GetDNSServerTest200Response.from_json(json) -# print the JSON string representation of the object -print GetDNSServerTest200Response.to_json() - -# convert the object into a dict -get_dns_server_test200_response_dict = get_dns_server_test200_response_instance.to_dict() -# create an instance of GetDNSServerTest200Response from a dict -get_dns_server_test200_response_form_dict = get_dns_server_test200_response.from_dict(get_dns_server_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetDNSServerTests200Response.md b/tests_api/docs/GetDNSServerTests200Response.md deleted file mode 100644 index 12983fe6..00000000 --- a/tests_api/docs/GetDNSServerTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetDNSServerTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[DnsServerTest]**](DnsServerTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_dns_server_tests200_response import GetDNSServerTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDNSServerTests200Response from a JSON string -get_dns_server_tests200_response_instance = GetDNSServerTests200Response.from_json(json) -# print the JSON string representation of the object -print GetDNSServerTests200Response.to_json() - -# convert the object into a dict -get_dns_server_tests200_response_dict = get_dns_server_tests200_response_instance.to_dict() -# create an instance of GetDNSServerTests200Response from a dict -get_dns_server_tests200_response_form_dict = get_dns_server_tests200_response.from_dict(get_dns_server_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetDnsSecTest200Response.md b/tests_api/docs/GetDnsSecTest200Response.md deleted file mode 100644 index fe9418a4..00000000 --- a/tests_api/docs/GetDnsSecTest200Response.md +++ /dev/null @@ -1,47 +0,0 @@ -# GetDnsSecTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDnsSecTest200Response from a JSON string -get_dns_sec_test200_response_instance = GetDnsSecTest200Response.from_json(json) -# print the JSON string representation of the object -print GetDnsSecTest200Response.to_json() - -# convert the object into a dict -get_dns_sec_test200_response_dict = get_dns_sec_test200_response_instance.to_dict() -# create an instance of GetDnsSecTest200Response from a dict -get_dns_sec_test200_response_form_dict = get_dns_sec_test200_response.from_dict(get_dns_sec_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetDnsSecTests200Response.md b/tests_api/docs/GetDnsSecTests200Response.md deleted file mode 100644 index e23e5e8e..00000000 --- a/tests_api/docs/GetDnsSecTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetDnsSecTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[DnsSecTest]**](DnsSecTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_dns_sec_tests200_response import GetDnsSecTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDnsSecTests200Response from a JSON string -get_dns_sec_tests200_response_instance = GetDnsSecTests200Response.from_json(json) -# print the JSON string representation of the object -print GetDnsSecTests200Response.to_json() - -# convert the object into a dict -get_dns_sec_tests200_response_dict = get_dns_sec_tests200_response_instance.to_dict() -# create an instance of GetDnsSecTests200Response from a dict -get_dns_sec_tests200_response_form_dict = get_dns_sec_tests200_response.from_dict(get_dns_sec_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetDnsTraceTest200Response.md b/tests_api/docs/GetDnsTraceTest200Response.md deleted file mode 100644 index d8d4e7a7..00000000 --- a/tests_api/docs/GetDnsTraceTest200Response.md +++ /dev/null @@ -1,48 +0,0 @@ -# GetDnsTraceTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**dns_transport_protocol** | [**TestDnsTransportProtocol**](TestDnsTransportProtocol.md) | | [optional] -**domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | -**dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] - -## Example - -```python -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDnsTraceTest200Response from a JSON string -get_dns_trace_test200_response_instance = GetDnsTraceTest200Response.from_json(json) -# print the JSON string representation of the object -print GetDnsTraceTest200Response.to_json() - -# convert the object into a dict -get_dns_trace_test200_response_dict = get_dns_trace_test200_response_instance.to_dict() -# create an instance of GetDnsTraceTest200Response from a dict -get_dns_trace_test200_response_form_dict = get_dns_trace_test200_response.from_dict(get_dns_trace_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetDnsTraceTests200Response.md b/tests_api/docs/GetDnsTraceTests200Response.md deleted file mode 100644 index d831749d..00000000 --- a/tests_api/docs/GetDnsTraceTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetDnsTraceTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[DnsTraceTest]**](DnsTraceTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetDnsTraceTests200Response from a JSON string -get_dns_trace_tests200_response_instance = GetDnsTraceTests200Response.from_json(json) -# print the JSON string representation of the object -print GetDnsTraceTests200Response.to_json() - -# convert the object into a dict -get_dns_trace_tests200_response_dict = get_dns_trace_tests200_response_instance.to_dict() -# create an instance of GetDnsTraceTests200Response from a dict -get_dns_trace_tests200_response_form_dict = get_dns_trace_tests200_response.from_dict(get_dns_trace_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetFtpServerTest200Response.md b/tests_api/docs/GetFtpServerTest200Response.md deleted file mode 100644 index 76015e53..00000000 --- a/tests_api/docs/GetFtpServerTest200Response.md +++ /dev/null @@ -1,65 +0,0 @@ -# GetFtpServerTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**download_limit** | **int** | Specify maximum number of bytes to download from the target object. | [optional] -**ftp_target_time** | **int** | Target time for operation completion; specified in milliseconds. | [optional] -**ftp_time_limit** | **int** | Set the time limit for the test in seconds. | [optional] [default to 10] -**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] -**password** | **str** | Password for Basic/NTLM authentication. | -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**request_type** | [**FtpServerRequestType**](FtpServerRequestType.md) | | -**url** | **str** | Target for the test. | -**use_active_ftp** | **bool** | Explicitly set the flag to use active FTP. | [optional] [default to False] -**use_explicit_ftps** | **bool** | Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] - -## Example - -```python -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetFtpServerTest200Response from a JSON string -get_ftp_server_test200_response_instance = GetFtpServerTest200Response.from_json(json) -# print the JSON string representation of the object -print GetFtpServerTest200Response.to_json() - -# convert the object into a dict -get_ftp_server_test200_response_dict = get_ftp_server_test200_response_instance.to_dict() -# create an instance of GetFtpServerTest200Response from a dict -get_ftp_server_test200_response_form_dict = get_ftp_server_test200_response.from_dict(get_ftp_server_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetFtpServerTests200Response.md b/tests_api/docs/GetFtpServerTests200Response.md deleted file mode 100644 index 75c9ef1a..00000000 --- a/tests_api/docs/GetFtpServerTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetFtpServerTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[FtpServerTest]**](FtpServerTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_ftp_server_tests200_response import GetFtpServerTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetFtpServerTests200Response from a JSON string -get_ftp_server_tests200_response_instance = GetFtpServerTests200Response.from_json(json) -# print the JSON string representation of the object -print GetFtpServerTests200Response.to_json() - -# convert the object into a dict -get_ftp_server_tests200_response_dict = get_ftp_server_tests200_response_instance.to_dict() -# create an instance of GetFtpServerTests200Response from a dict -get_ftp_server_tests200_response_form_dict = get_ftp_server_tests200_response.from_dict(get_ftp_server_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetHttpServerTest200Response.md b/tests_api/docs/GetHttpServerTest200Response.md deleted file mode 100644 index 062debfb..00000000 --- a/tests_api/docs/GetHttpServerTest200Response.md +++ /dev/null @@ -1,78 +0,0 @@ -# GetHttpServerTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**headers** | **List[str]** | HTTP request headers used. | [optional] -**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'] -**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] -**dns_override** | **str** | IP address to use for DNS override. | [optional] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**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] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] - -## Example - -```python -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetHttpServerTest200Response from a JSON string -get_http_server_test200_response_instance = GetHttpServerTest200Response.from_json(json) -# print the JSON string representation of the object -print GetHttpServerTest200Response.to_json() - -# convert the object into a dict -get_http_server_test200_response_dict = get_http_server_test200_response_instance.to_dict() -# create an instance of GetHttpServerTest200Response from a dict -get_http_server_test200_response_form_dict = get_http_server_test200_response.from_dict(get_http_server_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetHttpServerTests200Response.md b/tests_api/docs/GetHttpServerTests200Response.md deleted file mode 100644 index 2d91df27..00000000 --- a/tests_api/docs/GetHttpServerTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetHttpServerTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[HttpServerTest]**](HttpServerTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_http_server_tests200_response import GetHttpServerTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetHttpServerTests200Response from a JSON string -get_http_server_tests200_response_instance = GetHttpServerTests200Response.from_json(json) -# print the JSON string representation of the object -print GetHttpServerTests200Response.to_json() - -# convert the object into a dict -get_http_server_tests200_response_dict = get_http_server_tests200_response_instance.to_dict() -# create an instance of GetHttpServerTests200Response from a dict -get_http_server_tests200_response_form_dict = get_http_server_tests200_response.from_dict(get_http_server_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetPageLoadTest200Response.md b/tests_api/docs/GetPageLoadTest200Response.md deleted file mode 100644 index acbd6e99..00000000 --- a/tests_api/docs/GetPageLoadTest200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetPageLoadTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] -**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] -**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] -**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] -**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] -**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] -**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | -**subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] - -## Example - -```python -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetPageLoadTest200Response from a JSON string -get_page_load_test200_response_instance = GetPageLoadTest200Response.from_json(json) -# print the JSON string representation of the object -print GetPageLoadTest200Response.to_json() - -# convert the object into a dict -get_page_load_test200_response_dict = get_page_load_test200_response_instance.to_dict() -# create an instance of GetPageLoadTest200Response from a dict -get_page_load_test200_response_form_dict = get_page_load_test200_response.from_dict(get_page_load_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetPageLoadTests200Response.md b/tests_api/docs/GetPageLoadTests200Response.md deleted file mode 100644 index 9d118451..00000000 --- a/tests_api/docs/GetPageLoadTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetPageLoadTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[PageLoadTest]**](PageLoadTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_page_load_tests200_response import GetPageLoadTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetPageLoadTests200Response from a JSON string -get_page_load_tests200_response_instance = GetPageLoadTests200Response.from_json(json) -# print the JSON string representation of the object -print GetPageLoadTests200Response.to_json() - -# convert the object into a dict -get_page_load_tests200_response_dict = get_page_load_tests200_response_instance.to_dict() -# create an instance of GetPageLoadTests200Response from a dict -get_page_load_tests200_response_form_dict = get_page_load_tests200_response.from_dict(get_page_load_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetSipServerTest200Response.md b/tests_api/docs/GetSipServerTest200Response.md deleted file mode 100644 index bf86cfa3..00000000 --- a/tests_api/docs/GetSipServerTest200Response.md +++ /dev/null @@ -1,62 +0,0 @@ -# GetSipServerTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_user** | **str** | Username for authentication with SIP server. | [optional] -**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] -**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [default to 49153] -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] -**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] -**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] -**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] -**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] - -## Example - -```python -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSipServerTest200Response from a JSON string -get_sip_server_test200_response_instance = GetSipServerTest200Response.from_json(json) -# print the JSON string representation of the object -print GetSipServerTest200Response.to_json() - -# convert the object into a dict -get_sip_server_test200_response_dict = get_sip_server_test200_response_instance.to_dict() -# create an instance of GetSipServerTest200Response from a dict -get_sip_server_test200_response_form_dict = get_sip_server_test200_response.from_dict(get_sip_server_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetSipServerTests200Response.md b/tests_api/docs/GetSipServerTests200Response.md deleted file mode 100644 index 9b27837f..00000000 --- a/tests_api/docs/GetSipServerTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetSipServerTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[SipServerTest]**](SipServerTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_sip_server_tests200_response import GetSipServerTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSipServerTests200Response from a JSON string -get_sip_server_tests200_response_instance = GetSipServerTests200Response.from_json(json) -# print the JSON string representation of the object -print GetSipServerTests200Response.to_json() - -# convert the object into a dict -get_sip_server_tests200_response_dict = get_sip_server_tests200_response_instance.to_dict() -# create an instance of GetSipServerTests200Response from a dict -get_sip_server_tests200_response_form_dict = get_sip_server_tests200_response.from_dict(get_sip_server_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetVoiceTest200Response.md b/tests_api/docs/GetVoiceTest200Response.md deleted file mode 100644 index 2b282b15..00000000 --- a/tests_api/docs/GetVoiceTest200Response.md +++ /dev/null @@ -1,55 +0,0 @@ -# GetVoiceTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**codec** | **str** | Codec label | [optional] [readonly] -**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] -**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**port** | **int** | Port number for the chosen protocol. | [optional] -**target_agent_id** | **str** | Agent ID of the target agent for the test. | -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] - -## Example - -```python -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetVoiceTest200Response from a JSON string -get_voice_test200_response_instance = GetVoiceTest200Response.from_json(json) -# print the JSON string representation of the object -print GetVoiceTest200Response.to_json() - -# convert the object into a dict -get_voice_test200_response_dict = get_voice_test200_response_instance.to_dict() -# create an instance of GetVoiceTest200Response from a dict -get_voice_test200_response_form_dict = get_voice_test200_response.from_dict(get_voice_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetVoiceTests200Response.md b/tests_api/docs/GetVoiceTests200Response.md deleted file mode 100644 index c52b2174..00000000 --- a/tests_api/docs/GetVoiceTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetVoiceTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[VoiceTest]**](VoiceTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_voice_tests200_response import GetVoiceTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetVoiceTests200Response from a JSON string -get_voice_tests200_response_instance = GetVoiceTests200Response.from_json(json) -# print the JSON string representation of the object -print GetVoiceTests200Response.to_json() - -# convert the object into a dict -get_voice_tests200_response_dict = get_voice_tests200_response_instance.to_dict() -# create an instance of GetVoiceTests200Response from a dict -get_voice_tests200_response_form_dict = get_voice_tests200_response.from_dict(get_voice_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetWebTransactionsTest200Response.md b/tests_api/docs/GetWebTransactionsTest200Response.md deleted file mode 100644 index 58cc07e1..00000000 --- a/tests_api/docs/GetWebTransactionsTest200Response.md +++ /dev/null @@ -1,84 +0,0 @@ -# GetWebTransactionsTest200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**alert_rules** | [**List[AlertRule]**](AlertRule.md) | Contains list of enabled alert rule objects. | [optional] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] -**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'] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. | [optional] -**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] -**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] -**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] -**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] -**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] -**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] -**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] -**monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] - -## Example - -```python -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetWebTransactionsTest200Response from a JSON string -get_web_transactions_test200_response_instance = GetWebTransactionsTest200Response.from_json(json) -# print the JSON string representation of the object -print GetWebTransactionsTest200Response.to_json() - -# convert the object into a dict -get_web_transactions_test200_response_dict = get_web_transactions_test200_response_instance.to_dict() -# create an instance of GetWebTransactionsTest200Response from a dict -get_web_transactions_test200_response_form_dict = get_web_transactions_test200_response.from_dict(get_web_transactions_test200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/GetWebTransactionsTests200Response.md b/tests_api/docs/GetWebTransactionsTests200Response.md deleted file mode 100644 index 32dc588c..00000000 --- a/tests_api/docs/GetWebTransactionsTests200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# GetWebTransactionsTests200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[WebTransactionTest]**](WebTransactionTest.md) | | [optional] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetWebTransactionsTests200Response from a JSON string -get_web_transactions_tests200_response_instance = GetWebTransactionsTests200Response.from_json(json) -# print the JSON string representation of the object -print GetWebTransactionsTests200Response.to_json() - -# convert the object into a dict -get_web_transactions_tests200_response_dict = get_web_transactions_tests200_response_instance.to_dict() -# create an instance of GetWebTransactionsTests200Response from a dict -get_web_transactions_tests200_response_form_dict = get_web_transactions_tests200_response.from_dict(get_web_transactions_tests200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/HTTPServerApi.md b/tests_api/docs/HTTPServerApi.md deleted file mode 100644 index 08b0ad3b..00000000 --- a/tests_api/docs/HTTPServerApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.HTTPServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_http_server_test**](HTTPServerApi.md#create_http_server_test) | **POST** /v7/tests/http-server | Create HTTP Server test -[**delete_http_server_test**](HTTPServerApi.md#delete_http_server_test) | **DELETE** /v7/tests/http-server/{testId} | Delete HTTP Server test -[**get_http_server_test**](HTTPServerApi.md#get_http_server_test) | **GET** /v7/tests/http-server/{testId} | Get HTTP Server test -[**get_http_server_tests**](HTTPServerApi.md#get_http_server_tests) | **GET** /v7/tests/http-server | List HTTP Server tests -[**update_http_server_test**](HTTPServerApi.md#update_http_server_test) | **PUT** /v7/tests/http-server/{testId} | Update HTTP Server test - - -# **create_http_server_test** -> HttpServerTest create_http_server_test(update_http_server_test, aid=aid, expand=expand) - -Create HTTP Server test - -Creates a new HTTP Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.http_server_test import HttpServerTest -from tests_api.models.update_http_server_test import UpdateHttpServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.HTTPServerApi(api_client) - update_http_server_test = tests_api.UpdateHttpServerTest() # UpdateHttpServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create HTTP Server test - api_response = api_instance.create_http_server_test(update_http_server_test, aid=aid, expand=expand) - print("The response of HTTPServerApi->create_http_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling HTTPServerApi->create_http_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_http_server_test** | [**UpdateHttpServerTest**](UpdateHttpServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**HttpServerTest**](HttpServerTest.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 | - | -**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) - -# **delete_http_server_test** -> delete_http_server_test(test_id, aid=aid) - -Delete HTTP Server test - -Deletes the specified HTTP Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.HTTPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 test - api_instance.delete_http_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling HTTPServerApi->delete_http_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_test** -> GetHttpServerTest200Response get_http_server_test(test_id, aid=aid, expand=expand) - -Get HTTP Server test - -Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.HTTPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get HTTP Server test - api_response = api_instance.get_http_server_test(test_id, aid=aid, expand=expand) - print("The response of HTTPServerApi->get_http_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling HTTPServerApi->get_http_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetHttpServerTest200Response**](GetHttpServerTest200Response.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_http_server_tests** -> GetHttpServerTests200Response get_http_server_tests(aid=aid) - -List HTTP Server tests - -Returns a list of all HTTP Server tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_http_server_tests200_response import GetHttpServerTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.HTTPServerApi(api_client) - aid = '2067' # 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 tests - api_response = api_instance.get_http_server_tests(aid=aid) - print("The response of HTTPServerApi->get_http_server_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling HTTPServerApi->get_http_server_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 - -[**GetHttpServerTests200Response**](GetHttpServerTests200Response.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) - -# **update_http_server_test** -> GetHttpServerTest200Response update_http_server_test(test_id, update_http_server_test, aid=aid, expand=expand) - -Update HTTP Server test - -Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response -from tests_api.models.update_http_server_test import UpdateHttpServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.HTTPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_http_server_test = tests_api.UpdateHttpServerTest() # UpdateHttpServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update HTTP Server test - api_response = api_instance.update_http_server_test(test_id, update_http_server_test, aid=aid, expand=expand) - print("The response of HTTPServerApi->update_http_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling HTTPServerApi->update_http_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_http_server_test** | [**UpdateHttpServerTest**](UpdateHttpServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetHttpServerTest200Response**](GetHttpServerTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/HttpServerInstantTest.md b/tests_api/docs/HttpServerInstantTest.md deleted file mode 100644 index 17b6fa1e..00000000 --- a/tests_api/docs/HttpServerInstantTest.md +++ /dev/null @@ -1,72 +0,0 @@ -# HttpServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**headers** | **List[str]** | HTTP request headers used. | [optional] -**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'] -**download_limit** | **int** | Specifies maximum number of bytes to download from the target object. | [optional] -**dns_override** | **str** | IP address to use for DNS override. | [optional] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**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] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from tests_api.models.http_server_instant_test import HttpServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpServerInstantTest from a JSON string -http_server_instant_test_instance = HttpServerInstantTest.from_json(json) -# print the JSON string representation of the object -print HttpServerInstantTest.to_json() - -# convert the object into a dict -http_server_instant_test_dict = http_server_instant_test_instance.to_dict() -# create an instance of HttpServerInstantTest from a dict -http_server_instant_test_form_dict = http_server_instant_test.from_dict(http_server_instant_test_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/tests_api/docs/HttpServerTests.md b/tests_api/docs/HttpServerTests.md deleted file mode 100644 index 19eb50f5..00000000 --- a/tests_api/docs/HttpServerTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# HttpServerTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[HttpServerTest]**](HttpServerTest.md) | | [optional] - -## Example - -```python -from tests_api.models.http_server_tests import HttpServerTests - -# TODO update the JSON string below -json = "{}" -# create an instance of HttpServerTests from a JSON string -http_server_tests_instance = HttpServerTests.from_json(json) -# print the JSON string representation of the object -print HttpServerTests.to_json() - -# convert the object into a dict -http_server_tests_dict = http_server_tests_instance.to_dict() -# create an instance of HttpServerTests from a dict -http_server_tests_form_dict = http_server_tests.from_dict(http_server_tests_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/tests_api/docs/InstantTest.md b/tests_api/docs/InstantTest.md deleted file mode 100644 index 593c3227..00000000 --- a/tests_api/docs/InstantTest.md +++ /dev/null @@ -1,40 +0,0 @@ -# InstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] - -## Example - -```python -from tests_api.models.instant_test import InstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of InstantTest from a JSON string -instant_test_instance = InstantTest.from_json(json) -# print the JSON string representation of the object -print InstantTest.to_json() - -# convert the object into a dict -instant_test_dict = instant_test_instance.to_dict() -# create an instance of InstantTest from a dict -instant_test_form_dict = instant_test.from_dict(instant_test_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/tests_api/docs/Link.md b/tests_api/docs/Link.md deleted file mode 100644 index 5ea009ee..00000000 --- a/tests_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 tests_api.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_form_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/tests_api/docs/MapItem.md b/tests_api/docs/MapItem.md deleted file mode 100644 index bb7a2636..00000000 --- a/tests_api/docs/MapItem.md +++ /dev/null @@ -1,29 +0,0 @@ -# MapItem - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from tests_api.models.map_item import MapItem - -# TODO update the JSON string below -json = "{}" -# create an instance of MapItem from a JSON string -map_item_instance = MapItem.from_json(json) -# print the JSON string representation of the object -print MapItem.to_json() - -# convert the object into a dict -map_item_dict = map_item_instance.to_dict() -# create an instance of MapItem from a dict -map_item_form_dict = map_item.from_dict(map_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/tests_api/docs/Monitor.md b/tests_api/docs/Monitor.md deleted file mode 100644 index 1f4745b0..00000000 --- a/tests_api/docs/Monitor.md +++ /dev/null @@ -1,33 +0,0 @@ -# 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 tests_api.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_form_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/tests_api/docs/MonitorType.md b/tests_api/docs/MonitorType.md deleted file mode 100644 index 30c9de8b..00000000 --- a/tests_api/docs/MonitorType.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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/tests_api/docs/PageLoadInstantTest.md b/tests_api/docs/PageLoadInstantTest.md deleted file mode 100644 index 1cc7bdc3..00000000 --- a/tests_api/docs/PageLoadInstantTest.md +++ /dev/null @@ -1,74 +0,0 @@ -# PageLoadInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**page_load_target_time** | **int** | Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`. | [optional] -**page_load_time_limit** | **int** | Page load time limit. Must be larger than the `httpTimeLimit`. | [optional] [default to 10] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] -**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] -**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] -**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] -**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] -**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from tests_api.models.page_load_instant_test import PageLoadInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of PageLoadInstantTest from a JSON string -page_load_instant_test_instance = PageLoadInstantTest.from_json(json) -# print the JSON string representation of the object -print PageLoadInstantTest.to_json() - -# convert the object into a dict -page_load_instant_test_dict = page_load_instant_test_instance.to_dict() -# create an instance of PageLoadInstantTest from a dict -page_load_instant_test_form_dict = page_load_instant_test.from_dict(page_load_instant_test_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/tests_api/docs/PageLoadTests.md b/tests_api/docs/PageLoadTests.md deleted file mode 100644 index 7c9319d1..00000000 --- a/tests_api/docs/PageLoadTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# PageLoadTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[PageLoadTest]**](PageLoadTest.md) | | [optional] - -## Example - -```python -from tests_api.models.page_load_tests import PageLoadTests - -# TODO update the JSON string below -json = "{}" -# create an instance of PageLoadTests from a JSON string -page_load_tests_instance = PageLoadTests.from_json(json) -# print the JSON string representation of the object -print PageLoadTests.to_json() - -# convert the object into a dict -page_load_tests_dict = page_load_tests_instance.to_dict() -# create an instance of PageLoadTests from a dict -page_load_tests_form_dict = page_load_tests.from_dict(page_load_tests_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/tests_api/docs/SIPServerApi.md b/tests_api/docs/SIPServerApi.md deleted file mode 100644 index fb75c845..00000000 --- a/tests_api/docs/SIPServerApi.md +++ /dev/null @@ -1,451 +0,0 @@ -# tests_api.SIPServerApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_sip_server_test**](SIPServerApi.md#create_sip_server_test) | **POST** /v7/tests/sip-server | Create SIP Server test -[**delete_sip_server_test**](SIPServerApi.md#delete_sip_server_test) | **DELETE** /v7/tests/sip-server/{testId} | Delete SIP Server test -[**get_sip_server_test**](SIPServerApi.md#get_sip_server_test) | **GET** /v7/tests/sip-server/{testId} | Get SIP Server test -[**get_sip_server_tests**](SIPServerApi.md#get_sip_server_tests) | **GET** /v7/tests/sip-server | List SIP Server tests -[**update_sip_server_test**](SIPServerApi.md#update_sip_server_test) | **PUT** /v7/tests/sip-server/{testId} | Update SIP Server test - - -# **create_sip_server_test** -> SipServerTest create_sip_server_test(update_sip_server_test, aid=aid, expand=expand) - -Create SIP Server test - -Creates a new SIP Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.sip_server_test import SipServerTest -from tests_api.models.update_sip_server_test import UpdateSipServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.SIPServerApi(api_client) - update_sip_server_test = tests_api.UpdateSipServerTest() # UpdateSipServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create SIP Server test - api_response = api_instance.create_sip_server_test(update_sip_server_test, aid=aid, expand=expand) - print("The response of SIPServerApi->create_sip_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SIPServerApi->create_sip_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_sip_server_test** | [**UpdateSipServerTest**](UpdateSipServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**SipServerTest**](SipServerTest.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 | - | -**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) - -# **delete_sip_server_test** -> delete_sip_server_test(test_id, aid=aid) - -Delete SIP Server test - -Deletes the specified SIP Server test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.SIPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 SIP Server test - api_instance.delete_sip_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling SIPServerApi->delete_sip_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_sip_server_test** -> GetSipServerTest200Response get_sip_server_test(test_id, aid=aid, expand=expand) - -Get SIP Server test - -Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.SIPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get SIP Server test - api_response = api_instance.get_sip_server_test(test_id, aid=aid, expand=expand) - print("The response of SIPServerApi->get_sip_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SIPServerApi->get_sip_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetSipServerTest200Response**](GetSipServerTest200Response.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_sip_server_tests** -> GetSipServerTests200Response get_sip_server_tests(aid=aid) - -List SIP Server tests - -Returns a list of SIP Server tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_sip_server_tests200_response import GetSipServerTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.SIPServerApi(api_client) - aid = '2067' # 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 SIP Server tests - api_response = api_instance.get_sip_server_tests(aid=aid) - print("The response of SIPServerApi->get_sip_server_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SIPServerApi->get_sip_server_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 - -[**GetSipServerTests200Response**](GetSipServerTests200Response.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) - -# **update_sip_server_test** -> GetSipServerTest200Response update_sip_server_test(test_id, update_sip_server_test, aid=aid, expand=expand) - -Update SIP Server test - -Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response -from tests_api.models.update_sip_server_test import UpdateSipServerTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.SIPServerApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_sip_server_test = tests_api.UpdateSipServerTest() # UpdateSipServerTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update SIP Server test - api_response = api_instance.update_sip_server_test(test_id, update_sip_server_test, aid=aid, expand=expand) - print("The response of SIPServerApi->update_sip_server_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SIPServerApi->update_sip_server_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_sip_server_test** | [**UpdateSipServerTest**](UpdateSipServerTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetSipServerTest200Response**](GetSipServerTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/SelfLinks.md b/tests_api/docs/SelfLinks.md deleted file mode 100644 index 1d2c760d..00000000 --- a/tests_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.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_form_dict = self_links.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/tests_api/docs/SelfLinksLinks.md b/tests_api/docs/SelfLinksLinks.md deleted file mode 100644 index acf19c78..00000000 --- a/tests_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from tests_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/tests_api/docs/SimpleTest.md b/tests_api/docs/SimpleTest.md deleted file mode 100644 index 5a901945..00000000 --- a/tests_api/docs/SimpleTest.md +++ /dev/null @@ -1,42 +0,0 @@ -# SimpleTest - -Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.simple_test import SimpleTest - -# TODO update the JSON string below -json = "{}" -# create an instance of SimpleTest from a JSON string -simple_test_instance = SimpleTest.from_json(json) -# print the JSON string representation of the object -print SimpleTest.to_json() - -# convert the object into a dict -simple_test_dict = simple_test_instance.to_dict() -# create an instance of SimpleTest from a dict -simple_test_form_dict = simple_test.from_dict(simple_test_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/tests_api/docs/SipServerInstantTest.md b/tests_api/docs/SipServerInstantTest.md deleted file mode 100644 index fff8ac05..00000000 --- a/tests_api/docs/SipServerInstantTest.md +++ /dev/null @@ -1,57 +0,0 @@ -# SipServerInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_user** | **str** | Username for authentication with SIP server. | [optional] -**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] -**options_regex** | **str** | Options regex, this field does not require escaping. | [optional] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**port** | **int** | Target port. | [default to 49153] -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] -**register_enabled** | **bool** | Set to true to perform SIP registration on the test target with the SIP REGISTER command. | [optional] [default to False] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] -**sip_target_time** | **int** | Target time for test completion in milliseconds. | [optional] -**sip_time_limit** | **int** | Time limit in milliseconds. | [optional] [default to 5] -**target_sip_credentials** | [**TestSipCredentials**](TestSipCredentials.md) | | -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] - -## Example - -```python -from tests_api.models.sip_server_instant_test import SipServerInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of SipServerInstantTest from a JSON string -sip_server_instant_test_instance = SipServerInstantTest.from_json(json) -# print the JSON string representation of the object -print SipServerInstantTest.to_json() - -# convert the object into a dict -sip_server_instant_test_dict = sip_server_instant_test_instance.to_dict() -# create an instance of SipServerInstantTest from a dict -sip_server_instant_test_form_dict = sip_server_instant_test.from_dict(sip_server_instant_test_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/tests_api/docs/SipServerTests.md b/tests_api/docs/SipServerTests.md deleted file mode 100644 index 3cfec7e4..00000000 --- a/tests_api/docs/SipServerTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# SipServerTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[SipServerTest]**](SipServerTest.md) | | [optional] - -## Example - -```python -from tests_api.models.sip_server_tests import SipServerTests - -# TODO update the JSON string below -json = "{}" -# create an instance of SipServerTests from a JSON string -sip_server_tests_instance = SipServerTests.from_json(json) -# print the JSON string representation of the object -print SipServerTests.to_json() - -# convert the object into a dict -sip_server_tests_dict = sip_server_tests_instance.to_dict() -# create an instance of SipServerTests from a dict -sip_server_tests_form_dict = sip_server_tests.from_dict(sip_server_tests_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/tests_api/docs/SipTestProtocol.md b/tests_api/docs/SipTestProtocol.md deleted file mode 100644 index 624902b4..00000000 --- a/tests_api/docs/SipTestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# SipTestProtocol - -Transport layer for SIP communication. - -## 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/tests_api/docs/TestAuthType.md b/tests_api/docs/TestAuthType.md deleted file mode 100644 index cea7b651..00000000 --- a/tests_api/docs/TestAuthType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestAuthType - -HTTP authentication type. - -## 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/tests_api/docs/TestCustomHeaders.md b/tests_api/docs/TestCustomHeaders.md deleted file mode 100644 index 820319e4..00000000 --- a/tests_api/docs/TestCustomHeaders.md +++ /dev/null @@ -1,30 +0,0 @@ -# TestCustomHeaders - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**root** | [**TestCustomHeadersRoot**](TestCustomHeadersRoot.md) | | [optional] -**domains** | [**Dict[str, MapItem]**](MapItem.md) | Use these HTTP headers for the specified domains. | [optional] -**all** | [**TestCustomHeadersAll**](TestCustomHeadersAll.md) | | [optional] - -## Example - -```python -from tests_api.models.test_custom_headers import TestCustomHeaders - -# TODO update the JSON string below -json = "{}" -# create an instance of TestCustomHeaders from a JSON string -test_custom_headers_instance = TestCustomHeaders.from_json(json) -# print the JSON string representation of the object -print TestCustomHeaders.to_json() - -# convert the object into a dict -test_custom_headers_dict = test_custom_headers_instance.to_dict() -# create an instance of TestCustomHeaders from a dict -test_custom_headers_form_dict = test_custom_headers.from_dict(test_custom_headers_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/tests_api/docs/TestCustomHeadersAll.md b/tests_api/docs/TestCustomHeadersAll.md deleted file mode 100644 index e89caa14..00000000 --- a/tests_api/docs/TestCustomHeadersAll.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestCustomHeadersAll - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from tests_api.models.test_custom_headers_all import TestCustomHeadersAll - -# TODO update the JSON string below -json = "{}" -# create an instance of TestCustomHeadersAll from a JSON string -test_custom_headers_all_instance = TestCustomHeadersAll.from_json(json) -# print the JSON string representation of the object -print TestCustomHeadersAll.to_json() - -# convert the object into a dict -test_custom_headers_all_dict = test_custom_headers_all_instance.to_dict() -# create an instance of TestCustomHeadersAll from a dict -test_custom_headers_all_form_dict = test_custom_headers_all.from_dict(test_custom_headers_all_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/tests_api/docs/TestCustomHeadersRoot.md b/tests_api/docs/TestCustomHeadersRoot.md deleted file mode 100644 index 3a32e483..00000000 --- a/tests_api/docs/TestCustomHeadersRoot.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestCustomHeadersRoot - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from tests_api.models.test_custom_headers_root import TestCustomHeadersRoot - -# TODO update the JSON string below -json = "{}" -# create an instance of TestCustomHeadersRoot from a JSON string -test_custom_headers_root_instance = TestCustomHeadersRoot.from_json(json) -# print the JSON string representation of the object -print TestCustomHeadersRoot.to_json() - -# convert the object into a dict -test_custom_headers_root_dict = test_custom_headers_root_instance.to_dict() -# create an instance of TestCustomHeadersRoot from a dict -test_custom_headers_root_form_dict = test_custom_headers_root.from_dict(test_custom_headers_root_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/tests_api/docs/TestDirection.md b/tests_api/docs/TestDirection.md deleted file mode 100644 index 59dab3fb..00000000 --- a/tests_api/docs/TestDirection.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDirection - -Direction of the test, which affects how results are shown. - -## 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/tests_api/docs/TestDnsServer.md b/tests_api/docs/TestDnsServer.md deleted file mode 100644 index c809b201..00000000 --- a/tests_api/docs/TestDnsServer.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestDnsServer - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**server_id** | **str** | Unique identifier of the DNS server. | [optional] -**server_name** | **str** | Fully qualified domain name (FQDN) of DNS server. | [optional] - -## Example - -```python -from tests_api.models.test_dns_server import TestDnsServer - -# TODO update the JSON string below -json = "{}" -# create an instance of TestDnsServer from a JSON string -test_dns_server_instance = TestDnsServer.from_json(json) -# print the JSON string representation of the object -print TestDnsServer.to_json() - -# convert the object into a dict -test_dns_server_dict = test_dns_server_instance.to_dict() -# create an instance of TestDnsServer from a dict -test_dns_server_form_dict = test_dns_server.from_dict(test_dns_server_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/tests_api/docs/TestDnsTransportProtocol.md b/tests_api/docs/TestDnsTransportProtocol.md deleted file mode 100644 index 1bcfdbf3..00000000 --- a/tests_api/docs/TestDnsTransportProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDnsTransportProtocol - -Transport protocol used for DNS requests. - -## 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/tests_api/docs/TestDscpId.md b/tests_api/docs/TestDscpId.md deleted file mode 100644 index aa714a34..00000000 --- a/tests_api/docs/TestDscpId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestDscpId - -DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) - -## 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/tests_api/docs/TestInterval.md b/tests_api/docs/TestInterval.md deleted file mode 100644 index e0e57d69..00000000 --- a/tests_api/docs/TestInterval.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestInterval - -Interval between test runs in seconds. - -## 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/tests_api/docs/TestIpv6Policy.md b/tests_api/docs/TestIpv6Policy.md deleted file mode 100644 index 81e61009..00000000 --- a/tests_api/docs/TestIpv6Policy.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestIpv6Policy - -IP version policy. Overrides the IPv6 policy configured at the agent level. - -## 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/tests_api/docs/TestLabelsInner.md b/tests_api/docs/TestLabelsInner.md deleted file mode 100644 index 1c0133ae..00000000 --- a/tests_api/docs/TestLabelsInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# TestLabelsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label_id** | **str** | Label ID. | [optional] -**name** | **str** | Name of the label. | [optional] -**is_built_in** | **bool** | Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User). | [optional] - -## Example - -```python -from tests_api.models.test_labels_inner import TestLabelsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of TestLabelsInner from a JSON string -test_labels_inner_instance = TestLabelsInner.from_json(json) -# print the JSON string representation of the object -print TestLabelsInner.to_json() - -# convert the object into a dict -test_labels_inner_dict = test_labels_inner_instance.to_dict() -# create an instance of TestLabelsInner from a dict -test_labels_inner_form_dict = test_labels_inner.from_dict(test_labels_inner_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/tests_api/docs/TestPageLoadingStrategy.md b/tests_api/docs/TestPageLoadingStrategy.md deleted file mode 100644 index d4f92f00..00000000 --- a/tests_api/docs/TestPageLoadingStrategy.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestPageLoadingStrategy - -* `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. - -## 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/tests_api/docs/TestPathTraceMode.md b/tests_api/docs/TestPathTraceMode.md deleted file mode 100644 index f93da70d..00000000 --- a/tests_api/docs/TestPathTraceMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestPathTraceMode - -Select `inSession` to perform the path trace within a TCP session. - -## 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/tests_api/docs/TestProbeMode.md b/tests_api/docs/TestProbeMode.md deleted file mode 100644 index 2e0ad614..00000000 --- a/tests_api/docs/TestProbeMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProbeMode - -Probe mode used by network test, only valid when the protocol is set to TCP. - -## 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/tests_api/docs/TestProtocol.md b/tests_api/docs/TestProtocol.md deleted file mode 100644 index 32cac130..00000000 --- a/tests_api/docs/TestProtocol.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestProtocol - -Protocol used by dependent network tests (end-to-end, path trace, PMTUD). - -## 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/tests_api/docs/TestSharedAccountsInner.md b/tests_api/docs/TestSharedAccountsInner.md deleted file mode 100644 index 90458aca..00000000 --- a/tests_api/docs/TestSharedAccountsInner.md +++ /dev/null @@ -1,29 +0,0 @@ -# TestSharedAccountsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**aid** | **str** | Account group ID. | [optional] -**name** | **str** | Account group name. | [optional] - -## Example - -```python -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of TestSharedAccountsInner from a JSON string -test_shared_accounts_inner_instance = TestSharedAccountsInner.from_json(json) -# print the JSON string representation of the object -print TestSharedAccountsInner.to_json() - -# convert the object into a dict -test_shared_accounts_inner_dict = test_shared_accounts_inner_instance.to_dict() -# create an instance of TestSharedAccountsInner from a dict -test_shared_accounts_inner_form_dict = test_shared_accounts_inner.from_dict(test_shared_accounts_inner_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/tests_api/docs/TestSipCredentials.md b/tests_api/docs/TestSipCredentials.md deleted file mode 100644 index 1d1a6e18..00000000 --- a/tests_api/docs/TestSipCredentials.md +++ /dev/null @@ -1,33 +0,0 @@ -# TestSipCredentials - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_user** | **str** | Username for authentication with SIP server. | [optional] -**password** | **str** | Password for authentication with SIP server. | [optional] -**port** | **int** | Port number for the chosen protocol. | -**protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] -**sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] -**user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] - -## Example - -```python -from tests_api.models.test_sip_credentials import TestSipCredentials - -# TODO update the JSON string below -json = "{}" -# create an instance of TestSipCredentials from a JSON string -test_sip_credentials_instance = TestSipCredentials.from_json(json) -# print the JSON string representation of the object -print TestSipCredentials.to_json() - -# convert the object into a dict -test_sip_credentials_dict = test_sip_credentials_instance.to_dict() -# create an instance of TestSipCredentials from a dict -test_sip_credentials_form_dict = test_sip_credentials.from_dict(test_sip_credentials_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/tests_api/docs/TestSslVersionId.md b/tests_api/docs/TestSslVersionId.md deleted file mode 100644 index fb9ac0f8..00000000 --- a/tests_api/docs/TestSslVersionId.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestSslVersionId - -SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - -## 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/tests_api/docs/TestType.md b/tests_api/docs/TestType.md deleted file mode 100644 index ae5d924e..00000000 --- a/tests_api/docs/TestType.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestType - -This is a read only value, as test type is implicit in the test creation url. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/UnauthorizedError.md b/tests_api/docs/UnauthorizedError.md deleted file mode 100644 index 55006614..00000000 --- a/tests_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from tests_api.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_form_dict = unauthorized_error.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/tests_api/docs/UnexpandedInstantTest.md b/tests_api/docs/UnexpandedInstantTest.md deleted file mode 100644 index 19d29fa8..00000000 --- a/tests_api/docs/UnexpandedInstantTest.md +++ /dev/null @@ -1,38 +0,0 @@ -# UnexpandedInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | [**TestType**](TestType.md) | | [optional] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.unexpanded_instant_test import UnexpandedInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTest from a JSON string -unexpanded_instant_test_instance = UnexpandedInstantTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTest.to_json() - -# convert the object into a dict -unexpanded_instant_test_dict = unexpanded_instant_test_instance.to_dict() -# create an instance of UnexpandedInstantTest from a dict -unexpanded_instant_test_form_dict = unexpanded_instant_test.from_dict(unexpanded_instant_test_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/tests_api/docs/UnexpandedInstantTestLinks.md b/tests_api/docs/UnexpandedInstantTestLinks.md deleted file mode 100644 index 246c9a7f..00000000 --- a/tests_api/docs/UnexpandedInstantTestLinks.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedInstantTestLinks - -A list of links that can be accessed to get more information - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**UnexpandedInstantTestLinksSelf**](UnexpandedInstantTestLinksSelf.md) | | [optional] -**test_results** | [**UnexpandedInstantTestLinksTestResults**](UnexpandedInstantTestLinksTestResults.md) | | [optional] - -## Example - -```python -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinks from a JSON string -unexpanded_instant_test_links_instance = UnexpandedInstantTestLinks.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinks.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_dict = unexpanded_instant_test_links_instance.to_dict() -# create an instance of UnexpandedInstantTestLinks from a dict -unexpanded_instant_test_links_form_dict = unexpanded_instant_test_links.from_dict(unexpanded_instant_test_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/tests_api/docs/UnexpandedInstantTestLinksSelf.md b/tests_api/docs/UnexpandedInstantTestLinksSelf.md deleted file mode 100644 index 7c93aa87..00000000 --- a/tests_api/docs/UnexpandedInstantTestLinksSelf.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksSelf - - -## 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 tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksSelf from a JSON string -unexpanded_instant_test_links_self_instance = UnexpandedInstantTestLinksSelf.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksSelf.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_self_dict = unexpanded_instant_test_links_self_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksSelf from a dict -unexpanded_instant_test_links_self_form_dict = unexpanded_instant_test_links_self.from_dict(unexpanded_instant_test_links_self_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/tests_api/docs/UnexpandedInstantTestLinksTestResults.md b/tests_api/docs/UnexpandedInstantTestLinksTestResults.md deleted file mode 100644 index 8e581cee..00000000 --- a/tests_api/docs/UnexpandedInstantTestLinksTestResults.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnexpandedInstantTestLinksTestResults - - -## 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 tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedInstantTestLinksTestResults from a JSON string -unexpanded_instant_test_links_test_results_instance = UnexpandedInstantTestLinksTestResults.from_json(json) -# print the JSON string representation of the object -print UnexpandedInstantTestLinksTestResults.to_json() - -# convert the object into a dict -unexpanded_instant_test_links_test_results_dict = unexpanded_instant_test_links_test_results_instance.to_dict() -# create an instance of UnexpandedInstantTestLinksTestResults from a dict -unexpanded_instant_test_links_test_results_form_dict = unexpanded_instant_test_links_test_results.from_dict(unexpanded_instant_test_links_test_results_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/tests_api/docs/UnexpandedTest.md b/tests_api/docs/UnexpandedTest.md deleted file mode 100644 index 599c93da..00000000 --- a/tests_api/docs/UnexpandedTest.md +++ /dev/null @@ -1,30 +0,0 @@ -# UnexpandedTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**interval** | [**TestInterval**](TestInterval.md) | | [optional] -**alerts_enabled** | **bool** | Indicates if alerts are enabled. | [optional] -**enabled** | **bool** | Test is enabled. | [optional] [default to True] - -## Example - -```python -from tests_api.models.unexpanded_test import UnexpandedTest - -# TODO update the JSON string below -json = "{}" -# create an instance of UnexpandedTest from a JSON string -unexpanded_test_instance = UnexpandedTest.from_json(json) -# print the JSON string representation of the object -print UnexpandedTest.to_json() - -# convert the object into a dict -unexpanded_test_dict = unexpanded_test_instance.to_dict() -# create an instance of UnexpandedTest from a dict -unexpanded_test_form_dict = unexpanded_test.from_dict(unexpanded_test_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/tests_api/docs/UpdatePathVisInterfaceGroup200Response.md b/tests_api/docs/UpdatePathVisInterfaceGroup200Response.md deleted file mode 100644 index 974eec53..00000000 --- a/tests_api/docs/UpdatePathVisInterfaceGroup200Response.md +++ /dev/null @@ -1,33 +0,0 @@ -# UpdatePathVisInterfaceGroup200Response - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**aid** | **str** | Account Group Id | [optional] [readonly] -**group_id** | **str** | Group ID | [optional] [readonly] -**group_name** | **str** | Name of the path visualization interface group | [optional] -**ip_addresses** | **List[str]** | Array of IP addresses associated with the interface group | [optional] -**rdns_regexes** | **List[str]** | Array of RDNS Regexes associated with the interface group | [optional] [readonly] -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from tests_api.models.update_path_vis_interface_group200_response import UpdatePathVisInterfaceGroup200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdatePathVisInterfaceGroup200Response from a JSON string -update_path_vis_interface_group200_response_instance = UpdatePathVisInterfaceGroup200Response.from_json(json) -# print the JSON string representation of the object -print UpdatePathVisInterfaceGroup200Response.to_json() - -# convert the object into a dict -update_path_vis_interface_group200_response_dict = update_path_vis_interface_group200_response_instance.to_dict() -# create an instance of UpdatePathVisInterfaceGroup200Response from a dict -update_path_vis_interface_group200_response_form_dict = update_path_vis_interface_group200_response.from_dict(update_path_vis_interface_group200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/tests_api/docs/VoiceApi.md b/tests_api/docs/VoiceApi.md deleted file mode 100644 index 9c519bf3..00000000 --- a/tests_api/docs/VoiceApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.VoiceApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_voice_test**](VoiceApi.md#create_voice_test) | **POST** /v7/tests/voice | Create Voice test -[**delete_voice_test**](VoiceApi.md#delete_voice_test) | **DELETE** /v7/tests/voice/{testId} | Delete Voice test -[**get_voice_test**](VoiceApi.md#get_voice_test) | **GET** /v7/tests/voice/{testId} | Get Voice test -[**get_voice_tests**](VoiceApi.md#get_voice_tests) | **GET** /v7/tests/voice | List Voice tests -[**update_voice_test**](VoiceApi.md#update_voice_test) | **PUT** /v7/tests/voice/{testId} | Update Voice test - - -# **create_voice_test** -> VoiceTest create_voice_test(update_voice_test, aid=aid, expand=expand) - -Create Voice test - -Creates a new Voice test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.update_voice_test import UpdateVoiceTest -from tests_api.models.voice_test import VoiceTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.VoiceApi(api_client) - update_voice_test = tests_api.UpdateVoiceTest() # UpdateVoiceTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create Voice test - api_response = api_instance.create_voice_test(update_voice_test, aid=aid, expand=expand) - print("The response of VoiceApi->create_voice_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling VoiceApi->create_voice_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_voice_test** | [**UpdateVoiceTest**](UpdateVoiceTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**VoiceTest**](VoiceTest.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 | - | -**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) - -# **delete_voice_test** -> delete_voice_test(test_id, aid=aid) - -Delete Voice test - -Deletes the specified Voice test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.VoiceApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 Voice test - api_instance.delete_voice_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling VoiceApi->delete_voice_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_voice_test** -> GetVoiceTest200Response get_voice_test(test_id, aid=aid, expand=expand) - -Get Voice test - -Returns details for a Voice test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.VoiceApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get Voice test - api_response = api_instance.get_voice_test(test_id, aid=aid, expand=expand) - print("The response of VoiceApi->get_voice_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling VoiceApi->get_voice_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetVoiceTest200Response**](GetVoiceTest200Response.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_voice_tests** -> GetVoiceTests200Response get_voice_tests(aid=aid) - -List Voice tests - -Returns a list of Voice tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_voice_tests200_response import GetVoiceTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.VoiceApi(api_client) - aid = '2067' # 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 Voice tests - api_response = api_instance.get_voice_tests(aid=aid) - print("The response of VoiceApi->get_voice_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling VoiceApi->get_voice_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 - -[**GetVoiceTests200Response**](GetVoiceTests200Response.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) - -# **update_voice_test** -> GetVoiceTest200Response update_voice_test(test_id, update_voice_test, aid=aid, expand=expand) - -Update Voice test - -Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response -from tests_api.models.update_voice_test import UpdateVoiceTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.VoiceApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_voice_test = tests_api.UpdateVoiceTest() # UpdateVoiceTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update Voice test - api_response = api_instance.update_voice_test(test_id, update_voice_test, aid=aid, expand=expand) - print("The response of VoiceApi->update_voice_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling VoiceApi->update_voice_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_voice_test** | [**UpdateVoiceTest**](UpdateVoiceTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetVoiceTest200Response**](GetVoiceTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/VoiceInstantTest.md b/tests_api/docs/VoiceInstantTest.md deleted file mode 100644 index 15eadc7f..00000000 --- a/tests_api/docs/VoiceInstantTest.md +++ /dev/null @@ -1,50 +0,0 @@ -# VoiceInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**codec** | **str** | Codec label | [optional] [readonly] -**codec_id** | **str** | Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab) | [optional] -**dscp** | **str** | DSCP label. | [optional] [readonly] -**dscp_id** | [**TestDscpId**](TestDscpId.md) | | [optional] -**duration** | **int** | Duration of the test in seconds. | [optional] [default to 5] -**jitter_buffer** | **int** | De-jitter buffer size in seconds. | [optional] [default to 40] -**num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] -**port** | **int** | Port number for the chosen protocol. | [optional] -**target_agent_id** | **str** | Agent ID of the target agent for the test. | - -## Example - -```python -from tests_api.models.voice_instant_test import VoiceInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of VoiceInstantTest from a JSON string -voice_instant_test_instance = VoiceInstantTest.from_json(json) -# print the JSON string representation of the object -print VoiceInstantTest.to_json() - -# convert the object into a dict -voice_instant_test_dict = voice_instant_test_instance.to_dict() -# create an instance of VoiceInstantTest from a dict -voice_instant_test_form_dict = voice_instant_test.from_dict(voice_instant_test_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/tests_api/docs/VoiceTests.md b/tests_api/docs/VoiceTests.md deleted file mode 100644 index 4f31d56f..00000000 --- a/tests_api/docs/VoiceTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# VoiceTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[VoiceTest]**](VoiceTest.md) | | [optional] - -## Example - -```python -from tests_api.models.voice_tests import VoiceTests - -# TODO update the JSON string below -json = "{}" -# create an instance of VoiceTests from a JSON string -voice_tests_instance = VoiceTests.from_json(json) -# print the JSON string representation of the object -print VoiceTests.to_json() - -# convert the object into a dict -voice_tests_dict = voice_tests_instance.to_dict() -# create an instance of VoiceTests from a dict -voice_tests_form_dict = voice_tests.from_dict(voice_tests_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/tests_api/docs/WebTransactionApi.md b/tests_api/docs/WebTransactionApi.md deleted file mode 100644 index 799faa3c..00000000 --- a/tests_api/docs/WebTransactionApi.md +++ /dev/null @@ -1,453 +0,0 @@ -# tests_api.WebTransactionApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_web_transactions_test**](WebTransactionApi.md#create_web_transactions_test) | **POST** /v7/tests/web-transactions | Create Web Transactions test -[**delete_web_transactions_test**](WebTransactionApi.md#delete_web_transactions_test) | **DELETE** /v7/tests/web-transactions/{testId} | Delete Web Transactions test -[**get_web_transactions_test**](WebTransactionApi.md#get_web_transactions_test) | **GET** /v7/tests/web-transactions/{testId} | Get Web Transactions test -[**get_web_transactions_tests**](WebTransactionApi.md#get_web_transactions_tests) | **GET** /v7/tests/web-transactions | List Web Transactions tests -[**update_web_transactions_test**](WebTransactionApi.md#update_web_transactions_test) | **PUT** /v7/tests/web-transactions/{testId} | Update Web Transactions test - - -# **create_web_transactions_test** -> WebTransactionTest create_web_transactions_test(update_web_transaction_test, aid=aid, expand=expand) - -Create Web Transactions test - -Creates a new Web Transactions test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest -from tests_api.models.web_transaction_test import WebTransactionTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.WebTransactionApi(api_client) - update_web_transaction_test = tests_api.UpdateWebTransactionTest() # UpdateWebTransactionTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Create Web Transactions test - api_response = api_instance.create_web_transactions_test(update_web_transaction_test, aid=aid, expand=expand) - print("The response of WebTransactionApi->create_web_transactions_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionApi->create_web_transactions_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **update_web_transaction_test** | [**UpdateWebTransactionTest**](UpdateWebTransactionTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**WebTransactionTest**](WebTransactionTest.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 | - | -**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) - -# **delete_web_transactions_test** -> delete_web_transactions_test(test_id, aid=aid) - -Delete Web Transactions test - -Deletes the specified Web Transactions test. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.WebTransactionApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 Web Transactions test - api_instance.delete_web_transactions_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling WebTransactionApi->delete_web_transactions_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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 | - | -**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_web_transactions_test** -> GetWebTransactionsTest200Response get_web_transactions_test(test_id, aid=aid, expand=expand) - -Get Web Transactions test - -Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.WebTransactionApi(api_client) - test_id = '281474976710706' # str | ID of the test - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Get Web Transactions test - api_response = api_instance.get_web_transactions_test(test_id, aid=aid, expand=expand) - print("The response of WebTransactionApi->get_web_transactions_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionApi->get_web_transactions_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the 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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetWebTransactionsTest200Response**](GetWebTransactionsTest200Response.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_web_transactions_tests** -> GetWebTransactionsTests200Response get_web_transactions_tests(aid=aid) - -List Web Transactions tests - -Returns a list of all Web Transactions tests and saved events. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.WebTransactionApi(api_client) - aid = '2067' # 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 Web Transactions tests - api_response = api_instance.get_web_transactions_tests(aid=aid) - print("The response of WebTransactionApi->get_web_transactions_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionApi->get_web_transactions_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 - -[**GetWebTransactionsTests200Response**](GetWebTransactionsTests200Response.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) - -# **update_web_transactions_test** -> GetWebTransactionsTest200Response update_web_transactions_test(test_id, update_web_transaction_test, aid=aid, expand=expand) - -Update Web Transactions test - -Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import tests_api -from tests_api.models.expand import Expand -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest -from tests_api.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 = tests_api.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 = tests_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with tests_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = tests_api.WebTransactionApi(api_client) - test_id = '281474976710706' # str | ID of the test - update_web_transaction_test = tests_api.UpdateWebTransactionTest() # UpdateWebTransactionTest | - aid = '2067' # 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 = [tests_api.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional) - - try: - # Update Web Transactions test - api_response = api_instance.update_web_transactions_test(test_id, update_web_transaction_test, aid=aid, expand=expand) - print("The response of WebTransactionApi->update_web_transactions_test:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionApi->update_web_transactions_test: %s\n" % e) -``` - - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| ID of the test | - **update_web_transaction_test** | [**UpdateWebTransactionTest**](UpdateWebTransactionTest.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] - **expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional] - -### Return type - -[**GetWebTransactionsTest200Response**](GetWebTransactionsTest200Response.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 | - | -**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) - diff --git a/tests_api/docs/WebTransactionInstantTest.md b/tests_api/docs/WebTransactionInstantTest.md deleted file mode 100644 index 4cecb70b..00000000 --- a/tests_api/docs/WebTransactionInstantTest.md +++ /dev/null @@ -1,77 +0,0 @@ -# WebTransactionInstantTest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_by** | **str** | User that created the test. | [optional] [readonly] -**created_date** | **datetime** | UTC created date (ISO date-time format). | [optional] [readonly] -**description** | **str** | A description of the test. | [optional] -**live_share** | **bool** | Indicates if the test is shared with the account group. | [optional] [readonly] -**modified_by** | **str** | User that modified the test. | [optional] [readonly] -**modified_date** | **datetime** | UTC last modification date (ISO date-time format). | [optional] [readonly] -**saved_event** | **bool** | Indicates if the test is a saved event. | [optional] [readonly] -**test_id** | **str** | Each test is assigned an unique ID; this is used to access test information and results from other endpoints. | [optional] [readonly] -**test_name** | **str** | The name of the test. Test name must be unique. | [optional] -**type** | **str** | | [optional] [readonly] -**links** | [**UnexpandedInstantTestLinks**](UnexpandedInstantTestLinks.md) | | [optional] -**labels** | [**List[TestLabelsInner]**](TestLabelsInner.md) | | [optional] [readonly] -**shared_with_accounts** | [**List[TestSharedAccountsInner]**](TestSharedAccountsInner.md) | | [optional] [readonly] -**agents** | [**List[Agent]**](Agent.md) | Contains list of agents. | [readonly] -**auth_type** | [**TestAuthType**](TestAuthType.md) | | [optional] -**bandwidth_measurements** | **bool** | Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test. | [optional] -**client_certificate** | **str** | String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate. | [optional] -**content_regex** | **str** | Verify content using a regular expression. This field does not require escaping. | [optional] -**credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] -**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'] -**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] -**include_headers** | **bool** | Set to `true` to capture response headers for objects loaded by the test. | [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] -**password** | **str** | Password for Basic/NTLM authentication. | [optional] -**path_trace_mode** | [**TestPathTraceMode**](TestPathTraceMode.md) | | [optional] -**probe_mode** | [**TestProbeMode**](TestProbeMode.md) | | [optional] -**protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] -**ssl_version** | **str** | Reflects the verbose SSL protocol version used by a test. | [optional] [readonly] -**ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] -**target_time** | **int** | Target time for completion, defaults to 50% of time limit specified in seconds. | [optional] -**time_limit** | **int** | Time limit for transaction in seconds. | [optional] [default to 30] -**transaction_script** | **str** | JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ). | -**url** | **str** | Target for the test. | -**use_ntlm** | **bool** | Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set. | [optional] -**user_agent** | **str** | User-agent string to be provided during the test. | [optional] -**username** | **str** | Username for Basic/NTLM authentication. | [optional] -**verify_certificate** | **bool** | Ignore or acknowledge certificate errors. Set to false to ignore certificate errors. | [optional] [default to False] -**block_domains** | **str** | Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests. | [optional] -**disable_screenshot** | **bool** | Enables or disables screenshots on error. Set true to not capture | [optional] [default to False] -**allow_mic_and_camera** | **bool** | Set true allow the use of a fake mic and camera in the browser. | [optional] [default to False] -**allow_geolocation** | **bool** | Set true to use the agent’s geolocation by the web page. | [optional] [default to False] -**browser_language** | **str** | Set one of the available browser language that you want to use to configure the browser. | [optional] -**page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] -**fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] - -## Example - -```python -from tests_api.models.web_transaction_instant_test import WebTransactionInstantTest - -# TODO update the JSON string below -json = "{}" -# create an instance of WebTransactionInstantTest from a JSON string -web_transaction_instant_test_instance = WebTransactionInstantTest.from_json(json) -# print the JSON string representation of the object -print WebTransactionInstantTest.to_json() - -# convert the object into a dict -web_transaction_instant_test_dict = web_transaction_instant_test_instance.to_dict() -# create an instance of WebTransactionInstantTest from a dict -web_transaction_instant_test_form_dict = web_transaction_instant_test.from_dict(web_transaction_instant_test_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/tests_api/docs/WebTransactionTests.md b/tests_api/docs/WebTransactionTests.md deleted file mode 100644 index 35925529..00000000 --- a/tests_api/docs/WebTransactionTests.md +++ /dev/null @@ -1,28 +0,0 @@ -# WebTransactionTests - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**tests** | [**List[WebTransactionTest]**](WebTransactionTest.md) | | [optional] - -## Example - -```python -from tests_api.models.web_transaction_tests import WebTransactionTests - -# TODO update the JSON string below -json = "{}" -# create an instance of WebTransactionTests from a JSON string -web_transaction_tests_instance = WebTransactionTests.from_json(json) -# print the JSON string representation of the object -print WebTransactionTests.to_json() - -# convert the object into a dict -web_transaction_tests_dict = web_transaction_tests_instance.to_dict() -# create an instance of WebTransactionTests from a dict -web_transaction_tests_form_dict = web_transaction_tests.from_dict(web_transaction_tests_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/tests_api/git_push.sh b/tests_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/tests_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/tests_api/pyproject.toml b/tests_api/pyproject.toml deleted file mode 100644 index b16d7f47..00000000 --- a/tests_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "tests_api" -version = "1.0.0" -description = "Tests API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Tests API"] -include = ["tests_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/tests_api/setup.py b/tests_api/setup.py deleted file mode 100644 index 6a2a08be..00000000 --- a/tests_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "tests-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Tests API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Tests API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - """, # noqa: E501 - package_data={"tests_api": ["py.typed"]}, -) diff --git a/tests_api/test-requirements.txt b/tests_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/tests_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/tests_api/test/test_agent.py b/tests_api/test/test_agent.py deleted file mode 100644 index 8a0017e7..00000000 --- a/tests_api/test/test_agent.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.agent import Agent - -class TestAgent(unittest.TestCase): - """Agent unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Agent: - """Test Agent - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Agent` - """ - model = Agent() - if include_optional: - return Agent( - ip_addresses = [99.139.65.220, 99.139.65.221], - public_ip_addresses = [192.168.1.78, 192.168.1.79], - network = 'AT&T Services, Inc. (AS 7018)', - agent_id = '281474976710706', - agent_name = 'thousandeyes-stg-va-254', - agent_type = 'enterprise-cluster', - location = 'San Francisco Bay Area', - country_id = 'US', - enabled = True, - verify_ssl_certificates = True - ) - else: - return Agent( - ) - """ - - def testAgent(self): - """Test Agent""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_agent_base.py b/tests_api/test/test_agent_base.py deleted file mode 100644 index 6ca989c8..00000000 --- a/tests_api/test/test_agent_base.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.agent_base import AgentBase - -class TestAgentBase(unittest.TestCase): - """AgentBase unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentBase: - """Test AgentBase - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentBase` - """ - model = AgentBase() - if include_optional: - return AgentBase( - ip_addresses = ["99.139.65.220","99.139.65.221"], - public_ip_addresses = ["192.168.1.78","192.168.1.79"], - network = 'AT&T Services, Inc. (AS 7018)' - ) - else: - return AgentBase( - ) - """ - - def testAgentBase(self): - """Test AgentBase""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_agent_to_agent_api.py b/tests_api/test/test_agent_to_agent_api.py deleted file mode 100644 index 5ad4514c..00000000 --- a/tests_api/test/test_agent_to_agent_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_agent_to_agent_test - - Create Agent to Agent test - """ - pass - - def test_delete_agent_to_agent_test(self) -> None: - """Test case for delete_agent_to_agent_test - - Delete Agent to Agent test - """ - pass - - def test_get_agent_to_agent_test(self) -> None: - """Test case for get_agent_to_agent_test - - Get Agent to Agent test - """ - pass - - def test_get_agent_to_agent_tests(self) -> None: - """Test case for get_agent_to_agent_tests - - List Agent to Agent tests - """ - pass - - def test_update_agent_to_agent_test(self) -> None: - """Test case for update_agent_to_agent_test - - Update Agent to Agent test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_agent_to_agent_instant_test.py b/tests_api/test/test_agent_to_agent_instant_test.py deleted file mode 100644 index 333c24d9..00000000 --- a/tests_api/test/test_agent_to_agent_instant_test.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest - -class TestAgentToAgentInstantTest(unittest.TestCase): - """AgentToAgentInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentToAgentInstantTest: - """Test AgentToAgentInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentToAgentInstantTest` - """ - model = AgentToAgentInstantTest() - if include_optional: - return AgentToAgentInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-agent', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - direction = 'to-target', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - mss = 20, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - target_agent_id = '2954', - throughput_measurements = True, - throughput_duration = 5000, - throughput_rate = 8, - fixed_packet_rate = 50 - ) - else: - return AgentToAgentInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - target_agent_id = '2954', - ) - """ - - def testAgentToAgentInstantTest(self): - """Test AgentToAgentInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_agent_to_agent_test_protocol.py b/tests_api/test/test_agent_to_agent_test_protocol.py deleted file mode 100644 index f0f59da8..00000000 --- a/tests_api/test/test_agent_to_agent_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol - -class TestAgentToAgentTestProtocol(unittest.TestCase): - """AgentToAgentTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAgentToAgentTestProtocol(self): - """Test AgentToAgentTestProtocol""" - # inst = AgentToAgentTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_agent_to_server_api.py b/tests_api/test/test_agent_to_server_api.py deleted file mode 100644 index 91dbbf93..00000000 --- a/tests_api/test/test_agent_to_server_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_agent_to_server_test - - Create Agent to Server test - """ - pass - - def test_delete_agent_to_server_test(self) -> None: - """Test case for delete_agent_to_server_test - - Delete Agent to Server test - """ - pass - - def test_get_agent_to_server_test(self) -> None: - """Test case for get_agent_to_server_test - - Get Agent to Server test - """ - pass - - def test_get_agent_to_server_tests(self) -> None: - """Test case for get_agent_to_server_tests - - List Agent to Server tests - """ - pass - - def test_update_agent_to_server_test(self) -> None: - """Test case for update_agent_to_server_test - - Update Agent to Server test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_agent_to_server_instant_test.py b/tests_api/test/test_agent_to_server_instant_test.py deleted file mode 100644 index 7bc1b36e..00000000 --- a/tests_api/test/test_agent_to_server_instant_test.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest - -class TestAgentToServerInstantTest(unittest.TestCase): - """AgentToServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentToServerInstantTest: - """Test AgentToServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentToServerInstantTest` - """ - model = AgentToServerInstantTest() - if include_optional: - return AgentToServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - continuous_mode = False, - fixed_packet_rate = 25, - mtu_measurements = False, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - probe_mode = 'auto', - protocol = 'tcp', - server = 'www.thousandeyes.com', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - ipv6_policy = 'use-agent-policy', - ping_payload_size = 0, - network_measurements = True - ) - else: - return AgentToServerInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - server = 'www.thousandeyes.com', - ) - """ - - def testAgentToServerInstantTest(self): - """Test AgentToServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_alert_rounds_violation_mode.py b/tests_api/test/test_alert_rounds_violation_mode.py deleted file mode 100644 index 0505b486..00000000 --- a/tests_api/test/test_alert_rounds_violation_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode - -class TestAlertRoundsViolationMode(unittest.TestCase): - """AlertRoundsViolationMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAlertRoundsViolationMode(self): - """Test AlertRoundsViolationMode""" - # inst = AlertRoundsViolationMode() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_alert_rule.py b/tests_api/test/test_alert_rule.py deleted file mode 100644 index edbc3269..00000000 --- a/tests_api/test/test_alert_rule.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.alert_rule import AlertRule - -class TestAlertRule(unittest.TestCase): - """AlertRule unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AlertRule: - """Test AlertRule - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AlertRule` - """ - model = AlertRule() - if include_optional: - return AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2 - ) - else: - return AlertRule( - ) - """ - - def testAlertRule(self): - """Test AlertRule""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_alert_type.py b/tests_api/test/test_alert_type.py deleted file mode 100644 index de53acf2..00000000 --- a/tests_api/test/test_alert_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.alert_type import AlertType - -class TestAlertType(unittest.TestCase): - """AlertType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAlertType(self): - """Test AlertType""" - # inst = AlertType() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_all_test_types_api.py b/tests_api/test/test_all_test_types_api.py deleted file mode 100644 index 64a54125..00000000 --- a/tests_api/test/test_all_test_types_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for get_tests - - List configured tests - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_base_test.py b/tests_api/test/test_base_test.py deleted file mode 100644 index d227f41a..00000000 --- a/tests_api/test/test_base_test.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.base_test import BaseTest - -class TestBaseTest(unittest.TestCase): - """BaseTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseTest: - """Test BaseTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BaseTest` - """ - model = BaseTest() - if include_optional: - return BaseTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ] - ) - else: - return BaseTest( - ) - """ - - def testBaseTest(self): - """Test BaseTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_bgp_api.py b/tests_api/test/test_bgp_api.py deleted file mode 100644 index abd9bea6..00000000 --- a/tests_api/test/test_bgp_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_bgp_test - - Create BGP test - """ - pass - - def test_delete_bgp_test(self) -> None: - """Test case for delete_bgp_test - - Delete BGP test - """ - pass - - def test_get_bgp_test(self) -> None: - """Test case for get_bgp_test - - Get BGP test - """ - pass - - def test_get_bgp_tests(self) -> None: - """Test case for get_bgp_tests - - List BGP tests - """ - pass - - def test_update_bgp_test(self) -> None: - """Test case for update_bgp_test - - Update BGP test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_cloud_enterprise_agent_type.py b/tests_api/test/test_cloud_enterprise_agent_type.py deleted file mode 100644 index db040d0a..00000000 --- a/tests_api/test/test_cloud_enterprise_agent_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType - -class TestCloudEnterpriseAgentType(unittest.TestCase): - """CloudEnterpriseAgentType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCloudEnterpriseAgentType(self): - """Test CloudEnterpriseAgentType""" - # inst = CloudEnterpriseAgentType() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dns_query_class.py b/tests_api/test/test_dns_query_class.py deleted file mode 100644 index fc077893..00000000 --- a/tests_api/test/test_dns_query_class.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dns_query_class import DnsQueryClass - -class TestDnsQueryClass(unittest.TestCase): - """DnsQueryClass unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDnsQueryClass(self): - """Test DnsQueryClass""" - # inst = DnsQueryClass() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dns_sec_instant_test.py b/tests_api/test/test_dns_sec_instant_test.py deleted file mode 100644 index 1f517d2f..00000000 --- a/tests_api/test/test_dns_sec_instant_test.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dns_sec_instant_test import DnsSecInstantTest - -class TestDnsSecInstantTest(unittest.TestCase): - """DnsSecInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsSecInstantTest: - """Test DnsSecInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsSecInstantTest` - """ - model = DnsSecInstantTest() - if include_optional: - return DnsSecInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dnssec', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return DnsSecInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsSecInstantTest(self): - """Test DnsSecInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dns_server_api.py b/tests_api/test/test_dns_server_api.py deleted file mode 100644 index be5aa481..00000000 --- a/tests_api/test/test_dns_server_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_dns_server_test - - Create DNS Server test - """ - pass - - def test_delete_dns_server_test(self) -> None: - """Test case for delete_dns_server_test - - Delete DNS Server test - """ - pass - - def test_get_dns_server_test(self) -> None: - """Test case for get_dns_server_test - - Get DNS Server test - """ - pass - - def test_get_dns_server_tests(self) -> None: - """Test case for get_dns_server_tests - - List DNS Server tests - """ - pass - - def test_update_dns_server_test(self) -> None: - """Test case for update_dns_server_test - - Update DNS Server test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dns_server_instant_test.py b/tests_api/test/test_dns_server_instant_test.py deleted file mode 100644 index a9dee31f..00000000 --- a/tests_api/test/test_dns_server_instant_test.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dns_server_instant_test import DnsServerInstantTest - -class TestDnsServerInstantTest(unittest.TestCase): - """DnsServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsServerInstantTest: - """Test DnsServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsServerInstantTest` - """ - model = DnsServerInstantTest() - if include_optional: - return DnsServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - recursive_queries = True, - ipv6_policy = 'use-agent-policy', - fixed_packet_rate = 50, - dns_query_class = 'in' - ) - else: - return DnsServerInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsServerInstantTest(self): - """Test DnsServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dns_trace_api.py b/tests_api/test/test_dns_trace_api.py deleted file mode 100644 index 6e6eed59..00000000 --- a/tests_api/test/test_dns_trace_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_dns_trace_test - - Create DNS Trace test - """ - pass - - def test_delete_dns_trace_test(self) -> None: - """Test case for delete_dns_trace_test - - Delete DNS Trace test - """ - pass - - def test_get_dns_trace_test(self) -> None: - """Test case for get_dns_trace_test - - Get DNS Trace test - """ - pass - - def test_get_dns_trace_tests(self) -> None: - """Test case for get_dns_trace_tests - - List DNS Trace tests - """ - pass - - def test_update_dns_trace_test(self) -> None: - """Test case for update_dns_trace_test - - Update DNS Trace test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dns_trace_instant_test.py b/tests_api/test/test_dns_trace_instant_test.py deleted file mode 100644 index 321b78d5..00000000 --- a/tests_api/test/test_dns_trace_instant_test.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.dns_trace_instant_test import DnsTraceInstantTest - -class TestDnsTraceInstantTest(unittest.TestCase): - """DnsTraceInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DnsTraceInstantTest: - """Test DnsTraceInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DnsTraceInstantTest` - """ - model = DnsTraceInstantTest() - if include_optional: - return DnsTraceInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-trace', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return DnsTraceInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testDnsTraceInstantTest(self): - """Test DnsTraceInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_dnssec_api.py b/tests_api/test/test_dnssec_api.py deleted file mode 100644 index 5fa0bf54..00000000 --- a/tests_api/test/test_dnssec_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_dns_sec_test - - Create DNSSEC test - """ - pass - - def test_delete_dns_sec_test(self) -> None: - """Test case for delete_dns_sec_test - - Delete DNSSEC test - """ - pass - - def test_get_dns_sec_test(self) -> None: - """Test case for get_dns_sec_test - - Get DNSSEC test - """ - pass - - def test_get_dns_sec_tests(self) -> None: - """Test case for get_dns_sec_tests - - List DNS Sec tests - """ - pass - - def test_update_dns_sec_test(self) -> None: - """Test case for update_dns_sec_test - - Update DNSSEC test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_error.py b/tests_api/test/test_error.py deleted file mode 100644 index 57f7a90c..00000000 --- a/tests_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_expand.py b/tests_api/test/test_expand.py deleted file mode 100644 index ced8ff55..00000000 --- a/tests_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_ftp_server_api.py b/tests_api/test/test_ftp_server_api.py deleted file mode 100644 index 1827f6b2..00000000 --- a/tests_api/test/test_ftp_server_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_ftp_server_test - - Create FTP Server test - """ - pass - - def test_delete_ftp_server_test(self) -> None: - """Test case for delete_ftp_server_test - - Delete FTP Server test - """ - pass - - def test_get_ftp_server_test(self) -> None: - """Test case for get_ftp_server_test - - Get FTP Server test - """ - pass - - def test_get_ftp_server_tests(self) -> None: - """Test case for get_ftp_server_tests - - List FTP Server tests - """ - pass - - def test_update_ftp_server_test(self) -> None: - """Test case for update_ftp_server_test - - Update FTP Server test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_ftp_server_instant_test.py b/tests_api/test/test_ftp_server_instant_test.py deleted file mode 100644 index f28de9be..00000000 --- a/tests_api/test/test_ftp_server_instant_test.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.ftp_server_instant_test import FtpServerInstantTest - -class TestFtpServerInstantTest(unittest.TestCase): - """FtpServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FtpServerInstantTest: - """Test FtpServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FtpServerInstantTest` - """ - model = FtpServerInstantTest() - if include_optional: - return FtpServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'ftp-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - download_limit = 1048576, - ftp_target_time = 1000, - ftp_time_limit = 10, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - request_type = 'download', - url = 'www.thousandeyes.com', - use_active_ftp = True, - use_explicit_ftps = False, - username = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy' - ) - else: - return FtpServerInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - password = 'password', - request_type = 'download', - url = 'www.thousandeyes.com', - username = 'username', - ) - """ - - def testFtpServerInstantTest(self): - """Test FtpServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_ftp_server_request_type.py b/tests_api/test/test_ftp_server_request_type.py deleted file mode 100644 index cb577212..00000000 --- a/tests_api/test/test_ftp_server_request_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.ftp_server_request_type import FtpServerRequestType - -class TestFtpServerRequestType(unittest.TestCase): - """FtpServerRequestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFtpServerRequestType(self): - """Test FtpServerRequestType""" - # inst = FtpServerRequestType() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_agent_to_agent_test200_response.py b/tests_api/test/test_get_agent_to_agent_test200_response.py deleted file mode 100644 index d0539c32..00000000 --- a/tests_api/test/test_get_agent_to_agent_test200_response.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response - -class TestGetAgentToAgentTest200Response(unittest.TestCase): - """GetAgentToAgentTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAgentToAgentTest200Response: - """Test GetAgentToAgentTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAgentToAgentTest200Response` - """ - model = GetAgentToAgentTest200Response() - if include_optional: - return GetAgentToAgentTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-agent', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - direction = 'to-target', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - mss = 20, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - target_agent_id = '2954', - throughput_measurements = True, - throughput_duration = 5000, - throughput_rate = 8, - fixed_packet_rate = 50, - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ] - ) - else: - return GetAgentToAgentTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - target_agent_id = '2954', - ) - """ - - def testGetAgentToAgentTest200Response(self): - """Test GetAgentToAgentTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_agent_to_server_test200_response.py b/tests_api/test/test_get_agent_to_server_test200_response.py deleted file mode 100644 index 4b553085..00000000 --- a/tests_api/test/test_get_agent_to_server_test200_response.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response - -class TestGetAgentToServerTest200Response(unittest.TestCase): - """GetAgentToServerTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetAgentToServerTest200Response: - """Test GetAgentToServerTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetAgentToServerTest200Response` - """ - model = GetAgentToServerTest200Response() - if include_optional: - return GetAgentToServerTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - continuous_mode = False, - fixed_packet_rate = 25, - mtu_measurements = False, - num_path_traces = 3, - path_trace_mode = 'classic', - port = 1, - probe_mode = 'auto', - protocol = 'tcp', - server = 'www.thousandeyes.com', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - ipv6_policy = 'use-agent-policy', - ping_payload_size = 0, - network_measurements = True, - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ] - ) - else: - return GetAgentToServerTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - server = 'www.thousandeyes.com', - ) - """ - - def testGetAgentToServerTest200Response(self): - """Test GetAgentToServerTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_bgp_test200_response.py b/tests_api/test/test_get_bgp_test200_response.py deleted file mode 100644 index 597b6d50..00000000 --- a/tests_api/test/test_get_bgp_test200_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response - -class TestGetBgpTest200Response(unittest.TestCase): - """GetBgpTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetBgpTest200Response: - """Test GetBgpTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetBgpTest200Response` - """ - model = GetBgpTest200Response() - if include_optional: - return GetBgpTest200Response( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'bgp', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ], - include_covered_prefixes = True, - prefix = '', - use_public_bgp = False, - alerts_enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ] - ) - else: - return GetBgpTest200Response( - prefix = '', - ) - """ - - def testGetBgpTest200Response(self): - """Test GetBgpTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_dns_sec_test200_response.py b/tests_api/test/test_get_dns_sec_test200_response.py deleted file mode 100644 index f19df488..00000000 --- a/tests_api/test/test_get_dns_sec_test200_response.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response - -class TestGetDnsSecTest200Response(unittest.TestCase): - """GetDnsSecTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDnsSecTest200Response: - """Test GetDnsSecTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDnsSecTest200Response` - """ - model = GetDnsSecTest200Response() - if include_optional: - return GetDnsSecTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dnssec', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return GetDnsSecTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testGetDnsSecTest200Response(self): - """Test GetDnsSecTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_dns_server_test200_response.py b/tests_api/test/test_get_dns_server_test200_response.py deleted file mode 100644 index 9239f9c9..00000000 --- a/tests_api/test/test_get_dns_server_test200_response.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response - -class TestGetDNSServerTest200Response(unittest.TestCase): - """GetDNSServerTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDNSServerTest200Response: - """Test GetDNSServerTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDNSServerTest200Response` - """ - model = GetDNSServerTest200Response() - if include_optional: - return GetDNSServerTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-server', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - recursive_queries = True, - ipv6_policy = 'use-agent-policy', - fixed_packet_rate = 50, - dns_query_class = 'in', - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ] - ) - else: - return GetDNSServerTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testGetDNSServerTest200Response(self): - """Test GetDNSServerTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_dns_trace_test200_response.py b/tests_api/test/test_get_dns_trace_test200_response.py deleted file mode 100644 index 0f3aeba9..00000000 --- a/tests_api/test/test_get_dns_trace_test200_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response - -class TestGetDnsTraceTest200Response(unittest.TestCase): - """GetDnsTraceTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetDnsTraceTest200Response: - """Test GetDnsTraceTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetDnsTraceTest200Response` - """ - model = GetDnsTraceTest200Response() - if include_optional: - return GetDnsTraceTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-trace', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - dns_query_class = 'in' - ) - else: - return GetDnsTraceTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testGetDnsTraceTest200Response(self): - """Test GetDnsTraceTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_ftp_server_test200_response.py b/tests_api/test/test_get_ftp_server_test200_response.py deleted file mode 100644 index 0be7d130..00000000 --- a/tests_api/test/test_get_ftp_server_test200_response.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response - -class TestGetFtpServerTest200Response(unittest.TestCase): - """GetFtpServerTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetFtpServerTest200Response: - """Test GetFtpServerTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetFtpServerTest200Response` - """ - model = GetFtpServerTest200Response() - if include_optional: - return GetFtpServerTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'ftp-server', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - bandwidth_measurements = True, - download_limit = 1048576, - ftp_target_time = 1000, - ftp_time_limit = 10, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - request_type = 'download', - url = 'www.thousandeyes.com', - use_active_ftp = True, - use_explicit_ftps = False, - username = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy', - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ] - ) - else: - return GetFtpServerTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - password = 'password', - request_type = 'download', - url = 'www.thousandeyes.com', - username = 'username', - ) - """ - - def testGetFtpServerTest200Response(self): - """Test GetFtpServerTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_http_server_test200_response.py b/tests_api/test/test_get_http_server_test200_response.py deleted file mode 100644 index 61a66515..00000000 --- a/tests_api/test/test_get_http_server_test200_response.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response - -class TestGetHttpServerTest200Response(unittest.TestCase): - """GetHttpServerTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetHttpServerTest200Response: - """Test GetHttpServerTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetHttpServerTest200Response` - """ - model = GetHttpServerTest200Response() - if include_optional: - return GetHttpServerTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'http-server', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - headers = ["header1: value1","header2: value2"], - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - desired_status_code = '200', - download_limit = 2048, - dns_override = '8.8.8.8', - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - post_body = '{ "example" : "value"}', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - ipv6_policy = 'use-agent-policy', - follow_redirects = True, - fixed_packet_rate = 50, - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ] - ) - else: - return GetHttpServerTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - url = 'www.thousandeyes.com', - ) - """ - - def testGetHttpServerTest200Response(self): - """Test GetHttpServerTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_page_load_test200_response.py b/tests_api/test/test_get_page_load_test200_response.py deleted file mode 100644 index 6891c550..00000000 --- a/tests_api/test/test_get_page_load_test200_response.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response - -class TestGetPageLoadTest200Response(unittest.TestCase): - """GetPageLoadTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetPageLoadTest200Response: - """Test GetPageLoadTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetPageLoadTest200Response` - """ - model = GetPageLoadTest200Response() - if include_optional: - return GetPageLoadTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'page-load', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - follow_redirects = True, - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - page_load_target_time = 10, - page_load_time_limit = 5, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - block_domains = 'domain.com/', - disable_screenshot = True, - allow_mic_and_camera = True, - allow_geolocation = True, - browser_language = 'en-US', - page_loading_strategy = 'normal', - fixed_packet_rate = 50, - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ], - http_interval = 120, - subinterval = 60 - ) - else: - return GetPageLoadTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - url = 'www.thousandeyes.com', - http_interval = 120, - ) - """ - - def testGetPageLoadTest200Response(self): - """Test GetPageLoadTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_sip_server_test200_response.py b/tests_api/test/test_get_sip_server_test200_response.py deleted file mode 100644 index f0b306f0..00000000 --- a/tests_api/test/test_get_sip_server_test200_response.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response - -class TestGetSipServerTest200Response(unittest.TestCase): - """GetSipServerTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSipServerTest200Response: - """Test GetSipServerTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetSipServerTest200Response` - """ - model = GetSipServerTest200Response() - if include_optional: - return GetSipServerTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'sip-server', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_user = 'username', - mtu_measurements = False, - network_measurements = True, - options_regex = '["a-z"]', - password = 'password', - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - register_enabled = True, - sip_registrar = 'voice.thousandeyes.com', - sip_target_time = 100, - sip_time_limit = 5, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - user = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy', - bgp_measurements = True - ) - else: - return GetSipServerTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - port = 1, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - ) - """ - - def testGetSipServerTest200Response(self): - """Test GetSipServerTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_voice_test200_response.py b/tests_api/test/test_get_voice_test200_response.py deleted file mode 100644 index c6860f5d..00000000 --- a/tests_api/test/test_get_voice_test200_response.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response - -class TestGetVoiceTest200Response(unittest.TestCase): - """GetVoiceTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetVoiceTest200Response: - """Test GetVoiceTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetVoiceTest200Response` - """ - model = GetVoiceTest200Response() - if include_optional: - return GetVoiceTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'voice', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - codec = 'G.711 @ 64 Kbps', - codec_id = '0', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - duration = 5, - jitter_buffer = 0, - num_path_traces = 3, - port = 1024, - target_agent_id = '281474976710706', - bgp_measurements = True - ) - else: - return GetVoiceTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - target_agent_id = '281474976710706', - ) - """ - - def testGetVoiceTest200Response(self): - """Test GetVoiceTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_get_web_transactions_test200_response.py b/tests_api/test/test_get_web_transactions_test200_response.py deleted file mode 100644 index 06fb1d6b..00000000 --- a/tests_api/test/test_get_web_transactions_test200_response.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response - -class TestGetWebTransactionsTest200Response(unittest.TestCase): - """GetWebTransactionsTest200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetWebTransactionsTest200Response: - """Test GetWebTransactionsTest200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetWebTransactionsTest200Response` - """ - model = GetWebTransactionsTest200Response() - if include_optional: - return GetWebTransactionsTest200Response( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'web-transactions', - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - credentials = [3247, 1051], - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - desired_status_code = '200', - follow_redirects = True, - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - target_time = 1, - time_limit = 5, - transaction_script = 'if (true) { return true; }', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - block_domains = 'domain.com/', - disable_screenshot = True, - allow_mic_and_camera = True, - allow_geolocation = True, - browser_language = 'en-US', - page_loading_strategy = 'normal', - fixed_packet_rate = 50, - bgp_measurements = True, - monitors = [ - tests_api.models.monitor.Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA', ) - ], - subinterval = 60 - ) - else: - return GetWebTransactionsTest200Response( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - transaction_script = 'if (true) { return true; }', - url = 'www.thousandeyes.com', - ) - """ - - def testGetWebTransactionsTest200Response(self): - """Test GetWebTransactionsTest200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_http_server_api.py b/tests_api/test/test_http_server_api.py deleted file mode 100644 index 406d5025..00000000 --- a/tests_api/test/test_http_server_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_http_server_test - - Create HTTP Server test - """ - pass - - def test_delete_http_server_test(self) -> None: - """Test case for delete_http_server_test - - Delete HTTP Server test - """ - pass - - def test_get_http_server_test(self) -> None: - """Test case for get_http_server_test - - Get HTTP Server test - """ - pass - - def test_get_http_server_tests(self) -> None: - """Test case for get_http_server_tests - - List HTTP Server tests - """ - pass - - def test_update_http_server_test(self) -> None: - """Test case for update_http_server_test - - Update HTTP Server test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_http_server_instant_test.py b/tests_api/test/test_http_server_instant_test.py deleted file mode 100644 index 6821954a..00000000 --- a/tests_api/test/test_http_server_instant_test.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.http_server_instant_test import HttpServerInstantTest - -class TestHttpServerInstantTest(unittest.TestCase): - """HttpServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HttpServerInstantTest: - """Test HttpServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HttpServerInstantTest` - """ - model = HttpServerInstantTest() - if include_optional: - return HttpServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'http-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - headers = ["header1: value1","header2: value2"], - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - desired_status_code = '200', - download_limit = 2048, - dns_override = '8.8.8.8', - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - post_body = '{ "example" : "value"}', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - ipv6_policy = 'use-agent-policy', - follow_redirects = True, - fixed_packet_rate = 50 - ) - else: - return HttpServerInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - url = 'www.thousandeyes.com', - ) - """ - - def testHttpServerInstantTest(self): - """Test HttpServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_instant_test.py b/tests_api/test/test_instant_test.py deleted file mode 100644 index 6a293618..00000000 --- a/tests_api/test/test_instant_test.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.instant_test import InstantTest - -class TestInstantTest(unittest.TestCase): - """InstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InstantTest: - """Test InstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InstantTest` - """ - model = InstantTest() - if include_optional: - return InstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ] - ) - else: - return InstantTest( - ) - """ - - def testInstantTest(self): - """Test InstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_link.py b/tests_api/test/test_link.py deleted file mode 100644 index 0733e1c2..00000000 --- a/tests_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_map_item.py b/tests_api/test/test_map_item.py deleted file mode 100644 index c65a5c3c..00000000 --- a/tests_api/test/test_map_item.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.map_item import MapItem - -class TestMapItem(unittest.TestCase): - """MapItem unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MapItem: - """Test MapItem - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MapItem` - """ - model = MapItem() - if include_optional: - return MapItem( - key = '', - value = '' - ) - else: - return MapItem( - ) - """ - - def testMapItem(self): - """Test MapItem""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_monitor.py b/tests_api/test/test_monitor.py deleted file mode 100644 index ca48a64e..00000000 --- a/tests_api/test/test_monitor.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.monitor import Monitor - -class TestMonitor(unittest.TestCase): - """Monitor unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Monitor: - """Test Monitor - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Monitor` - """ - model = Monitor() - if include_optional: - return Monitor( - country_id = 'GB', - monitor_id = '1234', - ip_address = '4.69.184.193', - network = 'Level 3 Communications, Inc. (AS 3356)', - monitor_type = 'public', - monitor_name = 'Seattle, WA' - ) - else: - return Monitor( - ) - """ - - def testMonitor(self): - """Test Monitor""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_monitor_type.py b/tests_api/test/test_monitor_type.py deleted file mode 100644 index c9053d5c..00000000 --- a/tests_api/test/test_monitor_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.monitor_type import MonitorType - -class TestMonitorType(unittest.TestCase): - """MonitorType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMonitorType(self): - """Test MonitorType""" - # inst = MonitorType() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_page_load_api.py b/tests_api/test/test_page_load_api.py deleted file mode 100644 index 6212e09b..00000000 --- a/tests_api/test/test_page_load_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_page_load_test - - Create Page Load test - """ - pass - - def test_delete_page_load_test(self) -> None: - """Test case for delete_page_load_test - - Delete Page Load test - """ - pass - - def test_get_page_load_test(self) -> None: - """Test case for get_page_load_test - - Get Page Load test - """ - pass - - def test_get_page_load_tests(self) -> None: - """Test case for get_page_load_tests - - List Page Load tests - """ - pass - - def test_update_page_load_test(self) -> None: - """Test case for update_page_load_test - - Update Page Load test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_page_load_instant_test.py b/tests_api/test/test_page_load_instant_test.py deleted file mode 100644 index a585588d..00000000 --- a/tests_api/test/test_page_load_instant_test.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.page_load_instant_test import PageLoadInstantTest - -class TestPageLoadInstantTest(unittest.TestCase): - """PageLoadInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PageLoadInstantTest: - """Test PageLoadInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PageLoadInstantTest` - """ - model = PageLoadInstantTest() - if include_optional: - return PageLoadInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'page-load', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - follow_redirects = True, - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - page_load_target_time = 10, - page_load_time_limit = 5, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - block_domains = 'domain.com/', - disable_screenshot = True, - allow_mic_and_camera = True, - allow_geolocation = True, - browser_language = 'en-US', - page_loading_strategy = 'normal', - fixed_packet_rate = 50 - ) - else: - return PageLoadInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - url = 'www.thousandeyes.com', - ) - """ - - def testPageLoadInstantTest(self): - """Test PageLoadInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_path_visualization_interface_groups_api.py b/tests_api/test/test_path_visualization_interface_groups_api.py deleted file mode 100644 index 056ee67d..00000000 --- a/tests_api/test/test_path_visualization_interface_groups_api.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_path_vis_interface_groups - - Create interface group for path visualization - """ - pass - - def test_delete_path_vis_interface_group(self) -> None: - """Test case for delete_path_vis_interface_group - - Delete interface group - """ - pass - - def test_get_path_vis_interface_groups(self) -> None: - """Test case for get_path_vis_interface_groups - - List interface groups for path visualization - """ - pass - - def test_update_path_vis_interface_group(self) -> None: - """Test case for update_path_vis_interface_group - - Update interface group - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_self_links.py b/tests_api/test/test_self_links.py deleted file mode 100644 index dd33ee22..00000000 --- a/tests_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_self_links_links.py b/tests_api/test/test_self_links_links.py deleted file mode 100644 index 8ff85fcb..00000000 --- a/tests_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_simple_test.py b/tests_api/test/test_simple_test.py deleted file mode 100644 index f73949a5..00000000 --- a/tests_api/test/test_simple_test.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.simple_test import SimpleTest - -class TestSimpleTest(unittest.TestCase): - """SimpleTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SimpleTest: - """Test SimpleTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SimpleTest` - """ - model = SimpleTest() - if include_optional: - return SimpleTest( - interval = 120, - alerts_enabled = True, - enabled = True, - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return SimpleTest( - ) - """ - - def testSimpleTest(self): - """Test SimpleTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_sip_server_api.py b/tests_api/test/test_sip_server_api.py deleted file mode 100644 index b4414661..00000000 --- a/tests_api/test/test_sip_server_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_sip_server_test - - Create SIP Server test - """ - pass - - def test_delete_sip_server_test(self) -> None: - """Test case for delete_sip_server_test - - Delete SIP Server test - """ - pass - - def test_get_sip_server_test(self) -> None: - """Test case for get_sip_server_test - - Get SIP Server test - """ - pass - - def test_get_sip_server_tests(self) -> None: - """Test case for get_sip_server_tests - - List SIP Server tests - """ - pass - - def test_update_sip_server_test(self) -> None: - """Test case for update_sip_server_test - - Update SIP Server test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_sip_server_instant_test.py b/tests_api/test/test_sip_server_instant_test.py deleted file mode 100644 index e4d75522..00000000 --- a/tests_api/test/test_sip_server_instant_test.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.sip_server_instant_test import SipServerInstantTest - -class TestSipServerInstantTest(unittest.TestCase): - """SipServerInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SipServerInstantTest: - """Test SipServerInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SipServerInstantTest` - """ - model = SipServerInstantTest() - if include_optional: - return SipServerInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'sip-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_user = 'username', - mtu_measurements = False, - network_measurements = True, - options_regex = '["a-z"]', - password = 'password', - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - register_enabled = True, - sip_registrar = 'voice.thousandeyes.com', - sip_target_time = 100, - sip_time_limit = 5, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - user = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy' - ) - else: - return SipServerInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - port = 1, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - ) - """ - - def testSipServerInstantTest(self): - """Test SipServerInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_sip_server_test.py b/tests_api/test/test_sip_server_test.py deleted file mode 100644 index fabce23f..00000000 --- a/tests_api/test/test_sip_server_test.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.sip_server_test import SipServerTest - -class TestSipServerTest(unittest.TestCase): - """SipServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SipServerTest: - """Test SipServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SipServerTest` - """ - model = SipServerTest() - if include_optional: - return SipServerTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'sip-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_user = 'username', - mtu_measurements = False, - network_measurements = True, - options_regex = '["a-z"]', - password = 'password', - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - register_enabled = True, - sip_registrar = 'voice.thousandeyes.com', - sip_target_time = 100, - sip_time_limit = 5, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - user = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy', - bgp_measurements = True - ) - else: - return SipServerTest( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - port = 1, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - ) - """ - - def testSipServerTest(self): - """Test SipServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_sip_test_protocol.py b/tests_api/test/test_sip_test_protocol.py deleted file mode 100644 index 0a8a9e5c..00000000 --- a/tests_api/test/test_sip_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.sip_test_protocol import SipTestProtocol - -class TestSipTestProtocol(unittest.TestCase): - """SipTestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSipTestProtocol(self): - """Test SipTestProtocol""" - # inst = SipTestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_auth_type.py b/tests_api/test/test_test_auth_type.py deleted file mode 100644 index f34b9a20..00000000 --- a/tests_api/test/test_test_auth_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_auth_type import TestAuthType - -class TestTestAuthType(unittest.TestCase): - """TestAuthType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestAuthType(self): - """Test TestAuthType""" - # inst = TestAuthType() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_custom_headers.py b/tests_api/test/test_test_custom_headers.py deleted file mode 100644 index c88f3a8e..00000000 --- a/tests_api/test/test_test_custom_headers.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_custom_headers import TestCustomHeaders - -class TestTestCustomHeaders(unittest.TestCase): - """TestCustomHeaders unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestCustomHeaders: - """Test TestCustomHeaders - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestCustomHeaders` - """ - model = TestCustomHeaders() - if include_optional: - return TestCustomHeaders( - root = None, - domains = { - 'key' : tests_api.models.map_item.MapItem( - key = '', - value = '', ) - }, - all = None - ) - else: - return TestCustomHeaders( - ) - """ - - def testTestCustomHeaders(self): - """Test TestCustomHeaders""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_custom_headers_all.py b/tests_api/test/test_test_custom_headers_all.py deleted file mode 100644 index c9a84f15..00000000 --- a/tests_api/test/test_test_custom_headers_all.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_custom_headers_all import TestCustomHeadersAll - -class TestTestCustomHeadersAll(unittest.TestCase): - """TestCustomHeadersAll unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestCustomHeadersAll: - """Test TestCustomHeadersAll - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestCustomHeadersAll` - """ - model = TestCustomHeadersAll() - if include_optional: - return TestCustomHeadersAll( - key = '', - value = '' - ) - else: - return TestCustomHeadersAll( - ) - """ - - def testTestCustomHeadersAll(self): - """Test TestCustomHeadersAll""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_custom_headers_root.py b/tests_api/test/test_test_custom_headers_root.py deleted file mode 100644 index 5f2386a1..00000000 --- a/tests_api/test/test_test_custom_headers_root.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_custom_headers_root import TestCustomHeadersRoot - -class TestTestCustomHeadersRoot(unittest.TestCase): - """TestCustomHeadersRoot unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestCustomHeadersRoot: - """Test TestCustomHeadersRoot - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestCustomHeadersRoot` - """ - model = TestCustomHeadersRoot() - if include_optional: - return TestCustomHeadersRoot( - key = '', - value = '' - ) - else: - return TestCustomHeadersRoot( - ) - """ - - def testTestCustomHeadersRoot(self): - """Test TestCustomHeadersRoot""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_direction.py b/tests_api/test/test_test_direction.py deleted file mode 100644 index 8fab0017..00000000 --- a/tests_api/test/test_test_direction.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_direction import TestDirection - -class TestTestDirection(unittest.TestCase): - """TestDirection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDirection(self): - """Test TestDirection""" - # inst = TestDirection() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_dns_server.py b/tests_api/test/test_test_dns_server.py deleted file mode 100644 index e2a055b0..00000000 --- a/tests_api/test/test_test_dns_server.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_dns_server import TestDnsServer - -class TestTestDnsServer(unittest.TestCase): - """TestDnsServer unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestDnsServer: - """Test TestDnsServer - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestDnsServer` - """ - model = TestDnsServer() - if include_optional: - return TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net' - ) - else: - return TestDnsServer( - ) - """ - - def testTestDnsServer(self): - """Test TestDnsServer""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_dns_transport_protocol.py b/tests_api/test/test_test_dns_transport_protocol.py deleted file mode 100644 index 53bf593a..00000000 --- a/tests_api/test/test_test_dns_transport_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol - -class TestTestDnsTransportProtocol(unittest.TestCase): - """TestDnsTransportProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDnsTransportProtocol(self): - """Test TestDnsTransportProtocol""" - # inst = TestDnsTransportProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_dscp_id.py b/tests_api/test/test_test_dscp_id.py deleted file mode 100644 index 3a541bfe..00000000 --- a/tests_api/test/test_test_dscp_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_dscp_id import TestDscpId - -class TestTestDscpId(unittest.TestCase): - """TestDscpId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestDscpId(self): - """Test TestDscpId""" - # inst = TestDscpId() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_http_interval.py b/tests_api/test/test_test_http_interval.py deleted file mode 100644 index b1712498..00000000 --- a/tests_api/test/test_test_http_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_http_interval import TestHttpInterval - -class TestTestHttpInterval(unittest.TestCase): - """TestHttpInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestHttpInterval(self): - """Test TestHttpInterval""" - # inst = TestHttpInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_interval.py b/tests_api/test/test_test_interval.py deleted file mode 100644 index b52317b5..00000000 --- a/tests_api/test/test_test_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_interval import TestInterval - -class TestTestInterval(unittest.TestCase): - """TestInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestInterval(self): - """Test TestInterval""" - # inst = TestInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_ipv6_policy.py b/tests_api/test/test_test_ipv6_policy.py deleted file mode 100644 index c6717778..00000000 --- a/tests_api/test/test_test_ipv6_policy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_ipv6_policy import TestIpv6Policy - -class TestTestIpv6Policy(unittest.TestCase): - """TestIpv6Policy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestIpv6Policy(self): - """Test TestIpv6Policy""" - # inst = TestIpv6Policy() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_labels_inner.py b/tests_api/test/test_test_labels_inner.py deleted file mode 100644 index 833ba468..00000000 --- a/tests_api/test/test_test_labels_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_labels_inner import TestLabelsInner - -class TestTestLabelsInner(unittest.TestCase): - """TestLabelsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestLabelsInner: - """Test TestLabelsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestLabelsInner` - """ - model = TestLabelsInner() - if include_optional: - return TestLabelsInner( - label_id = '', - name = '', - is_built_in = True - ) - else: - return TestLabelsInner( - ) - """ - - def testTestLabelsInner(self): - """Test TestLabelsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_page_loading_strategy.py b/tests_api/test/test_test_page_loading_strategy.py deleted file mode 100644 index 5c4b4e66..00000000 --- a/tests_api/test/test_test_page_loading_strategy.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy - -class TestTestPageLoadingStrategy(unittest.TestCase): - """TestPageLoadingStrategy unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestPageLoadingStrategy(self): - """Test TestPageLoadingStrategy""" - # inst = TestPageLoadingStrategy() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_path_trace_mode.py b/tests_api/test/test_test_path_trace_mode.py deleted file mode 100644 index 8bdd004a..00000000 --- a/tests_api/test/test_test_path_trace_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_path_trace_mode import TestPathTraceMode - -class TestTestPathTraceMode(unittest.TestCase): - """TestPathTraceMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestPathTraceMode(self): - """Test TestPathTraceMode""" - # inst = TestPathTraceMode() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_probe_mode.py b/tests_api/test/test_test_probe_mode.py deleted file mode 100644 index 6180ae9a..00000000 --- a/tests_api/test/test_test_probe_mode.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_probe_mode import TestProbeMode - -class TestTestProbeMode(unittest.TestCase): - """TestProbeMode unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProbeMode(self): - """Test TestProbeMode""" - # inst = TestProbeMode() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_protocol.py b/tests_api/test/test_test_protocol.py deleted file mode 100644 index 0b70fbe2..00000000 --- a/tests_api/test/test_test_protocol.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_protocol import TestProtocol - -class TestTestProtocol(unittest.TestCase): - """TestProtocol unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestProtocol(self): - """Test TestProtocol""" - # inst = TestProtocol() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_shared_accounts_inner.py b/tests_api/test/test_test_shared_accounts_inner.py deleted file mode 100644 index 152f0209..00000000 --- a/tests_api/test/test_test_shared_accounts_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner - -class TestTestSharedAccountsInner(unittest.TestCase): - """TestSharedAccountsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestSharedAccountsInner: - """Test TestSharedAccountsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestSharedAccountsInner` - """ - model = TestSharedAccountsInner() - if include_optional: - return TestSharedAccountsInner( - aid = '105', - name = 'Account name' - ) - else: - return TestSharedAccountsInner( - ) - """ - - def testTestSharedAccountsInner(self): - """Test TestSharedAccountsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_sip_credentials.py b/tests_api/test/test_test_sip_credentials.py deleted file mode 100644 index 03be6cdf..00000000 --- a/tests_api/test/test_test_sip_credentials.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_sip_credentials import TestSipCredentials - -class TestTestSipCredentials(unittest.TestCase): - """TestSipCredentials unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestSipCredentials: - """Test TestSipCredentials - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestSipCredentials` - """ - model = TestSipCredentials() - if include_optional: - return TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username' - ) - else: - return TestSipCredentials( - port = 1024, - ) - """ - - def testTestSipCredentials(self): - """Test TestSipCredentials""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_ssl_version_id.py b/tests_api/test/test_test_ssl_version_id.py deleted file mode 100644 index fc1e2596..00000000 --- a/tests_api/test/test_test_ssl_version_id.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_ssl_version_id import TestSslVersionId - -class TestTestSslVersionId(unittest.TestCase): - """TestSslVersionId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestSslVersionId(self): - """Test TestSslVersionId""" - # inst = TestSslVersionId() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_sub_interval.py b/tests_api/test/test_test_sub_interval.py deleted file mode 100644 index 8d1d1922..00000000 --- a/tests_api/test/test_test_sub_interval.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_sub_interval import TestSubInterval - -class TestTestSubInterval(unittest.TestCase): - """TestSubInterval unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestSubInterval(self): - """Test TestSubInterval""" - # inst = TestSubInterval() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_test_type.py b/tests_api/test/test_test_type.py deleted file mode 100644 index ffc5a157..00000000 --- a/tests_api/test/test_test_type.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.test_type import TestType - -class TestTestType(unittest.TestCase): - """TestType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTestType(self): - """Test TestType""" - # inst = TestType() - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_unauthorized_error.py b/tests_api/test/test_unauthorized_error.py deleted file mode 100644 index 1c920f54..00000000 --- a/tests_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_unexpanded_instant_test.py b/tests_api/test/test_unexpanded_instant_test.py deleted file mode 100644 index 5108286c..00000000 --- a/tests_api/test/test_unexpanded_instant_test.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unexpanded_instant_test import UnexpandedInstantTest - -class TestUnexpandedInstantTest(unittest.TestCase): - """UnexpandedInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTest: - """Test UnexpandedInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTest` - """ - model = UnexpandedInstantTest() - if include_optional: - return UnexpandedInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'agent-to-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ) - ) - else: - return UnexpandedInstantTest( - ) - """ - - def testUnexpandedInstantTest(self): - """Test UnexpandedInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_unexpanded_instant_test_links.py b/tests_api/test/test_unexpanded_instant_test_links.py deleted file mode 100644 index b5501fbe..00000000 --- a/tests_api/test/test_unexpanded_instant_test_links.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks - -class TestUnexpandedInstantTestLinks(unittest.TestCase): - """UnexpandedInstantTestLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinks: - """Test UnexpandedInstantTestLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinks` - """ - model = UnexpandedInstantTestLinks() - if include_optional: - return UnexpandedInstantTestLinks( - var_self = None, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}] - ) - else: - return UnexpandedInstantTestLinks( - ) - """ - - def testUnexpandedInstantTestLinks(self): - """Test UnexpandedInstantTestLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_unexpanded_instant_test_links_self.py b/tests_api/test/test_unexpanded_instant_test_links_self.py deleted file mode 100644 index 220640dd..00000000 --- a/tests_api/test/test_unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf - -class TestUnexpandedInstantTestLinksSelf(unittest.TestCase): - """UnexpandedInstantTestLinksSelf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksSelf: - """Test UnexpandedInstantTestLinksSelf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksSelf` - """ - model = UnexpandedInstantTestLinksSelf() - if include_optional: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksSelf( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksSelf(self): - """Test UnexpandedInstantTestLinksSelf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_unexpanded_instant_test_links_test_results.py b/tests_api/test/test_unexpanded_instant_test_links_test_results.py deleted file mode 100644 index a15de6bf..00000000 --- a/tests_api/test/test_unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults - -class TestUnexpandedInstantTestLinksTestResults(unittest.TestCase): - """UnexpandedInstantTestLinksTestResults unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedInstantTestLinksTestResults: - """Test UnexpandedInstantTestLinksTestResults - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedInstantTestLinksTestResults` - """ - model = UnexpandedInstantTestLinksTestResults() - if include_optional: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return UnexpandedInstantTestLinksTestResults( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testUnexpandedInstantTestLinksTestResults(self): - """Test UnexpandedInstantTestLinksTestResults""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_unexpanded_test.py b/tests_api/test/test_unexpanded_test.py deleted file mode 100644 index 3d406935..00000000 --- a/tests_api/test/test_unexpanded_test.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.unexpanded_test import UnexpandedTest - -class TestUnexpandedTest(unittest.TestCase): - """UnexpandedTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnexpandedTest: - """Test UnexpandedTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnexpandedTest` - """ - model = UnexpandedTest() - if include_optional: - return UnexpandedTest( - interval = 120, - alerts_enabled = True, - enabled = True - ) - else: - return UnexpandedTest( - ) - """ - - def testUnexpandedTest(self): - """Test UnexpandedTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_update_dns_server_test.py b/tests_api/test/test_update_dns_server_test.py deleted file mode 100644 index de1c4245..00000000 --- a/tests_api/test/test_update_dns_server_test.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.update_dns_server_test import UpdateDnsServerTest - -class TestUpdateDnsServerTest(unittest.TestCase): - """UpdateDnsServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateDnsServerTest: - """Test UpdateDnsServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateDnsServerTest` - """ - model = UpdateDnsServerTest() - if include_optional: - return UpdateDnsServerTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [344753, 212697], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'dns-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - bandwidth_measurements = True, - dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - dns_transport_protocol = 'udp', - domain = 'www.thousandeyes.com', - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - recursive_queries = True, - ipv6_policy = 'use-agent-policy', - fixed_packet_rate = 50, - dns_query_class = 'in', - bgp_measurements = True, - monitors = [17410, 5] - ) - else: - return UpdateDnsServerTest( - interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - dns_servers = [ - tests_api.models.test_dns_server.TestDnsServer( - server_id = '1447', - server_name = 'dns-example.net', ) - ], - domain = 'www.thousandeyes.com', - ) - """ - - def testUpdateDnsServerTest(self): - """Test UpdateDnsServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_update_path_vis_interface_group200_response.py b/tests_api/test/test_update_path_vis_interface_group200_response.py deleted file mode 100644 index e4699aa7..00000000 --- a/tests_api/test/test_update_path_vis_interface_group200_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.update_path_vis_interface_group200_response import UpdatePathVisInterfaceGroup200Response - -class TestUpdatePathVisInterfaceGroup200Response(unittest.TestCase): - """UpdatePathVisInterfaceGroup200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdatePathVisInterfaceGroup200Response: - """Test UpdatePathVisInterfaceGroup200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdatePathVisInterfaceGroup200Response` - """ - model = UpdatePathVisInterfaceGroup200Response() - if include_optional: - return UpdatePathVisInterfaceGroup200Response( - aid = '1123', - group_id = '281474976710706', - group_name = 'PathVis Interface Group', - ip_addresses = [1.1.1.1, 8.8.8.8], - rdns_regexes = [aggr403b-1.iad3.rackspace.net, aggr403c-1.iad3.rackspace.net], - links = tests_api.models.self_links__links.SelfLinks__links( - self = tests_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return UpdatePathVisInterfaceGroup200Response( - ) - """ - - def testUpdatePathVisInterfaceGroup200Response(self): - """Test UpdatePathVisInterfaceGroup200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_update_sip_server_test.py b/tests_api/test/test_update_sip_server_test.py deleted file mode 100644 index 62ab60b7..00000000 --- a/tests_api/test/test_update_sip_server_test.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.update_sip_server_test import UpdateSipServerTest - -class TestUpdateSipServerTest(unittest.TestCase): - """UpdateSipServerTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateSipServerTest: - """Test UpdateSipServerTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateSipServerTest` - """ - model = UpdateSipServerTest() - if include_optional: - return UpdateSipServerTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [344753, 212697], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'sip-server', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - auth_user = 'username', - mtu_measurements = False, - network_measurements = True, - options_regex = '["a-z"]', - password = 'password', - path_trace_mode = 'classic', - port = 1, - protocol = 'tcp', - register_enabled = True, - sip_registrar = 'voice.thousandeyes.com', - sip_target_time = 100, - sip_time_limit = 5, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - user = 'username', - fixed_packet_rate = 50, - ipv6_policy = 'use-agent-policy', - bgp_measurements = True - ) - else: - return UpdateSipServerTest( - interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - port = 1, - target_sip_credentials = tests_api.models.test_sip_credentials.TestSipCredentials( - auth_user = 'username', - password = 'password', - port = 1024, - protocol = 'tcp', - sip_registrar = 'sip.thousandeyes.com', - user = 'username', ), - ) - """ - - def testUpdateSipServerTest(self): - """Test UpdateSipServerTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_update_voice_test.py b/tests_api/test/test_update_voice_test.py deleted file mode 100644 index e3c3cdc4..00000000 --- a/tests_api/test/test_update_voice_test.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.update_voice_test import UpdateVoiceTest - -class TestUpdateVoiceTest(unittest.TestCase): - """UpdateVoiceTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateVoiceTest: - """Test UpdateVoiceTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateVoiceTest` - """ - model = UpdateVoiceTest() - if include_optional: - return UpdateVoiceTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [344753, 212697], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'voice', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [9842, 1283], - shared_with_accounts = [2087, 100], - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - codec = 'G.711 @ 64 Kbps', - codec_id = '0', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - duration = 5, - jitter_buffer = 0, - num_path_traces = 3, - port = 1024, - target_agent_id = '281474976710706', - bgp_measurements = True - ) - else: - return UpdateVoiceTest( - interval = 120, - agents = [ - {"agentId":"125","sourceIpAddress":"1.1.1.1"} - ], - target_agent_id = '281474976710706', - ) - """ - - def testUpdateVoiceTest(self): - """Test UpdateVoiceTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_voice_api.py b/tests_api/test/test_voice_api.py deleted file mode 100644 index 94ae0dba..00000000 --- a/tests_api/test/test_voice_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_voice_test - - Create Voice test - """ - pass - - def test_delete_voice_test(self) -> None: - """Test case for delete_voice_test - - Delete Voice test - """ - pass - - def test_get_voice_test(self) -> None: - """Test case for get_voice_test - - Get Voice test - """ - pass - - def test_get_voice_tests(self) -> None: - """Test case for get_voice_tests - - List Voice tests - """ - pass - - def test_update_voice_test(self) -> None: - """Test case for update_voice_test - - Update Voice test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_voice_instant_test.py b/tests_api/test/test_voice_instant_test.py deleted file mode 100644 index a80e5833..00000000 --- a/tests_api/test/test_voice_instant_test.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.voice_instant_test import VoiceInstantTest - -class TestVoiceInstantTest(unittest.TestCase): - """VoiceInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VoiceInstantTest: - """Test VoiceInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VoiceInstantTest` - """ - model = VoiceInstantTest() - if include_optional: - return VoiceInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'voice', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - codec = 'G.711 @ 64 Kbps', - codec_id = '0', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - duration = 5, - jitter_buffer = 0, - num_path_traces = 3, - port = 1024, - target_agent_id = '281474976710706' - ) - else: - return VoiceInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - target_agent_id = '281474976710706', - ) - """ - - def testVoiceInstantTest(self): - """Test VoiceInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_voice_test.py b/tests_api/test/test_voice_test.py deleted file mode 100644 index f71cab12..00000000 --- a/tests_api/test/test_voice_test.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.voice_test import VoiceTest - -class TestVoiceTest(unittest.TestCase): - """VoiceTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VoiceTest: - """Test VoiceTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VoiceTest` - """ - model = VoiceTest() - if include_optional: - return VoiceTest( - interval = 120, - alerts_enabled = True, - enabled = True, - alert_rules = [ - tests_api.models.alert_rule.AlertRule( - rule_id = '127094', - rule_name = 'The End of the Internet', - expression = '((hops((hopDelay >= 100 ms))))', - direction = 'to-target', - is_default = True, - alert_type = 'http-server', - minimum_sources = 10, - minimum_sources_pct = 99, - rounds_violating_mode = 'exact', - rounds_violating_out_of = 5, - rounds_violating_required = 2, ) - ], - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'voice', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - codec = 'G.711 @ 64 Kbps', - codec_id = '0', - dscp = 'Best Effort (DSCP 0)', - dscp_id = '0', - duration = 5, - jitter_buffer = 0, - num_path_traces = 3, - port = 1024, - target_agent_id = '281474976710706', - bgp_measurements = True - ) - else: - return VoiceTest( - interval = 120, - agents = [ - tests_api.models.agent.Agent() - ], - target_agent_id = '281474976710706', - ) - """ - - def testVoiceTest(self): - """Test VoiceTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_web_transaction_api.py b/tests_api/test/test_web_transaction_api.py deleted file mode 100644 index e5db1f9e..00000000 --- a/tests_api/test/test_web_transaction_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from tests_api.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(self) -> None: - """Test case for create_web_transactions_test - - Create Web Transactions test - """ - pass - - def test_delete_web_transactions_test(self) -> None: - """Test case for delete_web_transactions_test - - Delete Web Transactions test - """ - pass - - def test_get_web_transactions_test(self) -> None: - """Test case for get_web_transactions_test - - Get Web Transactions test - """ - pass - - def test_get_web_transactions_tests(self) -> None: - """Test case for get_web_transactions_tests - - List Web Transactions tests - """ - pass - - def test_update_web_transactions_test(self) -> None: - """Test case for update_web_transactions_test - - Update Web Transactions test - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/test/test_web_transaction_instant_test.py b/tests_api/test/test_web_transaction_instant_test.py deleted file mode 100644 index b4b8f78f..00000000 --- a/tests_api/test/test_web_transaction_instant_test.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from tests_api.models.web_transaction_instant_test import WebTransactionInstantTest - -class TestWebTransactionInstantTest(unittest.TestCase): - """WebTransactionInstantTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WebTransactionInstantTest: - """Test WebTransactionInstantTest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WebTransactionInstantTest` - """ - model = WebTransactionInstantTest() - if include_optional: - return WebTransactionInstantTest( - created_by = 'user@user.com', - created_date = '2022-07-17T22:00:54Z', - description = 'ThousandEyes Test', - live_share = False, - modified_by = 'user@user.com', - modified_date = '2022-07-17T22:00:54Z', - saved_event = True, - test_id = '281474976710706', - test_name = 'ThousandEyes Test', - type = 'web-transactions', - links = tests_api.models.unexpanded_instant_test__links.UnexpandedInstantTest__links( - self = null, - test_results = [{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/pathvis"}], ), - labels = [ - {"labelId":"961","name":"Artem label","isBuiltIn":false} - ], - shared_with_accounts = [ - tests_api.models.test_shared_accounts_inner.TestSharedAccounts_inner( - aid = '105', - name = 'Account name', ) - ], - agents = [ - tests_api.models.agent.Agent() - ], - auth_type = 'none', - bandwidth_measurements = True, - client_certificate = '-----BEGIN PRIVATE KEY----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END PRIVATE KEY----- ------BEGIN CERTIFICATE----- -MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL ------END CERTIFICATE----- -', - content_regex = '(regex)+', - credentials = ["3247","1051"], - custom_headers = {"root":{"header1":"value1"},"domains":{"domain1.com":{"header2":"value2"}},"all":{"header3":"value3"}}, - desired_status_code = '200', - follow_redirects = True, - http_target_time = 100, - http_time_limit = 5, - http_version = 1, - include_headers = True, - mtu_measurements = False, - network_measurements = True, - num_path_traces = 3, - password = 'password', - path_trace_mode = 'classic', - probe_mode = 'auto', - protocol = 'tcp', - ssl_version = 'Auto', - ssl_version_id = '0', - target_time = 1, - time_limit = 5, - transaction_script = 'if (true) { return true; }', - url = 'www.thousandeyes.com', - use_ntlm = False, - user_agent = 'curl', - username = 'username', - verify_certificate = True, - block_domains = 'domain.com/', - disable_screenshot = True, - allow_mic_and_camera = True, - allow_geolocation = True, - browser_language = 'en-US', - page_loading_strategy = 'normal', - fixed_packet_rate = 50 - ) - else: - return WebTransactionInstantTest( - agents = [ - tests_api.models.agent.Agent() - ], - transaction_script = 'if (true) { return true; }', - url = 'www.thousandeyes.com', - ) - """ - - def testWebTransactionInstantTest(self): - """Test WebTransactionInstantTest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/tests_api/tests_api/__init__.py b/tests_api/tests_api/__init__.py deleted file mode 100644 index fb399dd3..00000000 --- a/tests_api/tests_api/__init__.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 tests_api.api.agent_to_agent_api import AgentToAgentApi -from tests_api.api.agent_to_server_api import AgentToServerApi -from tests_api.api.all_test_types_api import AllTestTypesApi -from tests_api.api.bgp_api import BGPApi -from tests_api.api.dnssec_api import DNSSECApi -from tests_api.api.dns_server_api import DNSServerApi -from tests_api.api.dns_trace_api import DNSTraceApi -from tests_api.api.ftp_server_api import FTPServerApi -from tests_api.api.http_server_api import HTTPServerApi -from tests_api.api.page_load_api import PageLoadApi -from tests_api.api.path_visualization_interface_groups_api import PathVisualizationInterfaceGroupsApi -from tests_api.api.sip_server_api import SIPServerApi -from tests_api.api.voice_api import VoiceApi -from tests_api.api.web_transaction_api import WebTransactionApi - -# import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.api_client import ApiClient -from tests_api.configuration import Configuration -from tests_api.exceptions import OpenApiException -from tests_api.exceptions import ApiTypeError -from tests_api.exceptions import ApiValueError -from tests_api.exceptions import ApiKeyError -from tests_api.exceptions import ApiAttributeError -from tests_api.exceptions import ApiException - -# import models into sdk package -from tests_api.models.agent import Agent -from tests_api.models.agent_base import AgentBase -from tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest -from tests_api.models.agent_to_agent_test import AgentToAgentTest -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from tests_api.models.agent_to_agent_tests import AgentToAgentTests -from tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest -from tests_api.models.agent_to_server_test import AgentToServerTest -from tests_api.models.agent_to_server_tests import AgentToServerTests -from tests_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from tests_api.models.alert_rule import AlertRule -from tests_api.models.alert_type import AlertType -from tests_api.models.base_request import BaseRequest -from tests_api.models.base_test import BaseTest -from tests_api.models.bgp_test import BgpTest -from tests_api.models.bgp_tests import BgpTests -from tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.dns_sec_instant_test import DnsSecInstantTest -from tests_api.models.dns_sec_test import DnsSecTest -from tests_api.models.dns_sec_tests import DnsSecTests -from tests_api.models.dns_server_instant_test import DnsServerInstantTest -from tests_api.models.dns_server_test import DnsServerTest -from tests_api.models.dns_server_tests import DnsServerTests -from tests_api.models.dns_trace_instant_test import DnsTraceInstantTest -from tests_api.models.dns_trace_test import DnsTraceTest -from tests_api.models.dns_trace_tests import DnsTraceTests -from tests_api.models.error import Error -from tests_api.models.expand import Expand -from tests_api.models.ftp_server_instant_test import FtpServerInstantTest -from tests_api.models.ftp_server_request_type import FtpServerRequestType -from tests_api.models.ftp_server_test import FtpServerTest -from tests_api.models.ftp_server_tests import FtpServerTests -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response -from tests_api.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response -from tests_api.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response -from tests_api.models.get_bgp_tests200_response import GetBgpTests200Response -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response -from tests_api.models.get_dns_server_tests200_response import GetDNSServerTests200Response -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response -from tests_api.models.get_dns_sec_tests200_response import GetDnsSecTests200Response -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response -from tests_api.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response -from tests_api.models.get_ftp_server_tests200_response import GetFtpServerTests200Response -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response -from tests_api.models.get_http_server_tests200_response import GetHttpServerTests200Response -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response -from tests_api.models.get_page_load_tests200_response import GetPageLoadTests200Response -from tests_api.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response -from tests_api.models.get_sip_server_tests200_response import GetSipServerTests200Response -from tests_api.models.get_tests200_response import GetTests200Response -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response -from tests_api.models.get_voice_tests200_response import GetVoiceTests200Response -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response -from tests_api.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response -from tests_api.models.http_server_instant_test import HttpServerInstantTest -from tests_api.models.http_server_test import HttpServerTest -from tests_api.models.http_server_tests import HttpServerTests -from tests_api.models.instant_test import InstantTest -from tests_api.models.interface_group import InterfaceGroup -from tests_api.models.interface_groups import InterfaceGroups -from tests_api.models.link import Link -from tests_api.models.map_item import MapItem -from tests_api.models.monitor import Monitor -from tests_api.models.monitor_type import MonitorType -from tests_api.models.monitors_request import MonitorsRequest -from tests_api.models.page_load_instant_test import PageLoadInstantTest -from tests_api.models.page_load_test import PageLoadTest -from tests_api.models.page_load_tests import PageLoadTests -from tests_api.models.self_links import SelfLinks -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.simple_test import SimpleTest -from tests_api.models.sip_server_instant_test import SipServerInstantTest -from tests_api.models.sip_server_test import SipServerTest -from tests_api.models.sip_server_tests import SipServerTests -from tests_api.models.sip_test_protocol import SipTestProtocol -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_custom_headers_all import TestCustomHeadersAll -from tests_api.models.test_custom_headers_root import TestCustomHeadersRoot -from tests_api.models.test_direction import TestDirection -from tests_api.models.test_dns_server import TestDnsServer -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_http_interval import TestHttpInterval -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request import TestRequest -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_sip_credentials import TestSipCredentials -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -from tests_api.models.test_type import TestType -from tests_api.models.tests import Tests -from tests_api.models.unauthorized_error import UnauthorizedError -from tests_api.models.unexpanded_instant_test import UnexpandedInstantTest -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from tests_api.models.unexpanded_test import UnexpandedTest -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest -from tests_api.models.update_bgp_test import UpdateBgpTest -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest -from tests_api.models.update_dns_server_test import UpdateDnsServerTest -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest -from tests_api.models.update_http_server_test import UpdateHttpServerTest -from tests_api.models.update_page_load_test import UpdatePageLoadTest -from tests_api.models.update_path_vis_interface_group200_response import UpdatePathVisInterfaceGroup200Response -from tests_api.models.update_sip_server_test import UpdateSipServerTest -from tests_api.models.update_voice_test import UpdateVoiceTest -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest -from tests_api.models.voice_instant_test import VoiceInstantTest -from tests_api.models.voice_test import VoiceTest -from tests_api.models.voice_tests import VoiceTests -from tests_api.models.web_transaction_instant_test import WebTransactionInstantTest -from tests_api.models.web_transaction_test import WebTransactionTest -from tests_api.models.web_transaction_tests import WebTransactionTests diff --git a/tests_api/tests_api/api/__init__.py b/tests_api/tests_api/api/__init__.py deleted file mode 100644 index b09ffe56..00000000 --- a/tests_api/tests_api/api/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# flake8: noqa - -# import apis into api package -from tests_api.api.agent_to_agent_api import AgentToAgentApi -from tests_api.api.agent_to_server_api import AgentToServerApi -from tests_api.api.all_test_types_api import AllTestTypesApi -from tests_api.api.bgp_api import BGPApi -from tests_api.api.dnssec_api import DNSSECApi -from tests_api.api.dns_server_api import DNSServerApi -from tests_api.api.dns_trace_api import DNSTraceApi -from tests_api.api.ftp_server_api import FTPServerApi -from tests_api.api.http_server_api import HTTPServerApi -from tests_api.api.page_load_api import PageLoadApi -from tests_api.api.path_visualization_interface_groups_api import PathVisualizationInterfaceGroupsApi -from tests_api.api.sip_server_api import SIPServerApi -from tests_api.api.voice_api import VoiceApi -from tests_api.api.web_transaction_api import WebTransactionApi - diff --git a/tests_api/tests_api/api/agent_to_agent_api.py b/tests_api/tests_api/api/agent_to_agent_api.py deleted file mode 100644 index 7ea3d640..00000000 --- a/tests_api/tests_api/api/agent_to_agent_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.agent_to_agent_test import AgentToAgentTest -from tests_api.models.expand import Expand -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response -from tests_api.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class AgentToAgentApi: - """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() - self.api_client = api_client - - - @validate_call - def create_agent_to_agent_test( - self, - update_agent_to_agent_test: UpdateAgentToAgentTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> AgentToAgentTest: - """Create Agent to Agent test - - Creates a new Agent to Agent test. This method requires Account Admin permissions. - - :param update_agent_to_agent_test: (required) - :type update_agent_to_agent_test: UpdateAgentToAgentTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - update_agent_to_agent_test=update_agent_to_agent_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToAgentTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_agent_to_agent_test_with_http_info( - self, - update_agent_to_agent_test: UpdateAgentToAgentTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToAgentTest]: - """Create Agent to Agent test - - Creates a new Agent to Agent test. This method requires Account Admin permissions. - - :param update_agent_to_agent_test: (required) - :type update_agent_to_agent_test: UpdateAgentToAgentTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - update_agent_to_agent_test=update_agent_to_agent_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToAgentTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_agent_to_agent_test_without_preload_content( - self, - update_agent_to_agent_test: UpdateAgentToAgentTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Agent test - - Creates a new Agent to Agent test. This method requires Account Admin permissions. - - :param update_agent_to_agent_test: (required) - :type update_agent_to_agent_test: UpdateAgentToAgentTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - update_agent_to_agent_test=update_agent_to_agent_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToAgentTest", - '400': "Error", - '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_agent_test_serialize( - self, - update_agent_to_agent_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_agent_to_agent_test is not None: - _body_params = update_agent_to_agent_test - - - # 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/tests/agent-to-agent', - 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_agent_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Agent to Agent test - - Deletes the specified Agent to Agent test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_agent_to_agent_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_agent_to_agent_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Agent to Agent test - - Deletes the specified Agent to Agent test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_agent_to_agent_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_agent_to_agent_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Agent to Agent test - - Deletes the specified Agent to Agent test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_agent_to_agent_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_agent_to_agent_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/agent-to-agent/{testId}', - 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_agent_to_agent_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetAgentToAgentTest200Response: - """Get Agent to Agent test - - Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToAgentTest200Response", - '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, - ).data - - - @validate_call - def get_agent_to_agent_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetAgentToAgentTest200Response]: - """Get Agent to Agent test - - Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToAgentTest200Response", - '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, - ) - - - @validate_call - def get_agent_to_agent_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get Agent to Agent test - - Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToAgentTest200Response", - '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_agent_to_agent_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/agent-to-agent/{testId}', - 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_agent_to_agent_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[ - 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, - ) -> GetAgentToAgentTests200Response: - """List Agent to Agent tests - - Returns a list of Agent to Agent tests and saved events. - - :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_agent_to_agent_tests_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': "GetAgentToAgentTests200Response", - '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, - ).data - - - @validate_call - def get_agent_to_agent_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[ - 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[GetAgentToAgentTests200Response]: - """List Agent to Agent tests - - Returns a list of Agent to Agent tests and saved events. - - :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_agent_to_agent_tests_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': "GetAgentToAgentTests200Response", - '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, - ) - - - @validate_call - def get_agent_to_agent_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[ - 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 Agent to Agent tests - - Returns a list of Agent to Agent tests and saved events. - - :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_agent_to_agent_tests_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': "GetAgentToAgentTests200Response", - '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_agent_to_agent_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/agent-to-agent', - 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_agent_to_agent_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_agent_to_agent_test: UpdateAgentToAgentTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetAgentToAgentTest200Response: - """Update Agent to Agent test - - Updates a Agent to Agent test. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_agent_to_agent_test: (required) - :type update_agent_to_agent_test: UpdateAgentToAgentTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - test_id=test_id, - update_agent_to_agent_test=update_agent_to_agent_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToAgentTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_agent_to_agent_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_agent_to_agent_test: UpdateAgentToAgentTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetAgentToAgentTest200Response]: - """Update Agent to Agent test - - Updates a Agent to Agent test. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_agent_to_agent_test: (required) - :type update_agent_to_agent_test: UpdateAgentToAgentTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - test_id=test_id, - update_agent_to_agent_test=update_agent_to_agent_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToAgentTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_agent_to_agent_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_agent_to_agent_test: UpdateAgentToAgentTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Agent test - - Updates a Agent to Agent test. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_agent_to_agent_test: (required) - :type update_agent_to_agent_test: UpdateAgentToAgentTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_agent_test_serialize( - test_id=test_id, - update_agent_to_agent_test=update_agent_to_agent_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToAgentTest200Response", - '400': "Error", - '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 _update_agent_to_agent_test_serialize( - self, - test_id, - update_agent_to_agent_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_agent_to_agent_test is not None: - _body_params = update_agent_to_agent_test - - - # 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='PUT', - resource_path='/v7/tests/agent-to-agent/{testId}', - 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/tests_api/tests_api/api/agent_to_server_api.py b/tests_api/tests_api/api/agent_to_server_api.py deleted file mode 100644 index bed19f70..00000000 --- a/tests_api/tests_api/api/agent_to_server_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.agent_to_server_test import AgentToServerTest -from tests_api.models.expand import Expand -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response -from tests_api.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class AgentToServerApi: - """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() - self.api_client = api_client - - - @validate_call - def create_agent_to_server_test( - self, - update_agent_to_server_test: UpdateAgentToServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> AgentToServerTest: - """Create Agent to Server test - - Creates a new Agent to Server test. This method requires Account Admin permissions. - - :param update_agent_to_server_test: (required) - :type update_agent_to_server_test: UpdateAgentToServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - update_agent_to_server_test=update_agent_to_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToServerTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_agent_to_server_test_with_http_info( - self, - update_agent_to_server_test: UpdateAgentToServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[AgentToServerTest]: - """Create Agent to Server test - - Creates a new Agent to Server test. This method requires Account Admin permissions. - - :param update_agent_to_server_test: (required) - :type update_agent_to_server_test: UpdateAgentToServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - update_agent_to_server_test=update_agent_to_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToServerTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_agent_to_server_test_without_preload_content( - self, - update_agent_to_server_test: UpdateAgentToServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Server test - - Creates a new Agent to Server test. This method requires Account Admin permissions. - - :param update_agent_to_server_test: (required) - :type update_agent_to_server_test: UpdateAgentToServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - update_agent_to_server_test=update_agent_to_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "AgentToServerTest", - '400': "Error", - '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_test_serialize( - self, - update_agent_to_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_agent_to_server_test is not None: - _body_params = update_agent_to_server_test - - - # 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/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_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Agent to Server test - - Deletes an Agent to Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_agent_to_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_agent_to_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Agent to Server test - - Deletes an Agent to Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_agent_to_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_agent_to_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Agent to Server test - - Deletes an Agent to Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_agent_to_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_agent_to_server_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/agent-to-server/{testId}', - 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_agent_to_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetAgentToServerTest200Response: - """Get Agent to Server test - - Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToServerTest200Response", - '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, - ).data - - - @validate_call - def get_agent_to_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetAgentToServerTest200Response]: - """Get Agent to Server test - - Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToServerTest200Response", - '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, - ) - - - @validate_call - def get_agent_to_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get Agent to Server test - - Returns details for a Agent to Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToServerTest200Response", - '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_agent_to_server_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/agent-to-server/{testId}', - 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_agent_to_server_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[ - 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, - ) -> GetAgentToServerTests200Response: - """List Agent to Server tests - - Returns a list of Agent to Server tests and saved events. - - :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_agent_to_server_tests_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': "GetAgentToServerTests200Response", - '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, - ).data - - - @validate_call - def get_agent_to_server_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[ - 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[GetAgentToServerTests200Response]: - """List Agent to Server tests - - Returns a list of Agent to Server tests and saved events. - - :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_agent_to_server_tests_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': "GetAgentToServerTests200Response", - '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, - ) - - - @validate_call - def get_agent_to_server_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[ - 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 Agent to Server tests - - Returns a list of Agent to Server tests and saved events. - - :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_agent_to_server_tests_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': "GetAgentToServerTests200Response", - '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_agent_to_server_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/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_agent_to_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_agent_to_server_test: UpdateAgentToServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetAgentToServerTest200Response: - """Update Agent to Server test - - Updates an Agent to Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_agent_to_server_test: (required) - :type update_agent_to_server_test: UpdateAgentToServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - test_id=test_id, - update_agent_to_server_test=update_agent_to_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToServerTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_agent_to_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_agent_to_server_test: UpdateAgentToServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetAgentToServerTest200Response]: - """Update Agent to Server test - - Updates an Agent to Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_agent_to_server_test: (required) - :type update_agent_to_server_test: UpdateAgentToServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - test_id=test_id, - update_agent_to_server_test=update_agent_to_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToServerTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_agent_to_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_agent_to_server_test: UpdateAgentToServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Agent to Server test - - Updates an Agent to Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_agent_to_server_test: (required) - :type update_agent_to_server_test: UpdateAgentToServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_agent_to_server_test_serialize( - test_id=test_id, - update_agent_to_server_test=update_agent_to_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAgentToServerTest200Response", - '400': "Error", - '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 _update_agent_to_server_test_serialize( - self, - test_id, - update_agent_to_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_agent_to_server_test is not None: - _body_params = update_agent_to_server_test - - - # 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='PUT', - resource_path='/v7/tests/agent-to-server/{testId}', - 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/tests_api/tests_api/api/dns_server_api.py b/tests_api/tests_api/api/dns_server_api.py deleted file mode 100644 index 46ce782d..00000000 --- a/tests_api/tests_api/api/dns_server_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.dns_server_test import DnsServerTest -from tests_api.models.expand import Expand -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response -from tests_api.models.get_dns_server_tests200_response import GetDNSServerTests200Response -from tests_api.models.update_dns_server_test import UpdateDnsServerTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class DNSServerApi: - """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() - self.api_client = api_client - - - @validate_call - def create_dns_server_test( - self, - update_dns_server_test: UpdateDnsServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> DnsServerTest: - """Create DNS Server test - - Creates a new DNS Server test. This method requires Account Admin permissions. - - :param update_dns_server_test: (required) - :type update_dns_server_test: UpdateDnsServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - update_dns_server_test=update_dns_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsServerTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_dns_server_test_with_http_info( - self, - update_dns_server_test: UpdateDnsServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsServerTest]: - """Create DNS Server test - - Creates a new DNS Server test. This method requires Account Admin permissions. - - :param update_dns_server_test: (required) - :type update_dns_server_test: UpdateDnsServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - update_dns_server_test=update_dns_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsServerTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_dns_server_test_without_preload_content( - self, - update_dns_server_test: UpdateDnsServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Server test - - Creates a new DNS Server test. This method requires Account Admin permissions. - - :param update_dns_server_test: (required) - :type update_dns_server_test: UpdateDnsServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - update_dns_server_test=update_dns_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsServerTest", - '400': "Error", - '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_dns_server_test_serialize( - self, - update_dns_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_dns_server_test is not None: - _body_params = update_dns_server_test - - - # 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/tests/dns-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_dns_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 DNS Server test - - Deletes the specified DNS Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_dns_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_dns_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 DNS Server test - - Deletes the specified DNS Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_dns_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_dns_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 DNS Server test - - Deletes the specified DNS Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_dns_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_dns_server_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/dns-server/{testId}', - 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_dns_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetDNSServerTest200Response: - """Get DNS Server test - - Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDNSServerTest200Response", - '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, - ).data - - - @validate_call - def get_dns_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetDNSServerTest200Response]: - """Get DNS Server test - - Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDNSServerTest200Response", - '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, - ) - - - @validate_call - def get_dns_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get DNS Server test - - Returns details for a DNS Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDNSServerTest200Response", - '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_dns_server_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/dns-server/{testId}', - 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_dns_server_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[ - 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, - ) -> GetDNSServerTests200Response: - """List DNS Server tests - - Returns a list of all DNS Server tests and saved events. - - :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_dns_server_tests_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': "GetDNSServerTests200Response", - '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, - ).data - - - @validate_call - def get_dns_server_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[ - 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[GetDNSServerTests200Response]: - """List DNS Server tests - - Returns a list of all DNS Server tests and saved events. - - :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_dns_server_tests_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': "GetDNSServerTests200Response", - '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, - ) - - - @validate_call - def get_dns_server_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[ - 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 DNS Server tests - - Returns a list of all DNS Server tests and saved events. - - :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_dns_server_tests_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': "GetDNSServerTests200Response", - '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_dns_server_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/dns-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_dns_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_dns_server_test: UpdateDnsServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetDNSServerTest200Response: - """Update DNS Server test - - Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_dns_server_test: (required) - :type update_dns_server_test: UpdateDnsServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - test_id=test_id, - update_dns_server_test=update_dns_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDNSServerTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_dns_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_dns_server_test: UpdateDnsServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetDNSServerTest200Response]: - """Update DNS Server test - - Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_dns_server_test: (required) - :type update_dns_server_test: UpdateDnsServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - test_id=test_id, - update_dns_server_test=update_dns_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDNSServerTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_dns_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_dns_server_test: UpdateDnsServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Server test - - Updates a DNS Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_dns_server_test: (required) - :type update_dns_server_test: UpdateDnsServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_server_test_serialize( - test_id=test_id, - update_dns_server_test=update_dns_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDNSServerTest200Response", - '400': "Error", - '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 _update_dns_server_test_serialize( - self, - test_id, - update_dns_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_dns_server_test is not None: - _body_params = update_dns_server_test - - - # 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='PUT', - resource_path='/v7/tests/dns-server/{testId}', - 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/tests_api/tests_api/api/dns_trace_api.py b/tests_api/tests_api/api/dns_trace_api.py deleted file mode 100644 index 8cfb4929..00000000 --- a/tests_api/tests_api/api/dns_trace_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.dns_trace_test import DnsTraceTest -from tests_api.models.expand import Expand -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response -from tests_api.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class DNSTraceApi: - """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() - self.api_client = api_client - - - @validate_call - def create_dns_trace_test( - self, - update_dns_trace_test: UpdateDnsTraceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> DnsTraceTest: - """Create DNS Trace test - - Creates a new DNS Trace test. This method requires Account Admin permissions. - - :param update_dns_trace_test: (required) - :type update_dns_trace_test: UpdateDnsTraceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - update_dns_trace_test=update_dns_trace_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsTraceTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_dns_trace_test_with_http_info( - self, - update_dns_trace_test: UpdateDnsTraceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[DnsTraceTest]: - """Create DNS Trace test - - Creates a new DNS Trace test. This method requires Account Admin permissions. - - :param update_dns_trace_test: (required) - :type update_dns_trace_test: UpdateDnsTraceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - update_dns_trace_test=update_dns_trace_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsTraceTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_dns_trace_test_without_preload_content( - self, - update_dns_trace_test: UpdateDnsTraceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Trace test - - Creates a new DNS Trace test. This method requires Account Admin permissions. - - :param update_dns_trace_test: (required) - :type update_dns_trace_test: UpdateDnsTraceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - update_dns_trace_test=update_dns_trace_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DnsTraceTest", - '400': "Error", - '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_dns_trace_test_serialize( - self, - update_dns_trace_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_dns_trace_test is not None: - _body_params = update_dns_trace_test - - - # 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/tests/dns-trace', - 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_dns_trace_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 DNS Trace test - - Deletes the specified DNS Trace test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_dns_trace_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_dns_trace_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 DNS Trace test - - Deletes the specified DNS Trace test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_dns_trace_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_dns_trace_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 DNS Trace test - - Deletes the specified DNS Trace test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_dns_trace_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_dns_trace_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/dns-trace/{testId}', - 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_dns_trace_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetDnsTraceTest200Response: - """Get DNS Trace test - - Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsTraceTest200Response", - '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, - ).data - - - @validate_call - def get_dns_trace_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetDnsTraceTest200Response]: - """Get DNS Trace test - - Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsTraceTest200Response", - '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, - ) - - - @validate_call - def get_dns_trace_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get DNS Trace test - - Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsTraceTest200Response", - '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_dns_trace_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/dns-trace/{testId}', - 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_dns_trace_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[ - 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, - ) -> GetDnsTraceTests200Response: - """List DNS Trace tests - - Returns a list of all DNS Trace tests and saved events. - - :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_dns_trace_tests_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': "GetDnsTraceTests200Response", - '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, - ).data - - - @validate_call - def get_dns_trace_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[ - 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[GetDnsTraceTests200Response]: - """List DNS Trace tests - - Returns a list of all DNS Trace tests and saved events. - - :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_dns_trace_tests_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': "GetDnsTraceTests200Response", - '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, - ) - - - @validate_call - def get_dns_trace_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[ - 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 DNS Trace tests - - Returns a list of all DNS Trace tests and saved events. - - :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_dns_trace_tests_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': "GetDnsTraceTests200Response", - '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_dns_trace_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/dns-trace', - 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_dns_trace_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_dns_trace_test: UpdateDnsTraceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetDnsTraceTest200Response: - """Update DNS Trace test - - Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_dns_trace_test: (required) - :type update_dns_trace_test: UpdateDnsTraceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - test_id=test_id, - update_dns_trace_test=update_dns_trace_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsTraceTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_dns_trace_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_dns_trace_test: UpdateDnsTraceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetDnsTraceTest200Response]: - """Update DNS Trace test - - Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_dns_trace_test: (required) - :type update_dns_trace_test: UpdateDnsTraceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - test_id=test_id, - update_dns_trace_test=update_dns_trace_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsTraceTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_dns_trace_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_dns_trace_test: UpdateDnsTraceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 DNS Trace test - - Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_dns_trace_test: (required) - :type update_dns_trace_test: UpdateDnsTraceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_dns_trace_test_serialize( - test_id=test_id, - update_dns_trace_test=update_dns_trace_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDnsTraceTest200Response", - '400': "Error", - '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 _update_dns_trace_test_serialize( - self, - test_id, - update_dns_trace_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_dns_trace_test is not None: - _body_params = update_dns_trace_test - - - # 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='PUT', - resource_path='/v7/tests/dns-trace/{testId}', - 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/tests_api/tests_api/api/ftp_server_api.py b/tests_api/tests_api/api/ftp_server_api.py deleted file mode 100644 index 356967c5..00000000 --- a/tests_api/tests_api/api/ftp_server_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.expand import Expand -from tests_api.models.ftp_server_test import FtpServerTest -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response -from tests_api.models.get_ftp_server_tests200_response import GetFtpServerTests200Response -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class FTPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def create_ftp_server_test( - self, - update_ftp_server_test: UpdateFtpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> FtpServerTest: - """Create FTP Server test - - Creates a new FTP Server test. This method requires Account Admin permissions. - - :param update_ftp_server_test: (required) - :type update_ftp_server_test: UpdateFtpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - update_ftp_server_test=update_ftp_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FtpServerTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_ftp_server_test_with_http_info( - self, - update_ftp_server_test: UpdateFtpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[FtpServerTest]: - """Create FTP Server test - - Creates a new FTP Server test. This method requires Account Admin permissions. - - :param update_ftp_server_test: (required) - :type update_ftp_server_test: UpdateFtpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - update_ftp_server_test=update_ftp_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FtpServerTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_ftp_server_test_without_preload_content( - self, - update_ftp_server_test: UpdateFtpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 FTP Server test - - Creates a new FTP Server test. This method requires Account Admin permissions. - - :param update_ftp_server_test: (required) - :type update_ftp_server_test: UpdateFtpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - update_ftp_server_test=update_ftp_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FtpServerTest", - '400': "Error", - '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_ftp_server_test_serialize( - self, - update_ftp_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_ftp_server_test is not None: - _body_params = update_ftp_server_test - - - # 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/tests/ftp-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_ftp_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 FTP Server test - - Deletes the specified FTP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_ftp_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_ftp_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 FTP Server test - - Deletes the specified FTP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_ftp_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_ftp_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 FTP Server test - - Deletes the specified FTP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_ftp_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_ftp_server_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/ftp-server/{testId}', - 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_ftp_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetFtpServerTest200Response: - """Get FTP Server test - - Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFtpServerTest200Response", - '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, - ).data - - - @validate_call - def get_ftp_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetFtpServerTest200Response]: - """Get FTP Server test - - Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFtpServerTest200Response", - '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, - ) - - - @validate_call - def get_ftp_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get FTP Server test - - Returns details for a FTP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFtpServerTest200Response", - '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_ftp_server_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/ftp-server/{testId}', - 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_ftp_server_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[ - 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, - ) -> GetFtpServerTests200Response: - """List FTP Server tests - - Returns a list of FTP Server tests and saved events. - - :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_ftp_server_tests_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': "GetFtpServerTests200Response", - '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, - ).data - - - @validate_call - def get_ftp_server_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[ - 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[GetFtpServerTests200Response]: - """List FTP Server tests - - Returns a list of FTP Server tests and saved events. - - :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_ftp_server_tests_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': "GetFtpServerTests200Response", - '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, - ) - - - @validate_call - def get_ftp_server_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[ - 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 FTP Server tests - - Returns a list of FTP Server tests and saved events. - - :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_ftp_server_tests_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': "GetFtpServerTests200Response", - '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_ftp_server_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/ftp-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_ftp_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_ftp_server_test: UpdateFtpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetFtpServerTest200Response: - """Update FTP Server test - - Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_ftp_server_test: (required) - :type update_ftp_server_test: UpdateFtpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - test_id=test_id, - update_ftp_server_test=update_ftp_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFtpServerTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_ftp_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_ftp_server_test: UpdateFtpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetFtpServerTest200Response]: - """Update FTP Server test - - Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_ftp_server_test: (required) - :type update_ftp_server_test: UpdateFtpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - test_id=test_id, - update_ftp_server_test=update_ftp_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFtpServerTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_ftp_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_ftp_server_test: UpdateFtpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 FTP Server test - - Updates a FTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_ftp_server_test: (required) - :type update_ftp_server_test: UpdateFtpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_ftp_server_test_serialize( - test_id=test_id, - update_ftp_server_test=update_ftp_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFtpServerTest200Response", - '400': "Error", - '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 _update_ftp_server_test_serialize( - self, - test_id, - update_ftp_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_ftp_server_test is not None: - _body_params = update_ftp_server_test - - - # 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='PUT', - resource_path='/v7/tests/ftp-server/{testId}', - 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/tests_api/tests_api/api/http_server_api.py b/tests_api/tests_api/api/http_server_api.py deleted file mode 100644 index 23a8c6df..00000000 --- a/tests_api/tests_api/api/http_server_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.expand import Expand -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response -from tests_api.models.get_http_server_tests200_response import GetHttpServerTests200Response -from tests_api.models.http_server_test import HttpServerTest -from tests_api.models.update_http_server_test import UpdateHttpServerTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class HTTPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def create_http_server_test( - self, - update_http_server_test: UpdateHttpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> HttpServerTest: - """Create HTTP Server test - - Creates a new HTTP Server test. This method requires Account Admin permissions. - - :param update_http_server_test: (required) - :type update_http_server_test: UpdateHttpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - update_http_server_test=update_http_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "HttpServerTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_http_server_test_with_http_info( - self, - update_http_server_test: UpdateHttpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[HttpServerTest]: - """Create HTTP Server test - - Creates a new HTTP Server test. This method requires Account Admin permissions. - - :param update_http_server_test: (required) - :type update_http_server_test: UpdateHttpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - update_http_server_test=update_http_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "HttpServerTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_http_server_test_without_preload_content( - self, - update_http_server_test: UpdateHttpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 HTTP Server test - - Creates a new HTTP Server test. This method requires Account Admin permissions. - - :param update_http_server_test: (required) - :type update_http_server_test: UpdateHttpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - update_http_server_test=update_http_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "HttpServerTest", - '400': "Error", - '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_test_serialize( - self, - update_http_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_http_server_test is not None: - _body_params = update_http_server_test - - - # 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/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_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 HTTP Server test - - Deletes the specified HTTP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_http_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_http_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 HTTP Server test - - Deletes the specified HTTP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_http_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_http_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 HTTP Server test - - Deletes the specified HTTP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_http_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_http_server_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/http-server/{testId}', - 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_http_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetHttpServerTest200Response: - """Get HTTP Server test - - Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHttpServerTest200Response", - '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, - ).data - - - @validate_call - def get_http_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetHttpServerTest200Response]: - """Get HTTP Server test - - Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHttpServerTest200Response", - '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, - ) - - - @validate_call - def get_http_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get HTTP Server test - - Returns details for a HTTP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHttpServerTest200Response", - '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_http_server_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/http-server/{testId}', - 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_http_server_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[ - 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, - ) -> GetHttpServerTests200Response: - """List HTTP Server tests - - Returns a list of all HTTP Server tests and saved events. - - :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_http_server_tests_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': "GetHttpServerTests200Response", - '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, - ).data - - - @validate_call - def get_http_server_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[ - 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[GetHttpServerTests200Response]: - """List HTTP Server tests - - Returns a list of all HTTP Server tests and saved events. - - :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_http_server_tests_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': "GetHttpServerTests200Response", - '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, - ) - - - @validate_call - def get_http_server_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[ - 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 HTTP Server tests - - Returns a list of all HTTP Server tests and saved events. - - :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_http_server_tests_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': "GetHttpServerTests200Response", - '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_http_server_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/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_http_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_http_server_test: UpdateHttpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetHttpServerTest200Response: - """Update HTTP Server test - - Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_http_server_test: (required) - :type update_http_server_test: UpdateHttpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - test_id=test_id, - update_http_server_test=update_http_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHttpServerTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_http_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_http_server_test: UpdateHttpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetHttpServerTest200Response]: - """Update HTTP Server test - - Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_http_server_test: (required) - :type update_http_server_test: UpdateHttpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - test_id=test_id, - update_http_server_test=update_http_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHttpServerTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_http_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_http_server_test: UpdateHttpServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 HTTP Server test - - Updates a HTTP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_http_server_test: (required) - :type update_http_server_test: UpdateHttpServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_http_server_test_serialize( - test_id=test_id, - update_http_server_test=update_http_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHttpServerTest200Response", - '400': "Error", - '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 _update_http_server_test_serialize( - self, - test_id, - update_http_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_http_server_test is not None: - _body_params = update_http_server_test - - - # 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='PUT', - resource_path='/v7/tests/http-server/{testId}', - 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/tests_api/tests_api/api/sip_server_api.py b/tests_api/tests_api/api/sip_server_api.py deleted file mode 100644 index 8b108856..00000000 --- a/tests_api/tests_api/api/sip_server_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.expand import Expand -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response -from tests_api.models.get_sip_server_tests200_response import GetSipServerTests200Response -from tests_api.models.sip_server_test import SipServerTest -from tests_api.models.update_sip_server_test import UpdateSipServerTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class SIPServerApi: - """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() - self.api_client = api_client - - - @validate_call - def create_sip_server_test( - self, - update_sip_server_test: UpdateSipServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> SipServerTest: - """Create SIP Server test - - Creates a new SIP Server test. This method requires Account Admin permissions. - - :param update_sip_server_test: (required) - :type update_sip_server_test: UpdateSipServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - update_sip_server_test=update_sip_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SipServerTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_sip_server_test_with_http_info( - self, - update_sip_server_test: UpdateSipServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[SipServerTest]: - """Create SIP Server test - - Creates a new SIP Server test. This method requires Account Admin permissions. - - :param update_sip_server_test: (required) - :type update_sip_server_test: UpdateSipServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - update_sip_server_test=update_sip_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SipServerTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_sip_server_test_without_preload_content( - self, - update_sip_server_test: UpdateSipServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 SIP Server test - - Creates a new SIP Server test. This method requires Account Admin permissions. - - :param update_sip_server_test: (required) - :type update_sip_server_test: UpdateSipServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - update_sip_server_test=update_sip_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SipServerTest", - '400': "Error", - '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_sip_server_test_serialize( - self, - update_sip_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_sip_server_test is not None: - _body_params = update_sip_server_test - - - # 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/tests/sip-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_sip_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 SIP Server test - - Deletes the specified SIP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_sip_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_sip_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 SIP Server test - - Deletes the specified SIP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_sip_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_sip_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 SIP Server test - - Deletes the specified SIP Server test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_sip_server_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_sip_server_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/sip-server/{testId}', - 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_sip_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetSipServerTest200Response: - """Get SIP Server test - - Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSipServerTest200Response", - '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, - ).data - - - @validate_call - def get_sip_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetSipServerTest200Response]: - """Get SIP Server test - - Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSipServerTest200Response", - '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, - ) - - - @validate_call - def get_sip_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get SIP Server test - - Returns details for a SIP Server test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSipServerTest200Response", - '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_sip_server_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/sip-server/{testId}', - 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_sip_server_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[ - 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, - ) -> GetSipServerTests200Response: - """List SIP Server tests - - Returns a list of SIP Server tests and saved events. - - :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_sip_server_tests_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': "GetSipServerTests200Response", - '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, - ).data - - - @validate_call - def get_sip_server_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[ - 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[GetSipServerTests200Response]: - """List SIP Server tests - - Returns a list of SIP Server tests and saved events. - - :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_sip_server_tests_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': "GetSipServerTests200Response", - '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, - ) - - - @validate_call - def get_sip_server_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[ - 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 SIP Server tests - - Returns a list of SIP Server tests and saved events. - - :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_sip_server_tests_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': "GetSipServerTests200Response", - '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_sip_server_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/sip-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_sip_server_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_sip_server_test: UpdateSipServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetSipServerTest200Response: - """Update SIP Server test - - Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_sip_server_test: (required) - :type update_sip_server_test: UpdateSipServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - test_id=test_id, - update_sip_server_test=update_sip_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSipServerTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_sip_server_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_sip_server_test: UpdateSipServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetSipServerTest200Response]: - """Update SIP Server test - - Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_sip_server_test: (required) - :type update_sip_server_test: UpdateSipServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - test_id=test_id, - update_sip_server_test=update_sip_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSipServerTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_sip_server_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_sip_server_test: UpdateSipServerTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 SIP Server test - - Updates a SIP Server test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_sip_server_test: (required) - :type update_sip_server_test: UpdateSipServerTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_sip_server_test_serialize( - test_id=test_id, - update_sip_server_test=update_sip_server_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSipServerTest200Response", - '400': "Error", - '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 _update_sip_server_test_serialize( - self, - test_id, - update_sip_server_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_sip_server_test is not None: - _body_params = update_sip_server_test - - - # 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='PUT', - resource_path='/v7/tests/sip-server/{testId}', - 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/tests_api/tests_api/api/voice_api.py b/tests_api/tests_api/api/voice_api.py deleted file mode 100644 index 57211686..00000000 --- a/tests_api/tests_api/api/voice_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.expand import Expand -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response -from tests_api.models.get_voice_tests200_response import GetVoiceTests200Response -from tests_api.models.update_voice_test import UpdateVoiceTest -from tests_api.models.voice_test import VoiceTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class VoiceApi: - """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() - self.api_client = api_client - - - @validate_call - def create_voice_test( - self, - update_voice_test: UpdateVoiceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> VoiceTest: - """Create Voice test - - Creates a new Voice test. This method requires Account Admin permissions. - - :param update_voice_test: (required) - :type update_voice_test: UpdateVoiceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - update_voice_test=update_voice_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "VoiceTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_voice_test_with_http_info( - self, - update_voice_test: UpdateVoiceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[VoiceTest]: - """Create Voice test - - Creates a new Voice test. This method requires Account Admin permissions. - - :param update_voice_test: (required) - :type update_voice_test: UpdateVoiceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - update_voice_test=update_voice_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "VoiceTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_voice_test_without_preload_content( - self, - update_voice_test: UpdateVoiceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Voice test - - Creates a new Voice test. This method requires Account Admin permissions. - - :param update_voice_test: (required) - :type update_voice_test: UpdateVoiceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - update_voice_test=update_voice_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "VoiceTest", - '400': "Error", - '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_voice_test_serialize( - self, - update_voice_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_voice_test is not None: - _body_params = update_voice_test - - - # 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/tests/voice', - 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_voice_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Voice test - - Deletes the specified Voice test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_voice_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_voice_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Voice test - - Deletes the specified Voice test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_voice_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_voice_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Voice test - - Deletes the specified Voice test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_voice_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_voice_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/voice/{testId}', - 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_voice_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetVoiceTest200Response: - """Get Voice test - - Returns details for a Voice test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetVoiceTest200Response", - '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, - ).data - - - @validate_call - def get_voice_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetVoiceTest200Response]: - """Get Voice test - - Returns details for a Voice test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetVoiceTest200Response", - '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, - ) - - - @validate_call - def get_voice_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get Voice test - - Returns details for a Voice test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetVoiceTest200Response", - '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_voice_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/voice/{testId}', - 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_voice_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[ - 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, - ) -> GetVoiceTests200Response: - """List Voice tests - - Returns a list of Voice tests and saved events. - - :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_voice_tests_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': "GetVoiceTests200Response", - '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, - ).data - - - @validate_call - def get_voice_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[ - 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[GetVoiceTests200Response]: - """List Voice tests - - Returns a list of Voice tests and saved events. - - :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_voice_tests_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': "GetVoiceTests200Response", - '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, - ) - - - @validate_call - def get_voice_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[ - 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 Voice tests - - Returns a list of Voice tests and saved events. - - :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_voice_tests_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': "GetVoiceTests200Response", - '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_voice_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/voice', - 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_voice_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_voice_test: UpdateVoiceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetVoiceTest200Response: - """Update Voice test - - Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_voice_test: (required) - :type update_voice_test: UpdateVoiceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - test_id=test_id, - update_voice_test=update_voice_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetVoiceTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_voice_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_voice_test: UpdateVoiceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetVoiceTest200Response]: - """Update Voice test - - Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_voice_test: (required) - :type update_voice_test: UpdateVoiceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - test_id=test_id, - update_voice_test=update_voice_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetVoiceTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_voice_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_voice_test: UpdateVoiceTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Voice test - - Updates a Voice test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_voice_test: (required) - :type update_voice_test: UpdateVoiceTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_voice_test_serialize( - test_id=test_id, - update_voice_test=update_voice_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetVoiceTest200Response", - '400': "Error", - '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 _update_voice_test_serialize( - self, - test_id, - update_voice_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_voice_test is not None: - _body_params = update_voice_test - - - # 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='PUT', - resource_path='/v7/tests/voice/{testId}', - 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/tests_api/tests_api/api/web_transaction_api.py b/tests_api/tests_api/api/web_transaction_api.py deleted file mode 100644 index 365f236d..00000000 --- a/tests_api/tests_api/api/web_transaction_api.py +++ /dev/null @@ -1,1620 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from tests_api.models.expand import Expand -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response -from tests_api.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest -from tests_api.models.web_transaction_test import WebTransactionTest - -from tests_api.api_client import ApiClient -from tests_api.api_response import ApiResponse -from tests_api.rest import RESTResponseType - - -class WebTransactionApi: - """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() - self.api_client = api_client - - - @validate_call - def create_web_transactions_test( - self, - update_web_transaction_test: UpdateWebTransactionTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> WebTransactionTest: - """Create Web Transactions test - - Creates a new Web Transactions test. This method requires Account Admin permissions. - - :param update_web_transaction_test: (required) - :type update_web_transaction_test: UpdateWebTransactionTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - update_web_transaction_test=update_web_transaction_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WebTransactionTest", - '400': "Error", - '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, - ).data - - - @validate_call - def create_web_transactions_test_with_http_info( - self, - update_web_transaction_test: UpdateWebTransactionTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[WebTransactionTest]: - """Create Web Transactions test - - Creates a new Web Transactions test. This method requires Account Admin permissions. - - :param update_web_transaction_test: (required) - :type update_web_transaction_test: UpdateWebTransactionTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - update_web_transaction_test=update_web_transaction_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WebTransactionTest", - '400': "Error", - '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, - ) - - - @validate_call - def create_web_transactions_test_without_preload_content( - self, - update_web_transaction_test: UpdateWebTransactionTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Web Transactions test - - Creates a new Web Transactions test. This method requires Account Admin permissions. - - :param update_web_transaction_test: (required) - :type update_web_transaction_test: UpdateWebTransactionTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - update_web_transaction_test=update_web_transaction_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WebTransactionTest", - '400': "Error", - '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_web_transactions_test_serialize( - self, - update_web_transaction_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 update_web_transaction_test is not None: - _body_params = update_web_transaction_test - - - # 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/tests/web-transactions', - 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_web_transactions_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Web Transactions test - - Deletes the specified Web Transactions test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_web_transactions_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ).data - - - @validate_call - def delete_web_transactions_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Web Transactions test - - Deletes the specified Web Transactions test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_web_transactions_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - 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, - ) - - - @validate_call - def delete_web_transactions_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - _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 Web Transactions test - - Deletes the specified Web Transactions test. This method requires Account Admin permissions. - - :param test_id: ID of the test (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 _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_web_transactions_test_serialize( - test_id=test_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_web_transactions_test_serialize( - self, - test_id, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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)) - - # 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/tests/web-transactions/{testId}', - 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_web_transactions_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetWebTransactionsTest200Response: - """Get Web Transactions test - - Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetWebTransactionsTest200Response", - '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, - ).data - - - @validate_call - def get_web_transactions_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetWebTransactionsTest200Response]: - """Get Web Transactions test - - Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetWebTransactionsTest200Response", - '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, - ) - - - @validate_call - def get_web_transactions_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the 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, - expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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: - """Get Web Transactions test - - Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents. - - :param test_id: ID of the test (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 expand: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - test_id=test_id, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetWebTransactionsTest200Response", - '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_web_transactions_test_serialize( - self, - test_id, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/tests/web-transactions/{testId}', - 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_web_transactions_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[ - 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, - ) -> GetWebTransactionsTests200Response: - """List Web Transactions tests - - Returns a list of all Web Transactions tests and saved events. - - :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_web_transactions_tests_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': "GetWebTransactionsTests200Response", - '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, - ).data - - - @validate_call - def get_web_transactions_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[ - 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[GetWebTransactionsTests200Response]: - """List Web Transactions tests - - Returns a list of all Web Transactions tests and saved events. - - :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_web_transactions_tests_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': "GetWebTransactionsTests200Response", - '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, - ) - - - @validate_call - def get_web_transactions_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[ - 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 Web Transactions tests - - Returns a list of all Web Transactions tests and saved events. - - :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_web_transactions_tests_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': "GetWebTransactionsTests200Response", - '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_web_transactions_tests_serialize( - self, - aid, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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/tests/web-transactions', - 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_web_transactions_test( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_web_transaction_test: UpdateWebTransactionTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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, - ) -> GetWebTransactionsTest200Response: - """Update Web Transactions test - - Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_web_transaction_test: (required) - :type update_web_transaction_test: UpdateWebTransactionTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - test_id=test_id, - update_web_transaction_test=update_web_transaction_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetWebTransactionsTest200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def update_web_transactions_test_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_web_transaction_test: UpdateWebTransactionTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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[GetWebTransactionsTest200Response]: - """Update Web Transactions test - - Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_web_transaction_test: (required) - :type update_web_transaction_test: UpdateWebTransactionTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - test_id=test_id, - update_web_transaction_test=update_web_transaction_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetWebTransactionsTest200Response", - '400': "Error", - '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, - ) - - - @validate_call - def update_web_transactions_test_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="ID of the test")], - update_web_transaction_test: UpdateWebTransactionTest, - aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be 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="Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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 Web Transactions test - - Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. - - :param test_id: ID of the test (required) - :type test_id: str - :param update_web_transaction_test: (required) - :type update_web_transaction_test: UpdateWebTransactionTest - :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: Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` 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_web_transactions_test_serialize( - test_id=test_id, - update_web_transaction_test=update_web_transaction_test, - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetWebTransactionsTest200Response", - '400': "Error", - '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 _update_web_transactions_test_serialize( - self, - test_id, - update_web_transaction_test, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _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 expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if update_web_transaction_test is not None: - _body_params = update_web_transaction_test - - - # 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='PUT', - resource_path='/v7/tests/web-transactions/{testId}', - 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/tests_api/tests_api/api_client.py b/tests_api/tests_api/api_client.py deleted file mode 100644 index 9cdfa3ed..00000000 --- a/tests_api/tests_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from tests_api.configuration import Configuration -from tests_api.api_response import ApiResponse -import tests_api.models -from tests_api import rest -from tests_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(tests_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/tests_api/tests_api/api_response.py b/tests_api/tests_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/tests_api/tests_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/tests_api/tests_api/configuration.py b/tests_api/tests_api/configuration.py deleted file mode 100644 index cac5fc70..00000000 --- a/tests_api/tests_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("tests_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/tests_api/tests_api/exceptions.py b/tests_api/tests_api/exceptions.py deleted file mode 100644 index 0606791f..00000000 --- a/tests_api/tests_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/tests_api/tests_api/models/__init__.py b/tests_api/tests_api/models/__init__.py deleted file mode 100644 index c6f44a2c..00000000 --- a/tests_api/tests_api/models/__init__.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from tests_api.models.agent import Agent -from tests_api.models.agent_base import AgentBase -from tests_api.models.agent_to_agent_instant_test import AgentToAgentInstantTest -from tests_api.models.agent_to_agent_test import AgentToAgentTest -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from tests_api.models.agent_to_agent_tests import AgentToAgentTests -from tests_api.models.agent_to_server_instant_test import AgentToServerInstantTest -from tests_api.models.agent_to_server_test import AgentToServerTest -from tests_api.models.agent_to_server_tests import AgentToServerTests -from tests_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from tests_api.models.alert_rule import AlertRule -from tests_api.models.alert_type import AlertType -from tests_api.models.base_request import BaseRequest -from tests_api.models.base_test import BaseTest -from tests_api.models.bgp_test import BgpTest -from tests_api.models.bgp_tests import BgpTests -from tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.dns_sec_instant_test import DnsSecInstantTest -from tests_api.models.dns_sec_test import DnsSecTest -from tests_api.models.dns_sec_tests import DnsSecTests -from tests_api.models.dns_server_instant_test import DnsServerInstantTest -from tests_api.models.dns_server_test import DnsServerTest -from tests_api.models.dns_server_tests import DnsServerTests -from tests_api.models.dns_trace_instant_test import DnsTraceInstantTest -from tests_api.models.dns_trace_test import DnsTraceTest -from tests_api.models.dns_trace_tests import DnsTraceTests -from tests_api.models.error import Error -from tests_api.models.expand import Expand -from tests_api.models.ftp_server_instant_test import FtpServerInstantTest -from tests_api.models.ftp_server_request_type import FtpServerRequestType -from tests_api.models.ftp_server_test import FtpServerTest -from tests_api.models.ftp_server_tests import FtpServerTests -from tests_api.models.get_agent_to_agent_test200_response import GetAgentToAgentTest200Response -from tests_api.models.get_agent_to_agent_tests200_response import GetAgentToAgentTests200Response -from tests_api.models.get_agent_to_server_test200_response import GetAgentToServerTest200Response -from tests_api.models.get_agent_to_server_tests200_response import GetAgentToServerTests200Response -from tests_api.models.get_bgp_test200_response import GetBgpTest200Response -from tests_api.models.get_bgp_tests200_response import GetBgpTests200Response -from tests_api.models.get_dns_server_test200_response import GetDNSServerTest200Response -from tests_api.models.get_dns_server_tests200_response import GetDNSServerTests200Response -from tests_api.models.get_dns_sec_test200_response import GetDnsSecTest200Response -from tests_api.models.get_dns_sec_tests200_response import GetDnsSecTests200Response -from tests_api.models.get_dns_trace_test200_response import GetDnsTraceTest200Response -from tests_api.models.get_dns_trace_tests200_response import GetDnsTraceTests200Response -from tests_api.models.get_ftp_server_test200_response import GetFtpServerTest200Response -from tests_api.models.get_ftp_server_tests200_response import GetFtpServerTests200Response -from tests_api.models.get_http_server_test200_response import GetHttpServerTest200Response -from tests_api.models.get_http_server_tests200_response import GetHttpServerTests200Response -from tests_api.models.get_page_load_test200_response import GetPageLoadTest200Response -from tests_api.models.get_page_load_tests200_response import GetPageLoadTests200Response -from tests_api.models.get_path_vis_interface_groups200_response import GetPathVisInterfaceGroups200Response -from tests_api.models.get_sip_server_test200_response import GetSipServerTest200Response -from tests_api.models.get_sip_server_tests200_response import GetSipServerTests200Response -from tests_api.models.get_tests200_response import GetTests200Response -from tests_api.models.get_voice_test200_response import GetVoiceTest200Response -from tests_api.models.get_voice_tests200_response import GetVoiceTests200Response -from tests_api.models.get_web_transactions_test200_response import GetWebTransactionsTest200Response -from tests_api.models.get_web_transactions_tests200_response import GetWebTransactionsTests200Response -from tests_api.models.http_server_instant_test import HttpServerInstantTest -from tests_api.models.http_server_test import HttpServerTest -from tests_api.models.http_server_tests import HttpServerTests -from tests_api.models.instant_test import InstantTest -from tests_api.models.interface_group import InterfaceGroup -from tests_api.models.interface_groups import InterfaceGroups -from tests_api.models.link import Link -from tests_api.models.map_item import MapItem -from tests_api.models.monitor import Monitor -from tests_api.models.monitor_type import MonitorType -from tests_api.models.monitors_request import MonitorsRequest -from tests_api.models.page_load_instant_test import PageLoadInstantTest -from tests_api.models.page_load_test import PageLoadTest -from tests_api.models.page_load_tests import PageLoadTests -from tests_api.models.self_links import SelfLinks -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.simple_test import SimpleTest -from tests_api.models.sip_server_instant_test import SipServerInstantTest -from tests_api.models.sip_server_test import SipServerTest -from tests_api.models.sip_server_tests import SipServerTests -from tests_api.models.sip_test_protocol import SipTestProtocol -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_custom_headers_all import TestCustomHeadersAll -from tests_api.models.test_custom_headers_root import TestCustomHeadersRoot -from tests_api.models.test_direction import TestDirection -from tests_api.models.test_dns_server import TestDnsServer -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_http_interval import TestHttpInterval -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_request import TestRequest -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_sip_credentials import TestSipCredentials -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -from tests_api.models.test_type import TestType -from tests_api.models.tests import Tests -from tests_api.models.unauthorized_error import UnauthorizedError -from tests_api.models.unexpanded_instant_test import UnexpandedInstantTest -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -from tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -from tests_api.models.unexpanded_test import UnexpandedTest -from tests_api.models.update_agent_to_agent_test import UpdateAgentToAgentTest -from tests_api.models.update_agent_to_server_test import UpdateAgentToServerTest -from tests_api.models.update_bgp_test import UpdateBgpTest -from tests_api.models.update_dns_sec_test import UpdateDnsSecTest -from tests_api.models.update_dns_server_test import UpdateDnsServerTest -from tests_api.models.update_dns_trace_test import UpdateDnsTraceTest -from tests_api.models.update_ftp_server_test import UpdateFtpServerTest -from tests_api.models.update_http_server_test import UpdateHttpServerTest -from tests_api.models.update_page_load_test import UpdatePageLoadTest -from tests_api.models.update_path_vis_interface_group200_response import UpdatePathVisInterfaceGroup200Response -from tests_api.models.update_sip_server_test import UpdateSipServerTest -from tests_api.models.update_voice_test import UpdateVoiceTest -from tests_api.models.update_web_transaction_test import UpdateWebTransactionTest -from tests_api.models.voice_instant_test import VoiceInstantTest -from tests_api.models.voice_test import VoiceTest -from tests_api.models.voice_tests import VoiceTests -from tests_api.models.web_transaction_instant_test import WebTransactionInstantTest -from tests_api.models.web_transaction_test import WebTransactionTest -from tests_api.models.web_transaction_tests import WebTransactionTests diff --git a/tests_api/tests_api/models/agent.py b/tests_api/tests_api/models/agent.py deleted file mode 100644 index be22a76d..00000000 --- a/tests_api/tests_api/models/agent.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType -try: - from typing import Self -except ImportError: - 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") - agent_type: Optional[CloudEnterpriseAgentType] = Field(default=None, alias="agentType") - 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.") - 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", "agentType", "location", "countryId", "enabled", "verifySslCertificates"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - "agent_id", - "location", - "country_id", - "verify_ssl_certificates", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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"), - "agentType": obj.get("agentType"), - "location": obj.get("location"), - "countryId": obj.get("countryId"), - "enabled": obj.get("enabled"), - "verifySslCertificates": obj.get("verifySslCertificates") - }) - return _obj - - diff --git a/tests_api/tests_api/models/agent_base.py b/tests_api/tests_api/models/agent_base.py deleted file mode 100644 index f043d39d..00000000 --- a/tests_api/tests_api/models/agent_base.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "ip_addresses", - "public_ip_addresses", - "network", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/tests_api/tests_api/models/agent_to_agent_instant_test.py b/tests_api/tests_api/models/agent_to_agent_instant_test.py deleted file mode 100644 index ba854ec0..00000000 --- a/tests_api/tests_api/models/agent_to_agent_instant_test.py +++ /dev/null @@ -1,197 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from tests_api.models.test_direction import TestDirection -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentToAgentInstantTest(BaseModel): - """ - AgentToAgentInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - direction: Optional[TestDirection] = None - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") - protocol: Optional[AgentToAgentTestProtocol] = None - target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") - throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") - throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") - throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToAgentInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of AgentToAgentInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "direction": obj.get("direction"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "mss": obj.get("mss"), - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "targetAgentId": obj.get("targetAgentId"), - "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, - "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, - "throughputRate": obj.get("throughputRate"), - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/tests_api/tests_api/models/agent_to_agent_test_protocol.py b/tests_api/tests_api/models/agent_to_agent_test_protocol.py deleted file mode 100644 index c5ac3390..00000000 --- a/tests_api/tests_api/models/agent_to_agent_test_protocol.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AgentToAgentTestProtocol(str, Enum): - """ - AgentToAgentTestProtocol - """ - - """ - allowed enum values - """ - TCP = 'tcp' - UDP = 'udp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToAgentTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/agent_to_agent_tests.py b/tests_api/tests_api/models/agent_to_agent_tests.py deleted file mode 100644 index 047a98de..00000000 --- a/tests_api/tests_api/models/agent_to_agent_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.agent_to_agent_test import AgentToAgentTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentToAgentTests(BaseModel): - """ - AgentToAgentTests - """ # noqa: E501 - tests: Optional[List[AgentToAgentTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToAgentTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AgentToAgentTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [AgentToAgentTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/agent_to_server_instant_test.py b/tests_api/tests_api/models/agent_to_server_instant_test.py deleted file mode 100644 index 9cec0219..00000000 --- a/tests_api/tests_api/models/agent_to_server_instant_test.py +++ /dev/null @@ -1,202 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentToServerInstantTest(BaseModel): - """ - AgentToServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") - mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - server: StrictStr = Field(description="Target name or IP address.") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") - network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of AgentToServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "continuousMode": obj.get("continuousMode"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "ipv6Policy": obj.get("ipv6Policy"), - "pingPayloadSize": obj.get("pingPayloadSize"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False - }) - return _obj - - diff --git a/tests_api/tests_api/models/agent_to_server_tests.py b/tests_api/tests_api/models/agent_to_server_tests.py deleted file mode 100644 index 8f10718c..00000000 --- a/tests_api/tests_api/models/agent_to_server_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.agent_to_server_test import AgentToServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AgentToServerTests(BaseModel): - """ - AgentToServerTests - """ # noqa: E501 - tests: Optional[List[AgentToServerTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AgentToServerTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AgentToServerTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [AgentToServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/alert_rounds_violation_mode.py b/tests_api/tests_api/models/alert_rounds_violation_mode.py deleted file mode 100644 index c10d238c..00000000 --- a/tests_api/tests_api/models/alert_rounds_violation_mode.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AlertRoundsViolationMode(str, Enum): - """ - `exact` requires that the same agent(s) meet the threshold in consecutive rounds; default is `any` - """ - - """ - allowed enum values - """ - EXACT = 'exact' - ANY = 'any' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertRoundsViolationMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/alert_rule.py b/tests_api/tests_api/models/alert_rule.py deleted file mode 100644 index 91dfdad1..00000000 --- a/tests_api/tests_api/models/alert_rule.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from tests_api.models.alert_rounds_violation_mode import AlertRoundsViolationMode -from tests_api.models.alert_type import AlertType -from tests_api.models.test_direction import TestDirection -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AlertRule(BaseModel): - """ - AlertRule - """ # noqa: E501 - rule_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the rule", alias="ruleId") - rule_name: Optional[StrictStr] = Field(default=None, description="Name of the alert rule", alias="ruleName") - expression: Optional[StrictStr] = Field(default=None, description="String expression of alert rule") - direction: Optional[TestDirection] = None - is_default: Optional[StrictBool] = Field(default=None, description="Alert rules allow up to 1 alert rule to be selected as a default for each type. By checking the default option, this alert rule will be automatically included on subsequently created tests that test a metric used in alerting here", alias="isDefault") - alert_type: Optional[AlertType] = Field(default=None, alias="alertType") - minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSources") - minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="the minimum percentage of all assigned agents or monitors that must meet the specified criteria in order to trigger the alert", alias="minimumSourcesPct") - rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode") - rounds_violating_out_of: Optional[StrictInt] = Field(default=None, description="Specifies the divisor (y value) for the “X of Y times” condition.", alias="roundsViolatingOutOf") - rounds_violating_required: Optional[StrictInt] = Field(default=None, description="Specifies the numerator (x value) for the “X of Y times” condition", alias="roundsViolatingRequired") - __properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertRule 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "rule_id", - "rule_name", - "expression", - "is_default", - "minimum_sources", - "minimum_sources_pct", - "rounds_violating_out_of", - "rounds_violating_required", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AlertRule from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ruleId": obj.get("ruleId"), - "ruleName": obj.get("ruleName"), - "expression": obj.get("expression"), - "direction": obj.get("direction"), - "isDefault": obj.get("isDefault"), - "alertType": obj.get("alertType"), - "minimumSources": obj.get("minimumSources"), - "minimumSourcesPct": obj.get("minimumSourcesPct"), - "roundsViolatingMode": obj.get("roundsViolatingMode"), - "roundsViolatingOutOf": obj.get("roundsViolatingOutOf"), - "roundsViolatingRequired": obj.get("roundsViolatingRequired") - }) - return _obj - - diff --git a/tests_api/tests_api/models/alert_type.py b/tests_api/tests_api/models/alert_type.py deleted file mode 100644 index 58458930..00000000 --- a/tests_api/tests_api/models/alert_type.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class AlertType(str, Enum): - """ - Type of alert being triggered. In multi-layered tests, this value represents the layer the alert relates to. See [Alert Details](https://developer.thousandeyes.com/v7/alerts/#/alert-details) documentation for a list of possible values - """ - - """ - allowed enum values - """ - PAGE_MINUS_LOAD = 'page-load' - HTTP_MINUS_SERVER = 'http-server' - END_MINUS_TO_MINUS_END_MINUS_SERVER = 'end-to-end-server' - END_MINUS_TO_MINUS_END_MINUS_AGENT = 'end-to-end-agent' - VOICE = 'voice' - DNS_MINUS_SERVER = 'dns-server' - DNS_MINUS_TRACE = 'dns-trace' - DNSSEC = 'dnssec' - BGP = 'bgp' - PATH_MINUS_TRACE = 'path-trace' - FTP = 'ftp' - SIP_MINUS_SERVER = 'sip-server' - TRANSACTIONS = 'transactions' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - AGENT = 'agent' - NETWORK_MINUS_OUTAGE = 'network-outage' - APPLICATION_MINUS_OUTAGE = 'application-outage' - DEVICE_MINUS_DEVICE = 'device-device' - DEVICE_MINUS_INTERFACE = 'device-interface' - ENDPOINT_MINUS_NETWORK_MINUS_SERVER = 'endpoint-network-server' - ENDPOINT_MINUS_HTTP_MINUS_SERVER = 'endpoint-http-server' - ENDPOINT_MINUS_PATH_MINUS_TRACE = 'endpoint-path-trace' - ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_AGENT = 'endpoint-browser-sessions-agent' - ENDPOINT_MINUS_BROWSER_MINUS_SESSIONS_MINUS_APPLICATION = 'endpoint-browser-sessions-application' - UNKNOWN = 'unknown' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AlertType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/base_test.py b/tests_api/tests_api/models/base_test.py deleted file mode 100644 index ce039e28..00000000 --- a/tests_api/tests_api/models/base_test.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from tests_api.models.alert_rule import AlertRule -from tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BaseTest(BaseModel): - """ - BaseTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BaseTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of BaseTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/bgp_tests.py b/tests_api/tests_api/models/bgp_tests.py deleted file mode 100644 index b9519f67..00000000 --- a/tests_api/tests_api/models/bgp_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.bgp_test import BgpTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class BgpTests(BaseModel): - """ - BgpTests - """ # noqa: E501 - tests: Optional[List[BgpTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BgpTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of BgpTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [BgpTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/cloud_enterprise_agent_type.py b/tests_api/tests_api/models/cloud_enterprise_agent_type.py deleted file mode 100644 index 87fa06cb..00000000 --- a/tests_api/tests_api/models/cloud_enterprise_agent_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/tests_api/tests_api/models/dns_query_class.py b/tests_api/tests_api/models/dns_query_class.py deleted file mode 100644 index e133c6c9..00000000 --- a/tests_api/tests_api/models/dns_query_class.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DnsQueryClass(str, Enum): - """ - Domain class used by this test. 'in' stands for Internet, while 'ch' stands for Chaos. - """ - - """ - allowed enum values - """ - IN = 'in' - CH = 'ch' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsQueryClass from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/dns_sec_instant_test.py b/tests_api/tests_api/models/dns_sec_instant_test.py deleted file mode 100644 index d18c291f..00000000 --- a/tests_api/tests_api/models/dns_sec_instant_test.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.agent import Agent -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsSecInstantTest(BaseModel): - """ - DnsSecInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "domain", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsSecInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of DnsSecInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/tests_api/tests_api/models/dns_sec_tests.py b/tests_api/tests_api/models/dns_sec_tests.py deleted file mode 100644 index 8657990a..00000000 --- a/tests_api/tests_api/models/dns_sec_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.dns_sec_test import DnsSecTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsSecTests(BaseModel): - """ - DnsSecTests - """ # noqa: E501 - tests: Optional[List[DnsSecTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsSecTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DnsSecTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DnsSecTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/dns_server_instant_test.py b/tests_api/tests_api/models/dns_server_instant_test.py deleted file mode 100644 index c422b927..00000000 --- a/tests_api/tests_api/models/dns_server_instant_test.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_dns_server import TestDnsServer -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsServerInstantTest(BaseModel): - """ - DnsServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - dns_servers: List[TestDnsServer] = Field(alias="dnsServers") - dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) - _items = [] - if self.dns_servers: - for _item in self.dns_servers: - if _item: - _items.append(_item.to_dict()) - _dict['dnsServers'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DnsServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj.get("dnsServers")] if obj.get("dnsServers") is not None else None, - "dnsTransportProtocol": obj.get("dnsTransportProtocol"), - "domain": obj.get("domain"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "recursiveQueries": obj.get("recursiveQueries"), - "ipv6Policy": obj.get("ipv6Policy"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/tests_api/tests_api/models/dns_server_tests.py b/tests_api/tests_api/models/dns_server_tests.py deleted file mode 100644 index 8b80a1fc..00000000 --- a/tests_api/tests_api/models/dns_server_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.dns_server_test import DnsServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsServerTests(BaseModel): - """ - DnsServerTests - """ # noqa: E501 - tests: Optional[List[DnsServerTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsServerTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DnsServerTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DnsServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/dns_trace_instant_test.py b/tests_api/tests_api/models/dns_trace_instant_test.py deleted file mode 100644 index 3bba4428..00000000 --- a/tests_api/tests_api/models/dns_trace_instant_test.py +++ /dev/null @@ -1,172 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.agent import Agent -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsTraceInstantTest(BaseModel): - """ - DnsTraceInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "dnsTransportProtocol", "domain", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsTraceInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of DnsTraceInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "dnsTransportProtocol": obj.get("dnsTransportProtocol"), - "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/tests_api/tests_api/models/dns_trace_tests.py b/tests_api/tests_api/models/dns_trace_tests.py deleted file mode 100644 index 5d6dc918..00000000 --- a/tests_api/tests_api/models/dns_trace_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.dns_trace_test import DnsTraceTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DnsTraceTests(BaseModel): - """ - DnsTraceTests - """ # noqa: E501 - tests: Optional[List[DnsTraceTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DnsTraceTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DnsTraceTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DnsTraceTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/error.py b/tests_api/tests_api/models/error.py deleted file mode 100644 index 4fa2016b..00000000 --- a/tests_api/tests_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/tests_api/tests_api/models/expand.py b/tests_api/tests_api/models/expand.py deleted file mode 100644 index b1a169c2..00000000 --- a/tests_api/tests_api/models/expand.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - AGENT = 'agent' - ALERT_MINUS_RULE = 'alert-rule' - MONITOR = 'monitor' - LABEL = 'label' - SHARED_MINUS_WITH_MINUS_ACCOUNT = 'shared-with-account' - - @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/tests_api/tests_api/models/ftp_server_instant_test.py b/tests_api/tests_api/models/ftp_server_instant_test.py deleted file mode 100644 index e4d96f07..00000000 --- a/tests_api/tests_api/models/ftp_server_instant_test.py +++ /dev/null @@ -1,206 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.ftp_server_request_type import FtpServerRequestType -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class FtpServerInstantTest(BaseModel): - """ - FtpServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") - ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") - ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: StrictStr = Field(description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - request_type: FtpServerRequestType = Field(alias="requestType") - url: StrictStr = Field(description="Target for the test.") - use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") - use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") - username: StrictStr = Field(description="Username for Basic/NTLM authentication.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FtpServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of FtpServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "downloadLimit": obj.get("downloadLimit"), - "ftpTargetTime": obj.get("ftpTargetTime"), - "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "requestType": obj.get("requestType"), - "url": obj.get("url"), - "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, - "useExplicitFtps": obj.get("useExplicitFtps"), - "username": obj.get("username"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy") - }) - return _obj - - diff --git a/tests_api/tests_api/models/ftp_server_request_type.py b/tests_api/tests_api/models/ftp_server_request_type.py deleted file mode 100644 index c1fb72d1..00000000 --- a/tests_api/tests_api/models/ftp_server_request_type.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class FtpServerRequestType(str, Enum): - """ - Set the type of activity for the test. - """ - - """ - allowed enum values - """ - DOWNLOAD = 'download' - UPLOAD = 'upload' - LIST = 'list' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FtpServerRequestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/ftp_server_tests.py b/tests_api/tests_api/models/ftp_server_tests.py deleted file mode 100644 index affc7bf3..00000000 --- a/tests_api/tests_api/models/ftp_server_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.ftp_server_test import FtpServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class FtpServerTests(BaseModel): - """ - FtpServerTests - """ # noqa: E501 - tests: Optional[List[FtpServerTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FtpServerTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of FtpServerTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [FtpServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_agent_to_agent_test200_response.py b/tests_api/tests_api/models/get_agent_to_agent_test200_response.py deleted file mode 100644 index 80b3804c..00000000 --- a/tests_api/tests_api/models/get_agent_to_agent_test200_response.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_direction import TestDirection -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAgentToAgentTest200Response(BaseModel): - """ - GetAgentToAgentTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - direction: Optional[TestDirection] = None - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - mss: Optional[Annotated[int, Field(le=1400, strict=True, ge=20)]] = Field(default=None, description="Maximum segment size, in bytes.") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") - protocol: Optional[AgentToAgentTestProtocol] = None - target_agent_id: StrictStr = Field(description="`agentId` of the target agent for the test.", alias="targetAgentId") - throughput_measurements: Optional[StrictBool] = Field(default=False, description="Enable or disable throughput measurements. Throughput measurements cannot be enabled when the source or target of the test is a cloud agent.", alias="throughputMeasurements") - throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") - throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "bgpMeasurements", "monitors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAgentToAgentTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetAgentToAgentTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "direction": obj.get("direction"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "mss": obj.get("mss"), - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "targetAgentId": obj.get("targetAgentId"), - "throughputMeasurements": obj.get("throughputMeasurements") if obj.get("throughputMeasurements") is not None else False, - "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, - "throughputRate": obj.get("throughputRate"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_agent_to_agent_tests200_response.py b/tests_api/tests_api/models/get_agent_to_agent_tests200_response.py deleted file mode 100644 index ff08d525..00000000 --- a/tests_api/tests_api/models/get_agent_to_agent_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.agent_to_agent_test import AgentToAgentTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAgentToAgentTests200Response(BaseModel): - """ - GetAgentToAgentTests200Response - """ # noqa: E501 - tests: Optional[List[AgentToAgentTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAgentToAgentTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetAgentToAgentTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [AgentToAgentTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_agent_to_server_test200_response.py b/tests_api/tests_api/models/get_agent_to_server_test200_response.py deleted file mode 100644 index ca613867..00000000 --- a/tests_api/tests_api/models/get_agent_to_server_test200_response.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAgentToServerTest200Response(BaseModel): - """ - GetAgentToServerTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - continuous_mode: Optional[StrictBool] = Field(default=None, description="To enable continuous monitoring, set this parameter to `true` to. When continuous monitoring is enabled, the following actions occur: * `fixedPacketRate` is enforced * `bandwidthMeasurements` are disabled * If the `protocol` is set to `tcp`, `probeMode` is set to `syn`. ", alias="continuousMode") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`", alias="fixedPacketRate") - mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1)]] = Field(default=49153, description="Target port.") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - server: StrictStr = Field(description="Target name or IP address.") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") - network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "port", "probeMode", "protocol", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "bgpMeasurements", "monitors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAgentToServerTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "dscp", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetAgentToServerTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "continuousMode": obj.get("continuousMode"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "server": obj.get("server"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "ipv6Policy": obj.get("ipv6Policy"), - "pingPayloadSize": obj.get("pingPayloadSize"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_agent_to_server_tests200_response.py b/tests_api/tests_api/models/get_agent_to_server_tests200_response.py deleted file mode 100644 index 2e0a92b8..00000000 --- a/tests_api/tests_api/models/get_agent_to_server_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.agent_to_server_test import AgentToServerTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetAgentToServerTests200Response(BaseModel): - """ - GetAgentToServerTests200Response - """ # noqa: E501 - tests: Optional[List[AgentToServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetAgentToServerTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetAgentToServerTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [AgentToServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_bgp_test200_response.py b/tests_api/tests_api/models/get_bgp_test200_response.py deleted file mode 100644 index 65e87039..00000000 --- a/tests_api/tests_api/models/get_bgp_test200_response.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetBgpTest200Response(BaseModel): - """ - GetBgpTest200Response - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Indicate if queries for subprefixes detected under this prefix should included.", alias="includeCoveredPrefixes") - prefix: StrictStr = Field(description="a.b.c.d is a network address, with the prefix length defined as e. Prefixes can be any length from 8 to 24.") - use_public_bgp: Optional[StrictBool] = Field(default=None, description="Indicate if all available public BGP monitors should be used.", alias="usePublicBGP") - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="A list of enabled alert rule objects.", alias="alertRules") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "monitors", "includeCoveredPrefixes", "prefix", "usePublicBGP", "alertsEnabled", "alertRules"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetBgpTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "monitors", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetBgpTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None, - "includeCoveredPrefixes": obj.get("includeCoveredPrefixes"), - "prefix": obj.get("prefix"), - "usePublicBGP": obj.get("usePublicBGP"), - "alertsEnabled": obj.get("alertsEnabled"), - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_bgp_tests200_response.py b/tests_api/tests_api/models/get_bgp_tests200_response.py deleted file mode 100644 index c11b4ee0..00000000 --- a/tests_api/tests_api/models/get_bgp_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.bgp_test import BgpTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetBgpTests200Response(BaseModel): - """ - GetBgpTests200Response - """ # noqa: E501 - tests: Optional[List[BgpTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetBgpTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetBgpTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [BgpTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_dns_sec_test200_response.py b/tests_api/tests_api/models/get_dns_sec_test200_response.py deleted file mode 100644 index d7d0be49..00000000 --- a/tests_api/tests_api/models/get_dns_sec_test200_response.py +++ /dev/null @@ -1,186 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDnsSecTest200Response(BaseModel): - """ - GetDnsSecTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "domain", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDnsSecTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of GetDnsSecTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_dns_sec_tests200_response.py b/tests_api/tests_api/models/get_dns_sec_tests200_response.py deleted file mode 100644 index c0493b5c..00000000 --- a/tests_api/tests_api/models/get_dns_sec_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.dns_sec_test import DnsSecTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDnsSecTests200Response(BaseModel): - """ - GetDnsSecTests200Response - """ # noqa: E501 - tests: Optional[List[DnsSecTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDnsSecTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetDnsSecTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DnsSecTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_dns_server_test200_response.py b/tests_api/tests_api/models/get_dns_server_test200_response.py deleted file mode 100644 index 5d33fe84..00000000 --- a/tests_api/tests_api/models/get_dns_server_test200_response.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_dns_server import TestDnsServer -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDNSServerTest200Response(BaseModel): - """ - GetDNSServerTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - dns_servers: List[TestDnsServer] = Field(alias="dnsServers") - dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - recursive_queries: Optional[StrictBool] = Field(default=None, description="Set true to run query with RD (recursion desired) flag enabled.", alias="recursiveQueries") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "bgpMeasurements", "monitors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDNSServerTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of each item in dns_servers (list) - _items = [] - if self.dns_servers: - for _item in self.dns_servers: - if _item: - _items.append(_item.to_dict()) - _dict['dnsServers'] = _items - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetDNSServerTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "dnsServers": [TestDnsServer.from_dict(_item) for _item in obj.get("dnsServers")] if obj.get("dnsServers") is not None else None, - "dnsTransportProtocol": obj.get("dnsTransportProtocol"), - "domain": obj.get("domain"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "recursiveQueries": obj.get("recursiveQueries"), - "ipv6Policy": obj.get("ipv6Policy"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "dnsQueryClass": obj.get("dnsQueryClass"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_dns_server_tests200_response.py b/tests_api/tests_api/models/get_dns_server_tests200_response.py deleted file mode 100644 index 323d12e5..00000000 --- a/tests_api/tests_api/models/get_dns_server_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.dns_server_test import DnsServerTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDNSServerTests200Response(BaseModel): - """ - GetDNSServerTests200Response - """ # noqa: E501 - tests: Optional[List[DnsServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDNSServerTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetDNSServerTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DnsServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_dns_trace_test200_response.py b/tests_api/tests_api/models/get_dns_trace_test200_response.py deleted file mode 100644 index 6113f0c6..00000000 --- a/tests_api/tests_api/models/get_dns_trace_test200_response.py +++ /dev/null @@ -1,189 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.dns_query_class import DnsQueryClass -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_dns_transport_protocol import TestDnsTransportProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDnsTraceTest200Response(BaseModel): - """ - GetDnsTraceTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - dns_transport_protocol: Optional[TestDnsTransportProtocol] = Field(default=None, alias="dnsTransportProtocol") - domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") - dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "dnsTransportProtocol", "domain", "dnsQueryClass"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDnsTraceTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of GetDnsTraceTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "dnsTransportProtocol": obj.get("dnsTransportProtocol"), - "domain": obj.get("domain"), - "dnsQueryClass": obj.get("dnsQueryClass") - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_dns_trace_tests200_response.py b/tests_api/tests_api/models/get_dns_trace_tests200_response.py deleted file mode 100644 index 31c76749..00000000 --- a/tests_api/tests_api/models/get_dns_trace_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.dns_trace_test import DnsTraceTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetDnsTraceTests200Response(BaseModel): - """ - GetDnsTraceTests200Response - """ # noqa: E501 - tests: Optional[List[DnsTraceTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetDnsTraceTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetDnsTraceTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [DnsTraceTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_ftp_server_test200_response.py b/tests_api/tests_api/models/get_ftp_server_test200_response.py deleted file mode 100644 index 12f32a23..00000000 --- a/tests_api/tests_api/models/get_ftp_server_test200_response.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.ftp_server_request_type import FtpServerRequestType -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetFtpServerTest200Response(BaseModel): - """ - GetFtpServerTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - download_limit: Optional[StrictInt] = Field(default=None, description="Specify maximum number of bytes to download from the target object.", alias="downloadLimit") - ftp_target_time: Optional[Annotated[int, Field(le=6000, strict=True, ge=1000)]] = Field(default=None, description="Target time for operation completion; specified in milliseconds.", alias="ftpTargetTime") - ftp_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=10)]] = Field(default=10, description="Set the time limit for the test in seconds.", alias="ftpTimeLimit") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: StrictStr = Field(description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - request_type: FtpServerRequestType = Field(alias="requestType") - url: StrictStr = Field(description="Target for the test.") - use_active_ftp: Optional[StrictBool] = Field(default=False, description="Explicitly set the flag to use active FTP.", alias="useActiveFtp") - use_explicit_ftps: Optional[StrictBool] = Field(default=None, description="Use explicit FTPS (ftp over SSL). By default, tests will autodetect when it is appropriate to use FTPS.", alias="useExplicitFtps") - username: StrictStr = Field(description="Username for Basic/NTLM authentication.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "bgpMeasurements", "monitors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetFtpServerTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetFtpServerTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "downloadLimit": obj.get("downloadLimit"), - "ftpTargetTime": obj.get("ftpTargetTime"), - "ftpTimeLimit": obj.get("ftpTimeLimit") if obj.get("ftpTimeLimit") is not None else 10, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "requestType": obj.get("requestType"), - "url": obj.get("url"), - "useActiveFtp": obj.get("useActiveFtp") if obj.get("useActiveFtp") is not None else False, - "useExplicitFtps": obj.get("useExplicitFtps"), - "username": obj.get("username"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_ftp_server_tests200_response.py b/tests_api/tests_api/models/get_ftp_server_tests200_response.py deleted file mode 100644 index b82ab15b..00000000 --- a/tests_api/tests_api/models/get_ftp_server_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.ftp_server_test import FtpServerTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetFtpServerTests200Response(BaseModel): - """ - GetFtpServerTests200Response - """ # noqa: E501 - tests: Optional[List[FtpServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetFtpServerTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetFtpServerTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [FtpServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_http_server_test200_response.py b/tests_api/tests_api/models/get_http_server_test200_response.py deleted file mode 100644 index 5b9c59d2..00000000 --- a/tests_api/tests_api/models/get_http_server_test200_response.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetHttpServerTest200Response(BaseModel): - """ - GetHttpServerTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") - headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") - 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") - download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") - dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - 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") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - 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") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "ipv6Policy", "followRedirects", "fixedPacketRate", "bgpMeasurements", "monitors"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetHttpServerTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetHttpServerTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "headers": obj.get("headers"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', - "downloadLimit": obj.get("downloadLimit"), - "dnsOverride": obj.get("dnsOverride"), - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "postBody": obj.get("postBody"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "ipv6Policy": obj.get("ipv6Policy"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "fixedPacketRate": obj.get("fixedPacketRate"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_http_server_tests200_response.py b/tests_api/tests_api/models/get_http_server_tests200_response.py deleted file mode 100644 index dd0dae6b..00000000 --- a/tests_api/tests_api/models/get_http_server_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.http_server_test import HttpServerTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetHttpServerTests200Response(BaseModel): - """ - GetHttpServerTests200Response - """ # noqa: E501 - tests: Optional[List[HttpServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetHttpServerTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetHttpServerTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [HttpServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_page_load_test200_response.py b/tests_api/tests_api/models/get_page_load_test200_response.py deleted file mode 100644 index 83a0b4f8..00000000 --- a/tests_api/tests_api/models/get_page_load_test200_response.py +++ /dev/null @@ -1,280 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_http_interval import TestHttpInterval -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetPageLoadTest200Response(BaseModel): - """ - GetPageLoadTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") - page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") - disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") - allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") - allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") - browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") - page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - http_interval: TestHttpInterval = Field(alias="httpInterval") - subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "bgpMeasurements", "monitors", "httpInterval", "subinterval"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetPageLoadTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetPageLoadTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pageLoadTargetTime": obj.get("pageLoadTargetTime"), - "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "blockDomains": obj.get("blockDomains"), - "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, - "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, - "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, - "browserLanguage": obj.get("browserLanguage"), - "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None, - "httpInterval": obj.get("httpInterval"), - "subinterval": obj.get("subinterval") - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_page_load_tests200_response.py b/tests_api/tests_api/models/get_page_load_tests200_response.py deleted file mode 100644 index 82e5f075..00000000 --- a/tests_api/tests_api/models/get_page_load_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.page_load_test import PageLoadTest -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetPageLoadTests200Response(BaseModel): - """ - GetPageLoadTests200Response - """ # noqa: E501 - tests: Optional[List[PageLoadTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetPageLoadTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetPageLoadTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [PageLoadTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_path_vis_interface_groups200_response.py b/tests_api/tests_api/models/get_path_vis_interface_groups200_response.py deleted file mode 100644 index 24a97209..00000000 --- a/tests_api/tests_api/models/get_path_vis_interface_groups200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.interface_group import InterfaceGroup -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetPathVisInterfaceGroups200Response(BaseModel): - """ - GetPathVisInterfaceGroups200Response - """ # noqa: E501 - path_vis_interface_groups: Optional[List[InterfaceGroup]] = Field(default=None, alias="pathVisInterfaceGroups") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["pathVisInterfaceGroups", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetPathVisInterfaceGroups200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in path_vis_interface_groups (list) - _items = [] - if self.path_vis_interface_groups: - for _item in self.path_vis_interface_groups: - if _item: - _items.append(_item.to_dict()) - _dict['pathVisInterfaceGroups'] = _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: Dict) -> Self: - """Create an instance of GetPathVisInterfaceGroups200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pathVisInterfaceGroups": [InterfaceGroup.from_dict(_item) for _item in obj.get("pathVisInterfaceGroups")] if obj.get("pathVisInterfaceGroups") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_sip_server_test200_response.py b/tests_api/tests_api/models/get_sip_server_test200_response.py deleted file mode 100644 index 78d8673b..00000000 --- a/tests_api/tests_api/models/get_sip_server_test200_response.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.sip_test_protocol import SipTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_sip_credentials import TestSipCredentials -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetSipServerTest200Response(BaseModel): - """ - GetSipServerTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - 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") - options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") - protocol: Optional[SipTestProtocol] = None - register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") - sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") - target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authUser", "mtuMeasurements", "networkMeasurements", "optionsRegex", "password", "pathTraceMode", "port", "protocol", "registerEnabled", "sipRegistrar", "sipTargetTime", "sipTimeLimit", "targetSipCredentials", "user", "fixedPacketRate", "ipv6Policy", "bgpMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetSipServerTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of target_sip_credentials - if self.target_sip_credentials: - _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetSipServerTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authUser": obj.get("authUser"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "optionsRegex": obj.get("optionsRegex"), - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, - "sipRegistrar": obj.get("sipRegistrar"), - "sipTargetTime": obj.get("sipTargetTime"), - "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, - "targetSipCredentials": TestSipCredentials.from_dict(obj.get("targetSipCredentials")) if obj.get("targetSipCredentials") is not None else None, - "user": obj.get("user"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_sip_server_tests200_response.py b/tests_api/tests_api/models/get_sip_server_tests200_response.py deleted file mode 100644 index 045a95b7..00000000 --- a/tests_api/tests_api/models/get_sip_server_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.sip_server_test import SipServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetSipServerTests200Response(BaseModel): - """ - GetSipServerTests200Response - """ # noqa: E501 - tests: Optional[List[SipServerTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetSipServerTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetSipServerTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [SipServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_tests200_response.py b/tests_api/tests_api/models/get_tests200_response.py deleted file mode 100644 index 0ff79669..00000000 --- a/tests_api/tests_api/models/get_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTests200Response(BaseModel): - """ - GetTests200Response - """ # noqa: E501 - tests: Optional[List[SimpleTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [SimpleTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_voice_test200_response.py b/tests_api/tests_api/models/get_voice_test200_response.py deleted file mode 100644 index 00aeccfc..00000000 --- a/tests_api/tests_api/models/get_voice_test200_response.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetVoiceTest200Response(BaseModel): - """ - GetVoiceTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - codec: Optional[StrictStr] = Field(default=None, description="Codec label") - codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") - jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") - target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "bgpMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetVoiceTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "codec", - "dscp", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of GetVoiceTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "codec": obj.get("codec"), - "codecId": obj.get("codecId"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "duration": obj.get("duration") if obj.get("duration") is not None else 5, - "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "port": obj.get("port"), - "targetAgentId": obj.get("targetAgentId"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_voice_tests200_response.py b/tests_api/tests_api/models/get_voice_tests200_response.py deleted file mode 100644 index 8834057d..00000000 --- a/tests_api/tests_api/models/get_voice_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.voice_test import VoiceTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetVoiceTests200Response(BaseModel): - """ - GetVoiceTests200Response - """ # noqa: E501 - tests: Optional[List[VoiceTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetVoiceTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetVoiceTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [VoiceTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_web_transactions_test200_response.py b/tests_api/tests_api/models/get_web_transactions_test200_response.py deleted file mode 100644 index cf6cf4e7..00000000 --- a/tests_api/tests_api/models/get_web_transactions_test200_response.py +++ /dev/null @@ -1,283 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.monitor import Monitor -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.test_sub_interval import TestSubInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetWebTransactionsTest200Response(BaseModel): - """ - GetWebTransactionsTest200Response - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[SelfLinksLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - 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") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds.", alias="targetTime") - time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") - transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") - disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") - allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") - allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") - browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") - page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - subinterval: Optional[TestSubInterval] = None - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "credentials", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate", "bgpMeasurements", "monitors", "subinterval"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetWebTransactionsTest200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - "monitors", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - # 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetWebTransactionsTest200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "credentials": obj.get("credentials"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "targetTime": obj.get("targetTime"), - "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, - "transactionScript": obj.get("transactionScript"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "blockDomains": obj.get("blockDomains"), - "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, - "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, - "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, - "browserLanguage": obj.get("browserLanguage"), - "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, - "monitors": [Monitor.from_dict(_item) for _item in obj.get("monitors")] if obj.get("monitors") is not None else None, - "subinterval": obj.get("subinterval") - }) - return _obj - - diff --git a/tests_api/tests_api/models/get_web_transactions_tests200_response.py b/tests_api/tests_api/models/get_web_transactions_tests200_response.py deleted file mode 100644 index 82a78dc0..00000000 --- a/tests_api/tests_api/models/get_web_transactions_tests200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -from tests_api.models.web_transaction_test import WebTransactionTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetWebTransactionsTests200Response(BaseModel): - """ - GetWebTransactionsTests200Response - """ # noqa: E501 - tests: Optional[List[WebTransactionTest]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["tests", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetWebTransactionsTests200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _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: Dict) -> Self: - """Create an instance of GetWebTransactionsTests200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [WebTransactionTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/http_server_instant_test.py b/tests_api/tests_api/models/http_server_instant_test.py deleted file mode 100644 index bf123a65..00000000 --- a/tests_api/tests_api/models/http_server_instant_test.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpServerInstantTest(BaseModel): - """ - HttpServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") - headers: Optional[List[StrictStr]] = Field(default=None, description="HTTP request headers used.") - 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") - download_limit: Optional[StrictInt] = Field(default=None, description="Specifies maximum number of bytes to download from the target object.", alias="downloadLimit") - dns_override: Optional[StrictStr] = Field(default=None, description="IP address to use for DNS override.", alias="dnsOverride") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - 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") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - 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") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "headers", "customHeaders", "desiredStatusCode", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "postBody", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "ipv6Policy", "followRedirects", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "headers": obj.get("headers"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', - "downloadLimit": obj.get("downloadLimit"), - "dnsOverride": obj.get("dnsOverride"), - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "postBody": obj.get("postBody"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "ipv6Policy": obj.get("ipv6Policy"), - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/tests_api/tests_api/models/http_server_tests.py b/tests_api/tests_api/models/http_server_tests.py deleted file mode 100644 index 6b8bdc52..00000000 --- a/tests_api/tests_api/models/http_server_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.http_server_test import HttpServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class HttpServerTests(BaseModel): - """ - HttpServerTests - """ # noqa: E501 - tests: Optional[List[HttpServerTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of HttpServerTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of HttpServerTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [HttpServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/instant_test.py b/tests_api/tests_api/models/instant_test.py deleted file mode 100644 index e8cf847c..00000000 --- a/tests_api/tests_api/models/instant_test.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_type import TestType -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class InstantTest(BaseModel): - """ - InstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "labels", - "shared_with_accounts", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of InstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/interface_groups.py b/tests_api/tests_api/models/interface_groups.py deleted file mode 100644 index d93432cc..00000000 --- a/tests_api/tests_api/models/interface_groups.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.interface_group import InterfaceGroup -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class InterfaceGroups(BaseModel): - """ - InterfaceGroups - """ # noqa: E501 - path_vis_interface_groups: Optional[List[InterfaceGroup]] = Field(default=None, alias="pathVisInterfaceGroups") - __properties: ClassVar[List[str]] = ["pathVisInterfaceGroups"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of InterfaceGroups 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in path_vis_interface_groups (list) - _items = [] - if self.path_vis_interface_groups: - for _item in self.path_vis_interface_groups: - if _item: - _items.append(_item.to_dict()) - _dict['pathVisInterfaceGroups'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of InterfaceGroups from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pathVisInterfaceGroups": [InterfaceGroup.from_dict(_item) for _item in obj.get("pathVisInterfaceGroups")] if obj.get("pathVisInterfaceGroups") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/link.py b/tests_api/tests_api/models/link.py deleted file mode 100644 index 17761647..00000000 --- a/tests_api/tests_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/tests_api/tests_api/models/map_item.py b/tests_api/tests_api/models/map_item.py deleted file mode 100644 index 9a7e26a9..00000000 --- a/tests_api/tests_api/models/map_item.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class MapItem(BaseModel): - """ - MapItem - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of MapItem 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of MapItem from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/tests_api/tests_api/models/monitor.py b/tests_api/tests_api/models/monitor.py deleted file mode 100644 index 8bd0e210..00000000 --- a/tests_api/tests_api/models/monitor.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from tests_api.models.monitor_type import MonitorType -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "country_id", - "monitor_id", - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/tests_api/tests_api/models/monitor_type.py b/tests_api/tests_api/models/monitor_type.py deleted file mode 100644 index 4fa34c58..00000000 --- a/tests_api/tests_api/models/monitor_type.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - 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/tests_api/tests_api/models/page_load_instant_test.py b/tests_api/tests_api/models/page_load_instant_test.py deleted file mode 100644 index 98ce3d42..00000000 --- a/tests_api/tests_api/models/page_load_instant_test.py +++ /dev/null @@ -1,243 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PageLoadInstantTest(BaseModel): - """ - PageLoadInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - page_load_target_time: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Target time for page load completion, specified in seconds and cannot exceed the `pageLoadTimeLimit`.", alias="pageLoadTargetTime") - page_load_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=10, description="Page load time limit. Must be larger than the `httpTimeLimit`.", alias="pageLoadTimeLimit") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") - disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") - allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") - allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") - browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") - page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pageLoadTargetTime", "pageLoadTimeLimit", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PageLoadInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PageLoadInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "pageLoadTargetTime": obj.get("pageLoadTargetTime"), - "pageLoadTimeLimit": obj.get("pageLoadTimeLimit") if obj.get("pageLoadTimeLimit") is not None else 10, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "blockDomains": obj.get("blockDomains"), - "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, - "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, - "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, - "browserLanguage": obj.get("browserLanguage"), - "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/tests_api/tests_api/models/page_load_tests.py b/tests_api/tests_api/models/page_load_tests.py deleted file mode 100644 index 7e703933..00000000 --- a/tests_api/tests_api/models/page_load_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.page_load_test import PageLoadTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PageLoadTests(BaseModel): - """ - PageLoadTests - """ # noqa: E501 - tests: Optional[List[PageLoadTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PageLoadTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PageLoadTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [PageLoadTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/self_links.py b/tests_api/tests_api/models/self_links.py deleted file mode 100644 index bfd9d1db..00000000 --- a/tests_api/tests_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/self_links_links.py b/tests_api/tests_api/models/self_links_links.py deleted file mode 100644 index 347857d9..00000000 --- a/tests_api/tests_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/simple_test.py b/tests_api/tests_api/models/simple_test.py deleted file mode 100644 index c132c1ac..00000000 --- a/tests_api/tests_api/models/simple_test.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_type import TestType -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SimpleTest(BaseModel): - """ - Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`. - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SimpleTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of SimpleTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/sip_server_instant_test.py b/tests_api/tests_api/models/sip_server_instant_test.py deleted file mode 100644 index 96b8834d..00000000 --- a/tests_api/tests_api/models/sip_server_instant_test.py +++ /dev/null @@ -1,204 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.sip_test_protocol import SipTestProtocol -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_sip_credentials import TestSipCredentials -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SipServerInstantTest(BaseModel): - """ - SipServerInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - 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") - options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") - protocol: Optional[SipTestProtocol] = None - register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") - sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") - target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authUser", "mtuMeasurements", "networkMeasurements", "optionsRegex", "password", "pathTraceMode", "port", "protocol", "registerEnabled", "sipRegistrar", "sipTargetTime", "sipTimeLimit", "targetSipCredentials", "user", "fixedPacketRate", "ipv6Policy"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipServerInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of target_sip_credentials - if self.target_sip_credentials: - _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of SipServerInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authUser": obj.get("authUser"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "optionsRegex": obj.get("optionsRegex"), - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, - "sipRegistrar": obj.get("sipRegistrar"), - "sipTargetTime": obj.get("sipTargetTime"), - "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, - "targetSipCredentials": TestSipCredentials.from_dict(obj.get("targetSipCredentials")) if obj.get("targetSipCredentials") is not None else None, - "user": obj.get("user"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy") - }) - return _obj - - diff --git a/tests_api/tests_api/models/sip_server_test.py b/tests_api/tests_api/models/sip_server_test.py deleted file mode 100644 index 4aeb7864..00000000 --- a/tests_api/tests_api/models/sip_server_test.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.sip_test_protocol import SipTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_sip_credentials import TestSipCredentials -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SipServerTest(BaseModel): - """ - SipServerTest - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - 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") - options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") - protocol: Optional[SipTestProtocol] = None - register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") - sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") - target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authUser", "mtuMeasurements", "networkMeasurements", "optionsRegex", "password", "pathTraceMode", "port", "protocol", "registerEnabled", "sipRegistrar", "sipTargetTime", "sipTimeLimit", "targetSipCredentials", "user", "fixedPacketRate", "ipv6Policy", "bgpMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of target_sip_credentials - if self.target_sip_credentials: - _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of SipServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authUser": obj.get("authUser"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "optionsRegex": obj.get("optionsRegex"), - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, - "sipRegistrar": obj.get("sipRegistrar"), - "sipTargetTime": obj.get("sipTargetTime"), - "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, - "targetSipCredentials": TestSipCredentials.from_dict(obj.get("targetSipCredentials")) if obj.get("targetSipCredentials") is not None else None, - "user": obj.get("user"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/sip_server_tests.py b/tests_api/tests_api/models/sip_server_tests.py deleted file mode 100644 index 3d49b99c..00000000 --- a/tests_api/tests_api/models/sip_server_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.sip_server_test import SipServerTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SipServerTests(BaseModel): - """ - SipServerTests - """ # noqa: E501 - tests: Optional[List[SipServerTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipServerTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of SipServerTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [SipServerTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/sip_test_protocol.py b/tests_api/tests_api/models/sip_test_protocol.py deleted file mode 100644 index 6ceb924f..00000000 --- a/tests_api/tests_api/models/sip_test_protocol.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class SipTestProtocol(str, Enum): - """ - Transport layer for SIP communication. - """ - - """ - allowed enum values - """ - TCP = 'tcp' - TLS = 'tls' - UDP = 'udp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SipTestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_auth_type.py b/tests_api/tests_api/models/test_auth_type.py deleted file mode 100644 index 5de9f4ef..00000000 --- a/tests_api/tests_api/models/test_auth_type.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestAuthType(str, Enum): - """ - HTTP authentication type. - """ - - """ - allowed enum values - """ - NONE = 'none' - BASIC = 'basic' - NTLM = 'ntlm' - KERBEROS = 'kerberos' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestAuthType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_custom_headers.py b/tests_api/tests_api/models/test_custom_headers.py deleted file mode 100644 index adfdaf9f..00000000 --- a/tests_api/tests_api/models/test_custom_headers.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.map_item import MapItem -from tests_api.models.test_custom_headers_all import TestCustomHeadersAll -from tests_api.models.test_custom_headers_root import TestCustomHeadersRoot -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestCustomHeaders(BaseModel): - """ - TestCustomHeaders - """ # noqa: E501 - root: Optional[TestCustomHeadersRoot] = None - domains: Optional[Dict[str, MapItem]] = Field(default=None, description="Use these HTTP headers for the specified domains.") - all: Optional[TestCustomHeadersAll] = None - __properties: ClassVar[List[str]] = ["root", "domains", "all"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestCustomHeaders 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of root - if self.root: - _dict['root'] = self.root.to_dict() - # override the default output from pydantic by calling `to_dict()` of each value in domains (dict) - _field_dict = {} - if self.domains: - for _key in self.domains: - if self.domains[_key]: - _field_dict[_key] = self.domains[_key].to_dict() - _dict['domains'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of all - if self.all: - _dict['all'] = self.all.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestCustomHeaders from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "root": TestCustomHeadersRoot.from_dict(obj.get("root")) if obj.get("root") is not None else None, - "domains": dict( - (_k, MapItem.from_dict(_v)) - for _k, _v in obj.get("domains").items() - ) - if obj.get("domains") is not None - else None, - "all": TestCustomHeadersAll.from_dict(obj.get("all")) if obj.get("all") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_custom_headers_all.py b/tests_api/tests_api/models/test_custom_headers_all.py deleted file mode 100644 index 77c61884..00000000 --- a/tests_api/tests_api/models/test_custom_headers_all.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestCustomHeadersAll(BaseModel): - """ - TestCustomHeadersAll - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestCustomHeadersAll 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestCustomHeadersAll from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_custom_headers_root.py b/tests_api/tests_api/models/test_custom_headers_root.py deleted file mode 100644 index faa91c27..00000000 --- a/tests_api/tests_api/models/test_custom_headers_root.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestCustomHeadersRoot(BaseModel): - """ - TestCustomHeadersRoot - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestCustomHeadersRoot 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestCustomHeadersRoot from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_direction.py b/tests_api/tests_api/models/test_direction.py deleted file mode 100644 index 9d30dc35..00000000 --- a/tests_api/tests_api/models/test_direction.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDirection(str, Enum): - """ - Direction of the test, which affects how results are shown. - """ - - """ - allowed enum values - """ - TO_MINUS_TARGET = 'to-target' - FROM_MINUS_TARGET = 'from-target' - BIDIRECTIONAL = 'bidirectional' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDirection from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_dns_server.py b/tests_api/tests_api/models/test_dns_server.py deleted file mode 100644 index dc9d3b46..00000000 --- a/tests_api/tests_api/models/test_dns_server.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestDnsServer(BaseModel): - """ - TestDnsServer - """ # noqa: E501 - server_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the DNS server.", alias="serverId") - server_name: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name (FQDN) of DNS server.", alias="serverName") - __properties: ClassVar[List[str]] = ["serverId", "serverName"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDnsServer 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestDnsServer from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "serverId": obj.get("serverId"), - "serverName": obj.get("serverName") - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_dns_transport_protocol.py b/tests_api/tests_api/models/test_dns_transport_protocol.py deleted file mode 100644 index 9d513114..00000000 --- a/tests_api/tests_api/models/test_dns_transport_protocol.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDnsTransportProtocol(str, Enum): - """ - Transport protocol used for DNS requests. - """ - - """ - allowed enum values - """ - UDP = 'udp' - TCP = 'tcp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDnsTransportProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_dscp_id.py b/tests_api/tests_api/models/test_dscp_id.py deleted file mode 100644 index 9a39e369..00000000 --- a/tests_api/tests_api/models/test_dscp_id.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestDscpId(str, Enum): - """ - DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests) - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_8 = '8' - ENUM_16 = '16' - ENUM_24 = '24' - ENUM_32 = '32' - ENUM_40 = '40' - ENUM_48 = '48' - ENUM_56 = '56' - ENUM_10 = '10' - ENUM_12 = '12' - ENUM_14 = '14' - ENUM_18 = '18' - ENUM_20 = '20' - ENUM_22 = '22' - ENUM_26 = '26' - ENUM_28 = '28' - ENUM_30 = '30' - ENUM_34 = '34' - ENUM_36 = '36' - ENUM_38 = '38' - ENUM_46 = '46' - ENUM_44 = '44' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestDscpId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_http_interval.py b/tests_api/tests_api/models/test_http_interval.py deleted file mode 100644 index 07c9ae8a..00000000 --- a/tests_api/tests_api/models/test_http_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestHttpInterval(int, Enum): - """ - HTTP test run interval. The interval between HTTP test runs in seconds cannot exceed the specified interval value and defaults to the same value as the interval if not set. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestHttpInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_interval.py b/tests_api/tests_api/models/test_interval.py deleted file mode 100644 index 47e1d5d0..00000000 --- a/tests_api/tests_api/models/test_interval.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestInterval(int, Enum): - """ - Interval between test runs in seconds. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_ipv6_policy.py b/tests_api/tests_api/models/test_ipv6_policy.py deleted file mode 100644 index cb29853b..00000000 --- a/tests_api/tests_api/models/test_ipv6_policy.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestIpv6Policy(str, Enum): - """ - IP version policy. Overrides the IPv6 policy configured at the agent level. - """ - - """ - allowed enum values - """ - FORCE_MINUS_IPV4 = 'force-ipv4' - PREFER_MINUS_IPV6 = 'prefer-ipv6' - FORCE_MINUS_IPV6 = 'force-ipv6' - USE_MINUS_AGENT_MINUS_POLICY = 'use-agent-policy' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestIpv6Policy from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_labels_inner.py b/tests_api/tests_api/models/test_labels_inner.py deleted file mode 100644 index 37aad988..00000000 --- a/tests_api/tests_api/models/test_labels_inner.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestLabelsInner(BaseModel): - """ - TestLabelsInner - """ # noqa: E501 - label_id: Optional[StrictStr] = Field(default=None, description="Label ID.", alias="labelId") - name: Optional[StrictStr] = Field(default=None, description="Name of the label.") - is_built_in: Optional[StrictBool] = Field(default=None, description="Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User).", alias="isBuiltIn") - __properties: ClassVar[List[str]] = ["labelId", "name", "isBuiltIn"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestLabelsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestLabelsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labelId": obj.get("labelId"), - "name": obj.get("name"), - "isBuiltIn": obj.get("isBuiltIn") - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_page_loading_strategy.py b/tests_api/tests_api/models/test_page_loading_strategy.py deleted file mode 100644 index 9e621b23..00000000 --- a/tests_api/tests_api/models/test_page_loading_strategy.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestPageLoadingStrategy(str, Enum): - """ - * `normal`: The test waits until the entire page is fully loaded, including the downloading and parsing of HTML content as well as all associated resources, before advancing to the next action in the transaction test script. * `eager`: The test waits for the DOMContentLoaded event, indicating that HTML content is downloaded and parsed, and the document reaches the \"interactive\" readiness state, before proceeding to the next action in the test script. * `none`: The test only waits for the download of HTML content. Once the HTML is downloaded, the test continues to the next action in the transaction test script without waiting for additional resources. - """ - - """ - allowed enum values - """ - NORMAL = 'normal' - EAGER = 'eager' - NONE = 'none' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestPageLoadingStrategy from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_path_trace_mode.py b/tests_api/tests_api/models/test_path_trace_mode.py deleted file mode 100644 index 280f8822..00000000 --- a/tests_api/tests_api/models/test_path_trace_mode.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestPathTraceMode(str, Enum): - """ - Select `inSession` to perform the path trace within a TCP session. - """ - - """ - allowed enum values - """ - CLASSIC = 'classic' - IN_MINUS_SESSION = 'in-session' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestPathTraceMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_probe_mode.py b/tests_api/tests_api/models/test_probe_mode.py deleted file mode 100644 index 4ef153a5..00000000 --- a/tests_api/tests_api/models/test_probe_mode.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProbeMode(str, Enum): - """ - Probe mode used by network test, only valid when the protocol is set to TCP. - """ - - """ - allowed enum values - """ - AUTO = 'auto' - SACK = 'sack' - SYN = 'syn' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProbeMode from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_protocol.py b/tests_api/tests_api/models/test_protocol.py deleted file mode 100644 index 77ba5d7c..00000000 --- a/tests_api/tests_api/models/test_protocol.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestProtocol(str, Enum): - """ - Protocol used by dependent network tests (end-to-end, path trace, PMTUD). - """ - - """ - allowed enum values - """ - TCP = 'tcp' - ICMP = 'icmp' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestProtocol from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_shared_accounts_inner.py b/tests_api/tests_api/models/test_shared_accounts_inner.py deleted file mode 100644 index d2faf3e7..00000000 --- a/tests_api/tests_api/models/test_shared_accounts_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestSharedAccountsInner(BaseModel): - """ - TestSharedAccountsInner - """ # noqa: E501 - aid: Optional[StrictStr] = Field(default=None, description="Account group ID.") - name: Optional[StrictStr] = Field(default=None, description="Account group name.") - __properties: ClassVar[List[str]] = ["aid", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSharedAccountsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestSharedAccountsInner 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"), - "name": obj.get("name") - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_sip_credentials.py b/tests_api/tests_api/models/test_sip_credentials.py deleted file mode 100644 index 1bf64e36..00000000 --- a/tests_api/tests_api/models/test_sip_credentials.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.sip_test_protocol import SipTestProtocol -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestSipCredentials(BaseModel): - """ - TestSipCredentials - """ # noqa: E501 - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - password: Optional[StrictStr] = Field(default=None, description="Password for authentication with SIP server.") - port: Annotated[int, Field(le=65535, strict=True, ge=1024)] = Field(description="Port number for the chosen protocol.") - protocol: Optional[SipTestProtocol] = None - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - __properties: ClassVar[List[str]] = ["authUser", "password", "port", "protocol", "sipRegistrar", "user"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSipCredentials 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestSipCredentials from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authUser": obj.get("authUser"), - "password": obj.get("password"), - "port": obj.get("port"), - "protocol": obj.get("protocol"), - "sipRegistrar": obj.get("sipRegistrar"), - "user": obj.get("user") - }) - return _obj - - diff --git a/tests_api/tests_api/models/test_ssl_version_id.py b/tests_api/tests_api/models/test_ssl_version_id.py deleted file mode 100644 index 0d7dfdaf..00000000 --- a/tests_api/tests_api/models/test_ssl_version_id.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestSslVersionId(str, Enum): - """ - SSL version options: * Use '0' for automatic selection. * Use '3' for SSLv3. * Use '4' for TLS v1.0. * Use '5' for TLS v1.1. * Use '6' for TLS v1.2. - """ - - """ - allowed enum values - """ - ENUM_0 = '0' - ENUM_3 = '3' - ENUM_4 = '4' - ENUM_5 = '5' - ENUM_6 = '6' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSslVersionId from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_sub_interval.py b/tests_api/tests_api/models/test_sub_interval.py deleted file mode 100644 index 1adc5923..00000000 --- a/tests_api/tests_api/models/test_sub_interval.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestSubInterval(int, Enum): - """ - Subinterval for round-robin testing (in seconds). Must be less than or equal to interval and must evenly divide interval. - """ - - """ - allowed enum values - """ - NUMBER_60 = 60 - NUMBER_120 = 120 - NUMBER_300 = 300 - NUMBER_600 = 600 - NUMBER_900 = 900 - NUMBER_1200 = 1200 - NUMBER_1800 = 1800 - NUMBER_3600 = 3600 - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestSubInterval from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/test_type.py b/tests_api/tests_api/models/test_type.py deleted file mode 100644 index 8ad9403e..00000000 --- a/tests_api/tests_api/models/test_type.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class TestType(str, Enum): - """ - This is a read only value, as test type is implicit in the test creation url. - """ - - """ - allowed enum values - """ - AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' - AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' - BGP = 'bgp' - HTTP_MINUS_SERVER = 'http-server' - PAGE_MINUS_LOAD = 'page-load' - WEB_MINUS_TRANSACTIONS = 'web-transactions' - FTP_MINUS_SERVER = 'ftp-server' - DNS_MINUS_TRACE = 'dns-trace' - DNS_MINUS_SERVER = 'dns-server' - DNSSEC = 'dnssec' - SIP_MINUS_SERVER = 'sip-server' - VOICE = 'voice' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/tests_api/tests_api/models/tests.py b/tests_api/tests_api/models/tests.py deleted file mode 100644 index 673fc2ec..00000000 --- a/tests_api/tests_api/models/tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.simple_test import SimpleTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Tests(BaseModel): - """ - Tests - """ # noqa: E501 - tests: Optional[List[SimpleTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Tests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Tests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [SimpleTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/unauthorized_error.py b/tests_api/tests_api/models/unauthorized_error.py deleted file mode 100644 index de442aca..00000000 --- a/tests_api/tests_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/tests_api/tests_api/models/unexpanded_instant_test.py b/tests_api/tests_api/models/unexpanded_instant_test.py deleted file mode 100644 index 8bdc7693..00000000 --- a/tests_api/tests_api/models/unexpanded_instant_test.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from tests_api.models.test_type import TestType -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTest(BaseModel): - """ - UnexpandedInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") - type: Optional[TestType] = None - links: Optional[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UnexpandedInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/unexpanded_instant_test_links.py b/tests_api/tests_api/models/unexpanded_instant_test_links.py deleted file mode 100644 index 1697abae..00000000 --- a/tests_api/tests_api/models/unexpanded_instant_test_links.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from tests_api.models.unexpanded_instant_test_links_self import UnexpandedInstantTestLinksSelf -from tests_api.models.unexpanded_instant_test_links_test_results import UnexpandedInstantTestLinksTestResults -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinks(BaseModel): - """ - A list of links that can be accessed to get more information - """ # noqa: E501 - var_self: Optional[UnexpandedInstantTestLinksSelf] = Field(default=None, alias="self") - test_results: Optional[UnexpandedInstantTestLinksTestResults] = Field(default=None, alias="testResults") - __properties: ClassVar[List[str]] = ["self", "testResults"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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() - # override the default output from pydantic by calling `to_dict()` of test_results - if self.test_results: - _dict['testResults'] = self.test_results.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinks from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "self": UnexpandedInstantTestLinksSelf.from_dict(obj.get("self")) if obj.get("self") is not None else None, - "testResults": UnexpandedInstantTestLinksTestResults.from_dict(obj.get("testResults")) if obj.get("testResults") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/unexpanded_instant_test_links_self.py b/tests_api/tests_api/models/unexpanded_instant_test_links_self.py deleted file mode 100644 index 40fea387..00000000 --- a/tests_api/tests_api/models/unexpanded_instant_test_links_self.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedInstantTestLinksSelf(BaseModel): - """ - UnexpandedInstantTestLinksSelf - """ # 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedInstantTestLinksSelf 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/tests_api/tests_api/models/unexpanded_instant_test_links_test_results.py b/tests_api/tests_api/models/unexpanded_instant_test_links_test_results.py deleted file mode 100644 index 9685d106..00000000 --- a/tests_api/tests_api/models/unexpanded_instant_test_links_test_results.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 - -from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator -from pydantic import Field -from tests_api.models.link import Link -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal -from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -UNEXPANDEDINSTANTTESTLINKSTESTRESULTS_ONE_OF_SCHEMAS = ["Link", "List[Link]"] - -class UnexpandedInstantTestLinksTestResults(BaseModel): - """ - UnexpandedInstantTestLinksTestResults - """ - # data type: List[Link] - oneof_schema_1_validator: Optional[List[Link]] = Field(default=None, description="Reference to the test results.") - # data type: Link - oneof_schema_2_validator: Optional[Link] = None - actual_instance: Optional[Union[Link, List[Link]]] = None - one_of_schemas: List[str] = Literal["Link", "List[Link]"] - - model_config = { - "validate_assignment": True - } - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = UnexpandedInstantTestLinksTestResults.model_construct() - error_messages = [] - match = 0 - # validate data type: List[Link] - try: - instance.oneof_schema_1_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: Link - if not isinstance(v, Link): - error_messages.append(f"Error! Input type `{type(v)}` is not `Link`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: dict) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into List[Link] - try: - # validation - instance.oneof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_1_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Link - try: - instance.actual_instance = Link.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into UnexpandedInstantTestLinksTestResults with oneOf schemas: Link, List[Link]. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Dict: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/tests_api/tests_api/models/unexpanded_test.py b/tests_api/tests_api/models/unexpanded_test.py deleted file mode 100644 index aa9a52c5..00000000 --- a/tests_api/tests_api/models/unexpanded_test.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -from tests_api.models.test_interval import TestInterval -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UnexpandedTest(BaseModel): - """ - UnexpandedTest - """ # noqa: E501 - interval: Optional[TestInterval] = None - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UnexpandedTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UnexpandedTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/update_path_vis_interface_group200_response.py b/tests_api/tests_api/models/update_path_vis_interface_group200_response.py deleted file mode 100644 index fd6495b5..00000000 --- a/tests_api/tests_api/models/update_path_vis_interface_group200_response.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from tests_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdatePathVisInterfaceGroup200Response(BaseModel): - """ - UpdatePathVisInterfaceGroup200Response - """ # noqa: E501 - aid: Optional[StrictStr] = Field(default=None, description="Account Group Id") - group_id: Optional[StrictStr] = Field(default=None, description="Group ID", alias="groupId") - group_name: Optional[StrictStr] = Field(default=None, description="Name of the path visualization interface group", alias="groupName") - ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of IP addresses associated with the interface group", alias="ipAddresses") - rdns_regexes: Optional[List[StrictStr]] = Field(default=None, description="Array of RDNS Regexes associated with the interface group", alias="rdnsRegexes") - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["aid", "groupId", "groupName", "ipAddresses", "rdnsRegexes", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdatePathVisInterfaceGroup200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "aid", - "group_id", - "rdns_regexes", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UpdatePathVisInterfaceGroup200Response 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"), - "groupId": obj.get("groupId"), - "groupName": obj.get("groupName"), - "ipAddresses": obj.get("ipAddresses"), - "rdnsRegexes": obj.get("rdnsRegexes"), - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/update_sip_server_test.py b/tests_api/tests_api/models/update_sip_server_test.py deleted file mode 100644 index 7c5a239e..00000000 --- a/tests_api/tests_api/models/update_sip_server_test.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.sip_test_protocol import SipTestProtocol -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_ipv6_policy import TestIpv6Policy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.test_sip_credentials import TestSipCredentials -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdateSipServerTest(BaseModel): - """ - UpdateSipServerTest - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") - auth_user: Optional[StrictStr] = Field(default=None, description="Username for authentication with SIP server.", alias="authUser") - 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") - options_regex: Optional[StrictStr] = Field(default=None, description="Options regex, this field does not require escaping.", alias="optionsRegex") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - port: Annotated[int, Field(le=65535, strict=True, ge=1)] = Field(description="Target port.") - protocol: Optional[SipTestProtocol] = None - register_enabled: Optional[StrictBool] = Field(default=False, description="Set to true to perform SIP registration on the test target with the SIP REGISTER command.", alias="registerEnabled") - sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") - sip_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for test completion in milliseconds.", alias="sipTargetTime") - sip_time_limit: Optional[Annotated[int, Field(le=10, strict=True, ge=5)]] = Field(default=5, description="Time limit in milliseconds.", alias="sipTimeLimit") - target_sip_credentials: TestSipCredentials = Field(alias="targetSipCredentials") - user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authUser", "mtuMeasurements", "networkMeasurements", "optionsRegex", "password", "pathTraceMode", "port", "protocol", "registerEnabled", "sipRegistrar", "sipTargetTime", "sipTimeLimit", "targetSipCredentials", "user", "fixedPacketRate", "ipv6Policy", "bgpMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdateSipServerTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - }, - exclude_none=True, - ) - # 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 - # override the default output from pydantic by calling `to_dict()` of target_sip_credentials - if self.target_sip_credentials: - _dict['targetSipCredentials'] = self.target_sip_credentials.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UpdateSipServerTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": obj.get("alertRules"), - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": obj.get("labels"), - "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authUser": obj.get("authUser"), - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "optionsRegex": obj.get("optionsRegex"), - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "port": obj.get("port") if obj.get("port") is not None else 49153, - "protocol": obj.get("protocol"), - "registerEnabled": obj.get("registerEnabled") if obj.get("registerEnabled") is not None else False, - "sipRegistrar": obj.get("sipRegistrar"), - "sipTargetTime": obj.get("sipTargetTime"), - "sipTimeLimit": obj.get("sipTimeLimit") if obj.get("sipTimeLimit") is not None else 5, - "targetSipCredentials": TestSipCredentials.from_dict(obj.get("targetSipCredentials")) if obj.get("targetSipCredentials") is not None else None, - "user": obj.get("user"), - "fixedPacketRate": obj.get("fixedPacketRate"), - "ipv6Policy": obj.get("ipv6Policy"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/update_voice_test.py b/tests_api/tests_api/models/update_voice_test.py deleted file mode 100644 index 80404fc4..00000000 --- a/tests_api/tests_api/models/update_voice_test.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_request_all_of_agents import TestRequestAllOfAgents -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdateVoiceTest(BaseModel): - """ - UpdateVoiceTest - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[StrictStr]] = Field(default=None, description="List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = 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") - agents: List[TestRequestAllOfAgents] = Field(description="Contains list of object with required `agentId` and optional `sourceIpAddress`") - codec: Optional[StrictStr] = Field(default=None, description="Codec label") - codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") - jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") - target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "bgpMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdateVoiceTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "codec", - "dscp", - }, - exclude_none=True, - ) - # 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: Dict) -> Self: - """Create an instance of UpdateVoiceTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": obj.get("alertRules"), - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": obj.get("labels"), - "sharedWithAccounts": obj.get("sharedWithAccounts"), - "agents": [TestRequestAllOfAgents.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "codec": obj.get("codec"), - "codecId": obj.get("codecId"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "duration": obj.get("duration") if obj.get("duration") is not None else 5, - "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "port": obj.get("port"), - "targetAgentId": obj.get("targetAgentId"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/voice_instant_test.py b/tests_api/tests_api/models/voice_instant_test.py deleted file mode 100644 index 02a3d563..00000000 --- a/tests_api/tests_api/models/voice_instant_test.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class VoiceInstantTest(BaseModel): - """ - VoiceInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - codec: Optional[StrictStr] = Field(default=None, description="Codec label") - codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") - jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") - target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VoiceInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "codec", - "dscp", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of VoiceInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "codec": obj.get("codec"), - "codecId": obj.get("codecId"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "duration": obj.get("duration") if obj.get("duration") is not None else 5, - "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "port": obj.get("port"), - "targetAgentId": obj.get("targetAgentId") - }) - return _obj - - diff --git a/tests_api/tests_api/models/voice_test.py b/tests_api/tests_api/models/voice_test.py deleted file mode 100644 index 464f3339..00000000 --- a/tests_api/tests_api/models/voice_test.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.alert_rule import AlertRule -from tests_api.models.test_dscp_id import TestDscpId -from tests_api.models.test_interval import TestInterval -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class VoiceTest(BaseModel): - """ - VoiceTest - """ # noqa: E501 - interval: TestInterval - alerts_enabled: Optional[StrictBool] = Field(default=None, description="Indicates if alerts are enabled.", alias="alertsEnabled") - enabled: Optional[StrictBool] = Field(default=True, description="Test is enabled.") - alert_rules: Optional[List[AlertRule]] = Field(default=None, description="Contains list of enabled alert rule objects.", alias="alertRules") - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - codec: Optional[StrictStr] = Field(default=None, description="Codec label") - codec_id: Optional[StrictStr] = Field(default=None, description="Coded ID, [see the list of acceptable values](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/working-with-test-settings#rtp-stream-advanced-settings-tab)", alias="codecId") - dscp: Optional[StrictStr] = Field(default=None, description="DSCP label.") - dscp_id: Optional[TestDscpId] = Field(default=None, alias="dscpId") - duration: Optional[Annotated[int, Field(le=30, strict=True, ge=5)]] = Field(default=5, description="Duration of the test in seconds.") - jitter_buffer: Optional[Annotated[int, Field(le=150, strict=True, ge=0)]] = Field(default=40, description="De-jitter buffer size in seconds.", alias="jitterBuffer") - num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") - target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") - __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "targetAgentId", "bgpMeasurements"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VoiceTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "codec", - "dscp", - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in alert_rules (list) - _items = [] - if self.alert_rules: - for _item in self.alert_rules: - if _item: - _items.append(_item.to_dict()) - _dict['alertRules'] = _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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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: Dict) -> Self: - """Create an instance of VoiceTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "interval": obj.get("interval"), - "alertsEnabled": obj.get("alertsEnabled"), - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "alertRules": [AlertRule.from_dict(_item) for _item in obj.get("alertRules")] if obj.get("alertRules") is not None else None, - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "codec": obj.get("codec"), - "codecId": obj.get("codecId"), - "dscp": obj.get("dscp"), - "dscpId": obj.get("dscpId"), - "duration": obj.get("duration") if obj.get("duration") is not None else 5, - "jitterBuffer": obj.get("jitterBuffer") if obj.get("jitterBuffer") is not None else 40, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "port": obj.get("port"), - "targetAgentId": obj.get("targetAgentId"), - "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True - }) - return _obj - - diff --git a/tests_api/tests_api/models/voice_tests.py b/tests_api/tests_api/models/voice_tests.py deleted file mode 100644 index 308fdac3..00000000 --- a/tests_api/tests_api/models/voice_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.voice_test import VoiceTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class VoiceTests(BaseModel): - """ - VoiceTests - """ # noqa: E501 - tests: Optional[List[VoiceTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of VoiceTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of VoiceTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [VoiceTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/models/web_transaction_instant_test.py b/tests_api/tests_api/models/web_transaction_instant_test.py deleted file mode 100644 index aad1e8d1..00000000 --- a/tests_api/tests_api/models/web_transaction_instant_test.py +++ /dev/null @@ -1,249 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -from typing_extensions import Annotated -from tests_api.models.agent import Agent -from tests_api.models.test_auth_type import TestAuthType -from tests_api.models.test_custom_headers import TestCustomHeaders -from tests_api.models.test_labels_inner import TestLabelsInner -from tests_api.models.test_page_loading_strategy import TestPageLoadingStrategy -from tests_api.models.test_path_trace_mode import TestPathTraceMode -from tests_api.models.test_probe_mode import TestProbeMode -from tests_api.models.test_protocol import TestProtocol -from tests_api.models.test_shared_accounts_inner import TestSharedAccountsInner -from tests_api.models.test_ssl_version_id import TestSslVersionId -from tests_api.models.unexpanded_instant_test_links import UnexpandedInstantTestLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class WebTransactionInstantTest(BaseModel): - """ - WebTransactionInstantTest - """ # noqa: E501 - created_by: Optional[StrictStr] = Field(default=None, description="User that created the test.", alias="createdBy") - created_date: Optional[datetime] = Field(default=None, description="UTC created date (ISO date-time format).", alias="createdDate") - description: Optional[StrictStr] = Field(default=None, description="A description of the test.") - live_share: Optional[StrictBool] = Field(default=None, description="Indicates if the test is shared with the account group.", alias="liveShare") - modified_by: Optional[StrictStr] = Field(default=None, description="User that modified the test.", alias="modifiedBy") - modified_date: Optional[datetime] = Field(default=None, description="UTC last modification date (ISO date-time format).", alias="modifiedDate") - saved_event: Optional[StrictBool] = Field(default=None, description="Indicates if the test is a saved event.", alias="savedEvent") - test_id: Optional[StrictStr] = Field(default=None, description="Each test is assigned an unique ID; this is used to access test information and results from other endpoints.", alias="testId") - 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[UnexpandedInstantTestLinks] = Field(default=None, alias="_links") - labels: Optional[List[TestLabelsInner]] = None - shared_with_accounts: Optional[List[TestSharedAccountsInner]] = Field(default=None, alias="sharedWithAccounts") - agents: List[Agent] = Field(description="Contains list of agents.") - auth_type: Optional[TestAuthType] = Field(default=None, alias="authType") - bandwidth_measurements: Optional[StrictBool] = Field(default=None, description="Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test.", alias="bandwidthMeasurements") - client_certificate: Optional[StrictStr] = Field(default=None, description="String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate.", alias="clientCertificate") - content_regex: Optional[StrictStr] = Field(default=None, description="Verify content using a regular expression. This field does not require escaping.", alias="contentRegex") - credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - 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") - 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") - include_headers: Optional[StrictBool] = Field(default=True, description="Set to `true` to capture response headers for objects loaded by the test.", alias="includeHeaders") - 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=3)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") - password: Optional[StrictStr] = Field(default=None, description="Password for Basic/NTLM authentication.") - path_trace_mode: Optional[TestPathTraceMode] = Field(default=None, alias="pathTraceMode") - probe_mode: Optional[TestProbeMode] = Field(default=None, alias="probeMode") - protocol: Optional[TestProtocol] = None - ssl_version: Optional[StrictStr] = Field(default=None, description="Reflects the verbose SSL protocol version used by a test.", alias="sslVersion") - ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") - target_time: Optional[Annotated[int, Field(le=60, strict=True, ge=1)]] = Field(default=None, description="Target time for completion, defaults to 50% of time limit specified in seconds.", alias="targetTime") - time_limit: Optional[Annotated[int, Field(le=180, strict=True, ge=5)]] = Field(default=30, description="Time limit for transaction in seconds.", alias="timeLimit") - transaction_script: StrictStr = Field(description="JavaScript of a web transaction test. Quotes must be escaped (precede \" characters with \\ ).", alias="transactionScript") - url: StrictStr = Field(description="Target for the test.") - use_ntlm: Optional[StrictBool] = Field(default=None, description="Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set.", alias="useNtlm") - user_agent: Optional[StrictStr] = Field(default=None, description="User-agent string to be provided during the test.", alias="userAgent") - username: Optional[StrictStr] = Field(default=None, description="Username for Basic/NTLM authentication.") - verify_certificate: Optional[StrictBool] = Field(default=False, description="Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.", alias="verifyCertificate") - block_domains: Optional[StrictStr] = Field(default=None, description="Domains or full object URLs to be excluded from metrics and waterfall data for transaction tests.", alias="blockDomains") - disable_screenshot: Optional[StrictBool] = Field(default=False, description="Enables or disables screenshots on error. Set true to not capture", alias="disableScreenshot") - allow_mic_and_camera: Optional[StrictBool] = Field(default=False, description="Set true allow the use of a fake mic and camera in the browser.", alias="allowMicAndCamera") - allow_geolocation: Optional[StrictBool] = Field(default=False, description="Set true to use the agent’s geolocation by the web page.", alias="allowGeolocation") - browser_language: Optional[StrictStr] = Field(default=None, description="Set one of the available browser language that you want to use to configure the browser.", alias="browserLanguage") - page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") - fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "sharedWithAccounts", "agents", "authType", "bandwidthMeasurements", "clientCertificate", "contentRegex", "credentials", "customHeaders", "desiredStatusCode", "followRedirects", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "targetTime", "timeLimit", "transactionScript", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "pageLoadingStrategy", "fixedPacketRate"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WebTransactionInstantTest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - "created_by", - "created_date", - "live_share", - "modified_by", - "modified_date", - "saved_event", - "test_id", - "type", - "labels", - "shared_with_accounts", - "agents", - "ssl_version", - }, - exclude_none=True, - ) - # 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 labels (list) - _items = [] - if self.labels: - for _item in self.labels: - if _item: - _items.append(_item.to_dict()) - _dict['labels'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in shared_with_accounts (list) - _items = [] - if self.shared_with_accounts: - for _item in self.shared_with_accounts: - if _item: - _items.append(_item.to_dict()) - _dict['sharedWithAccounts'] = _items - # 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 - # override the default output from pydantic by calling `to_dict()` of custom_headers - if self.custom_headers: - _dict['customHeaders'] = self.custom_headers.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of WebTransactionInstantTest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "createdBy": obj.get("createdBy"), - "createdDate": obj.get("createdDate"), - "description": obj.get("description"), - "liveShare": obj.get("liveShare"), - "modifiedBy": obj.get("modifiedBy"), - "modifiedDate": obj.get("modifiedDate"), - "savedEvent": obj.get("savedEvent"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "type": obj.get("type"), - "_links": UnexpandedInstantTestLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None, - "labels": [TestLabelsInner.from_dict(_item) for _item in obj.get("labels")] if obj.get("labels") is not None else None, - "sharedWithAccounts": [TestSharedAccountsInner.from_dict(_item) for _item in obj.get("sharedWithAccounts")] if obj.get("sharedWithAccounts") is not None else None, - "agents": [Agent.from_dict(_item) for _item in obj.get("agents")] if obj.get("agents") is not None else None, - "authType": obj.get("authType"), - "bandwidthMeasurements": obj.get("bandwidthMeasurements"), - "clientCertificate": obj.get("clientCertificate"), - "contentRegex": obj.get("contentRegex"), - "credentials": obj.get("credentials"), - "customHeaders": TestCustomHeaders.from_dict(obj.get("customHeaders")) if obj.get("customHeaders") is not None else None, - "desiredStatusCode": obj.get("desiredStatusCode") if obj.get("desiredStatusCode") is not None else '200', - "followRedirects": obj.get("followRedirects") if obj.get("followRedirects") is not None else True, - "httpTargetTime": obj.get("httpTargetTime"), - "httpTimeLimit": obj.get("httpTimeLimit") if obj.get("httpTimeLimit") is not None else 5, - "httpVersion": obj.get("httpVersion") if obj.get("httpVersion") is not None else 2, - "includeHeaders": obj.get("includeHeaders") if obj.get("includeHeaders") is not None else True, - "mtuMeasurements": obj.get("mtuMeasurements"), - "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else True, - "numPathTraces": obj.get("numPathTraces") if obj.get("numPathTraces") is not None else 3, - "password": obj.get("password"), - "pathTraceMode": obj.get("pathTraceMode"), - "probeMode": obj.get("probeMode"), - "protocol": obj.get("protocol"), - "sslVersion": obj.get("sslVersion"), - "sslVersionId": obj.get("sslVersionId"), - "targetTime": obj.get("targetTime"), - "timeLimit": obj.get("timeLimit") if obj.get("timeLimit") is not None else 30, - "transactionScript": obj.get("transactionScript"), - "url": obj.get("url"), - "useNtlm": obj.get("useNtlm"), - "userAgent": obj.get("userAgent"), - "username": obj.get("username"), - "verifyCertificate": obj.get("verifyCertificate") if obj.get("verifyCertificate") is not None else False, - "blockDomains": obj.get("blockDomains"), - "disableScreenshot": obj.get("disableScreenshot") if obj.get("disableScreenshot") is not None else False, - "allowMicAndCamera": obj.get("allowMicAndCamera") if obj.get("allowMicAndCamera") is not None else False, - "allowGeolocation": obj.get("allowGeolocation") if obj.get("allowGeolocation") is not None else False, - "browserLanguage": obj.get("browserLanguage"), - "pageLoadingStrategy": obj.get("pageLoadingStrategy"), - "fixedPacketRate": obj.get("fixedPacketRate") - }) - return _obj - - diff --git a/tests_api/tests_api/models/web_transaction_tests.py b/tests_api/tests_api/models/web_transaction_tests.py deleted file mode 100644 index 6d241775..00000000 --- a/tests_api/tests_api/models/web_transaction_tests.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from tests_api.models.web_transaction_test import WebTransactionTest -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class WebTransactionTests(BaseModel): - """ - WebTransactionTests - """ # noqa: E501 - tests: Optional[List[WebTransactionTest]] = None - __properties: ClassVar[List[str]] = ["tests"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of WebTransactionTests 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in tests (list) - _items = [] - if self.tests: - for _item in self.tests: - if _item: - _items.append(_item.to_dict()) - _dict['tests'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of WebTransactionTests from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "tests": [WebTransactionTest.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None - }) - return _obj - - diff --git a/tests_api/tests_api/rest.py b/tests_api/tests_api/rest.py deleted file mode 100644 index ed5a02c9..00000000 --- a/tests_api/tests_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Tests API - - ### Overview This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from tests_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/tests_api/tox.ini b/tests_api/tox.ini deleted file mode 100644 index 543af93d..00000000 --- a/tests_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=tests_api diff --git a/usage/.gitignore b/usage/.gitignore new file mode 100644 index 00000000..43995bd4 --- /dev/null +++ b/usage/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/usage/.openapi-generator-ignore b/usage/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/usage/.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/usage/.openapi-generator/FILES b/usage/.openapi-generator/FILES new file mode 100644 index 00000000..1de44c74 --- /dev/null +++ b/usage/.openapi-generator/FILES @@ -0,0 +1,142 @@ +.gitignore +.openapi-generator-ignore +README.md +docs/AccountGroup.md +docs/AccountGroupId.md +docs/AccountGroupQuota.md +docs/EndpointAgentsEmbeddedInner.md +docs/EndpointAgentsEssentialsInner.md +docs/EndpointAgentsInner.md +docs/EnterpriseAgentUnitsByTestOwnerAccountGroup.md +docs/EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md +docs/EnterpriseAgentUnitsInner.md +docs/EnterpriseAgentsInner.md +docs/Error.md +docs/Expand.md +docs/GetEnterpriseAgentsUnitsUsage200Response.md +docs/GetQuotas200Response.md +docs/GetTestUnitsUsage200Response.md +docs/GetUsage200Response.md +docs/Link.md +docs/OrganizationQuota.md +docs/OrganizationsQuotasAssign.md +docs/OrganizationsQuotasAssignOrganizationsInner.md +docs/OrganizationsQuotasUnassign.md +docs/OrganizationsQuotasUnassignOrganizationsInner.md +docs/PaginationLinks.md +docs/PaginationLinksLinks.md +docs/Quotas.md +docs/QuotasApi.md +docs/QuotasAssignRequest.md +docs/QuotasAssignResponse.md +docs/QuotasQuotasInner.md +docs/QuotasUnassign.md +docs/SelfLinks.md +docs/SelfLinksLinks.md +docs/TestsInner.md +docs/UnauthorizedError.md +docs/UnitsByTests.md +docs/UnitsByTestsBreakdownsInner.md +docs/Usage.md +docs/UsageApi.md +docs/UsageUsage.md +docs/UsageUsageQuota.md +docs/ValidationError.md +docs/ValidationErrorAllOfErrors.md +pyproject.toml +requirements.txt +setup.cfg +setup.py +test-requirements.txt +test/__init__.py +test/test_account_group.py +test/test_account_group_id.py +test/test_account_group_quota.py +test/test_endpoint_agents_embedded_inner.py +test/test_endpoint_agents_essentials_inner.py +test/test_endpoint_agents_inner.py +test/test_enterprise_agent_units_by_test_owner_account_group.py +test/test_enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py +test/test_enterprise_agent_units_inner.py +test/test_enterprise_agents_inner.py +test/test_error.py +test/test_expand.py +test/test_get_enterprise_agents_units_usage200_response.py +test/test_get_quotas200_response.py +test/test_get_test_units_usage200_response.py +test/test_get_usage200_response.py +test/test_link.py +test/test_organization_quota.py +test/test_organizations_quotas_assign.py +test/test_organizations_quotas_assign_organizations_inner.py +test/test_organizations_quotas_unassign.py +test/test_organizations_quotas_unassign_organizations_inner.py +test/test_pagination_links.py +test/test_pagination_links_links.py +test/test_quotas.py +test/test_quotas_assign_request.py +test/test_quotas_assign_response.py +test/test_quotas_quotas_inner.py +test/test_quotas_unassign.py +test/test_self_links.py +test/test_self_links_links.py +test/test_tests_inner.py +test/test_unauthorized_error.py +test/test_units_by_tests.py +test/test_units_by_tests_breakdowns_inner.py +test/test_usage.py +test/test_usage_usage.py +test/test_usage_usage_quota.py +test/test_validation_error.py +test/test_validation_error_all_of_errors.py +usage/__init__.py +usage/api/__init__.py +usage/api/quotas_api.py +usage/api/usage_api.py +usage/api_client.py +usage/api_response.py +usage/configuration.py +usage/exceptions.py +usage/models/__init__.py +usage/models/account_group.py +usage/models/account_group_id.py +usage/models/account_group_quota.py +usage/models/endpoint_agents_embedded_inner.py +usage/models/endpoint_agents_essentials_inner.py +usage/models/endpoint_agents_inner.py +usage/models/enterprise_agent_units_by_test_owner_account_group.py +usage/models/enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py +usage/models/enterprise_agent_units_inner.py +usage/models/enterprise_agents_inner.py +usage/models/error.py +usage/models/expand.py +usage/models/get_enterprise_agents_units_usage200_response.py +usage/models/get_quotas200_response.py +usage/models/get_test_units_usage200_response.py +usage/models/get_usage200_response.py +usage/models/link.py +usage/models/organization_quota.py +usage/models/organizations_quotas_assign.py +usage/models/organizations_quotas_assign_organizations_inner.py +usage/models/organizations_quotas_unassign.py +usage/models/organizations_quotas_unassign_organizations_inner.py +usage/models/pagination_links.py +usage/models/pagination_links_links.py +usage/models/quotas.py +usage/models/quotas_assign_request.py +usage/models/quotas_assign_response.py +usage/models/quotas_quotas_inner.py +usage/models/quotas_unassign.py +usage/models/self_links.py +usage/models/self_links_links.py +usage/models/tests_inner.py +usage/models/unauthorized_error.py +usage/models/units_by_tests.py +usage/models/units_by_tests_breakdowns_inner.py +usage/models/usage.py +usage/models/usage_usage.py +usage/models/usage_usage_quota.py +usage/models/validation_error.py +usage/models/validation_error_all_of_errors.py +usage/py.typed +usage/rest.py diff --git a/usage/.openapi-generator/VERSION b/usage/.openapi-generator/VERSION new file mode 100644 index 00000000..18bb4182 --- /dev/null +++ b/usage/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.5.0 diff --git a/usage/README.md b/usage/README.md new file mode 100644 index 00000000..9b1b8647 --- /dev/null +++ b/usage/README.md @@ -0,0 +1,180 @@ +# usage + +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. + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.2 +- Package version: 1.0.0 +- Generator version: 7.5.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 git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import usage +``` + +### 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 usage +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import usage +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.QuotasApi(api_client) + organizations_quotas_assign = usage.OrganizationsQuotasAssign() # OrganizationsQuotasAssign | (optional) + + try: + # Create or update accout group quotas + api_response = api_instance.assign_organizations_account_groups_quotas(organizations_quotas_assign=organizations_quotas_assign) + print("The response of QuotasApi->assign_organizations_account_groups_quotas:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling QuotasApi->assign_organizations_account_groups_quotas: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*QuotasApi* | [**assign_organizations_account_groups_quotas**](docs/QuotasApi.md#assign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/assign | Create or update accout group quotas +*QuotasApi* | [**assign_organizations_quotas**](docs/QuotasApi.md#assign_organizations_quotas) | **POST** /v7/quotas/assign | Create or update organizations quotas +*QuotasApi* | [**get_quotas**](docs/QuotasApi.md#get_quotas) | **GET** /v7/quotas | Get organization and account group usage quota +*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_usage**](docs/UsageApi.md#get_usage) | **GET** /v7/usage | Get usage information for the last month + + +## Documentation For Models + + - [AccountGroup](docs/AccountGroup.md) + - [AccountGroupId](docs/AccountGroupId.md) + - [AccountGroupQuota](docs/AccountGroupQuota.md) + - [EndpointAgentsEmbeddedInner](docs/EndpointAgentsEmbeddedInner.md) + - [EndpointAgentsEssentialsInner](docs/EndpointAgentsEssentialsInner.md) + - [EndpointAgentsInner](docs/EndpointAgentsInner.md) + - [EnterpriseAgentUnitsByTestOwnerAccountGroup](docs/EnterpriseAgentUnitsByTestOwnerAccountGroup.md) + - [EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner](docs/EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md) + - [EnterpriseAgentUnitsInner](docs/EnterpriseAgentUnitsInner.md) + - [EnterpriseAgentsInner](docs/EnterpriseAgentsInner.md) + - [Error](docs/Error.md) + - [Expand](docs/Expand.md) + - [GetEnterpriseAgentsUnitsUsage200Response](docs/GetEnterpriseAgentsUnitsUsage200Response.md) + - [GetQuotas200Response](docs/GetQuotas200Response.md) + - [GetTestUnitsUsage200Response](docs/GetTestUnitsUsage200Response.md) + - [GetUsage200Response](docs/GetUsage200Response.md) + - [Link](docs/Link.md) + - [OrganizationQuota](docs/OrganizationQuota.md) + - [OrganizationsQuotasAssign](docs/OrganizationsQuotasAssign.md) + - [OrganizationsQuotasAssignOrganizationsInner](docs/OrganizationsQuotasAssignOrganizationsInner.md) + - [OrganizationsQuotasUnassign](docs/OrganizationsQuotasUnassign.md) + - [OrganizationsQuotasUnassignOrganizationsInner](docs/OrganizationsQuotasUnassignOrganizationsInner.md) + - [PaginationLinks](docs/PaginationLinks.md) + - [PaginationLinksLinks](docs/PaginationLinksLinks.md) + - [Quotas](docs/Quotas.md) + - [QuotasAssignRequest](docs/QuotasAssignRequest.md) + - [QuotasAssignResponse](docs/QuotasAssignResponse.md) + - [QuotasQuotasInner](docs/QuotasQuotasInner.md) + - [QuotasUnassign](docs/QuotasUnassign.md) + - [SelfLinks](docs/SelfLinks.md) + - [SelfLinksLinks](docs/SelfLinksLinks.md) + - [TestsInner](docs/TestsInner.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [UnitsByTests](docs/UnitsByTests.md) + - [UnitsByTestsBreakdownsInner](docs/UnitsByTestsBreakdownsInner.md) + - [Usage](docs/Usage.md) + - [UsageUsage](docs/UsageUsage.md) + - [UsageUsageQuota](docs/UsageUsageQuota.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorAllOfErrors](docs/ValidationErrorAllOfErrors.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/usage/docs/AccountGroup.md b/usage/docs/AccountGroup.md new file mode 100644 index 00000000..474e147c --- /dev/null +++ b/usage/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 usage.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/usage/docs/AccountGroupId.md b/usage/docs/AccountGroupId.md new file mode 100644 index 00000000..504a6375 --- /dev/null +++ b/usage/docs/AccountGroupId.md @@ -0,0 +1,29 @@ +# AccountGroupId + + +## 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] + +## Example + +```python +from usage.models.account_group_id import AccountGroupId + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupId from a JSON string +account_group_id_instance = AccountGroupId.from_json(json) +# print the JSON string representation of the object +print(AccountGroupId.to_json()) + +# convert the object into a dict +account_group_id_dict = account_group_id_instance.to_dict() +# create an instance of AccountGroupId from a dict +account_group_id_from_dict = AccountGroupId.from_dict(account_group_id_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/usage_api/docs/AccountGroupQuota.md b/usage/docs/AccountGroupQuota.md similarity index 81% rename from usage_api/docs/AccountGroupQuota.md rename to usage/docs/AccountGroupQuota.md index fe000c7b..1ed880de 100644 --- a/usage_api/docs/AccountGroupQuota.md +++ b/usage/docs/AccountGroupQuota.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **int** | Value of the quota for the given Account Group. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.account_group_quota import AccountGroupQuota +from usage.models.account_group_quota import AccountGroupQuota # TODO update the JSON string below json = "{}" # create an instance of AccountGroupQuota from a JSON string account_group_quota_instance = AccountGroupQuota.from_json(json) # print the JSON string representation of the object -print AccountGroupQuota.to_json() +print(AccountGroupQuota.to_json()) # convert the object into a dict account_group_quota_dict = account_group_quota_instance.to_dict() # create an instance of AccountGroupQuota from a dict -account_group_quota_form_dict = account_group_quota.from_dict(account_group_quota_dict) +account_group_quota_from_dict = AccountGroupQuota.from_dict(account_group_quota_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/usage_api/docs/EndpointAgentsEmbeddedInner.md b/usage/docs/EndpointAgentsEmbeddedInner.md similarity index 82% rename from usage_api/docs/EndpointAgentsEmbeddedInner.md rename to usage/docs/EndpointAgentsEmbeddedInner.md index 572a66dd..cf19dc58 100644 --- a/usage_api/docs/EndpointAgentsEmbeddedInner.md +++ b/usage/docs/EndpointAgentsEmbeddedInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **object** | Unique identifier of the account group that owns the embedded endpoint agents. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner +from usage.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentsEmbeddedInner from a JSON string endpoint_agents_embedded_inner_instance = EndpointAgentsEmbeddedInner.from_json(json) # print the JSON string representation of the object -print EndpointAgentsEmbeddedInner.to_json() +print(EndpointAgentsEmbeddedInner.to_json()) # convert the object into a dict endpoint_agents_embedded_inner_dict = endpoint_agents_embedded_inner_instance.to_dict() # create an instance of EndpointAgentsEmbeddedInner from a dict -endpoint_agents_embedded_inner_form_dict = endpoint_agents_embedded_inner.from_dict(endpoint_agents_embedded_inner_dict) +endpoint_agents_embedded_inner_from_dict = EndpointAgentsEmbeddedInner.from_dict(endpoint_agents_embedded_inner_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/usage_api/docs/EndpointAgentsEssentialsInner.md b/usage/docs/EndpointAgentsEssentialsInner.md similarity index 81% rename from usage_api/docs/EndpointAgentsEssentialsInner.md rename to usage/docs/EndpointAgentsEssentialsInner.md index 2da26b3e..16921177 100644 --- a/usage_api/docs/EndpointAgentsEssentialsInner.md +++ b/usage/docs/EndpointAgentsEssentialsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **object** | Unique identifier of the account group owning the endpoint agents essentials. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner +from usage.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentsEssentialsInner from a JSON string endpoint_agents_essentials_inner_instance = EndpointAgentsEssentialsInner.from_json(json) # print the JSON string representation of the object -print EndpointAgentsEssentialsInner.to_json() +print(EndpointAgentsEssentialsInner.to_json()) # convert the object into a dict endpoint_agents_essentials_inner_dict = endpoint_agents_essentials_inner_instance.to_dict() # create an instance of EndpointAgentsEssentialsInner from a dict -endpoint_agents_essentials_inner_form_dict = endpoint_agents_essentials_inner.from_dict(endpoint_agents_essentials_inner_dict) +endpoint_agents_essentials_inner_from_dict = EndpointAgentsEssentialsInner.from_dict(endpoint_agents_essentials_inner_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/usage_api/docs/EndpointAgentsInner.md b/usage/docs/EndpointAgentsInner.md similarity index 84% rename from usage_api/docs/EndpointAgentsInner.md rename to usage/docs/EndpointAgentsInner.md index 35f1ccb0..5617651b 100644 --- a/usage_api/docs/EndpointAgentsInner.md +++ b/usage/docs/EndpointAgentsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **object** | Unique identifier of the account group owning the endpoint agents. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.endpoint_agents_inner import EndpointAgentsInner +from usage.models.endpoint_agents_inner import EndpointAgentsInner # TODO update the JSON string below json = "{}" # create an instance of EndpointAgentsInner from a JSON string endpoint_agents_inner_instance = EndpointAgentsInner.from_json(json) # print the JSON string representation of the object -print EndpointAgentsInner.to_json() +print(EndpointAgentsInner.to_json()) # convert the object into a dict endpoint_agents_inner_dict = endpoint_agents_inner_instance.to_dict() # create an instance of EndpointAgentsInner from a dict -endpoint_agents_inner_form_dict = endpoint_agents_inner.from_dict(endpoint_agents_inner_dict) +endpoint_agents_inner_from_dict = EndpointAgentsInner.from_dict(endpoint_agents_inner_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/usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroup.md b/usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroup.md new file mode 100644 index 00000000..b90c6154 --- /dev/null +++ b/usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroup.md @@ -0,0 +1,29 @@ +# EnterpriseAgentUnitsByTestOwnerAccountGroup + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breakdowns** | [**List[EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner]**](EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md) | | [optional] + +## Example + +```python +from usage.models.enterprise_agent_units_by_test_owner_account_group import EnterpriseAgentUnitsByTestOwnerAccountGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroup from a JSON string +enterprise_agent_units_by_test_owner_account_group_instance = EnterpriseAgentUnitsByTestOwnerAccountGroup.from_json(json) +# print the JSON string representation of the object +print(EnterpriseAgentUnitsByTestOwnerAccountGroup.to_json()) + +# convert the object into a dict +enterprise_agent_units_by_test_owner_account_group_dict = enterprise_agent_units_by_test_owner_account_group_instance.to_dict() +# create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroup from a dict +enterprise_agent_units_by_test_owner_account_group_from_dict = EnterpriseAgentUnitsByTestOwnerAccountGroup.from_dict(enterprise_agent_units_by_test_owner_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/usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md b/usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md new file mode 100644 index 00000000..61e0d0e6 --- /dev/null +++ b/usage/docs/EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md @@ -0,0 +1,35 @@ +# EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | Unique identifier of the account group where some tests are incurring the enterprise agent units. | [optional] +**account_group_name** | **str** | Name of the account group which owns the tests that are incurring enterprise agent units. | [optional] +**agent_id** | **str** | Unique identifier of the enterprise agent generating usage. | [optional] +**agent_name** | **str** | Name of the enterprise agent generating usage. | [optional] +**enterprise_units_used** | **int** | Number of enterprise agent units owned by the specific account group in the usage period. | [optional] +**enterprise_units_projected** | **int** | Number of enterprise units projected in the current usage period, based on units consumed to date and configuration of enabled tests. This value is updated hourly. Returns non-zero value only for organizations with metered billing. | [optional] +**vagent_id** | **str** | Unique identifier of the virtual agent generating usage | [optional] + +## Example + +```python +from usage.models.enterprise_agent_units_by_test_owner_account_group_breakdowns_inner import EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner from a JSON string +enterprise_agent_units_by_test_owner_account_group_breakdowns_inner_instance = EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.from_json(json) +# print the JSON string representation of the object +print(EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.to_json()) + +# convert the object into a dict +enterprise_agent_units_by_test_owner_account_group_breakdowns_inner_dict = enterprise_agent_units_by_test_owner_account_group_breakdowns_inner_instance.to_dict() +# create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner from a dict +enterprise_agent_units_by_test_owner_account_group_breakdowns_inner_from_dict = EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.from_dict(enterprise_agent_units_by_test_owner_account_group_breakdowns_inner_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/usage_api/docs/EnterpriseAgentUnitsInner.md b/usage/docs/EnterpriseAgentUnitsInner.md similarity index 87% rename from usage_api/docs/EnterpriseAgentUnitsInner.md rename to usage/docs/EnterpriseAgentUnitsInner.md index 8699c6c4..c7e3f1af 100644 --- a/usage_api/docs/EnterpriseAgentUnitsInner.md +++ b/usage/docs/EnterpriseAgentUnitsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **object** | Unique identifier of the account group owning the enterprise agent units. | [optional] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner +from usage.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner # TODO update the JSON string below json = "{}" # create an instance of EnterpriseAgentUnitsInner from a JSON string enterprise_agent_units_inner_instance = EnterpriseAgentUnitsInner.from_json(json) # print the JSON string representation of the object -print EnterpriseAgentUnitsInner.to_json() +print(EnterpriseAgentUnitsInner.to_json()) # convert the object into a dict enterprise_agent_units_inner_dict = enterprise_agent_units_inner_instance.to_dict() # create an instance of EnterpriseAgentUnitsInner from a dict -enterprise_agent_units_inner_form_dict = enterprise_agent_units_inner.from_dict(enterprise_agent_units_inner_dict) +enterprise_agent_units_inner_from_dict = EnterpriseAgentUnitsInner.from_dict(enterprise_agent_units_inner_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/usage_api/docs/EnterpriseAgentsInner.md b/usage/docs/EnterpriseAgentsInner.md similarity index 83% rename from usage_api/docs/EnterpriseAgentsInner.md rename to usage/docs/EnterpriseAgentsInner.md index fea4291a..4e369980 100644 --- a/usage_api/docs/EnterpriseAgentsInner.md +++ b/usage/docs/EnterpriseAgentsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **aid** | **object** | A unique identifier that specifies the account group that owns the enterprise agents. | [optional] @@ -11,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.enterprise_agents_inner import EnterpriseAgentsInner +from usage.models.enterprise_agents_inner import EnterpriseAgentsInner # TODO update the JSON string below json = "{}" # create an instance of EnterpriseAgentsInner from a JSON string enterprise_agents_inner_instance = EnterpriseAgentsInner.from_json(json) # print the JSON string representation of the object -print EnterpriseAgentsInner.to_json() +print(EnterpriseAgentsInner.to_json()) # convert the object into a dict enterprise_agents_inner_dict = enterprise_agents_inner_instance.to_dict() # create an instance of EnterpriseAgentsInner from a dict -enterprise_agents_inner_form_dict = enterprise_agents_inner.from_dict(enterprise_agents_inner_dict) +enterprise_agents_inner_from_dict = EnterpriseAgentsInner.from_dict(enterprise_agents_inner_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/usage/docs/Error.md b/usage/docs/Error.md new file mode 100644 index 00000000..f055ed7d --- /dev/null +++ b/usage/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 usage.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/usage/docs/Expand.md b/usage/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/usage/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/usage/docs/GetEnterpriseAgentsUnitsUsage200Response.md b/usage/docs/GetEnterpriseAgentsUnitsUsage200Response.md new file mode 100644 index 00000000..ca270fc2 --- /dev/null +++ b/usage/docs/GetEnterpriseAgentsUnitsUsage200Response.md @@ -0,0 +1,30 @@ +# GetEnterpriseAgentsUnitsUsage200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breakdowns** | [**List[EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner]**](EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from usage.models.get_enterprise_agents_units_usage200_response import GetEnterpriseAgentsUnitsUsage200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEnterpriseAgentsUnitsUsage200Response from a JSON string +get_enterprise_agents_units_usage200_response_instance = GetEnterpriseAgentsUnitsUsage200Response.from_json(json) +# print the JSON string representation of the object +print(GetEnterpriseAgentsUnitsUsage200Response.to_json()) + +# convert the object into a dict +get_enterprise_agents_units_usage200_response_dict = get_enterprise_agents_units_usage200_response_instance.to_dict() +# create an instance of GetEnterpriseAgentsUnitsUsage200Response from a dict +get_enterprise_agents_units_usage200_response_from_dict = GetEnterpriseAgentsUnitsUsage200Response.from_dict(get_enterprise_agents_units_usage200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/usage_api/docs/GetQuotas200Response.md b/usage/docs/GetQuotas200Response.md similarity index 80% rename from usage_api/docs/GetQuotas200Response.md rename to usage/docs/GetQuotas200Response.md index a072e7ad..cd64ad80 100644 --- a/usage_api/docs/GetQuotas200Response.md +++ b/usage/docs/GetQuotas200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **quotas** | [**List[QuotasQuotasInner]**](QuotasQuotasInner.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.get_quotas200_response import GetQuotas200Response +from usage.models.get_quotas200_response import GetQuotas200Response # TODO update the JSON string below json = "{}" # create an instance of GetQuotas200Response from a JSON string get_quotas200_response_instance = GetQuotas200Response.from_json(json) # print the JSON string representation of the object -print GetQuotas200Response.to_json() +print(GetQuotas200Response.to_json()) # convert the object into a dict get_quotas200_response_dict = get_quotas200_response_instance.to_dict() # create an instance of GetQuotas200Response from a dict -get_quotas200_response_form_dict = get_quotas200_response.from_dict(get_quotas200_response_dict) +get_quotas200_response_from_dict = GetQuotas200Response.from_dict(get_quotas200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/usage/docs/GetTestUnitsUsage200Response.md b/usage/docs/GetTestUnitsUsage200Response.md new file mode 100644 index 00000000..caa37196 --- /dev/null +++ b/usage/docs/GetTestUnitsUsage200Response.md @@ -0,0 +1,30 @@ +# GetTestUnitsUsage200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breakdowns** | [**List[UnitsByTestsBreakdownsInner]**](UnitsByTestsBreakdownsInner.md) | | [optional] +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from usage.models.get_test_units_usage200_response import GetTestUnitsUsage200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of GetTestUnitsUsage200Response from a JSON string +get_test_units_usage200_response_instance = GetTestUnitsUsage200Response.from_json(json) +# print the JSON string representation of the object +print(GetTestUnitsUsage200Response.to_json()) + +# convert the object into a dict +get_test_units_usage200_response_dict = get_test_units_usage200_response_instance.to_dict() +# create an instance of GetTestUnitsUsage200Response from a dict +get_test_units_usage200_response_from_dict = GetTestUnitsUsage200Response.from_dict(get_test_units_usage200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/usage_api/docs/GetUsage200Response.md b/usage/docs/GetUsage200Response.md similarity index 80% rename from usage_api/docs/GetUsage200Response.md rename to usage/docs/GetUsage200Response.md index 1aaf098c..e64ffeb3 100644 --- a/usage_api/docs/GetUsage200Response.md +++ b/usage/docs/GetUsage200Response.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usage** | [**UsageUsage**](UsageUsage.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.get_usage200_response import GetUsage200Response +from usage.models.get_usage200_response import GetUsage200Response # TODO update the JSON string below json = "{}" # create an instance of GetUsage200Response from a JSON string get_usage200_response_instance = GetUsage200Response.from_json(json) # print the JSON string representation of the object -print GetUsage200Response.to_json() +print(GetUsage200Response.to_json()) # convert the object into a dict get_usage200_response_dict = get_usage200_response_instance.to_dict() # create an instance of GetUsage200Response from a dict -get_usage200_response_form_dict = get_usage200_response.from_dict(get_usage200_response_dict) +get_usage200_response_from_dict = GetUsage200Response.from_dict(get_usage200_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/usage/docs/Link.md b/usage/docs/Link.md new file mode 100644 index 00000000..642aed8f --- /dev/null +++ b/usage/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 usage.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/usage_api/docs/OrganizationQuota.md b/usage/docs/OrganizationQuota.md similarity index 81% rename from usage_api/docs/OrganizationQuota.md rename to usage/docs/OrganizationQuota.md index c404727b..9f3e9631 100644 --- a/usage_api/docs/OrganizationQuota.md +++ b/usage/docs/OrganizationQuota.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **int** | Value of the quota for the given Organization. | @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.organization_quota import OrganizationQuota +from usage.models.organization_quota import OrganizationQuota # TODO update the JSON string below json = "{}" # create an instance of OrganizationQuota from a JSON string organization_quota_instance = OrganizationQuota.from_json(json) # print the JSON string representation of the object -print OrganizationQuota.to_json() +print(OrganizationQuota.to_json()) # convert the object into a dict organization_quota_dict = organization_quota_instance.to_dict() # create an instance of OrganizationQuota from a dict -organization_quota_form_dict = organization_quota.from_dict(organization_quota_dict) +organization_quota_from_dict = OrganizationQuota.from_dict(organization_quota_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/usage_api/docs/OrganizationsQuotasAssign.md b/usage/docs/OrganizationsQuotasAssign.md similarity index 79% rename from usage_api/docs/OrganizationsQuotasAssign.md rename to usage/docs/OrganizationsQuotasAssign.md index da895889..959f240c 100644 --- a/usage_api/docs/OrganizationsQuotasAssign.md +++ b/usage/docs/OrganizationsQuotasAssign.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **organizations** | [**List[OrganizationsQuotasAssignOrganizationsInner]**](OrganizationsQuotasAssignOrganizationsInner.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.organizations_quotas_assign import OrganizationsQuotasAssign +from usage.models.organizations_quotas_assign import OrganizationsQuotasAssign # TODO update the JSON string below json = "{}" # create an instance of OrganizationsQuotasAssign from a JSON string organizations_quotas_assign_instance = OrganizationsQuotasAssign.from_json(json) # print the JSON string representation of the object -print OrganizationsQuotasAssign.to_json() +print(OrganizationsQuotasAssign.to_json()) # convert the object into a dict organizations_quotas_assign_dict = organizations_quotas_assign_instance.to_dict() # create an instance of OrganizationsQuotasAssign from a dict -organizations_quotas_assign_form_dict = organizations_quotas_assign.from_dict(organizations_quotas_assign_dict) +organizations_quotas_assign_from_dict = OrganizationsQuotasAssign.from_dict(organizations_quotas_assign_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/usage_api/docs/OrganizationsQuotasAssignOrganizationsInner.md b/usage/docs/OrganizationsQuotasAssignOrganizationsInner.md similarity index 75% rename from usage_api/docs/OrganizationsQuotasAssignOrganizationsInner.md rename to usage/docs/OrganizationsQuotasAssignOrganizationsInner.md index e6cf7e71..1b3930d9 100644 --- a/usage_api/docs/OrganizationsQuotasAssignOrganizationsInner.md +++ b/usage/docs/OrganizationsQuotasAssignOrganizationsInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **org_id** | **str** | Unique identifier of the organization. | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner +from usage.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner # TODO update the JSON string below json = "{}" # create an instance of OrganizationsQuotasAssignOrganizationsInner from a JSON string organizations_quotas_assign_organizations_inner_instance = OrganizationsQuotasAssignOrganizationsInner.from_json(json) # print the JSON string representation of the object -print OrganizationsQuotasAssignOrganizationsInner.to_json() +print(OrganizationsQuotasAssignOrganizationsInner.to_json()) # convert the object into a dict organizations_quotas_assign_organizations_inner_dict = organizations_quotas_assign_organizations_inner_instance.to_dict() # create an instance of OrganizationsQuotasAssignOrganizationsInner from a dict -organizations_quotas_assign_organizations_inner_form_dict = organizations_quotas_assign_organizations_inner.from_dict(organizations_quotas_assign_organizations_inner_dict) +organizations_quotas_assign_organizations_inner_from_dict = OrganizationsQuotasAssignOrganizationsInner.from_dict(organizations_quotas_assign_organizations_inner_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/usage_api/docs/OrganizationsQuotasUnassign.md b/usage/docs/OrganizationsQuotasUnassign.md similarity index 78% rename from usage_api/docs/OrganizationsQuotasUnassign.md rename to usage/docs/OrganizationsQuotasUnassign.md index 2c276326..fddc510d 100644 --- a/usage_api/docs/OrganizationsQuotasUnassign.md +++ b/usage/docs/OrganizationsQuotasUnassign.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **organizations** | [**List[OrganizationsQuotasUnassignOrganizationsInner]**](OrganizationsQuotasUnassignOrganizationsInner.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.organizations_quotas_unassign import OrganizationsQuotasUnassign +from usage.models.organizations_quotas_unassign import OrganizationsQuotasUnassign # TODO update the JSON string below json = "{}" # create an instance of OrganizationsQuotasUnassign from a JSON string organizations_quotas_unassign_instance = OrganizationsQuotasUnassign.from_json(json) # print the JSON string representation of the object -print OrganizationsQuotasUnassign.to_json() +print(OrganizationsQuotasUnassign.to_json()) # convert the object into a dict organizations_quotas_unassign_dict = organizations_quotas_unassign_instance.to_dict() # create an instance of OrganizationsQuotasUnassign from a dict -organizations_quotas_unassign_form_dict = organizations_quotas_unassign.from_dict(organizations_quotas_unassign_dict) +organizations_quotas_unassign_from_dict = OrganizationsQuotasUnassign.from_dict(organizations_quotas_unassign_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/usage/docs/OrganizationsQuotasUnassignOrganizationsInner.md b/usage/docs/OrganizationsQuotasUnassignOrganizationsInner.md new file mode 100644 index 00000000..3bbbf7de --- /dev/null +++ b/usage/docs/OrganizationsQuotasUnassignOrganizationsInner.md @@ -0,0 +1,30 @@ +# OrganizationsQuotasUnassignOrganizationsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **str** | Unique identifier of the organization. | [optional] +**account_groups** | **List[str]** | List of account group IDs. | [optional] + +## Example + +```python +from usage.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationsQuotasUnassignOrganizationsInner from a JSON string +organizations_quotas_unassign_organizations_inner_instance = OrganizationsQuotasUnassignOrganizationsInner.from_json(json) +# print the JSON string representation of the object +print(OrganizationsQuotasUnassignOrganizationsInner.to_json()) + +# convert the object into a dict +organizations_quotas_unassign_organizations_inner_dict = organizations_quotas_unassign_organizations_inner_instance.to_dict() +# create an instance of OrganizationsQuotasUnassignOrganizationsInner from a dict +organizations_quotas_unassign_organizations_inner_from_dict = OrganizationsQuotasUnassignOrganizationsInner.from_dict(organizations_quotas_unassign_organizations_inner_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/usage/docs/PaginationLinks.md b/usage/docs/PaginationLinks.md new file mode 100644 index 00000000..0f664851 --- /dev/null +++ b/usage/docs/PaginationLinks.md @@ -0,0 +1,30 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**PaginationLinksLinks**](PaginationLinksLinks.md) | | [optional] + +## Example + +```python +from usage.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/usage/docs/PaginationLinksLinks.md b/usage/docs/PaginationLinksLinks.md new file mode 100644 index 00000000..69ccf379 --- /dev/null +++ b/usage/docs/PaginationLinksLinks.md @@ -0,0 +1,31 @@ +# PaginationLinksLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from usage.models.pagination_links_links import PaginationLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinksLinks from a JSON string +pagination_links_links_instance = PaginationLinksLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinksLinks.to_json()) + +# convert the object into a dict +pagination_links_links_dict = pagination_links_links_instance.to_dict() +# create an instance of PaginationLinksLinks from a dict +pagination_links_links_from_dict = PaginationLinksLinks.from_dict(pagination_links_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/usage_api/docs/Quotas.md b/usage/docs/Quotas.md similarity index 85% rename from usage_api/docs/Quotas.md rename to usage/docs/Quotas.md index 126b7119..9c1120b2 100644 --- a/usage_api/docs/Quotas.md +++ b/usage/docs/Quotas.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **quotas** | [**List[QuotasQuotasInner]**](QuotasQuotasInner.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.quotas import Quotas +from usage.models.quotas import Quotas # TODO update the JSON string below json = "{}" # create an instance of Quotas from a JSON string quotas_instance = Quotas.from_json(json) # print the JSON string representation of the object -print Quotas.to_json() +print(Quotas.to_json()) # convert the object into a dict quotas_dict = quotas_instance.to_dict() # create an instance of Quotas from a dict -quotas_form_dict = quotas.from_dict(quotas_dict) +quotas_from_dict = Quotas.from_dict(quotas_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/usage/docs/QuotasApi.md b/usage/docs/QuotasApi.md new file mode 100644 index 00000000..783dbd2d --- /dev/null +++ b/usage/docs/QuotasApi.md @@ -0,0 +1,426 @@ +# usage.QuotasApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**assign_organizations_account_groups_quotas**](QuotasApi.md#assign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/assign | Create or update accout group quotas +[**assign_organizations_quotas**](QuotasApi.md#assign_organizations_quotas) | **POST** /v7/quotas/assign | Create or update organizations quotas +[**get_quotas**](QuotasApi.md#get_quotas) | **GET** /v7/quotas | Get organization and account group usage quota +[**unassign_organizations_account_groups_quotas**](QuotasApi.md#unassign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/unassign | Remove account group quotas from organizations +[**unassign_organizations_quotas**](QuotasApi.md#unassign_organizations_quotas) | **POST** /v7/quotas/unassign | Remove organization quotas + + +# **assign_organizations_account_groups_quotas** +> OrganizationsQuotasAssign assign_organizations_account_groups_quotas(organizations_quotas_assign=organizations_quotas_assign) + +Create or update accout group quotas + +This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.organizations_quotas_assign import OrganizationsQuotasAssign +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.QuotasApi(api_client) + organizations_quotas_assign = usage.OrganizationsQuotasAssign() # OrganizationsQuotasAssign | (optional) + + try: + # Create or update accout group quotas + api_response = api_instance.assign_organizations_account_groups_quotas(organizations_quotas_assign=organizations_quotas_assign) + print("The response of QuotasApi->assign_organizations_account_groups_quotas:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling QuotasApi->assign_organizations_account_groups_quotas: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organizations_quotas_assign** | [**OrganizationsQuotasAssign**](OrganizationsQuotasAssign.md)| | [optional] + +### Return type + +[**OrganizationsQuotasAssign**](OrganizationsQuotasAssign.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 | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **assign_organizations_quotas** +> QuotasAssignResponse assign_organizations_quotas(quotas_assign_request=quotas_assign_request) + +Create or update organizations quotas + +This endpoint recieves a list of organization quotas to create or update. If there's no specific `orgId` defined for a quota, it defaults to using the authenticated organization. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows cumulative behavior––This means that the quotas are assigned to the specified organizations, and any previous assignments remain unchanged; no unassignments occur. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.quotas_assign_request import QuotasAssignRequest +from usage.models.quotas_assign_response import QuotasAssignResponse +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.QuotasApi(api_client) + quotas_assign_request = usage.QuotasAssignRequest() # QuotasAssignRequest | (optional) + + try: + # Create or update organizations quotas + api_response = api_instance.assign_organizations_quotas(quotas_assign_request=quotas_assign_request) + print("The response of QuotasApi->assign_organizations_quotas:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling QuotasApi->assign_organizations_quotas: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quotas_assign_request** | [**QuotasAssignRequest**](QuotasAssignRequest.md)| | [optional] + +### Return type + +[**QuotasAssignResponse**](QuotasAssignResponse.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 | - | + +[[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_quotas** +> GetQuotas200Response get_quotas() + +Get organization and account group usage quota + +This endpoint retrieves usage quotas for both organization and account groups. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. If a user has quota update permission in multiple organizations, the API returns data from all such organizations. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.get_quotas200_response import GetQuotas200Response +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.QuotasApi(api_client) + + try: + # Get organization and account group usage quota + api_response = api_instance.get_quotas() + print("The response of QuotasApi->get_quotas:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling QuotasApi->get_quotas: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GetQuotas200Response**](GetQuotas200Response.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) + +# **unassign_organizations_account_groups_quotas** +> unassign_organizations_account_groups_quotas(organizations_quotas_unassign=organizations_quotas_unassign) + +Remove account group quotas from organizations + +This endpoint removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.organizations_quotas_unassign import OrganizationsQuotasUnassign +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.QuotasApi(api_client) + organizations_quotas_unassign = usage.OrganizationsQuotasUnassign() # OrganizationsQuotasUnassign | (optional) + + try: + # Remove account group quotas from organizations + api_instance.unassign_organizations_account_groups_quotas(organizations_quotas_unassign=organizations_quotas_unassign) + except Exception as e: + print("Exception when calling QuotasApi->unassign_organizations_account_groups_quotas: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organizations_quotas_unassign** | [**OrganizationsQuotasUnassign**](OrganizationsQuotasUnassign.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **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 | - | + +[[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_organizations_quotas** +> unassign_organizations_quotas(quotas_unassign=quotas_unassign) + +Remove organization quotas + +This endpoint recieves a list of organization IDs to remove their current quota. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.quotas_unassign import QuotasUnassign +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.QuotasApi(api_client) + quotas_unassign = usage.QuotasUnassign() # QuotasUnassign | (optional) + + try: + # Remove organization quotas + api_instance.unassign_organizations_quotas(quotas_unassign=quotas_unassign) + except Exception as e: + print("Exception when calling QuotasApi->unassign_organizations_quotas: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **quotas_unassign** | [**QuotasUnassign**](QuotasUnassign.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **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 | - | + +[[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/usage_api/docs/QuotasAssignRequest.md b/usage/docs/QuotasAssignRequest.md similarity index 80% rename from usage_api/docs/QuotasAssignRequest.md rename to usage/docs/QuotasAssignRequest.md index e0d68cd9..36619f95 100644 --- a/usage_api/docs/QuotasAssignRequest.md +++ b/usage/docs/QuotasAssignRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **organizations** | [**List[OrganizationQuota]**](OrganizationQuota.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.quotas_assign_request import QuotasAssignRequest +from usage.models.quotas_assign_request import QuotasAssignRequest # TODO update the JSON string below json = "{}" # create an instance of QuotasAssignRequest from a JSON string quotas_assign_request_instance = QuotasAssignRequest.from_json(json) # print the JSON string representation of the object -print QuotasAssignRequest.to_json() +print(QuotasAssignRequest.to_json()) # convert the object into a dict quotas_assign_request_dict = quotas_assign_request_instance.to_dict() # create an instance of QuotasAssignRequest from a dict -quotas_assign_request_form_dict = quotas_assign_request.from_dict(quotas_assign_request_dict) +quotas_assign_request_from_dict = QuotasAssignRequest.from_dict(quotas_assign_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/usage_api/docs/QuotasAssignResponse.md b/usage/docs/QuotasAssignResponse.md similarity index 79% rename from usage_api/docs/QuotasAssignResponse.md rename to usage/docs/QuotasAssignResponse.md index fcc7c158..8a722301 100644 --- a/usage_api/docs/QuotasAssignResponse.md +++ b/usage/docs/QuotasAssignResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **organizations** | [**List[OrganizationQuota]**](OrganizationQuota.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.quotas_assign_response import QuotasAssignResponse +from usage.models.quotas_assign_response import QuotasAssignResponse # TODO update the JSON string below json = "{}" # create an instance of QuotasAssignResponse from a JSON string quotas_assign_response_instance = QuotasAssignResponse.from_json(json) # print the JSON string representation of the object -print QuotasAssignResponse.to_json() +print(QuotasAssignResponse.to_json()) # convert the object into a dict quotas_assign_response_dict = quotas_assign_response_instance.to_dict() # create an instance of QuotasAssignResponse from a dict -quotas_assign_response_form_dict = quotas_assign_response.from_dict(quotas_assign_response_dict) +quotas_assign_response_from_dict = QuotasAssignResponse.from_dict(quotas_assign_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/usage_api/docs/QuotasQuotasInner.md b/usage/docs/QuotasQuotasInner.md similarity index 82% rename from usage_api/docs/QuotasQuotasInner.md rename to usage/docs/QuotasQuotasInner.md index 5166002c..92f03619 100644 --- a/usage_api/docs/QuotasQuotasInner.md +++ b/usage/docs/QuotasQuotasInner.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **organization_quota** | [**OrganizationQuota**](OrganizationQuota.md) | | [optional] @@ -10,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.quotas_quotas_inner import QuotasQuotasInner +from usage.models.quotas_quotas_inner import QuotasQuotasInner # TODO update the JSON string below json = "{}" # create an instance of QuotasQuotasInner from a JSON string quotas_quotas_inner_instance = QuotasQuotasInner.from_json(json) # print the JSON string representation of the object -print QuotasQuotasInner.to_json() +print(QuotasQuotasInner.to_json()) # convert the object into a dict quotas_quotas_inner_dict = quotas_quotas_inner_instance.to_dict() # create an instance of QuotasQuotasInner from a dict -quotas_quotas_inner_form_dict = quotas_quotas_inner.from_dict(quotas_quotas_inner_dict) +quotas_quotas_inner_from_dict = QuotasQuotasInner.from_dict(quotas_quotas_inner_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/usage_api/docs/QuotasUnassign.md b/usage/docs/QuotasUnassign.md similarity index 81% rename from usage_api/docs/QuotasUnassign.md rename to usage/docs/QuotasUnassign.md index bb5168a2..a2e863fd 100644 --- a/usage_api/docs/QuotasUnassign.md +++ b/usage/docs/QuotasUnassign.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **organizations** | **List[str]** | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.quotas_unassign import QuotasUnassign +from usage.models.quotas_unassign import QuotasUnassign # TODO update the JSON string below json = "{}" # create an instance of QuotasUnassign from a JSON string quotas_unassign_instance = QuotasUnassign.from_json(json) # print the JSON string representation of the object -print QuotasUnassign.to_json() +print(QuotasUnassign.to_json()) # convert the object into a dict quotas_unassign_dict = quotas_unassign_instance.to_dict() # create an instance of QuotasUnassign from a dict -quotas_unassign_form_dict = quotas_unassign.from_dict(quotas_unassign_dict) +quotas_unassign_from_dict = QuotasUnassign.from_dict(quotas_unassign_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/usage/docs/SelfLinks.md b/usage/docs/SelfLinks.md new file mode 100644 index 00000000..20de7eca --- /dev/null +++ b/usage/docs/SelfLinks.md @@ -0,0 +1,29 @@ +# SelfLinks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] + +## Example + +```python +from usage.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/usage/docs/SelfLinksLinks.md b/usage/docs/SelfLinksLinks.md new file mode 100644 index 00000000..20b8fd5c --- /dev/null +++ b/usage/docs/SelfLinksLinks.md @@ -0,0 +1,30 @@ +# SelfLinksLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from usage.models.self_links_links import SelfLinksLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinksLinks from a JSON string +self_links_links_instance = SelfLinksLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinksLinks.to_json()) + +# convert the object into a dict +self_links_links_dict = self_links_links_instance.to_dict() +# create an instance of SelfLinksLinks from a dict +self_links_links_from_dict = SelfLinksLinks.from_dict(self_links_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/usage_api/docs/TestsInner.md b/usage/docs/TestsInner.md similarity index 82% rename from usage_api/docs/TestsInner.md rename to usage/docs/TestsInner.md index 2135390e..8d0f6377 100644 --- a/usage_api/docs/TestsInner.md +++ b/usage/docs/TestsInner.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**aid** | **object** | Unique identifier of the account group which owns the test. | [optional] -**account_group_name** | **object** | Name of the account group which owns the test. | [optional] +**aid** | **str** | Unique identifier of the account group which owns the test. | [optional] +**account_group_name** | **str** | Name of the account group which owns the test. | [optional] **test_id** | **str** | Unique identifier of the test generating usage. | [optional] **test_name** | **str** | Name of the test generating usage. | [optional] **test_type** | **str** | The type of test that generated the usage data. Note that this parameter provides a user-friendly description of the test type and should not be parsed to determine the endpoint for querying configuration details. | [optional] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.tests_inner import TestsInner +from usage.models.tests_inner import TestsInner # TODO update the JSON string below json = "{}" # create an instance of TestsInner from a JSON string tests_inner_instance = TestsInner.from_json(json) # print the JSON string representation of the object -print TestsInner.to_json() +print(TestsInner.to_json()) # convert the object into a dict tests_inner_dict = tests_inner_instance.to_dict() # create an instance of TestsInner from a dict -tests_inner_form_dict = tests_inner.from_dict(tests_inner_dict) +tests_inner_from_dict = TestsInner.from_dict(tests_inner_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/usage/docs/UnauthorizedError.md b/usage/docs/UnauthorizedError.md new file mode 100644 index 00000000..72ccdbda --- /dev/null +++ b/usage/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from usage.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/usage/docs/UnitsByTests.md b/usage/docs/UnitsByTests.md new file mode 100644 index 00000000..c968dab8 --- /dev/null +++ b/usage/docs/UnitsByTests.md @@ -0,0 +1,29 @@ +# UnitsByTests + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breakdowns** | [**List[UnitsByTestsBreakdownsInner]**](UnitsByTestsBreakdownsInner.md) | | [optional] + +## Example + +```python +from usage.models.units_by_tests import UnitsByTests + +# TODO update the JSON string below +json = "{}" +# create an instance of UnitsByTests from a JSON string +units_by_tests_instance = UnitsByTests.from_json(json) +# print the JSON string representation of the object +print(UnitsByTests.to_json()) + +# convert the object into a dict +units_by_tests_dict = units_by_tests_instance.to_dict() +# create an instance of UnitsByTests from a dict +units_by_tests_from_dict = UnitsByTests.from_dict(units_by_tests_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/usage/docs/UnitsByTestsBreakdownsInner.md b/usage/docs/UnitsByTestsBreakdownsInner.md new file mode 100644 index 00000000..d52cbce1 --- /dev/null +++ b/usage/docs/UnitsByTestsBreakdownsInner.md @@ -0,0 +1,38 @@ +# UnitsByTestsBreakdownsInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | Unique ID of the account group owning the test that is generating units | [optional] +**account_group_name** | **str** | Name of the account group which owns the test that is generating the units | [optional] +**enterprise_units_used** | **int** | Units generated by the by the enterprise agents running the test | [optional] +**enterprise_units_projected** | **int** | Enterprise Units projected in the current usage period, based on units consumed to date and configuration of the test | [optional] +**cloud_units_used** | **int** | Units generated by the by the cloud agents running the test | [optional] +**cloud_units_projected** | **int** | Cloud Units projected in the current usage period, based on units consumed to date and configuration of the test | [optional] +**test_id** | **str** | Unique ID of the test generating usage | [optional] +**test_name** | **str** | Name of the test generating usage | [optional] +**test_type** | **str** | Type of test generating usage. Note that this is a friendly testType entry (so it shouldn’t be parsed to discover the correct endpoint to query for configuration details). | [optional] +**is_instant_test** | **bool** | Indicates whether the test is scheduled or instant | [optional] + +## Example + +```python +from usage.models.units_by_tests_breakdowns_inner import UnitsByTestsBreakdownsInner + +# TODO update the JSON string below +json = "{}" +# create an instance of UnitsByTestsBreakdownsInner from a JSON string +units_by_tests_breakdowns_inner_instance = UnitsByTestsBreakdownsInner.from_json(json) +# print the JSON string representation of the object +print(UnitsByTestsBreakdownsInner.to_json()) + +# convert the object into a dict +units_by_tests_breakdowns_inner_dict = units_by_tests_breakdowns_inner_instance.to_dict() +# create an instance of UnitsByTestsBreakdownsInner from a dict +units_by_tests_breakdowns_inner_from_dict = UnitsByTestsBreakdownsInner.from_dict(units_by_tests_breakdowns_inner_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/usage_api/docs/Usage.md b/usage/docs/Usage.md similarity index 86% rename from usage_api/docs/Usage.md rename to usage/docs/Usage.md index 160a698c..b46e827b 100644 --- a/usage_api/docs/Usage.md +++ b/usage/docs/Usage.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usage** | [**UsageUsage**](UsageUsage.md) | | [optional] @@ -9,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.usage import Usage +from usage.models.usage import Usage # TODO update the JSON string below json = "{}" # create an instance of Usage from a JSON string usage_instance = Usage.from_json(json) # print the JSON string representation of the object -print Usage.to_json() +print(Usage.to_json()) # convert the object into a dict usage_dict = usage_instance.to_dict() # create an instance of Usage from a dict -usage_form_dict = usage.from_dict(usage_dict) +usage_from_dict = Usage.from_dict(usage_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/usage/docs/UsageApi.md b/usage/docs/UsageApi.md new file mode 100644 index 00000000..43d1b18a --- /dev/null +++ b/usage/docs/UsageApi.md @@ -0,0 +1,276 @@ +# usage.UsageApi + +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_usage**](UsageApi.md#get_usage) | **GET** /v7/usage | Get usage information for the last month + + +# **get_enterprise_agents_units_usage** +> GetEnterpriseAgentsUnitsUsage200Response get_enterprise_agents_units_usage(start_date=start_date, end_date=end_date, cursor=cursor) + +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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.get_enterprise_agents_units_usage200_response import GetEnterpriseAgentsUnitsUsage200Response +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.UsageApi(api_client) + 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 enterprise agent usage + api_response = api_instance.get_enterprise_agents_units_usage(start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of UsageApi->get_enterprise_agents_units_usage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsageApi->get_enterprise_agents_units_usage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**GetEnterpriseAgentsUnitsUsage200Response**](GetEnterpriseAgentsUnitsUsage200Response.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_test_units_usage** +> GetTestUnitsUsage200Response get_test_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. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.get_test_units_usage200_response import GetTestUnitsUsage200Response +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.UsageApi(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) + 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 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") + pprint(api_response) + except Exception as e: + print("Exception when calling UsageApi->get_test_units_usage: %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] + **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 + +[**GetTestUnitsUsage200Response**](GetTestUnitsUsage200Response.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_usage** +> GetUsage200Response get_usage(aid=aid, expand=expand) + +Get usage information for the last month + +This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import usage +from usage.models.expand import Expand +from usage.models.get_usage200_response import GetUsage200Response +from usage.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 = usage.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 = usage.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with usage.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = usage.UsageApi(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) + expand = [usage.Expand()] # List[Expand] | Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. (optional) + + try: + # Get usage information for the last month + api_response = api_instance.get_usage(aid=aid, expand=expand) + print("The response of UsageApi->get_usage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsageApi->get_usage: %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] + **expand** | [**List[Expand]**](Expand.md)| Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. | [optional] + +### Return type + +[**GetUsage200Response**](GetUsage200Response.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) + diff --git a/usage_api/docs/UsageUsage.md b/usage/docs/UsageUsage.md similarity index 96% rename from usage_api/docs/UsageUsage.md rename to usage/docs/UsageUsage.md index 7f26404d..4dffe310 100644 --- a/usage_api/docs/UsageUsage.md +++ b/usage/docs/UsageUsage.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **quota** | [**UsageUsageQuota**](UsageUsageQuota.md) | | [optional] @@ -25,19 +26,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.usage_usage import UsageUsage +from usage.models.usage_usage import UsageUsage # TODO update the JSON string below json = "{}" # create an instance of UsageUsage from a JSON string usage_usage_instance = UsageUsage.from_json(json) # print the JSON string representation of the object -print UsageUsage.to_json() +print(UsageUsage.to_json()) # convert the object into a dict usage_usage_dict = usage_usage_instance.to_dict() # create an instance of UsageUsage from a dict -usage_usage_form_dict = usage_usage.from_dict(usage_usage_dict) +usage_usage_from_dict = UsageUsage.from_dict(usage_usage_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/usage_api/docs/UsageUsageQuota.md b/usage/docs/UsageUsageQuota.md similarity index 90% rename from usage_api/docs/UsageUsageQuota.md rename to usage/docs/UsageUsageQuota.md index f4af33fa..967aeb8d 100644 --- a/usage_api/docs/UsageUsageQuota.md +++ b/usage/docs/UsageUsageQuota.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **month_start** | **datetime** | Beginning of usage period in UTC (ISO date-time format). | [optional] @@ -15,19 +16,19 @@ Name | Type | Description | Notes ## Example ```python -from usage_api.models.usage_usage_quota import UsageUsageQuota +from usage.models.usage_usage_quota import UsageUsageQuota # TODO update the JSON string below json = "{}" # create an instance of UsageUsageQuota from a JSON string usage_usage_quota_instance = UsageUsageQuota.from_json(json) # print the JSON string representation of the object -print UsageUsageQuota.to_json() +print(UsageUsageQuota.to_json()) # convert the object into a dict usage_usage_quota_dict = usage_usage_quota_instance.to_dict() # create an instance of UsageUsageQuota from a dict -usage_usage_quota_form_dict = usage_usage_quota.from_dict(usage_usage_quota_dict) +usage_usage_quota_from_dict = UsageUsageQuota.from_dict(usage_usage_quota_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/usage/docs/ValidationError.md b/usage/docs/ValidationError.md new file mode 100644 index 00000000..dcd0da33 --- /dev/null +++ b/usage/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[ValidationErrorAllOfErrors]**](ValidationErrorAllOfErrors.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from usage.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/usage/docs/ValidationErrorAllOfErrors.md b/usage/docs/ValidationErrorAllOfErrors.md new file mode 100644 index 00000000..9bcc5be6 --- /dev/null +++ b/usage/docs/ValidationErrorAllOfErrors.md @@ -0,0 +1,31 @@ +# ValidationErrorAllOfErrors + + +## 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** | **int** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from usage.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorAllOfErrors from a JSON string +validation_error_all_of_errors_instance = ValidationErrorAllOfErrors.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorAllOfErrors.to_json()) + +# convert the object into a dict +validation_error_all_of_errors_dict = validation_error_all_of_errors_instance.to_dict() +# create an instance of ValidationErrorAllOfErrors from a dict +validation_error_all_of_errors_from_dict = ValidationErrorAllOfErrors.from_dict(validation_error_all_of_errors_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/usage/pyproject.toml b/usage/pyproject.toml new file mode 100644 index 00000000..b29c8af6 --- /dev/null +++ b/usage/pyproject.toml @@ -0,0 +1,71 @@ +[tool.poetry] +name = "usage" +version = "1.0.0" +description = "Usage API" +authors = ["ThousandEyes API Team "] +license = "NoLicense" +readme = "README.md" +repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +keywords = ["OpenAPI", "OpenAPI-Generator", "Usage API"] +include = ["usage/py.typed"] + +[tool.poetry.dependencies] +python = "^3.7" + +urllib3 = ">= 1.25.3" +python-dateutil = ">=2.8.2" +pydantic = ">=2" +typing-extensions = ">=4.7.1" + +[tool.poetry.dev-dependencies] +pytest = ">=7.2.1" +tox = ">=3.9.0" +flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "usage", + #"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/usage/requirements.txt b/usage/requirements.txt new file mode 100644 index 00000000..cc85509e --- /dev/null +++ b/usage/requirements.txt @@ -0,0 +1,5 @@ +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.25.3, < 2.1.0 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/usage/setup.cfg b/usage/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/usage/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/usage/setup.py b/usage/setup.py new file mode 100644 index 00000000..1c75a38a --- /dev/null +++ b/usage/setup.py @@ -0,0 +1,49 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from setuptools import setup, find_packages # noqa: H301 + +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools +NAME = "usage" +VERSION = "1.0.0" +PYTHON_REQUIRES = ">=3.7" +REQUIRES = [ + "urllib3 >= 1.25.3, < 2.1.0", + "python-dateutil", + "pydantic >= 2", + "typing-extensions >= 4.7.1", +] + +setup( + name=NAME, + version=VERSION, + description="Usage API", + author="ThousandEyes API Team", + author_email="api-team@thousandeyes.com", + url="https://github.com/thousandeyes/thousandeyes-sdk-python/usage", + keywords=["OpenAPI", "OpenAPI-Generator", "ThousandEyes", "Usage API"], + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description_content_type='text/markdown', + long_description="""\ + 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. + """, # noqa: E501 + package_data={"usage": ["py.typed"]}, +) diff --git a/usage/test-requirements.txt b/usage/test-requirements.txt new file mode 100644 index 00000000..8e6d8cb1 --- /dev/null +++ b/usage/test-requirements.txt @@ -0,0 +1,5 @@ +pytest~=7.1.3 +pytest-cov>=2.8.1 +pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/usage/test/__init__.py b/usage/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/usage/test/test_account_group.py b/usage/test/test_account_group.py new file mode 100644 index 00000000..c3aefc5e --- /dev/null +++ b/usage/test/test_account_group.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.account_group import AccountGroup + +class TestAccountGroup(unittest.TestCase): + """AccountGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroup: + """Test AccountGroup + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroup` + """ + model = AccountGroup() + if include_optional: + return AccountGroup( + aid = '1234', + account_group_name = 'Account A' + ) + else: + return AccountGroup( + ) + """ + + def testAccountGroup(self): + """Test AccountGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_account_group_id.py b/usage/test/test_account_group_id.py new file mode 100644 index 00000000..25204f70 --- /dev/null +++ b/usage/test/test_account_group_id.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.account_group_id import AccountGroupId + +class TestAccountGroupId(unittest.TestCase): + """AccountGroupId unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupId: + """Test AccountGroupId + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupId` + """ + model = AccountGroupId() + if include_optional: + return AccountGroupId( + aid = '1234' + ) + else: + return AccountGroupId( + ) + """ + + def testAccountGroupId(self): + """Test AccountGroupId""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_account_group_quota.py b/usage/test/test_account_group_quota.py new file mode 100644 index 00000000..737f5509 --- /dev/null +++ b/usage/test/test_account_group_quota.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.account_group_quota import AccountGroupQuota + +class TestAccountGroupQuota(unittest.TestCase): + """AccountGroupQuota unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccountGroupQuota: + """Test AccountGroupQuota + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccountGroupQuota` + """ + model = AccountGroupQuota() + if include_optional: + return AccountGroupQuota( + value = 12000, + aid = '1234' + ) + else: + return AccountGroupQuota( + ) + """ + + def testAccountGroupQuota(self): + """Test AccountGroupQuota""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_endpoint_agents_embedded_inner.py b/usage/test/test_endpoint_agents_embedded_inner.py new file mode 100644 index 00000000..cf5ff10a --- /dev/null +++ b/usage/test/test_endpoint_agents_embedded_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner + +class TestEndpointAgentsEmbeddedInner(unittest.TestCase): + """EndpointAgentsEmbeddedInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentsEmbeddedInner: + """Test EndpointAgentsEmbeddedInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentsEmbeddedInner` + """ + model = EndpointAgentsEmbeddedInner() + if include_optional: + return EndpointAgentsEmbeddedInner( + aid = None, + account_group_name = None, + endpoint_agents_embedded_used = 56 + ) + else: + return EndpointAgentsEmbeddedInner( + ) + """ + + def testEndpointAgentsEmbeddedInner(self): + """Test EndpointAgentsEmbeddedInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_endpoint_agents_essentials_inner.py b/usage/test/test_endpoint_agents_essentials_inner.py new file mode 100644 index 00000000..f6c926b4 --- /dev/null +++ b/usage/test/test_endpoint_agents_essentials_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner + +class TestEndpointAgentsEssentialsInner(unittest.TestCase): + """EndpointAgentsEssentialsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentsEssentialsInner: + """Test EndpointAgentsEssentialsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentsEssentialsInner` + """ + model = EndpointAgentsEssentialsInner() + if include_optional: + return EndpointAgentsEssentialsInner( + aid = None, + account_group_name = None, + endpoint_agents_essentials_used = 56 + ) + else: + return EndpointAgentsEssentialsInner( + ) + """ + + def testEndpointAgentsEssentialsInner(self): + """Test EndpointAgentsEssentialsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_endpoint_agents_inner.py b/usage/test/test_endpoint_agents_inner.py new file mode 100644 index 00000000..7213aa48 --- /dev/null +++ b/usage/test/test_endpoint_agents_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.endpoint_agents_inner import EndpointAgentsInner + +class TestEndpointAgentsInner(unittest.TestCase): + """EndpointAgentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EndpointAgentsInner: + """Test EndpointAgentsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EndpointAgentsInner` + """ + model = EndpointAgentsInner() + if include_optional: + return EndpointAgentsInner( + aid = None, + account_group_name = None, + endpoint_agents_used = 56 + ) + else: + return EndpointAgentsInner( + ) + """ + + def testEndpointAgentsInner(self): + """Test EndpointAgentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_enterprise_agent_units_by_test_owner_account_group.py b/usage/test/test_enterprise_agent_units_by_test_owner_account_group.py new file mode 100644 index 00000000..d1a909e4 --- /dev/null +++ b/usage/test/test_enterprise_agent_units_by_test_owner_account_group.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.enterprise_agent_units_by_test_owner_account_group import EnterpriseAgentUnitsByTestOwnerAccountGroup + +class TestEnterpriseAgentUnitsByTestOwnerAccountGroup(unittest.TestCase): + """EnterpriseAgentUnitsByTestOwnerAccountGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentUnitsByTestOwnerAccountGroup: + """Test EnterpriseAgentUnitsByTestOwnerAccountGroup + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentUnitsByTestOwnerAccountGroup` + """ + model = EnterpriseAgentUnitsByTestOwnerAccountGroup() + if include_optional: + return EnterpriseAgentUnitsByTestOwnerAccountGroup( + breakdowns = [ + null + ] + ) + else: + return EnterpriseAgentUnitsByTestOwnerAccountGroup( + ) + """ + + def testEnterpriseAgentUnitsByTestOwnerAccountGroup(self): + """Test EnterpriseAgentUnitsByTestOwnerAccountGroup""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py b/usage/test/test_enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py new file mode 100644 index 00000000..f340c053 --- /dev/null +++ b/usage/test/test_enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.enterprise_agent_units_by_test_owner_account_group_breakdowns_inner import EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner + +class TestEnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner(unittest.TestCase): + """EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner: + """Test EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner` + """ + model = EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner() + if include_optional: + return EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner( + aid = '', + account_group_name = '', + agent_id = '', + agent_name = '', + enterprise_units_used = 56, + enterprise_units_projected = 56, + vagent_id = '' + ) + else: + return EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner( + ) + """ + + def testEnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner(self): + """Test EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_enterprise_agent_units_inner.py b/usage/test/test_enterprise_agent_units_inner.py new file mode 100644 index 00000000..e0a916c5 --- /dev/null +++ b/usage/test/test_enterprise_agent_units_inner.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner + +class TestEnterpriseAgentUnitsInner(unittest.TestCase): + """EnterpriseAgentUnitsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentUnitsInner: + """Test EnterpriseAgentUnitsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentUnitsInner` + """ + model = EnterpriseAgentUnitsInner() + if include_optional: + return EnterpriseAgentUnitsInner( + aid = None, + account_group_name = None, + agent_id = '', + agent_name = '', + enterprise_units_used = 56, + enterprise_units_projected = 56, + vagent_id = '' + ) + else: + return EnterpriseAgentUnitsInner( + ) + """ + + def testEnterpriseAgentUnitsInner(self): + """Test EnterpriseAgentUnitsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_enterprise_agents_inner.py b/usage/test/test_enterprise_agents_inner.py new file mode 100644 index 00000000..e84df323 --- /dev/null +++ b/usage/test/test_enterprise_agents_inner.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.enterprise_agents_inner import EnterpriseAgentsInner + +class TestEnterpriseAgentsInner(unittest.TestCase): + """EnterpriseAgentsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnterpriseAgentsInner: + """Test EnterpriseAgentsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EnterpriseAgentsInner` + """ + model = EnterpriseAgentsInner() + if include_optional: + return EnterpriseAgentsInner( + aid = None, + account_group_name = None, + enterprise_agents_used = 56 + ) + else: + return EnterpriseAgentsInner( + ) + """ + + def testEnterpriseAgentsInner(self): + """Test EnterpriseAgentsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_error.py b/usage/test/test_error.py new file mode 100644 index 00000000..23ccab94 --- /dev/null +++ b/usage/test/test_error.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.error import Error + +class TestError(unittest.TestCase): + """Error unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Error: + """Test Error + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Error` + """ + model = Error() + if include_optional: + return Error( + type = '', + title = '', + status = 56, + detail = '', + instance = '' + ) + else: + return Error( + ) + """ + + def testError(self): + """Test Error""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_expand.py b/usage/test/test_expand.py new file mode 100644 index 00000000..b030b744 --- /dev/null +++ b/usage/test/test_expand.py @@ -0,0 +1,33 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.expand import Expand + +class TestExpand(unittest.TestCase): + """Expand unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testExpand(self): + """Test Expand""" + # inst = Expand() + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_get_enterprise_agents_units_usage200_response.py b/usage/test/test_get_enterprise_agents_units_usage200_response.py new file mode 100644 index 00000000..82c0264c --- /dev/null +++ b/usage/test/test_get_enterprise_agents_units_usage200_response.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.get_enterprise_agents_units_usage200_response import GetEnterpriseAgentsUnitsUsage200Response + +class TestGetEnterpriseAgentsUnitsUsage200Response(unittest.TestCase): + """GetEnterpriseAgentsUnitsUsage200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetEnterpriseAgentsUnitsUsage200Response: + """Test GetEnterpriseAgentsUnitsUsage200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetEnterpriseAgentsUnitsUsage200Response` + """ + model = GetEnterpriseAgentsUnitsUsage200Response() + if include_optional: + return GetEnterpriseAgentsUnitsUsage200Response( + breakdowns = [ + null + ], + links = usage.models.pagination_links__links.PaginationLinks__links( + previous = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetEnterpriseAgentsUnitsUsage200Response( + ) + """ + + def testGetEnterpriseAgentsUnitsUsage200Response(self): + """Test GetEnterpriseAgentsUnitsUsage200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_get_quotas200_response.py b/usage/test/test_get_quotas200_response.py new file mode 100644 index 00000000..e8d05569 --- /dev/null +++ b/usage/test/test_get_quotas200_response.py @@ -0,0 +1,67 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.get_quotas200_response import GetQuotas200Response + +class TestGetQuotas200Response(unittest.TestCase): + """GetQuotas200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetQuotas200Response: + """Test GetQuotas200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetQuotas200Response` + """ + model = GetQuotas200Response() + if include_optional: + return GetQuotas200Response( + quotas = [ + usage.models.quotas_quotas_inner.Quotas_quotas_inner( + organization_quota = usage.models.organization_quota.OrganizationQuota( + value = 22500, + org_id = '10', ), + account_group_quotas = [{"value":12000,"aid":"1234"},{"value":10000,"aid":"12345"}], ) + ], + links = usage.models.self_links__links.SelfLinks__links( + self = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetQuotas200Response( + ) + """ + + def testGetQuotas200Response(self): + """Test GetQuotas200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_get_test_units_usage200_response.py b/usage/test/test_get_test_units_usage200_response.py new file mode 100644 index 00000000..eb1b5d75 --- /dev/null +++ b/usage/test/test_get_test_units_usage200_response.py @@ -0,0 +1,73 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.get_test_units_usage200_response import GetTestUnitsUsage200Response + +class TestGetTestUnitsUsage200Response(unittest.TestCase): + """GetTestUnitsUsage200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetTestUnitsUsage200Response: + """Test GetTestUnitsUsage200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetTestUnitsUsage200Response` + """ + model = GetTestUnitsUsage200Response() + if include_optional: + return GetTestUnitsUsage200Response( + breakdowns = [ + null + ], + links = usage.models.pagination_links__links.PaginationLinks__links( + previous = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return GetTestUnitsUsage200Response( + ) + """ + + def testGetTestUnitsUsage200Response(self): + """Test GetTestUnitsUsage200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_get_usage200_response.py b/usage/test/test_get_usage200_response.py new file mode 100644 index 00000000..b97ab99c --- /dev/null +++ b/usage/test/test_get_usage200_response.py @@ -0,0 +1,85 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.get_usage200_response import GetUsage200Response + +class TestGetUsage200Response(unittest.TestCase): + """GetUsage200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetUsage200Response: + """Test GetUsage200Response + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetUsage200Response` + """ + model = GetUsage200Response() + if include_optional: + return GetUsage200Response( + usage = usage.models.usage_usage.Usage_usage( + quota = usage.models.usage_usage_quota.Usage_usage_quota( + month_start = '2020-01-05T08:00Z', + month_end = '2020-02-05T08:00Z', + cloud_units_included = 4320000000, + endpoint_agents_included = 200, + endpoint_agents_essentials_included = 10, + endpoint_agents_embedded_included = 10, + enterprise_agents_included = 25, ), + cloud_units_used = 8500489, + cloud_units_projected = 20993812, + cloud_units_next_billing_period = 25123456, + enterprise_units_used = 79640902, + enterprise_units_projected = 108016317, + enterprise_units_next_billing_period = 0, + endpoint_agents_used = 42, + endpoint_agents_essentials_used = 5, + endpoint_agents_embedded_used = 5, + enterprise_agents_used = 58, + enterprise_agent_units = [{"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"}], + 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}], + endpoint_agents = [{"aid":"1234","accountGroupName":"Support","endpointAgentsUsed":22},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsUsed":14}], + endpoint_agents_essentials = [{"aid":"1234","accountGroupName":"Support","endpointAgentsEssentialsUsed":2},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsEssentialsUsed":3}], + endpoint_agents_embedded = [{"aid":"1234","accountGroupName":"Support","endpointAgentsEmbeddedUsed":2},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsEmbeddedUsed":3}], + enterprise_agents = [{"aid":"1234","accountGroupName":"Support","enterpriseAgentsUsed":7},{"aid":"12345","accountGroupName":"Documentation","enterpriseAgentsUsed":1}], ), + links = usage.models.self_links__links.SelfLinks__links( + self = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return GetUsage200Response( + ) + """ + + def testGetUsage200Response(self): + """Test GetUsage200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_link.py b/usage/test/test_link.py new file mode 100644 index 00000000..44fa828c --- /dev/null +++ b/usage/test/test_link.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.link import Link + +class TestLink(unittest.TestCase): + """Link unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Link: + """Test Link + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Link` + """ + model = Link() + if include_optional: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '' + ) + else: + return Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + ) + """ + + def testLink(self): + """Test Link""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_organization_quota.py b/usage/test/test_organization_quota.py new file mode 100644 index 00000000..d65ad124 --- /dev/null +++ b/usage/test/test_organization_quota.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.organization_quota import OrganizationQuota + +class TestOrganizationQuota(unittest.TestCase): + """OrganizationQuota unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationQuota: + """Test OrganizationQuota + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationQuota` + """ + model = OrganizationQuota() + if include_optional: + return OrganizationQuota( + value = 22500, + org_id = '10' + ) + else: + return OrganizationQuota( + value = 22500, + ) + """ + + def testOrganizationQuota(self): + """Test OrganizationQuota""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_organizations_quotas_assign.py b/usage/test/test_organizations_quotas_assign.py new file mode 100644 index 00000000..38864ba3 --- /dev/null +++ b/usage/test/test_organizations_quotas_assign.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.organizations_quotas_assign import OrganizationsQuotasAssign + +class TestOrganizationsQuotasAssign(unittest.TestCase): + """OrganizationsQuotasAssign unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationsQuotasAssign: + """Test OrganizationsQuotasAssign + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationsQuotasAssign` + """ + model = OrganizationsQuotasAssign() + if include_optional: + return OrganizationsQuotasAssign( + organizations = [ + usage.models.organizations_quotas_assign_organizations_inner.OrganizationsQuotasAssign_organizations_inner( + org_id = '1234', + account_groups = [ + usage.models.account_group_quota.AccountGroupQuota( + value = 12000, + aid = '1234', ) + ], ) + ] + ) + else: + return OrganizationsQuotasAssign( + ) + """ + + def testOrganizationsQuotasAssign(self): + """Test OrganizationsQuotasAssign""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_organizations_quotas_assign_organizations_inner.py b/usage/test/test_organizations_quotas_assign_organizations_inner.py new file mode 100644 index 00000000..31640a8c --- /dev/null +++ b/usage/test/test_organizations_quotas_assign_organizations_inner.py @@ -0,0 +1,56 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner + +class TestOrganizationsQuotasAssignOrganizationsInner(unittest.TestCase): + """OrganizationsQuotasAssignOrganizationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationsQuotasAssignOrganizationsInner: + """Test OrganizationsQuotasAssignOrganizationsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationsQuotasAssignOrganizationsInner` + """ + model = OrganizationsQuotasAssignOrganizationsInner() + if include_optional: + return OrganizationsQuotasAssignOrganizationsInner( + org_id = '1234', + account_groups = [ + usage.models.account_group_quota.AccountGroupQuota( + value = 12000, + aid = '1234', ) + ] + ) + else: + return OrganizationsQuotasAssignOrganizationsInner( + ) + """ + + def testOrganizationsQuotasAssignOrganizationsInner(self): + """Test OrganizationsQuotasAssignOrganizationsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_organizations_quotas_unassign.py b/usage/test/test_organizations_quotas_unassign.py new file mode 100644 index 00000000..5b6db29e --- /dev/null +++ b/usage/test/test_organizations_quotas_unassign.py @@ -0,0 +1,55 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.organizations_quotas_unassign import OrganizationsQuotasUnassign + +class TestOrganizationsQuotasUnassign(unittest.TestCase): + """OrganizationsQuotasUnassign unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationsQuotasUnassign: + """Test OrganizationsQuotasUnassign + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationsQuotasUnassign` + """ + model = OrganizationsQuotasUnassign() + if include_optional: + return OrganizationsQuotasUnassign( + organizations = [ + usage.models.organizations_quotas_unassign_organizations_inner.OrganizationsQuotasUnassign_organizations_inner( + org_id = '1234', + account_groups = ["1234","12345"], ) + ] + ) + else: + return OrganizationsQuotasUnassign( + ) + """ + + def testOrganizationsQuotasUnassign(self): + """Test OrganizationsQuotasUnassign""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_organizations_quotas_unassign_organizations_inner.py b/usage/test/test_organizations_quotas_unassign_organizations_inner.py new file mode 100644 index 00000000..1e756d2b --- /dev/null +++ b/usage/test/test_organizations_quotas_unassign_organizations_inner.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner + +class TestOrganizationsQuotasUnassignOrganizationsInner(unittest.TestCase): + """OrganizationsQuotasUnassignOrganizationsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrganizationsQuotasUnassignOrganizationsInner: + """Test OrganizationsQuotasUnassignOrganizationsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrganizationsQuotasUnassignOrganizationsInner` + """ + model = OrganizationsQuotasUnassignOrganizationsInner() + if include_optional: + return OrganizationsQuotasUnassignOrganizationsInner( + org_id = '1234', + account_groups = ["1234","12345"] + ) + else: + return OrganizationsQuotasUnassignOrganizationsInner( + ) + """ + + def testOrganizationsQuotasUnassignOrganizationsInner(self): + """Test OrganizationsQuotasUnassignOrganizationsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_pagination_links.py b/usage/test/test_pagination_links.py new file mode 100644 index 00000000..ee0654bd --- /dev/null +++ b/usage/test/test_pagination_links.py @@ -0,0 +1,70 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.pagination_links import PaginationLinks + +class TestPaginationLinks(unittest.TestCase): + """PaginationLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinks: + """Test PaginationLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinks` + """ + model = PaginationLinks() + if include_optional: + return PaginationLinks( + links = usage.models.pagination_links__links.PaginationLinks__links( + previous = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + self = , ) + ) + else: + return PaginationLinks( + ) + """ + + def testPaginationLinks(self): + """Test PaginationLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_pagination_links_links.py b/usage/test/test_pagination_links_links.py new file mode 100644 index 00000000..92c71f38 --- /dev/null +++ b/usage/test/test_pagination_links_links.py @@ -0,0 +1,77 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.pagination_links_links import PaginationLinksLinks + +class TestPaginationLinksLinks(unittest.TestCase): + """PaginationLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PaginationLinksLinks: + """Test PaginationLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PaginationLinksLinks` + """ + model = PaginationLinksLinks() + if include_optional: + return PaginationLinksLinks( + previous = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + next = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), + var_self = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return PaginationLinksLinks( + ) + """ + + def testPaginationLinksLinks(self): + """Test PaginationLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_quotas.py b/usage/test/test_quotas.py new file mode 100644 index 00000000..369fa44b --- /dev/null +++ b/usage/test/test_quotas.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.quotas import Quotas + +class TestQuotas(unittest.TestCase): + """Quotas unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Quotas: + """Test Quotas + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Quotas` + """ + model = Quotas() + if include_optional: + return Quotas( + quotas = [ + usage.models.quotas_quotas_inner.Quotas_quotas_inner( + organization_quota = usage.models.organization_quota.OrganizationQuota( + value = 22500, + org_id = '10', ), + account_group_quotas = [{"value":12000,"aid":"1234"},{"value":10000,"aid":"12345"}], ) + ] + ) + else: + return Quotas( + ) + """ + + def testQuotas(self): + """Test Quotas""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_quotas_assign_request.py b/usage/test/test_quotas_assign_request.py new file mode 100644 index 00000000..f0756365 --- /dev/null +++ b/usage/test/test_quotas_assign_request.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.quotas_assign_request import QuotasAssignRequest + +class TestQuotasAssignRequest(unittest.TestCase): + """QuotasAssignRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuotasAssignRequest: + """Test QuotasAssignRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QuotasAssignRequest` + """ + model = QuotasAssignRequest() + if include_optional: + return QuotasAssignRequest( + organizations = [{"value":12000},{"orgId":"1234","value":10000}] + ) + else: + return QuotasAssignRequest( + ) + """ + + def testQuotasAssignRequest(self): + """Test QuotasAssignRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_quotas_assign_response.py b/usage/test/test_quotas_assign_response.py new file mode 100644 index 00000000..066fcae8 --- /dev/null +++ b/usage/test/test_quotas_assign_response.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.quotas_assign_response import QuotasAssignResponse + +class TestQuotasAssignResponse(unittest.TestCase): + """QuotasAssignResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuotasAssignResponse: + """Test QuotasAssignResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QuotasAssignResponse` + """ + model = QuotasAssignResponse() + if include_optional: + return QuotasAssignResponse( + organizations = [{"orgId":"1234","value":12000},{"orgId":"12345","value":10000}] + ) + else: + return QuotasAssignResponse( + ) + """ + + def testQuotasAssignResponse(self): + """Test QuotasAssignResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_quotas_quotas_inner.py b/usage/test/test_quotas_quotas_inner.py new file mode 100644 index 00000000..c4643861 --- /dev/null +++ b/usage/test/test_quotas_quotas_inner.py @@ -0,0 +1,54 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.quotas_quotas_inner import QuotasQuotasInner + +class TestQuotasQuotasInner(unittest.TestCase): + """QuotasQuotasInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuotasQuotasInner: + """Test QuotasQuotasInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QuotasQuotasInner` + """ + model = QuotasQuotasInner() + if include_optional: + return QuotasQuotasInner( + organization_quota = usage.models.organization_quota.OrganizationQuota( + value = 22500, + org_id = '10', ), + account_group_quotas = [{"value":12000,"aid":"1234"},{"value":10000,"aid":"12345"}] + ) + else: + return QuotasQuotasInner( + ) + """ + + def testQuotasQuotasInner(self): + """Test QuotasQuotasInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_quotas_unassign.py b/usage/test/test_quotas_unassign.py new file mode 100644 index 00000000..149afc43 --- /dev/null +++ b/usage/test/test_quotas_unassign.py @@ -0,0 +1,51 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.quotas_unassign import QuotasUnassign + +class TestQuotasUnassign(unittest.TestCase): + """QuotasUnassign unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QuotasUnassign: + """Test QuotasUnassign + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `QuotasUnassign` + """ + model = QuotasUnassign() + if include_optional: + return QuotasUnassign( + organizations = ["1234","12345"] + ) + else: + return QuotasUnassign( + ) + """ + + def testQuotasUnassign(self): + """Test QuotasUnassign""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_self_links.py b/usage/test/test_self_links.py new file mode 100644 index 00000000..7c8d319b --- /dev/null +++ b/usage/test/test_self_links.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.self_links import SelfLinks + +class TestSelfLinks(unittest.TestCase): + """SelfLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinks: + """Test SelfLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinks` + """ + model = SelfLinks() + if include_optional: + return SelfLinks( + links = usage.models.self_links__links.SelfLinks__links( + self = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ), ) + ) + else: + return SelfLinks( + ) + """ + + def testSelfLinks(self): + """Test SelfLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_self_links_links.py b/usage/test/test_self_links_links.py new file mode 100644 index 00000000..a82b8def --- /dev/null +++ b/usage/test/test_self_links_links.py @@ -0,0 +1,59 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.self_links_links import SelfLinksLinks + +class TestSelfLinksLinks(unittest.TestCase): + """SelfLinksLinks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SelfLinksLinks: + """Test SelfLinksLinks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SelfLinksLinks` + """ + model = SelfLinksLinks() + if include_optional: + return SelfLinksLinks( + var_self = usage.models.link.Link( + href = 'https://api.thousandeyes.com/v7/link/to/resource/id', + templated = True, + type = '', + deprecation = '', + name = '', + profile = '', + title = '', + hreflang = '', ) + ) + else: + return SelfLinksLinks( + ) + """ + + def testSelfLinksLinks(self): + """Test SelfLinksLinks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_tests_inner.py b/usage/test/test_tests_inner.py new file mode 100644 index 00000000..d0505ba4 --- /dev/null +++ b/usage/test/test_tests_inner.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.tests_inner import TestsInner + +class TestTestsInner(unittest.TestCase): + """TestsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TestsInner: + """Test TestsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TestsInner` + """ + model = TestsInner() + if include_optional: + return TestsInner( + aid = '', + account_group_name = '', + test_id = '', + test_name = '', + test_type = '', + cloud_units_used = 56, + cloud_units_projected = 56 + ) + else: + return TestsInner( + ) + """ + + def testTestsInner(self): + """Test TestsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_unauthorized_error.py b/usage/test/test_unauthorized_error.py new file mode 100644 index 00000000..6ed442a0 --- /dev/null +++ b/usage/test/test_unauthorized_error.py @@ -0,0 +1,52 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.unauthorized_error import UnauthorizedError + +class TestUnauthorizedError(unittest.TestCase): + """UnauthorizedError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnauthorizedError: + """Test UnauthorizedError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnauthorizedError` + """ + model = UnauthorizedError() + if include_optional: + return UnauthorizedError( + error = 'invalid_token', + error_description = 'Invalid access token' + ) + else: + return UnauthorizedError( + ) + """ + + def testUnauthorizedError(self): + """Test UnauthorizedError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_units_by_tests.py b/usage/test/test_units_by_tests.py new file mode 100644 index 00000000..aa2d1aca --- /dev/null +++ b/usage/test/test_units_by_tests.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.units_by_tests import UnitsByTests + +class TestUnitsByTests(unittest.TestCase): + """UnitsByTests unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnitsByTests: + """Test UnitsByTests + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnitsByTests` + """ + model = UnitsByTests() + if include_optional: + return UnitsByTests( + breakdowns = [ + null + ] + ) + else: + return UnitsByTests( + ) + """ + + def testUnitsByTests(self): + """Test UnitsByTests""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_units_by_tests_breakdowns_inner.py b/usage/test/test_units_by_tests_breakdowns_inner.py new file mode 100644 index 00000000..bbbe6fa0 --- /dev/null +++ b/usage/test/test_units_by_tests_breakdowns_inner.py @@ -0,0 +1,60 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.units_by_tests_breakdowns_inner import UnitsByTestsBreakdownsInner + +class TestUnitsByTestsBreakdownsInner(unittest.TestCase): + """UnitsByTestsBreakdownsInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnitsByTestsBreakdownsInner: + """Test UnitsByTestsBreakdownsInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnitsByTestsBreakdownsInner` + """ + model = UnitsByTestsBreakdownsInner() + if include_optional: + return UnitsByTestsBreakdownsInner( + aid = '', + account_group_name = '', + enterprise_units_used = 56, + enterprise_units_projected = 56, + cloud_units_used = 56, + cloud_units_projected = 56, + test_id = '', + test_name = '', + test_type = '', + is_instant_test = True + ) + else: + return UnitsByTestsBreakdownsInner( + ) + """ + + def testUnitsByTestsBreakdownsInner(self): + """Test UnitsByTestsBreakdownsInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_usage.py b/usage/test/test_usage.py new file mode 100644 index 00000000..3635ac41 --- /dev/null +++ b/usage/test/test_usage.py @@ -0,0 +1,75 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.usage import Usage + +class TestUsage(unittest.TestCase): + """Usage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Usage: + """Test Usage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Usage` + """ + model = Usage() + if include_optional: + return Usage( + usage = usage.models.usage_usage.Usage_usage( + quota = usage.models.usage_usage_quota.Usage_usage_quota( + month_start = '2020-01-05T08:00Z', + month_end = '2020-02-05T08:00Z', + cloud_units_included = 4320000000, + endpoint_agents_included = 200, + endpoint_agents_essentials_included = 10, + endpoint_agents_embedded_included = 10, + enterprise_agents_included = 25, ), + cloud_units_used = 8500489, + cloud_units_projected = 20993812, + cloud_units_next_billing_period = 25123456, + enterprise_units_used = 79640902, + enterprise_units_projected = 108016317, + enterprise_units_next_billing_period = 0, + endpoint_agents_used = 42, + endpoint_agents_essentials_used = 5, + endpoint_agents_embedded_used = 5, + enterprise_agents_used = 58, + enterprise_agent_units = [{"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"}], + 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}], + endpoint_agents = [{"aid":"1234","accountGroupName":"Support","endpointAgentsUsed":22},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsUsed":14}], + endpoint_agents_essentials = [{"aid":"1234","accountGroupName":"Support","endpointAgentsEssentialsUsed":2},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsEssentialsUsed":3}], + endpoint_agents_embedded = [{"aid":"1234","accountGroupName":"Support","endpointAgentsEmbeddedUsed":2},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsEmbeddedUsed":3}], + enterprise_agents = [{"aid":"1234","accountGroupName":"Support","enterpriseAgentsUsed":7},{"aid":"12345","accountGroupName":"Documentation","enterpriseAgentsUsed":1}], ) + ) + else: + return Usage( + ) + """ + + def testUsage(self): + """Test Usage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_usage_usage.py b/usage/test/test_usage_usage.py new file mode 100644 index 00000000..083fcf23 --- /dev/null +++ b/usage/test/test_usage_usage.py @@ -0,0 +1,74 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.usage_usage import UsageUsage + +class TestUsageUsage(unittest.TestCase): + """UsageUsage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UsageUsage: + """Test UsageUsage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UsageUsage` + """ + model = UsageUsage() + if include_optional: + return UsageUsage( + quota = usage.models.usage_usage_quota.Usage_usage_quota( + month_start = '2020-01-05T08:00Z', + month_end = '2020-02-05T08:00Z', + cloud_units_included = 4320000000, + endpoint_agents_included = 200, + endpoint_agents_essentials_included = 10, + endpoint_agents_embedded_included = 10, + enterprise_agents_included = 25, ), + cloud_units_used = 8500489, + cloud_units_projected = 20993812, + cloud_units_next_billing_period = 25123456, + enterprise_units_used = 79640902, + enterprise_units_projected = 108016317, + enterprise_units_next_billing_period = 0, + endpoint_agents_used = 42, + endpoint_agents_essentials_used = 5, + endpoint_agents_embedded_used = 5, + enterprise_agents_used = 58, + enterprise_agent_units = [{"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"}], + 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}], + endpoint_agents = [{"aid":"1234","accountGroupName":"Support","endpointAgentsUsed":22},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsUsed":14}], + endpoint_agents_essentials = [{"aid":"1234","accountGroupName":"Support","endpointAgentsEssentialsUsed":2},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsEssentialsUsed":3}], + endpoint_agents_embedded = [{"aid":"1234","accountGroupName":"Support","endpointAgentsEmbeddedUsed":2},{"aid":"12345","accountGroupName":"Documentation","endpointAgentsEmbeddedUsed":3}], + enterprise_agents = [{"aid":"1234","accountGroupName":"Support","enterpriseAgentsUsed":7},{"aid":"12345","accountGroupName":"Documentation","enterpriseAgentsUsed":1}] + ) + else: + return UsageUsage( + ) + """ + + def testUsageUsage(self): + """Test UsageUsage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_usage_usage_quota.py b/usage/test/test_usage_usage_quota.py new file mode 100644 index 00000000..65addfc6 --- /dev/null +++ b/usage/test/test_usage_usage_quota.py @@ -0,0 +1,57 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.usage_usage_quota import UsageUsageQuota + +class TestUsageUsageQuota(unittest.TestCase): + """UsageUsageQuota unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UsageUsageQuota: + """Test UsageUsageQuota + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UsageUsageQuota` + """ + model = UsageUsageQuota() + if include_optional: + return UsageUsageQuota( + month_start = '2020-01-05T08:00Z', + month_end = '2020-02-05T08:00Z', + cloud_units_included = 4320000000, + endpoint_agents_included = 200, + endpoint_agents_essentials_included = 10, + endpoint_agents_embedded_included = 10, + enterprise_agents_included = 25 + ) + else: + return UsageUsageQuota( + ) + """ + + def testUsageUsageQuota(self): + """Test UsageUsageQuota""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_validation_error.py b/usage/test/test_validation_error.py new file mode 100644 index 00000000..a136ce8a --- /dev/null +++ b/usage/test/test_validation_error.py @@ -0,0 +1,61 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.validation_error import ValidationError + +class TestValidationError(unittest.TestCase): + """ValidationError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationError: + """Test ValidationError + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationError` + """ + model = ValidationError() + if include_optional: + return ValidationError( + type = '', + title = '', + status = 56, + detail = '', + instance = '', + errors = [ + usage.models.validation_error_all_of_errors.ValidationError_allOf_errors( + code = '', + field = 56, + message = '', ) + ] + ) + else: + return ValidationError( + ) + """ + + def testValidationError(self): + """Test ValidationError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/test/test_validation_error_all_of_errors.py b/usage/test/test_validation_error_all_of_errors.py new file mode 100644 index 00000000..a905594a --- /dev/null +++ b/usage/test/test_validation_error_all_of_errors.py @@ -0,0 +1,53 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from usage.models.validation_error_all_of_errors import ValidationErrorAllOfErrors + +class TestValidationErrorAllOfErrors(unittest.TestCase): + """ValidationErrorAllOfErrors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ValidationErrorAllOfErrors: + """Test ValidationErrorAllOfErrors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ValidationErrorAllOfErrors` + """ + model = ValidationErrorAllOfErrors() + if include_optional: + return ValidationErrorAllOfErrors( + code = '', + var_field = 56, + message = '' + ) + else: + return ValidationErrorAllOfErrors( + ) + """ + + def testValidationErrorAllOfErrors(self): + """Test ValidationErrorAllOfErrors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/usage/usage/__init__.py b/usage/usage/__init__.py new file mode 100644 index 00000000..8c83f534 --- /dev/null +++ b/usage/usage/__init__.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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.2 + 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 usage.api.quotas_api import QuotasApi +from usage.api.usage_api import UsageApi + +# import ApiClient +from usage.api_response import ApiResponse +from usage.api_client import ApiClient +from usage.configuration import Configuration +from usage.exceptions import OpenApiException +from usage.exceptions import ApiTypeError +from usage.exceptions import ApiValueError +from usage.exceptions import ApiKeyError +from usage.exceptions import ApiAttributeError +from usage.exceptions import ApiException + +# import models into sdk package +from usage.models.account_group import AccountGroup +from usage.models.account_group_id import AccountGroupId +from usage.models.account_group_quota import AccountGroupQuota +from usage.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner +from usage.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner +from usage.models.endpoint_agents_inner import EndpointAgentsInner +from usage.models.enterprise_agent_units_by_test_owner_account_group import EnterpriseAgentUnitsByTestOwnerAccountGroup +from usage.models.enterprise_agent_units_by_test_owner_account_group_breakdowns_inner import EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner +from usage.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner +from usage.models.enterprise_agents_inner import EnterpriseAgentsInner +from usage.models.error import Error +from usage.models.expand import Expand +from usage.models.get_enterprise_agents_units_usage200_response import GetEnterpriseAgentsUnitsUsage200Response +from usage.models.get_quotas200_response import GetQuotas200Response +from usage.models.get_test_units_usage200_response import GetTestUnitsUsage200Response +from usage.models.get_usage200_response import GetUsage200Response +from usage.models.link import Link +from usage.models.organization_quota import OrganizationQuota +from usage.models.organizations_quotas_assign import OrganizationsQuotasAssign +from usage.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner +from usage.models.organizations_quotas_unassign import OrganizationsQuotasUnassign +from usage.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner +from usage.models.pagination_links import PaginationLinks +from usage.models.pagination_links_links import PaginationLinksLinks +from usage.models.quotas import Quotas +from usage.models.quotas_assign_request import QuotasAssignRequest +from usage.models.quotas_assign_response import QuotasAssignResponse +from usage.models.quotas_quotas_inner import QuotasQuotasInner +from usage.models.quotas_unassign import QuotasUnassign +from usage.models.self_links import SelfLinks +from usage.models.self_links_links import SelfLinksLinks +from usage.models.tests_inner import TestsInner +from usage.models.unauthorized_error import UnauthorizedError +from usage.models.units_by_tests import UnitsByTests +from usage.models.units_by_tests_breakdowns_inner import UnitsByTestsBreakdownsInner +from usage.models.usage import Usage +from usage.models.usage_usage import UsageUsage +from usage.models.usage_usage_quota import UsageUsageQuota +from usage.models.validation_error import ValidationError +from usage.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/usage/usage/api/__init__.py b/usage/usage/api/__init__.py new file mode 100644 index 00000000..449f6c08 --- /dev/null +++ b/usage/usage/api/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa + +# import apis into api package +from usage.api.quotas_api import QuotasApi +from usage.api.usage_api import UsageApi + diff --git a/usage_api/usage_api/api/quotas_api.py b/usage/usage/api/quotas_api.py similarity index 77% rename from usage_api/usage_api/api/quotas_api.py rename to usage/usage/api/quotas_api.py index 0dddf264..b02d1c81 100644 --- a/usage_api/usage_api/api/quotas_api.py +++ b/usage/usage/api/quotas_api.py @@ -3,42 +3,30 @@ """ Usage API - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr from typing import Optional +from usage.models.get_quotas200_response import GetQuotas200Response +from usage.models.organizations_quotas_assign import OrganizationsQuotasAssign +from usage.models.organizations_quotas_unassign import OrganizationsQuotasUnassign +from usage.models.quotas_assign_request import QuotasAssignRequest +from usage.models.quotas_assign_response import QuotasAssignResponse +from usage.models.quotas_unassign import QuotasUnassign -from usage_api.models.get_quotas200_response import GetQuotas200Response -from usage_api.models.organizations_quotas_assign import OrganizationsQuotasAssign -from usage_api.models.organizations_quotas_unassign import OrganizationsQuotasUnassign -from usage_api.models.quotas_assign_request import QuotasAssignRequest -from usage_api.models.quotas_assign_response import QuotasAssignResponse -from usage_api.models.quotas_unassign import QuotasUnassign - -from usage_api.api_client import ApiClient -from usage_api.api_response import ApiResponse -from usage_api.rest import RESTResponseType +from usage.api_client import ApiClient, RequestSerialized +from usage.api_response import ApiResponse +from usage.rest import RESTResponseType class QuotasApi: @@ -57,7 +45,6 @@ class QuotasApi: @validate_call def assign_organizations_account_groups_quotas( 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, organizations_quotas_assign: Optional[OrganizationsQuotasAssign] = None, _request_timeout: Union[ None, @@ -74,10 +61,8 @@ class QuotasApi: ) -> OrganizationsQuotasAssign: """Create or update accout group quotas - Assigns quota values to multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. This endpoint has cumulative behavior: The quotas are assigned to the specified account groups, and the previous assignments persist. No unassignment takes place. This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. + This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. - :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 organizations_quotas_assign: :type organizations_quotas_assign: OrganizationsQuotasAssign :param _request_timeout: timeout setting for this request. If one @@ -103,7 +88,6 @@ class QuotasApi: """ # noqa: E501 _param = self._assign_organizations_account_groups_quotas_serialize( - aid=aid, organizations_quotas_assign=organizations_quotas_assign, _request_auth=_request_auth, _content_type=_content_type, @@ -112,14 +96,13 @@ class QuotasApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OrganizationsQuotasAssign", - '400': "Error", + '200': "OrganizationsQuotasAssign", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -135,7 +118,6 @@ class QuotasApi: @validate_call def assign_organizations_account_groups_quotas_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, organizations_quotas_assign: Optional[OrganizationsQuotasAssign] = None, _request_timeout: Union[ None, @@ -152,10 +134,8 @@ class QuotasApi: ) -> ApiResponse[OrganizationsQuotasAssign]: """Create or update accout group quotas - Assigns quota values to multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. This endpoint has cumulative behavior: The quotas are assigned to the specified account groups, and the previous assignments persist. No unassignment takes place. This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. + This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. - :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 organizations_quotas_assign: :type organizations_quotas_assign: OrganizationsQuotasAssign :param _request_timeout: timeout setting for this request. If one @@ -181,7 +161,6 @@ class QuotasApi: """ # noqa: E501 _param = self._assign_organizations_account_groups_quotas_serialize( - aid=aid, organizations_quotas_assign=organizations_quotas_assign, _request_auth=_request_auth, _content_type=_content_type, @@ -190,14 +169,13 @@ class QuotasApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OrganizationsQuotasAssign", - '400': "Error", + '200': "OrganizationsQuotasAssign", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -213,7 +191,6 @@ class QuotasApi: @validate_call def assign_organizations_account_groups_quotas_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, organizations_quotas_assign: Optional[OrganizationsQuotasAssign] = None, _request_timeout: Union[ None, @@ -230,10 +207,8 @@ class QuotasApi: ) -> RESTResponseType: """Create or update accout group quotas - Assigns quota values to multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. This endpoint has cumulative behavior: The quotas are assigned to the specified account groups, and the previous assignments persist. No unassignment takes place. This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. + This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. - :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 organizations_quotas_assign: :type organizations_quotas_assign: OrganizationsQuotasAssign :param _request_timeout: timeout setting for this request. If one @@ -259,7 +234,6 @@ class QuotasApi: """ # noqa: E501 _param = self._assign_organizations_account_groups_quotas_serialize( - aid=aid, organizations_quotas_assign=organizations_quotas_assign, _request_auth=_request_auth, _content_type=_content_type, @@ -268,14 +242,13 @@ class QuotasApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OrganizationsQuotasAssign", - '400': "Error", + '200': "OrganizationsQuotasAssign", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -286,33 +259,27 @@ class QuotasApi: def _assign_organizations_account_groups_quotas_serialize( self, - aid, organizations_quotas_assign, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 @@ -368,7 +335,6 @@ class QuotasApi: @validate_call def assign_organizations_quotas( 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, quotas_assign_request: Optional[QuotasAssignRequest] = None, _request_timeout: Union[ None, @@ -387,8 +353,6 @@ class QuotasApi: This endpoint recieves a list of organization quotas to create or update. If there's no specific `orgId` defined for a quota, it defaults to using the authenticated organization. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows cumulative behavior––This means that the quotas are assigned to the specified organizations, and any previous assignments remain unchanged; no unassignments occur. - :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 quotas_assign_request: :type quotas_assign_request: QuotasAssignRequest :param _request_timeout: timeout setting for this request. If one @@ -414,7 +378,6 @@ class QuotasApi: """ # noqa: E501 _param = self._assign_organizations_quotas_serialize( - aid=aid, quotas_assign_request=quotas_assign_request, _request_auth=_request_auth, _content_type=_content_type, @@ -423,14 +386,13 @@ class QuotasApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "QuotasAssignResponse", - '400': "Error", + '200': "QuotasAssignResponse", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -446,7 +408,6 @@ class QuotasApi: @validate_call def assign_organizations_quotas_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, quotas_assign_request: Optional[QuotasAssignRequest] = None, _request_timeout: Union[ None, @@ -465,8 +426,6 @@ class QuotasApi: This endpoint recieves a list of organization quotas to create or update. If there's no specific `orgId` defined for a quota, it defaults to using the authenticated organization. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows cumulative behavior––This means that the quotas are assigned to the specified organizations, and any previous assignments remain unchanged; no unassignments occur. - :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 quotas_assign_request: :type quotas_assign_request: QuotasAssignRequest :param _request_timeout: timeout setting for this request. If one @@ -492,7 +451,6 @@ class QuotasApi: """ # noqa: E501 _param = self._assign_organizations_quotas_serialize( - aid=aid, quotas_assign_request=quotas_assign_request, _request_auth=_request_auth, _content_type=_content_type, @@ -501,14 +459,13 @@ class QuotasApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "QuotasAssignResponse", - '400': "Error", + '200': "QuotasAssignResponse", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -524,7 +481,6 @@ class QuotasApi: @validate_call def assign_organizations_quotas_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, quotas_assign_request: Optional[QuotasAssignRequest] = None, _request_timeout: Union[ None, @@ -543,8 +499,6 @@ class QuotasApi: This endpoint recieves a list of organization quotas to create or update. If there's no specific `orgId` defined for a quota, it defaults to using the authenticated organization. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows cumulative behavior––This means that the quotas are assigned to the specified organizations, and any previous assignments remain unchanged; no unassignments occur. - :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 quotas_assign_request: :type quotas_assign_request: QuotasAssignRequest :param _request_timeout: timeout setting for this request. If one @@ -570,7 +524,6 @@ class QuotasApi: """ # noqa: E501 _param = self._assign_organizations_quotas_serialize( - aid=aid, quotas_assign_request=quotas_assign_request, _request_auth=_request_auth, _content_type=_content_type, @@ -579,14 +532,13 @@ class QuotasApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "QuotasAssignResponse", - '400': "Error", + '200': "QuotasAssignResponse", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -597,33 +549,27 @@ class QuotasApi: def _assign_organizations_quotas_serialize( self, - aid, quotas_assign_request, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 @@ -727,13 +673,12 @@ class QuotasApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetQuotas200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -797,13 +742,12 @@ class QuotasApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetQuotas200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -867,13 +811,12 @@ class QuotasApi: _response_types_map: Dict[str, Optional[str]] = { '200': "GetQuotas200Response", - '400': "Error", + '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", '429': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -888,19 +831,18 @@ class QuotasApi: _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -945,7 +887,6 @@ class QuotasApi: @validate_call def unassign_organizations_account_groups_quotas( 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, organizations_quotas_unassign: Optional[OrganizationsQuotasUnassign] = None, _request_timeout: Union[ None, @@ -962,10 +903,8 @@ class QuotasApi: ) -> None: """Remove account group quotas from organizations - Removes the quotas from multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. Removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. + This endpoint removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - :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 organizations_quotas_unassign: :type organizations_quotas_unassign: OrganizationsQuotasUnassign :param _request_timeout: timeout setting for this request. If one @@ -991,7 +930,6 @@ class QuotasApi: """ # noqa: E501 _param = self._unassign_organizations_account_groups_quotas_serialize( - aid=aid, organizations_quotas_unassign=organizations_quotas_unassign, _request_auth=_request_auth, _content_type=_content_type, @@ -1000,7 +938,13 @@ class QuotasApi: ) _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, @@ -1016,7 +960,6 @@ class QuotasApi: @validate_call def unassign_organizations_account_groups_quotas_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, organizations_quotas_unassign: Optional[OrganizationsQuotasUnassign] = None, _request_timeout: Union[ None, @@ -1033,10 +976,8 @@ class QuotasApi: ) -> ApiResponse[None]: """Remove account group quotas from organizations - Removes the quotas from multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. Removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. + This endpoint removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - :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 organizations_quotas_unassign: :type organizations_quotas_unassign: OrganizationsQuotasUnassign :param _request_timeout: timeout setting for this request. If one @@ -1062,7 +1003,6 @@ class QuotasApi: """ # noqa: E501 _param = self._unassign_organizations_account_groups_quotas_serialize( - aid=aid, organizations_quotas_unassign=organizations_quotas_unassign, _request_auth=_request_auth, _content_type=_content_type, @@ -1071,7 +1011,13 @@ class QuotasApi: ) _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, @@ -1087,7 +1033,6 @@ class QuotasApi: @validate_call def unassign_organizations_account_groups_quotas_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, organizations_quotas_unassign: Optional[OrganizationsQuotasUnassign] = None, _request_timeout: Union[ None, @@ -1104,10 +1049,8 @@ class QuotasApi: ) -> RESTResponseType: """Remove account group quotas from organizations - Removes the quotas from multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. Removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. + This endpoint removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - :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 organizations_quotas_unassign: :type organizations_quotas_unassign: OrganizationsQuotasUnassign :param _request_timeout: timeout setting for this request. If one @@ -1133,7 +1076,6 @@ class QuotasApi: """ # noqa: E501 _param = self._unassign_organizations_account_groups_quotas_serialize( - aid=aid, organizations_quotas_unassign=organizations_quotas_unassign, _request_auth=_request_auth, _content_type=_content_type, @@ -1142,7 +1084,13 @@ class QuotasApi: ) _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, @@ -1153,33 +1101,27 @@ class QuotasApi: def _unassign_organizations_account_groups_quotas_serialize( self, - aid, organizations_quotas_unassign, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 @@ -1190,7 +1132,6 @@ class QuotasApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) @@ -1235,7 +1176,6 @@ class QuotasApi: @validate_call def unassign_organizations_quotas( 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, quotas_unassign: Optional[QuotasUnassign] = None, _request_timeout: Union[ None, @@ -1254,8 +1194,6 @@ class QuotasApi: This endpoint recieves a list of organization IDs to remove their current quota. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - :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 quotas_unassign: :type quotas_unassign: QuotasUnassign :param _request_timeout: timeout setting for this request. If one @@ -1281,7 +1219,6 @@ class QuotasApi: """ # noqa: E501 _param = self._unassign_organizations_quotas_serialize( - aid=aid, quotas_unassign=quotas_unassign, _request_auth=_request_auth, _content_type=_content_type, @@ -1290,7 +1227,13 @@ class QuotasApi: ) _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, @@ -1306,7 +1249,6 @@ class QuotasApi: @validate_call def unassign_organizations_quotas_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, quotas_unassign: Optional[QuotasUnassign] = None, _request_timeout: Union[ None, @@ -1325,8 +1267,6 @@ class QuotasApi: This endpoint recieves a list of organization IDs to remove their current quota. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - :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 quotas_unassign: :type quotas_unassign: QuotasUnassign :param _request_timeout: timeout setting for this request. If one @@ -1352,7 +1292,6 @@ class QuotasApi: """ # noqa: E501 _param = self._unassign_organizations_quotas_serialize( - aid=aid, quotas_unassign=quotas_unassign, _request_auth=_request_auth, _content_type=_content_type, @@ -1361,7 +1300,13 @@ class QuotasApi: ) _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, @@ -1377,7 +1322,6 @@ class QuotasApi: @validate_call def unassign_organizations_quotas_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, quotas_unassign: Optional[QuotasUnassign] = None, _request_timeout: Union[ None, @@ -1396,8 +1340,6 @@ class QuotasApi: This endpoint recieves a list of organization IDs to remove their current quota. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - :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 quotas_unassign: :type quotas_unassign: QuotasUnassign :param _request_timeout: timeout setting for this request. If one @@ -1423,7 +1365,6 @@ class QuotasApi: """ # noqa: E501 _param = self._unassign_organizations_quotas_serialize( - aid=aid, quotas_unassign=quotas_unassign, _request_auth=_request_auth, _content_type=_content_type, @@ -1432,7 +1373,13 @@ class QuotasApi: ) _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, @@ -1443,33 +1390,27 @@ class QuotasApi: def _unassign_organizations_quotas_serialize( self, - aid, quotas_unassign, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> 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, 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 @@ -1480,7 +1421,6 @@ class QuotasApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/json', 'application/problem+json' ] ) diff --git a/usage/usage/api/usage_api.py b/usage/usage/api/usage_api.py new file mode 100644 index 00000000..b4791b56 --- /dev/null +++ b/usage/usage/api/usage_api.py @@ -0,0 +1,1019 @@ +# 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.2 + 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 + +from datetime import datetime +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from usage.models.expand import Expand +from usage.models.get_enterprise_agents_units_usage200_response import GetEnterpriseAgentsUnitsUsage200Response +from usage.models.get_test_units_usage200_response import GetTestUnitsUsage200Response +from usage.models.get_usage200_response import GetUsage200Response + +from usage.api_client import ApiClient, RequestSerialized +from usage.api_response import ApiResponse +from usage.rest import RESTResponseType + + +class UsageApi: + """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() + self.api_client = api_client + + + @validate_call + def get_enterprise_agents_units_usage( + self, + 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, + ) -> GetEnterpriseAgentsUnitsUsage200Response: + """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. + + :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_enterprise_agents_units_usage_serialize( + 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': "GetEnterpriseAgentsUnitsUsage200Response", + '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, + ).data + + + @validate_call + def get_enterprise_agents_units_usage_with_http_info( + self, + 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[GetEnterpriseAgentsUnitsUsage200Response]: + """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. + + :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_enterprise_agents_units_usage_serialize( + 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': "GetEnterpriseAgentsUnitsUsage200Response", + '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, + ) + + + @validate_call + def get_enterprise_agents_units_usage_without_preload_content( + self, + 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: + """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. + + :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_enterprise_agents_units_usage_serialize( + 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': "GetEnterpriseAgentsUnitsUsage200Response", + '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_enterprise_agents_units_usage_serialize( + self, + 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 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/usage/units/enterprise-agents', + 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_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, + 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, + ) -> GetTestUnitsUsage200Response: + """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. + + :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 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_units_usage_serialize( + aid=aid, + 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': "GetTestUnitsUsage200Response", + '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, + ).data + + + @validate_call + def get_test_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, + 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[GetTestUnitsUsage200Response]: + """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. + + :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 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_units_usage_serialize( + aid=aid, + 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': "GetTestUnitsUsage200Response", + '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, + ) + + + @validate_call + def get_test_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, + 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: + """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. + + :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 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_units_usage_serialize( + aid=aid, + 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': "GetTestUnitsUsage200Response", + '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_test_units_usage_serialize( + self, + aid, + 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 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/usage/units/tests', + 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_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, + expand: Annotated[Optional[List[Expand]], Field(description="Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.")] = 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, + ) -> GetUsage200Response: + """Get usage information for the last month + + This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. + + :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: Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. + :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_usage_serialize( + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetUsage200Response", + '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, + ).data + + + @validate_call + def get_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, + expand: Annotated[Optional[List[Expand]], Field(description="Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.")] = 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[GetUsage200Response]: + """Get usage information for the last month + + This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. + + :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: Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. + :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_usage_serialize( + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetUsage200Response", + '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, + ) + + + @validate_call + def get_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, + expand: Annotated[Optional[List[Expand]], Field(description="Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.")] = 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 usage information for the last month + + This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. + + :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: Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. + :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_usage_serialize( + aid=aid, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetUsage200Response", + '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_usage_serialize( + self, + aid, + 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 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 + + + # 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/usage', + 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/usage/usage/api_client.py b/usage/usage/api_client.py new file mode 100644 index 00000000..cae81e07 --- /dev/null +++ b/usage/usage/api_client.py @@ -0,0 +1,770 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import datetime +from dateutil.parser import parse +from enum import Enum +import json +import mimetypes +import os +import re +import tempfile + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from usage.configuration import Configuration +from usage.api_response import ApiResponse, T as ApiResponseT +import usage.models +from usage import rest +from usage.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :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. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # deserialize response data + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + elif isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } + + def deserialize(self, response_text, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + + # fetch data from response object + try: + data = json.loads(response_text) + except ValueError: + data = response_text + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(usage.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, str(value)) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters(self, files: Dict[str, Union[str, bytes]]): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/usage/usage/api_response.py b/usage/usage/api_response.py new file mode 100644 index 00000000..9bc7c11f --- /dev/null +++ b/usage/usage/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/usage/usage/configuration.py b/usage/usage/configuration.py new file mode 100644 index 00000000..bff4d2f6 --- /dev/null +++ b/usage/usage/configuration.py @@ -0,0 +1,444 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Optional +import urllib3 + +import http.client as httplib + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + + :Example: + """ + + _default = None + + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + username=None, password=None, + access_token=None, + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.thousandeyes.com" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("usage") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = None + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy: Optional[str] = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Enable client side validation + self.client_side_validation = True + + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" + """datetime format + """ + + self.date_format = "%Y-%m-%d" + """date format + """ + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls): + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls): + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = Configuration() + return cls._default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier, alias=None): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if self.access_token is not None: + auth['BearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 7.0.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.thousandeyes.com", + 'description': "ThousandEyes API production URL", + } + ] + + def get_host_from_settings(self, index, variables=None, servers=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/usage/usage/exceptions.py b/usage/usage/exceptions.py new file mode 100644 index 00000000..32b604a4 --- /dev/null +++ b/usage/usage/exceptions.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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.getheaders() + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/usage/usage/models/__init__.py b/usage/usage/models/__init__.py new file mode 100644 index 00000000..abd84a17 --- /dev/null +++ b/usage/usage/models/__init__.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from usage.models.account_group import AccountGroup +from usage.models.account_group_id import AccountGroupId +from usage.models.account_group_quota import AccountGroupQuota +from usage.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner +from usage.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner +from usage.models.endpoint_agents_inner import EndpointAgentsInner +from usage.models.enterprise_agent_units_by_test_owner_account_group import EnterpriseAgentUnitsByTestOwnerAccountGroup +from usage.models.enterprise_agent_units_by_test_owner_account_group_breakdowns_inner import EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner +from usage.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner +from usage.models.enterprise_agents_inner import EnterpriseAgentsInner +from usage.models.error import Error +from usage.models.expand import Expand +from usage.models.get_enterprise_agents_units_usage200_response import GetEnterpriseAgentsUnitsUsage200Response +from usage.models.get_quotas200_response import GetQuotas200Response +from usage.models.get_test_units_usage200_response import GetTestUnitsUsage200Response +from usage.models.get_usage200_response import GetUsage200Response +from usage.models.link import Link +from usage.models.organization_quota import OrganizationQuota +from usage.models.organizations_quotas_assign import OrganizationsQuotasAssign +from usage.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner +from usage.models.organizations_quotas_unassign import OrganizationsQuotasUnassign +from usage.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner +from usage.models.pagination_links import PaginationLinks +from usage.models.pagination_links_links import PaginationLinksLinks +from usage.models.quotas import Quotas +from usage.models.quotas_assign_request import QuotasAssignRequest +from usage.models.quotas_assign_response import QuotasAssignResponse +from usage.models.quotas_quotas_inner import QuotasQuotasInner +from usage.models.quotas_unassign import QuotasUnassign +from usage.models.self_links import SelfLinks +from usage.models.self_links_links import SelfLinksLinks +from usage.models.tests_inner import TestsInner +from usage.models.unauthorized_error import UnauthorizedError +from usage.models.units_by_tests import UnitsByTests +from usage.models.units_by_tests_breakdowns_inner import UnitsByTestsBreakdownsInner +from usage.models.usage import Usage +from usage.models.usage_usage import UsageUsage +from usage.models.usage_usage_quota import UsageUsageQuota +from usage.models.validation_error import ValidationError +from usage.models.validation_error_all_of_errors import ValidationErrorAllOfErrors diff --git a/usage/usage/models/account_group.py b/usage/usage/models/account_group.py new file mode 100644 index 00000000..c4f099da --- /dev/null +++ b/usage/usage/models/account_group.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/usage/usage/models/account_group_id.py b/usage/usage/models/account_group_id.py new file mode 100644 index 00000000..d15b29a0 --- /dev/null +++ b/usage/usage/models/account_group_id.py @@ -0,0 +1,87 @@ +# 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.2 + 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 AccountGroupId(BaseModel): + """ + AccountGroupId + """ # 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.") + __properties: ClassVar[List[str]] = ["aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupId 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 AccountGroupId 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") + }) + return _obj + + diff --git a/usage/usage/models/account_group_quota.py b/usage/usage/models/account_group_quota.py new file mode 100644 index 00000000..dc2f7c3a --- /dev/null +++ b/usage/usage/models/account_group_quota.py @@ -0,0 +1,89 @@ +# 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.2 + 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 AccountGroupQuota(BaseModel): + """ + AccountGroupQuota + """ # noqa: E501 + value: Optional[StrictInt] = Field(default=None, description="Value of the quota for the given Account Group.") + aid: Optional[StrictStr] = Field(default=None, description="Unique ID of the account group.") + __properties: ClassVar[List[str]] = ["value", "aid"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccountGroupQuota 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 AccountGroupQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "aid": obj.get("aid") + }) + return _obj + + diff --git a/usage/usage/models/endpoint_agents_embedded_inner.py b/usage/usage/models/endpoint_agents_embedded_inner.py new file mode 100644 index 00000000..00ea13de --- /dev/null +++ b/usage/usage/models/endpoint_agents_embedded_inner.py @@ -0,0 +1,101 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentsEmbeddedInner(BaseModel): + """ + EndpointAgentsEmbeddedInner + """ # noqa: E501 + aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group that owns the embedded endpoint agents.") + account_group_name: Optional[Any] = Field(default=None, description="Name of the account group that owns the embedded endpoint agents.", alias="accountGroupName") + endpoint_agents_embedded_used: Optional[StrictInt] = Field(default=None, description="Number of endpoint agents embedded owned by the specific account group in the usage period.", alias="endpointAgentsEmbeddedUsed") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "endpointAgentsEmbeddedUsed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentsEmbeddedInner 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, + ) + # set to None if aid (nullable) is None + # and model_fields_set contains the field + if self.aid is None and "aid" in self.model_fields_set: + _dict['aid'] = None + + # set to None if account_group_name (nullable) is None + # and model_fields_set contains the field + if self.account_group_name is None and "account_group_name" in self.model_fields_set: + _dict['accountGroupName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentsEmbeddedInner 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"), + "endpointAgentsEmbeddedUsed": obj.get("endpointAgentsEmbeddedUsed") + }) + return _obj + + diff --git a/usage/usage/models/endpoint_agents_essentials_inner.py b/usage/usage/models/endpoint_agents_essentials_inner.py new file mode 100644 index 00000000..0317ae2f --- /dev/null +++ b/usage/usage/models/endpoint_agents_essentials_inner.py @@ -0,0 +1,101 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentsEssentialsInner(BaseModel): + """ + EndpointAgentsEssentialsInner + """ # noqa: E501 + aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group owning the endpoint agents essentials.") + account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the endpoint agents essentials.", alias="accountGroupName") + endpoint_agents_essentials_used: Optional[StrictInt] = Field(default=None, description="Number of endpoint agents essentials owned by the specific account group in the usage period.", alias="endpointAgentsEssentialsUsed") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "endpointAgentsEssentialsUsed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentsEssentialsInner 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, + ) + # set to None if aid (nullable) is None + # and model_fields_set contains the field + if self.aid is None and "aid" in self.model_fields_set: + _dict['aid'] = None + + # set to None if account_group_name (nullable) is None + # and model_fields_set contains the field + if self.account_group_name is None and "account_group_name" in self.model_fields_set: + _dict['accountGroupName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentsEssentialsInner 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"), + "endpointAgentsEssentialsUsed": obj.get("endpointAgentsEssentialsUsed") + }) + return _obj + + diff --git a/usage/usage/models/endpoint_agents_inner.py b/usage/usage/models/endpoint_agents_inner.py new file mode 100644 index 00000000..801518fe --- /dev/null +++ b/usage/usage/models/endpoint_agents_inner.py @@ -0,0 +1,101 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EndpointAgentsInner(BaseModel): + """ + EndpointAgentsInner + """ # noqa: E501 + aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group owning the endpoint agents.") + account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the endpoint agents.", alias="accountGroupName") + endpoint_agents_used: Optional[StrictInt] = Field(default=None, description="Number of endpoint agents owned by the specific account group in the usage period.", alias="endpointAgentsUsed") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "endpointAgentsUsed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EndpointAgentsInner 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, + ) + # set to None if aid (nullable) is None + # and model_fields_set contains the field + if self.aid is None and "aid" in self.model_fields_set: + _dict['aid'] = None + + # set to None if account_group_name (nullable) is None + # and model_fields_set contains the field + if self.account_group_name is None and "account_group_name" in self.model_fields_set: + _dict['accountGroupName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EndpointAgentsInner 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"), + "endpointAgentsUsed": obj.get("endpointAgentsUsed") + }) + return _obj + + diff --git a/usage/usage/models/enterprise_agent_units_by_test_owner_account_group.py b/usage/usage/models/enterprise_agent_units_by_test_owner_account_group.py new file mode 100644 index 00000000..1905e364 --- /dev/null +++ b/usage/usage/models/enterprise_agent_units_by_test_owner_account_group.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.enterprise_agent_units_by_test_owner_account_group_breakdowns_inner import EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgentUnitsByTestOwnerAccountGroup(BaseModel): + """ + EnterpriseAgentUnitsByTestOwnerAccountGroup + """ # noqa: E501 + breakdowns: Optional[List[EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner]] = None + __properties: ClassVar[List[str]] = ["breakdowns"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroup 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 breakdowns (list) + _items = [] + if self.breakdowns: + for _item in self.breakdowns: + if _item: + _items.append(_item.to_dict()) + _dict['breakdowns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "breakdowns": [EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.from_dict(_item) for _item in obj["breakdowns"]] if obj.get("breakdowns") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py b/usage/usage/models/enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py new file mode 100644 index 00000000..3a63f702 --- /dev/null +++ b/usage/usage/models/enterprise_agent_units_by_test_owner_account_group_breakdowns_inner.py @@ -0,0 +1,99 @@ +# 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.2 + 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 EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner(BaseModel): + """ + EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="Unique identifier of the account group where some tests are incurring the enterprise agent units.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Name of the account group which owns the tests that are incurring enterprise agent units.", alias="accountGroupName") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the enterprise agent generating usage.", alias="agentId") + agent_name: Optional[StrictStr] = Field(default=None, description="Name of the enterprise agent generating usage.", alias="agentName") + enterprise_units_used: Optional[StrictInt] = Field(default=None, description="Number of enterprise agent units owned by the specific account group in the usage period.", alias="enterpriseUnitsUsed") + enterprise_units_projected: Optional[StrictInt] = Field(default=None, description="Number of enterprise units projected in the current usage period, based on units consumed to date and configuration of enabled tests. This value is updated hourly. Returns non-zero value only for organizations with metered billing.", alias="enterpriseUnitsProjected") + vagent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the virtual agent generating usage", alias="vagentId") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "agentId", "agentName", "enterpriseUnitsUsed", "enterpriseUnitsProjected", "vagentId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner 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 EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner 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"), + "agentId": obj.get("agentId"), + "agentName": obj.get("agentName"), + "enterpriseUnitsUsed": obj.get("enterpriseUnitsUsed"), + "enterpriseUnitsProjected": obj.get("enterpriseUnitsProjected"), + "vagentId": obj.get("vagentId") + }) + return _obj + + diff --git a/usage/usage/models/enterprise_agent_units_inner.py b/usage/usage/models/enterprise_agent_units_inner.py new file mode 100644 index 00000000..0453e598 --- /dev/null +++ b/usage/usage/models/enterprise_agent_units_inner.py @@ -0,0 +1,109 @@ +# 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.2 + 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 EnterpriseAgentUnitsInner(BaseModel): + """ + EnterpriseAgentUnitsInner + """ # noqa: E501 + aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group owning the enterprise agent units.") + account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the enterprise agent units.", alias="accountGroupName") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the enterprise agent generating usage.", alias="agentId") + agent_name: Optional[StrictStr] = Field(default=None, description="Name of the enterprise agent generating usage.", alias="agentName") + enterprise_units_used: Optional[StrictInt] = Field(default=None, description="Number of enterprise agent units owned by the specific account group in the usage period.", alias="enterpriseUnitsUsed") + enterprise_units_projected: Optional[StrictInt] = Field(default=None, description="Number of enterprise units projected in the current usage period, based on units consumed to date and configuration of enabled tests. This value is updated hourly. Returns non-zero value only for organizations with metered billing.", alias="enterpriseUnitsProjected") + vagent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the virtual agent generating usage", alias="vagentId") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "agentId", "agentName", "enterpriseUnitsUsed", "enterpriseUnitsProjected", "vagentId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgentUnitsInner 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, + ) + # set to None if aid (nullable) is None + # and model_fields_set contains the field + if self.aid is None and "aid" in self.model_fields_set: + _dict['aid'] = None + + # set to None if account_group_name (nullable) is None + # and model_fields_set contains the field + if self.account_group_name is None and "account_group_name" in self.model_fields_set: + _dict['accountGroupName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnterpriseAgentUnitsInner 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"), + "agentId": obj.get("agentId"), + "agentName": obj.get("agentName"), + "enterpriseUnitsUsed": obj.get("enterpriseUnitsUsed"), + "enterpriseUnitsProjected": obj.get("enterpriseUnitsProjected"), + "vagentId": obj.get("vagentId") + }) + return _obj + + diff --git a/usage/usage/models/enterprise_agents_inner.py b/usage/usage/models/enterprise_agents_inner.py new file mode 100644 index 00000000..31833982 --- /dev/null +++ b/usage/usage/models/enterprise_agents_inner.py @@ -0,0 +1,101 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgentsInner(BaseModel): + """ + EnterpriseAgentsInner + """ # noqa: E501 + aid: Optional[Any] = Field(default=None, description="A unique identifier that specifies the account group that owns the enterprise agents.") + account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the enterprise agents.", alias="accountGroupName") + enterprise_agents_used: Optional[StrictInt] = Field(default=None, description="Number of enterprise agents owned by the specific account group in the usage period.", alias="enterpriseAgentsUsed") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "enterpriseAgentsUsed"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EnterpriseAgentsInner 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, + ) + # set to None if aid (nullable) is None + # and model_fields_set contains the field + if self.aid is None and "aid" in self.model_fields_set: + _dict['aid'] = None + + # set to None if account_group_name (nullable) is None + # and model_fields_set contains the field + if self.account_group_name is None and "account_group_name" in self.model_fields_set: + _dict['accountGroupName'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnterpriseAgentsInner 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"), + "enterpriseAgentsUsed": obj.get("enterpriseAgentsUsed") + }) + return _obj + + diff --git a/usage/usage/models/error.py b/usage/usage/models/error.py new file mode 100644 index 00000000..967401d2 --- /dev/null +++ b/usage/usage/models/error.py @@ -0,0 +1,95 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/usage/usage/models/expand.py b/usage/usage/models/expand.py new file mode 100644 index 00000000..9d65795d --- /dev/null +++ b/usage/usage/models/expand.py @@ -0,0 +1,41 @@ +# 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.2 + 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 + """ + TEST = 'test' + ENTERPRISE_MINUS_AGENT = 'enterprise-agent' + ENTERPRISE_MINUS_AGENT_MINUS_UNIT = 'enterprise-agent-unit' + ENDPOINT_MINUS_AGENT = 'endpoint-agent' + ENDPOINT_MINUS_AGENT_MINUS_ESSENTIAL = 'endpoint-agent-essential' + ENDPOINT_MINUS_AGENT_MINUS_EMBEDDED = 'endpoint-agent-embedded' + + @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/usage/usage/models/get_enterprise_agents_units_usage200_response.py b/usage/usage/models/get_enterprise_agents_units_usage200_response.py new file mode 100644 index 00000000..a3a27d92 --- /dev/null +++ b/usage/usage/models/get_enterprise_agents_units_usage200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 usage.models.enterprise_agent_units_by_test_owner_account_group_breakdowns_inner import EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner +from usage.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetEnterpriseAgentsUnitsUsage200Response(BaseModel): + """ + GetEnterpriseAgentsUnitsUsage200Response + """ # noqa: E501 + breakdowns: Optional[List[EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner]] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["breakdowns", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetEnterpriseAgentsUnitsUsage200Response 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 breakdowns (list) + _items = [] + if self.breakdowns: + for _item in self.breakdowns: + if _item: + _items.append(_item.to_dict()) + _dict['breakdowns'] = _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 GetEnterpriseAgentsUnitsUsage200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "breakdowns": [EnterpriseAgentUnitsByTestOwnerAccountGroupBreakdownsInner.from_dict(_item) for _item in obj["breakdowns"]] if obj.get("breakdowns") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/get_quotas200_response.py b/usage/usage/models/get_quotas200_response.py new file mode 100644 index 00000000..5e4c000c --- /dev/null +++ b/usage/usage/models/get_quotas200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 usage.models.quotas_quotas_inner import QuotasQuotasInner +from usage.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class GetQuotas200Response(BaseModel): + """ + GetQuotas200Response + """ # noqa: E501 + quotas: Optional[List[QuotasQuotasInner]] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["quotas", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetQuotas200Response 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 quotas (list) + _items = [] + if self.quotas: + for _item in self.quotas: + if _item: + _items.append(_item.to_dict()) + _dict['quotas'] = _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 GetQuotas200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "quotas": [QuotasQuotasInner.from_dict(_item) for _item in obj["quotas"]] if obj.get("quotas") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/get_test_units_usage200_response.py b/usage/usage/models/get_test_units_usage200_response.py new file mode 100644 index 00000000..832d3cd8 --- /dev/null +++ b/usage/usage/models/get_test_units_usage200_response.py @@ -0,0 +1,101 @@ +# 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.2 + 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 usage.models.pagination_links_links import PaginationLinksLinks +from usage.models.units_by_tests_breakdowns_inner import UnitsByTestsBreakdownsInner +from typing import Optional, Set +from typing_extensions import Self + +class GetTestUnitsUsage200Response(BaseModel): + """ + GetTestUnitsUsage200Response + """ # noqa: E501 + breakdowns: Optional[List[UnitsByTestsBreakdownsInner]] = None + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["breakdowns", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetTestUnitsUsage200Response 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 breakdowns (list) + _items = [] + if self.breakdowns: + for _item in self.breakdowns: + if _item: + _items.append(_item.to_dict()) + _dict['breakdowns'] = _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 GetTestUnitsUsage200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "breakdowns": [UnitsByTestsBreakdownsInner.from_dict(_item) for _item in obj["breakdowns"]] if obj.get("breakdowns") is not None else None, + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/get_usage200_response.py b/usage/usage/models/get_usage200_response.py new file mode 100644 index 00000000..0249e61c --- /dev/null +++ b/usage/usage/models/get_usage200_response.py @@ -0,0 +1,97 @@ +# 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.2 + 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 usage.models.self_links_links import SelfLinksLinks +from usage.models.usage_usage import UsageUsage +from typing import Optional, Set +from typing_extensions import Self + +class GetUsage200Response(BaseModel): + """ + GetUsage200Response + """ # noqa: E501 + usage: Optional[UsageUsage] = None + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["usage", "_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetUsage200Response 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 usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + # 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 GetUsage200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "usage": UsageUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None, + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/link.py b/usage/usage/models/link.py new file mode 100644 index 00000000..2737b2fe --- /dev/null +++ b/usage/usage/models/link.py @@ -0,0 +1,101 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/usage/usage/models/organization_quota.py b/usage/usage/models/organization_quota.py new file mode 100644 index 00000000..f5f1d0a8 --- /dev/null +++ b/usage/usage/models/organization_quota.py @@ -0,0 +1,89 @@ +# 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.2 + 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 OrganizationQuota(BaseModel): + """ + OrganizationQuota + """ # noqa: E501 + value: StrictInt = Field(description="Value of the quota for the given Organization.") + org_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the organization.", alias="orgId") + __properties: ClassVar[List[str]] = ["value", "orgId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationQuota 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 OrganizationQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "orgId": obj.get("orgId") + }) + return _obj + + diff --git a/usage/usage/models/organizations_quotas_assign.py b/usage/usage/models/organizations_quotas_assign.py new file mode 100644 index 00000000..7d19fd7d --- /dev/null +++ b/usage/usage/models/organizations_quotas_assign.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationsQuotasAssign(BaseModel): + """ + OrganizationsQuotasAssign + """ # noqa: E501 + organizations: Optional[List[OrganizationsQuotasAssignOrganizationsInner]] = None + __properties: ClassVar[List[str]] = ["organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationsQuotasAssign 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 organizations (list) + _items = [] + if self.organizations: + for _item in self.organizations: + if _item: + _items.append(_item.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationsQuotasAssign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [OrganizationsQuotasAssignOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/organizations_quotas_assign_organizations_inner.py b/usage/usage/models/organizations_quotas_assign_organizations_inner.py new file mode 100644 index 00000000..8626ee50 --- /dev/null +++ b/usage/usage/models/organizations_quotas_assign_organizations_inner.py @@ -0,0 +1,97 @@ +# 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.2 + 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 usage.models.account_group_quota import AccountGroupQuota +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationsQuotasAssignOrganizationsInner(BaseModel): + """ + OrganizationsQuotasAssignOrganizationsInner + """ # noqa: E501 + org_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.", alias="orgId") + account_groups: Optional[List[AccountGroupQuota]] = Field(default=None, description="List of account groups quotas.", alias="accountGroups") + __properties: ClassVar[List[str]] = ["orgId", "accountGroups"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationsQuotasAssignOrganizationsInner 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 + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationsQuotasAssignOrganizationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgId": obj.get("orgId"), + "accountGroups": [AccountGroupQuota.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/organizations_quotas_unassign.py b/usage/usage/models/organizations_quotas_unassign.py new file mode 100644 index 00000000..bba0b6d0 --- /dev/null +++ b/usage/usage/models/organizations_quotas_unassign.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationsQuotasUnassign(BaseModel): + """ + OrganizationsQuotasUnassign + """ # noqa: E501 + organizations: Optional[List[OrganizationsQuotasUnassignOrganizationsInner]] = None + __properties: ClassVar[List[str]] = ["organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationsQuotasUnassign 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 organizations (list) + _items = [] + if self.organizations: + for _item in self.organizations: + if _item: + _items.append(_item.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationsQuotasUnassign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [OrganizationsQuotasUnassignOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/organizations_quotas_unassign_organizations_inner.py b/usage/usage/models/organizations_quotas_unassign_organizations_inner.py new file mode 100644 index 00000000..baed6ad1 --- /dev/null +++ b/usage/usage/models/organizations_quotas_unassign_organizations_inner.py @@ -0,0 +1,89 @@ +# 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.2 + 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 OrganizationsQuotasUnassignOrganizationsInner(BaseModel): + """ + OrganizationsQuotasUnassignOrganizationsInner + """ # noqa: E501 + org_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.", alias="orgId") + account_groups: Optional[List[StrictStr]] = Field(default=None, description="List of account group IDs.", alias="accountGroups") + __properties: ClassVar[List[str]] = ["orgId", "accountGroups"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationsQuotasUnassignOrganizationsInner 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 OrganizationsQuotasUnassignOrganizationsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "orgId": obj.get("orgId"), + "accountGroups": obj.get("accountGroups") + }) + return _obj + + diff --git a/usage/usage/models/pagination_links.py b/usage/usage/models/pagination_links.py new file mode 100644 index 00000000..da385f96 --- /dev/null +++ b/usage/usage/models/pagination_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 usage.models.pagination_links_links import PaginationLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + links: Optional[PaginationLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": PaginationLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/pagination_links_links.py b/usage/usage/models/pagination_links_links.py new file mode 100644 index 00000000..877888e8 --- /dev/null +++ b/usage/usage/models/pagination_links_links.py @@ -0,0 +1,101 @@ +# 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.2 + 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 usage.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinksLinks(BaseModel): + """ + PaginationLinksLinks + """ # 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PaginationLinksLinks 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 PaginationLinksLinks 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/usage/usage/models/quotas.py b/usage/usage/models/quotas.py new file mode 100644 index 00000000..03bfc4f8 --- /dev/null +++ b/usage/usage/models/quotas.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.quotas_quotas_inner import QuotasQuotasInner +from typing import Optional, Set +from typing_extensions import Self + +class Quotas(BaseModel): + """ + Quotas + """ # noqa: E501 + quotas: Optional[List[QuotasQuotasInner]] = None + __properties: ClassVar[List[str]] = ["quotas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Quotas 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 quotas (list) + _items = [] + if self.quotas: + for _item in self.quotas: + if _item: + _items.append(_item.to_dict()) + _dict['quotas'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Quotas from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "quotas": [QuotasQuotasInner.from_dict(_item) for _item in obj["quotas"]] if obj.get("quotas") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/quotas_assign_request.py b/usage/usage/models/quotas_assign_request.py new file mode 100644 index 00000000..89357ef0 --- /dev/null +++ b/usage/usage/models/quotas_assign_request.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.organization_quota import OrganizationQuota +from typing import Optional, Set +from typing_extensions import Self + +class QuotasAssignRequest(BaseModel): + """ + QuotasAssignRequest + """ # noqa: E501 + organizations: Optional[List[OrganizationQuota]] = None + __properties: ClassVar[List[str]] = ["organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuotasAssignRequest 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 organizations (list) + _items = [] + if self.organizations: + for _item in self.organizations: + if _item: + _items.append(_item.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuotasAssignRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [OrganizationQuota.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/quotas_assign_response.py b/usage/usage/models/quotas_assign_response.py new file mode 100644 index 00000000..5cc84c57 --- /dev/null +++ b/usage/usage/models/quotas_assign_response.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.organization_quota import OrganizationQuota +from typing import Optional, Set +from typing_extensions import Self + +class QuotasAssignResponse(BaseModel): + """ + QuotasAssignResponse + """ # noqa: E501 + organizations: Optional[List[OrganizationQuota]] = None + __properties: ClassVar[List[str]] = ["organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuotasAssignResponse 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 organizations (list) + _items = [] + if self.organizations: + for _item in self.organizations: + if _item: + _items.append(_item.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuotasAssignResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": [OrganizationQuota.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/quotas_quotas_inner.py b/usage/usage/models/quotas_quotas_inner.py new file mode 100644 index 00000000..5adc3de2 --- /dev/null +++ b/usage/usage/models/quotas_quotas_inner.py @@ -0,0 +1,101 @@ +# 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.2 + 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 usage.models.account_group_quota import AccountGroupQuota +from usage.models.organization_quota import OrganizationQuota +from typing import Optional, Set +from typing_extensions import Self + +class QuotasQuotasInner(BaseModel): + """ + QuotasQuotasInner + """ # noqa: E501 + organization_quota: Optional[OrganizationQuota] = Field(default=None, alias="organizationQuota") + account_group_quotas: Optional[List[AccountGroupQuota]] = Field(default=None, alias="accountGroupQuotas") + __properties: ClassVar[List[str]] = ["organizationQuota", "accountGroupQuotas"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuotasQuotasInner 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 organization_quota + if self.organization_quota: + _dict['organizationQuota'] = self.organization_quota.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in account_group_quotas (list) + _items = [] + if self.account_group_quotas: + for _item in self.account_group_quotas: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroupQuotas'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of QuotasQuotasInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizationQuota": OrganizationQuota.from_dict(obj["organizationQuota"]) if obj.get("organizationQuota") is not None else None, + "accountGroupQuotas": [AccountGroupQuota.from_dict(_item) for _item in obj["accountGroupQuotas"]] if obj.get("accountGroupQuotas") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/quotas_unassign.py b/usage/usage/models/quotas_unassign.py new file mode 100644 index 00000000..8d37c132 --- /dev/null +++ b/usage/usage/models/quotas_unassign.py @@ -0,0 +1,87 @@ +# 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.2 + 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 QuotasUnassign(BaseModel): + """ + QuotasUnassign + """ # noqa: E501 + organizations: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of QuotasUnassign 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 QuotasUnassign from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organizations": obj.get("organizations") + }) + return _obj + + diff --git a/usage/usage/models/self_links.py b/usage/usage/models/self_links.py new file mode 100644 index 00000000..661482c3 --- /dev/null +++ b/usage/usage/models/self_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 usage.models.self_links_links import SelfLinksLinks +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + SelfLinks + """ # noqa: E501 + links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["_links"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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 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 SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "_links": SelfLinksLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/self_links_links.py b/usage/usage/models/self_links_links.py new file mode 100644 index 00000000..979233c4 --- /dev/null +++ b/usage/usage/models/self_links_links.py @@ -0,0 +1,91 @@ +# 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.2 + 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 usage.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinksLinks(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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SelfLinksLinks 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 SelfLinksLinks 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/usage/usage/models/tests_inner.py b/usage/usage/models/tests_inner.py new file mode 100644 index 00000000..a1310e32 --- /dev/null +++ b/usage/usage/models/tests_inner.py @@ -0,0 +1,99 @@ +# 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.2 + 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 TestsInner(BaseModel): + """ + TestsInner + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="Unique identifier of the account group which owns the test.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Name of the account group which owns the test.", alias="accountGroupName") + test_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the test generating usage.", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test generating usage.", alias="testName") + test_type: Optional[StrictStr] = Field(default=None, description="The type of test that generated the usage data. Note that this parameter provides a user-friendly description of the test type and should not be parsed to determine the endpoint for querying configuration details.", alias="testType") + cloud_units_used: Optional[StrictInt] = Field(default=None, description="Number of cloud units that the test has consumed in the usage period.", alias="cloudUnitsUsed") + cloud_units_projected: Optional[StrictInt] = Field(default=None, description="The estimated number of cloud units that the test is expected to consume during the usage period. This estimate is determined by considering the units consumed up to the current time and the test's configuration. It's important to note that this value is updated every hour. For new tests, the `cloudUnitsProjected` parameter is absent until the projection is calculated.", alias="cloudUnitsProjected") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "testId", "testName", "testType", "cloudUnitsUsed", "cloudUnitsProjected"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TestsInner 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 TestsInner 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"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "testType": obj.get("testType"), + "cloudUnitsUsed": obj.get("cloudUnitsUsed"), + "cloudUnitsProjected": obj.get("cloudUnitsProjected") + }) + return _obj + + diff --git a/usage/usage/models/unauthorized_error.py b/usage/usage/models/unauthorized_error.py new file mode 100644 index 00000000..97a0146f --- /dev/null +++ b/usage/usage/models/unauthorized_error.py @@ -0,0 +1,89 @@ +# 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.2 + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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/usage/usage/models/units_by_tests.py b/usage/usage/models/units_by_tests.py new file mode 100644 index 00000000..e8246d6a --- /dev/null +++ b/usage/usage/models/units_by_tests.py @@ -0,0 +1,95 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.units_by_tests_breakdowns_inner import UnitsByTestsBreakdownsInner +from typing import Optional, Set +from typing_extensions import Self + +class UnitsByTests(BaseModel): + """ + UnitsByTests + """ # noqa: E501 + breakdowns: Optional[List[UnitsByTestsBreakdownsInner]] = None + __properties: ClassVar[List[str]] = ["breakdowns"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnitsByTests 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 breakdowns (list) + _items = [] + if self.breakdowns: + for _item in self.breakdowns: + if _item: + _items.append(_item.to_dict()) + _dict['breakdowns'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UnitsByTests from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "breakdowns": [UnitsByTestsBreakdownsInner.from_dict(_item) for _item in obj["breakdowns"]] if obj.get("breakdowns") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/units_by_tests_breakdowns_inner.py b/usage/usage/models/units_by_tests_breakdowns_inner.py new file mode 100644 index 00000000..abdf364e --- /dev/null +++ b/usage/usage/models/units_by_tests_breakdowns_inner.py @@ -0,0 +1,105 @@ +# 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.2 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnitsByTestsBreakdownsInner(BaseModel): + """ + UnitsByTestsBreakdownsInner + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="Unique ID of the account group owning the test that is generating units") + account_group_name: Optional[StrictStr] = Field(default=None, description="Name of the account group which owns the test that is generating the units", alias="accountGroupName") + enterprise_units_used: Optional[StrictInt] = Field(default=None, description="Units generated by the by the enterprise agents running the test", alias="enterpriseUnitsUsed") + enterprise_units_projected: Optional[StrictInt] = Field(default=None, description="Enterprise Units projected in the current usage period, based on units consumed to date and configuration of the test", alias="enterpriseUnitsProjected") + cloud_units_used: Optional[StrictInt] = Field(default=None, description="Units generated by the by the cloud agents running the test", alias="cloudUnitsUsed") + cloud_units_projected: Optional[StrictInt] = Field(default=None, description="Cloud Units projected in the current usage period, based on units consumed to date and configuration of the test", alias="cloudUnitsProjected") + test_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the test generating usage", alias="testId") + test_name: Optional[StrictStr] = Field(default=None, description="Name of the test generating usage", alias="testName") + test_type: Optional[StrictStr] = Field(default=None, description="Type of test generating usage. Note that this is a friendly testType entry (so it shouldn’t be parsed to discover the correct endpoint to query for configuration details).", alias="testType") + is_instant_test: Optional[StrictBool] = Field(default=None, description="Indicates whether the test is scheduled or instant", alias="isInstantTest") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "enterpriseUnitsUsed", "enterpriseUnitsProjected", "cloudUnitsUsed", "cloudUnitsProjected", "testId", "testName", "testType", "isInstantTest"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UnitsByTestsBreakdownsInner 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 UnitsByTestsBreakdownsInner 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"), + "enterpriseUnitsUsed": obj.get("enterpriseUnitsUsed"), + "enterpriseUnitsProjected": obj.get("enterpriseUnitsProjected"), + "cloudUnitsUsed": obj.get("cloudUnitsUsed"), + "cloudUnitsProjected": obj.get("cloudUnitsProjected"), + "testId": obj.get("testId"), + "testName": obj.get("testName"), + "testType": obj.get("testType"), + "isInstantTest": obj.get("isInstantTest") + }) + return _obj + + diff --git a/usage/usage/models/usage.py b/usage/usage/models/usage.py new file mode 100644 index 00000000..6fbb86b5 --- /dev/null +++ b/usage/usage/models/usage.py @@ -0,0 +1,91 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from usage.models.usage_usage import UsageUsage +from typing import Optional, Set +from typing_extensions import Self + +class Usage(BaseModel): + """ + Usage + """ # noqa: E501 + usage: Optional[UsageUsage] = None + __properties: ClassVar[List[str]] = ["usage"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Usage 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 usage + if self.usage: + _dict['usage'] = self.usage.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Usage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "usage": UsageUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) + return _obj + + diff --git a/usage_api/usage_api/models/usage_usage.py b/usage/usage/models/usage_usage.py similarity index 79% rename from usage_api/usage_api/models/usage_usage.py rename to usage/usage/models/usage_usage.py index d9456cb8..4566cce7 100644 --- a/usage_api/usage_api/models/usage_usage.py +++ b/usage/usage/models/usage_usage.py @@ -3,9 +3,9 @@ """ Usage API - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. + 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.0 + The version of the OpenAPI document: 7.0.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,21 +17,17 @@ import pprint import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -from usage_api.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner -from usage_api.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner -from usage_api.models.endpoint_agents_inner import EndpointAgentsInner -from usage_api.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner -from usage_api.models.enterprise_agents_inner import EnterpriseAgentsInner -from usage_api.models.tests_inner import TestsInner -from usage_api.models.usage_usage_quota import UsageUsageQuota -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from usage.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner +from usage.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner +from usage.models.endpoint_agents_inner import EndpointAgentsInner +from usage.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner +from usage.models.enterprise_agents_inner import EnterpriseAgentsInner +from usage.models.tests_inner import TestsInner +from usage.models.usage_usage_quota import UsageUsageQuota +from typing import Optional, Set +from typing_extensions import Self class UsageUsage(BaseModel): """ @@ -56,10 +52,11 @@ class UsageUsage(BaseModel): enterprise_agents: Optional[List[EnterpriseAgentsInner]] = Field(default=None, description="Enterprise agents used by account group.", alias="enterpriseAgents") __properties: ClassVar[List[str]] = ["quota", "cloudUnitsUsed", "cloudUnitsProjected", "cloudUnitsNextBillingPeriod", "enterpriseUnitsUsed", "enterpriseUnitsProjected", "enterpriseUnitsNextBillingPeriod", "endpointAgentsUsed", "endpointAgentsEssentialsUsed", "endpointAgentsEmbeddedUsed", "enterpriseAgentsUsed", "enterpriseAgentUnits", "tests", "endpointAgents", "endpointAgentsEssentials", "endpointAgentsEmbedded", "enterpriseAgents"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +69,7 @@ class UsageUsage(BaseModel): return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UsageUsage from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,10 +83,12 @@ class UsageUsage(BaseModel): 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={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of quota @@ -140,7 +139,7 @@ class UsageUsage(BaseModel): return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UsageUsage from a dict""" if obj is None: return None @@ -149,7 +148,7 @@ class UsageUsage(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "quota": UsageUsageQuota.from_dict(obj.get("quota")) if obj.get("quota") is not None else None, + "quota": UsageUsageQuota.from_dict(obj["quota"]) if obj.get("quota") is not None else None, "cloudUnitsUsed": obj.get("cloudUnitsUsed"), "cloudUnitsProjected": obj.get("cloudUnitsProjected"), "cloudUnitsNextBillingPeriod": obj.get("cloudUnitsNextBillingPeriod"), @@ -160,12 +159,12 @@ class UsageUsage(BaseModel): "endpointAgentsEssentialsUsed": obj.get("endpointAgentsEssentialsUsed"), "endpointAgentsEmbeddedUsed": obj.get("endpointAgentsEmbeddedUsed"), "enterpriseAgentsUsed": obj.get("enterpriseAgentsUsed"), - "enterpriseAgentUnits": [EnterpriseAgentUnitsInner.from_dict(_item) for _item in obj.get("enterpriseAgentUnits")] if obj.get("enterpriseAgentUnits") is not None else None, - "tests": [TestsInner.from_dict(_item) for _item in obj.get("tests")] if obj.get("tests") is not None else None, - "endpointAgents": [EndpointAgentsInner.from_dict(_item) for _item in obj.get("endpointAgents")] if obj.get("endpointAgents") is not None else None, - "endpointAgentsEssentials": [EndpointAgentsEssentialsInner.from_dict(_item) for _item in obj.get("endpointAgentsEssentials")] if obj.get("endpointAgentsEssentials") is not None else None, - "endpointAgentsEmbedded": [EndpointAgentsEmbeddedInner.from_dict(_item) for _item in obj.get("endpointAgentsEmbedded")] if obj.get("endpointAgentsEmbedded") is not None else None, - "enterpriseAgents": [EnterpriseAgentsInner.from_dict(_item) for _item in obj.get("enterpriseAgents")] if obj.get("enterpriseAgents") is not None else None + "enterpriseAgentUnits": [EnterpriseAgentUnitsInner.from_dict(_item) for _item in obj["enterpriseAgentUnits"]] if obj.get("enterpriseAgentUnits") is not None else None, + "tests": [TestsInner.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None, + "endpointAgents": [EndpointAgentsInner.from_dict(_item) for _item in obj["endpointAgents"]] if obj.get("endpointAgents") is not None else None, + "endpointAgentsEssentials": [EndpointAgentsEssentialsInner.from_dict(_item) for _item in obj["endpointAgentsEssentials"]] if obj.get("endpointAgentsEssentials") is not None else None, + "endpointAgentsEmbedded": [EndpointAgentsEmbeddedInner.from_dict(_item) for _item in obj["endpointAgentsEmbedded"]] if obj.get("endpointAgentsEmbedded") is not None else None, + "enterpriseAgents": [EnterpriseAgentsInner.from_dict(_item) for _item in obj["enterpriseAgents"]] if obj.get("enterpriseAgents") is not None else None }) return _obj diff --git a/usage/usage/models/usage_usage_quota.py b/usage/usage/models/usage_usage_quota.py new file mode 100644 index 00000000..b50ac098 --- /dev/null +++ b/usage/usage/models/usage_usage_quota.py @@ -0,0 +1,100 @@ +# 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.2 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UsageUsageQuota(BaseModel): + """ + UsageUsageQuota + """ # noqa: E501 + month_start: Optional[datetime] = Field(default=None, description="Beginning of usage period in UTC (ISO date-time format).", alias="monthStart") + month_end: Optional[datetime] = Field(default=None, description="End of usage period in UTC (ISO date-time format)..", alias="monthEnd") + cloud_units_included: Optional[StrictInt] = Field(default=None, description="Monthly number of cloud units allocated, as part of the contract.", alias="cloudUnitsIncluded") + endpoint_agents_included: Optional[StrictInt] = Field(default=None, description="Monthly number of endpoint agents allocated, as part of the contract.", alias="endpointAgentsIncluded") + endpoint_agents_essentials_included: Optional[StrictInt] = Field(default=None, description="Monthly number of endpoint agents essentials allocated, as part of the contract.", alias="endpointAgentsEssentialsIncluded") + endpoint_agents_embedded_included: Optional[StrictInt] = Field(default=None, description="Number of embedded endpoint agents allocated monthly, as specified in the contract.", alias="endpointAgentsEmbeddedIncluded") + enterprise_agents_included: Optional[StrictInt] = Field(default=None, description="Monthly number of enterprise agents allocated, as part of the contract. Returns non-zero value only for organizations with legacy billing.", alias="enterpriseAgentsIncluded") + __properties: ClassVar[List[str]] = ["monthStart", "monthEnd", "cloudUnitsIncluded", "endpointAgentsIncluded", "endpointAgentsEssentialsIncluded", "endpointAgentsEmbeddedIncluded", "enterpriseAgentsIncluded"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UsageUsageQuota 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 UsageUsageQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "monthStart": obj.get("monthStart"), + "monthEnd": obj.get("monthEnd"), + "cloudUnitsIncluded": obj.get("cloudUnitsIncluded"), + "endpointAgentsIncluded": obj.get("endpointAgentsIncluded"), + "endpointAgentsEssentialsIncluded": obj.get("endpointAgentsEssentialsIncluded"), + "endpointAgentsEmbeddedIncluded": obj.get("endpointAgentsEmbeddedIncluded"), + "enterpriseAgentsIncluded": obj.get("enterpriseAgentsIncluded") + }) + return _obj + + diff --git a/usage/usage/models/validation_error.py b/usage/usage/models/validation_error.py new file mode 100644 index 00000000..29ea2858 --- /dev/null +++ b/usage/usage/models/validation_error.py @@ -0,0 +1,110 @@ +# 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.2 + 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 usage.models.validation_error_all_of_errors import ValidationErrorAllOfErrors +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[ValidationErrorAllOfErrors]] = 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @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": [ValidationErrorAllOfErrors.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/usage/usage/models/validation_error_all_of_errors.py b/usage/usage/models/validation_error_all_of_errors.py new file mode 100644 index 00000000..5918e384 --- /dev/null +++ b/usage/usage/models/validation_error_all_of_errors.py @@ -0,0 +1,91 @@ +# 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.2 + 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 ValidationErrorAllOfErrors(BaseModel): + """ + ValidationErrorAllOfErrors + """ # 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") + 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=(), + ) + + + 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 json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorAllOfErrors 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 ValidationErrorAllOfErrors 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/usage/usage/py.typed b/usage/usage/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/usage/usage/rest.py b/usage/usage/rest.py new file mode 100644 index 00000000..1efb0abd --- /dev/null +++ b/usage/usage/rest.py @@ -0,0 +1,257 @@ +# 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.2 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl + +import urllib3 + +from usage.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy: + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :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. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + # no content type provided or payload is json + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False + ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/usage_api/.github/workflows/python.yml b/usage_api/.github/workflows/python.yml deleted file mode 100644 index d182533a..00000000 --- a/usage_api/.github/workflows/python.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: usage_api Python package - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest diff --git a/usage_api/.gitlab-ci.yml b/usage_api/.gitlab-ci.yml deleted file mode 100644 index 9365e585..00000000 --- a/usage_api/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=usage_api - -pytest-3.7: - extends: .pytest - image: python:3.7-alpine -pytest-3.8: - extends: .pytest - image: python:3.8-alpine -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine diff --git a/usage_api/.openapi-generator/FILES b/usage_api/.openapi-generator/FILES deleted file mode 100644 index 24ffa16d..00000000 --- a/usage_api/.openapi-generator/FILES +++ /dev/null @@ -1,119 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -docs/AccountGroup.md -docs/AccountGroupId.md -docs/AccountGroupQuota.md -docs/EndpointAgentsEmbeddedInner.md -docs/EndpointAgentsEssentialsInner.md -docs/EndpointAgentsInner.md -docs/EnterpriseAgentUnitsInner.md -docs/EnterpriseAgentsInner.md -docs/Error.md -docs/Expand.md -docs/GetQuotas200Response.md -docs/GetUsage200Response.md -docs/Link.md -docs/OrganizationQuota.md -docs/OrganizationsQuotasAssign.md -docs/OrganizationsQuotasAssignOrganizationsInner.md -docs/OrganizationsQuotasUnassign.md -docs/OrganizationsQuotasUnassignOrganizationsInner.md -docs/Quotas.md -docs/QuotasApi.md -docs/QuotasAssignRequest.md -docs/QuotasAssignResponse.md -docs/QuotasQuotasInner.md -docs/QuotasUnassign.md -docs/SelfLinks.md -docs/SelfLinksLinks.md -docs/TestsInner.md -docs/UnauthorizedError.md -docs/Usage.md -docs/UsageApi.md -docs/UsageUsage.md -docs/UsageUsageQuota.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_account_group.py -test/test_account_group_id.py -test/test_account_group_quota.py -test/test_endpoint_agents_embedded_inner.py -test/test_endpoint_agents_essentials_inner.py -test/test_endpoint_agents_inner.py -test/test_enterprise_agent_units_inner.py -test/test_enterprise_agents_inner.py -test/test_error.py -test/test_expand.py -test/test_get_quotas200_response.py -test/test_get_usage200_response.py -test/test_link.py -test/test_organization_quota.py -test/test_organizations_quotas_assign.py -test/test_organizations_quotas_assign_organizations_inner.py -test/test_organizations_quotas_unassign.py -test/test_organizations_quotas_unassign_organizations_inner.py -test/test_quotas.py -test/test_quotas_api.py -test/test_quotas_assign_request.py -test/test_quotas_assign_response.py -test/test_quotas_quotas_inner.py -test/test_quotas_unassign.py -test/test_self_links.py -test/test_self_links_links.py -test/test_tests_inner.py -test/test_unauthorized_error.py -test/test_usage.py -test/test_usage_api.py -test/test_usage_usage.py -test/test_usage_usage_quota.py -tox.ini -usage_api/__init__.py -usage_api/api/__init__.py -usage_api/api/quotas_api.py -usage_api/api/usage_api.py -usage_api/api_client.py -usage_api/api_response.py -usage_api/configuration.py -usage_api/exceptions.py -usage_api/models/__init__.py -usage_api/models/account_group.py -usage_api/models/account_group_id.py -usage_api/models/account_group_quota.py -usage_api/models/endpoint_agents_embedded_inner.py -usage_api/models/endpoint_agents_essentials_inner.py -usage_api/models/endpoint_agents_inner.py -usage_api/models/enterprise_agent_units_inner.py -usage_api/models/enterprise_agents_inner.py -usage_api/models/error.py -usage_api/models/expand.py -usage_api/models/get_quotas200_response.py -usage_api/models/get_usage200_response.py -usage_api/models/link.py -usage_api/models/organization_quota.py -usage_api/models/organizations_quotas_assign.py -usage_api/models/organizations_quotas_assign_organizations_inner.py -usage_api/models/organizations_quotas_unassign.py -usage_api/models/organizations_quotas_unassign_organizations_inner.py -usage_api/models/quotas.py -usage_api/models/quotas_assign_request.py -usage_api/models/quotas_assign_response.py -usage_api/models/quotas_quotas_inner.py -usage_api/models/quotas_unassign.py -usage_api/models/self_links.py -usage_api/models/self_links_links.py -usage_api/models/tests_inner.py -usage_api/models/unauthorized_error.py -usage_api/models/usage.py -usage_api/models/usage_usage.py -usage_api/models/usage_usage_quota.py -usage_api/py.typed -usage_api/rest.py diff --git a/usage_api/.openapi-generator/VERSION b/usage_api/.openapi-generator/VERSION deleted file mode 100644 index 3769235d..00000000 --- a/usage_api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.1.0 \ No newline at end of file diff --git a/usage_api/.travis.yml b/usage_api/.travis.yml deleted file mode 100644 index d7975f96..00000000 --- a/usage_api/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=usage_api diff --git a/usage_api/README.md b/usage_api/README.md deleted file mode 100644 index e05f2270..00000000 --- a/usage_api/README.md +++ /dev/null @@ -1,167 +0,0 @@ -# usage-api -## Overview -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 API definitions below for detailed usage instructions and optional parameters. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 7.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## 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 git+https://github.com/thousandeyes/thousandeyes-python-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/thousandeyes/thousandeyes-python-sdk.git`) - -Then import the package: -```python -import usage_api -``` - -### 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 usage_api -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import usage_api -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.QuotasApi(api_client) - aid = '2067' # 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) - organizations_quotas_assign = usage_api.OrganizationsQuotasAssign() # OrganizationsQuotasAssign | (optional) - - try: - # Create or update accout group quotas - api_response = api_instance.assign_organizations_account_groups_quotas(aid=aid, organizations_quotas_assign=organizations_quotas_assign) - print("The response of QuotasApi->assign_organizations_account_groups_quotas:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling QuotasApi->assign_organizations_account_groups_quotas: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.thousandeyes.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*QuotasApi* | [**assign_organizations_account_groups_quotas**](docs/QuotasApi.md#assign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/assign | Create or update accout group quotas -*QuotasApi* | [**assign_organizations_quotas**](docs/QuotasApi.md#assign_organizations_quotas) | **POST** /v7/quotas/assign | Create or update organizations quotas -*QuotasApi* | [**get_quotas**](docs/QuotasApi.md#get_quotas) | **GET** /v7/quotas | Get organization and account group usage quota -*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_usage**](docs/UsageApi.md#get_usage) | **GET** /v7/usage | Get usage information for the last month - - -## Documentation For Models - - - [AccountGroup](docs/AccountGroup.md) - - [AccountGroupId](docs/AccountGroupId.md) - - [AccountGroupQuota](docs/AccountGroupQuota.md) - - [EndpointAgentsEmbeddedInner](docs/EndpointAgentsEmbeddedInner.md) - - [EndpointAgentsEssentialsInner](docs/EndpointAgentsEssentialsInner.md) - - [EndpointAgentsInner](docs/EndpointAgentsInner.md) - - [EnterpriseAgentUnitsInner](docs/EnterpriseAgentUnitsInner.md) - - [EnterpriseAgentsInner](docs/EnterpriseAgentsInner.md) - - [Error](docs/Error.md) - - [Expand](docs/Expand.md) - - [GetQuotas200Response](docs/GetQuotas200Response.md) - - [GetUsage200Response](docs/GetUsage200Response.md) - - [Link](docs/Link.md) - - [OrganizationQuota](docs/OrganizationQuota.md) - - [OrganizationsQuotasAssign](docs/OrganizationsQuotasAssign.md) - - [OrganizationsQuotasAssignOrganizationsInner](docs/OrganizationsQuotasAssignOrganizationsInner.md) - - [OrganizationsQuotasUnassign](docs/OrganizationsQuotasUnassign.md) - - [OrganizationsQuotasUnassignOrganizationsInner](docs/OrganizationsQuotasUnassignOrganizationsInner.md) - - [Quotas](docs/Quotas.md) - - [QuotasAssignRequest](docs/QuotasAssignRequest.md) - - [QuotasAssignResponse](docs/QuotasAssignResponse.md) - - [QuotasQuotasInner](docs/QuotasQuotasInner.md) - - [QuotasUnassign](docs/QuotasUnassign.md) - - [SelfLinks](docs/SelfLinks.md) - - [SelfLinksLinks](docs/SelfLinksLinks.md) - - [TestsInner](docs/TestsInner.md) - - [UnauthorizedError](docs/UnauthorizedError.md) - - [Usage](docs/Usage.md) - - [UsageUsage](docs/UsageUsage.md) - - [UsageUsageQuota](docs/UsageUsageQuota.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication - - -## Author - - - - diff --git a/usage_api/docs/AccountGroup.md b/usage_api/docs/AccountGroup.md deleted file mode 100644 index 5faee646..00000000 --- a/usage_api/docs/AccountGroup.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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 usage_api.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_form_dict = account_group.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/usage_api/docs/AccountGroupId.md b/usage_api/docs/AccountGroupId.md deleted file mode 100644 index 510011d5..00000000 --- a/usage_api/docs/AccountGroupId.md +++ /dev/null @@ -1,28 +0,0 @@ -# AccountGroupId - - -## 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] - -## Example - -```python -from usage_api.models.account_group_id import AccountGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of AccountGroupId from a JSON string -account_group_id_instance = AccountGroupId.from_json(json) -# print the JSON string representation of the object -print AccountGroupId.to_json() - -# convert the object into a dict -account_group_id_dict = account_group_id_instance.to_dict() -# create an instance of AccountGroupId from a dict -account_group_id_form_dict = account_group_id.from_dict(account_group_id_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/usage_api/docs/Error.md b/usage_api/docs/Error.md deleted file mode 100644 index 17aafc0d..00000000 --- a/usage_api/docs/Error.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 usage_api.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_form_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/usage_api/docs/Expand.md b/usage_api/docs/Expand.md deleted file mode 100644 index 5d5b5ca2..00000000 --- a/usage_api/docs/Expand.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/usage_api/docs/Link.md b/usage_api/docs/Link.md deleted file mode 100644 index 6b0e67c1..00000000 --- a/usage_api/docs/Link.md +++ /dev/null @@ -1,36 +0,0 @@ -# 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 usage_api.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_form_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/usage_api/docs/OrganizationsQuotasUnassignOrganizationsInner.md b/usage_api/docs/OrganizationsQuotasUnassignOrganizationsInner.md deleted file mode 100644 index 28fad9b7..00000000 --- a/usage_api/docs/OrganizationsQuotasUnassignOrganizationsInner.md +++ /dev/null @@ -1,29 +0,0 @@ -# OrganizationsQuotasUnassignOrganizationsInner - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**org_id** | **str** | Unique identifier of the organization. | [optional] -**account_groups** | **List[str]** | List of account group IDs. | [optional] - -## Example - -```python -from usage_api.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationsQuotasUnassignOrganizationsInner from a JSON string -organizations_quotas_unassign_organizations_inner_instance = OrganizationsQuotasUnassignOrganizationsInner.from_json(json) -# print the JSON string representation of the object -print OrganizationsQuotasUnassignOrganizationsInner.to_json() - -# convert the object into a dict -organizations_quotas_unassign_organizations_inner_dict = organizations_quotas_unassign_organizations_inner_instance.to_dict() -# create an instance of OrganizationsQuotasUnassignOrganizationsInner from a dict -organizations_quotas_unassign_organizations_inner_form_dict = organizations_quotas_unassign_organizations_inner.from_dict(organizations_quotas_unassign_organizations_inner_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/usage_api/docs/QuotasApi.md b/usage_api/docs/QuotasApi.md deleted file mode 100644 index 511f7d7e..00000000 --- a/usage_api/docs/QuotasApi.md +++ /dev/null @@ -1,429 +0,0 @@ -# usage_api.QuotasApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**assign_organizations_account_groups_quotas**](QuotasApi.md#assign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/assign | Create or update accout group quotas -[**assign_organizations_quotas**](QuotasApi.md#assign_organizations_quotas) | **POST** /v7/quotas/assign | Create or update organizations quotas -[**get_quotas**](QuotasApi.md#get_quotas) | **GET** /v7/quotas | Get organization and account group usage quota -[**unassign_organizations_account_groups_quotas**](QuotasApi.md#unassign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/unassign | Remove account group quotas from organizations -[**unassign_organizations_quotas**](QuotasApi.md#unassign_organizations_quotas) | **POST** /v7/quotas/unassign | Remove organization quotas - - -# **assign_organizations_account_groups_quotas** -> OrganizationsQuotasAssign assign_organizations_account_groups_quotas(aid=aid, organizations_quotas_assign=organizations_quotas_assign) - -Create or update accout group quotas - -Assigns quota values to multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. This endpoint has cumulative behavior: The quotas are assigned to the specified account groups, and the previous assignments persist. No unassignment takes place. This endpoint assigns quota values to multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows a cumulative behavior––This means that the quotas are assigned to the designated account groups, and any previous assignments remain in place without any unassignment occurring. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import usage_api -from usage_api.models.organizations_quotas_assign import OrganizationsQuotasAssign -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.QuotasApi(api_client) - aid = '2067' # 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) - organizations_quotas_assign = usage_api.OrganizationsQuotasAssign() # OrganizationsQuotasAssign | (optional) - - try: - # Create or update accout group quotas - api_response = api_instance.assign_organizations_account_groups_quotas(aid=aid, organizations_quotas_assign=organizations_quotas_assign) - print("The response of QuotasApi->assign_organizations_account_groups_quotas:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling QuotasApi->assign_organizations_account_groups_quotas: %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] - **organizations_quotas_assign** | [**OrganizationsQuotasAssign**](OrganizationsQuotasAssign.md)| | [optional] - -### Return type - -[**OrganizationsQuotasAssign**](OrganizationsQuotasAssign.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 | - | -**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) - -# **assign_organizations_quotas** -> QuotasAssignResponse assign_organizations_quotas(aid=aid, quotas_assign_request=quotas_assign_request) - -Create or update organizations quotas - -This endpoint recieves a list of organization quotas to create or update. If there's no specific `orgId` defined for a quota, it defaults to using the authenticated organization. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. This endpoint follows cumulative behavior––This means that the quotas are assigned to the specified organizations, and any previous assignments remain unchanged; no unassignments occur. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import usage_api -from usage_api.models.quotas_assign_request import QuotasAssignRequest -from usage_api.models.quotas_assign_response import QuotasAssignResponse -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.QuotasApi(api_client) - aid = '2067' # 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) - quotas_assign_request = usage_api.QuotasAssignRequest() # QuotasAssignRequest | (optional) - - try: - # Create or update organizations quotas - api_response = api_instance.assign_organizations_quotas(aid=aid, quotas_assign_request=quotas_assign_request) - print("The response of QuotasApi->assign_organizations_quotas:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling QuotasApi->assign_organizations_quotas: %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] - **quotas_assign_request** | [**QuotasAssignRequest**](QuotasAssignRequest.md)| | [optional] - -### Return type - -[**QuotasAssignResponse**](QuotasAssignResponse.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 | - | -**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_quotas** -> GetQuotas200Response get_quotas() - -Get organization and account group usage quota - -This endpoint retrieves usage quotas for both organization and account groups. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. If a user has quota update permission in multiple organizations, the API returns data from all such organizations. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import usage_api -from usage_api.models.get_quotas200_response import GetQuotas200Response -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.QuotasApi(api_client) - - try: - # Get organization and account group usage quota - api_response = api_instance.get_quotas() - print("The response of QuotasApi->get_quotas:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling QuotasApi->get_quotas: %s\n" % e) -``` - - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**GetQuotas200Response**](GetQuotas200Response.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) - -# **unassign_organizations_account_groups_quotas** -> unassign_organizations_account_groups_quotas(aid=aid, organizations_quotas_unassign=organizations_quotas_unassign) - -Remove account group quotas from organizations - -Removes the quotas from multiple account groups from multiple organizations. `Edit organization and account group quotas` permission (a management permission) is required. Removes quotas from multiple account groups across multiple organizations. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import usage_api -from usage_api.models.organizations_quotas_unassign import OrganizationsQuotasUnassign -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.QuotasApi(api_client) - aid = '2067' # 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) - organizations_quotas_unassign = usage_api.OrganizationsQuotasUnassign() # OrganizationsQuotasUnassign | (optional) - - try: - # Remove account group quotas from organizations - api_instance.unassign_organizations_account_groups_quotas(aid=aid, organizations_quotas_unassign=organizations_quotas_unassign) - except Exception as e: - print("Exception when calling QuotasApi->unassign_organizations_account_groups_quotas: %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] - **organizations_quotas_unassign** | [**OrganizationsQuotasUnassign**](OrganizationsQuotasUnassign.md)| | [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 | -|-------------|-------------|------------------| -**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) - -# **unassign_organizations_quotas** -> unassign_organizations_quotas(aid=aid, quotas_unassign=quotas_unassign) - -Remove organization quotas - -This endpoint recieves a list of organization IDs to remove their current quota. To use this endpoint, you need the `Edit organization and account group quotas` permission, which is a management-level permission. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import usage_api -from usage_api.models.quotas_unassign import QuotasUnassign -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.QuotasApi(api_client) - aid = '2067' # 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) - quotas_unassign = usage_api.QuotasUnassign() # QuotasUnassign | (optional) - - try: - # Remove organization quotas - api_instance.unassign_organizations_quotas(aid=aid, quotas_unassign=quotas_unassign) - except Exception as e: - print("Exception when calling QuotasApi->unassign_organizations_quotas: %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] - **quotas_unassign** | [**QuotasUnassign**](QuotasUnassign.md)| | [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 | -|-------------|-------------|------------------| -**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) - diff --git a/usage_api/docs/SelfLinks.md b/usage_api/docs/SelfLinks.md deleted file mode 100644 index ee780ff4..00000000 --- a/usage_api/docs/SelfLinks.md +++ /dev/null @@ -1,28 +0,0 @@ -# SelfLinks - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**SelfLinksLinks**](SelfLinksLinks.md) | | [optional] - -## Example - -```python -from usage_api.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_form_dict = self_links.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/usage_api/docs/SelfLinksLinks.md b/usage_api/docs/SelfLinksLinks.md deleted file mode 100644 index 9539d2c9..00000000 --- a/usage_api/docs/SelfLinksLinks.md +++ /dev/null @@ -1,29 +0,0 @@ -# SelfLinksLinks - -A links object containing the self link. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_self** | [**Link**](Link.md) | | [optional] - -## Example - -```python -from usage_api.models.self_links_links import SelfLinksLinks - -# TODO update the JSON string below -json = "{}" -# create an instance of SelfLinksLinks from a JSON string -self_links_links_instance = SelfLinksLinks.from_json(json) -# print the JSON string representation of the object -print SelfLinksLinks.to_json() - -# convert the object into a dict -self_links_links_dict = self_links_links_instance.to_dict() -# create an instance of SelfLinksLinks from a dict -self_links_links_form_dict = self_links_links.from_dict(self_links_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/usage_api/docs/UnauthorizedError.md b/usage_api/docs/UnauthorizedError.md deleted file mode 100644 index 06fe8f52..00000000 --- a/usage_api/docs/UnauthorizedError.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnauthorizedError - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | [optional] -**error_description** | **str** | | [optional] - -## Example - -```python -from usage_api.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_form_dict = unauthorized_error.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/usage_api/docs/UsageApi.md b/usage_api/docs/UsageApi.md deleted file mode 100644 index 059195f7..00000000 --- a/usage_api/docs/UsageApi.md +++ /dev/null @@ -1,95 +0,0 @@ -# usage_api.UsageApi - -All URIs are relative to *https://api.thousandeyes.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_usage**](UsageApi.md#get_usage) | **GET** /v7/usage | Get usage information for the last month - - -# **get_usage** -> GetUsage200Response get_usage(aid=aid, expand=expand) - -Get usage information for the last month - -This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. - -### Example - -* Bearer Authentication (BearerAuth): -```python -import time -import os -import usage_api -from usage_api.models.expand import Expand -from usage_api.models.get_usage200_response import GetUsage200Response -from usage_api.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 = usage_api.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 = usage_api.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with usage_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.UsageApi(api_client) - aid = '2067' # 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 = [usage_api.Expand()] # List[Expand] | Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. (optional) - - try: - # Get usage information for the last month - api_response = api_instance.get_usage(aid=aid, expand=expand) - print("The response of UsageApi->get_usage:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling UsageApi->get_usage: %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] - **expand** | [**List[Expand]**](Expand.md)| Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. | [optional] - -### Return type - -[**GetUsage200Response**](GetUsage200Response.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) - diff --git a/usage_api/git_push.sh b/usage_api/git_push.sh deleted file mode 100644 index 6faad0b0..00000000 --- a/usage_api/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="thousandeyes" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="thousandeyes-python-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/usage_api/pyproject.toml b/usage_api/pyproject.toml deleted file mode 100644 index f65d270b..00000000 --- a/usage_api/pyproject.toml +++ /dev/null @@ -1,30 +0,0 @@ -[tool.poetry] -name = "usage_api" -version = "1.0.0" -description = "Usage API" -authors = ["OpenAPI Generator Community "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/thousandeyes/thousandeyes-python-sdk" -keywords = ["OpenAPI", "OpenAPI-Generator", "Usage API"] -include = ["usage_api/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" diff --git a/usage_api/setup.py b/usage_api/setup.py deleted file mode 100644 index 96c745ac..00000000 --- a/usage_api/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "usage-api" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Usage API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="https://github.com/thousandeyes/thousandeyes-python-sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "Usage API"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - """, # noqa: E501 - package_data={"usage_api": ["py.typed"]}, -) diff --git a/usage_api/test-requirements.txt b/usage_api/test-requirements.txt deleted file mode 100644 index 3a0d0b93..00000000 --- a/usage_api/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=7.1.3 -pytest-cov>=2.8.1 -pytest-randomly>=3.12.0 diff --git a/usage_api/test/test_account_group.py b/usage_api/test/test_account_group.py deleted file mode 100644 index 9bc18746..00000000 --- a/usage_api/test/test_account_group.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.account_group import AccountGroup - -class TestAccountGroup(unittest.TestCase): - """AccountGroup unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroup: - """Test AccountGroup - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroup` - """ - model = AccountGroup() - if include_optional: - return AccountGroup( - aid = '11', - account_group_name = 'Account A' - ) - else: - return AccountGroup( - ) - """ - - def testAccountGroup(self): - """Test AccountGroup""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_account_group_id.py b/usage_api/test/test_account_group_id.py deleted file mode 100644 index d8b0ea41..00000000 --- a/usage_api/test/test_account_group_id.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.account_group_id import AccountGroupId - -class TestAccountGroupId(unittest.TestCase): - """AccountGroupId unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupId: - """Test AccountGroupId - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupId` - """ - model = AccountGroupId() - if include_optional: - return AccountGroupId( - aid = '11' - ) - else: - return AccountGroupId( - ) - """ - - def testAccountGroupId(self): - """Test AccountGroupId""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_account_group_quota.py b/usage_api/test/test_account_group_quota.py deleted file mode 100644 index 33ff6f81..00000000 --- a/usage_api/test/test_account_group_quota.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.account_group_quota import AccountGroupQuota - -class TestAccountGroupQuota(unittest.TestCase): - """AccountGroupQuota unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AccountGroupQuota: - """Test AccountGroupQuota - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AccountGroupQuota` - """ - model = AccountGroupQuota() - if include_optional: - return AccountGroupQuota( - value = 12000, - aid = '35' - ) - else: - return AccountGroupQuota( - ) - """ - - def testAccountGroupQuota(self): - """Test AccountGroupQuota""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_endpoint_agents_embedded_inner.py b/usage_api/test/test_endpoint_agents_embedded_inner.py deleted file mode 100644 index 4ffb84e2..00000000 --- a/usage_api/test/test_endpoint_agents_embedded_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner - -class TestEndpointAgentsEmbeddedInner(unittest.TestCase): - """EndpointAgentsEmbeddedInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentsEmbeddedInner: - """Test EndpointAgentsEmbeddedInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentsEmbeddedInner` - """ - model = EndpointAgentsEmbeddedInner() - if include_optional: - return EndpointAgentsEmbeddedInner( - aid = None, - account_group_name = None, - endpoint_agents_embedded_used = 56 - ) - else: - return EndpointAgentsEmbeddedInner( - ) - """ - - def testEndpointAgentsEmbeddedInner(self): - """Test EndpointAgentsEmbeddedInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_endpoint_agents_essentials_inner.py b/usage_api/test/test_endpoint_agents_essentials_inner.py deleted file mode 100644 index 9013d5fa..00000000 --- a/usage_api/test/test_endpoint_agents_essentials_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner - -class TestEndpointAgentsEssentialsInner(unittest.TestCase): - """EndpointAgentsEssentialsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentsEssentialsInner: - """Test EndpointAgentsEssentialsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentsEssentialsInner` - """ - model = EndpointAgentsEssentialsInner() - if include_optional: - return EndpointAgentsEssentialsInner( - aid = None, - account_group_name = None, - endpoint_agents_essentials_used = 56 - ) - else: - return EndpointAgentsEssentialsInner( - ) - """ - - def testEndpointAgentsEssentialsInner(self): - """Test EndpointAgentsEssentialsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_endpoint_agents_inner.py b/usage_api/test/test_endpoint_agents_inner.py deleted file mode 100644 index e77befb3..00000000 --- a/usage_api/test/test_endpoint_agents_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.endpoint_agents_inner import EndpointAgentsInner - -class TestEndpointAgentsInner(unittest.TestCase): - """EndpointAgentsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EndpointAgentsInner: - """Test EndpointAgentsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EndpointAgentsInner` - """ - model = EndpointAgentsInner() - if include_optional: - return EndpointAgentsInner( - aid = None, - account_group_name = None, - endpoint_agents_used = 56 - ) - else: - return EndpointAgentsInner( - ) - """ - - def testEndpointAgentsInner(self): - """Test EndpointAgentsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_enterprise_agent_units_inner.py b/usage_api/test/test_enterprise_agent_units_inner.py deleted file mode 100644 index 06a4d5fd..00000000 --- a/usage_api/test/test_enterprise_agent_units_inner.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner - -class TestEnterpriseAgentUnitsInner(unittest.TestCase): - """EnterpriseAgentUnitsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgentUnitsInner: - """Test EnterpriseAgentUnitsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgentUnitsInner` - """ - model = EnterpriseAgentUnitsInner() - if include_optional: - return EnterpriseAgentUnitsInner( - aid = None, - account_group_name = None, - agent_id = '', - agent_name = '', - enterprise_units_used = 56, - enterprise_units_projected = 56, - vagent_id = '' - ) - else: - return EnterpriseAgentUnitsInner( - ) - """ - - def testEnterpriseAgentUnitsInner(self): - """Test EnterpriseAgentUnitsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_enterprise_agents_inner.py b/usage_api/test/test_enterprise_agents_inner.py deleted file mode 100644 index 0ad80e78..00000000 --- a/usage_api/test/test_enterprise_agents_inner.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.enterprise_agents_inner import EnterpriseAgentsInner - -class TestEnterpriseAgentsInner(unittest.TestCase): - """EnterpriseAgentsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnterpriseAgentsInner: - """Test EnterpriseAgentsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnterpriseAgentsInner` - """ - model = EnterpriseAgentsInner() - if include_optional: - return EnterpriseAgentsInner( - aid = None, - account_group_name = None, - enterprise_agents_used = 56 - ) - else: - return EnterpriseAgentsInner( - ) - """ - - def testEnterpriseAgentsInner(self): - """Test EnterpriseAgentsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_error.py b/usage_api/test/test_error.py deleted file mode 100644 index bd7fda74..00000000 --- a/usage_api/test/test_error.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.error import Error - -class TestError(unittest.TestCase): - """Error unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Error: - """Test Error - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Error` - """ - model = Error() - if include_optional: - return Error( - type = '', - title = '', - status = 56, - detail = '', - instance = '' - ) - else: - return Error( - ) - """ - - def testError(self): - """Test Error""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_expand.py b/usage_api/test/test_expand.py deleted file mode 100644 index 9a2611a4..00000000 --- a/usage_api/test/test_expand.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.expand import Expand - -class TestExpand(unittest.TestCase): - """Expand unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testExpand(self): - """Test Expand""" - # inst = Expand() - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_get_quotas200_response.py b/usage_api/test/test_get_quotas200_response.py deleted file mode 100644 index 7c1c1e40..00000000 --- a/usage_api/test/test_get_quotas200_response.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.get_quotas200_response import GetQuotas200Response - -class TestGetQuotas200Response(unittest.TestCase): - """GetQuotas200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetQuotas200Response: - """Test GetQuotas200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetQuotas200Response` - """ - model = GetQuotas200Response() - if include_optional: - return GetQuotas200Response( - quotas = [ - usage_api.models.quotas_quotas_inner.Quotas_quotas_inner( - organization_quota = usage_api.models.organization_quota.OrganizationQuota( - value = 22500, - org_id = '10', ), - account_group_quotas = [{"value":12000,"aid":"315"},{"value":10000,"aid":"1200"}], ) - ], - links = usage_api.models.self_links__links.SelfLinks__links( - self = usage_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetQuotas200Response( - ) - """ - - def testGetQuotas200Response(self): - """Test GetQuotas200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_get_usage200_response.py b/usage_api/test/test_get_usage200_response.py deleted file mode 100644 index c3612241..00000000 --- a/usage_api/test/test_get_usage200_response.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.get_usage200_response import GetUsage200Response - -class TestGetUsage200Response(unittest.TestCase): - """GetUsage200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUsage200Response: - """Test GetUsage200Response - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUsage200Response` - """ - model = GetUsage200Response() - if include_optional: - return GetUsage200Response( - usage = usage_api.models.usage_usage.Usage_usage( - quota = usage_api.models.usage_usage_quota.Usage_usage_quota( - month_start = '2020-01-05T08:00Z', - month_end = '2020-02-05T08:00Z', - cloud_units_included = 4320000000, - endpoint_agents_included = 200, - endpoint_agents_essentials_included = 10, - endpoint_agents_embedded_included = 10, - enterprise_agents_included = 25, ), - cloud_units_used = 8500489, - cloud_units_projected = 20993812, - cloud_units_next_billing_period = 25123456, - enterprise_units_used = 79640902, - enterprise_units_projected = 108016317, - enterprise_units_next_billing_period = 0, - endpoint_agents_used = 42, - endpoint_agents_essentials_used = 5, - endpoint_agents_embedded_used = 5, - enterprise_agents_used = 58, - enterprise_agent_units = [ - [{"aid":"7625","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"}] - ], - tests = [{"aid":"315","testId":"1158","accountGroupName":"Documentation","testName":"https://app.thousandeyes.com","testType":"Web-Page Load","cloudUnitsUsed":14050,"cloudUnitsProjected":340674},{"aid":"315","testId":"1159","accountGroupName":"Documentation","testName":"https://support.thousandeyes.com","testType":"Web - HTTP Server","cloudUnitsUsed":64390,"cloudUnitsProjected":164457}], - endpoint_agents = [{"aid":"7625","accountGroupName":"Support","endpointAgentsUsed":22},{"aid":"315","accountGroupName":"Documentation","endpointAgentsUsed":14}], - endpoint_agents_essentials = [{"aid":"10","accountGroupName":"Support","endpointAgentsEssentialsUsed":2},{"aid":"100","accountGroupName":"Documentation","endpointAgentsEssentialsUsed":3}], - endpoint_agents_embedded = [{"aid":"10","accountGroupName":"Support","endpointAgentsEmbeddedUsed":2},{"aid":"100","accountGroupName":"Documentation","endpointAgentsEmbeddedUsed":3}], - enterprise_agents = [{"aid":"7625","accountGroupName":"Support","enterpriseAgentsUsed":7},{"aid":"315","accountGroupName":"Documentation","enterpriseAgentsUsed":1}], ), - links = usage_api.models.self_links__links.SelfLinks__links( - self = usage_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return GetUsage200Response( - ) - """ - - def testGetUsage200Response(self): - """Test GetUsage200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_link.py b/usage_api/test/test_link.py deleted file mode 100644 index 5da306bf..00000000 --- a/usage_api/test/test_link.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.link import Link - -class TestLink(unittest.TestCase): - """Link unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Link: - """Test Link - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Link` - """ - model = Link() - if include_optional: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '' - ) - else: - return Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - ) - """ - - def testLink(self): - """Test Link""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_organization_quota.py b/usage_api/test/test_organization_quota.py deleted file mode 100644 index e6bf5f88..00000000 --- a/usage_api/test/test_organization_quota.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.organization_quota import OrganizationQuota - -class TestOrganizationQuota(unittest.TestCase): - """OrganizationQuota unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationQuota: - """Test OrganizationQuota - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationQuota` - """ - model = OrganizationQuota() - if include_optional: - return OrganizationQuota( - value = 22500, - org_id = '10' - ) - else: - return OrganizationQuota( - value = 22500, - ) - """ - - def testOrganizationQuota(self): - """Test OrganizationQuota""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_organizations_quotas_assign.py b/usage_api/test/test_organizations_quotas_assign.py deleted file mode 100644 index a3cdcee5..00000000 --- a/usage_api/test/test_organizations_quotas_assign.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.organizations_quotas_assign import OrganizationsQuotasAssign - -class TestOrganizationsQuotasAssign(unittest.TestCase): - """OrganizationsQuotasAssign unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationsQuotasAssign: - """Test OrganizationsQuotasAssign - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationsQuotasAssign` - """ - model = OrganizationsQuotasAssign() - if include_optional: - return OrganizationsQuotasAssign( - organizations = [ - usage_api.models.organizations_quotas_assign_organizations_inner.OrganizationsQuotasAssign_organizations_inner( - org_id = '315', - account_groups = [ - usage_api.models.account_group_quota.AccountGroupQuota( - value = 12000, - aid = '35', ) - ], ) - ] - ) - else: - return OrganizationsQuotasAssign( - ) - """ - - def testOrganizationsQuotasAssign(self): - """Test OrganizationsQuotasAssign""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_organizations_quotas_assign_organizations_inner.py b/usage_api/test/test_organizations_quotas_assign_organizations_inner.py deleted file mode 100644 index 8b09c547..00000000 --- a/usage_api/test/test_organizations_quotas_assign_organizations_inner.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner - -class TestOrganizationsQuotasAssignOrganizationsInner(unittest.TestCase): - """OrganizationsQuotasAssignOrganizationsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationsQuotasAssignOrganizationsInner: - """Test OrganizationsQuotasAssignOrganizationsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationsQuotasAssignOrganizationsInner` - """ - model = OrganizationsQuotasAssignOrganizationsInner() - if include_optional: - return OrganizationsQuotasAssignOrganizationsInner( - org_id = '315', - account_groups = [ - usage_api.models.account_group_quota.AccountGroupQuota( - value = 12000, - aid = '35', ) - ] - ) - else: - return OrganizationsQuotasAssignOrganizationsInner( - ) - """ - - def testOrganizationsQuotasAssignOrganizationsInner(self): - """Test OrganizationsQuotasAssignOrganizationsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_organizations_quotas_unassign.py b/usage_api/test/test_organizations_quotas_unassign.py deleted file mode 100644 index 17cd6ffa..00000000 --- a/usage_api/test/test_organizations_quotas_unassign.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.organizations_quotas_unassign import OrganizationsQuotasUnassign - -class TestOrganizationsQuotasUnassign(unittest.TestCase): - """OrganizationsQuotasUnassign unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationsQuotasUnassign: - """Test OrganizationsQuotasUnassign - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationsQuotasUnassign` - """ - model = OrganizationsQuotasUnassign() - if include_optional: - return OrganizationsQuotasUnassign( - organizations = [ - usage_api.models.organizations_quotas_unassign_organizations_inner.OrganizationsQuotasUnassign_organizations_inner( - org_id = '315', - account_groups = ["35","720"], ) - ] - ) - else: - return OrganizationsQuotasUnassign( - ) - """ - - def testOrganizationsQuotasUnassign(self): - """Test OrganizationsQuotasUnassign""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_organizations_quotas_unassign_organizations_inner.py b/usage_api/test/test_organizations_quotas_unassign_organizations_inner.py deleted file mode 100644 index 9178ff2f..00000000 --- a/usage_api/test/test_organizations_quotas_unassign_organizations_inner.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner - -class TestOrganizationsQuotasUnassignOrganizationsInner(unittest.TestCase): - """OrganizationsQuotasUnassignOrganizationsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OrganizationsQuotasUnassignOrganizationsInner: - """Test OrganizationsQuotasUnassignOrganizationsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OrganizationsQuotasUnassignOrganizationsInner` - """ - model = OrganizationsQuotasUnassignOrganizationsInner() - if include_optional: - return OrganizationsQuotasUnassignOrganizationsInner( - org_id = '315', - account_groups = ["35","720"] - ) - else: - return OrganizationsQuotasUnassignOrganizationsInner( - ) - """ - - def testOrganizationsQuotasUnassignOrganizationsInner(self): - """Test OrganizationsQuotasUnassignOrganizationsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_quotas.py b/usage_api/test/test_quotas.py deleted file mode 100644 index 6ead5f9e..00000000 --- a/usage_api/test/test_quotas.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.quotas import Quotas - -class TestQuotas(unittest.TestCase): - """Quotas unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Quotas: - """Test Quotas - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Quotas` - """ - model = Quotas() - if include_optional: - return Quotas( - quotas = [ - usage_api.models.quotas_quotas_inner.Quotas_quotas_inner( - organization_quota = usage_api.models.organization_quota.OrganizationQuota( - value = 22500, - org_id = '10', ), - account_group_quotas = [{"value":12000,"aid":"315"},{"value":10000,"aid":"1200"}], ) - ] - ) - else: - return Quotas( - ) - """ - - def testQuotas(self): - """Test Quotas""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_quotas_api.py b/usage_api/test/test_quotas_api.py deleted file mode 100644 index 921e22a8..00000000 --- a/usage_api/test/test_quotas_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from usage_api.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(self) -> None: - """Test case for assign_organizations_account_groups_quotas - - Create or update accout group quotas - """ - pass - - def test_assign_organizations_quotas(self) -> None: - """Test case for assign_organizations_quotas - - Create or update organizations quotas - """ - pass - - def test_get_quotas(self) -> None: - """Test case for get_quotas - - Get organization and account group usage quota - """ - pass - - def test_unassign_organizations_account_groups_quotas(self) -> None: - """Test case for unassign_organizations_account_groups_quotas - - Remove account group quotas from organizations - """ - pass - - def test_unassign_organizations_quotas(self) -> None: - """Test case for unassign_organizations_quotas - - Remove organization quotas - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_quotas_assign_request.py b/usage_api/test/test_quotas_assign_request.py deleted file mode 100644 index 92065a7a..00000000 --- a/usage_api/test/test_quotas_assign_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.quotas_assign_request import QuotasAssignRequest - -class TestQuotasAssignRequest(unittest.TestCase): - """QuotasAssignRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QuotasAssignRequest: - """Test QuotasAssignRequest - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QuotasAssignRequest` - """ - model = QuotasAssignRequest() - if include_optional: - return QuotasAssignRequest( - organizations = [{"value":12000},{"orgId":"315","value":10000}] - ) - else: - return QuotasAssignRequest( - ) - """ - - def testQuotasAssignRequest(self): - """Test QuotasAssignRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_quotas_assign_response.py b/usage_api/test/test_quotas_assign_response.py deleted file mode 100644 index 515587f7..00000000 --- a/usage_api/test/test_quotas_assign_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.quotas_assign_response import QuotasAssignResponse - -class TestQuotasAssignResponse(unittest.TestCase): - """QuotasAssignResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QuotasAssignResponse: - """Test QuotasAssignResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QuotasAssignResponse` - """ - model = QuotasAssignResponse() - if include_optional: - return QuotasAssignResponse( - organizations = [{"orgId":"100","value":12000},{"orgId":"315","value":10000}] - ) - else: - return QuotasAssignResponse( - ) - """ - - def testQuotasAssignResponse(self): - """Test QuotasAssignResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_quotas_quotas_inner.py b/usage_api/test/test_quotas_quotas_inner.py deleted file mode 100644 index 087d9eb2..00000000 --- a/usage_api/test/test_quotas_quotas_inner.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.quotas_quotas_inner import QuotasQuotasInner - -class TestQuotasQuotasInner(unittest.TestCase): - """QuotasQuotasInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QuotasQuotasInner: - """Test QuotasQuotasInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QuotasQuotasInner` - """ - model = QuotasQuotasInner() - if include_optional: - return QuotasQuotasInner( - organization_quota = usage_api.models.organization_quota.OrganizationQuota( - value = 22500, - org_id = '10', ), - account_group_quotas = [{"value":12000,"aid":"315"},{"value":10000,"aid":"1200"}] - ) - else: - return QuotasQuotasInner( - ) - """ - - def testQuotasQuotasInner(self): - """Test QuotasQuotasInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_quotas_unassign.py b/usage_api/test/test_quotas_unassign.py deleted file mode 100644 index 739a0717..00000000 --- a/usage_api/test/test_quotas_unassign.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.quotas_unassign import QuotasUnassign - -class TestQuotasUnassign(unittest.TestCase): - """QuotasUnassign unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QuotasUnassign: - """Test QuotasUnassign - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QuotasUnassign` - """ - model = QuotasUnassign() - if include_optional: - return QuotasUnassign( - organizations = ["100","315"] - ) - else: - return QuotasUnassign( - ) - """ - - def testQuotasUnassign(self): - """Test QuotasUnassign""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_self_links.py b/usage_api/test/test_self_links.py deleted file mode 100644 index 3093d651..00000000 --- a/usage_api/test/test_self_links.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.self_links import SelfLinks - -class TestSelfLinks(unittest.TestCase): - """SelfLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinks: - """Test SelfLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinks` - """ - model = SelfLinks() - if include_optional: - return SelfLinks( - links = usage_api.models.self_links__links.SelfLinks__links( - self = usage_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ), ) - ) - else: - return SelfLinks( - ) - """ - - def testSelfLinks(self): - """Test SelfLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_self_links_links.py b/usage_api/test/test_self_links_links.py deleted file mode 100644 index cf9ed3b4..00000000 --- a/usage_api/test/test_self_links_links.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.self_links_links import SelfLinksLinks - -class TestSelfLinksLinks(unittest.TestCase): - """SelfLinksLinks unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SelfLinksLinks: - """Test SelfLinksLinks - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SelfLinksLinks` - """ - model = SelfLinksLinks() - if include_optional: - return SelfLinksLinks( - var_self = usage_api.models.link.Link( - href = 'https://api.thousandeyes.com/v7/link/to/resource/id', - templated = True, - type = '', - deprecation = '', - name = '', - profile = '', - title = '', - hreflang = '', ) - ) - else: - return SelfLinksLinks( - ) - """ - - def testSelfLinksLinks(self): - """Test SelfLinksLinks""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_tests_inner.py b/usage_api/test/test_tests_inner.py deleted file mode 100644 index 7574e19e..00000000 --- a/usage_api/test/test_tests_inner.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.tests_inner import TestsInner - -class TestTestsInner(unittest.TestCase): - """TestsInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TestsInner: - """Test TestsInner - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TestsInner` - """ - model = TestsInner() - if include_optional: - return TestsInner( - aid = None, - account_group_name = None, - test_id = '', - test_name = '', - test_type = '', - cloud_units_used = 56, - cloud_units_projected = 56 - ) - else: - return TestsInner( - ) - """ - - def testTestsInner(self): - """Test TestsInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_unauthorized_error.py b/usage_api/test/test_unauthorized_error.py deleted file mode 100644 index 713ba0bb..00000000 --- a/usage_api/test/test_unauthorized_error.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.unauthorized_error import UnauthorizedError - -class TestUnauthorizedError(unittest.TestCase): - """UnauthorizedError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnauthorizedError: - """Test UnauthorizedError - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnauthorizedError` - """ - model = UnauthorizedError() - if include_optional: - return UnauthorizedError( - error = 'invalid_token', - error_description = 'Invalid access token' - ) - else: - return UnauthorizedError( - ) - """ - - def testUnauthorizedError(self): - """Test UnauthorizedError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_usage.py b/usage_api/test/test_usage.py deleted file mode 100644 index 02fc03d3..00000000 --- a/usage_api/test/test_usage.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.usage import Usage - -class TestUsage(unittest.TestCase): - """Usage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Usage: - """Test Usage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Usage` - """ - model = Usage() - if include_optional: - return Usage( - usage = usage_api.models.usage_usage.Usage_usage( - quota = usage_api.models.usage_usage_quota.Usage_usage_quota( - month_start = '2020-01-05T08:00Z', - month_end = '2020-02-05T08:00Z', - cloud_units_included = 4320000000, - endpoint_agents_included = 200, - endpoint_agents_essentials_included = 10, - endpoint_agents_embedded_included = 10, - enterprise_agents_included = 25, ), - cloud_units_used = 8500489, - cloud_units_projected = 20993812, - cloud_units_next_billing_period = 25123456, - enterprise_units_used = 79640902, - enterprise_units_projected = 108016317, - enterprise_units_next_billing_period = 0, - endpoint_agents_used = 42, - endpoint_agents_essentials_used = 5, - endpoint_agents_embedded_used = 5, - enterprise_agents_used = 58, - enterprise_agent_units = [ - [{"aid":"7625","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"}] - ], - tests = [{"aid":"315","testId":"1158","accountGroupName":"Documentation","testName":"https://app.thousandeyes.com","testType":"Web-Page Load","cloudUnitsUsed":14050,"cloudUnitsProjected":340674},{"aid":"315","testId":"1159","accountGroupName":"Documentation","testName":"https://support.thousandeyes.com","testType":"Web - HTTP Server","cloudUnitsUsed":64390,"cloudUnitsProjected":164457}], - endpoint_agents = [{"aid":"7625","accountGroupName":"Support","endpointAgentsUsed":22},{"aid":"315","accountGroupName":"Documentation","endpointAgentsUsed":14}], - endpoint_agents_essentials = [{"aid":"10","accountGroupName":"Support","endpointAgentsEssentialsUsed":2},{"aid":"100","accountGroupName":"Documentation","endpointAgentsEssentialsUsed":3}], - endpoint_agents_embedded = [{"aid":"10","accountGroupName":"Support","endpointAgentsEmbeddedUsed":2},{"aid":"100","accountGroupName":"Documentation","endpointAgentsEmbeddedUsed":3}], - enterprise_agents = [{"aid":"7625","accountGroupName":"Support","enterpriseAgentsUsed":7},{"aid":"315","accountGroupName":"Documentation","enterpriseAgentsUsed":1}], ) - ) - else: - return Usage( - ) - """ - - def testUsage(self): - """Test Usage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_usage_api.py b/usage_api/test/test_usage_api.py deleted file mode 100644 index 3a56a4b2..00000000 --- a/usage_api/test/test_usage_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from usage_api.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_usage(self) -> None: - """Test case for get_usage - - Get usage information for the last month - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_usage_usage.py b/usage_api/test/test_usage_usage.py deleted file mode 100644 index 53945fb4..00000000 --- a/usage_api/test/test_usage_usage.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.usage_usage import UsageUsage - -class TestUsageUsage(unittest.TestCase): - """UsageUsage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UsageUsage: - """Test UsageUsage - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UsageUsage` - """ - model = UsageUsage() - if include_optional: - return UsageUsage( - quota = usage_api.models.usage_usage_quota.Usage_usage_quota( - month_start = '2020-01-05T08:00Z', - month_end = '2020-02-05T08:00Z', - cloud_units_included = 4320000000, - endpoint_agents_included = 200, - endpoint_agents_essentials_included = 10, - endpoint_agents_embedded_included = 10, - enterprise_agents_included = 25, ), - cloud_units_used = 8500489, - cloud_units_projected = 20993812, - cloud_units_next_billing_period = 25123456, - enterprise_units_used = 79640902, - enterprise_units_projected = 108016317, - enterprise_units_next_billing_period = 0, - endpoint_agents_used = 42, - endpoint_agents_essentials_used = 5, - endpoint_agents_embedded_used = 5, - enterprise_agents_used = 58, - enterprise_agent_units = [ - [{"aid":"7625","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"}] - ], - tests = [{"aid":"315","testId":"1158","accountGroupName":"Documentation","testName":"https://app.thousandeyes.com","testType":"Web-Page Load","cloudUnitsUsed":14050,"cloudUnitsProjected":340674},{"aid":"315","testId":"1159","accountGroupName":"Documentation","testName":"https://support.thousandeyes.com","testType":"Web - HTTP Server","cloudUnitsUsed":64390,"cloudUnitsProjected":164457}], - endpoint_agents = [{"aid":"7625","accountGroupName":"Support","endpointAgentsUsed":22},{"aid":"315","accountGroupName":"Documentation","endpointAgentsUsed":14}], - endpoint_agents_essentials = [{"aid":"10","accountGroupName":"Support","endpointAgentsEssentialsUsed":2},{"aid":"100","accountGroupName":"Documentation","endpointAgentsEssentialsUsed":3}], - endpoint_agents_embedded = [{"aid":"10","accountGroupName":"Support","endpointAgentsEmbeddedUsed":2},{"aid":"100","accountGroupName":"Documentation","endpointAgentsEmbeddedUsed":3}], - enterprise_agents = [{"aid":"7625","accountGroupName":"Support","enterpriseAgentsUsed":7},{"aid":"315","accountGroupName":"Documentation","enterpriseAgentsUsed":1}] - ) - else: - return UsageUsage( - ) - """ - - def testUsageUsage(self): - """Test UsageUsage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/test/test_usage_usage_quota.py b/usage_api/test/test_usage_usage_quota.py deleted file mode 100644 index 1825e2c7..00000000 --- a/usage_api/test/test_usage_usage_quota.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest -import datetime - -from usage_api.models.usage_usage_quota import UsageUsageQuota - -class TestUsageUsageQuota(unittest.TestCase): - """UsageUsageQuota unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UsageUsageQuota: - """Test UsageUsageQuota - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UsageUsageQuota` - """ - model = UsageUsageQuota() - if include_optional: - return UsageUsageQuota( - month_start = '2020-01-05T08:00Z', - month_end = '2020-02-05T08:00Z', - cloud_units_included = 4320000000, - endpoint_agents_included = 200, - endpoint_agents_essentials_included = 10, - endpoint_agents_embedded_included = 10, - enterprise_agents_included = 25 - ) - else: - return UsageUsageQuota( - ) - """ - - def testUsageUsageQuota(self): - """Test UsageUsageQuota""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/usage_api/tox.ini b/usage_api/tox.ini deleted file mode 100644 index 40abcf3d..00000000 --- a/usage_api/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=usage_api diff --git a/usage_api/usage_api/__init__.py b/usage_api/usage_api/__init__.py deleted file mode 100644 index b5392efa..00000000 --- a/usage_api/usage_api/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 usage_api.api.quotas_api import QuotasApi -from usage_api.api.usage_api import UsageApi - -# import ApiClient -from usage_api.api_response import ApiResponse -from usage_api.api_client import ApiClient -from usage_api.configuration import Configuration -from usage_api.exceptions import OpenApiException -from usage_api.exceptions import ApiTypeError -from usage_api.exceptions import ApiValueError -from usage_api.exceptions import ApiKeyError -from usage_api.exceptions import ApiAttributeError -from usage_api.exceptions import ApiException - -# import models into sdk package -from usage_api.models.account_group import AccountGroup -from usage_api.models.account_group_id import AccountGroupId -from usage_api.models.account_group_quota import AccountGroupQuota -from usage_api.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner -from usage_api.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner -from usage_api.models.endpoint_agents_inner import EndpointAgentsInner -from usage_api.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner -from usage_api.models.enterprise_agents_inner import EnterpriseAgentsInner -from usage_api.models.error import Error -from usage_api.models.expand import Expand -from usage_api.models.get_quotas200_response import GetQuotas200Response -from usage_api.models.get_usage200_response import GetUsage200Response -from usage_api.models.link import Link -from usage_api.models.organization_quota import OrganizationQuota -from usage_api.models.organizations_quotas_assign import OrganizationsQuotasAssign -from usage_api.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner -from usage_api.models.organizations_quotas_unassign import OrganizationsQuotasUnassign -from usage_api.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner -from usage_api.models.quotas import Quotas -from usage_api.models.quotas_assign_request import QuotasAssignRequest -from usage_api.models.quotas_assign_response import QuotasAssignResponse -from usage_api.models.quotas_quotas_inner import QuotasQuotasInner -from usage_api.models.quotas_unassign import QuotasUnassign -from usage_api.models.self_links import SelfLinks -from usage_api.models.self_links_links import SelfLinksLinks -from usage_api.models.tests_inner import TestsInner -from usage_api.models.unauthorized_error import UnauthorizedError -from usage_api.models.usage import Usage -from usage_api.models.usage_usage import UsageUsage -from usage_api.models.usage_usage_quota import UsageUsageQuota diff --git a/usage_api/usage_api/api/__init__.py b/usage_api/usage_api/api/__init__.py deleted file mode 100644 index 523c0d03..00000000 --- a/usage_api/usage_api/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# flake8: noqa - -# import apis into api package -from usage_api.api.quotas_api import QuotasApi -from usage_api.api.usage_api import UsageApi - diff --git a/usage_api/usage_api/api/usage_api.py b/usage_api/usage_api/api/usage_api.py deleted file mode 100644 index 6a484f0a..00000000 --- a/usage_api/usage_api/api/usage_api.py +++ /dev/null @@ -1,351 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import warnings - -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from pydantic import StrictStr - -from typing import List, Optional - -from usage_api.models.expand import Expand -from usage_api.models.get_usage200_response import GetUsage200Response - -from usage_api.api_client import ApiClient -from usage_api.api_response import ApiResponse -from usage_api.rest import RESTResponseType - - -class UsageApi: - """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() - self.api_client = api_client - - - @validate_call - def get_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, - expand: Annotated[Optional[List[Expand]], Field(description="Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.")] = 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, - ) -> GetUsage200Response: - """Get usage information for the last month - - This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. - - :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: Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. - :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_usage_serialize( - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUsage200Response", - '400': "Error", - '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, - ).data - - - @validate_call - def get_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, - expand: Annotated[Optional[List[Expand]], Field(description="Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.")] = 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[GetUsage200Response]: - """Get usage information for the last month - - This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. - - :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: Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. - :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_usage_serialize( - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUsage200Response", - '400': "Error", - '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, - ) - - - @validate_call - def get_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, - expand: Annotated[Optional[List[Expand]], Field(description="Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.")] = 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 usage information for the last month - - This endpoint returns the organization's usage data for a specified time period. If no time period is specified, it defaults to the last month. - - :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: Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'. - :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_usage_serialize( - aid=aid, - expand=expand, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUsage200Response", - '400': "Error", - '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_usage_serialize( - self, - aid, - expand, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _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, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # 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 - - - # 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/usage', - 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/usage_api/usage_api/api_client.py b/usage_api/usage_api/api_client.py deleted file mode 100644 index b74be28c..00000000 --- a/usage_api/usage_api/api_client.py +++ /dev/null @@ -1,741 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import atexit -import datetime -from dateutil.parser import parse -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List - -from usage_api.configuration import Configuration -from usage_api.api_response import ApiResponse -import usage_api.models -from usage_api import rest -from usage_api.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'ThousandEyes Python SDK' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> Tuple: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :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. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') - raise e - - return response_data - - def response_deserialize( - self, - response_data=None, - response_types_map=None - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = obj.to_dict() - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - - # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: - data = response_text - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(usage_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - - def files_parameters(self, files=None): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/usage_api/usage_api/api_response.py b/usage_api/usage_api/api_response.py deleted file mode 100644 index 2ac1ada6..00000000 --- a/usage_api/usage_api/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/usage_api/usage_api/configuration.py b/usage_api/usage_api/configuration.py deleted file mode 100644 index b7c7d495..00000000 --- a/usage_api/usage_api/configuration.py +++ /dev/null @@ -1,434 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -import sys -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - - :Example: - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.thousandeyes.com" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("usage_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 7.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.thousandeyes.com", - 'description': "Thousandeyes API production URL", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/usage_api/usage_api/exceptions.py b/usage_api/usage_api/exceptions.py deleted file mode 100644 index 17b26bf6..00000000 --- a/usage_api/usage_api/exceptions.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - -class BadRequestException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) - -class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) - - -class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) - - -class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) - - -class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/usage_api/usage_api/models/__init__.py b/usage_api/usage_api/models/__init__.py deleted file mode 100644 index 87ccb3aa..00000000 --- a/usage_api/usage_api/models/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from usage_api.models.account_group import AccountGroup -from usage_api.models.account_group_id import AccountGroupId -from usage_api.models.account_group_quota import AccountGroupQuota -from usage_api.models.endpoint_agents_embedded_inner import EndpointAgentsEmbeddedInner -from usage_api.models.endpoint_agents_essentials_inner import EndpointAgentsEssentialsInner -from usage_api.models.endpoint_agents_inner import EndpointAgentsInner -from usage_api.models.enterprise_agent_units_inner import EnterpriseAgentUnitsInner -from usage_api.models.enterprise_agents_inner import EnterpriseAgentsInner -from usage_api.models.error import Error -from usage_api.models.expand import Expand -from usage_api.models.get_quotas200_response import GetQuotas200Response -from usage_api.models.get_usage200_response import GetUsage200Response -from usage_api.models.link import Link -from usage_api.models.organization_quota import OrganizationQuota -from usage_api.models.organizations_quotas_assign import OrganizationsQuotasAssign -from usage_api.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner -from usage_api.models.organizations_quotas_unassign import OrganizationsQuotasUnassign -from usage_api.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner -from usage_api.models.quotas import Quotas -from usage_api.models.quotas_assign_request import QuotasAssignRequest -from usage_api.models.quotas_assign_response import QuotasAssignResponse -from usage_api.models.quotas_quotas_inner import QuotasQuotasInner -from usage_api.models.quotas_unassign import QuotasUnassign -from usage_api.models.self_links import SelfLinks -from usage_api.models.self_links_links import SelfLinksLinks -from usage_api.models.tests_inner import TestsInner -from usage_api.models.unauthorized_error import UnauthorizedError -from usage_api.models.usage import Usage -from usage_api.models.usage_usage import UsageUsage -from usage_api.models.usage_usage_quota import UsageUsageQuota diff --git a/usage_api/usage_api/models/account_group.py b/usage_api/usage_api/models/account_group.py deleted file mode 100644 index 14f5e85f..00000000 --- a/usage_api/usage_api/models/account_group.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/usage_api/usage_api/models/account_group_id.py b/usage_api/usage_api/models/account_group_id.py deleted file mode 100644 index 5e8a02bb..00000000 --- a/usage_api/usage_api/models/account_group_id.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupId(BaseModel): - """ - AccountGroupId - """ # 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.") - __properties: ClassVar[List[str]] = ["aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupId 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupId 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") - }) - return _obj - - diff --git a/usage_api/usage_api/models/account_group_quota.py b/usage_api/usage_api/models/account_group_quota.py deleted file mode 100644 index b01431e1..00000000 --- a/usage_api/usage_api/models/account_group_quota.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class AccountGroupQuota(BaseModel): - """ - AccountGroupQuota - """ # noqa: E501 - value: Optional[StrictInt] = Field(default=None, description="Value of the quota for the given Account Group.") - aid: Optional[StrictStr] = Field(default=None, description="Unique ID of the account group.") - __properties: ClassVar[List[str]] = ["value", "aid"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AccountGroupQuota 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of AccountGroupQuota from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "value": obj.get("value"), - "aid": obj.get("aid") - }) - return _obj - - diff --git a/usage_api/usage_api/models/endpoint_agents_embedded_inner.py b/usage_api/usage_api/models/endpoint_agents_embedded_inner.py deleted file mode 100644 index f706c859..00000000 --- a/usage_api/usage_api/models/endpoint_agents_embedded_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentsEmbeddedInner(BaseModel): - """ - EndpointAgentsEmbeddedInner - """ # noqa: E501 - aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group that owns the embedded endpoint agents.") - account_group_name: Optional[Any] = Field(default=None, description="Name of the account group that owns the embedded endpoint agents.", alias="accountGroupName") - endpoint_agents_embedded_used: Optional[StrictInt] = Field(default=None, description="Number of endpoint agents embedded owned by the specific account group in the usage period.", alias="endpointAgentsEmbeddedUsed") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "endpointAgentsEmbeddedUsed"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentsEmbeddedInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if aid (nullable) is None - # and model_fields_set contains the field - if self.aid is None and "aid" in self.model_fields_set: - _dict['aid'] = None - - # set to None if account_group_name (nullable) is None - # and model_fields_set contains the field - if self.account_group_name is None and "account_group_name" in self.model_fields_set: - _dict['accountGroupName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentsEmbeddedInner 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"), - "endpointAgentsEmbeddedUsed": obj.get("endpointAgentsEmbeddedUsed") - }) - return _obj - - diff --git a/usage_api/usage_api/models/endpoint_agents_essentials_inner.py b/usage_api/usage_api/models/endpoint_agents_essentials_inner.py deleted file mode 100644 index dec89db9..00000000 --- a/usage_api/usage_api/models/endpoint_agents_essentials_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentsEssentialsInner(BaseModel): - """ - EndpointAgentsEssentialsInner - """ # noqa: E501 - aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group owning the endpoint agents essentials.") - account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the endpoint agents essentials.", alias="accountGroupName") - endpoint_agents_essentials_used: Optional[StrictInt] = Field(default=None, description="Number of endpoint agents essentials owned by the specific account group in the usage period.", alias="endpointAgentsEssentialsUsed") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "endpointAgentsEssentialsUsed"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentsEssentialsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if aid (nullable) is None - # and model_fields_set contains the field - if self.aid is None and "aid" in self.model_fields_set: - _dict['aid'] = None - - # set to None if account_group_name (nullable) is None - # and model_fields_set contains the field - if self.account_group_name is None and "account_group_name" in self.model_fields_set: - _dict['accountGroupName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentsEssentialsInner 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"), - "endpointAgentsEssentialsUsed": obj.get("endpointAgentsEssentialsUsed") - }) - return _obj - - diff --git a/usage_api/usage_api/models/endpoint_agents_inner.py b/usage_api/usage_api/models/endpoint_agents_inner.py deleted file mode 100644 index bca2f152..00000000 --- a/usage_api/usage_api/models/endpoint_agents_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EndpointAgentsInner(BaseModel): - """ - EndpointAgentsInner - """ # noqa: E501 - aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group owning the endpoint agents.") - account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the endpoint agents.", alias="accountGroupName") - endpoint_agents_used: Optional[StrictInt] = Field(default=None, description="Number of endpoint agents owned by the specific account group in the usage period.", alias="endpointAgentsUsed") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "endpointAgentsUsed"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EndpointAgentsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if aid (nullable) is None - # and model_fields_set contains the field - if self.aid is None and "aid" in self.model_fields_set: - _dict['aid'] = None - - # set to None if account_group_name (nullable) is None - # and model_fields_set contains the field - if self.account_group_name is None and "account_group_name" in self.model_fields_set: - _dict['accountGroupName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EndpointAgentsInner 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"), - "endpointAgentsUsed": obj.get("endpointAgentsUsed") - }) - return _obj - - diff --git a/usage_api/usage_api/models/enterprise_agent_units_inner.py b/usage_api/usage_api/models/enterprise_agent_units_inner.py deleted file mode 100644 index 743d8308..00000000 --- a/usage_api/usage_api/models/enterprise_agent_units_inner.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EnterpriseAgentUnitsInner(BaseModel): - """ - EnterpriseAgentUnitsInner - """ # noqa: E501 - aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group owning the enterprise agent units.") - account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the enterprise agent units.", alias="accountGroupName") - agent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the enterprise agent generating usage.", alias="agentId") - agent_name: Optional[StrictStr] = Field(default=None, description="Name of the enterprise agent generating usage.", alias="agentName") - enterprise_units_used: Optional[StrictInt] = Field(default=None, description="Number of enterprise agent units owned by the specific account group in the usage period.", alias="enterpriseUnitsUsed") - enterprise_units_projected: Optional[StrictInt] = Field(default=None, description="Number of enterprise units projected in the current usage period, based on units consumed to date and configuration of enabled tests. This value is updated hourly. Returns non-zero value only for organizations with metered billing.", alias="enterpriseUnitsProjected") - vagent_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the virtual agent generating usage", alias="vagentId") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "agentId", "agentName", "enterpriseUnitsUsed", "enterpriseUnitsProjected", "vagentId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EnterpriseAgentUnitsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if aid (nullable) is None - # and model_fields_set contains the field - if self.aid is None and "aid" in self.model_fields_set: - _dict['aid'] = None - - # set to None if account_group_name (nullable) is None - # and model_fields_set contains the field - if self.account_group_name is None and "account_group_name" in self.model_fields_set: - _dict['accountGroupName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EnterpriseAgentUnitsInner 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"), - "agentId": obj.get("agentId"), - "agentName": obj.get("agentName"), - "enterpriseUnitsUsed": obj.get("enterpriseUnitsUsed"), - "enterpriseUnitsProjected": obj.get("enterpriseUnitsProjected"), - "vagentId": obj.get("vagentId") - }) - return _obj - - diff --git a/usage_api/usage_api/models/enterprise_agents_inner.py b/usage_api/usage_api/models/enterprise_agents_inner.py deleted file mode 100644 index 9d1e0eb4..00000000 --- a/usage_api/usage_api/models/enterprise_agents_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class EnterpriseAgentsInner(BaseModel): - """ - EnterpriseAgentsInner - """ # noqa: E501 - aid: Optional[Any] = Field(default=None, description="A unique identifier that specifies the account group that owns the enterprise agents.") - account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the enterprise agents.", alias="accountGroupName") - enterprise_agents_used: Optional[StrictInt] = Field(default=None, description="Number of enterprise agents owned by the specific account group in the usage period.", alias="enterpriseAgentsUsed") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "enterpriseAgentsUsed"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of EnterpriseAgentsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if aid (nullable) is None - # and model_fields_set contains the field - if self.aid is None and "aid" in self.model_fields_set: - _dict['aid'] = None - - # set to None if account_group_name (nullable) is None - # and model_fields_set contains the field - if self.account_group_name is None and "account_group_name" in self.model_fields_set: - _dict['accountGroupName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of EnterpriseAgentsInner 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"), - "enterpriseAgentsUsed": obj.get("enterpriseAgentsUsed") - }) - return _obj - - diff --git a/usage_api/usage_api/models/error.py b/usage_api/usage_api/models/error.py deleted file mode 100644 index 1fec5c73..00000000 --- a/usage_api/usage_api/models/error.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/usage_api/usage_api/models/expand.py b/usage_api/usage_api/models/expand.py deleted file mode 100644 index 17494331..00000000 --- a/usage_api/usage_api/models/expand.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class Expand(str, Enum): - """ - Expand - """ - - """ - allowed enum values - """ - TEST = 'test' - ENTERPRISE_MINUS_AGENT = 'enterprise-agent' - ENTERPRISE_MINUS_AGENT_MINUS_UNIT = 'enterprise-agent-unit' - ENDPOINT_MINUS_AGENT = 'endpoint-agent' - ENDPOINT_MINUS_AGENT_MINUS_ESSENTIAL = 'endpoint-agent-essential' - ENDPOINT_MINUS_AGENT_MINUS_EMBEDDED = 'endpoint-agent-embedded' - - @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/usage_api/usage_api/models/get_quotas200_response.py b/usage_api/usage_api/models/get_quotas200_response.py deleted file mode 100644 index 79fe0c3e..00000000 --- a/usage_api/usage_api/models/get_quotas200_response.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from usage_api.models.quotas_quotas_inner import QuotasQuotasInner -from usage_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetQuotas200Response(BaseModel): - """ - GetQuotas200Response - """ # noqa: E501 - quotas: Optional[List[QuotasQuotasInner]] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["quotas", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetQuotas200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in quotas (list) - _items = [] - if self.quotas: - for _item in self.quotas: - if _item: - _items.append(_item.to_dict()) - _dict['quotas'] = _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: Dict) -> Self: - """Create an instance of GetQuotas200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "quotas": [QuotasQuotasInner.from_dict(_item) for _item in obj.get("quotas")] if obj.get("quotas") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/get_usage200_response.py b/usage_api/usage_api/models/get_usage200_response.py deleted file mode 100644 index d9eadaac..00000000 --- a/usage_api/usage_api/models/get_usage200_response.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from usage_api.models.self_links_links import SelfLinksLinks -from usage_api.models.usage_usage import UsageUsage -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetUsage200Response(BaseModel): - """ - GetUsage200Response - """ # noqa: E501 - usage: Optional[UsageUsage] = None - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["usage", "_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetUsage200Response 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of usage - if self.usage: - _dict['usage'] = self.usage.to_dict() - # 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: Dict) -> Self: - """Create an instance of GetUsage200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "usage": UsageUsage.from_dict(obj.get("usage")) if obj.get("usage") is not None else None, - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/link.py b/usage_api/usage_api/models/link.py deleted file mode 100644 index b85e2c17..00000000 --- a/usage_api/usage_api/models/link.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/usage_api/usage_api/models/organization_quota.py b/usage_api/usage_api/models/organization_quota.py deleted file mode 100644 index 3027d146..00000000 --- a/usage_api/usage_api/models/organization_quota.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrganizationQuota(BaseModel): - """ - OrganizationQuota - """ # noqa: E501 - value: StrictInt = Field(description="Value of the quota for the given Organization.") - org_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the organization.", alias="orgId") - __properties: ClassVar[List[str]] = ["value", "orgId"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrganizationQuota 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrganizationQuota from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "value": obj.get("value"), - "orgId": obj.get("orgId") - }) - return _obj - - diff --git a/usage_api/usage_api/models/organizations_quotas_assign.py b/usage_api/usage_api/models/organizations_quotas_assign.py deleted file mode 100644 index a251b7e3..00000000 --- a/usage_api/usage_api/models/organizations_quotas_assign.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from usage_api.models.organizations_quotas_assign_organizations_inner import OrganizationsQuotasAssignOrganizationsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrganizationsQuotasAssign(BaseModel): - """ - OrganizationsQuotasAssign - """ # noqa: E501 - organizations: Optional[List[OrganizationsQuotasAssignOrganizationsInner]] = None - __properties: ClassVar[List[str]] = ["organizations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrganizationsQuotasAssign 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) - _items = [] - if self.organizations: - for _item in self.organizations: - if _item: - _items.append(_item.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrganizationsQuotasAssign from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [OrganizationsQuotasAssignOrganizationsInner.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/organizations_quotas_assign_organizations_inner.py b/usage_api/usage_api/models/organizations_quotas_assign_organizations_inner.py deleted file mode 100644 index d20ce46a..00000000 --- a/usage_api/usage_api/models/organizations_quotas_assign_organizations_inner.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -from usage_api.models.account_group_quota import AccountGroupQuota -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrganizationsQuotasAssignOrganizationsInner(BaseModel): - """ - OrganizationsQuotasAssignOrganizationsInner - """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.", alias="orgId") - account_groups: Optional[List[AccountGroupQuota]] = Field(default=None, description="List of account groups quotas.", alias="accountGroups") - __properties: ClassVar[List[str]] = ["orgId", "accountGroups"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrganizationsQuotasAssignOrganizationsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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 - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrganizationsQuotasAssignOrganizationsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "accountGroups": [AccountGroupQuota.from_dict(_item) for _item in obj.get("accountGroups")] if obj.get("accountGroups") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/organizations_quotas_unassign.py b/usage_api/usage_api/models/organizations_quotas_unassign.py deleted file mode 100644 index e217e151..00000000 --- a/usage_api/usage_api/models/organizations_quotas_unassign.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from usage_api.models.organizations_quotas_unassign_organizations_inner import OrganizationsQuotasUnassignOrganizationsInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrganizationsQuotasUnassign(BaseModel): - """ - OrganizationsQuotasUnassign - """ # noqa: E501 - organizations: Optional[List[OrganizationsQuotasUnassignOrganizationsInner]] = None - __properties: ClassVar[List[str]] = ["organizations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrganizationsQuotasUnassign 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) - _items = [] - if self.organizations: - for _item in self.organizations: - if _item: - _items.append(_item.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrganizationsQuotasUnassign from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [OrganizationsQuotasUnassignOrganizationsInner.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/organizations_quotas_unassign_organizations_inner.py b/usage_api/usage_api/models/organizations_quotas_unassign_organizations_inner.py deleted file mode 100644 index d7c0606b..00000000 --- a/usage_api/usage_api/models/organizations_quotas_unassign_organizations_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrganizationsQuotasUnassignOrganizationsInner(BaseModel): - """ - OrganizationsQuotasUnassignOrganizationsInner - """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the organization.", alias="orgId") - account_groups: Optional[List[StrictStr]] = Field(default=None, description="List of account group IDs.", alias="accountGroups") - __properties: ClassVar[List[str]] = ["orgId", "accountGroups"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrganizationsQuotasUnassignOrganizationsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrganizationsQuotasUnassignOrganizationsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "accountGroups": obj.get("accountGroups") - }) - return _obj - - diff --git a/usage_api/usage_api/models/quotas.py b/usage_api/usage_api/models/quotas.py deleted file mode 100644 index d9d9a4d6..00000000 --- a/usage_api/usage_api/models/quotas.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from usage_api.models.quotas_quotas_inner import QuotasQuotasInner -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Quotas(BaseModel): - """ - Quotas - """ # noqa: E501 - quotas: Optional[List[QuotasQuotasInner]] = None - __properties: ClassVar[List[str]] = ["quotas"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Quotas 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in quotas (list) - _items = [] - if self.quotas: - for _item in self.quotas: - if _item: - _items.append(_item.to_dict()) - _dict['quotas'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Quotas from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "quotas": [QuotasQuotasInner.from_dict(_item) for _item in obj.get("quotas")] if obj.get("quotas") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/quotas_assign_request.py b/usage_api/usage_api/models/quotas_assign_request.py deleted file mode 100644 index bc012722..00000000 --- a/usage_api/usage_api/models/quotas_assign_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from usage_api.models.organization_quota import OrganizationQuota -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QuotasAssignRequest(BaseModel): - """ - QuotasAssignRequest - """ # noqa: E501 - organizations: Optional[List[OrganizationQuota]] = None - __properties: ClassVar[List[str]] = ["organizations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QuotasAssignRequest 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) - _items = [] - if self.organizations: - for _item in self.organizations: - if _item: - _items.append(_item.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QuotasAssignRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [OrganizationQuota.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/quotas_assign_response.py b/usage_api/usage_api/models/quotas_assign_response.py deleted file mode 100644 index 111a9095..00000000 --- a/usage_api/usage_api/models/quotas_assign_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from usage_api.models.organization_quota import OrganizationQuota -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QuotasAssignResponse(BaseModel): - """ - QuotasAssignResponse - """ # noqa: E501 - organizations: Optional[List[OrganizationQuota]] = None - __properties: ClassVar[List[str]] = ["organizations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QuotasAssignResponse 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) - _items = [] - if self.organizations: - for _item in self.organizations: - if _item: - _items.append(_item.to_dict()) - _dict['organizations'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QuotasAssignResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": [OrganizationQuota.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/quotas_quotas_inner.py b/usage_api/usage_api/models/quotas_quotas_inner.py deleted file mode 100644 index 81348854..00000000 --- a/usage_api/usage_api/models/quotas_quotas_inner.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from usage_api.models.account_group_quota import AccountGroupQuota -from usage_api.models.organization_quota import OrganizationQuota -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QuotasQuotasInner(BaseModel): - """ - QuotasQuotasInner - """ # noqa: E501 - organization_quota: Optional[OrganizationQuota] = Field(default=None, alias="organizationQuota") - account_group_quotas: Optional[List[AccountGroupQuota]] = Field(default=None, alias="accountGroupQuotas") - __properties: ClassVar[List[str]] = ["organizationQuota", "accountGroupQuotas"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QuotasQuotasInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of organization_quota - if self.organization_quota: - _dict['organizationQuota'] = self.organization_quota.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in account_group_quotas (list) - _items = [] - if self.account_group_quotas: - for _item in self.account_group_quotas: - if _item: - _items.append(_item.to_dict()) - _dict['accountGroupQuotas'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QuotasQuotasInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizationQuota": OrganizationQuota.from_dict(obj.get("organizationQuota")) if obj.get("organizationQuota") is not None else None, - "accountGroupQuotas": [AccountGroupQuota.from_dict(_item) for _item in obj.get("accountGroupQuotas")] if obj.get("accountGroupQuotas") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/quotas_unassign.py b/usage_api/usage_api/models/quotas_unassign.py deleted file mode 100644 index 5ef37ea4..00000000 --- a/usage_api/usage_api/models/quotas_unassign.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class QuotasUnassign(BaseModel): - """ - QuotasUnassign - """ # noqa: E501 - organizations: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["organizations"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of QuotasUnassign 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of QuotasUnassign from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "organizations": obj.get("organizations") - }) - return _obj - - diff --git a/usage_api/usage_api/models/self_links.py b/usage_api/usage_api/models/self_links.py deleted file mode 100644 index 1cf60f8f..00000000 --- a/usage_api/usage_api/models/self_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from usage_api.models.self_links_links import SelfLinksLinks -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinks(BaseModel): - """ - SelfLinks - """ # noqa: E501 - links: Optional[SelfLinksLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["_links"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # 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: Dict) -> 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({ - "_links": SelfLinksLinks.from_dict(obj.get("_links")) if obj.get("_links") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/self_links_links.py b/usage_api/usage_api/models/self_links_links.py deleted file mode 100644 index af7798a1..00000000 --- a/usage_api/usage_api/models/self_links_links.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from usage_api.models.link import Link -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class SelfLinksLinks(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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SelfLinksLinks 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - 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: Dict) -> Self: - """Create an instance of SelfLinksLinks 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.get("self")) if obj.get("self") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/tests_inner.py b/usage_api/usage_api/models/tests_inner.py deleted file mode 100644 index 460876ab..00000000 --- a/usage_api/usage_api/models/tests_inner.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class TestsInner(BaseModel): - """ - TestsInner - """ # noqa: E501 - aid: Optional[Any] = Field(default=None, description="Unique identifier of the account group which owns the test.") - account_group_name: Optional[Any] = Field(default=None, description="Name of the account group which owns the test.", alias="accountGroupName") - test_id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the test generating usage.", alias="testId") - test_name: Optional[StrictStr] = Field(default=None, description="Name of the test generating usage.", alias="testName") - test_type: Optional[StrictStr] = Field(default=None, description="The type of test that generated the usage data. Note that this parameter provides a user-friendly description of the test type and should not be parsed to determine the endpoint for querying configuration details.", alias="testType") - cloud_units_used: Optional[StrictInt] = Field(default=None, description="Number of cloud units that the test has consumed in the usage period.", alias="cloudUnitsUsed") - cloud_units_projected: Optional[StrictInt] = Field(default=None, description="The estimated number of cloud units that the test is expected to consume during the usage period. This estimate is determined by considering the units consumed up to the current time and the test's configuration. It's important to note that this value is updated every hour. For new tests, the `cloudUnitsProjected` parameter is absent until the projection is calculated.", alias="cloudUnitsProjected") - __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "testId", "testName", "testType", "cloudUnitsUsed", "cloudUnitsProjected"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of TestsInner 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if aid (nullable) is None - # and model_fields_set contains the field - if self.aid is None and "aid" in self.model_fields_set: - _dict['aid'] = None - - # set to None if account_group_name (nullable) is None - # and model_fields_set contains the field - if self.account_group_name is None and "account_group_name" in self.model_fields_set: - _dict['accountGroupName'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of TestsInner 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"), - "testId": obj.get("testId"), - "testName": obj.get("testName"), - "testType": obj.get("testType"), - "cloudUnitsUsed": obj.get("cloudUnitsUsed"), - "cloudUnitsProjected": obj.get("cloudUnitsProjected") - }) - return _obj - - diff --git a/usage_api/usage_api/models/unauthorized_error.py b/usage_api/usage_api/models/unauthorized_error.py deleted file mode 100644 index 91640452..00000000 --- a/usage_api/usage_api/models/unauthorized_error.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - 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 = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> 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/usage_api/usage_api/models/usage.py b/usage_api/usage_api/models/usage.py deleted file mode 100644 index a982ea21..00000000 --- a/usage_api/usage_api/models/usage.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from usage_api.models.usage_usage import UsageUsage -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class Usage(BaseModel): - """ - Usage - """ # noqa: E501 - usage: Optional[UsageUsage] = None - __properties: ClassVar[List[str]] = ["usage"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of Usage 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of usage - if self.usage: - _dict['usage'] = self.usage.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of Usage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "usage": UsageUsage.from_dict(obj.get("usage")) if obj.get("usage") is not None else None - }) - return _obj - - diff --git a/usage_api/usage_api/models/usage_usage_quota.py b/usage_api/usage_api/models/usage_usage_quota.py deleted file mode 100644 index 847310cd..00000000 --- a/usage_api/usage_api/models/usage_usage_quota.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - 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 typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UsageUsageQuota(BaseModel): - """ - UsageUsageQuota - """ # noqa: E501 - month_start: Optional[datetime] = Field(default=None, description="Beginning of usage period in UTC (ISO date-time format).", alias="monthStart") - month_end: Optional[datetime] = Field(default=None, description="End of usage period in UTC (ISO date-time format)..", alias="monthEnd") - cloud_units_included: Optional[StrictInt] = Field(default=None, description="Monthly number of cloud units allocated, as part of the contract.", alias="cloudUnitsIncluded") - endpoint_agents_included: Optional[StrictInt] = Field(default=None, description="Monthly number of endpoint agents allocated, as part of the contract.", alias="endpointAgentsIncluded") - endpoint_agents_essentials_included: Optional[StrictInt] = Field(default=None, description="Monthly number of endpoint agents essentials allocated, as part of the contract.", alias="endpointAgentsEssentialsIncluded") - endpoint_agents_embedded_included: Optional[StrictInt] = Field(default=None, description="Number of embedded endpoint agents allocated monthly, as specified in the contract.", alias="endpointAgentsEmbeddedIncluded") - enterprise_agents_included: Optional[StrictInt] = Field(default=None, description="Monthly number of enterprise agents allocated, as part of the contract. Returns non-zero value only for organizations with legacy billing.", alias="enterpriseAgentsIncluded") - __properties: ClassVar[List[str]] = ["monthStart", "monthEnd", "cloudUnitsIncluded", "endpointAgentsIncluded", "endpointAgentsEssentialsIncluded", "endpointAgentsEmbeddedIncluded", "enterpriseAgentsIncluded"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - 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 json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UsageUsageQuota 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. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UsageUsageQuota from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "monthStart": obj.get("monthStart"), - "monthEnd": obj.get("monthEnd"), - "cloudUnitsIncluded": obj.get("cloudUnitsIncluded"), - "endpointAgentsIncluded": obj.get("endpointAgentsIncluded"), - "endpointAgentsEssentialsIncluded": obj.get("endpointAgentsEssentialsIncluded"), - "endpointAgentsEmbeddedIncluded": obj.get("endpointAgentsEmbeddedIncluded"), - "enterpriseAgentsIncluded": obj.get("enterpriseAgentsIncluded") - }) - return _obj - - diff --git a/usage_api/usage_api/rest.py b/usage_api/usage_api/rest.py deleted file mode 100644 index 61bc08d3..00000000 --- a/usage_api/usage_api/rest.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - Usage API - - ## Overview 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 API definitions below for detailed usage instructions and optional parameters. - - The version of the OpenAPI document: 7.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from usage_api.exceptions import ApiException, ApiValueError - -RESTResponseType = urllib3.HTTPResponse - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :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. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) From eb6e9cd0ce62c3a6e41b0d2b959b4d0f75bccdf8 Mon Sep 17 00:00:00 2001 From: Shahid Hussain Khan Date: Wed, 24 Apr 2024 09:59:26 +0100 Subject: [PATCH 2/2] CP-2060 Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 5957bb6b..ac2f9e9b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# thousandeyes-python-sdk - -## Owners: api-team-current +# thousandeyes-sdk-python ## Description